Skip to content

feat: upgrade to Node 24 and modernize build toolchain#1

Merged
dcoraboeuf merged 11 commits into
nemerosa:mainfrom
rathpc:feat/upgrade-node-24-and-build-toolchain
May 6, 2026
Merged

feat: upgrade to Node 24 and modernize build toolchain#1
dcoraboeuf merged 11 commits into
nemerosa:mainfrom
rathpc:feat/upgrade-node-24-and-build-toolchain

Conversation

@rathpc
Copy link
Copy Markdown
Contributor

@rathpc rathpc commented May 6, 2026

Summary

Upgrade cli-install to Node 24, esbuild bundling (replacing @vercel/ncc), ESLint 10, real unit tests, standardized semantic-release with floating major/minor tags, and a new CLAUDE.md. Pins to @nemerosa/ontrack-github-actions-module-install@^2.0.0 (the new major from its just-merged Wave 1 upgrade).

What changed

  • Runtime: engines.node set to >=24; action.yml runtime is node24; CI workflow installs Node 24.
  • Bundling: replaced @vercel/ncc with esbuild + esbuild-plugin-license (driven by build.js). dist/index.js produced by esbuild; dist/licenses.txt carries third-party attributions. Stale ncc artifact (dist/sourcemap-register.js) removed.
  • Source shape: index.js refactored to a dependency-injection pattern. A top-level IIFE loads pure-ESM @actions/core via dynamic ESM import (namespace, not .default) and calls runAction({core, client}). @nemerosa/ontrack-github-actions-module-install stays as a top-level require() since its CJS exports are preserved.
  • Tests: new index.test.js with 7 unit tests covering input handling (url/token inputs + env-var fallbacks + precedence), parameter pass-through to client.install, and outputs/PATH side effects. Tests run in <200ms without secrets or network.
  • Module dep: @nemerosa/ontrack-github-actions-module-install bumped from ^1.2.1 to ^2.0.0.
  • @actions/core: 1.x → 3.x (now consumed via dynamic ESM import).
  • ESLint: eslint 8.x → 10.3.0 with new flat config. .eslintrc.json and .eslintignore removed.
  • Release process: new .releaserc matches the standardized template; floating-tag step force-updates vX and vX.Y after each release. Pre-release "commit dist" step removed — semantic-release's git plugin handles dist/ via assets.
  • Workflow: Node 20 → 24, actions/checkout@v4@v6. "Test: local configuration" gated on vars.YONTRACK_URL != '' so fork PRs without that var don't fail.
  • Docs: new CLAUDE.md.

Why this is breaking

engines.node >= 24 and runs.using: node24 mean self-hosted runners on older Node will fail. GitHub-hosted runners support Node 24 natively.

Test plan

  • CI passes on this PR (lint, build, tests; "Test: download" + "Test: getting the version" run on internal PRs and main pushes; "Test: local configuration" only when vars.YONTRACK_URL is set)
  • After merge, semantic-release publishes the next version with floating tags

Squash-merge commit message

When merging, please use this exact commit body:

feat: upgrade to Node 24 and modernize build toolchain

- Replace @vercel/ncc with esbuild + esbuild-plugin-license
- Convert index.js to runAction({core,client}) DI pattern
- Bump @actions/core to v3 with namespace dynamic-import
- Pin @nemerosa/ontrack-github-actions-module-install to ^2.0.0
- Migrate to ESLint 10 flat config
- Add 7 unit tests with mocked deps
- Standardize release rules (patch on every commit type)
- Add floating major/minor tag step in CI
- Add CLAUDE.md for AI-assisted development

BREAKING CHANGE: Now requires Node 24 runtime. Self-hosted runners
must have Node 24 available; GitHub-hosted runners support this
natively. Module-install dep bumped to ^2.0.0.

@rathpc
Copy link
Copy Markdown
Contributor Author

rathpc commented May 6, 2026

@dcoraboeuf here is another in the batch for your review

@dcoraboeuf dcoraboeuf merged commit 16e1c90 into nemerosa:main May 6, 2026
1 check passed
@dcoraboeuf
Copy link
Copy Markdown
Contributor

Available in v2.0.0

Thanks for your contribution @rathpc

@rathpc rathpc deleted the feat/upgrade-node-24-and-build-toolchain branch May 6, 2026 13: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.

2 participants