Closed
Conversation
40cacbb to
5246a73
Compare
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce the bundle size of the browser-targeted encoding entrypoint (@exodus/bytes/encoding-browser.js) by relying more on native browser TextDecoder behavior and by consolidating encoding-label utilities into fewer modules.
Changes:
- Consolidates
normalizeEncoding,labelToName, andE_ENCODINGintofallback/encoding.jsand strips them out offallback/encoding.api.js. - Reworks
encoding-browser.browser.jsto avoid importing the full labels dataset and instead normalize/validate via nativeTextDecoder. - Updates vendor mocks and adds a new browser-focused test suite for
encoding-browser.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| whatwg.js | Switches to importing encoding helpers from ./fallback/encoding.js (consolidated module). |
| tests/vendor/whatwg-encoding/whatwg-encoding-mock.js | Uses @exodus/bytes/encoding-browser.js instead of the full encoding.js entrypoint. |
| tests/encoding/browser.test.js | Adds browser-specific coverage for native TextDecoder/TextEncoder behavior and hooks. |
| fallback/encoding.js | Becomes the home for normalizeEncoding, labelToName, and E_ENCODING (previously in encoding.api.js). |
| fallback/encoding.api.js | Reduced to fromSource and getBOMEncoding only. |
| encoding-browser.browser.js | Implements lightweight browser normalization/hooks intended to reduce bundle size. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d01d362 to
db95c66
Compare
db95c66 to
58f9802
Compare
8dec88e to
ade8115
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.
No description provided.