From 34b968ca54e85dfd2d97edc46bc5e8df33c9323c Mon Sep 17 00:00:00 2001 From: Will Harney Date: Sat, 18 Mar 2023 11:44:14 -0400 Subject: [PATCH 1/9] Update config to support ES6 classes. Targeting ES5 causes the "fixes issue #145" test in cookieJar.spec.ts to fail. Changing the target to the next newest (ES6) requires adding "moduleResolution" to the tsconfig, which then causes issues with using `import` in our TypeScript, but `require` in the legacy vows tests. To support both, we have to bump to a newer version of TypeScript to use the new "node16" module/moduleResolution. (Note: I didn't jump to the _latest_ TypeScript to try to support older projects, as well.) --- lib/validators.ts | 9 +-------- package.json | 6 +++--- tsconfig.json | 4 +++- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/lib/validators.ts b/lib/validators.ts index c0b1a276..c957d8f0 100644 --- a/lib/validators.ts +++ b/lib/validators.ts @@ -80,11 +80,4 @@ export function validate(bool: boolean, cb?: any, options?: any): void { } } -export class ParameterError extends Error { - constructor(...params: any[]) { - super(...params); - if (Object.setPrototypeOf) { - Object.setPrototypeOf(this, ParameterError.prototype); - } - } -} +export class ParameterError extends Error {} diff --git a/package.json b/package.json index f1f0f7f8..aca53e27 100644 --- a/package.json +++ b/package.json @@ -90,12 +90,12 @@ "format": "npm run eslint -- --fix" }, "engines": { - "node": ">=6" + "node": ">=16" }, "devDependencies": { "@types/jest": "^27.4.0", - "@types/punycode": "^2.1.0", "@types/psl": "^1.1.0", + "@types/punycode": "^2.1.0", "async": "^2.6.2", "eslint": "^5.16.0", "eslint-config-prettier": "^4.2.0", @@ -105,7 +105,7 @@ "nyc": "^14.0.0", "prettier": "^1.17.0", "ts-jest": "^27.1.3", - "typescript": "4.5.5", + "typescript": "4.7.4", "vows": "^0.8.2" }, "dependencies": { diff --git a/tsconfig.json b/tsconfig.json index a7e4a0ee..29abd830 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,9 @@ "experimentalDecorators": true, "outDir": "./dist", "allowJs": true, - "target": "es5", + "target": "ES2016", + "moduleResolution": "node16", + "module": "Node16", "resolveJsonModule": true, "esModuleInterop": true, "strict": true, From c207db663c77be369cb4c2eb293d52c175418416 Mon Sep 17 00:00:00 2001 From: Will Harney Date: Sun, 19 Mar 2023 14:09:40 -0400 Subject: [PATCH 2/9] Avoid unnecessarily running compiled test files. --- jest.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index 4c05aef8..911a1671 100644 --- a/jest.config.js +++ b/jest.config.js @@ -7,5 +7,6 @@ module.exports = { "ts-jest": { isolatedModules: false } - } + }, + testPathIgnorePatterns: ["/dist/"] }; From f28644eb5a2fb117cf637ba83e208c2787b8c8da Mon Sep 17 00:00:00 2001 From: Will Harney Date: Sun, 19 Mar 2023 14:11:12 -0400 Subject: [PATCH 3/9] Fix flaky test. --- test/node_util_fallback_test.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/node_util_fallback_test.js b/test/node_util_fallback_test.js index 64b1e892..9e6e924b 100644 --- a/test/node_util_fallback_test.js +++ b/test/node_util_fallback_test.js @@ -89,7 +89,12 @@ vows "util usage in Cookie": { "custom inspect for Cookie still works": function() { const cookie = Cookie.parse("a=1; Domain=example.com; Path=/"); - assert.equal(cookie.inspect(), util.inspect(cookie)); + // The custom inspect uses Date.now(), so the two invocations cannot be directly compared, + // as "cAge" will not necessarily be the same value (sometimes 0ms, sometimes 1ms). + // assert.equal(cookie.inspect(), util.inspect(cookie)); + const expected = /^Cookie="a=1; Domain=example\.com; Path=\/; hostOnly=\?; aAge=\?; cAge=\dms"$/ + assert.match(cookie.inspect(), expected) + assert.match(util.inspect(cookie), expected) } }, "util usage in MemoryCookie": { From a237cd8ff96ca8e81b2b4cb1f0d6a6db1347836b Mon Sep 17 00:00:00 2001 From: Will Harney Date: Sun, 19 Mar 2023 14:11:52 -0400 Subject: [PATCH 4/9] Avoid hacky reliance on inherited property of global object. --- lib/validators.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/validators.ts b/lib/validators.ts index c957d8f0..b7a65a22 100644 --- a/lib/validators.ts +++ b/lib/validators.ts @@ -27,6 +27,8 @@ SOFTWARE. ************************************************************************************ */ "use strict"; +const toString = Object.prototype.toString + /* Validation functions copied from check-types package - https://www.npmjs.com/package/check-types */ export function isFunction(data: any): boolean { return typeof data === 'function'; From 4ff158fc3f772f484a5c46b1a8da23f4e4e7c2dd Mon Sep 17 00:00:00 2001 From: Will Harney Date: Sun, 19 Mar 2023 14:26:01 -0400 Subject: [PATCH 5/9] Avoid needing to use `resolveJsonModule`. --- jest.config.js | 3 +- lib/__tests__/data/dates/bsd-examples.ts | 168 ++ lib/__tests__/data/dates/examples.ts | 48 + lib/__tests__/data/parser.ts | 1959 ++++++++++++++++++++++ lib/__tests__/ietf.spec.ts | 6 +- 5 files changed, 2180 insertions(+), 4 deletions(-) create mode 100644 lib/__tests__/data/dates/bsd-examples.ts create mode 100644 lib/__tests__/data/dates/examples.ts create mode 100644 lib/__tests__/data/parser.ts diff --git a/jest.config.js b/jest.config.js index 911a1671..e5371e68 100644 --- a/jest.config.js +++ b/jest.config.js @@ -8,5 +8,6 @@ module.exports = { isolatedModules: false } }, - testPathIgnorePatterns: ["/dist/"] + rootDir: './lib/', + testPathIgnorePatterns: ['./lib/__tests__/data/'] }; diff --git a/lib/__tests__/data/dates/bsd-examples.ts b/lib/__tests__/data/dates/bsd-examples.ts new file mode 100644 index 00000000..8ba721a9 --- /dev/null +++ b/lib/__tests__/data/dates/bsd-examples.ts @@ -0,0 +1,168 @@ +export default [ + { + "test": "Sat, 15-Apr-17 21:01:22 GMT", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "Thu, 19-Apr-2007 16:00:00 GMT", + "expected": "Thu, 19 Apr 2007 16:00:00 GMT" + }, { + "test": "Wed, 25 Apr 2007 21:02:13 GMT", + "expected": "Wed, 25 Apr 2007 21:02:13 GMT" + }, { + "test": "Thu, 19/Apr\\2007 16:00:00 GMT", + "expected": "Thu, 19 Apr 2007 16:00:00 GMT" + }, { + "test": "Fri, 1 Jan 2010 01:01:50 GMT", + "expected": "Fri, 01 Jan 2010 01:01:50 GMT" + }, { + "test": "Wednesday, 1-Jan-2003 00:00:00 GMT", + "expected": "Wed, 01 Jan 2003 00:00:00 GMT" + }, { + "test": ", 1-Jan-2003 00:00:00 GMT", + "expected": "Wed, 01 Jan 2003 00:00:00 GMT" + }, { + "test": " 1-Jan-2003 00:00:00 GMT", + "expected": "Wed, 01 Jan 2003 00:00:00 GMT" + }, { + "test": "1-Jan-2003 00:00:00 GMT", + "expected": "Wed, 01 Jan 2003 00:00:00 GMT" + }, { + "test": "Wed,18-Apr-07 22:50:12 GMT", + "expected": "Wed, 18 Apr 2007 22:50:12 GMT" + }, { + "test": "WillyWonka , 18-Apr-07 22:50:12 GMT", + "expected": "Wed, 18 Apr 2007 22:50:12 GMT" + }, { + "test": "WillyWonka , 18-Apr-07 22:50:12", + "expected": "Wed, 18 Apr 2007 22:50:12 GMT" + }, { + "test": "WillyWonka , 18-apr-07 22:50:12", + "expected": "Wed, 18 Apr 2007 22:50:12 GMT" + }, { + "test": "Mon, 18-Apr-1977 22:50:13 GMT", + "expected": "Mon, 18 Apr 1977 22:50:13 GMT" + }, { + "test": "Mon, 18-Apr-77 22:50:13 GMT", + "expected": "Mon, 18 Apr 1977 22:50:13 GMT" + }, { + "test": "\"Sat, 15-Apr-17\\\"21:01:22\\\"GMT\"", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "Partyday, 18- April-07 22:50:12", + "expected": "Wed, 18 Apr 2007 22:50:12 GMT" + }, { + "test": "Partyday, 18 - Apri-07 22:50:12", + "expected": "Wed, 18 Apr 2007 22:50:12 GMT" + }, { + "test": "Wednes, 1-Januar-2003 00:00:00 GMT", + "expected": "Wed, 01 Jan 2003 00:00:00 GMT" + }, { + "test": "Sat, 15-Apr-17 21:01:22", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "Sat, 15-Apr-17 21:01:22 GMT-2", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "Sat, 15-Apr-17 21:01:22 GMT BLAH", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "Sat, 15-Apr-17 21:01:22 GMT-0400", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "Sat, 15-Apr-17 21:01:22 GMT-0400 (EDT)", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "Sat, 15-Apr-17 21:01:22 DST", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "Sat, 15-Apr-17 21:01:22 -0400", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "Sat, 15-Apr-17 21:01:22 (hello there)", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "Sat, 15-Apr-17 21:01:22 11:22:33", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "Sat, 15-Apr-17 ::00 21:01:22", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "Sat, 15-Apr-17 boink:z 21:01:22", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "Sat, 15-Apr-17 91:22:33 21:01:22", + "expected": null + }, { + "test": "Thu Apr 18 22:50:12 2007 GMT", + "expected": "Wed, 18 Apr 2007 22:50:12 GMT" + }, { + "test": "22:50:12 Thu Apr 18 2007 GMT", + "expected": "Wed, 18 Apr 2007 22:50:12 GMT" + }, { + "test": "Thu 22:50:12 Apr 18 2007 GMT", + "expected": "Wed, 18 Apr 2007 22:50:12 GMT" + }, { + "test": "Thu Apr 22:50:12 18 2007 GMT", + "expected": "Wed, 18 Apr 2007 22:50:12 GMT" + }, { + "test": "Thu Apr 18 22:50:12 2007 GMT", + "expected": "Wed, 18 Apr 2007 22:50:12 GMT" + }, { + "test": "Thu Apr 18 2007 22:50:12 GMT", + "expected": "Wed, 18 Apr 2007 22:50:12 GMT" + }, { + "test": "Thu Apr 18 2007 GMT 22:50:12", + "expected": "Wed, 18 Apr 2007 22:50:12 GMT" + }, { + "test": "Sat, 15-Apr-17 21:01:22 GMT", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "15-Sat, Apr-17 21:01:22 GMT", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "15-Sat, Apr 21:01:22 GMT 17", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "15-Sat, Apr 21:01:22 GMT 2017", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "15 Apr 21:01:22 2017", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "15 17 Apr 21:01:22", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "Apr 15 17 21:01:22", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "Apr 15 21:01:22 17", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "2017 April 15 21:01:22", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "15 April 2017 21:01:22", + "expected": "Sat, 15 Apr 2017 21:01:22 GMT" + }, { + "test": "98 April 17 21:01:22", + "expected": null + }, { + "test": "Thu, 012-Aug-2008 20:49:07 GMT", + "expected": null + }, { + "test": "Thu, 12-Aug-31841 20:49:07 GMT", + "expected": null + }, { + "test": "Thu, 12-Aug-9999999999 20:49:07 GMT", + "expected": null + }, { + "test": "Thu, 999999999999-Aug-2007 20:49:07 GMT", + "expected": null + }, { + "test": "Thu, 12-Aug-2007 20:61:99999999999 GMT", + "expected": null + }, { + "test": "IAintNoDateFool", + "expected": null + } +] diff --git a/lib/__tests__/data/dates/examples.ts b/lib/__tests__/data/dates/examples.ts new file mode 100644 index 00000000..eba15640 --- /dev/null +++ b/lib/__tests__/data/dates/examples.ts @@ -0,0 +1,48 @@ +export default [ + { + "test": "Mon, 10-Dec-2007 17:02:24 GMT", + "expected": "Mon, 10 Dec 2007 17:02:24 GMT" + }, { + "test": "Wed, 09 Dec 2009 16:27:23 GMT", + "expected": "Wed, 09 Dec 2009 16:27:23 GMT" + }, { + "test": "Thursday, 01-Jan-1970 00:00:00 GMT", + "expected": "Thu, 01 Jan 1970 00:00:00 GMT" + }, { + "test": "Mon Dec 10 16:32:30 2007 GMT", + "expected": "Mon, 10 Dec 2007 16:32:30 GMT" + }, { + "test": "Wednesday, 01-Jan-10 00:00:00 GMT", + "expected": "Fri, 01 Jan 2010 00:00:00 GMT" + }, { + "test": "Mon, 10-Dec-07 20:35:03 GMT", + "expected": "Mon, 10 Dec 2007 20:35:03 GMT" + }, { + "test": "Wed, 1 Jan 2020 00:00:00 GMT", + "expected": "Wed, 01 Jan 2020 00:00:00 GMT" + }, { + "test": "Saturday, 8-Dec-2012 21:24:09 GMT", + "expected": "Sat, 08 Dec 2012 21:24:09 GMT" + }, { + "test": "Thu, 31 Dec 23:55:55 2037 GMT", + "expected": "Thu, 31 Dec 2037 23:55:55 GMT" + }, { + "test": "Sun, 9 Dec 2012 13:42:05 GMT", + "expected": "Sun, 09 Dec 2012 13:42:05 GMT" + }, { + "test": "Wed Dec 12 2007 08:44:07 GMT-0500 (EST)", + "expected": "Wed, 12 Dec 2007 08:44:07 GMT" + }, { + "test": "Mon, 01-Jan-2011 00: 00:00 GMT", + "expected": null + }, { + "test": "Sun, 1-Jan-1995 00:00:00 GMT", + "expected": "Sun, 01 Jan 1995 00:00:00 GMT" + }, { + "test": "Wednesday, 01-Jan-10 0:0:00 GMT", + "expected": "Fri, 01 Jan 2010 00:00:00 GMT" + }, { + "test": "Thu, 10 Dec 2009 13:57:2 GMT", + "expected": "Thu, 10 Dec 2009 13:57:02 GMT" + } +] diff --git a/lib/__tests__/data/parser.ts b/lib/__tests__/data/parser.ts new file mode 100644 index 00000000..4d67a075 --- /dev/null +++ b/lib/__tests__/data/parser.ts @@ -0,0 +1,1959 @@ +export default [ + { + "test": "0001", + "received": [ + "foo=bar" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "0002", + "received": [ + "foo=bar; Expires=Fri, 07 Aug 9999 08:04:19 GMT" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "0003", + "received": [ + "foo=bar; Expires=Fri, 07 Aug 2007 08:04:19 GMT", + "foo2=bar2; Expires=Fri, 07 Aug 9999 08:04:19 GMT" + ], + "sent": [ + { "name": "foo2", "value": "bar2" } + ] + }, + { + "test": "0004", + "received": [ + "foo" + ], + "sent": [] + }, + { + "test": "0005", + "received": [ + "foo=bar; max-age=10000;" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "0006", + "received": [ + "foo=bar; max-age=0;" + ], + "sent": [] + }, + { + "test": "0007", + "received": [ + "foo=bar; version=1;" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "0008", + "received": [ + "foo=bar; version=1000;" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "0009", + "received": [ + "foo=bar; customvalue=1000;" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "0010", + "received": [ + "foo=bar; secure;" + ], + "sent": [] + }, + { + "test": "0011", + "received": [ + "foo=bar; customvalue=\"1000 or more\";" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "0012", + "received": [ + "foo=bar; customvalue=\"no trailing semicolon\"" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "0013", + "received": [ + "foo=bar", + "foo=qux" + ], + "sent": [ + { "name": "foo", "value": "qux" } + ] + }, + { + "test": "0014", + "received": [ + "foo1=bar", + "foo2=qux" + ], + "sent": [ + { "name": "foo1", "value": "bar" }, + { "name": "foo2", "value": "qux" } + ] + }, + { + "test": "0015", + "received": [ + "a=b", + "z=y" + ], + "sent": [ + { "name": "a", "value": "b" }, + { "name": "z", "value": "y" } + ] + }, + { + "test": "0016", + "received": [ + "z=y", + "a=b" + ], + "sent": [ + { "name": "z", "value": "y" }, + { "name": "a", "value": "b" } + ] + }, + { + "test": "0017", + "received": [ + "z=y, a=b" + ], + "sent": [ + { "name": "z", "value": "y, a=b" } + ] + }, + { + "test": "0018", + "received": [ + "z=y; foo=bar, a=b" + ], + "sent": [ + { "name": "z", "value": "y" } + ] + }, + { + "test": "0019", + "received": [ + "foo=b;max-age=3600, c=d;path=/" + ], + "sent": [ + { "name": "foo", "value": "b" } + ] + }, + { + "test": "0020", + "received": [ + "a=b", + "=", + "c=d" + ], + "sent": [ + { "name": "a", "value": "b" }, + { "name": "c", "value": "d" } + ] + }, + { + "test": "0021", + "received": [ + "a=b", + "=x", + "c=d" + ], + "sent": [ + { "name": "a", "value": "b" }, + { "name": "c", "value": "d" } + ] + }, + { + "test": "0022", + "received": [ + "a=b", + "x=", + "c=d" + ], + "sent": [ + { "name": "a", "value": "b" }, + { "name": "x", "value": "" }, + { "name": "c", "value": "d" } + ] + }, + { + "test": "0023", + "received": [ + "foo", + "" + ], + "sent": [] + }, + { + "test": "0024", + "received": [ + "foo", + "=" + ], + "sent": [] + }, + { + "test": "0025", + "received": [ + "foo", + "; bar" + ], + "sent": [] + }, + { + "test": "0026", + "received": [ + "foo", + " " + ], + "sent": [] + }, + { + "test": "0027", + "received": [ + "foo", + "bar" + ], + "sent": [] + }, + { + "test": "0028", + "received": [ + "foo", + "\t" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0001", + "received": [ + "foo=bar; Secure" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0002", + "received": [ + "foo=bar; seCURe" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0003", + "received": [ + "foo=bar; \"Secure\"" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "ATTRIBUTE0004", + "received": [ + "foo=bar; Secure=" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0005", + "received": [ + "foo=bar; Secure=aaaa" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0006", + "received": [ + "foo=bar; Secure qux" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "ATTRIBUTE0007", + "received": [ + "foo=bar; Secure =aaaaa" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0008", + "received": [ + "foo=bar; Secure= aaaaa" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0009", + "received": [ + "foo=bar; Secure; qux" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0010", + "received": [ + "foo=bar; Secure;qux" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0011", + "received": [ + "foo=bar; Secure ; qux" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0012", + "received": [ + "foo=bar; Secure" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0013", + "received": [ + "foo=bar; Secure ;" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0014", + "received": [ + "foo=bar; Path" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "ATTRIBUTE0015", + "received": [ + "foo=bar; Path=" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "ATTRIBUTE0016", + "received": [ + "foo=bar; Path=/" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "ATTRIBUTE0017", + "received": [ + "foo=bar; Path=/qux" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0018", + "received": [ + "foo=bar; Path =/qux" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0019", + "received": [ + "foo=bar; Path= /qux" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0020", + "received": [ + "foo=bar; Path=/qux ; taz" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0021", + "received": [ + "foo=bar; Path=/qux; Path=/" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "ATTRIBUTE0022", + "received": [ + "foo=bar; Path=/; Path=/qux" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0023", + "received": [ + "foo=bar; Path=/qux; Path=/cookie-parser-result" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "ATTRIBUTE0024", + "received": [ + "foo=bar; Path=/cookie-parser-result; Path=/qux" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0025", + "received": [ + "foo=bar; qux; Secure" + ], + "sent": [] + }, + { + "test": "ATTRIBUTE0026", + "received": [ + "foo=bar; qux=\"aaa;bbb\"; Secure" + ], + "sent": [] + }, + { + "test": "CHARSET0001", + "received": [ + "foo=\u6625\u8282\u56de\u5bb6\u8def\u00b7\u6625\u8fd0\u5b8c\u5168\u624b\u518c" + ], + "sent": [ + { "name": "foo", "value": "\u6625\u8282\u56de\u5bb6\u8def\u00b7\u6625\u8fd0\u5b8c\u5168\u624b\u518c" } + ] + }, + { + "test": "CHARSET0002", + "received": [ + "\u6625\u8282\u56de=\u5bb6\u8def\u00b7\u6625\u8fd0\u5b8c\u5168\u624b\u518c" + ], + "sent": [ + { "name": "\u6625\u8282\u56de", "value": "\u5bb6\u8def\u00b7\u6625\u8fd0\u5b8c\u5168\u624b\u518c" } + ] + }, + { + "test": "CHARSET0003", + "received": [ + "\u6625\u8282\u56de=\u5bb6\u8def\u00b7\u6625\u8fd0; \u5b8c\u5168\u624b\u518c" + ], + "sent": [ + { "name": "\u6625\u8282\u56de", "value": "\u5bb6\u8def\u00b7\u6625\u8fd0" } + ] + }, + { + "test": "CHARSET0004", + "received": [ + "foo=\"\u6625\u8282\u56de\u5bb6\u8def\u00b7\u6625\u8fd0\u5b8c\u5168\u624b\u518c\"" + ], + "sent": [ + { "name": "foo", "value": "\"\u6625\u8282\u56de\u5bb6\u8def\u00b7\u6625\u8fd0\u5b8c\u5168\u624b\u518c\"" } + ] + }, + { + "test": "CHROMIUM0001", + "received": [ + "a=b" + ], + "sent": [ + { "name": "a", "value": "b" } + ] + }, + { + "test": "CHROMIUM0002", + "received": [ + "aBc=\"zzz \" ;" + ], + "sent": [ + { "name": "aBc", "value": "\"zzz \"" } + ] + }, + { + "test": "CHROMIUM0003", + "received": [ + "aBc=\"zzz \" ;" + ], + "sent": [ + { "name": "aBc", "value": "\"zzz \"" } + ] + }, + { + "test": "CHROMIUM0004", + "received": [ + "aBc=\"zz;pp\" ; ;" + ], + "sent": [ + { "name": "aBc", "value": "\"zz" } + ] + }, + { + "test": "CHROMIUM0005", + "received": [ + "aBc=\"zz ;" + ], + "sent": [ + { "name": "aBc", "value": "\"zz" } + ] + }, + { + "test": "CHROMIUM0006", + "received": [ + "aBc=\"zzz \" \"ppp\" ;" + ], + "sent": [ + { "name": "aBc", "value": "\"zzz \" \"ppp\"" } + ] + }, + { + "test": "CHROMIUM0007", + "received": [ + "aBc=\"zzz \" \"ppp\" ;" + ], + "sent": [ + { "name": "aBc", "value": "\"zzz \" \"ppp\"" } + ] + }, + { + "test": "CHROMIUM0008", + "received": [ + "aBc=A\"B ;" + ], + "sent": [ + { "name": "aBc", "value": "A\"B" } + ] + }, + { + "test": "CHROMIUM0009", + "received": [ + "BLAHHH; path=/;" + ], + "sent": [] + }, + { + "test": "CHROMIUM0010", + "received": [ + "\"BLA\\\"HHH\"; path=/;" + ], + "sent": [] + }, + { + "test": "CHROMIUM0011", + "received": [ + "a=\"B" + ], + "sent": [ + { "name": "a", "value": "\"B" } + ] + }, + { + "test": "CHROMIUM0012", + "received": [ + "=ABC" + ], + "sent": [] + }, + { + "test": "CHROMIUM0013", + "received": [ + "ABC=; path = /" + ], + "sent": [ + { "name": "ABC", "value": "" } + ] + }, + { + "test": "CHROMIUM0014", + "received": [ + " A = BC ;foo;;; bar" + ], + "sent": [ + { "name": "A", "value": "BC" } + ] + }, + { + "test": "CHROMIUM0015", + "received": [ + " A=== BC ;foo;;; bar" + ], + "sent": [ + { "name": "A", "value": "== BC" } + ] + }, + { + "test": "CHROMIUM0016", + "received": [ + "foo=\"zohNumRKgI0oxyhSsV3Z7D\" ; expires=Sun, 18-Apr-2027 21:06:29 GMT ; path=/ ; " + ], + "sent": [ + { "name": "foo", "value": "\"zohNumRKgI0oxyhSsV3Z7D\"" } + ] + }, + { + "test": "CHROMIUM0017", + "received": [ + "foo=zohNumRKgI0oxyhSsV3Z7D ; expires=Sun, 18-Apr-2027 21:06:29 GMT ; path=/ ; " + ], + "sent": [ + { "name": "foo", "value": "zohNumRKgI0oxyhSsV3Z7D" } + ] + }, + { + "test": "CHROMIUM0018", + "received": [ + " " + ], + "sent": [] + }, + { + "test": "CHROMIUM0019", + "received": [ + "a=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } + ] + }, + { + "test": "CHROMIUM0021", + "received": [ + "" + ], + "sent": [] + }, + { + "test": "COMMA0001", + "received": [ + "foo=bar, baz=qux" + ], + "sent": [ + { "name": "foo", "value": "bar, baz=qux" } + ] + }, + { + "test": "COMMA0002", + "received": [ + "foo=\"bar, baz=qux\"" + ], + "sent": [ + { "name": "foo", "value": "\"bar, baz=qux\"" } + ] + }, + { + "test": "COMMA0003", + "received": [ + "foo=bar; b,az=qux" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "COMMA0004", + "received": [ + "foo=bar; baz=q,ux" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "COMMA0005", + "received": [ + "foo=bar; Max-Age=50,399" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "COMMA0006", + "received": [ + "foo=bar; Expires=Fri, 07 Aug 9999 08:04:19 GMT" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "COMMA0007", + "received": [ + "foo=bar; Expires=Fri 07 Aug 9999 08:04:19 GMT, baz=qux" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DISABLED_CHROMIUM0020", + "received": [ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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\rZYX" + ], + "sent": [ + { "name": "AAA", "value": "BB" } + ] + }, + { + "test": "DISABLED_PATH0029", + "received": [ + "foo=bar; path=/cookie-parser-result/foo/bar" + ], + "sent-to": "/cookie-parser-result/f%6Fo/bar?disabled-path0029", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0001", + "received": [ + "foo=bar; domain=home.example.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0001", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0002", + "received": [ + "foo=bar; domain=home.example.org" + ], + "sent-to": "http://sibling.example.org:8888/cookie-parser-result?domain0002", + "sent": [] + }, + { + "test": "DOMAIN0003", + "received": [ + "foo=bar; domain=.home.example.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0003", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0004", + "received": [ + "foo=bar; domain=home.example.org" + ], + "sent-to": "http://subdomain.home.example.org:8888/cookie-parser-result?domain0004", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0005", + "received": [ + "foo=bar; domain=.home.example.org" + ], + "sent-to": "http://subdomain.home.example.org:8888/cookie-parser-result?domain0005", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0006", + "received": [ + "foo=bar; domain=.home.example.org" + ], + "sent-to": "http://sibling.example.org:8888/cookie-parser-result?domain0006", + "sent": [] + }, + { + "test": "DOMAIN0007", + "received": [ + "foo=bar; domain=sibling.example.org" + ], + "sent-to": "http://sibling.example.org:8888/cookie-parser-result?domain0007", + "sent": [] + }, + { + "test": "DOMAIN0008", + "received": [ + "foo=bar; domain=.example.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0008", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0009", + "received": [ + "foo=bar; domain=example.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0009", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0010", + "received": [ + "foo=bar; domain=..home.example.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0010", + "sent": [] + }, + { + "test": "DOMAIN0011", + "received": [ + "foo=bar; domain=home..example.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0011", + "sent": [] + }, + { + "test": "DOMAIN0012", + "received": [ + "foo=bar; domain= .home.example.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0012", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0013", + "received": [ + "foo=bar; domain= . home.example.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0013", + "sent": [] + }, + { + "test": "DOMAIN0014", + "received": [ + "foo=bar; domain=home.example.org." + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0014", + "sent": [] + }, + { + "test": "DOMAIN0015", + "received": [ + "foo=bar; domain=home.example.org.." + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0015", + "sent": [] + }, + { + "test": "DOMAIN0016", + "received": [ + "foo=bar; domain=home.example.org ." + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0016", + "sent": [] + }, + { + "test": "DOMAIN0017", + "received": [ + "foo=bar; domain=.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0017", + "sent": [] + }, + { + "test": "DOMAIN0018", + "received": [ + "foo=bar; domain=.org." + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0018", + "sent": [] + }, + { + "test": "DOMAIN0019", + "received": [ + "foo=bar; domain=home.example.org", + "foo2=bar2; domain=.home.example.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0019", + "sent": [ + { "name": "foo", "value": "bar" }, + { "name": "foo2", "value": "bar2" } + ] + }, + { + "test": "DOMAIN0020", + "received": [ + "foo2=bar2; domain=.home.example.org", + "foo=bar; domain=home.example.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0020", + "sent": [ + { "name": "foo2", "value": "bar2" }, + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0021", + "received": [ + "foo=bar; domain=\"home.example.org\"" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0021", + "sent": [] + }, + { + "test": "DOMAIN0022", + "received": [ + "foo=bar; domain=home.example.org", + "foo2=bar2; domain=.example.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0022", + "sent": [ + { "name": "foo", "value": "bar" }, + { "name": "foo2", "value": "bar2" } + ] + }, + { + "test": "DOMAIN0023", + "received": [ + "foo2=bar2; domain=.example.org", + "foo=bar; domain=home.example.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0023", + "sent": [ + { "name": "foo2", "value": "bar2" }, + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0024", + "received": [ + "foo=bar; domain=.example.org; domain=home.example.org" + ], + "sent-to": "http://sibling.example.org:8888/cookie-parser-result?domain0024", + "sent": [] + }, + { + "test": "DOMAIN0025", + "received": [ + "foo=bar; domain=home.example.org; domain=.example.org" + ], + "sent-to": "http://sibling.example.org:8888/cookie-parser-result?domain0025", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0026", + "received": [ + "foo=bar; domain=home.eXaMpLe.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0026", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0027", + "received": [ + "foo=bar; domain=home.example.org:8888" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0027", + "sent": [] + }, + { + "test": "DOMAIN0028", + "received": [ + "foo=bar; domain=subdomain.home.example.org" + ], + "sent-to": "http://subdomain.home.example.org:8888/cookie-parser-result?domain0028", + "sent": [] + }, + { + "test": "DOMAIN0029", + "received": [ + "foo=bar" + ], + "sent-to": "http://subdomain.home.example.org:8888/cookie-parser-result?domain0029", + "sent": [] + }, + { + "test": "DOMAIN0031", + "received": [ + "foo=bar; domain=home.example.org; domain=.example.org" + ], + "sent-to": "http://sibling.example.org:8888/cookie-parser-result?domain0031", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0033", + "received": [ + "foo=bar; domain=home.example.org" + ], + "sent-to": "http://hoMe.eXaMplE.org:8888/cookie-parser-result?domain0033", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0034", + "received": [ + "foo=bar; domain=home.example.org; domain=home.example.com" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0034", + "sent": [] + }, + { + "test": "DOMAIN0035", + "received": [ + "foo=bar; domain=home.example.com; domain=home.example.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0035", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0036", + "received": [ + "foo=bar; domain=home.example.org; domain=home.example.com; domain=home.example.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0036", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0037", + "received": [ + "foo=bar; domain=home.example.com; domain=home.example.org; domain=home.example.com" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0037", + "sent": [] + }, + { + "test": "DOMAIN0038", + "received": [ + "foo=bar; domain=home.example.org; domain=home.example.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0038", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0039", + "received": [ + "foo=bar; domain=home.example.org; domain=example.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0039", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0040", + "received": [ + "foo=bar; domain=example.org; domain=home.example.org" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?domain0040", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "DOMAIN0041", + "received": [ + "foo=bar; domain=.sibling.example.org" + ], + "sent-to": "http://sibling.example.org:8888/cookie-parser-result?domain0041", + "sent": [] + }, + { + "test": "DOMAIN0042", + "received": [ + "foo=bar; domain=.sibling.home.example.org" + ], + "sent-to": "http://sibling.home.example.org:8888/cookie-parser-result?domain0042", + "sent": [] + }, + { + "test": "MOZILLA0001", + "received": [ + "foo=bar; max-age=-1" + ], + "sent": [] + }, + { + "test": "MOZILLA0002", + "received": [ + "foo=bar; max-age=0" + ], + "sent": [] + }, + { + "test": "MOZILLA0003", + "received": [ + "foo=bar; expires=Thu, 10 Apr 1980 16:33:12 GMT" + ], + "sent": [] + }, + { + "test": "MOZILLA0004", + "received": [ + "foo=bar; max-age=60" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "MOZILLA0005", + "received": [ + "foo=bar; max-age=-20" + ], + "sent": [] + }, + { + "test": "MOZILLA0006", + "received": [ + "foo=bar; max-age=60" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "MOZILLA0007", + "received": [ + "foo=bar; expires=Thu, 10 Apr 1980 16:33:12 GMT" + ], + "sent": [] + }, + { + "test": "MOZILLA0008", + "received": [ + "foo=bar; max-age=60", + "foo1=bar; max-age=60" + ], + "sent": [ + { "name": "foo", "value": "bar" }, + { "name": "foo1", "value": "bar" } + ] + }, + { + "test": "MOZILLA0009", + "received": [ + "foo=bar; max-age=60", + "foo1=bar; max-age=60", + "foo=differentvalue; max-age=0" + ], + "sent": [ + { "name": "foo1", "value": "bar" } + ] + }, + { + "test": "MOZILLA0010", + "received": [ + "foo=bar; max-age=60", + "foo1=bar; max-age=60", + "foo=differentvalue; max-age=0", + "foo2=evendifferentvalue; max-age=0" + ], + "sent": [ + { "name": "foo1", "value": "bar" } + ] + }, + { + "test": "MOZILLA0011", + "received": [ + "test=parser; domain=.parser.test; ;; ;=; ,,, ===,abc,=; abracadabra! max-age=20;=;;" + ], + "sent": [] + }, + { + "test": "MOZILLA0012", + "received": [ + "test=\"fubar! = foo;bar\\\";\" parser; max-age=6", + "five; max-age=2.63," + ], + "sent": [ + { "name": "test", "value": "\"fubar! = foo" } + ] + }, + { + "test": "MOZILLA0013", + "received": [ + "test=kill; max-age=0", + "five; max-age=0" + ], + "sent": [] + }, + { + "test": "MOZILLA0014", + "received": [ + "six" + ], + "sent": [] + }, + { + "test": "MOZILLA0015", + "received": [ + "six", + "seven" + ], + "sent": [] + }, + { + "test": "MOZILLA0016", + "received": [ + "six", + "seven", + " =eight" + ], + "sent": [] + }, + { + "test": "MOZILLA0017", + "received": [ + "six", + "seven", + " =eight", + "test=six" + ], + "sent": [ + { "name": "test", "value": "six" } + ] + }, + { + "test": "NAME0001", + "received": [ + "a=bar" + ], + "sent": [ + { "name": "a", "value": "bar" } + ] + }, + { + "test": "NAME0002", + "received": [ + "1=bar" + ], + "sent": [ + { "name": "1", "value": "bar" } + ] + }, + { + "test": "NAME0003", + "received": [ + "$=bar" + ], + "sent": [ + { "name": "$", "value": "bar" } + ] + }, + { + "test": "NAME0004", + "received": [ + "!a=bar" + ], + "sent": [ + { "name": "!a", "value": "bar" } + ] + }, + { + "test": "NAME0005", + "received": [ + "@a=bar" + ], + "sent": [ + { "name": "@a", "value": "bar" } + ] + }, + { + "test": "NAME0006", + "received": [ + "#a=bar" + ], + "sent": [ + { "name": "#a", "value": "bar" } + ] + }, + { + "test": "NAME0007", + "received": [ + "$a=bar" + ], + "sent": [ + { "name": "$a", "value": "bar" } + ] + }, + { + "test": "NAME0008", + "received": [ + "%a=bar" + ], + "sent": [ + { "name": "%a", "value": "bar" } + ] + }, + { + "test": "NAME0009", + "received": [ + "^a=bar" + ], + "sent": [ + { "name": "^a", "value": "bar" } + ] + }, + { + "test": "NAME0010", + "received": [ + "&a=bar" + ], + "sent": [ + { "name": "&a", "value": "bar" } + ] + }, + { + "test": "NAME0011", + "received": [ + "*a=bar" + ], + "sent": [ + { "name": "*a", "value": "bar" } + ] + }, + { + "test": "NAME0012", + "received": [ + "(a=bar" + ], + "sent": [ + { "name": "(a", "value": "bar" } + ] + }, + { + "test": "NAME0013", + "received": [ + ")a=bar" + ], + "sent": [ + { "name": ")a", "value": "bar" } + ] + }, + { + "test": "NAME0014", + "received": [ + "-a=bar" + ], + "sent": [ + { "name": "-a", "value": "bar" } + ] + }, + { + "test": "NAME0015", + "received": [ + "_a=bar" + ], + "sent": [ + { "name": "_a", "value": "bar" } + ] + }, + { + "test": "NAME0016", + "received": [ + "+=bar" + ], + "sent": [ + { "name": "+", "value": "bar" } + ] + }, + { + "test": "NAME0017", + "received": [ + "=a=bar" + ], + "sent": [] + }, + { + "test": "NAME0018", + "received": [ + "a =bar" + ], + "sent": [ + { "name": "a", "value": "bar" } + ] + }, + { + "test": "NAME0019", + "received": [ + "\"a=bar" + ], + "sent": [ + { "name": "\"a", "value": "bar" } + ] + }, + { + "test": "NAME0020", + "received": [ + "\"a=b\"=bar" + ], + "sent": [ + { "name": "\"a", "value": "b\"=bar" } + ] + }, + { + "test": "NAME0021", + "received": [ + "\"a=b\"=bar", + "\"a=qux" + ], + "sent": [ + { "name": "\"a", "value": "qux" } + ] + }, + { + "test": "NAME0022", + "received": [ + " foo=bar" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "NAME0023", + "received": [ + "foo;bar=baz" + ], + "sent": [] + }, + { + "test": "NAME0024", + "received": [ + "$Version=1; foo=bar" + ], + "sent": [ + { "name": "$Version", "value": "1" } + ] + }, + { + "test": "NAME0025", + "received": [ + "===a=bar" + ], + "sent": [] + }, + { + "test": "NAME0026", + "received": [ + "foo=bar " + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "NAME0027", + "received": [ + "foo=bar ;" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "NAME0028", + "received": [ + "=a" + ], + "sent": [] + }, + { + "test": "NAME0029", + "received": [ + "=" + ], + "sent": [] + }, + { + "test": "NAME0030", + "received": [ + "foo bar=baz" + ], + "sent": [ + { "name": "foo bar", "value": "baz" } + ] + }, + { + "test": "NAME0031", + "received": [ + "\"foo;bar\"=baz" + ], + "sent": [] + }, + { + "test": "NAME0032", + "received": [ + "\"foo\\\"bar;baz\"=qux" + ], + "sent": [] + }, + { + "test": "NAME0033", + "received": [ + "=foo=bar", + "aaa" + ], + "sent": [] + }, + { + "test": "OPTIONAL_DOMAIN0030", + "received": [ + "foo=bar; domain=" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?optional-domain0030", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "OPTIONAL_DOMAIN0041", + "received": [ + "foo=bar; domain=example.org; domain=" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?optional-domain0041", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "OPTIONAL_DOMAIN0042", + "received": [ + "foo=bar; domain=foo.example.org; domain=" + ], + "sent-to": "http://home.example.org:8888/cookie-parser-result?optional-domain0042", + "sent": [] + }, + { + "test": "OPTIONAL_DOMAIN0043", + "received": [ + "foo=bar; domain=foo.example.org; domain=" + ], + "sent-to": "http://subdomain.home.example.org:8888/cookie-parser-result?optional-domain0043", + "sent": [] + }, + { + "test": "ORDERING0001", + "received": [ + "key=val0;", + "key=val1; path=/cookie-parser-result", + "key=val2; path=/", + "key=val3; path=/bar", + "key=val4; domain=.example.org", + "key=val5; domain=.example.org; path=/cookie-parser-result/foo" + ], + "sent-to": "/cookie-parser-result/foo/baz?ordering0001", + "sent": [ + { "name": "key", "value": "val5" }, + { "name": "key", "value": "val1" }, + { "name": "key", "value": "val2" }, + { "name": "key", "value": "val4" } + ] + }, + { + "test": "PATH0001", + "received": [ + "a=b; path=/", + "x=y; path=/cookie-parser-result" + ], + "sent": [ + { "name": "x", "value": "y" }, + { "name": "a", "value": "b" } + ] + }, + { + "test": "PATH0002", + "received": [ + "a=b; path=/cookie-parser-result", + "x=y; path=/" + ], + "sent": [ + { "name": "a", "value": "b" }, + { "name": "x", "value": "y" } + ] + }, + { + "test": "PATH0003", + "received": [ + "x=y; path=/", + "a=b; path=/cookie-parser-result" + ], + "sent": [ + { "name": "a", "value": "b" }, + { "name": "x", "value": "y" } + ] + }, + { + "test": "PATH0004", + "received": [ + "x=y; path=/cookie-parser-result", + "a=b; path=/" + ], + "sent": [ + { "name": "x", "value": "y" }, + { "name": "a", "value": "b" } + ] + }, + { + "test": "PATH0005", + "received": [ + "foo=bar; path=/cookie-parser-result/foo" + ], + "sent": [] + }, + { + "test": "PATH0006", + "received": [ + "foo=bar", + "foo=qux; path=/cookie-parser-result/foo" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "PATH0007", + "received": [ + "foo=bar; path=/cookie-parser-result/foo" + ], + "sent-to": "/cookie-parser-result/foo?path0007", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "PATH0008", + "received": [ + "foo=bar; path=/cookie-parser-result/foo" + ], + "sent-to": "/cookie-parser-result/bar?path0008", + "sent": [] + }, + { + "test": "PATH0009", + "received": [ + "foo=bar; path=/cookie-parser-result/foo/qux" + ], + "sent-to": "/cookie-parser-result/foo?path0009", + "sent": [] + }, + { + "test": "PATH0010", + "received": [ + "foo=bar; path=/cookie-parser-result/foo/qux" + ], + "sent-to": "/cookie-parser-result/foo/qux?path0010", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "PATH0011", + "received": [ + "foo=bar; path=/cookie-parser-result/foo/qux" + ], + "sent-to": "/cookie-parser-result/bar/qux?path0011", + "sent": [] + }, + { + "test": "PATH0012", + "received": [ + "foo=bar; path=/cookie-parser-result/foo/qux" + ], + "sent-to": "/cookie-parser-result/foo/baz?path0012", + "sent": [] + }, + { + "test": "PATH0013", + "received": [ + "foo=bar; path=/cookie-parser-result/foo/qux/" + ], + "sent-to": "/cookie-parser-result/foo/baz?path0013", + "sent": [] + }, + { + "test": "PATH0014", + "received": [ + "foo=bar; path=/cookie-parser-result/foo/qux/" + ], + "sent-to": "/cookie-parser-result/foo/qux?path0014", + "sent": [] + }, + { + "test": "PATH0015", + "received": [ + "foo=bar; path=/cookie-parser-result/foo/qux/" + ], + "sent-to": "/cookie-parser-result/foo/qux/?path0015", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "PATH0016", + "received": [ + "foo=bar; path=/cookie-parser-result/foo/" + ], + "sent-to": "/cookie-parser-result/foo/qux?path0016", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "PATH0017", + "received": [ + "foo=bar; path=/cookie-parser-result/foo/" + ], + "sent-to": "/cookie-parser-result/foo//qux?path0017", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "PATH0018", + "received": [ + "foo=bar; path=/cookie-parser-result/foo/" + ], + "sent-to": "/cookie-parser-result/fooqux?path0018", + "sent": [] + }, + { + "test": "PATH0019", + "received": [ + "foo=bar; path" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "PATH0020", + "received": [ + "foo=bar; path=" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "PATH0021", + "received": [ + "foo=bar; path=/" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "PATH0022", + "received": [ + "foo=bar; path= /" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "PATH0023", + "received": [ + "foo=bar; Path=/cookie-PARSER-result" + ], + "sent": [] + }, + { + "test": "PATH0024", + "received": [ + "foo=bar; path=/cookie-parser-result/foo/qux?" + ], + "sent-to": "/cookie-parser-result/foo/qux?path0024", + "sent": [] + }, + { + "test": "PATH0025", + "received": [ + "foo=bar; path=/cookie-parser-result/foo/qux#" + ], + "sent-to": "/cookie-parser-result/foo/qux?path0025", + "sent": [] + }, + { + "test": "PATH0026", + "received": [ + "foo=bar; path=/cookie-parser-result/foo/qux;" + ], + "sent-to": "/cookie-parser-result/foo/qux?path0026", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "PATH0027", + "received": [ + "foo=bar; path=\"/cookie-parser-result/foo/qux;\"" + ], + "sent-to": "/cookie-parser-result/foo/qux?path0027", + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "PATH0028", + "received": [ + "foo=bar; path=/cookie-parser-result/f%6Fo/bar" + ], + "sent-to": "/cookie-parser-result/foo/bar?path0028", + "sent": [] + }, + { + "test": "PATH0029", + "received": [ + "a=b; \tpath\t=\t/cookie-parser-result\t", + "x=y; \tpath\t=\t/book\t" + ], + "sent": [ + { "name": "a", "value": "b" } + ] + }, + { + "test": "PATH0030", + "received": [ + "foo=bar; path=/dog; path=" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "PATH0031", + "received": [ + "foo=bar; path=; path=/dog" + ], + "sent": [] + }, + { + "test": "PATH0032", + "received": [ + "foo=bar; path=/cookie-parser-result", + "foo=qux; path=/cookie-parser-result/" + ], + "sent-to": "/cookie-parser-result/dog?path0032", + "sent": [ + { "name": "foo", "value": "qux" }, + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "VALUE0001", + "received": [ + "foo= bar" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + }, + { + "test": "VALUE0002", + "received": [ + "foo=\"bar\"" + ], + "sent": [ + { "name": "foo", "value": "\"bar\"" } + ] + }, + { + "test": "VALUE0003", + "received": [ + "foo=\" bar \"" + ], + "sent": [ + { "name": "foo", "value": "\" bar \"" } + ] + }, + { + "test": "VALUE0004", + "received": [ + "foo=\"bar;baz\"" + ], + "sent": [ + { "name": "foo", "value": "\"bar" } + ] + }, + { + "test": "VALUE0005", + "received": [ + "foo=\"bar=baz\"" + ], + "sent": [ + { "name": "foo", "value": "\"bar=baz\"" } + ] + }, + { + "test": "VALUE0006", + "received": [ + "\tfoo\t=\tbar\t \t;\tttt" + ], + "sent": [ + { "name": "foo", "value": "bar" } + ] + } +] diff --git a/lib/__tests__/ietf.spec.ts b/lib/__tests__/ietf.spec.ts index 2582b486..aca72b53 100644 --- a/lib/__tests__/ietf.spec.ts +++ b/lib/__tests__/ietf.spec.ts @@ -31,9 +31,9 @@ import {CookieJar, parseDate} from '../cookie' import url from 'url' -import parserData from '../../test/ietf_data/parser.json' -import bsdExampleDates from '../../test/ietf_data/dates/bsd-examples.json' -import exampleDates from '../../test/ietf_data/dates/examples.json' +import parserData from './data/parser' +import bsdExampleDates from './data/dates/bsd-examples' +import exampleDates from './data/dates/examples' describe('IETF http state tests', () => { describe('Set/get cookie tests', () => { From 4118dbb4ff9a24d0a37881ab6c2be7df29127fcd Mon Sep 17 00:00:00 2001 From: Will Harney Date: Sun, 19 Mar 2023 14:30:52 -0400 Subject: [PATCH 6/9] Remove config that's just the default. See: https://huafu.github.io/ts-jest/user/config/isolatedModules --- jest.config.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/jest.config.js b/jest.config.js index e5371e68..58bee3f0 100644 --- a/jest.config.js +++ b/jest.config.js @@ -3,11 +3,6 @@ module.exports = { preset: "ts-jest", testEnvironment: "node", maxWorkers: 1, - globals: { - "ts-jest": { - isolatedModules: false - } - }, rootDir: './lib/', testPathIgnorePatterns: ['./lib/__tests__/data/'] }; From 78964b8c5e826e225a2b1f6437628c21ebcfd8df Mon Sep 17 00:00:00 2001 From: Will Harney Date: Sun, 19 Mar 2023 17:03:38 -0400 Subject: [PATCH 7/9] Update tsconfig to target node 16 and only compile ./lib --- tsconfig.json | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 29abd830..4ea000ea 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,26 +1,25 @@ { "compilerOptions": { - "experimentalDecorators": true, - "outDir": "./dist", - "allowJs": true, - "target": "ES2016", - "moduleResolution": "node16", + /* Language and Environment */ + "target": "ES2021", + "lib": ["ES2021"], + /* Modules */ "module": "Node16", - "resolveJsonModule": true, + "rootDir": "./lib/", + /* Emit */ + "declaration": true, + "outDir": "./dist/", + "importsNotUsedAsValues": "error", + /* Interop Constraints */ "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + /* Type Checking */ "strict": true, - "noImplicitAny": true, - "noImplicitThis": true, - "noImplicitOverride": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, "noUnusedLocals": true, "noUnusedParameters": true, + "exactOptionalPropertyTypes": true, + "noFallthroughCasesInSwitch": true, "noUncheckedIndexedAccess": true, - "importsNotUsedAsValues": "error", - "allowUnusedLabels": false, - "allowUnreachableCode": false, - "exactOptionalPropertyTypes": true - }, - "include": ["./lib/**/*"] + "noImplicitOverride": true + } } From d1fc0a532fa657f5ed130cc45604a05abc8d4ea4 Mon Sep 17 00:00:00 2001 From: Will Harney Date: Sun, 19 Mar 2023 17:21:34 -0400 Subject: [PATCH 8/9] Chang `dist/lib` imports to just `dist`. --- package.json | 4 ++-- test/api_test.js | 2 +- test/cookie_jar_test.js | 2 +- test/cookie_prefixes_test.js | 2 +- test/cookie_sorting_test.js | 2 +- test/cookie_to_json_test.js | 2 +- test/cookie_to_string_test.js | 2 +- test/date_test.js | 2 +- test/domain_and_path_test.js | 2 +- test/ietf_test.js | 2 +- test/jar_serialization_test.js | 2 +- test/lifetime_test.js | 2 +- test/node_util_fallback_test.js | 6 +++--- test/parsing_test.js | 2 +- test/regression_test.js | 2 +- test/remove_all_test.js | 2 +- test/same_site_test.js | 2 +- 17 files changed, 20 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index aca53e27..da0c87de 100644 --- a/package.json +++ b/package.json @@ -76,8 +76,8 @@ "bugs": { "url": "https://github.com/salesforce/tough-cookie/issues" }, - "main": "./dist/lib/cookie", - "types": "./dist/lib/cookie", + "main": "./dist/cookie", + "types": "./dist/cookie", "files": [ "lib" ], diff --git a/test/api_test.js b/test/api_test.js index 865fb4b2..0035d974 100644 --- a/test/api_test.js +++ b/test/api_test.js @@ -32,7 +32,7 @@ const vows = require("vows"); const assert = require("assert"); const async = require("async"); -const tough = require("../dist/lib/cookie"); +const tough = require("../dist/cookie"); const Cookie = tough.Cookie; const CookieJar = tough.CookieJar; diff --git a/test/cookie_jar_test.js b/test/cookie_jar_test.js index 913d4812..938a622e 100644 --- a/test/cookie_jar_test.js +++ b/test/cookie_jar_test.js @@ -32,7 +32,7 @@ const vows = require("vows"); const assert = require("assert"); const async = require("async"); -const tough = require("../dist/lib/cookie"); +const tough = require("../dist/cookie"); const Cookie = tough.Cookie; const CookieJar = tough.CookieJar; diff --git a/test/cookie_prefixes_test.js b/test/cookie_prefixes_test.js index 81ef4a1b..20f9fb04 100644 --- a/test/cookie_prefixes_test.js +++ b/test/cookie_prefixes_test.js @@ -31,7 +31,7 @@ "use strict"; const vows = require("vows"); const assert = require("assert"); -const tough = require("../dist/lib/cookie"); +const tough = require("../dist/cookie"); const CookieJar = tough.CookieJar; const PrefixSecurityEnum = tough.PrefixSecurityEnum; diff --git a/test/cookie_sorting_test.js b/test/cookie_sorting_test.js index 0e50685c..d8edf221 100644 --- a/test/cookie_sorting_test.js +++ b/test/cookie_sorting_test.js @@ -31,7 +31,7 @@ "use strict"; const vows = require("vows"); const assert = require("assert"); -const tough = require("../dist/lib/cookie"); +const tough = require("../dist/cookie"); const Cookie = tough.Cookie; const CookieJar = tough.CookieJar; diff --git a/test/cookie_to_json_test.js b/test/cookie_to_json_test.js index 8506cedc..a7b4ca7f 100644 --- a/test/cookie_to_json_test.js +++ b/test/cookie_to_json_test.js @@ -32,7 +32,7 @@ "use strict"; const vows = require("vows"); const assert = require("assert"); -const tough = require("../dist/lib/cookie"); +const tough = require("../dist/cookie"); const Cookie = tough.Cookie; vows diff --git a/test/cookie_to_string_test.js b/test/cookie_to_string_test.js index 2a853efe..12d8930c 100644 --- a/test/cookie_to_string_test.js +++ b/test/cookie_to_string_test.js @@ -32,7 +32,7 @@ "use strict"; const vows = require("vows"); const assert = require("assert"); -const tough = require("../dist/lib/cookie"); +const tough = require("../dist/cookie"); const Cookie = tough.Cookie; vows diff --git a/test/date_test.js b/test/date_test.js index 5b81003c..dbb725fc 100644 --- a/test/date_test.js +++ b/test/date_test.js @@ -32,7 +32,7 @@ "use strict"; const vows = require("vows"); const assert = require("assert"); -const tough = require("../dist/lib/cookie"); +const tough = require("../dist/cookie"); function dateVows(table) { const theVows = {}; diff --git a/test/domain_and_path_test.js b/test/domain_and_path_test.js index 78e4e1c5..93655519 100644 --- a/test/domain_and_path_test.js +++ b/test/domain_and_path_test.js @@ -32,7 +32,7 @@ "use strict"; const vows = require("vows"); const assert = require("assert"); -const tough = require("../dist/lib/cookie"); +const tough = require("../dist/cookie"); const Cookie = tough.Cookie; function matchVows(func, table) { diff --git a/test/ietf_test.js b/test/ietf_test.js index a15d5fda..8e0abc04 100644 --- a/test/ietf_test.js +++ b/test/ietf_test.js @@ -35,7 +35,7 @@ const assert = require("assert"); const fs = require("fs"); const path = require("path"); const url = require("url"); -const tough = require("../dist/lib/cookie"); +const tough = require("../dist/cookie"); const CookieJar = tough.CookieJar; function readJson(filePath) { diff --git a/test/jar_serialization_test.js b/test/jar_serialization_test.js index 5bbb9758..481cdf55 100644 --- a/test/jar_serialization_test.js +++ b/test/jar_serialization_test.js @@ -32,7 +32,7 @@ "use strict"; const vows = require("vows"); const assert = require("assert"); -const tough = require("../dist/lib/cookie"); +const tough = require("../dist/cookie"); const Cookie = tough.Cookie; const CookieJar = tough.CookieJar; const Store = tough.Store; diff --git a/test/lifetime_test.js b/test/lifetime_test.js index 9a5c0357..1e0a320f 100644 --- a/test/lifetime_test.js +++ b/test/lifetime_test.js @@ -32,7 +32,7 @@ "use strict"; const vows = require("vows"); const assert = require("assert"); -const tough = require("../dist/lib/cookie"); +const tough = require("../dist/cookie"); const Cookie = tough.Cookie; vows diff --git a/test/node_util_fallback_test.js b/test/node_util_fallback_test.js index 9e6e924b..7f0e7a4d 100644 --- a/test/node_util_fallback_test.js +++ b/test/node_util_fallback_test.js @@ -32,13 +32,13 @@ "use strict"; const vows = require("vows"); const assert = require("assert"); -const tough = require("../dist/lib/cookie"); +const tough = require("../dist/cookie"); const util = require("util"); -const inspectFallback = require("../dist/lib/memstore").inspectFallback; +const inspectFallback = require("../dist/memstore").inspectFallback; const { getCustomInspectSymbol, getUtilInspect -} = require("../dist/lib/utilHelper"); +} = require("../dist/utilHelper"); const Cookie = tough.Cookie; const CookieJar = tough.CookieJar; diff --git a/test/parsing_test.js b/test/parsing_test.js index a40c86a5..0ed27dd1 100644 --- a/test/parsing_test.js +++ b/test/parsing_test.js @@ -32,7 +32,7 @@ "use strict"; const vows = require("vows"); const assert = require("assert"); -const tough = require("../dist/lib/cookie"); +const tough = require("../dist/cookie"); const Cookie = tough.Cookie; const LOTS_OF_SEMICOLONS = ";".repeat(65535); diff --git a/test/regression_test.js b/test/regression_test.js index b1f96912..ce38b341 100644 --- a/test/regression_test.js +++ b/test/regression_test.js @@ -33,7 +33,7 @@ const vows = require("vows"); const assert = require("assert"); const async = require("async"); -const tough = require("../dist/lib/cookie"); +const tough = require("../dist/cookie"); const Cookie = tough.Cookie; const CookieJar = tough.CookieJar; const MemoryCookieStore = tough.MemoryCookieStore; diff --git a/test/remove_all_test.js b/test/remove_all_test.js index bed18b18..76bdbfa5 100644 --- a/test/remove_all_test.js +++ b/test/remove_all_test.js @@ -33,7 +33,7 @@ const util = require("util"); const vows = require("vows"); const assert = require("assert"); const async = require("async"); -const tough = require("../dist/lib/cookie"); +const tough = require("../dist/cookie"); const Cookie = tough.Cookie; const CookieJar = tough.CookieJar; const Store = tough.Store; diff --git a/test/same_site_test.js b/test/same_site_test.js index f0801ce3..27405932 100644 --- a/test/same_site_test.js +++ b/test/same_site_test.js @@ -32,7 +32,7 @@ "use strict"; const vows = require("vows"); const assert = require("assert"); -const tough = require("../dist/lib/cookie"); +const tough = require("../dist/cookie"); const Cookie = tough.Cookie; const CookieJar = tough.CookieJar; From 7749b0d50a44f1f086c066dfebf90f2eabb910f6 Mon Sep 17 00:00:00 2001 From: Will Harney Date: Mon, 20 Mar 2023 10:56:45 -0400 Subject: [PATCH 9/9] add granularity to npm scripts --- package.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index da0c87de..aaaeb5b3 100644 --- a/package.json +++ b/package.json @@ -82,8 +82,13 @@ "lib" ], "scripts": { + "build": "npm run clean && tsc", + "clean": "rm -rf dist", "version": "genversion lib/version.js && git add lib/version.js", - "test": "jest && tsc && vows test/*_test.js", + "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": "nyc --reporter=lcov --reporter=html vows test/*_test.js", "eslint": "eslint --env node --ext .js .", "prettier": "prettier '**/*.{json,ts,yaml,md}'",