feat!: modernize to Node 24 native ESM, Vitest & semantic-release - #31
Merged
Merged
Conversation
Migrate the library to native ES modules on Node 24 and overhaul the tooling and CI/CD. - Drop Babel: publish `src` directly as native ESM (`"type": "module"`, explicit `.js` import extensions, `engines.node >= 24`, no build step) - Replace Jest with Vitest (ESM-native, tests kept as-is) - Replace ESLint 6 + airbnb with ESLint 9 flat config + plugin-security - Remove unused `lodash` dependency - Replace standard-version with semantic-release: master (release) and develop (prerelease) branches, changelog + npm + github + git plugins - CI: ubuntu-latest, checkout@v4/setup-node@v4 with npm cache, Node 24; PR checks workflow + push-triggered semantic-release with provenance BREAKING CHANGE: the package is now ESM-only and requires Node.js >= 24. CommonJS `require()` is no longer supported; consumers must use `import`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🎉 This PR is included in version 3.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Résumé
Modernisation complète de la lib : passage à l'ESM natif sur Node.js 24 (suppression de Babel), remplacement de l'outillage de test/lint/release et refonte de la CI/CD.
Changements
Node 24 / ESM natif
"type": "module",engines.node >= 24,main/exports→src/index.js.jsexplicites ajoutées sur tous les imports (requis par le résolveur ESM)@babel/*,babel-jest,regenerator-runtime) et de l'étape de build :srcest publié directement.nvmrc(24) ; suppression du dossierbuild/versionnéTest & Lint
vitest.config.jsavecglobals: true)eslint.config.js) +eslint-plugin-securitylodash(jamais utilisé) et nettoyage de directiveseslint-disableobsolètesRelease — semantic-release
.releaserc.json)master= release stable,develop= prereleaseversiondupackage.jsonpassée à0.0.0-development(gérée par le tooling)CI/CD
ubuntu-18.04 → ubuntu-latest,checkout@v4,setup-node@v4+ cache npm, Node 24,npm cimain.yaml→ PR checks (lint/tests sur les PR)release.yaml→ semantic-release sur pushmaster/develop, avec provenance npmLe package est désormais ESM-only et requiert Node.js >= 24.
require()(CommonJS) n'est plus supporté → bump majeur (v3.0.0).À prévoir côté repo
NPM_TOKENprésent dans les settings GitHubmaster/developValidation locale
npm run lint— 0 erreurnpm test— 20/20 testsnpm audit— 0 vulnérabiliténpx semantic-release --dry-run— plugins chargés, config valide🤖 Generated with Claude Code