Bundled punycode module is deprecated
djbrown opened this issue · 3 comments
While reading the Postman JavaScript reference I discovered that Postman uses the deprecated punycode module.
https://nodejs.org/api/punycode.html:
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
punycodemodule should switch to using the userland-provided Punycode.js module instead. For punycode-based URL encoding, seeurl.domainToASCIIor, more generally, the WHATWG URL API.
It doesn't seem to be too much effort to fix, yet it has to be done across multiple affected repositories:
https://github.com/search?q=org%3Apostmanlabs+punycode&type=Code
Yes punycode library is available in Postman's script (pre-request and test) execution sandbox however it's not used while sending user's request.
I hear your concern but there are two primary reasons to not remove this from the sandbox:
- It's added 5-6 years ago and removing this will break a lot of existing collections
- It's compatible with browserify, it works on the Postman web
@codenirvana my suggestion was not to remove it, but to switch to the proper punycode module
@djbrown Got it but, domainToASCII method has native dependencies which will not work with Browserify.
The url library available in the sandbox (Browserify built-in) is https://github.com/defunctzombie/node-url.