Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
punycode: runtime deprecation#35092
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
Conversation
Trott commented Sep 7, 2020
Might we want to leave it as a doc deprecation indefinitely? |
aduh95 commented Sep 8, 2020
Here are a few arguments why we might want to take it out of core eventually:
|
richardlau commented Sep 8, 2020
Caution here. CITGM can alert if there may be a problem (e.g. a module fails), but a passing* CITGM run does not mean there is no effect in the ecosystem, merely that there was no observable effect to the modules that are tested in CITGM. (* it's rare but has happened in the past) |
Trott commented Sep 8, 2020
@nodejs/tsc |
Trott commented Sep 15, 2020
TSC should probably decide to close this or move forward with it or else it will stall. Adding |
ChALkeR commented Sep 24, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
This does not appear to be correct:
Using an dataset from last year, top 3 punicode users are:
I don't this the ecosystem is ready for this yet. Perhaps we could open issues first. Or make this work with |
ChALkeR left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is likely too disruptive atm.
Perhaps this should be changed to support --pending-deprecation first, and then we could file issues/prs to top npm modules, pointing at that --pending-deprecation?
Trott commented Oct 1, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
779b158 to 0ae2274Compare0ae2274 to 877d5a9Compare| 'use strict'; | ||
| const{ getOptionValue }=require('internal/options'); | ||
| if(getOptionValue('--pending-deprecation')){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if(getOptionValue('--pending-deprecation')){ | |
| if(getOptionValue('--pending-deprecation')){ |
Linter doesn't process this file as it's in .eslintignore.
ChALkeR left a comment • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good in principle, but breaks when Node.js is configured with --without-intl flag:
$ ./node --pending-deprecation --trace-deprecation -e 'require("dns")'(node:858797) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. at punycode.js:5:10 at NativeModule.compileForInternalLoader (internal/bootstrap/loaders.js:276:7) at nativeModuleRequire (internal/bootstrap/loaders.js:305:14) at internal/idna.js:7:34 at NativeModule.compileForInternalLoader (internal/bootstrap/loaders.js:276:7) at nativeModuleRequire (internal/bootstrap/loaders.js:305:14) at url.js:30:21 at NativeModule.compileForInternalLoader (internal/bootstrap/loaders.js:276:7) at nativeModuleRequire (internal/bootstrap/loaders.js:305:14) at internal/modules/cjs/helpers.js:19:17To fix:
- Move the original
lib/punycode.jstolib/internal/punycode.js - Fix
require('punycode')torequire('internal/punycode')inlib/internal/idna.js. - Introduce a wrapper in
lib/punycode.jsthat does the pending deprecation logic and reexportsrequire('internal/punycode'), likelib/sys.jsdoes withrequire('util')(but with--pending-deprecation). - Fix
lib/punycode.jstolib/internal/punycode.jsin.eslintignore
Should be good after that if I didn't miss any steps.
jasnell commented Dec 16, 2020
Given the -1's (which I agree with), this is not something we're likely to do right now. Closing |
punycodeis doc deprecated since v7 and the npm package is downloaded 40M per week, I think it's time to move its deprecation forward.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes