From 042750cb4e1aa4f8a8333a1afaac65b85a30d0dd Mon Sep 17 00:00:00 2001 From: Kazuki Yamada Date: Sat, 9 May 2026 19:08:10 +0900 Subject: [PATCH] chore(ci): Replace `npm run` with `node --run` in workflows Now that the minimum supported Node.js version is 22, `node --run` is available everywhere. It avoids the npm process-spawn overhead and matches the style already used in package.json scripts. Affects all GitHub Actions workflows that invoke npm scripts and the website/server Dockerfile bundle step. `npm ci` is left as-is since it is npm-specific. --- .github/workflows/autofix.yml | 10 +++++----- .github/workflows/benchmark.yml | 8 ++++---- .github/workflows/ci-browser.yml | 8 ++++---- .github/workflows/ci-website.yml | 14 +++++++------- .github/workflows/ci.yml | 12 ++++++------ .github/workflows/npm-publish.yml | 6 +++--- .github/workflows/perf-benchmark-history.yml | 2 +- .github/workflows/perf-benchmark.yml | 4 ++-- .github/workflows/schema-update.yml | 2 +- website/server/Dockerfile | 2 +- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index b71c3ab3..ea0ece25 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -26,32 +26,32 @@ jobs: run: npm ci - name: Run biome with auto-fix - run: npm run lint-biome + run: node --run lint-biome continue-on-error: true - name: Run oxlint with auto-fix - run: npm run lint-oxlint + run: node --run lint-oxlint continue-on-error: true - name: Fix website client linting working-directory: website/client run: | npm ci - npm run lint + node --run lint continue-on-error: true - name: Fix website server linting working-directory: website/server run: | npm ci - npm run lint + node --run lint continue-on-error: true - name: Fix browser extension linting working-directory: browser run: | npm ci - npm run lint + node --run lint continue-on-error: true - uses: autofix-ci/action@c5b2d67aa2274e7b5a18224e8171550871fc7e4a # v1.3.4 diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 231f83fc..a6d045c2 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -47,7 +47,7 @@ jobs: # Build repomix - name: Build repomix working-directory: . - run: npm run build + run: node --run build # Install benchmark dependencies - name: Install benchmark dependencies @@ -55,7 +55,7 @@ jobs: # Build benchmark - name: Build benchmark - run: npm run build + run: node --run build # Run memory test - name: Run memory test @@ -103,7 +103,7 @@ jobs: # Build repomix - name: Build repomix working-directory: . - run: npm run build + run: node --run build # Install benchmark dependencies - name: Install benchmark dependencies @@ -111,7 +111,7 @@ jobs: # Build benchmark - name: Build benchmark - run: npm run build + run: node --run build # Run comprehensive memory test - name: Run comprehensive memory test diff --git a/.github/workflows/ci-browser.yml b/.github/workflows/ci-browser.yml index 07d6b5ac..f7026354 100644 --- a/.github/workflows/ci-browser.yml +++ b/.github/workflows/ci-browser.yml @@ -36,10 +36,10 @@ jobs: run: npm ci - name: Prepare WXT working-directory: browser - run: npm run prepare + run: node --run prepare - name: Lint browser extension working-directory: browser - run: npm run lint + run: node --run lint test-browser: name: Test Browser Extension @@ -58,7 +58,7 @@ jobs: run: npm ci - name: Prepare WXT working-directory: browser - run: npm run prepare + run: node --run prepare - name: Test browser extension working-directory: browser - run: npm run test + run: node --run test diff --git a/.github/workflows/ci-website.yml b/.github/workflows/ci-website.yml index 710c279d..f7e2b03c 100644 --- a/.github/workflows/ci-website.yml +++ b/.github/workflows/ci-website.yml @@ -42,7 +42,7 @@ jobs: run: npm ci - name: Lint website client working-directory: website/client - run: npm run lint + run: node --run lint lint-website-server: name: Lint Website Server @@ -59,7 +59,7 @@ jobs: - name: Build and link local repomix run: | npm ci - npm run build + node --run build npm link - name: Install website server dependencies working-directory: website/server @@ -68,7 +68,7 @@ jobs: npm link repomix - name: Lint website server working-directory: website/server - run: npm run lint + run: node --run lint test-website-server: name: Test Website Server @@ -85,7 +85,7 @@ jobs: - name: Build and link local repomix run: | npm ci - npm run build + node --run build npm link - name: Install website server dependencies working-directory: website/server @@ -94,7 +94,7 @@ jobs: npm link repomix - name: Test website server working-directory: website/server - run: npm run test + run: node --run test bundle-website-server: name: Bundle Website Server @@ -111,7 +111,7 @@ jobs: - name: Build and link local repomix run: | npm ci - npm run build + node --run build npm link - name: Install website server dependencies working-directory: website/server @@ -120,4 +120,4 @@ jobs: npm link repomix - name: Bundle website server working-directory: website/server - run: npm run bundle + run: node --run bundle diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 45518fa6..9b3e7990 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: node-version-file: .tool-versions cache: npm - run: npm ci - - run: npm run lint-biome && git diff --exit-code + - run: node --run lint-biome && git diff --exit-code lint-oxlint: name: Lint oxlint @@ -51,7 +51,7 @@ jobs: node-version-file: .tool-versions cache: npm - run: npm ci - - run: npm run lint-oxlint && git diff --exit-code + - run: node --run lint-oxlint && git diff --exit-code lint-ts: name: Lint TypeScript @@ -66,7 +66,7 @@ jobs: node-version-file: .tool-versions cache: npm - run: npm ci - - run: npm run lint-ts + - run: node --run lint-ts lint-secretlint: name: Lint Secretlint @@ -81,7 +81,7 @@ jobs: node-version-file: .tool-versions cache: npm - run: npm ci - - run: npm run lint-secretlint + - run: node --run lint-secretlint test: name: Test @@ -99,7 +99,7 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: npm ci - - run: npm run test -- --reporter=verbose + - run: node --run test -- --reporter=verbose env: CI_OS: ${{ runner.os }} @@ -135,7 +135,7 @@ jobs: node-version-file: .tool-versions cache: npm - run: npm ci - - run: npm run test-coverage -- --reporter=verbose --reporter=junit --outputFile.junit=./test-report.junit.xml + - run: node --run test-coverage -- --reporter=verbose --reporter=junit --outputFile.junit=./test-report.junit.xml env: CI_OS: ${{ runner.os }} - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 1230d95d..5a52862c 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -44,13 +44,13 @@ jobs: echo "Version ${PACKAGE_VERSION} is not yet published" - name: Lint - run: npm run lint + run: node --run lint - name: Test - run: npm run test-coverage + run: node --run test-coverage - name: Build - run: npm run build + run: node --run build - name: Verify npm audit signatures run: npm audit signatures diff --git a/.github/workflows/perf-benchmark-history.yml b/.github/workflows/perf-benchmark-history.yml index 5e1a4a2e..c010479b 100644 --- a/.github/workflows/perf-benchmark-history.yml +++ b/.github/workflows/perf-benchmark-history.yml @@ -41,7 +41,7 @@ jobs: cache: npm - name: Install and build - run: npm ci && npm run build + run: npm ci && node --run build - name: Run benchmark shell: bash diff --git a/.github/workflows/perf-benchmark.yml b/.github/workflows/perf-benchmark.yml index 093795a7..878960fd 100644 --- a/.github/workflows/perf-benchmark.yml +++ b/.github/workflows/perf-benchmark.yml @@ -94,11 +94,11 @@ jobs: - name: Install and build (PR branch) working-directory: pr-branch - run: npm ci && npm run build + run: npm ci && node --run build - name: Install and build (main branch) working-directory: main-branch - run: npm ci && npm run build + run: npm ci && node --run build - name: Run benchmark shell: bash diff --git a/.github/workflows/schema-update.yml b/.github/workflows/schema-update.yml index e422fd17..4b84b252 100644 --- a/.github/workflows/schema-update.yml +++ b/.github/workflows/schema-update.yml @@ -23,7 +23,7 @@ jobs: node-version-file: .tool-versions cache: npm - run: npm ci - - run: npm run website-generate-schema + - run: node --run website-generate-schema - uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0 with: commit_message: 'chore(schema): auto generate schema' diff --git a/website/server/Dockerfile b/website/server/Dockerfile index 120c5373..878e2767 100644 --- a/website/server/Dockerfile +++ b/website/server/Dockerfile @@ -17,7 +17,7 @@ RUN npm ci # Copy source code and bundle COPY . . -RUN npm run bundle +RUN node --run bundle # ==============================================================================