From 08a64b69387e5b7c51bf3a93e3f7d8556723f90e Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Fri, 13 Mar 2026 08:44:52 -0700 Subject: [PATCH] VSCode suggestion and CI --- .github/workflows/ci.yml | 9 ++++++--- .github/workflows/release-app.yml | 11 +++++++---- .vite-hooks/pre-commit | 1 + .vscode/extensions.json | 2 +- .vscode/settings.json | 7 ++++++- package.json | 3 ++- 6 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 .vite-hooks/pre-commit diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf32f4a3..3797737b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,17 +14,20 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: voidzero-dev/setup-vp@v1 + with: + node-version: '24' + cache: true - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 with: shared-key: ci cache-on-failure: true - - run: npm ci + - run: vp install - run: npm run bootstrap - run: npm run lint - name: Run JS Tests - run: npm test + run: vp test - name: Run Rust Tests run: cargo test --all diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml index 0506d436..32d62a7a 100644 --- a/.github/workflows/release-app.yml +++ b/.github/workflows/release-app.yml @@ -50,8 +50,11 @@ jobs: - name: Checkout yaakapp/app uses: actions/checkout@v4 - - name: Setup Node - uses: actions/setup-node@v4 + - name: Setup Vite+ + uses: voidzero-dev/setup-vp@v1 + with: + node-version: '24' + cache: true - name: install Rust stable uses: dtolnay/rust-toolchain@stable @@ -87,13 +90,13 @@ jobs: echo $dir >> $env:GITHUB_PATH & $exe --version - - run: npm ci + - run: vp install - run: npm run bootstrap env: YAAK_TARGET_ARCH: ${{ matrix.yaak_arch }} - run: npm run lint - name: Run JS Tests - run: npm test + run: vp test - name: Run Rust Tests run: cargo test --all --exclude yaak-cli diff --git a/.vite-hooks/pre-commit b/.vite-hooks/pre-commit new file mode 100644 index 00000000..05b9080e --- /dev/null +++ b/.vite-hooks/pre-commit @@ -0,0 +1 @@ +vp lint diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 4af2a038..bab062e5 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,3 @@ { - "recommendations": ["rust-lang.rust-analyzer", "bradlc.vscode-tailwindcss"] + "recommendations": ["rust-lang.rust-analyzer", "bradlc.vscode-tailwindcss", "VoidZero.vite-plus-extension-pack"] } diff --git a/.vscode/settings.json b/.vscode/settings.json index ad92582b..b8065359 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,8 @@ { - "editor.formatOnSave": true + "editor.defaultFormatter": "oxc.oxc-vscode", + "editor.formatOnSave": true, + "editor.formatOnSaveMode": "file", + "editor.codeActionsOnSave": { + "source.fixAll.oxc": "explicit" + } } diff --git a/package.json b/package.json index 41a4cb47..aca27ec0 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,8 @@ "vendor:vendor-protoc": "node scripts/vendor-protoc.cjs", "vendor:vendor-node": "node scripts/vendor-node.cjs", "lint": "run-p lint:*", - "lint:extra": "npm run --workspaces --if-present lint", + "lint:vp": "vp lint", + "lint:workspaces": "npm run --workspaces --if-present lint", "replace-version": "node scripts/replace-version.cjs", "tauri": "tauri", "tauri-before-build": "npm run bootstrap",