Skip to content

feat(cli): detect the Node version from Volta's package.json pin [RED-932] [ship] - #1473

Merged
sorccu merged 1 commit into
mainfrom
simo/red-932-volta-engine-detection
Sep 4, 2026
Merged

feat(cli): detect the Node version from Volta's package.json pin [RED-932] [ship]#1473
sorccu merged 1 commit into
mainfrom
simo/red-932-volta-engine-detection

Conversation

@sorccu

@sorccu sorccu commented Sep 4, 2026

Copy link
Copy Markdown
Member

Linear: RED-932

Summary

Playwright check engine detection now reads Volta's volta.node pin from package.json. Projects that standardise on Volta usually have no .nvmrc or .node-version, so they fell through to engines.node or the default engine.

  • New source order for Node: .node-version, .nvmrc, .tool-versions, package.json volta.node, package.json engines.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).
  • The Volta lookup mirrors Volta's own: it starts from the package that contains the Checkly config (Session.contextPath), walks up to the project root (Session.basePath), and uses the nearest package.json that has a volta key. volta.extends is followed relative to the manifest that declares it, bounded to a depth of 10. The other sources stay root-only, as before.
  • volta.node values are exact versions or ranges; ranges resolve to their minimum version like engines.node.
  • Values that are neither a version nor a semver range (for example lts) are now skipped for volta.node and engines.*. Previously the catch-all around package.json parsing hid that semver.minVersion throws on them.
  • JSDoc on PlaywrightCheckProps.engine and the diagnostic hint list the new source.

Tests

New engine-detector.spec.ts unit suite (pin, precedence in both directions, ranges, extends chains and cycles, nested workspace member, nearest-manifest semantics, non-semver values). Verified end to end with checkly debug parse-project on 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

…-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>
@sorccu sorccu changed the title feat(cli): detect the Node version from Volta's package.json pin [RED-932] feat(cli): detect the Node version from Volta's package.json pin [RED-932] [ship] Sep 4, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: ship/show PR from a same-repo branch.

@sorccu
sorccu merged commit ff40f0d into main Sep 4, 2026
18 checks passed
@sorccu
sorccu deleted the simo/red-932-volta-engine-detection branch September 4, 2026 11:25
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