Skip to content

Add eol warnings#1604

Closed
runesoerensen wants to merge 2 commits intomainfrom
add-eol-warnings
Closed

Add eol warnings#1604
runesoerensen wants to merge 2 commits intomainfrom
add-eol-warnings

Conversation

@runesoerensen
Copy link
Copy Markdown
Contributor

@runesoerensen runesoerensen commented Apr 7, 2026

Summary

Commit progression

This draft PR contains two commits mostly because it's intended as a PoC, but they could be split into separate PRs before merging.

bca6a31 - Use nodejs_data from the CNB in resolve-version

Adopts the shared nodejs-data crate from the ccasey/nodejs-data-crate branch. Replaces the local Requirement struct and NodeInventory/NodeArtifact type aliases with VersionRange, NodejsInventory, and NodejsArtifact from the shared crate. The wide-range/LTS-bound resolution logic stays local for now, bridging to node-semver types via VersionRange's Display output.

40dbd3d - Derive LTS version from release schedule and warn on EOL Node.js versions

Switches the nodejs-data dependency to the implement-eol-warnings-v2 branch to pick up NodeReleaseSchedule types. Adds inventory/schedule.json (from the upstream Node.js release schedule) and changes the resolve-version CLI to accept a schedule path instead of a hardcoded LTS major version. The binary now:

  • Derives the newest supported LTS from the schedule (removing the hardcoded lts_major_version="24" from the shell scripts)
  • Makes [node_version] optional — when omitted, defaults to the newest supported LTS
  • Returns an EOL warning in the JSON output when the resolved version has passed its end-of-life date

Also adds an output::warning function to lib/output.sh for styled warning output.

Follow-up

@runesoerensen runesoerensen added the skip changelog Changelog entry is not required - Skips changelog check label Apr 7, 2026
…ions

- Add `inventory/schedule.json` from the upstream Node.js release schedule
- Point `nodejs-data` dependency to `implement-eol-warnings-v2` branch to use `NodeReleaseSchedule` types
- Replace `<lts_major_version>` CLI argument with `<schedule_path>`, and make `[node_version]` optional (defaults to newest supported LTS)
- Add EOL warning to resolve-version JSON output when the resolved version has passed its end-of-life date
- Add `output::warning` function to `lib/output.sh` for styled warnings
- Simplify `install_nodejs` by removing hardcoded LTS version

Update default node version assertion
@colincasey
Copy link
Copy Markdown
Contributor

closing this in favor of the stacked changes for #1621

@colincasey colincasey closed this Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changelog Changelog entry is not required - Skips changelog check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants