Uh oh!
There was an error while loading. Please reload this page.
lib: unify ICU and no-ICU TextDecoder - #61409
Conversation
nodejs-github-bot
commented
Jan 17, 2026
Review requested:
|
367908c to
5a2317fCompareUh oh!
There was an error while loading. Please reload this page.
4d6ff8f to
b2e1eceCompareadb2410 to
fb0ca32CompareCodecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #61409 +/- ##
==========================================
- Coverage 89.87% 89.78% -0.09%
==========================================
Files 671 672 +1 Lines 203178 203876 +698 Branches 39062 39186 +124 ==========================================
+ Hits 182599 183051 +452 - Misses 12926 13142 +216 - Partials 7653 7683 +30
🚀 New features to boost your workflow:
|
| let StringDecoder; | ||
| function lazyStringDecoder() { | ||
| if (StringDecoder === undefined) | ||
| ({ StringDecoder } = require('string_decoder')); | ||
| return StringDecoder; | ||
| } |
There was a problem hiding this comment.
There's a lazy utility in the internal utils.
There was a problem hiding this comment.
@avivkeller this is not new code, it's just moved to an outer scope
Ideally all that should go away with follow-up fixes, string_decoder path is invalid anyway
I don't think it's worth refactoring it further
There was a problem hiding this comment.
I still think we should use the new lazy module. Regardless of this being new code or not, git sees it as a new code.
There was a problem hiding this comment.
@anonrig Next two prs will remove this anyway. This is going in iterative steps, the intention of this PR is to make rewrite easier, not to be that rewrite. I don't think it should be blocked on rewriting a code block that wasn't introduced here and is gonna be removed.
fb0ca32 to
1204484Compare1204484 to
e74c6feCompareChALkeR
commented
Jan 21, 2026
Rebased, no actual changes |
nodejs-github-bot
commented
Jan 25, 2026
nodejs-github-bot
commented
Jan 25, 2026
richardlau
commented
Jan 25, 2026
The withoutintl test failure looks related. |
ChALkeR
commented
Jan 26, 2026
@richardlau indeed, I missed that, thanks! I'll update the test |
701604e to
54e7ba2Comparenodejs-github-bot
commented
Jan 26, 2026
nodejs-github-bot
commented
Jan 26, 2026
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Jan 27, 2026
Landed in e155415 |
PR-URL: #61409 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Richard Lau <richard.lau@ibm.com>
PR-URL: #61409 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Richard Lau <richard.lau@ibm.com>
PR-URL: #61409 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: Richard Lau <richard.lau@ibm.com>
Better reviewed with whitespace ignored
this[kHandle]was not set in no-ICU versionI don't think this is major, and reporting the actual encoding name is better in that case.
This will allow further fixes and common fast path for UTF-16 / fixed impl for UTF-16 as string_decoder doesn't implement UTF-16 per spec.
UTF-16 is still broken in no-ICU version here, this PR does not address that.
Tracking: #61041