fix: Pin packageManager so Corepack can resolve devEngines - #624
Merged
Conversation
Dependabot's npm updater rejects devEngines.packageManager.version ranges that use "||", failing with "Invalid package manager specification in package.json. The packageManager field must specify a valid semver version." This has silently broken all npm version updates on this repo since #595 introduced the field. engines already communicates the Node/npm requirement to contributors and CI without hard-failing external tooling, so devEngines is dropped rather than pinned to a single version that would need to track whatever runtime Dependabot's sandbox happens to use.
Corepack rejects a devEngines.packageManager.version range when no top-level packageManager is set, failing with "Invalid package manager specification in package.json (npm@^11.0.0 || ^10.9.4); expected a semver version" (nodejs/corepack#729, fix PR #730 still open). Dependabot runs npm through Corepack to respect the packageManager setting, so that parse failure aborted every npm update run with dependency_file_not_resolvable. No npm version update has landed since #595 added devEngines. Pinning packageManager to an exact version gives Corepack something it can parse, so devEngines is kept as the declared support range. The pin is npm 11.19.0, the newest release satisfying both devEngines and engines; Dependabot skips its release-age cooldown on npm below 11.10.
razor-x
marked this pull request as ready for review
August 19, 2026 22:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dependabot has opened no npm update PRs since 2026-07-28. Its update runs have been failing the whole time:
@seamapi/typesis named only because it is the dependency Dependabot was attempting to update — theallowrule in.github/dependabot.ymllimits updates to@seamapi/*, so it is the only name that can appear there. The error isdependency_file_not_resolvable: the manifest never parsed, so no resolution was attempted.Cause
Corepack rejects a range in
devEngines.packageManager.versionwhen no top-levelpackageManagerfield is present. Reproduced against this repo'spackage.jsonverbatim:Dependabot runs npm through Corepack in order to respect the
packageManagersetting, so that parse failure aborts the run before any dependency work happens. It matches on Corepack's message and re-raises it as the error above:This is an upstream Corepack bug — nodejs/corepack#729, "added
devEnginessupport breaks updating dependencies", reported by someone hitting it through Dependabot with the same error. The fix, #730, is still open, so there is no Corepack release to upgrade to and a local workaround is required.devEngineswas added in #595, which is also the last commit before Dependabot went quiet.Change
Adds a top-level
packageManagerfield. Corepack prefers it overdevEngines, so the range is never parsed as a version anddevEnginesis kept as the declared support range.The pin must satisfy
devEngines, or Corepack fails a different way:npm 11.19.0 is the newest release satisfying both
devEngines(^11.0.0 || ^10.9.4) andengines(>=10.9.4). Choosing from the 11.x line rather than 10.9.x also keeps Dependabot's release-age cooldown available, which it skips on npm below 11.10:Verification
Also verified: plain
npm install --package-lock-onlysucceeds, and removingdevEnginesentirely would work too — it was rejected becausedevEnginesis the thing worth keeping.Note this makes Corepack-enabled environments fetch npm 11.19.0. CI is unaffected, as it runs
npm cidirectly rather than through Corepack.Rollout
Other repos that received the same
devEnginesblock are broken identically and need the same fix.The real test is the daily 09:53 UTC Dependabot run after this lands on
main— Dependabot reads the default branch, so it cannot be exercised from this branch.@seamapi/typesis pinned at1.1001.0against1.1026.0published, so a bump should appear if resolution succeeds.