-
Notifications
You must be signed in to change notification settings - Fork 159
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
Suggest using punycode.js
npm package
#122
Comments
This was referenced Dec 15, 2022
Publication of both |
Closed
mcmire
added a commit
to mcmire/DefinitelyTyped
that referenced
this issue
Apr 17, 2023
Since January 19th ([1]), the `punycode` package has also been published under `punycode.js`. This solves the problem of needing to use `punycode/` to use the package (as `punycode` is a built-in Node package). However, types are missing for `punycode.js`. So this commit adds them. Note that the interface for the package hasn't changed since v2.1, so I didn't bump the version, just copied the existing type definitions from `punycode`. [1]: mathiasbynens/punycode.js#122
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.npmjs.com/package/punycode.js appears to be a complete copy of https://www.npmjs.com/package/punycode, with the benefit that the name is not ambiguous with the deprecated node core module.
Can the README suggest using it? The workaround mentioned in the readme with
require('punycode/')
does not work with ESM (ERR_UNSUPPORTED_DIR_IMPORT), so there is no way currently to un-ambiguously importpunycode
in node ESM. I suggest tonpm deprecate
thepunycode
module in turn.The only difference seems to be that 2.1.1 was not published on the
punycode.js
name.The text was updated successfully, but these errors were encountered: