Conversation
0262d1d to
66517e7
Compare
b365aec to
46605a1
Compare
66517e7 to
d83b644
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors the browser-focused encoding entrypoints to reduce bundle size, mainly by relocating/rewriting encoding label normalization utilities and adjusting tests to target encoding-browser.
Changes:
- Consolidate
normalizeEncoding/labelToName/E_ENCODINGintofallback/encoding.jsand slim downfallback/encoding.api.js. - Rework
encoding-browser.browser.jsto rely more on nativeTextDecoderbehavior and implement lightweight label normalization. - Add a dedicated
tests/encoding/browser.test.jssuite and update vendor mock to importencoding-browser.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| whatwg.js | Update imports to source normalizeEncoding/E_ENCODING from fallback/encoding.js. |
| tests/vendor/whatwg-encoding/whatwg-encoding-mock.js | Switch mock to use @exodus/bytes/encoding-browser.js. |
| tests/encoding/generic.test.js | Minor cleanup in string coercion test (removes redundant line). |
| tests/encoding/browser.test.js | New test coverage targeting encoding-browser behavior (BOM, legacyHookDecode, coercion). |
| fallback/encoding.js | Move/define normalizeEncoding, labelToName, and E_ENCODING here. |
| fallback/encoding.api.js | Remove label/normalization helpers (now only BufferSource helpers + BOM detection). |
| encoding-browser.browser.js | Implement lightweight normalizeEncoding/labelToName and simplify legacyHookDecode using native TextDecoder. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No description provided.