-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
errors in punycode.js: assign codes or leave them alone? #27023
Comments
Pro: easy change to make, all exceptions are thrown from the Con: it's a third-party dependency that we vendor in, and deprecated to boot. Personally, I'd be okay with floating a small patch. It's unlikely to be a maintenance hassle. |
We still throw regular errors in node/lib/internal/modules/cjs/loader.js Lines 685 to 689 in bb98f27
internal/errors as well?
|
@BridgeAR I guess the answer from my side is “if it does not involve any circular dependency zalgo (which I don’t think there is) then why not”. Also this makes good first contributions so that’s a plus. |
Isn't the issue with |
@targos yes, I also checked 0.8 and it's even used in there. I also checked Gzemnid and userland seems to check for the code frequently. I guess we could open a couple PRs to change the check to check for two codes and as soon as most modules adopted to that strategy to change the error code but otherwise it's hard to do that. We could also stick to the current error code but still migrate it to our internal errors (just with the old error code that doesn't match the new ones). |
I would leave punycode.js untouched as it is deprecated and only used by node.js when node.js is built without ICU. |
There's been no further activity on this. Closing. If necessary we can revisit this |
From #11273 which is almost complete except this one.
All the errors thrown from there are
RangeError
s for invalid input.The text was updated successfully, but these errors were encountered: