You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enforce the pinned Node version for local and deploy builds of trusted-server-js #1266
#1204 / #1257 pin Node for CI only. No workflow builds the deployed artifacts: fastly compute publish, spin build and wrangler deploy all run the cargo build on the operator's machine, and crates/trusted-server-js/build.rs runs npm ci / npm run build with whatever npm is on PATH, with no version check. crates/trusted-server-js/lib/package.json has no engines field and there is no .nvmrc, so deployed bundles can be built with any Node version.
Local drift already happens: under Node 26, 27 Permutive/Sourcepoint Vitest tests fail because Node's built-in localStorage hides jsdom's, while the pinned 24.12.0 passes.
Options:
Add engines.node to lib/package.json together with engine-strict=true in lib/.npmrc.
Have build.rs compare node --version with the nodejs entry in .tool-versions and warn or fail on a mismatch (with an escape hatch for intentional overrides).
When option 2 lands (build.rs compares node --version with the nodejs entry in .tool-versions and fails the build on a mismatch), delete the CI Node pin guard added in #1257: scripts/check-ci-node-pin.py and its step in .github/workflows/format.yml. The build check covers everything the guard does, plus cases the guard's parser can't see (flow-style steps, scripts reached through $GITHUB_WORKSPACE/… or a working-directory, a later setup-node that changes the version). We shouldn't keep both by default.
Activity
dhruv8sh commentedon Oct 15, 2026
When option 2 lands (
build.rscomparesnode --versionwith thenodejsentry in.tool-versionsand fails the build on a mismatch), delete the CI Node pin guard added in #1257:scripts/check-ci-node-pin.pyand its step in.github/workflows/format.yml. The build check covers everything the guard does, plus cases the guard's parser can't see (flow-style steps, scripts reached through$GITHUB_WORKSPACE/…or aworking-directory, a latersetup-nodethat changes the version). We shouldn't keep both by default.