feat!: migrate parse5 to v8 and convert JSDoc packages to TypeScript#3046
Draft
bennypowers wants to merge 14 commits intonode24/esm-and-node24from
Draft
feat!: migrate parse5 to v8 and convert JSDoc packages to TypeScript#3046bennypowers wants to merge 14 commits intonode24/esm-and-node24from
bennypowers wants to merge 14 commits intonode24/esm-and-node24from
Conversation
|
f2b5763 to
f8015fd
Compare
dbf9c91 to
dab33f2
Compare
f8015fd to
18a0066
Compare
dab33f2 to
f09bc1b
Compare
18a0066 to
a2a3658
Compare
f09bc1b to
d6208f0
Compare
a2a3658 to
eb87c8d
Compare
d6208f0 to
e5228eb
Compare
eb87c8d to
b1a23e2
Compare
e5228eb to
ff9fbd4
Compare
b1a23e2 to
b77e600
Compare
ff9fbd4 to
9d8ff0d
Compare
b77e600 to
10e9722
Compare
f19d625 to
0d3918c
Compare
10e9722 to
d3acddd
Compare
09a2b50 to
bf230a6
Compare
441c093 to
e99e801
Compare
bf230a6 to
ce7d2fe
Compare
e99e801 to
f9df49b
Compare
ce7d2fe to
094ace3
Compare
BREAKING CHANGE: parse5 v6 is no longer supported. parse5 v7+/v8 migration: - Update all parse5 type imports to use DefaultTreeAdapterTypes namespace - Update parse5 dependencies from ^6.0.1 to ^7.0.0 || ^8.0.0 - Remove @types/parse5 (types now bundled with parse5) - Update dom5 internal library for parse5 v8 compatibility JSDoc → TypeScript conversions: - config-loader: convert .js source files to .ts - parse5-utils: rewrite as TypeScript with parse5 v8 API - rollup-plugin-copy: convert .js source files to .ts - rollup-plugin-import-meta-assets: convert .js source files to .ts - storybook-utils: convert .js source files to .ts Additional changes: - Upgrade koa to v3.1.1 and ws to v8.18.3 in dev-server-core - Upgrade @types/koa to v3.0.1 and @types/ws to v8.5.13 - Fix WebSocketsManager for ws v8 API (WebSocketServer) - Update test-runner-mocha rollup config for ESM/nodenext Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add missing `import type` keywords across 20+ source files - Add CJS interop: isbinaryfile, ua-parser-js, pngjs, esbuildPlugin - Delete old .js test files replaced by .mjs equivalents - Add 84 rollup-plugin-html test fixtures - Fix CI workflow configs for Node 24 - Remove mocha and @types/parse5 from package devDependencies - Fix "type": "module" placement in package.json files - Update changeset config - Add mocks demo files Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Files were dropped when git rebase --skip was used to resolve conflicts between PR2's test migration and PR3/PR4's changes. Re-applied from fix/node24. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Restore JSDoc packages (config-loader, parse5-utils, rollup-plugin-copy, rollup-plugin-import-meta-assets, storybook-utils) to master .js sources (JSDoc→TS conversion belongs in PR4) - Restore parse5 v6 type imports (parse5 v8 migration belongs in PR4) - Restore ws v7 API in WebSocketsManager (ws v8 belongs in PR4) - Fix Token → Attribute import for parse5 v6 compat in rollup-plugin-html - Fix Object.values(bundle) unknown type with explicit cast - Add CJS interop for saucelabs and internal-ip (needed for nodenext) - Add CJS interop for rollup plugins in storybook-builder (needed for nodenext) - Restore master test scripts (test migration belongs in PR2) Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The .ts file was dropped during rebase. Restore from fix/node24 and remove the .js source (JSDoc→TS conversion is PR4's purpose). Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nfigs Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ts-node with module:nodenext treats .ts files as ESM, causing "Cannot require() ES Module" errors. Override both module and moduleResolution to commonjs/node for test execution. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
koa v3 + @types/koa v3 and ws v8 + @types/ws v8 are required for module:nodenext compatibility. @types/koa v2 and ws v7 types don't resolve correctly with nodenext module resolution. Add build script workaround to remove nested @types/koa and @types/ws installed by transitive dependencies (@rocket/cli) which conflict with the workspace package versions. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
094ace3 to
3d75891
Compare
f9df49b to
16c8d24
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: parse5 v6 is no longer supported. Requires parse5 v7+ or v8.
parse5 v8 migration
DefaultTreeAdapterTypesnamespace^6.0.1to^7.0.0 || ^8.0.0@types/parse5(types now bundled)JSDoc → TypeScript conversions
config-loader: convert .js → .tsparse5-utils: full TypeScript rewrite with parse5 v8 APIrollup-plugin-copy: convert .js → .tsrollup-plugin-import-meta-assets: convert .js → .tsstorybook-utils: convert .js → .tsDependency upgrades
koa: 2.x → 3.1.1 (dev-server-core)ws: 7.x → 8.18.3 (dev-server-core)@types/koa: 2.x → 3.0.1@types/ws: 7.x → 8.5.13test-runner-mocha
This is PR 4 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/esm-and-node24— CJS→ESM + Node 24 requirement (feat!: require Node 24 and migrate CJS to ESM output #3045)Test plan
npm run buildpasses with zero TS errors🤖 Generated with Claude Code