Skip to content
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

fix(node): export punycode module #19151

Merged
merged 1 commit into from
May 17, 2023
Merged

Conversation

bartlomieju
Copy link
Member

Closes #19147

@bartlomieju bartlomieju requested a review from kt3k May 16, 2023 15:34
@bartlomieju bartlomieju enabled auto-merge (squash) May 16, 2023 15:34
@bartlomieju bartlomieju requested a review from dsherret May 16, 2023 16:07
NodeModulePolyfill {
name: "punycode",
specifier: "ext:deno_node/punycode.ts",
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version of the punycode module bundled in Node.js is being deprecated. In a future major version of Node.js this module will be removed. Users currently depending on the punycode module should switch to using the userland-provided Punycode.js module instead.

Should we bother adding this if it's going to be deprecated?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, currently existing packages might still depend on it and it doesn't say when it will be removed. @kt3k thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(and we already support it in CJS just not ESM)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with either way, but probably it's less confusing if we already provide it via cjs. I confirmed the below prints the punycode module without error:

import { createRequire } from "node:module";
console.log(createRequire(import.meta.url)("node:punycode"));

Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bartlomieju bartlomieju merged commit f59b1d8 into denoland:main May 17, 2023
@bartlomieju bartlomieju deleted the node_punycode branch May 17, 2023 11:04
levex pushed a commit that referenced this pull request May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ext/node: node:punycode is not exported
3 participants