feat(cli): detect the Node version from Volta's package.json pin [RED-932] [ship] - #1473
Merged
Merged
Conversation
…-932] Read `volta.node` from package.json as an engine detection source for Playwright checks, after the dedicated version files and before `engines.node`. The lookup mirrors Volta's own: starting from the package holding the Checkly config, walk up to the workspace root and use the nearest package.json with a `volta` key, following `volta.extends` with a bounded depth. Volta does not manage Bun, so only Node applies. Values that are neither a version nor a semver range (for example "lts") are now skipped for both `volta.node` and `engines.*`, instead of relying on the previous catch-all around package.json parsing. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Linear: RED-932
Summary
Playwright check engine detection now reads Volta's
volta.nodepin frompackage.json. Projects that standardise on Volta usually have no.nvmrcor.node-version, so they fell through toengines.nodeor the default engine..node-version,.nvmrc,.tool-versions,package.jsonvolta.node,package.jsonengines.node. An explicit pin outranks a semver range, but a dedicated version file still wins over a manifest field. Bun order is unchanged (Volta does not manage Bun).Session.contextPath), walks up to the project root (Session.basePath), and uses the nearestpackage.jsonthat has avoltakey.volta.extendsis followed relative to the manifest that declares it, bounded to a depth of 10. The other sources stay root-only, as before.volta.nodevalues are exact versions or ranges; ranges resolve to their minimum version likeengines.node.lts) are now skipped forvolta.nodeandengines.*. Previously the catch-all aroundpackage.jsonparsing hid thatsemver.minVersionthrows on them.PlaywrightCheckProps.engineand the diagnostic hint list the new source.Tests
New
engine-detector.spec.tsunit suite (pin, precedence in both directions, ranges,extendschains and cycles, nested workspace member, nearest-manifest semantics, non-semver values). Verified end to end withcheckly debug parse-projecton a project whose only pin is"volta": { "node": "24.17.0" }: the check resolves to Node 24.Docs: companion PR checkly/docs#498.
🤖 Generated with Claude Code