Skip to content

chore(node): adopt runtime-parity Node versioning, devcontainer, and docs - #510

Merged
virgofx merged 4 commits into
mainfrom
chore/node-overhaul
Aug 8, 2026
Merged

chore(node): adopt runtime-parity Node versioning, devcontainer, and docs#510
virgofx merged 4 commits into
mainfrom
chore/node-overhaul

Conversation

@virgofx

@virgofx virgofx commented Aug 8, 2026

Copy link
Copy Markdown
Member

Summary

Adopts a runtime-parity Node policy: every Node reference — .node-version, the devcontainer image, CI,
engines.node, and @types/node — now pins to the GitHub Actions runtime major (24), the only non-deprecated
JS action runtime (Node 20 was default-migrated on 2026-06-16; no node26 runtime exists or is announced). What we
develop and test on is exactly what consumers' runners execute. The whole set moves together, as a breaking major
release, only when GitHub ships a new runtime (likely node28, ~2028).

What Changed

  • @types/node ^26^24 — post-runtime APIs now fail npm run typecheck; the codebase already passes
    clean. Surgical lockfile diff (types + undici-types only).
  • Dependabot — new ignore for @types/node semver-majors; minors/patches keep flowing weekly.
  • Devcontainer — rebased on javascript-node:24-trixie (Node baked into the image; the node feature is
    removed and banned — it silently shadows the image's Node via nvm PATH order). Added an npm cache volume; postCreate
    now runs npm ci --no-fund --no-audit --prefer-offline for fast rebuilds.
  • New guard test (__tests__/devcontainer.test.ts) — 6 assertions enforcing strict version parity across
    runs.usingengines@types/node.node-version ↔ devcontainer image, and banning the node feature.
  • New canonical doc (docs/node.md) — how runners execute JS actions, the failure modes parity prevents, the
    five guards, August-2026 runtime facts (node20→24 timeline, release lines, GHES 3.16+/runner 2.327.1+), and the
    single upgrade path. The node-versioning skill is now a lean protocol layered on it.
  • Flaky-test fix — the real-CDN terraform-docs install suite gets timeout: 10s, retry: 2 (unit tests keep the
    fast 5s global default).
  • Drift fixes — CONTRIBUTING Node prerequisite, docs/development.md compile target (ECMAScript 2022 → 2024),
    README GHES runner requirement, ordered-list style per markdownlint config.

Validation

  • Biome, Prettier (CI mode), and textlint all pass; tsc --noEmit clean under Node 24 types
  • 788 tests passing including the new guard suite; guard mutation-verified (breaking .node-version fails
    exactly the parity assertions; restoring returns green)
  • javascript-node:24-trixie confirmed on MCR; @types/node@24.13.3 confirmed newest in the ^24 line
  • No src/ changes — dist/ untouched

Risks / Notes

  • Local dev moves Node 26 → 24 (deliberate; simplicity + dev/prod parity). First devcontainer reopen does a full
    image rebuild; subsequent rebuilds are faster via the npm cache volume.
  • Dependabot will no longer propose @types/node major bumps — by design; the major moves only with the runtime.
  • Release builds now bundle dist/ under the production runtime line — a parity win with no output change expected.

virgofx added 3 commits August 8, 2026 18:12
…docs

Pin every Node reference to the GitHub Actions runtime major (24) — the
only non-deprecated JS action runtime (Node 20 was default-migrated
2026-06-16; no node26 runtime exists or is announced). .node-version,
the devcontainer, CI, engines.node, and @types/node now share one major,
moving together only when GitHub ships a new runtime.

- Downgrade @types/node to ^24 so post-runtime APIs fail typecheck; the
  codebase already passes clean on Node 24 types
- Ignore @types/node semver-major in dependabot; minors/patches flow
- Rebase devcontainer on javascript-node:24-trixie (Node baked in, node
  feature removed) and add an npm cache volume + npm ci --prefer-offline
- Add __tests__/devcontainer.test.ts enforcing strict version parity
  across runs.using/engines/@types/node/.node-version/devcontainer image
  and banning the node feature (nvm PATH-shadowing hazard)
- Add docs/node.md as the canonical policy doc (runner execution model,
  guards, runtime timeline, GHES 3.16+ / runner 2.327.1+ requirements);
  rewrite the node-versioning skill as a protocol layered on it
- Fix drift: CONTRIBUTING Node prerequisite, development.md compile
  target ECMAScript 2022→2024, README GHES runner requirement
…alls

The real-system installation suite downloads the terraform-docs binary
from the live CDN; network latency intermittently blows the default 5s
timeout. Give the suite 10s per attempt and up to 2 retries, covering
both CDN-dependent tests. Unit tests keep the fast global default.
@virgofx
virgofx requested a lite review from Copilot August 8, 2026 18:19
@virgofx virgofx changed the title Chore/node overhaul chore(node): adopt runtime-parity Node versioning, devcontainer, and docs Aug 8, 2026
@virgofx virgofx self-assigned this Aug 8, 2026

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

Adopts a runtime-parity Node.js versioning policy for this GitHub Action so that local development, CI, type-checking, and the GitHub Actions runtime all target the same Node major (Node 24), reducing the risk of shipping code that breaks on runners.

Changes:

  • Pins Node references to 24 (engine floor, .node-version, devcontainer image, @types/node) and documents the policy.
  • Adds a guard test to enforce version alignment and bans the devcontainers Node feature that can shadow the image’s Node.
  • Reduces flakiness in the real terraform-docs install test suite via higher timeout + retries.

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Updates GHES minimums to reflect the node24 runtime requirement.
package.json Pins @types/node to the Node 24 major and keeps engines.node at >=24.
package-lock.json Updates lockfile for @types/node@^24 and related transitive changes (undici-types).
docs/node.md Adds canonical Node runtime-parity policy documentation and upgrade protocol references.
docs/development.md Aligns dev docs with the Node 24 devcontainer and parity policy.
CONTRIBUTING.md Updates contributor prerequisites to Node 24 by policy.
CLAUDE.md Updates repository agent guidance to the Node 24 parity policy and points to docs/node.md.
.node-version Pins local/CI Node to major 24.
.github/dependabot.yml Adds ignore rule intended to block @types/node major bumps (runtime-coupled).
.devcontainer/postCreateCommand.bash Updates post-create to npm ci with offline-friendly settings and fixes volume ownership.
.devcontainer/devcontainer.json Switches to javascript-node:24-trixie, adds npm cache volume, removes Node feature, sets remoteUser.
.devcontainer/devcontainer-lock.json Removes the devcontainers Node feature lock entry.
.claude/skills/node-versioning/SKILL.md Updates the node-versioning skill to defer to docs/node.md and reflect parity rules.
.claude/skills/node-versioning/references/runtime-boundary.md Removes redundant reference doc (superseded by docs/node.md).
.claude/skills/action-inputs/SKILL.md Adjusts checklist formatting (ordered-list marker style).
tests/terraform-docs.test.ts Makes real-CDN terraform-docs install tests less flaky (timeout + retry).
tests/devcontainer.test.ts Adds a guard suite validating Node version alignment + banning devcontainer Node feature.

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

Comment thread .github/dependabot.yml Outdated
Comment thread __tests__/devcontainer.test.ts Outdated
…t update-type

Address Copilot review: assert .node-version is a bare major (a pinned
24.0.0 would freeze patch floats yet still pass the parity check), and
quote the dependabot update-types entry. The unquoted form already
parsed as a plain scalar string (verified with js-yaml), so the ignore
was effective as written — quoting just matches GitHub's documented
style.
@virgofx
virgofx requested a lite review from Copilot August 8, 2026 18:25
@virgofx
virgofx marked this pull request as ready for review August 8, 2026 18:25
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

📋 Release Plan

Module Type Latest
Version
New
Version
Release
Details
tf-modules-kms patch v1.0.0 🆕 Initial Release
tf-modules-vpc-endpoint patch v1.0.0 🆕 Initial Release

📝 Changelog

tf-modules-kms-v1.0.0 (2026-08-08)

  • 🔀PR #510 - chore(node): adopt runtime-parity Node versioning, devcontainer, and docs

tf-modules-vpc-endpoint-v1.0.0 (2026-08-08)

  • 🔀PR #510 - chore(node): adopt runtime-parity Node versioning, devcontainer, and docs

Wiki Statusℹ️

✅ Enabled

Automated Tag/Release Cleanupℹ️

⏸️ Existing tags and releases will be preserved as the delete-legacy-tags flag is disabled.

Powered by:   techpivot/terraform-module-releaser

@sonarqubecloud

sonarqubecloud Bot commented Aug 8, 2026

Copy link
Copy Markdown

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

Copilot reviewed 16 out of 17 changed files in this pull request and generated no new comments.

Suppressed comments (2)

docs/development.md:24

  • This sentence implies any Node version satisfying engines.node is equally acceptable for development, which conflicts with the parity policy described in docs/node.md (develop/test on the same major as the Actions runtime). Consider clarifying that newer Node versions may work but are not the supported setup.
1. Install the Node.js version pinned in `.node-version`; anything satisfying `engines.node` also works (see
   [node.md](node.md) for the version policy)

tests/devcontainer.test.ts:48

  • runtimeMajor is computed from actionYml.runs.using at module load time. If action.yml is malformed or yaml.load() returns an unexpected shape, this can throw before Vitest runs any assertions, producing a less-informative failure. Extract runs.using defensively (defaulting to an empty string) and assert on that value instead.
const runtimeMajor = Number(/^node(\d+)$/.exec(actionYml.runs.using)?.[1]);

@virgofx
virgofx merged commit 1143356 into main Aug 8, 2026
31 checks passed
@virgofx
virgofx deleted the chore/node-overhaul branch August 8, 2026 18:30
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