Skip to content

Conversation

@ChALkeR
Copy link
Collaborator

@ChALkeR ChALkeR commented Feb 9, 2026

No description provided.

@ChALkeR ChALkeR force-pushed the chalker/small/0 branch 3 times, most recently from 0262d1d to 66517e7 Compare February 9, 2026 19:41
@ChALkeR ChALkeR force-pushed the main branch 3 times, most recently from b365aec to 46605a1 Compare February 9, 2026 19:47
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_ENCODING into fallback/encoding.js and slim down fallback/encoding.api.js.
  • Rework encoding-browser.browser.js to rely more on native TextDecoder behavior and implement lightweight label normalization.
  • Add a dedicated tests/encoding/browser.test.js suite and update vendor mock to import encoding-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>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ChALkeR ChALkeR merged commit 9477323 into main Feb 10, 2026
39 checks passed
@ChALkeR ChALkeR deleted the chalker/small/0 branch February 10, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant