Skip to content

build(deps): pin wasm runtime packages so dependabot lockfiles stay in sync#114

Merged
haasonsaas merged 1 commit into
mainfrom
fix/dependabot-emnapi-lock-sync
Jun 11, 2026
Merged

build(deps): pin wasm runtime packages so dependabot lockfiles stay in sync#114
haasonsaas merged 1 commit into
mainfrom
fix/dependabot-emnapi-lock-sync

Conversation

@haasonsaas

Copy link
Copy Markdown
Collaborator

Problem

CI has been red on every dependabot PR since 2026-06-04 (#110#113). Both Desktop build and ContextKit build die in ~15s at npm ci --ignore-scripts:

npm error `npm ci` can only install packages when your package.json and package-lock.json are in sync.
npm error Missing: @emnapi/core@1.11.0 from lock file
npm error Missing: @emnapi/runtime@1.11.0 from lock file

Root cause: @emnapi/*, @napi-rs/wasm-runtime, and @tybys/wasm-util only existed in the lockfile as transitive deps of the optional wasm32-wasi platform bindings (@rolldown/binding-wasm32-wasi, @tailwindcss/oxide-wasm32-wasi). Dependabot's lockfile regeneration drops dependencies of optional platform packages (known dependabot-core npm/wasi bug), so every grouped bump it rebased after the #105#107/#54 merges shipped a desynced lock. main itself is in sync — only dependabot-regenerated locks break.

Fix

  • Pin the five wasm runtime packages as direct devDependencies — direct deps always survive lockfile regeneration.
  • Add $-reference overrides so the bindings' exact pins (rolldown pins @emnapi/core exactly, and bumps it in lockstep with its own releases) collapse onto the single root version instead of demanding nested copies dependabot would drop again.

The wasi bindings are never installed on CI (linux-x64 / darwin-arm64 resolve native bindings), so the override only affects lock resolution, not anything that executes.

Related CI fix (no code change)

The Bazel RBE smoke job's only runner (bazel-rbe-dev-buildfarm-kestrel-bazel, labels evalops-kestrel-rbe) is offline, so jobs queued ~24h and died — this PR's path filter would have re-triggered it. I flipped the workflow's designed kill switch vars.BAZEL_RBE_ENABLEDfalse until the runner is restored; re-enable with gh api -X PATCH repos/evalops/kestrel/actions/variables/BAZEL_RBE_ENABLED -f name=BAZEL_RBE_ENABLED -f value=true.

Test plan

🤖 Generated with Claude Code

…n sync

@emnapi/core, @emnapi/runtime, @emnapi/wasi-threads, @napi-rs/wasm-runtime,
and @tybys/wasm-util only entered the lockfile as transitive deps of the
optional wasm32-wasi platform bindings (@rolldown/binding-wasm32-wasi,
@tailwindcss/oxide-wasm32-wasi). Dependabot's lockfile regeneration drops
those entries, so every grouped bump since #105 landed with a lock missing
@emnapi/* and `npm ci` failed EUSAGE on PRs #110-#113.

Pinning them as direct devDependencies guarantees lock entries survive any
regeneration; the $-reference overrides collapse the bindings' exact pins
onto the root versions so a single entry satisfies the whole tree. The wasi
bindings are never installed on CI runners (linux-x64/darwin-arm64 use
native bindings), so the forced versions only affect lock resolution.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cursor

cursor Bot commented Jun 11, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Dependency and lockfile-only changes for optional wasm bindings; CI platforms use native bindings, so runtime behavior should be unchanged.

Overview
Pins five wasm-related packages (@emnapi/*, @napi-rs/wasm-runtime, @tybys/wasm-util) as direct devDependencies and adds npm overrides with $-references so the whole tree resolves to those root versions.

This keeps package.json and package-lock.json aligned through Dependabot lockfile regen, which was dropping these as transitive optional wasm32-wasi deps and breaking CI on npm ci --ignore-scripts. The lockfile updates those entries (including @emnapi/core / @emnapi/runtime 1.10.0 → 1.11.0) and treats them as non-optional root dev deps.

Reviewed by Cursor Bugbot for commit 9384ba8. Bugbot is set up for automated code reviews on this repo. Configure here.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​emnapi/​runtime@​1.10.0 ⏵ 1.11.01001007594100
Updated@​emnapi/​core@​1.10.0 ⏵ 1.11.092 -210077 +194100

View full report

@haasonsaas haasonsaas merged commit 365b6f5 into main Jun 11, 2026
6 checks passed
@haasonsaas haasonsaas deleted the fix/dependabot-emnapi-lock-sync branch June 11, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant