feat: upgrade to Node 24 and modernize build toolchain#12
Merged
dcoraboeuf merged 18 commits intoMay 5, 2026
Conversation
…tern; drop @actions/io
Also fix downloadAndSetup to use fs.promises.chmod (async) and swallow ENOENT on chmod/rename so the function is testable with a mock tc dep. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…/licenses.txt
The `output` option requires `{ file, template }` object form, not a bare
string. Passing a string caused the plugin to silently fall back to the
default filename (`dependencies.txt` in the project root) and the minimal
one-liner template, so `dist/licenses.txt` was never written.
Switch to the object form with a template that matches the ncc-era format
(package name, SPDX identifier, full license text). This also eliminates
the stray `dependencies.txt` that was being written to the project root.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ting tags, self-test)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
Author
|
@dcoraboeuf Here is number 3 in the series being opened. More to come... |
Contributor
|
Available in v3.0.0 Thanks for your contribution @rathpc ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrade
cli-setupto Node 24, esbuild bundling (replacing@vercel/ncc), ESLint 10, real unit tests, standardized semantic-release with floating major/minor tags, and aCLAUDE.md. Replaces the manualtag.shrelease flow with semantic-release.What changed
engines.nodeset to>=24;action.ymlruntime isnode24; CI workflow installs Node 24.@vercel/nccwithesbuild+esbuild-plugin-license(driven bybuild.js).dist/index.jsproduced by esbuild;dist/licenses.txtcarries third-party attributions.index.jsrefactored to a dependency-injection pattern. A top-level IIFE loads pure-ESM@actions/*packages via dynamic ESM import and callsrunAction({core, exec, github, tc}). Helpers (configureCLI,configureProject,configureAutoPromotion,downloadAndSetup) take deps as params for testability.index.test.jswith 27 unit tests covering input handling, ref parsing (branches/tags/PR refs), version resolution,only-forgating, CLI configuration, project setup, and the pure helpers (mapArch,mapOS,argsWithConfig). Tests run in <500ms without secrets or network.fs.promises.chmodandfs.promises.renameare mocked in the test setup sodownloadAndSetupcan be exercised without real filesystem operations — this is the right boundary, the production code does not swallow errors.@actions/ioentirely (its single use,io.mv, replaced with nativefs.promises.rename). Kept@actions/tool-cachefortc.downloadTool. Keptread-yaml-promise(still CJS-compatible).eslint8.x → 10.3.0 with new flat config..eslintrc.jsonand.eslintignoreremoved. Companion@eslint/jspinned to^10.0.1.tag.shand.github/tag.sh. Replaced with semantic-release configured to trigger at least a patch on every conventional-commit type, plus a floating-tag step that updatesvXandvX.Yafter each release.CLAUDE.md;README.md"Building" section updated for esbuild.build.ymlreplaced byci.ymlwith the standardized pipeline.Why this is breaking
engines.node >= 24andruns.using: node24mean self-hosted runners on older Node will fail. GitHub-hosted runners support Node 24 natively. The release flow itself also changes: existing@v2floating tags created by the manualtag.share left alone; the breaking release lands asv3.0.0with new@v3and@v3.0floating tags. Consumers stay on@v2until they explicitly opt into@v3.The action's input/output surface is unchanged.
Test plan
v3.0.0v3andv3.0exist; existingv2tags untouchedCHANGELOG.mdis populated by the release commitdist/licenses.txtis regenerated alongside the bundle (with full per-dependency license text)Squash-merge commit message
When merging, please use this exact commit body: