Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 137 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,29 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
run: |
# npm/cli#4828: platform-specific optionalDependencies (rollup
# native binaries like @rollup/rollup-linux-x64-gnu) can be
# missing from a package-lock.json generated on a different
# platform. `npm ci` then fails with "Cannot find module
# @rollup/rollup-linux-x64-gnu" on Linux runners when the
# lockfile was generated on macOS. Fall back to a clean
# `npm install` in that case so CI self-heals without needing
# to regenerate the lockfile on every contributor's machine.
npm ci --ignore-scripts || {
echo "::warning::npm ci failed — falling back to npm install (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
# npm/cli#4828: even when `npm ci` succeeds, platform-specific
# rollup optionalDependencies can be silently skipped on Linux
# runners if the lockfile was generated on macOS. Probe and
# self-heal if the native binding is missing.
node -e "require('rollup/dist/native.js')" 2>/dev/null || {
echo "::warning::rollup native binding missing — reinstalling (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
- name: Prettier --check
run: npx prettier --check 'src/**/*.ts' 'test/**/*.ts'

Expand All @@ -49,7 +71,25 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
run: |
# npm/cli#4828: platform-specific optionalDependencies (rollup
# native binaries like @rollup/rollup-linux-x64-gnu) can be
# missing from a package-lock.json generated on a different
# platform. `npm ci` then fails with "Cannot find module
# @rollup/rollup-linux-x64-gnu" on Linux runners when the
# lockfile was generated on macOS. Fall back to a clean
# `npm install` in that case so CI self-heals without needing
# to regenerate the lockfile on every contributor's machine.
npm ci --ignore-scripts || {
echo "::warning::npm ci failed — falling back to npm install (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
node -e "require('rollup/dist/native.js')" 2>/dev/null || {
echo "::warning::rollup native binding missing — reinstalling (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
- name: ESLint
run: npx eslint 'src/**/*.ts' --max-warnings=100

Expand All @@ -66,7 +106,25 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
run: |
# npm/cli#4828: platform-specific optionalDependencies (rollup
# native binaries like @rollup/rollup-linux-x64-gnu) can be
# missing from a package-lock.json generated on a different
# platform. `npm ci` then fails with "Cannot find module
# @rollup/rollup-linux-x64-gnu" on Linux runners when the
# lockfile was generated on macOS. Fall back to a clean
# `npm install` in that case so CI self-heals without needing
# to regenerate the lockfile on every contributor's machine.
npm ci --ignore-scripts || {
echo "::warning::npm ci failed — falling back to npm install (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
node -e "require('rollup/dist/native.js')" 2>/dev/null || {
echo "::warning::rollup native binding missing — reinstalling (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
- name: TypeScript
run: npx tsc -p tsconfig.json --noEmit

Expand All @@ -88,7 +146,25 @@ jobs:
node-version: ${{ matrix.node }}
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
run: |
# npm/cli#4828: platform-specific optionalDependencies (rollup
# native binaries like @rollup/rollup-linux-x64-gnu) can be
# missing from a package-lock.json generated on a different
# platform. `npm ci` then fails with "Cannot find module
# @rollup/rollup-linux-x64-gnu" on Linux runners when the
# lockfile was generated on macOS. Fall back to a clean
# `npm install` in that case so CI self-heals without needing
# to regenerate the lockfile on every contributor's machine.
npm ci --ignore-scripts || {
echo "::warning::npm ci failed — falling back to npm install (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
node -e "require('rollup/dist/native.js')" 2>/dev/null || {
echo "::warning::rollup native binding missing — reinstalling (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
- name: Rebuild native bindings (better-sqlite3 prebuild)
run: npm rebuild better-sqlite3
- name: Run vitest
Expand Down Expand Up @@ -116,7 +192,25 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
run: |
# npm/cli#4828: platform-specific optionalDependencies (rollup
# native binaries like @rollup/rollup-linux-x64-gnu) can be
# missing from a package-lock.json generated on a different
# platform. `npm ci` then fails with "Cannot find module
# @rollup/rollup-linux-x64-gnu" on Linux runners when the
# lockfile was generated on macOS. Fall back to a clean
# `npm install` in that case so CI self-heals without needing
# to regenerate the lockfile on every contributor's machine.
npm ci --ignore-scripts || {
echo "::warning::npm ci failed — falling back to npm install (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
node -e "require('rollup/dist/native.js')" 2>/dev/null || {
echo "::warning::rollup native binding missing — reinstalling (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
- name: Rebuild native bindings (better-sqlite3 prebuild)
run: npm rebuild better-sqlite3
- name: vitest --coverage
Expand Down Expand Up @@ -144,7 +238,25 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
run: |
# npm/cli#4828: platform-specific optionalDependencies (rollup
# native binaries like @rollup/rollup-linux-x64-gnu) can be
# missing from a package-lock.json generated on a different
# platform. `npm ci` then fails with "Cannot find module
# @rollup/rollup-linux-x64-gnu" on Linux runners when the
# lockfile was generated on macOS. Fall back to a clean
# `npm install` in that case so CI self-heals without needing
# to regenerate the lockfile on every contributor's machine.
npm ci --ignore-scripts || {
echo "::warning::npm ci failed — falling back to npm install (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
node -e "require('rollup/dist/native.js')" 2>/dev/null || {
echo "::warning::rollup native binding missing — reinstalling (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
- name: Rebuild native bindings (better-sqlite3 prebuild)
run: npm rebuild better-sqlite3
- name: Build (tsc + asset copy)
Expand Down Expand Up @@ -201,7 +313,25 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
run: |
# npm/cli#4828: platform-specific optionalDependencies (rollup
# native binaries like @rollup/rollup-linux-x64-gnu) can be
# missing from a package-lock.json generated on a different
# platform. `npm ci` then fails with "Cannot find module
# @rollup/rollup-linux-x64-gnu" on Linux runners when the
# lockfile was generated on macOS. Fall back to a clean
# `npm install` in that case so CI self-heals without needing
# to regenerate the lockfile on every contributor's machine.
npm ci --ignore-scripts || {
echo "::warning::npm ci failed — falling back to npm install (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
node -e "require('rollup/dist/native.js')" 2>/dev/null || {
echo "::warning::rollup native binding missing — reinstalling (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
- name: npm audit (high)
run: npm audit --audit-level=high || true

Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,19 @@ jobs:
node-version: '20'
registry-url: https://registry.npmjs.org
cache: npm
- run: npm ci --ignore-scripts
- name: Install dependencies
# npm/cli#4828 self-heal (see ci.yml for rationale).
run: |
npm ci --ignore-scripts || {
echo "::warning::npm ci failed — falling back to npm install (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
node -e "require('rollup/dist/native.js')" 2>/dev/null || {
echo "::warning::rollup native binding missing — reinstalling (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
- run: npm rebuild better-sqlite3
- run: npm run build
- run: npx vitest run
Expand Down
42 changes: 39 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,19 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- run: npm ci --ignore-scripts
- name: Install dependencies
# npm/cli#4828 self-heal (see ci.yml for rationale).
run: |
npm ci --ignore-scripts || {
echo "::warning::npm ci failed — falling back to npm install (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
node -e "require('rollup/dist/native.js')" 2>/dev/null || {
echo "::warning::rollup native binding missing — reinstalling (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
- run: npm rebuild better-sqlite3
- run: npm run build
- run: npx vitest run
Expand Down Expand Up @@ -73,7 +85,19 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}
cache: npm
- run: npm ci --ignore-scripts
- name: Install dependencies
# npm/cli#4828 self-heal (see ci.yml for rationale).
run: |
npm ci --ignore-scripts || {
echo "::warning::npm ci failed — falling back to npm install (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
node -e "require('rollup/dist/native.js')" 2>/dev/null || {
echo "::warning::rollup native binding missing — reinstalling (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
- run: npm rebuild better-sqlite3
- run: npm run build
- run: npm pack
Expand Down Expand Up @@ -194,7 +218,19 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org
cache: npm
- run: npm ci --ignore-scripts
- name: Install dependencies
# npm/cli#4828 self-heal (see ci.yml for rationale).
run: |
npm ci --ignore-scripts || {
echo "::warning::npm ci failed — falling back to npm install (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
node -e "require('rollup/dist/native.js')" 2>/dev/null || {
echo "::warning::rollup native binding missing — reinstalling (npm/cli#4828)"
rm -rf node_modules package-lock.json
npm install --ignore-scripts --no-audit --no-fund
}
- run: npm rebuild better-sqlite3
- run: npm run build
- run: npm publish --provenance --access public
Expand Down
Loading
Loading