tough-cookie
Advanced tools
Comparing version 4.1.3 to 5.0.0-rc.0
@@ -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 @@ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
3
71779
18
794
1
2
- Removeduniversalify@^0.2.0
- Removeduniversalify@0.2.0(transitive)