feat(frontend): scaffold SvelteKit with TS 7.0 (native-preview) and tsgo

This commit is contained in:
2026-04-28 05:16:19 +02:00
parent 943463fff4
commit f9c721d841
2014 changed files with 415452 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015 Nathan Friedly <nathan@nfriedly.com> (http://nfriedly.com/)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+169
View File
@@ -0,0 +1,169 @@
# set-cookie-parser
[![Node.js CI](https://github.com/nfriedly/set-cookie-parser/actions/workflows/node.js.yml/badge.svg)](https://github.com/nfriedly/set-cookie-parser/actions/workflows/node.js.yml)
[![NPM version][npm-image]][npm-url]
[![npm downloads](https://img.shields.io/npm/dm/set-cookie-parser)][npm-url]
---
Parses set-cookie headers into JavaScript objects
Accepts a single `set-cookie` header value, an array of `set-cookie` header values, a Node.js response object, or a `fetch()` `Response` object that may have 0 or more `set-cookie` headers.
Returns either an array of cookie objects or a map of name => cookie object with options set `{map: true}`. Each cookie object will have, at a minimum `name` and `value` properties, and may have additional properties depending on the set-cookie header:
* `name` - cookie name (string)
* `value` - cookie value (string)
* `path` - URL path to limit the scope to (string or undefined)
* `domain` - domain to expand the scope to (string or undefined, may begin with "." to indicate the named domain or any subdomain of it)
* `expires` - absolute expiration date for the cookie (Date object or undefined)
* `maxAge` - relative expiration time of the cookie in seconds from when the client receives it (integer or undefined)
* Note: when using with [express's res.cookie() method](http://expressjs.com/en/4x/api.html#res.cookie), multiply `maxAge` by 1000 to convert to milliseconds.
* `secure` - indicates cookie should only be sent over HTTPs (true or undefined)
* `httpOnly` - indicates cookie should *not* be accessible to client-side JavaScript (true or undefined)
* `sameSite` - indicates if cookie should be included in cross-site requests ([more info](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#samesitesamesite-value)) (string or undefined)
* Note: valid values are `"Strict"`, `"Lax"`, and `"None"`, but set-cookie-parser copies the value verbatim and does *not* perform any validation.
* `partitioned` - indicates cookie should be scoped to the combination of 3rd party domain + top page domain ([more info](https://developer.mozilla.org/en-US/docs/Web/Privacy/Privacy_sandbox/Partitioned_cookies)) (true or undefined)
(The output format is loosely based on the input format of https://www.npmjs.com/package/cookie)
## Install
```sh
$ npm install --save set-cookie-parser
```
## Usage
### Get array of cookie objects
```js
import * as http from 'node:http';
import { parseSetCookie } from 'set-cookie-parser';
// or const { parseSetCookie } = require('set-cookie-parser');
http.get('http://example.com', function(res) {
const cookies = parseSetCookie(res, {
decodeValues: true // default: true
});
cookies.forEach(console.log);
}
```
Example output:
```js
[
{
name: 'bam',
value: 'baz'
},
{
name: 'foo',
value: 'bar',
path: '/',
expires: new Date('Tue Jul 01 2025 06:01:11 GMT-0400 (EDT)'),
maxAge: 1000,
domain: '.example.com',
secure: true,
httpOnly: true,
sameSite: 'lax'
}
]
```
### Get map of cookie objects
```js
import * as http from 'node:http';
import { parseSetCookie } from 'set-cookie-parser';
// or const { parseSetCookie } = require('set-cookie-parser');
http.get('http://example.com', function(res) {
const cookies = parseSetCookie(res, {
decodeValues: true, // default: true
map: true // default: false
});
const desiredCookie = cookies['session'];
console.log(desiredCookie);
});
```
Example output:
```js
{
bam: {
name: 'bam',
value: 'baz'
},
foo: {
name: 'foo',
value: 'bar',
path: '/',
expires: new Date('Tue Jul 01 2025 06:01:11 GMT-0400 (EDT)'),
maxAge: 1000,
domain: '.example.com',
secure: true,
httpOnly: true,
sameSite: 'lax'
}
}
```
### Creating a new, modified set-cookie header
This library can be used in conjunction with the [cookie](https://www.npmjs.com/package/cookie) library to modify and replace set-cookie headers:
```js
import * as libCookie from 'cookie';
import { parseSetCookie } from 'set-cookie-parser';
// or const { parseSetCookie } = require('set-cookie-parser');
function modifySetCookie(res){
// parse the set-cookie headers with this library
const cookies = parseSetCookie(res);
// modify the cookies here
// ...
// create new set-cookie headers using the cookie library
res.headers['set-cookie'] = cookies.map(function(cookie) {
return libCookie.serialize(cookie.name, cookie.value, cookie);
});
}
```
See a real-world example of this in [unblocker](https://github.com/nfriedly/node-unblocker/blob/08a89ec27274b46dcd80d0a324a59406f2bdad3d/lib/cookies.js#L67-L85)
## API
### parseSetCookie(input, [options])
Parses cookies from a string, array of strings, or a http response object.
Always returns an array, regardless of input format. (Unless the `map` option is set, in which case it always returns an object.)
Also accepts an optional options object. Defaults:
```js
{
decodeValues: true, // Calls decodeURIComponent on each value - default: true
map: false, // Return an object instead of an array - default: false
silent: false, // Suppress the warning that is logged when called on a request instead of a response - default: false
split: 'auto', // Separate combined cookie headers. Valid options are true/false/'auto'. 'auto' splits strings but not arrays.
}
```
## References
* [RFC 6265: HTTP State Management Mechanism](https://tools.ietf.org/html/rfc6265)
* [draft-ietf-httpbis-rfc6265bis-10](https://httpwg.org/http-extensions/draft-ietf-httpbis-rfc6265bis.html)
## License
MIT © [Nathan Friedly](http://www.nfriedly.com/)
[npm-image]: https://badge.fury.io/js/set-cookie-parser.svg
[npm-url]: https://npmjs.org/package/set-cookie-parser
+16
View File
@@ -0,0 +1,16 @@
"use strict";
module.exports = {
// This isn't really meant for use in browsers, but some dependents such as nookie are.
// So, stick with ES5 (at least for the CJS version) to be nice. See #44
parserOptions: { ecmaVersion: 5 },
env: {
node: true,
browser: true,
},
extends: ["eslint:recommended", "plugin:prettier/recommended"],
rules: {
"prefer-const": "error",
strict: "error",
eqeqeq: "error",
},
};
+260
View File
@@ -0,0 +1,260 @@
// Generated automatically from lib/set-cookie.js; see build-cjs.js
var defaultParseOptions = {
decodeValues: true,
map: false,
silent: false,
split: "auto", // auto = split strings but not arrays
};
function isForbiddenKey(key) {
return typeof key !== "string" || key in {};
}
function createNullObj() {
return Object.create(null);
}
function isNonEmptyString(str) {
return typeof str === "string" && !!str.trim();
}
function parseString(setCookieValue, options) {
var parts = setCookieValue.split(";").filter(isNonEmptyString);
var nameValuePairStr = parts.shift();
var parsed = parseNameValuePair(nameValuePairStr);
var name = parsed.name;
var value = parsed.value;
options = options
? Object.assign({}, defaultParseOptions, options)
: defaultParseOptions;
if (isForbiddenKey(name)) {
return null;
}
try {
value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value
} catch (e) {
console.error(
"set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",
e
);
}
var cookie = createNullObj();
cookie.name = name;
cookie.value = value;
parts.forEach(function (part) {
var sides = part.split("=");
var key = sides.shift().trimLeft().toLowerCase();
if (isForbiddenKey(key)) {
return;
}
var value = sides.join("=");
if (key === "expires") {
cookie.expires = new Date(value);
} else if (key === "max-age") {
var n = parseInt(value, 10);
if (!Number.isNaN(n)) cookie.maxAge = n;
} else if (key === "secure") {
cookie.secure = true;
} else if (key === "httponly") {
cookie.httpOnly = true;
} else if (key === "samesite") {
cookie.sameSite = value;
} else if (key === "partitioned") {
cookie.partitioned = true;
} else if (key) {
cookie[key] = value;
}
});
return cookie;
}
function parseNameValuePair(nameValuePairStr) {
// Parses name-value-pair according to rfc6265bis draft
var name = "";
var value = "";
var nameValueArr = nameValuePairStr.split("=");
if (nameValueArr.length > 1) {
name = nameValueArr.shift();
value = nameValueArr.join("="); // everything after the first =, joined by a "=" if there was more than one part
} else {
value = nameValuePairStr;
}
return { name: name, value: value };
}
function parseSetCookie(input, options) {
options = options
? Object.assign({}, defaultParseOptions, options)
: defaultParseOptions;
if (!input) {
if (!options.map) {
return [];
} else {
return createNullObj();
}
}
if (input.headers) {
if (typeof input.headers.getSetCookie === "function") {
// for fetch responses - they combine headers of the same type in the headers array,
// but getSetCookie returns an uncombined array
input = input.headers.getSetCookie();
} else if (input.headers["set-cookie"]) {
// fast-path for node.js (which automatically normalizes header names to lower-case)
input = input.headers["set-cookie"];
} else {
// slow-path for other environments - see #25
var sch =
input.headers[
Object.keys(input.headers).find(function (key) {
return key.toLowerCase() === "set-cookie";
})
];
// warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
if (!sch && input.headers.cookie && !options.silent) {
console.warn(
"Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
);
}
input = sch;
}
}
var split = options.split;
var isArray = Array.isArray(input);
if (split === "auto") {
split = !isArray;
}
if (!isArray) {
input = [input];
}
input = input.filter(isNonEmptyString);
if (split) {
input = input.map(splitCookiesString).flat();
}
if (!options.map) {
return input
.map(function (str) {
return parseString(str, options);
})
.filter(Boolean);
} else {
var cookies = createNullObj();
return input.reduce(function (cookies, str) {
var cookie = parseString(str, options);
if (cookie && !isForbiddenKey(cookie.name)) {
cookies[cookie.name] = cookie;
}
return cookies;
}, cookies);
}
}
/*
Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas
that are within a single set-cookie field-value, such as in the Expires portion.
This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2
Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128
React Native's fetch does this for *every* header, including set-cookie.
Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25
Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
*/
function splitCookiesString(cookiesString) {
if (Array.isArray(cookiesString)) {
return cookiesString;
}
if (typeof cookiesString !== "string") {
return [];
}
var cookiesStrings = [];
var pos = 0;
var start;
var ch;
var lastComma;
var nextStart;
var cookiesSeparatorFound;
function skipWhitespace() {
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
pos += 1;
}
return pos < cookiesString.length;
}
function notSpecialChar() {
ch = cookiesString.charAt(pos);
return ch !== "=" && ch !== ";" && ch !== ",";
}
while (pos < cookiesString.length) {
start = pos;
cookiesSeparatorFound = false;
while (skipWhitespace()) {
ch = cookiesString.charAt(pos);
if (ch === ",") {
// ',' is a cookie separator if we have later first '=', not ';' or ','
lastComma = pos;
pos += 1;
skipWhitespace();
nextStart = pos;
while (pos < cookiesString.length && notSpecialChar()) {
pos += 1;
}
// currently special character
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
// we found cookies separator
cookiesSeparatorFound = true;
// pos is inside the next cookie, so back up and return it.
pos = nextStart;
cookiesStrings.push(cookiesString.substring(start, lastComma));
start = pos;
} else {
// in param ',' or param separator ';',
// we continue from that comma
pos = lastComma + 1;
}
} else {
pos += 1;
}
}
if (!cookiesSeparatorFound || pos >= cookiesString.length) {
cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
}
}
return cookiesStrings;
}
// named export for CJS
parseSetCookie.parseSetCookie = parseSetCookie;
// for backwards compatibility
parseSetCookie.parse = parseSetCookie;
parseSetCookie.parseString = parseString;
parseSetCookie.splitCookiesString = splitCookiesString;
module.exports = parseSetCookie;
+119
View File
@@ -0,0 +1,119 @@
export interface Cookie {
/** Cookie name */
name: string;
/** Cookie value */
value: string;
/** Cookie path */
path?: string;
/** Absolute expiration date for the cookie */
expires?: Date;
/**
* Relative max age of the cookie in seconds from when the client receives it.
* Note: when using with express's res.cookie() method, multiply maxAge by 1000 to convert to milliseconds.
*/
maxAge?: number;
/**
* Domain for the cookie,
* may begin with "." to indicate the named domain or any subdomain of it
*/
domain?: string;
/** Indicates that this cookie should only be sent over HTTPS */
secure?: boolean;
/** Indicates that this cookie should not be accessible to client-side JavaScript */
httpOnly?: boolean;
/** Indicates a cookie ought not to be sent along with cross-site requests */
sameSite?: string;
/** Indicates the cookie should be stored using partitioned storage */
partitioned?: boolean;
}
export interface CookieMap {
[name: string]: Cookie;
}
export interface Options {
/**
* Calls decodeURIComponent on each value.
* @default true
*/
decodeValues?: boolean;
/**
* Return an object instead of an array.
* @default false
*/
map?: boolean;
/**
* Suppress the warning that is logged when called on a request instead of a response.
* @default false
*/
silent?: boolean;
/**
* Controls whether combined cookie strings are split.
* - `true`: always split
* - `false`: never split
* - `"auto"`: split strings but not arrays
* @default "auto"
*/
split?: boolean | "auto";
}
/** Object with a `headers` property (e.g. Node.js IncomingMessage or fetch Response) */
type ResponseLike = {
headers:
| { getSetCookie(): string[] }
| { "set-cookie"?: string | readonly string[] }
| Record<string, string | string[] | undefined>;
};
type SetCookieInput = string | readonly string[] | ResponseLike;
/**
* Parses set-cookie headers into objects.
*/
export function parseSetCookie(
input: SetCookieInput,
options: Options & { map: true }
): CookieMap;
export function parseSetCookie(
input: SetCookieInput,
options?: Options & { map?: false }
): Cookie[];
export function parseSetCookie(
input: SetCookieInput,
options?: Options
): Cookie[] | CookieMap;
/**
* Parses a single set-cookie header value string.
* @deprecated Use `parseSetCookie` instead.
*/
export function parseString(
setCookieValue: string,
options?: Options
): Cookie | null;
/**
* Splits a combined set-cookie header string into individual set-cookie header strings.
* @deprecated Use `parseSetCookie` with the `split` option instead.
*/
export function splitCookiesString(
input: string | readonly string[] | undefined
): string[];
/**
* @deprecated Renamed to `parseSetCookie`. Kept for backward compatibility.
*/
export {
parseSetCookie as parse,
};
/**
* Default export — the `parseSetCookie` function with additional properties for backward compatibility.
*/
declare const _default: typeof parseSetCookie & {
parseSetCookie: typeof parseSetCookie;
parse: typeof parseSetCookie;
parseString: typeof parseString;
splitCookiesString: typeof splitCookiesString;
};
export default _default;
+265
View File
@@ -0,0 +1,265 @@
var defaultParseOptions = {
decodeValues: true,
map: false,
silent: false,
split: "auto", // auto = split strings but not arrays
};
function isForbiddenKey(key) {
return typeof key !== "string" || key in {};
}
function createNullObj() {
return Object.create(null);
}
function isNonEmptyString(str) {
return typeof str === "string" && !!str.trim();
}
function parseString(setCookieValue, options) {
var parts = setCookieValue.split(";").filter(isNonEmptyString);
var nameValuePairStr = parts.shift();
var parsed = parseNameValuePair(nameValuePairStr);
var name = parsed.name;
var value = parsed.value;
options = options
? Object.assign({}, defaultParseOptions, options)
: defaultParseOptions;
if (isForbiddenKey(name)) {
return null;
}
try {
value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value
} catch (e) {
console.error(
"set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",
e
);
}
var cookie = createNullObj();
cookie.name = name;
cookie.value = value;
parts.forEach(function (part) {
var sides = part.split("=");
var key = sides.shift().trimLeft().toLowerCase();
if (isForbiddenKey(key)) {
return;
}
var value = sides.join("=");
if (key === "expires") {
cookie.expires = new Date(value);
} else if (key === "max-age") {
var n = parseInt(value, 10);
if (!Number.isNaN(n)) cookie.maxAge = n;
} else if (key === "secure") {
cookie.secure = true;
} else if (key === "httponly") {
cookie.httpOnly = true;
} else if (key === "samesite") {
cookie.sameSite = value;
} else if (key === "partitioned") {
cookie.partitioned = true;
} else if (key) {
cookie[key] = value;
}
});
return cookie;
}
function parseNameValuePair(nameValuePairStr) {
// Parses name-value-pair according to rfc6265bis draft
var name = "";
var value = "";
var nameValueArr = nameValuePairStr.split("=");
if (nameValueArr.length > 1) {
name = nameValueArr.shift();
value = nameValueArr.join("="); // everything after the first =, joined by a "=" if there was more than one part
} else {
value = nameValuePairStr;
}
return { name: name, value: value };
}
function parseSetCookie(input, options) {
options = options
? Object.assign({}, defaultParseOptions, options)
: defaultParseOptions;
if (!input) {
if (!options.map) {
return [];
} else {
return createNullObj();
}
}
if (input.headers) {
if (typeof input.headers.getSetCookie === "function") {
// for fetch responses - they combine headers of the same type in the headers array,
// but getSetCookie returns an uncombined array
input = input.headers.getSetCookie();
} else if (input.headers["set-cookie"]) {
// fast-path for node.js (which automatically normalizes header names to lower-case)
input = input.headers["set-cookie"];
} else {
// slow-path for other environments - see #25
var sch =
input.headers[
Object.keys(input.headers).find(function (key) {
return key.toLowerCase() === "set-cookie";
})
];
// warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36
if (!sch && input.headers.cookie && !options.silent) {
console.warn(
"Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."
);
}
input = sch;
}
}
var split = options.split;
var isArray = Array.isArray(input);
if (split === "auto") {
split = !isArray;
}
if (!isArray) {
input = [input];
}
input = input.filter(isNonEmptyString);
if (split) {
input = input.map(splitCookiesString).flat();
}
if (!options.map) {
return input
.map(function (str) {
return parseString(str, options);
})
.filter(Boolean);
} else {
var cookies = createNullObj();
return input.reduce(function (cookies, str) {
var cookie = parseString(str, options);
if (cookie && !isForbiddenKey(cookie.name)) {
cookies[cookie.name] = cookie;
}
return cookies;
}, cookies);
}
}
/*
Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas
that are within a single set-cookie field-value, such as in the Expires portion.
This is uncommon, but explicitly allowed - see https://tools.ietf.org/html/rfc2616#section-4.2
Node.js does this for every header *except* set-cookie - see https://github.com/nodejs/node/blob/d5e363b77ebaf1caf67cd7528224b651c86815c1/lib/_http_incoming.js#L128
React Native's fetch does this for *every* header, including set-cookie.
Based on: https://github.com/google/j2objc/commit/16820fdbc8f76ca0c33472810ce0cb03d20efe25
Credits to: https://github.com/tomball for original and https://github.com/chrusart for JavaScript implementation
*/
function splitCookiesString(cookiesString) {
if (Array.isArray(cookiesString)) {
return cookiesString;
}
if (typeof cookiesString !== "string") {
return [];
}
var cookiesStrings = [];
var pos = 0;
var start;
var ch;
var lastComma;
var nextStart;
var cookiesSeparatorFound;
function skipWhitespace() {
while (pos < cookiesString.length && /\s/.test(cookiesString.charAt(pos))) {
pos += 1;
}
return pos < cookiesString.length;
}
function notSpecialChar() {
ch = cookiesString.charAt(pos);
return ch !== "=" && ch !== ";" && ch !== ",";
}
while (pos < cookiesString.length) {
start = pos;
cookiesSeparatorFound = false;
while (skipWhitespace()) {
ch = cookiesString.charAt(pos);
if (ch === ",") {
// ',' is a cookie separator if we have later first '=', not ';' or ','
lastComma = pos;
pos += 1;
skipWhitespace();
nextStart = pos;
while (pos < cookiesString.length && notSpecialChar()) {
pos += 1;
}
// currently special character
if (pos < cookiesString.length && cookiesString.charAt(pos) === "=") {
// we found cookies separator
cookiesSeparatorFound = true;
// pos is inside the next cookie, so back up and return it.
pos = nextStart;
cookiesStrings.push(cookiesString.substring(start, lastComma));
start = pos;
} else {
// in param ',' or param separator ';',
// we continue from that comma
pos = lastComma + 1;
}
} else {
pos += 1;
}
}
if (!cookiesSeparatorFound || pos >= cookiesString.length) {
cookiesStrings.push(cookiesString.substring(start, cookiesString.length));
}
}
return cookiesStrings;
}
// named export for CJS
parseSetCookie.parseSetCookie = parseSetCookie;
// for backwards compatibility
parseSetCookie.parse = parseSetCookie;
parseSetCookie.parseString = parseString;
parseSetCookie.splitCookiesString = splitCookiesString;
// EXPORTS
// (this section is replaced by build-cjs.js)
// named export for ESM
export { parseSetCookie };
// for backwards compatibility
export default parseSetCookie;
export { parseSetCookie as parse, parseString, splitCookiesString };
+61
View File
@@ -0,0 +1,61 @@
{
"name": "set-cookie-parser",
"version": "3.1.0",
"description": "Parses set-cookie headers into objects",
"homepage": "https://github.com/nfriedly/set-cookie-parser",
"repository": "nfriedly/set-cookie-parser",
"author": {
"name": "Nathan Friedly",
"url": "http://nfriedly.com/"
},
"files": [
"lib",
"dist"
],
"main": "./dist/set-cookie.cjs",
"module": "./lib/set-cookie.js",
"types": "./lib/set-cookie.d.ts",
"type": "module",
"exports": {
".": {
"types": "./lib/set-cookie.d.ts",
"module-sync": "./lib/set-cookie.js",
"import": "./lib/set-cookie.js",
"require": "./dist/set-cookie.cjs"
}
},
"sideEffects": false,
"keywords": [
"set-cookie",
"set",
"cookie",
"cookies",
"header",
"parse",
"parser"
],
"devDependencies": {
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"husky": "^9.1.7",
"mocha": "^11.7.5",
"prettier": "^3.2.5",
"pretty-quick": "^4.0.0",
"sinon": "^21.0.3",
"tsd": "^0.33.0"
},
"scripts": {
"lint": "eslint . --ignore-pattern '!.eslintrc.js'",
"test": "npm run build && npm run lint && mocha && npm run typecheck",
"typecheck": "tsd",
"autofix": "npm run lint -- --fix",
"format": "npm run lint -- --fix",
"build": "node ./build-cjs.js",
"prepare": "husky"
},
"license": "MIT",
"prettier": {
"trailingComma": "es5"
}
}