cookie-es 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -219,4 +219,5 @@ declare function parseSetCookie(setCookieValue: string, options?: SetCookieParse
219
219
  */
220
220
  declare function splitSetCookieString(cookiesString: string | string[]): string[];
221
221
 
222
- export { type CookieParseOptions, type CookieSerializeOptions, type SetCookie, type SetCookieParseOptions, parse, parseSetCookie, serialize, splitSetCookieString };
222
+ export { parse, parseSetCookie, serialize, splitSetCookieString };
223
+ export type { CookieParseOptions, CookieSerializeOptions, SetCookie, SetCookieParseOptions };
package/dist/index.mjs CHANGED
@@ -1,8 +1,14 @@
1
+ const NullObject = /* @__PURE__ */ (() => {
2
+ const C = function() {
3
+ };
4
+ C.prototype = /* @__PURE__ */ Object.create(null);
5
+ return C;
6
+ })();
1
7
  function parse(str, options) {
2
8
  if (typeof str !== "string") {
3
9
  throw new TypeError("argument str must be a string");
4
10
  }
5
- const obj = {};
11
+ const obj = new NullObject();
6
12
  const opt = options || {};
7
13
  const dec = opt.decode || decode;
8
14
  let index = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cookie-es",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "repository": "unjs/cookie-es",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,
@@ -18,20 +18,20 @@
18
18
  "dev": "vitest --coverage",
19
19
  "lint": "eslint --cache . && prettier -c src test",
20
20
  "lint:fix": "automd && eslint --cache . --fix && prettier -c src test -w",
21
- "release": "pnpm test && pnpm build && changelogen --release --push && npm publish",
21
+ "release": "pnpm test && pnpm build && changelogen --release --push && npm publish --tag 2x",
22
22
  "test": "pnpm lint && vitest run --coverage"
23
23
  },
24
24
  "devDependencies": {
25
- "@types/node": "^22.13.5",
26
- "@vitest/coverage-v8": "^3.0.7",
27
- "automd": "^0.4.0",
28
- "changelogen": "^0.6.0",
29
- "eslint": "^9.21.0",
30
- "eslint-config-unjs": "^0.4.2",
31
- "prettier": "^3.5.2",
32
- "typescript": "^5.7.3",
33
- "unbuild": "^3.5.0",
34
- "vitest": "^3.0.7"
25
+ "@types/node": "^25.5.0",
26
+ "@vitest/coverage-v8": "^4.1.2",
27
+ "automd": "^0.4.3",
28
+ "changelogen": "^0.6.2",
29
+ "eslint": "^10.1.0",
30
+ "eslint-config-unjs": "^0.6.2",
31
+ "prettier": "^3.8.1",
32
+ "typescript": "^6.0.2",
33
+ "unbuild": "^3.6.1",
34
+ "vitest": "^4.1.2"
35
35
  },
36
36
  "packageManager": "pnpm@10.5.2"
37
37
  }