-
Notifications
You must be signed in to change notification settings - Fork 577
refactor: migrate frontend from next.js to vite + tanStack router #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9954fea
5136c32
ad4da23
96b941b
c20b224
45eaf91
b0a9c89
df50ccc
1d945f4
784188c
e6a63cc
ea1b10f
2c9f773
8f2e06b
bfc8f9b
76cb728
3eac848
e78bfc8
e1c3b75
019ac56
a860b3c
45dd1d4
c763f2a
899c45f
2c07962
0d8043f
7fdc2b2
adf9307
1cb6daa
f9db4ff
dcf05e4
ea7e273
06ed965
157dd71
95c6a69
7ad70a3
7603c82
8794156
c4a90d7
a85390b
0c2192d
dd8862c
8c2c54b
e508f9c
1a83c9b
419e954
1656b4f
2a1ab21
3e01559
a14ef30
8d6dae7
35ecb0d
3961006
7d6ed0c
96b0e74
17a2053
1ad3b17
2b02db8
e9dba8c
a26ef43
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| name: "Setup Project" | ||
| description: "Common setup steps for CI workflows - checkout, Node.js, dependencies, and native modules" | ||
|
|
||
| inputs: | ||
| node-version: | ||
| description: "Node.js version to use" | ||
| required: false | ||
| default: "22" | ||
| check-lockfile: | ||
| description: "Run lockfile lint check for SSH URLs" | ||
| required: false | ||
| default: "false" | ||
| rebuild-node-pty-path: | ||
| description: "Working directory for node-pty rebuild (empty = root)" | ||
| required: false | ||
| default: "" | ||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ inputs.node-version }} | ||
| cache: "npm" | ||
| cache-dependency-path: package-lock.json | ||
|
|
||
| - name: Check for SSH URLs in lockfile | ||
| if: inputs.check-lockfile == 'true' | ||
| shell: bash | ||
| run: npm run lint:lockfile | ||
|
|
||
| - name: Configure Git for HTTPS | ||
| shell: bash | ||
| # Convert SSH URLs to HTTPS for git dependencies (e.g., @electron/node-gyp) | ||
| # This is needed because SSH authentication isn't available in CI | ||
| run: git config --global url."https://github.com/".insteadOf "git@github.com:" | ||
|
|
||
| - name: Install dependencies | ||
| shell: bash | ||
| # Use npm install instead of npm ci to correctly resolve platform-specific | ||
| # optional dependencies (e.g., @tailwindcss/oxide, lightningcss binaries) | ||
| # Skip scripts to avoid electron-builder install-app-deps which uses too much memory | ||
| run: npm install --ignore-scripts | ||
|
|
||
| - name: Install Linux native bindings | ||
| shell: bash | ||
| # Workaround for npm optional dependencies bug (npm/cli#4828) | ||
| # Explicitly install Linux bindings needed for build tools | ||
| run: | | ||
| npm install --no-save --force --ignore-scripts \ | ||
| @rollup/rollup-linux-x64-gnu@4.53.3 \ | ||
| @tailwindcss/oxide-linux-x64-gnu@4.1.17 | ||
|
|
||
| - name: Rebuild native modules (root) | ||
| if: inputs.rebuild-node-pty-path == '' | ||
| shell: bash | ||
| # Rebuild node-pty and other native modules for Electron | ||
| run: npm rebuild node-pty | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The run: npm rebuild |
||
|
|
||
| - name: Rebuild native modules (workspace) | ||
| if: inputs.rebuild-node-pty-path != '' | ||
| shell: bash | ||
| # Rebuild node-pty and other native modules needed for server | ||
| run: npm rebuild node-pty | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the root rebuild step, this command only rebuilds run: npm rebuild |
||
| working-directory: ${{ inputs.rebuild-node-pty-path }} | ||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These native binding versions are hardcoded. This could become a maintenance issue if the parent dependencies (
@rollup/rollupor@tailwindcss/vite) are updated and require different versions of these optional native modules.To improve maintainability, I suggest adding a comment here to remind future developers to update these versions when the corresponding parent dependencies change in
package.json.