-
Notifications
You must be signed in to change notification settings - Fork 1
feat: upgrade to Node 24 and modernize build toolchain #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dcoraboeuf
merged 12 commits into
nemerosa:main
from
rathpc:feat/upgrade-node-24-and-build-toolchain
May 5, 2026
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
19fcca4
docs: add CLAUDE.md for AI-assisted development
rathpc 7c78ca3
test: skip integration tests when secrets are absent
rathpc cb1e579
build: migrate eslint flat config to plain @eslint/js (drop FlatCompat)
rathpc 9b32561
build: bump deps to latest stable; add engines.node >=24
rathpc 1f62602
build: pin @eslint/js to ^10.0.1 (latest published; companion to esli…
rathpc 58ec59d
build: regenerate package-lock.json against new dep versions
rathpc 0fba2f8
refactor: adapt to @actions/github v9 and @actions/io v3 pure-ESM API
rathpc 4198a9a
build: drop unused @actions/io dependency
rathpc 0046400
build: standardize semantic-release config; patch-on-every-commit-type
rathpc 32a67c8
ci: upgrade to Node 24, actions/checkout@v6, add floating tag step
rathpc eaef455
fix: use namespace import for @actions/github (no default export)
rathpc 3723c7c
fix: pass --experimental-vm-modules to jest for dynamic ESM imports
rathpc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,31 @@ | ||
| { | ||
| "branches": [ | ||
| "main" | ||
| ], | ||
| "plugins": [ | ||
| ["@semantic-release/commit-analyzer", { | ||
| "preset": "angular", | ||
| "releaseRules": [ | ||
| {"type": "docs", "release": false}, | ||
| {"type": "fix", "release": "patch"}, | ||
| {"type": "feat", "release": "minor"}, | ||
| {"type": "refactor", "release": "major"}, | ||
| {"type": "release", "release": "patch"} | ||
| ], | ||
| }], | ||
| "@semantic-release/release-notes-generator", | ||
| "@semantic-release/changelog", | ||
| "@semantic-release/npm", | ||
| "@semantic-release/git", | ||
| "@semantic-release/github" | ||
| ] | ||
| "branches": ["main"], | ||
| "plugins": [ | ||
| ["@semantic-release/commit-analyzer", { | ||
| "preset": "angular", | ||
| "releaseRules": [ | ||
| { "breaking": true, "release": "major" }, | ||
| { "type": "feat", "release": "minor" }, | ||
| { "type": "refactor", "release": "major" }, | ||
| { "type": "fix", "release": "patch" }, | ||
| { "type": "perf", "release": "patch" }, | ||
| { "type": "chore", "release": "patch" }, | ||
| { "type": "docs", "release": "patch" }, | ||
| { "type": "style", "release": "patch" }, | ||
| { "type": "test", "release": "patch" }, | ||
| { "type": "build", "release": "patch" }, | ||
| { "type": "ci", "release": "patch" }, | ||
| { "type": "revert", "release": "patch" }, | ||
| { "type": "release", "release": "patch" } | ||
| ] | ||
| }], | ||
| "@semantic-release/release-notes-generator", | ||
| "@semantic-release/changelog", | ||
| "@semantic-release/npm", | ||
| ["@semantic-release/git", { | ||
| "assets": ["CHANGELOG.md", "package.json", "package-lock.json"], | ||
| "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
| }], | ||
| "@semantic-release/github" | ||
| ] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Commands | ||
|
|
||
| ```bash | ||
| npm run lint # ESLint (flat config, v10) | ||
| npm test # Jest — integration tests (skip when env secrets are absent) | ||
| ``` | ||
|
|
||
| There is no `build` step in this repo — it is a plain Node.js library, not a bundled GitHub Action. The published package contains `index.js` directly. | ||
|
|
||
| ## Architecture | ||
|
|
||
| This is a reusable Node.js module published as `@nemerosa/ontrack-github-actions-module-install` to GitHub Packages. It is consumed by other `ontrack-github-actions-*` repos to download and configure the [Yontrack CLI](https://github.com/nemerosa/ontrack-cli). | ||
|
|
||
| **Public API** (`index.js`): | ||
|
|
||
| ```js | ||
| const cli = require('@nemerosa/ontrack-github-actions-module-install'); | ||
| const { dir, cliExecutable, version } = await cli.install({ | ||
| version, // optional — defaults to latest GitHub release | ||
| githubToken, // required when version is omitted | ||
| acceptDraft, // include draft releases when picking latest | ||
| logging, // verbose console output | ||
| yontrackUrl, // when set, the CLI is configured for this Yontrack instance | ||
| yontrackToken, // required when yontrackUrl is set | ||
| yontrackLocalConfig, // CLI config name (default: "default") | ||
| connRetryCount, | ||
| connRetryWait, | ||
| }); | ||
| ``` | ||
|
|
||
| **Flow:** | ||
| 1. `downloadCLI` — resolves the version (latest GitHub release if none provided), maps `os.platform()`/`os.arch()` to the binary suffix, downloads from the `nemerosa/ontrack-cli` GitHub releases, and writes the binary to a tmp dir. | ||
| 2. `configureCLI` — when `yontrackUrl` is set, runs `yontrack config create ...` to set up the local CLI config. | ||
|
|
||
| **Tests** (`index.test.js`) are integration tests that hit the real network and (optionally) a real Yontrack instance. Tests requiring `GITHUB_TOKEN`, `YONTRACK_URL`, or `YONTRACK_TOKEN` are gated to skip when those env vars are unset, so PR CI without secrets passes cleanly. | ||
|
|
||
| ## Release process | ||
|
|
||
| Releases are automated via `semantic-release` (`.releaserc`). Commit messages follow Angular convention. With the configured `releaseRules`, every conventional-commit type triggers at least a patch; `feat` is minor; `refactor` and any commit with a `BREAKING CHANGE:` footer (or `type!:` shorthand) is major. | ||
|
|
||
| The CI workflow on `main`: | ||
| 1. Runs `npx semantic-release` — publishes to GH Packages, commits an updated `CHANGELOG.md` / `package.json` / `package-lock.json` via `@semantic-release/git`, and creates a `vX.Y.Z` GitHub release. | ||
| 2. Force-updates floating `vX` and `vX.Y` tags to point at the new release, so consumers can pin to a major/minor and ride patch updates. | ||
|
|
||
| ## NPM registry | ||
|
|
||
| This package is published to **GitHub Packages**, not npmjs.com. Consumers need an `.npmrc` configured with `@nemerosa:registry=https://npm.pkg.github.com` and a `NODE_AUTH_TOKEN` with `read:packages` scope. |
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rathpc , when launching the GH workflow on the PR, I get:
https://github.com/nemerosa/ontrack-github-actions-module-install/actions/runs/25269405182/job/74095812347
Can you have a look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rathpc , I just saw your comment above :) So yes, it seems we need
--experimental-vm-modules.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok not a problem I will add that later today, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dcoraboeuf updated, please try running the workflow again. Thank you!