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 4.1.3 to 5.0.0-rc.0

dist/memstore.js

48

package.json

@@ -70,3 +70,3 @@ {

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

@@ -80,11 +80,18 @@ "repository": {

},
"main": "./lib/cookie",
"main": "./dist/cookie/index.js",
"types": "./dist/cookie/index.d.ts",
"files": [
"lib"
"dist/*.js",
"dist/*.d.ts"
],
"scripts": {
"version": "genversion lib/version.js && git add lib/version.js",
"test": "vows test/*_test.js && npm run eslint",
"cover": "nyc --reporter=lcov --reporter=html vows test/*_test.js",
"eslint": "eslint --env node --ext .js .",
"build": "npm run clean && tsc",
"clean": "rm -rf dist",
"version": "genversion --es6 lib/version.ts && git add lib/version.ts",
"test": "npm run test:ts && npm run test:legacy",
"test:ts": "jest",
"test:legacy": "npm run build -- --declaration false && vows test/*_test.js",
"typecheck": "tsc --noEmit",
"cover": "jest --coverage",
"eslint": "eslint --env node --ext .ts .",
"prettier": "prettier '**/*.{json,ts,yaml,md}'",

@@ -94,12 +101,22 @@ "format": "npm run eslint -- --fix"

"engines": {
"node": ">=6"
"node": ">=16"
},
"devDependencies": {
"async": "^2.6.2",
"eslint": "^5.16.0",
"eslint-config-prettier": "^4.2.0",
"eslint-plugin-prettier": "^3.0.1",
"genversion": "^2.1.0",
"nyc": "^14.0.0",
"prettier": "^1.17.0",
"@types/jest": "^29",
"@types/node": "^16.18.23",
"@types/psl": "^1",
"@types/punycode": "^2",
"@types/url-parse": "^1.4.8",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@typescript-eslint/parser": "^5.57.0",
"async": "2.6.4",
"eslint": "^8.36.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"genversion": "^3.1.1",
"jest": "^29.5.0",
"prettier": "^2.8.7",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"typescript": "^4.9.5",
"vows": "^0.8.2"

@@ -110,5 +127,4 @@ },

"punycode": "^2.1.1",
"universalify": "^0.2.0",
"url-parse": "^1.5.3"
}
}

@@ -12,8 +12,8 @@ # tough-cookie

```javascript
var tough = require("tough-cookie");
var Cookie = tough.Cookie;
var cookie = Cookie.parse(header);
cookie.value = "somethingdifferent";
header = cookie.toString();
var cookiejar = new tough.CookieJar();
var tough = require('tough-cookie')
var Cookie = tough.Cookie
var cookie = Cookie.parse(header)
cookie.value = 'somethingdifferent'
header = cookie.toString()
var cookiejar = new tough.CookieJar()

@@ -23,5 +23,5 @@ // Asynchronous!

cookie,
"https://currentdomain.example.com/path"
);
var cookies = await cookiejar.getCookies("https://example.com/otherpath");
'https://currentdomain.example.com/path',
)
var cookies = await cookiejar.getCookies('https://example.com/otherpath')

@@ -31,10 +31,10 @@ // Or with callbacks!

cookie,
"https://currentdomain.example.com/path",
'https://currentdomain.example.com/path',
function (err, cookie) {
/* ... */
}
);
cookiejar.getCookies("http://example.com/otherpath", function (err, cookies) {
},
)
cookiejar.getCookies('http://example.com/otherpath', function (err, cookies) {
/* ... */
});
})
```

@@ -119,4 +119,4 @@

/* unsorted array of Cookie objects */
];
cookies = cookies.sort(cookieCompare);
]
cookies = cookies.sort(cookieCompare)
```

@@ -151,5 +151,5 @@

```javascript
if (Array.isArray(res.headers["set-cookie"]))
cookies = res.headers["set-cookie"].map(Cookie.parse);
else cookies = [Cookie.parse(res.headers["set-cookie"])];
if (Array.isArray(res.headers['set-cookie']))
cookies = res.headers['set-cookie'].map(Cookie.parse)
else cookies = [Cookie.parse(res.headers['set-cookie'])]
```

@@ -156,0 +156,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