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.
This commit is contained in:
Kazuki Yamada
2026-05-09 19:08:10 +09:00
parent 9caf541368
commit 042750cb4e
10 changed files with 34 additions and 34 deletions
+5 -5
View File
@@ -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
+4 -4
View File
@@ -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
+4 -4
View File
@@ -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
+7 -7
View File
@@ -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
+6 -6
View File
@@ -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
+3 -3
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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'
+1 -1
View File
@@ -17,7 +17,7 @@ RUN npm ci
# Copy source code and bundle
COPY . .
RUN npm run bundle
RUN node --run bundle
# ==============================================================================