Skip to content

chore(toolchain): node 24.19.0 and exempt @kno2 from the release-age guard - #147

Closed
dapperdandev wants to merge 2 commits into
masterfrom
chore/npmrc-kno2-release-age-exclude
Closed

dapperdandev wants to merge 2 commits into
masterfrom
chore/npmrc-kno2-release-age-exclude

Conversation

@dapperdandev

@dapperdandev dapperdandev commented Sep 16, 2026

Copy link
Copy Markdown

Two changes that go together.

.npmrc: adds min-release-age-exclude[]=@kno2/*

.nvmrc: 24.18.0 -> 24.19.0

Why

min-release-age=1 is a supply-chain guard aimed at third-party packages, but it applies to our own scoped packages too. When a fresh @kno2 version is inside the window, npm does not error. It silently resolves an older version at exit 0, so a dependency bump looks successful while pinning a stale build.

Measured against @kno2/sdk@1.184.3 (published inside the window) on node 24.19.0 / npm 11.17.0:

.npmrc resolves to exit
min-release-age=1 1.184.2 (stale) 0
min-release-age=1 + min-release-age-exclude[]=@kno2/* 1.184.3 0

This also replaces the blunter workaround of passing --min-release-age=0, which disables the guard for every package in that install. The exclude exempts only matching names, and per npm's docs an exempted package's own dependencies still follow the policy.

Why the runtime bump is part of this change

min-release-age-exclude requires npm >= 11.17.0, which first ships with node 24.19.0. master pinned 24.18.0 (npm 11.16.0), where the config simply does not exist and is parsed and ignored.

The first revision of this PR changed .npmrc alone, on the mistaken belief that .nvmrc was already 24.19.0 (that value was read from the feature-cda-explorer branch, not master). Copilot caught it. Without the runtime bump the added line would have been dead config and the stale-resolution behaviour would have persisted, so the two belong in one change.

.github/workflows/pull-request.yml:20 uses node-version-file: '.nvmrc', so this intentionally moves the CI runtime too - that is the point, since CI is where a silently stale @kno2 resolution would land.

Node 24 is the active LTS line, so this stays on LTS. kno2fy-web already runs this configuration.

Verification

npm config ls -l in this repo on 24.19.0 now reports:

min-release-age = 1
min-release-age-exclude = ["@kno2/*"]

No dependency or lockfile changes. A fresh npm install under npm 11.17.0 is a no-op, so the runtime bump brings no lockfile churn. The diff is .npmrc + .nvmrc only.

🤖 Generated with Claude Code

min-release-age=1 is a supply-chain guard for third-party packages, but it
also applies to our own scoped packages. Without an exemption npm silently
resolves an older @Kno2 version when a fresh one is inside the window, at
exit 0, so a dependency bump looks successful while pinning a stale build.

Scope the exemption to @kno2/* so third-party packages keep the guard.
Matches what kno2fy-web already does. Needs npm 11.17.0, which this repo's
.nvmrc (24.19.0) already provides.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 16, 2026 22:10

Copilot AI 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.

🟡 Changes recommended

The repository pins Node 24.18.0, which does not support this npm configuration; update the pinned runtime and related configuration.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates npm configuration to exempt @kno2/* packages from the release-age guard.

Changes:

  • Adds min-release-age-exclude[]=@kno2/* to .npmrc.
File summaries
File Summary
.npmrc Adds the scoped package exclusion; runtime support must be updated to ensure it is effective.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

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

Comment thread .npmrc
@@ -1,2 +1,3 @@
save-exact=true
min-release-age=1
min-release-age-exclude[]=@kno2/*

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Correct, and thanks - this was a real defect in the PR.

I had read .nvmrc as 24.19.0 from the feature-cda-explorer branch that happened to be checked out, not from master, which is 24.18.0 (npm 11.16.0). On that npm min-release-age-exclude does not exist, so the line I added would have been parsed and silently ignored, leaving exactly the stale-resolution behaviour the change is meant to prevent.

Fixed in d79b997: .nvmrc 24.18.0 -> 24.19.0. The PR workflow uses node-version-file: '.nvmrc', so CI moves with it.

Verified on 24.19.0 / npm 11.17.0 in this repo:

min-release-age = 1
min-release-age-exclude = ["@kno2/*"]

A fresh npm install under npm 11.17.0 is still a no-op, so no lockfile churn comes with the runtime bump.

Addresses Copilot review comment 4031256698. The exclude added in the
previous commit needs npm 11.17.0, which first ships with node 24.19.0.
master pinned 24.18.0 (npm 11.16.0), where the config does not exist and
is silently ignored, so the stale-version behavior would have persisted.

CI reads node-version-file: .nvmrc, so this moves CI too. Lockfile
verified unchanged under npm 11.17.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings September 16, 2026 22:41

Copilot AI 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.

🟡 Changes recommended

Clarify or justify the .nvmrc change and its effect on CI.

Get a fresh assessment by requesting another Copilot review.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread .nvmrc
@@ -1 +1 @@
24.18.0
24.19.0

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Correct, the description had gone stale. Updated.

It described the first revision, where the change was .npmrc-only on the mistaken belief that .nvmrc was already 24.19.0 (I had read that value off the feature-cda-explorer branch rather than master). Your earlier comment is what prompted d79b997, and I did not re-sync the body afterwards.

The runtime change is intentional and is now stated as such: min-release-age-exclude needs npm >= 11.17.0, which first ships with node 24.19.0, so on the old 24.18.0 pin the added line would have been dead config. pull-request.yml:20 consuming .nvmrc means CI moves too, which is the point, since CI is where a silently stale @kno2 resolution would actually land.

Title and body now cover both files. A fresh npm install under npm 11.17.0 remains a no-op, so no lockfile churn rides along.

@dapperdandev dapperdandev changed the title chore(npm): exempt @kno2 packages from the release-age guard chore(toolchain): node 24.19.0 and exempt @kno2 from the release-age guard Sep 16, 2026
@dapperdandev

Copy link
Copy Markdown
Author

Folded into #146 rather than kept as a separate PR - two PRs against the same repo for changes this small was needless overhead, and the toolchain bump is what makes the dependency work correct in the first place.

Both commits (b8bffb3, d79b997) were cherry-picked onto internal-dependabot-updates-09-16-2026 as a54a7da and fcbbbda. Nothing is lost, and the Copilot findings raised here (the .nvmrc version, and the stale description) are addressed in #146's description.

Re-verified on the combined branch: lockfile is still a fixed point on node 24.19.0 / npm 11.17.0, lint and build pass.

@dapperdandev
dapperdandev deleted the chore/npmrc-kno2-release-age-exclude branch September 17, 2026 15:49
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