Skip to content

feat: show the Node.js version a site's project files declare - #111

Merged
Coysh merged 3 commits into
mainfrom
feat/declared-node-version
Oct 21, 2026
Merged

Coysh merged 3 commits into
mainfrom
feat/declared-node-version

Conversation

@Coysh

@Coysh Coysh commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Depends on coysh-digital/manager-protocol 1.10.0, which is now published; composer.lock resolves it.

What

A site's .nvmrc, .node-version or package.json (engines.node) says which Node.js it needs, and nothing in Manager showed it. The runtime ingest now accepts system.v4, which carries it, and advertises it first so a connector that implements it starts sending it. system.v1 to system.v3 are still accepted.

  • The overview ("What this site is running") and a new "Node.js (declared)" panel on Health show the version with the file it came from, e.g. 20.11.0 (.nvmrc).
  • It is labelled as declared, and both screens say it is what the project files ask for, not what is installed: the connector reads a file and runs nothing.
  • Three states are kept apart: a version; "Not declared" (the connector looked, nothing in the three files); "Not reported - connector update needed" (a connector older than system.v4). A site with no runtime report at all gets no row, so a connector that is simply not allowed to report is not told to update.
  • Read from runtime_reports.payload; no migration. Output is escaped (tested).
  • Docs and changelog updated: docs/security.md, docs/monitoring.md, docs/capabilities.md, docs/craft-plugin.md, and a 1.9.0 changelog heading with the version examples in getting-started, upgrade and rollback.

The dependency

  • composer.json requires coysh-digital/manager-protocol ^1.10, because advertising system.v4 against an older package would make the validator fail on the first v4 report. composer.lock now resolves 1.10.0, the published release; that is the only change to the lockfile.
  • The tests that validate a v4 payload through the package's validator skip with a stated reason if the installed package lacks schemas/system.v4.json. With 1.10.0 installed they all run.

Verification

In a clean clone with 1.10.0 from Packagist, on this branch brought up to date with main:

  • Full pest: 1550 passed, including the v4 payload tests.
  • pint: pass. phpstan: no errors.
  • npm run build rebuilds the committed stylesheet to itself, so public/build is unchanged.

The matching connector change is in 1.16.0 of the connector.

Coysh added 3 commits October 21, 2026 07:47
A site's .nvmrc, .node-version or package.json engines.node says which
Node.js it needs, and nothing in Manager showed it. The runtime ingest now
accepts system.v4, which carries it, and advertises it first so a connector
that implements it starts sending it.

The overview and Health screens show it as "Node.js (declared)" with the
file it came from, and say underneath that it is what the project asks for
rather than what is installed - the connector reads a file and runs nothing.
Three states are kept apart: a version, "Not declared" (the connector
looked and found nothing) and "Not reported - connector update needed" (a
connector older than system.v4). No row at all for a site that has sent no
runtime report. The value stays in the report's payload; no migration.

Needs manager-protocol 1.10, so composer.json now requires it and
composer.lock moves when that is tagged. Until then the tests that validate
a v4 payload are skipped with the reason rather than failing.
# Conflicts:
#	CHANGELOG.md
#	docs/rollback.md
system.v4 ships inside the package, and this branch requires ^1.10. The
lockfile moves from 1.9.0 to 1.10.0, which is the only change to it. The
v4 payload tests that skip while the schema is absent now run.
@Coysh
Coysh marked this pull request as ready for review October 21, 2026 12:07
@Coysh
Coysh merged commit be27da4 into main Oct 21, 2026
3 checks passed
@Coysh
Coysh deleted the feat/declared-node-version branch October 21, 2026 12:14
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