Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tough-cookie

Package Overview
Dependencies
Maintainers
2
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tough-cookie - npm Package Compare versions

Comparing version 5.0.0-rc.4 to 5.0.0

dist/cookie/canonicalDomain.d.ts

5

dist/cookie/canonicalDomain.js

@@ -5,2 +5,3 @@ "use strict";

const constants_1 = require("./constants");
const node_url_1 = require("node:url");
/**

@@ -49,3 +50,3 @@ * Transforms a domain name into a canonical domain name. The canonical domain name is a domain name

}
return new URL(`http://${str}`).hostname.slice(1, -1); // remove [ and ]
return (0, node_url_1.domainToASCII)(str).slice(1, -1); // remove [ and ]
}

@@ -55,3 +56,3 @@ // convert to IDN if any non-ASCII characters

if (/[^\u0001-\u007f]/.test(str)) {
return new URL(`http://${str}`).hostname;
return (0, node_url_1.domainToASCII)(str);
}

@@ -58,0 +59,0 @@ // ASCII-only domain - not canonicalized with new URL() because it may be a malformed URL

4

dist/cookie/cookie.js

@@ -93,3 +93,3 @@ "use strict";

// '=' is immediately at start
cookiePair = cookiePair.substr(1);
cookiePair = cookiePair.substring(1);
firstEq = cookiePair.indexOf('='); // might still need to split on '='

@@ -271,3 +271,3 @@ }

}
catch (e) {
catch {
return undefined;

@@ -274,0 +274,0 @@ }

@@ -89,3 +89,3 @@ "use strict";

* domain string is a %x2E (".") character." */
if (_str.substr(idx - 1, 1) !== '.') {
if (_str.substring(idx - 1, idx) !== '.') {
return false; // doesn't align on "."

@@ -92,0 +92,0 @@ }

@@ -72,4 +72,7 @@ "use strict";

// The assertion isn't *strictly* correct, as `T` could be nullish, but, ehh, good enough...
if (err)
reject(err);
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
err ? reject(err) : resolve(result);
else
resolve(result);
}

@@ -76,0 +79,0 @@ catch (e) {

@@ -8,2 +8,2 @@ "use strict";

*/
exports.version = '5.0.0-rc.4';
exports.version = '5.0.0';

@@ -78,3 +78,3 @@ {

],
"version": "5.0.0-rc.4",
"version": "5.0.0",
"homepage": "https://github.com/salesforce/tough-cookie",

@@ -122,4 +122,4 @@ "repository": {

"@types/node": "^16.18.101",
"async": "3.2.5",
"eslint": "^8.57.0",
"async": "3.2.6",
"eslint": "^9.9.1",
"eslint-config-prettier": "^9.1.0",

@@ -134,3 +134,3 @@ "eslint-plugin-prettier": "^5.2.1",

"typescript": "5.5.3",
"typescript-eslint": "^7.16.1",
"typescript-eslint": "^8.0.1",
"vows": "^0.8.3"

@@ -137,0 +137,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc