From 7194ba72fd8812308a7947de4b64145bd5a8f77d Mon Sep 17 00:00:00 2001 From: Alois Date: Sun, 9 Aug 2026 22:34:19 +0200 Subject: [PATCH] feat(deps): add dep build workflow --- .forgejo/workflows/dependency-builds.yml | 23 ++++ apps/showcase/package.json | 3 +- apps/showcase/src/MarkdownShowcase.tsx | 13 +-- flake.nix | 27 +++++ pnpm-lock.yaml | 133 ++++++++++------------- 5 files changed, 110 insertions(+), 89 deletions(-) create mode 100644 .forgejo/workflows/dependency-builds.yml create mode 100644 flake.nix diff --git a/.forgejo/workflows/dependency-builds.yml b/.forgejo/workflows/dependency-builds.yml new file mode 100644 index 0000000..dc1748f --- /dev/null +++ b/.forgejo/workflows/dependency-builds.yml @@ -0,0 +1,23 @@ +name: Dependency builds + +on: + pull_request: + +env: + NIX_CONFIG: experimental-features = nix-command flakes + FORGEJO_TOKEN: "" + GITHUB_TOKEN: "" + +jobs: + check: + if: ${{ github.actor == 'rasensprenger' }} + name: Build & Lint + runs-on: nixos + steps: + - run: nix profile add nixpkgs#nodejs_24 + - uses: https://data.forgejo.org/actions/checkout@v4 + with: + persist-credentials: false + - run: nix develop .#electron --command pnpm install --frozen-lockfile + - run: nix develop .#electron --command pnpm run lint + - run: nix develop .#electron --command pnpm run build diff --git a/apps/showcase/package.json b/apps/showcase/package.json index 3a27e6f..d4a5eed 100644 --- a/apps/showcase/package.json +++ b/apps/showcase/package.json @@ -17,6 +17,7 @@ "devDependencies": { "@eslint/js": "^10.0.1", "@tailwindcss/vite": "^4.3.3", + "@typescript/native": "npm:typescript@^7.0.2", "@types/node": "^26.2.0", "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", @@ -25,7 +26,7 @@ "eslint-plugin-react-hooks": "^7.1.1", "eslint-plugin-react-refresh": "^0.5.3", "globals": "^17.9.0", - "typescript": "^7.0.2", + "typescript": "npm:@typescript/typescript6@^6.0.2", "typescript-eslint": "^8.66.0", "vite": "^8.2.1" } diff --git a/apps/showcase/src/MarkdownShowcase.tsx b/apps/showcase/src/MarkdownShowcase.tsx index 5b07dce..ded9d7a 100644 --- a/apps/showcase/src/MarkdownShowcase.tsx +++ b/apps/showcase/src/MarkdownShowcase.tsx @@ -1,15 +1,6 @@ -import { - Button, - Card, - CardContent, - CardDescription, - CardHeader, - CardTitle, - Markdown, -} from "@methanium/ui"; +import { Markdown } from "@methanium/ui"; import { createEmojiRegistry, - Emoji, EmojiProvider, Input, Text, @@ -136,7 +127,6 @@ function MarkdownShowcase() { const [inputValue, setInputValue] = useState( 'Hello **Markdown** :fire:\n\nTry the custom :methanium: emoji or type another `:shortcode:`. \n```ts\nconst stuff = "stuff";\n```', ); - const [submissions, setSubmissions] = useState(0); const controllerRef = useRef(null); return ( @@ -149,7 +139,6 @@ function MarkdownShowcase() { setValue={setInputValue} placeholder="Write Markdown or type :fire:" emojiFrequencies={{ ":methanium:": 20, ":fire:": 10 }} - onSubmit={() => setSubmissions((count) => count + 1)} onControllerChange={(controller) => { controllerRef.current = controller; }} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..106a15e --- /dev/null +++ b/flake.nix @@ -0,0 +1,27 @@ +{ + description = "Methanium UI development environment"; + + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + outputs = { nixpkgs, ... }: + let + forAllSystems = nixpkgs.lib.genAttrs [ + "x86_64-linux" + "aarch64-linux" + ]; + in + { + devShells = forAllSystems (system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + electron = pkgs.mkShell { + packages = with pkgs; [ + nodejs_24 + pnpm + ]; + }; + }); + }; +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3fd9be3..a500ae3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -175,6 +175,9 @@ importers: '@types/react-dom': specifier: ^19.2.4 version: 19.2.4(@types/react@19.2.18) + '@typescript/native': + specifier: npm:typescript@^7.0.2 + version: typescript@7.0.2 '@vitejs/plugin-react': specifier: ^6.0.5 version: 6.0.5(vite@8.2.1(@types/node@26.2.0)(esbuild@0.28.1)(jiti@2.7.0)) @@ -191,11 +194,11 @@ importers: specifier: ^17.9.0 version: 17.9.0 typescript: - specifier: ^7.0.2 - version: 7.0.2 + specifier: npm:@typescript/typescript6@^6.0.2 + version: '@typescript/typescript6@6.0.2' typescript-eslint: specifier: ^8.66.0 - version: 8.66.0(eslint@10.8.1(jiti@2.7.0))(typescript@7.0.2) + version: 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.1(jiti@2.7.0)) vite: specifier: ^8.2.1 version: 8.2.1(@types/node@26.2.0)(esbuild@0.28.1)(jiti@2.7.0) @@ -1461,6 +1464,10 @@ packages: cpu: [x64] os: [win32] + '@typescript/typescript6@6.0.2': + resolution: {integrity: sha512-mbCddXd+jm7hfx7w2YU64/Av4/NqqeG3GoRZgxPcgoTxYjhrcfJRw9ULch71SS4G+Q3bOXFhRvPqjguN0Hyp5w==} + hasBin: true + '@ungap/structured-clone@1.3.3': resolution: {integrity: sha512-60YRaenCQcVjYEKOcG824+DRGGIQ3VKErcBoAEDJZz5bKIs2ZG+X/H9Nk+Q6EVkwJk5QNApxbrc5QtBSwtrXAg==} @@ -1547,11 +1554,6 @@ packages: resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} engines: {node: 18 || 20 || >=22} - baseline-browser-mapping@2.11.12: - resolution: {integrity: sha512-r7WnVImvVCeFpf2DOXfy41aPWzeNg3H/A2X4dKmy1QL0MSyyk/e7z8ihJ3N6Nn2PsdhkVlqnEfnUE4a05P2aTA==} - engines: {node: '>=6.0.0'} - hasBin: true - baseline-browser-mapping@2.11.13: resolution: {integrity: sha512-k9HNuUVMlqVjQ9UHzfPjIqiDbWw7WqT1AoT7GL8VwvF3r0ZfArtgiSPAlmupyNquNgOJHTuH4CKYf8ttMTWBTQ==} engines: {node: '>=6.0.0'} @@ -1569,11 +1571,6 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - browserslist@4.28.7: - resolution: {integrity: sha512-JxV13hNrFxqjOc8alRbq9dK1MM79NEXYpma2B2J4wAtpWS5zIEIKqWPGCl7N4o7Uc7B7itylh7SuDujATRyyTw==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - browserslist@4.28.8: resolution: {integrity: sha512-V2NpofLblG64mfOtSgDhOJESZEGogzDMBv/q+W6oc4LXWP/q75eOXoOaaOu1EOadB9U4Bwx/e0yzbvwKH8zalA==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -1599,9 +1596,6 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - caniuse-lite@1.0.30001807: - resolution: {integrity: sha512-daRXJ9EB/rdRgu7kV+TTl1YUKtlsMWblPl2sLnpg9DZae16QCegol6A1SmCE31Lm9mXC1sRWGt/krouH+/dl7Q==} - caniuse-lite@1.0.30001809: resolution: {integrity: sha512-xxWVywk6a6Arlk+hymeycyn/VgqEfLDxupvhH/xiY5SJ/18kmi9o6MiO320DCUzypORHLtvh0I4i04tUhCNHNQ==} @@ -3421,6 +3415,11 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} + engines: {node: '>=14.17'} + hasBin: true + typescript@7.0.2: resolution: {integrity: sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==} engines: {node: '>=16.20.0'} @@ -3469,12 +3468,6 @@ packages: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} - update-browserslist-db@1.2.3: - resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' - update-browserslist-db@1.3.0: resolution: {integrity: sha512-x/M6q3w4Ybp91CNaS4S69UnliqR3BzRpOT6LWbksjth0S/+jhfaPJsWjt/TewpT8j9eLIojUf5jr29WextHroA==} hasBin: true @@ -3689,7 +3682,7 @@ snapshots: dependencies: '@babel/compat-data': 7.29.7 '@babel/helper-validator-option': 7.29.7 - browserslist: 4.28.7 + browserslist: 4.28.8 lru-cache: 5.1.1 semver: 6.3.1 @@ -4658,40 +4651,40 @@ snapshots: '@types/validate-npm-package-name@4.0.2': {} - '@typescript-eslint/eslint-plugin@8.66.0(@typescript-eslint/parser@8.66.0(eslint@10.8.1(jiti@2.7.0))(typescript@7.0.2))(eslint@10.8.1(jiti@2.7.0))(typescript@7.0.2)': + '@typescript-eslint/eslint-plugin@8.66.0(@typescript-eslint/parser@8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.1(jiti@2.7.0)))(@typescript/typescript6@6.0.2)(eslint@10.8.1(jiti@2.7.0))': dependencies: '@eslint-community/regexpp': 4.12.2 - '@typescript-eslint/parser': 8.66.0(eslint@10.8.1(jiti@2.7.0))(typescript@7.0.2) + '@typescript-eslint/parser': 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.1(jiti@2.7.0)) '@typescript-eslint/scope-manager': 8.66.0 - '@typescript-eslint/type-utils': 8.66.0(eslint@10.8.1(jiti@2.7.0))(typescript@7.0.2) - '@typescript-eslint/utils': 8.66.0(eslint@10.8.1(jiti@2.7.0))(typescript@7.0.2) + '@typescript-eslint/type-utils': 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.1(jiti@2.7.0)) + '@typescript-eslint/utils': 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.1(jiti@2.7.0)) '@typescript-eslint/visitor-keys': 8.66.0 eslint: 10.8.1(jiti@2.7.0) ignore: 7.0.6 natural-compare: 1.4.0 - ts-api-utils: 2.5.0(typescript@7.0.2) - typescript: 7.0.2 + ts-api-utils: 2.5.0(@typescript/typescript6@6.0.2) + typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.66.0(eslint@10.8.1(jiti@2.7.0))(typescript@7.0.2)': + '@typescript-eslint/parser@8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.1(jiti@2.7.0))': dependencies: '@typescript-eslint/scope-manager': 8.66.0 '@typescript-eslint/types': 8.66.0 - '@typescript-eslint/typescript-estree': 8.66.0(typescript@7.0.2) + '@typescript-eslint/typescript-estree': 8.66.0(@typescript/typescript6@6.0.2) '@typescript-eslint/visitor-keys': 8.66.0 debug: 4.4.3 eslint: 10.8.1(jiti@2.7.0) - typescript: 7.0.2 + typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.66.0(typescript@7.0.2)': + '@typescript-eslint/project-service@8.66.0(@typescript/typescript6@6.0.2)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.66.0(typescript@7.0.2) + '@typescript-eslint/tsconfig-utils': 8.66.0(@typescript/typescript6@6.0.2) '@typescript-eslint/types': 8.66.0 debug: 4.4.3 - typescript: 7.0.2 + typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color @@ -4700,47 +4693,47 @@ snapshots: '@typescript-eslint/types': 8.66.0 '@typescript-eslint/visitor-keys': 8.66.0 - '@typescript-eslint/tsconfig-utils@8.66.0(typescript@7.0.2)': + '@typescript-eslint/tsconfig-utils@8.66.0(@typescript/typescript6@6.0.2)': dependencies: - typescript: 7.0.2 + typescript: '@typescript/typescript6@6.0.2' - '@typescript-eslint/type-utils@8.66.0(eslint@10.8.1(jiti@2.7.0))(typescript@7.0.2)': + '@typescript-eslint/type-utils@8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.1(jiti@2.7.0))': dependencies: '@typescript-eslint/types': 8.66.0 - '@typescript-eslint/typescript-estree': 8.66.0(typescript@7.0.2) - '@typescript-eslint/utils': 8.66.0(eslint@10.8.1(jiti@2.7.0))(typescript@7.0.2) + '@typescript-eslint/typescript-estree': 8.66.0(@typescript/typescript6@6.0.2) + '@typescript-eslint/utils': 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.1(jiti@2.7.0)) debug: 4.4.3 eslint: 10.8.1(jiti@2.7.0) - ts-api-utils: 2.5.0(typescript@7.0.2) - typescript: 7.0.2 + ts-api-utils: 2.5.0(@typescript/typescript6@6.0.2) + typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color '@typescript-eslint/types@8.66.0': {} - '@typescript-eslint/typescript-estree@8.66.0(typescript@7.0.2)': + '@typescript-eslint/typescript-estree@8.66.0(@typescript/typescript6@6.0.2)': dependencies: - '@typescript-eslint/project-service': 8.66.0(typescript@7.0.2) - '@typescript-eslint/tsconfig-utils': 8.66.0(typescript@7.0.2) + '@typescript-eslint/project-service': 8.66.0(@typescript/typescript6@6.0.2) + '@typescript-eslint/tsconfig-utils': 8.66.0(@typescript/typescript6@6.0.2) '@typescript-eslint/types': 8.66.0 '@typescript-eslint/visitor-keys': 8.66.0 debug: 4.4.3 minimatch: 10.2.6 semver: 7.8.5 tinyglobby: 0.2.17 - ts-api-utils: 2.5.0(typescript@7.0.2) - typescript: 7.0.2 + ts-api-utils: 2.5.0(@typescript/typescript6@6.0.2) + typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.66.0(eslint@10.8.1(jiti@2.7.0))(typescript@7.0.2)': + '@typescript-eslint/utils@8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.1(jiti@2.7.0))': dependencies: '@eslint-community/eslint-utils': 4.10.1(eslint@10.8.1(jiti@2.7.0)) '@typescript-eslint/scope-manager': 8.66.0 '@typescript-eslint/types': 8.66.0 - '@typescript-eslint/typescript-estree': 8.66.0(typescript@7.0.2) + '@typescript-eslint/typescript-estree': 8.66.0(@typescript/typescript6@6.0.2) eslint: 10.8.1(jiti@2.7.0) - typescript: 7.0.2 + typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color @@ -4809,6 +4802,10 @@ snapshots: '@typescript/typescript-win32-x64@7.0.2': optional: true + '@typescript/typescript6@6.0.2': + dependencies: + '@typescript/old': typescript@6.0.3 + '@ungap/structured-clone@1.3.3': {} '@vitejs/plugin-react@6.0.5(vite@8.2.1(@types/node@26.2.0)(esbuild@0.28.1)(jiti@2.7.0))': @@ -4871,8 +4868,6 @@ snapshots: balanced-match@4.0.4: {} - baseline-browser-mapping@2.11.12: {} - baseline-browser-mapping@2.11.13: {} body-parser@2.3.0: @@ -4897,14 +4892,6 @@ snapshots: dependencies: fill-range: 7.1.1 - browserslist@4.28.7: - dependencies: - baseline-browser-mapping: 2.11.12 - caniuse-lite: 1.0.30001807 - electron-to-chromium: 1.5.402 - node-releases: 2.0.53 - update-browserslist-db: 1.2.3(browserslist@4.28.7) - browserslist@4.28.8: dependencies: baseline-browser-mapping: 2.11.13 @@ -4931,8 +4918,6 @@ snapshots: callsites@3.1.0: {} - caniuse-lite@1.0.30001807: {} - caniuse-lite@1.0.30001809: {} ccount@2.0.1: {} @@ -6992,9 +6977,9 @@ snapshots: trough@2.2.0: {} - ts-api-utils@2.5.0(typescript@7.0.2): + ts-api-utils@2.5.0(@typescript/typescript6@6.0.2): dependencies: - typescript: 7.0.2 + typescript: '@typescript/typescript6@6.0.2' ts-morph@26.0.0: dependencies: @@ -7021,17 +7006,19 @@ snapshots: media-typer: 1.1.1 mime-types: 3.0.2 - typescript-eslint@8.66.0(eslint@10.8.1(jiti@2.7.0))(typescript@7.0.2): + typescript-eslint@8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.1(jiti@2.7.0)): dependencies: - '@typescript-eslint/eslint-plugin': 8.66.0(@typescript-eslint/parser@8.66.0(eslint@10.8.1(jiti@2.7.0))(typescript@7.0.2))(eslint@10.8.1(jiti@2.7.0))(typescript@7.0.2) - '@typescript-eslint/parser': 8.66.0(eslint@10.8.1(jiti@2.7.0))(typescript@7.0.2) - '@typescript-eslint/typescript-estree': 8.66.0(typescript@7.0.2) - '@typescript-eslint/utils': 8.66.0(eslint@10.8.1(jiti@2.7.0))(typescript@7.0.2) + '@typescript-eslint/eslint-plugin': 8.66.0(@typescript-eslint/parser@8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.1(jiti@2.7.0)))(@typescript/typescript6@6.0.2)(eslint@10.8.1(jiti@2.7.0)) + '@typescript-eslint/parser': 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.1(jiti@2.7.0)) + '@typescript-eslint/typescript-estree': 8.66.0(@typescript/typescript6@6.0.2) + '@typescript-eslint/utils': 8.66.0(@typescript/typescript6@6.0.2)(eslint@10.8.1(jiti@2.7.0)) eslint: 10.8.1(jiti@2.7.0) - typescript: 7.0.2 + typescript: '@typescript/typescript6@6.0.2' transitivePeerDependencies: - supports-color + typescript@6.0.3: {} + typescript@7.0.2: optionalDependencies: '@typescript/typescript-aix-ppc64': 7.0.2 @@ -7108,12 +7095,6 @@ snapshots: unpipe@1.0.0: {} - update-browserslist-db@1.2.3(browserslist@4.28.7): - dependencies: - browserslist: 4.28.7 - escalade: 3.2.0 - picocolors: 1.1.1 - update-browserslist-db@1.3.0(browserslist@4.28.8): dependencies: browserslist: 4.28.8