Skip to content

feat(cli): send the Node.js version as written and print the release each check runs on [RED-1340] - #1622

Open
kiroushi wants to merge 4 commits into
mainfrom
kiroushi/red-1340-node-raw-request
Open

kiroushi wants to merge 4 commits into
mainfrom
kiroushi/red-1340-node-raw-request

Conversation

@kiroushi

Copy link
Copy Markdown
Member

Affected Components

  • CLI
  • Create CLI
  • Test
  • Docs
  • Examples
  • Other

The CLI sends a Playwright Check Suite's Node.js version as the project writes it, instead of reducing it to a major. Checkly resolves it to an exact release. checkly deploy and checkly deploy --preview print that release.

  • Node.js detection reads package.json devEngines.runtime first, then package.json engines.runtime, then .node-version, .nvmrc, .tool-versions, volta.node and engines.node in their earlier order. Each runtime field is an object or an array of objects. The first entry named node with a non-empty version counts, and onFail is ignored. An entry for another runtime is ignored.
  • Every Node.js value is sent trimmed and without a leading v. A version-manager alias (lts/*, lts, node, stable, latest) in .node-version, .nvmrc or .tool-versions is skipped, as before. A value that is not a string is skipped.
  • The Node.js remap rules, their notices and the Node.js default are gone. The CLI no longer validates a Node.js value. Checkly's 400 message reaches the user unchanged on checkly deploy, checkly deploy --preview, checkly test and checkly pw-test.
  • Engine.node() takes any Node.js version or semver range, such as '24', '24.11.0', '^24.11.0' or '>=22'.
  • At deploy and preview, the CLI prints one line per distinct request, source and release on stdout, for example Node.js ^24 (package.json devEngines.runtime) runs 24.22.2. The release comes from the diff entry's resolvedEngineVersion. A response without the field gives the line without its release part. --output json and the agent plan pass the field through and add no text.
  • A source label is relative to the config directory, for example ../../package.json devEngines.runtime for a config in packages/app. An explicit engine names the file that calls Engine.node().
  • A preview that Checkly refuses with a 400 now stops checkly deploy with Checkly's message. Before, the CLI warned, fell back to a dry run and printed the same message a second time.
  • Bun detection, rules, aliases and default are unchanged.

User-visible changes

  • A project whose .nvmrc says 20 ran 22.23.4 and now runs the newest available 20.x.
  • A range that admits Node.js 20, such as engines.node >=18, ran 22.23.4 and now runs the newest available 20.x.
  • A request for 23 or 25 ran 24 or 26 and now runs that major's newest available release.
  • A request for 18 or 27 printed a warning and now fails the deploy with Checkly's message.
  • A request for 22.11.0 ran 22.23.4 without a warning and now fails the deploy with Checkly's message.
  • Engine.node('abc') deployed 22 and now fails the deploy.
  • A version file value that is neither a version nor one of the five aliases, such as .node-version iron, was skipped and is now sent, and Checkly refuses it.

pnpm workspaces

pnpm checks the running Node.js only against the workspace root's devEngines.runtime and engines.runtime, when onFail is error or warn. The CLI reads the same root manifest. With onFail: "download", pnpm also installs each project's own runtime from that project's manifest. The CLI does not read a sub-package's field.

Notes for the Reviewer

This needs a Checkly API that accepts Node.js versions and ranges and returns resolvedEngineVersion in the deploy and preview diff. Both are live.

Tests

Unit tests cover each detection source and the order, both shapes of the runtime fields, another runtime's entry, pass-through values, the aliases in each version file, Bun, the printed sources, and the deploy and preview lines with the field, without it and with null.

…h check runs on

Node.js detection reads package.json devEngines.runtime and engines.runtime first, then
.node-version, .nvmrc, .tool-versions, volta.node and engines.node as before. Each field takes the
first entry named node, as an object or an array.

The CLI sends every Node.js value as written, trimmed and without a leading v. Checkly resolves it
to a release or refuses it, so the CLI's Node.js remap rules, its Node.js default and its notices
are gone. Engine.node() takes any version or semver range. Bun detection and its rules are
unchanged.

checkly deploy and checkly deploy --preview print one line per requested version, the file or field
it came from and the release Checkly reports in the new resolvedNodeVersion diff field. A check
whose engine comes from Engine.node() names the file that calls it.

A deploy preview that Checkly refuses with a 400 now fails the command with Checkly's message. The
fallback to the dry-run summary could not deploy the same payload and printed the message twice.
…the config directory

The requested Node.js version and its source live in an internal registry instead of a public
method on PlaywrightCheck. A second validation keeps the source it found the first time.

Version-manager aliases such as lts/* fall through in .node-version and .tool-versions, as they do
in .nvmrc. A runtime field takes its first node entry with a string version. An explicit version
given as a finite number is sent as its string form.

Every source is named relative to the directory of the Checkly config, for example
../../package.json devEngines.runtime for a config in a workspace package.

A refused preview reads "Could not check what this deploy would change." above Checkly's message.
The reference describes refused versions without patch numbers.
An explicit engine whose version is missing, NaN or empty after trimming is still sent, but it gets
no Node.js line. A runtime field skips node entries whose version is empty after trimming. The
reference gives a non-alias example of a refused value.
@kiroushi
kiroushi requested a review from sorccu November 27, 2026 09:43
@kiroushi
kiroushi marked this pull request as ready for review November 27, 2026 09:43

This branch has not been deployed

No deployments
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