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
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
- uses: actions/setup-node@v6
with:
node-version: 20
- name: Setup npm
run: npm install --global npm@11.9.0
- run: npm ci
- name: Strip native addon
run: strip --strip-unneeded build/Release/native_watcher.node
Expand All @@ -51,6 +53,8 @@ jobs:
- uses: actions/checkout@v6
- name: Install native build tools
run: apk add --no-cache python3 make g++ binutils linux-headers
- name: Setup npm
run: npm install --global npm@11.9.0
- run: npm ci
- name: Strip native addon
run: strip --strip-unneeded build/Release/native_watcher.node
Expand All @@ -76,6 +80,7 @@ jobs:
-w /workspace \
node:20-alpine sh -ec '
apk add --no-cache python3 make g++ binutils linux-headers
npm install --global npm@11.9.0
npm ci
strip --strip-unneeded build/Release/native_watcher.node
npm test
Expand Down Expand Up @@ -112,6 +117,8 @@ jobs:
with:
node-version: 20
cache: npm
- name: Setup npm
run: npm install --global npm@11.9.0
- run: npm ci
- name: Strip native addon
if: runner.os == 'macOS'
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
"devDependencies": {
"node-gyp": "^12.0.0"
},
"license": "MIT"
"license": "MIT",
"packageManager": "npm@11.9.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enforce the npm version for local commands

For contributors following the prescribed npm run test workflow, npm does not enforce this top-level packageManager field, so a checkout using another npm release proceeds silently (for example, npm 11.4.2 starts the command despite this 11.9.0 declaration). This therefore standardizes CI only, not the development toolchain; use npm's devEngines.packageManager, which is checked before install, ci, and run, or provide an enforced Corepack workflow.

AGENTS.md reference: AGENTS.md:L5-L5

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acknowledged. packageManager is an advisory development version; every CI platform explicitly installs npm 11.9.0. This change consolidates on npm without requiring contributors to use one exact npm patch, so devEngines hard enforcement is intentionally out of scope and compatible local npm versions remain usable.

}
Loading