Conversation
There was a problem hiding this comment.
Pull request overview
This PR completes the migration of htmlparser2 to an ESM-only package by simplifying build/output configuration, removing deprecated CJS/back-compat APIs, and updating dependency/tooling to modern Node/DOM packages.
Changes:
- Switch build from
tshyto plaintscand update TS/ESLint config for NodeNext +dist/output. - Make package exports ESM-only (retaining
./WritableStreamsubpath) and remove deprecated APIs (parseDOM,createDomStream,parseChunk,done). - Update dependencies (dom* packages + entities) and CI/workflows, including adding a publish workflow.
Reviewed changes
Copilot reviewed 12 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tsconfig.json |
Align TS build for NodeNext ESM and emit to dist/, with explicit include/exclude. |
tsconfig.eslint.json |
Separate TS config for ESLint type-aware linting without emitting. |
src/index.ts |
Removes deprecated exports and updates parseFeed to rely on parseDocument. |
src/index.spec.ts |
Updates tests to stop using removed deprecated APIs. |
src/__snapshots__/index.spec.ts.snap |
Updates snapshots to reflect dependency/type changes. |
src/Parser.ts |
Replaces entities/decode import with String.fromCodePoint; removes deprecated Parser aliases. |
src/Parser.spec.ts |
Updates tests to use write/end after removing deprecated methods. |
package.json |
Simplifies exports for ESM-only, switches build to tsc, updates deps/engines, adjusts published files list. |
package-lock.json |
Locks updated dependency graph after version bumps/removals. |
eslint.config.mjs |
Points ESLint at the new tsconfig.eslint.json. |
biome.json |
Updates Biome schema reference. |
WritableStream.js |
Removes CJS placeholder file. |
.gitignore |
Stops ignoring .tshy/ and adds jsr.json. |
.github/workflows/publish.yml |
Adds tag-triggered publish workflow for JSR + npm. |
.github/workflows/nodejs-test.yml |
Updates Node test matrix and removes coverage/Coveralls steps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
This was referenced Mar 18, 2026
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.
BREAKING CHANGE: This package is now ESM-only.