Skip to content

Commit 45262ed

Browse files
authored
Migrate to Vite+ unified toolchain (#428)
1 parent aed7bd1 commit 45262ed

File tree

166 files changed

+1841
-1598
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+1841
-1598
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,20 @@ jobs:
1414
runs-on: macos-latest
1515
steps:
1616
- uses: actions/checkout@v4
17-
- uses: actions/setup-node@v4
17+
- uses: voidzero-dev/setup-vp@v1
18+
with:
19+
node-version: '24'
20+
cache: true
1821
- uses: dtolnay/rust-toolchain@stable
1922
- uses: Swatinem/rust-cache@v2
2023
with:
2124
shared-key: ci
2225
cache-on-failure: true
2326

24-
- run: npm ci
27+
- run: vp install
2528
- run: npm run bootstrap
2629
- run: npm run lint
2730
- name: Run JS Tests
28-
run: npm test
31+
run: vp test
2932
- name: Run Rust Tests
3033
run: cargo test --all

.github/workflows/release-app.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ jobs:
5050
- name: Checkout yaakapp/app
5151
uses: actions/checkout@v4
5252

53-
- name: Setup Node
54-
uses: actions/setup-node@v4
53+
- name: Setup Vite+
54+
uses: voidzero-dev/setup-vp@v1
55+
with:
56+
node-version: '24'
57+
cache: true
5558

5659
- name: install Rust stable
5760
uses: dtolnay/rust-toolchain@stable
@@ -87,13 +90,13 @@ jobs:
8790
echo $dir >> $env:GITHUB_PATH
8891
& $exe --version
8992
90-
- run: npm ci
93+
- run: vp install
9194
- run: npm run bootstrap
9295
env:
9396
YAAK_TARGET_ARCH: ${{ matrix.yaak_arch }}
9497
- run: npm run lint
9598
- name: Run JS Tests
96-
run: npm test
99+
run: vp test
97100
- name: Run Rust Tests
98101
run: cargo test --all --exclude yaak-cli
99102

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
24.14.0

.vite-hooks/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vp lint

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["biomejs.biome", "rust-lang.rust-analyzer", "bradlc.vscode-tailwindcss"]
2+
"recommendations": ["rust-lang.rust-analyzer", "bradlc.vscode-tailwindcss", "VoidZero.vite-plus-extension-pack"]
33
}

.vscode/settings.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
2-
"editor.defaultFormatter": "biomejs.biome",
2+
"editor.defaultFormatter": "oxc.oxc-vscode",
33
"editor.formatOnSave": true,
4-
"biome.enabled": true,
5-
"biome.lint.format.enable": true
4+
"editor.formatOnSaveMode": "file",
5+
"editor.codeActionsOnSave": {
6+
"source.fixAll.oxc": "explicit"
7+
}
68
}

biome.json

Lines changed: 0 additions & 55 deletions
This file was deleted.

crates-tauri/yaak-license/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function useLicense() {
2929
await queryClient.invalidateQueries({ queryKey: CHECK_QUERY_KEY });
3030
});
3131
return () => {
32-
unlisten.then((fn) => fn());
32+
void unlisten.then((fn) => fn());
3333
};
3434
}, []);
3535

crates/yaak-git/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ export const gitMutations = (dir: string, callbacks: GitCallbacks) => {
8989

9090
const handleError = (err: unknown) => {
9191
showToast({
92-
id: `${err}`,
93-
message: `${err}`,
92+
id: err instanceof Error ? err.message : String(err),
93+
message: err instanceof Error ? err.message : String(err),
9494
color: 'danger',
9595
timeout: 5000,
9696
});
@@ -186,16 +186,16 @@ export const gitMutations = (dir: string, callbacks: GitCallbacks) => {
186186
}
187187

188188
if (result.type === 'uncommitted_changes') {
189-
callbacks.promptUncommittedChanges().then(async (strategy) => {
189+
void callbacks.promptUncommittedChanges().then(async (strategy) => {
190190
if (strategy === 'cancel') return;
191191

192192
await invoke('cmd_git_reset_changes', { dir });
193193
return invoke<PullResult>('cmd_git_pull', { dir });
194-
}).then(async () => { onSuccess(); await callbacks.forceSync(); }, handleError);
194+
}).then(async () => { await onSuccess(); await callbacks.forceSync(); }, handleError);
195195
}
196196

197197
if (result.type === 'diverged') {
198-
callbacks.promptDiverged(result).then((strategy) => {
198+
void callbacks.promptDiverged(result).then((strategy) => {
199199
if (strategy === 'cancel') return;
200200

201201
if (strategy === 'force_reset') {
@@ -211,7 +211,7 @@ export const gitMutations = (dir: string, callbacks: GitCallbacks) => {
211211
remote: result.remote,
212212
branch: result.branch,
213213
});
214-
}).then(async () => { onSuccess(); await callbacks.forceSync(); }, handleError);
214+
}).then(async () => { await onSuccess(); await callbacks.forceSync(); }, handleError);
215215
}
216216

217217
return result;

0 commit comments

Comments
 (0)