Skip to content

fix: keep @types/node on the runtime this ships for - #26

Merged
BunsDev merged 2 commits into
mainfrom
fix/pin-types-node-to-support-matrix
Aug 20, 2026
Merged

fix: keep @types/node on the runtime this ships for#26
BunsDev merged 2 commits into
mainfrom
fix/pin-types-node-to-support-matrix

Conversation

@BunsDev

@BunsDev BunsDev commented Aug 20, 2026

Copy link
Copy Markdown
Member

@types/node was bumped to 26.2.0 in #16 and went in green — and green was
the problem.

engines.node                        >=24.18.0 <25
release.config.json supportedNode   { minimum: "24.18.0", major: 24 }
@types/node                         26.2.0

Typings a major ahead of the runtime accept APIs that do not exist where this
ships, and typecheck cleanly while doing it, because nothing has used one
yet. The failure would arrive at runtime, on the version the release config
calls supported. CI could not have caught it.

Pinned back to 24.13.3 — the newest on the 24 line, and what was there
before the bump.

Three layers, because config alone is a request

Dependabot ignores major updates for @types/node. Its existing
development-dependencies group only batches minor and patch, which is exactly
why a major arrived as its own PR and was never covered by the grouping.

A test asserts the typings major equals supportedNode.major, and that
engines.node names the same major. A hand-edited bump sails past a Dependabot
rule; it does not sail past this.

The pin itself is asserted by shape (EXACT_VERSION), as the others are.

Verified in both directions

Case Result
@types/node 26 against supportedNode.major 24 caught
Moving typings, engines and supportedNode to 26 together passes

The guard blocks drift, not the upgrade. When the support matrix genuinely
moves to Node 26, this test moves with it in the same commit — which is the
point.

Checks

246 tests (up from 240), lint and typecheck clean. Lockfile regenerated and
agrees at 24.13.3.

🤖 Generated with Claude Code

The bump to 26.2.0 went in green, and green was the problem. engines.node
is >=24.18.0 <25 and release.config.json declares major 24, so typings a
major ahead accept APIs that do not exist where this ships -- and
typecheck cleanly while doing it, because nothing has used one yet. The
failure would arrive at runtime, on the version the release config calls
supported.

Pinned back to 24.13.3, which is the newest on the 24 line and what was
there before.

Three layers, because the config alone is a request rather than a
requirement:

Dependabot now ignores major updates for @types/node. Its existing group
only batches minor and patch, so majors arrived as individual pull
requests and were never covered.

A test asserts the typings major equals supportedNode.major, and that
engines.node names the same major. A hand-edited bump sails past a
Dependabot rule; it does not sail past this.

Verified in both directions rather than assumed: @types/node 26 against
major 24 is caught, and moving the matrix to 26 alongside it passes. The
guard blocks drift, not the upgrade.

246 tests, lint and typecheck clean.
Copilot AI lite review requested due to automatic review settings August 20, 2026 08:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR prevents @types/node from drifting ahead of the Node runtime the workspace targets (Node 24), by pinning typings back to the Node 24 line and adding guardrails so future bumps can’t silently desync from engines.node / release.config.json.

Changes:

  • Pin @types/node back to 24.13.3 and regenerate the lockfile accordingly.
  • Add a manifest test to ensure @types/node major matches release.config.json’s supportedNode.major (and that engines.node stays aligned).
  • Configure Dependabot to ignore major updates for @types/node to avoid accidental major drift.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/package-manifests.spec.ts Adds a test asserting @types/node major tracks the supported runtime major and checks engines.node alignment.
package.json Pins @types/node back to 24.13.3.
pnpm-lock.yaml Updates lockfile resolution to @types/node@24.13.3 (and associated transitive changes).
.github/dependabot.yml Ignores major updates for @types/node to avoid typings leading the runtime.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tests/package-manifests.spec.ts Outdated
From review, and the third time in this series that an assertion was
weaker than the comment beside it. The check said engines.node "names
that same major" while testing only the lower-bound substring, so
">=24.18.0 <26" passed -- a range spanning two majors, reading as though
it pinned one.

It now matches both bounds against supportedNode.major, so the range
must cover that major and no other. Verified against the case raised:
">=24.18.0 <26" is caught, along with an unbounded ">=24.18.0" and a
wrong lower major.

246 tests, lint and typecheck clean.
@BunsDev
BunsDev merged commit 0de8237 into main Aug 20, 2026
7 checks passed
@BunsDev
BunsDev deleted the fix/pin-types-node-to-support-matrix branch August 20, 2026 08:26
CompleteDotTech added a commit to CompleteDotTech/sdk that referenced this pull request Aug 21, 2026
`@types/node` was pinned back to the 24 line in OpenCoven#26 because typings a major
ahead of `engines.node` accept APIs that do not exist where this ships, and
typecheck cleanly while doing it -- the failure arrives at runtime, on the
version `release.config.json` calls supported. The commit message for that
change says outright that CI could not have caught it, which is why the pin is
asserted rather than merely requested of Dependabot.

The scaffolds introduce a second copy of that pin, in `TOOLING_DEPENDENCIES`,
and the existing guard reads only the root manifest. So the argument that
justified the guard now applies to a file the guard does not cover -- and
covers it worse, because a scaffold is compiled by users on their machines
rather than by this repository's CI. Nothing here would have noticed the two
drifting apart.

The scaffold spec's own `toBe('6.0.3')` was no help: it pinned a third literal
that has to be hand-edited on every bump, which is exactly what the comment
above `EXACT_VERSION` argues against -- a test with an opinion about the old
number and none about the invariant. It now checks the shape of the pin, and
the value is checked against the root manifest where the rest of that argument
already lives.
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.

2 participants