Skip to content

ci: install the Node binding with npm ci now that the lock names every platform package - #167

Merged
kingchenc merged 1 commit into
mainfrom
ci/npm-ci
Nov 2, 2026
Merged

kingchenc merged 1 commit into
mainfrom
ci/npm-ci

Conversation

@kingchenc

Copy link
Copy Markdown
Contributor

Every cd bindings/node && npm install in the workflows becomes npm ci (4 sites in .github/workflows/ci.yml, .github/workflows/release.yml), so CI and the release install exactly the lockfile and refuse one that disagrees with the manifest.

The comments justified npm install by the six per-platform optionalDependencies: they were not on the registry yet, so the lock could not name them and npm ci would reject it with EUSAGE ... Missing: <platform package>@ from lock file. That no longer holds. The releases published them, and bindings/node/package-lock.json now has an entry for all six, at the version package.json names.

A release bump moves those lock entries to the new version before this run publishes it. wickra-backtest shows that npm ci accepts that: it switched to npm ci in both workflows on 2026-08-28 and has released eleven times since (v0.1.1 to v0.2.1). At v0.2.1 its lock named the unpublished 0.2.1 platform packages, and npm ci installed cleanly in the Node build and the npm publish jobs.

The Node jobs of this pull request run npm ci against this lock on Node 22 and 24 on all three operating systems. That covers the stricter lock validation in Node 24's npm that an earlier attempt ran into while the entries were missing.

Closes the Scorecard PinnedDependencies alert #87 ("npmCommand not pinned by hash").

@codecov

codecov Bot commented Nov 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kingchenc
kingchenc merged commit 76ed303 into main Nov 2, 2026
65 checks passed
@kingchenc
kingchenc deleted the ci/npm-ci branch November 2, 2026 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant