feat!: require Node 24 and migrate CJS to ESM output#3045
Open
bennypowers wants to merge 1 commit intonode24/test-migrationfrom
Open
feat!: require Node 24 and migrate CJS to ESM output#3045bennypowers wants to merge 1 commit intonode24/test-migrationfrom
bennypowers wants to merge 1 commit intonode24/test-migrationfrom
Conversation
🦋 Changeset detectedLatest commit: 18a0066 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
3 tasks
f2b5763 to
f8015fd
Compare
a38ded7 to
010ef78
Compare
BREAKING CHANGE: Node 24+ is now required. All packages emit ESM. - Add "type": "module" to all package.json files - Update exports to use single "default" condition (remove CJS/ESM dual exports) - Update engines to require Node >=24.0.0 - Delete all index.mjs shim files (34 files) - Fix CJS interop issues across source files: - require.resolve → import.meta.resolve / createRequire - __dirname → import.meta.dirname - Default import interop for CJS packages (rollup plugins, saucelabs, etc.) - Add .nvmrc (v24.11.1) - Add changeset for breaking node version requirement Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
f8015fd to
18a0066
Compare
010ef78 to
8bd2017
Compare
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
BREAKING CHANGE: Node 24+ is now required. All packages emit ESM output.
"type": "module"to all package.json files (~38 packages)"default"condition (remove CJS/ESM dual exports)node >=24.0.0index.mjsshim files (no longer needed with native ESM)require.resolve()→import.meta.resolve()/createRequire()__dirname→import.meta.dirname.nvmrc(v24.11.1)This is PR 3 of 4 in the Node 24 migration stack.
Stack
node24/typescript-upgrade— TypeScript upgrade +.tsimports (chore: upgrade TypeScript to 5.9.3 and enable .ts imports #3043)node24/test-migration— mocha/chai → node:test migration (chore: migrate tests from mocha/chai to node:test #3044)node24/parse5-and-jsdoc— parse5 v8 + JSDoc→TS conversionsTest plan
npm run buildpasses with zero TS errorsexport/importsyntax)🤖 Generated with Claude Code