You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: replace UTF-8 shims with native TextEncoder/TextDecoder
Util.stringToUtf8ByteArray and Util.utf8ByteArrayToString were
Google-Closure-derived (Apache 2.0, 2008) manual UTF-8 codecs — the file
even still carried the 'TODO(user): Use native implementations if/when
available' comment. Native TextEncoder and TextDecoder have been globals
in browsers and Node 14+ for years; they're behavior-equivalent for our
call sites and correct per WHATWG.
Replaced 20 call sites across 9 files: CommandControlMessage (SET_CLIPBOARD
+ PUSH_FILE encode/decode), FileListingClient, ListFilesModal, DeviceMessage
(clipboard + magic bytes), VideoSettings (codecOptions + encoderName),
multiplexer/Message (close reason), multiplexer/Multiplexer (text frame
data), server mw/FileListing (protocol command parsing),
server mw/WebsocketMultiplexer (channel code). Dropped the two functions
from Util.ts and removed now-unused 'import Util' from 5 files.
Net: -82 lines from Util.ts, +22/-29 across callers. 0 tsc errors,
89/89 tests pass, webpack clean.
0 commit comments