postman-url-encoder
Advanced tools
Comparing version 3.0.4 to 3.0.5
@@ -47,6 +47,4 @@ /** | ||
const domainToASCII = require('url').domainToASCII, | ||
const encodeSet = require('./encode-set'), | ||
encodeSet = require('./encode-set'), | ||
_percentEncode = require('./percent-encode').encode, | ||
@@ -73,4 +71,27 @@ _percentEncodeCharCode = require('./percent-encode').encodeCharCode, | ||
PATH_SEPARATOR = '/', | ||
DOMAIN_SEPARATOR = '.'; | ||
DOMAIN_SEPARATOR = '.', | ||
/** | ||
* Returns the Punycode ASCII serialization of the domain. | ||
* | ||
* @private | ||
* @function | ||
* @param {String} domain domain name | ||
* @returns {String} punycode encoded domain name | ||
*/ | ||
domainToASCII = (function () { | ||
// @note `url.domainToASCII` returns empty string for invalid domain. | ||
const domainToASCII = require('url').domainToASCII; | ||
// use faster native `url` method in Node.js | ||
/* istanbul ignore next */ | ||
if (typeof domainToASCII === 'function') { | ||
return domainToASCII; | ||
} | ||
// else, lazy load `punycode` dependency in browser | ||
/* istanbul ignore next */ | ||
return require('punycode').toASCII; | ||
}()); | ||
/** | ||
@@ -77,0 +98,0 @@ * Returns the Punycode ASCII serialization of the domain. |
{ | ||
"name": "postman-url-encoder", | ||
"version": "3.0.4", | ||
"version": "3.0.5", | ||
"description": "Implementation of the WHATWG URL Standard", | ||
@@ -27,4 +27,5 @@ "author": "Postman Inc.", | ||
"release": "node npm/create-release.js", | ||
"test": "npm run test-lint && npm run test-unit", | ||
"test": "npm run test-lint && npm run test-unit && npm run test-browser", | ||
"test-benchmark": "node npm/test-benchmark.js", | ||
"test-browser": "node npm/test-browser.js", | ||
"test-lint": "node npm/test-lint.js", | ||
@@ -34,2 +35,5 @@ "test-system": "node npm/test-system.js", | ||
}, | ||
"dependencies": { | ||
"punycode": "^2.1.1" | ||
}, | ||
"devDependencies": { | ||
@@ -40,2 +44,3 @@ "@postman/csv-parse": "^4.0.2", | ||
"bipbip": "^0.4.2", | ||
"browserify": "^17.0.0", | ||
"chai": "^4.3.4", | ||
@@ -46,14 +51,20 @@ "chalk": "^4.1.2", | ||
"eslint": "^7.32.0", | ||
"eslint-plugin-jsdoc": "^36.0.6", | ||
"eslint-plugin-lodash": "^7.2.0", | ||
"eslint-plugin-jsdoc": "^36.0.7", | ||
"eslint-plugin-lodash": "^7.3.0", | ||
"eslint-plugin-mocha": "^9.0.0", | ||
"eslint-plugin-security": "^1.4.0", | ||
"jsdoc": "^3.6.7", | ||
"karma": "^6.3.4", | ||
"karma-browserify": "^8.1.0", | ||
"karma-chrome-launcher": "^3.1.0", | ||
"karma-mocha": "^2.0.1", | ||
"karma-mocha-reporter": "^2.2.5", | ||
"mocha": "^9.0.3", | ||
"nyc": "^15.1.0", | ||
"parse-gitignore": "^1.0.1", | ||
"postman-collection": "^4.0.1", | ||
"postman-collection": "^4.0.2", | ||
"postman-jsdoc-theme": "^0.0.3", | ||
"recursive-readdir": "^2.2.2", | ||
"shelljs": "^0.8.3" | ||
"shelljs": "^0.8.3", | ||
"watchify": "^4.0.0" | ||
}, | ||
@@ -60,0 +71,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
73423
1697
1
28
+ Addedpunycode@^2.1.1
+ Addedpunycode@2.3.1(transitive)