From 23f55e08b5b410605724b44d876b24325c51f5f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Thu, 7 Sep 2023 15:38:49 +0200 Subject: [PATCH] chore: migrate to `getSetCookie` (#586) --- .changeset/tricky-badgers-flow.md | 8 ++ packages/cookies/src/index.ts | 7 +- packages/cookies/src/response-cookies.ts | 15 +- packages/cookies/src/serialize.ts | 79 ----------- packages/cookies/test/index.test.ts | 11 +- packages/cookies/test/serialize.test.ts | 11 -- .../integration-tests/tests/response.test.ts | 6 +- packages/node-utils/package.json | 3 - .../node-utils/src/edge-to-node/handler.ts | 11 +- .../node-utils/src/edge-to-node/headers.ts | 19 +-- .../test/edge-to-node/headers.test.ts | 22 +-- packages/primitives/src/primitives/fetch.js | 65 --------- .../primitives/type-definitions/fetch.d.ts | 6 +- packages/runtime/src/server/create-handler.ts | 15 +- pnpm-lock.yaml | 130 ++++++++++-------- 15 files changed, 109 insertions(+), 299 deletions(-) create mode 100644 .changeset/tricky-badgers-flow.md delete mode 100644 packages/cookies/test/serialize.test.ts diff --git a/.changeset/tricky-badgers-flow.md b/.changeset/tricky-badgers-flow.md new file mode 100644 index 00000000..7d5b83c9 --- /dev/null +++ b/.changeset/tricky-badgers-flow.md @@ -0,0 +1,8 @@ +--- +'@edge-runtime/cookies': major +'@edge-runtime/node-utils': patch +'@edge-runtime/primitives': major +'edge-runtime': patch +--- + +Simplify `set-cookie` handling diff --git a/packages/cookies/src/index.ts b/packages/cookies/src/index.ts index 57ae5867..58b4c784 100644 --- a/packages/cookies/src/index.ts +++ b/packages/cookies/src/index.ts @@ -1,9 +1,4 @@ export type { CookieListItem, RequestCookie, ResponseCookie } from './types' export { RequestCookies } from './request-cookies' export { ResponseCookies } from './response-cookies' -export { - stringifyCookie, - parseCookie, - parseSetCookie, - splitCookiesString, -} from './serialize' +export { stringifyCookie, parseCookie, parseSetCookie } from './serialize' diff --git a/packages/cookies/src/response-cookies.ts b/packages/cookies/src/response-cookies.ts index 5504c9b9..ef5f664d 100644 --- a/packages/cookies/src/response-cookies.ts +++ b/packages/cookies/src/response-cookies.ts @@ -1,9 +1,5 @@ import type { ResponseCookie } from './types' -import { - splitCookiesString, - parseSetCookie, - stringifyCookie, -} from './serialize' +import { parseSetCookie, stringifyCookie } from './serialize' /** * A class for manipulating {@link Response} cookies (`Set-Cookie` header). @@ -19,14 +15,7 @@ export class ResponseCookies { constructor(responseHeaders: Headers) { this._headers = responseHeaders - const setCookie = responseHeaders.getSetCookie?.() - responseHeaders.get('set-cookie') ?? [] - - const cookieStrings = Array.isArray(setCookie) - ? setCookie - : // TODO: remove splitCookiesString when `getSetCookie` adoption is high enough in Node.js - // https://developer.mozilla.org/en-US/docs/Web/API/Headers/getSetCookie#browser_compatibility - splitCookiesString(setCookie) + const cookieStrings = responseHeaders.getSetCookie() for (const cookieString of cookieStrings) { const parsed = parseSetCookie(cookieString) diff --git a/packages/cookies/src/serialize.ts b/packages/cookies/src/serialize.ts index 6f41321c..db68696c 100644 --- a/packages/cookies/src/serialize.ts +++ b/packages/cookies/src/serialize.ts @@ -91,82 +91,3 @@ function parseSameSite(string: string): ResponseCookie['sameSite'] { ? (string as ResponseCookie['sameSite']) : undefined } - -/** - * @source https://github.com/nfriedly/set-cookie-parser/blob/master/lib/set-cookie.js - * - * 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 - */ -export function splitCookiesString(cookiesString: string) { - if (!cookiesString) 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 -} diff --git a/packages/cookies/test/index.test.ts b/packages/cookies/test/index.test.ts index 8b71f851..c8d3651f 100644 --- a/packages/cookies/test/index.test.ts +++ b/packages/cookies/test/index.test.ts @@ -1,9 +1,4 @@ -import { - stringifyCookie, - parseCookie, - parseSetCookie, - splitCookiesString, -} from '../src' +import { stringifyCookie, parseCookie, parseSetCookie } from '../src' test('.stringifyCookie is exported', async () => { expect(typeof stringifyCookie).toBe('function') @@ -16,7 +11,3 @@ test('.parseCookie is exported', async () => { test('.parseSetCookie is exported', async () => { expect(typeof parseSetCookie).toBe('function') }) - -test('.splitCookiesString is exported', async () => { - expect(typeof splitCookiesString).toBe('function') -}) diff --git a/packages/cookies/test/serialize.test.ts b/packages/cookies/test/serialize.test.ts deleted file mode 100644 index 2a3901a8..00000000 --- a/packages/cookies/test/serialize.test.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { splitCookiesString } from '../src/serialize' - -test('.splitCookiesString', async () => { - const cookieString = - 'cookie1=value1, cookie2=value2; Max-Age=1000, cookie3=value3; Domain=; Secure' - expect(splitCookiesString(cookieString)).toEqual([ - 'cookie1=value1', - 'cookie2=value2; Max-Age=1000', - 'cookie3=value3; Domain=; Secure', - ]) -}) diff --git a/packages/integration-tests/tests/response.test.ts b/packages/integration-tests/tests/response.test.ts index 1ec29f38..125d13b1 100644 --- a/packages/integration-tests/tests/response.test.ts +++ b/packages/integration-tests/tests/response.test.ts @@ -10,10 +10,8 @@ test('allow to append multiple `set-cookie` header', async () => { const response = new Response(null) response.headers.append('set-cookie', 'foo=bar') response.headers.append('set-cookie', 'bar=baz') - expect(response.headers.getAll?.('set-cookie')).toEqual([ - 'foo=bar', - 'bar=baz', - ]) + + expect(response.headers.getSetCookie()).toEqual(['foo=bar', 'bar=baz']) }) test('disallow mutate response headers for redirects', async () => { diff --git a/packages/node-utils/package.json b/packages/node-utils/package.json index f06b958d..6b99a2c2 100644 --- a/packages/node-utils/package.json +++ b/packages/node-utils/package.json @@ -23,9 +23,6 @@ "utils", "web" ], - "dependencies": { - "@edge-runtime/cookies": "workspace:*" - }, "devDependencies": { "@edge-runtime/primitives": "workspace:*", "@types/test-listen": "1.1.0", diff --git a/packages/node-utils/src/edge-to-node/handler.ts b/packages/node-utils/src/edge-to-node/handler.ts index 87ebfa97..b4469ece 100644 --- a/packages/node-utils/src/edge-to-node/handler.ts +++ b/packages/node-utils/src/edge-to-node/handler.ts @@ -12,20 +12,20 @@ import { toToReadable } from './stream' export function buildToNodeHandler( dependencies: BuildDependencies, - options: RequestOptions + options: RequestOptions, ) { const toRequest = buildToRequest(dependencies) const toFetchEvent = buildToFetchEvent(dependencies) return function toNodeHandler(webHandler: WebHandler): NodeHandler { return ( incomingMessage: IncomingMessage, - serverResponse: ServerResponse + serverResponse: ServerResponse, ) => { const request = toRequest(incomingMessage, options) const maybePromise = webHandler(request, toFetchEvent(request)) if (maybePromise instanceof Promise) { maybePromise.then((response) => - toServerResponse(response, serverResponse) + toServerResponse(response, serverResponse), ) } else { toServerResponse(maybePromise, serverResponse) @@ -36,16 +36,15 @@ export function buildToNodeHandler( function toServerResponse( webResponse: Response | null | undefined, - serverResponse: ServerResponse + serverResponse: ServerResponse, ) { if (!webResponse) { serverResponse.end() return } mergeIntoServerResponse( - // @ts-ignore getAll() is not standard https://fetch.spec.whatwg.org/#headers-class toOutgoingHeaders(webResponse.headers), - serverResponse + serverResponse, ) serverResponse.statusCode = webResponse.status diff --git a/packages/node-utils/src/edge-to-node/headers.ts b/packages/node-utils/src/edge-to-node/headers.ts index 3bab762d..4c1c9075 100644 --- a/packages/node-utils/src/edge-to-node/headers.ts +++ b/packages/node-utils/src/edge-to-node/headers.ts @@ -1,20 +1,13 @@ -import type { Headers } from '@edge-runtime/primitives' +import { Headers } from '@edge-runtime/primitives' import type { OutgoingHttpHeaders, ServerResponse } from 'node:http' -import { splitCookiesString } from '@edge-runtime/cookies' -export function toOutgoingHeaders( - headers?: Headers & { raw?: () => Record }, -): OutgoingHttpHeaders { +export function toOutgoingHeaders(headers?: Headers): OutgoingHttpHeaders { const outputHeaders: OutgoingHttpHeaders = {} if (headers) { - for (const [name, value] of typeof headers.raw !== 'undefined' - ? Object.entries(headers.raw()) - : headers.entries()) { - outputHeaders[name] = value - if (name.toLowerCase() === 'set-cookie') { - outputHeaders[name] = - headers.getAll?.('set-cookie') ?? splitCookiesString(value) - } + const _headers = new Headers(headers).entries() + for (const [name, value] of _headers) { + outputHeaders[name] = + name === 'set-cookie' ? headers.getSetCookie() : value } } return outputHeaders diff --git a/packages/node-utils/test/edge-to-node/headers.test.ts b/packages/node-utils/test/edge-to-node/headers.test.ts index 04fc04cd..1ab2d855 100644 --- a/packages/node-utils/test/edge-to-node/headers.test.ts +++ b/packages/node-utils/test/edge-to-node/headers.test.ts @@ -7,15 +7,15 @@ it('handles simple header values', () => { new Headers({ 'Content-Type': 'image/jpeg', 'X-My-Custom-Header': 'Zeke are cool', - }) - ) + }), + ), ).toEqual({ 'content-type': 'image/jpeg', 'x-my-custom-header': 'Zeke are cool', }) }) -it('splits set-cookie with getAll()', () => { +it('splits set-cookie with getSetCookie()', () => { const headers = new Headers({ 'set-cookie': 'value1' }) headers.append('set-cookie', 'value2') headers.append('set-cookie', 'value3') @@ -24,22 +24,6 @@ it('splits set-cookie with getAll()', () => { }) }) -it('slits set-cookie without getAll()', () => { - const rawHeaders = { - raw: () => ({ - 'set-cookie': - 'cookie1=value1, cookie2=value2; Max-Age=1000, cookie3=value3; Domain=; Secure', - }), - } - expect(toOutgoingHeaders(rawHeaders as unknown as Headers)).toEqual({ - 'set-cookie': [ - 'cookie1=value1', - 'cookie2=value2; Max-Age=1000', - 'cookie3=value3; Domain=; Secure', - ], - }) -}) - it('handles multiple values as single string', () => { const headers = new Headers({ 'x-multiple': 'value1' }) headers.append('x-multiple', 'value2') diff --git a/packages/primitives/src/primitives/fetch.js b/packages/primitives/src/primitives/fetch.js index 6ea3227d..11a3de70 100644 --- a/packages/primitives/src/primitives/fetch.js +++ b/packages/primitives/src/primitives/fetch.js @@ -1,8 +1,6 @@ import * as FetchSymbols from 'undici/lib/fetch/symbols' import * as HeadersModule from 'undici/lib/fetch/headers' import * as ResponseModule from 'undici/lib/fetch/response' -import * as UtilModule from 'undici/lib/fetch/util' -import * as WebIDLModule from 'undici/lib/fetch/webidl' import { Request as BaseRequest } from 'undici/lib/fetch/request' import { fetch as fetchImpl } from 'undici/lib/fetch' @@ -45,20 +43,6 @@ HeadersModule.Headers.prototype.values = function* () { } } -/** - * Add a new method for retrieving all independent `set-cookie` headers that - * maybe have been appended. This will only work when getting `set-cookie` - * headers. - */ -HeadersModule.Headers.prototype.getAll = function (name) { - const _name = normalizeAndValidateHeaderName(name, 'Headers.getAll') - if (_name !== 'set-cookie') { - throw new Error(`getAll can only be used with 'set-cookie'`) - } - - return this.getSetCookie() -} - /** * We also must patch the error static method since it works just like * redirect and we need consistency. @@ -70,55 +54,6 @@ ResponseModule.Response.error = function (...args) { return response } -/** - * normalize header name per WHATWG spec, and validate - * - * @param {string} potentialName - * @param {'Header.append' | 'Headers.delete' | 'Headers.get' | 'Headers.has' | 'Header.set'} errorPrefix - */ -function normalizeAndValidateHeaderName(potentialName, errorPrefix) { - const normalizedName = potentialName.toLowerCase() - - if (UtilModule.isValidHeaderName(normalizedName)) { - return normalizedName - } - - // Generate an WHATWG fetch spec compliant error - WebIDLModule.errors.invalidArgument({ - prefix: errorPrefix, - value: normalizedName, - type: 'header name', - }) -} - -/** - * normalize header value per WHATWG spec, and validate - * - * @param {string} potentialValue - * @param {'Header.append' | 'Header.set'} errorPrefix - */ -function normalizeAndValidateHeaderValue(potentialValue, errorPrefix) { - /** - * To normalize a byte sequence potentialValue, remove - * any leading and trailing HTTP whitespace bytes from - * potentialValue. - * - * See https://fetch.spec.whatwg.org/#concept-header-value-normalize - */ - const normalizedValue = potentialValue.replace(/^[\r\n\t ]+|[\r\n\t ]+$/g, '') - - if (UtilModule.isValidHeaderValue(normalizedValue)) { - return normalizedValue - } - - // Generate an WHATWG fetch spec compliant error - WebIDLModule.errors.invalidArgument({ - prefix: errorPrefix, - value: normalizedValue, - type: 'header value', - }) -} - /** * A global agent to be used with every fetch request. We also define a * couple of globals that we can hide in the runtime for advanced use. diff --git a/packages/primitives/type-definitions/fetch.d.ts b/packages/primitives/type-definitions/fetch.d.ts index ec24e094..fa9ae212 100644 --- a/packages/primitives/type-definitions/fetch.d.ts +++ b/packages/primitives/type-definitions/fetch.d.ts @@ -1,6 +1,4 @@ -export class Headers extends globalThis.Headers { - getAll?(key: 'set-cookie'): string[] -} +export class Headers extends globalThis.Headers {} export class Request extends globalThis.Request { readonly headers: Headers @@ -16,7 +14,7 @@ export type RequestInfo = string | Request | globalThis.Request export type RequestInit = globalThis.RequestInit declare const fetchImplementation: ( info: RequestInfo, - init?: RequestInit + init?: RequestInit, ) => Promise declare const FileConstructor: typeof File diff --git a/packages/runtime/src/server/create-handler.ts b/packages/runtime/src/server/create-handler.ts index 8f7babf2..5cff7636 100644 --- a/packages/runtime/src/server/create-handler.ts +++ b/packages/runtime/src/server/create-handler.ts @@ -39,7 +39,7 @@ export function createHandler(options: Options) { ? getClonableBodyStream( req, options.runtime.evaluate('Uint8Array'), - options.runtime.context.TransformStream + options.runtime.context.TransformStream, ) : undefined @@ -49,7 +49,7 @@ export function createHandler(options: Options) { headers: toRequestInitHeaders(req), method: req.method, body: body?.cloneBodyStream(), - } + }, ) const waitUntil = response.waitUntil() @@ -60,7 +60,7 @@ export function createHandler(options: Options) { res.statusMessage = response.statusText for (const [key, value] of Object.entries( - toNodeHeaders(response.headers) + toNodeHeaders(response.headers), )) { if (value !== undefined) { res.setHeader(key, value) @@ -112,18 +112,13 @@ function toRequestInitHeaders(req: IncomingMessage): RequestInit['headers'] { /** * Transforms WHATWG Headers into a Node Headers shape. Copies all items but - * does a special case for Set-Cookie using the hidden method getAll which - * allows to get all cookies instead of a folded value. + * does a special case for Set-Cookie using the [`getSetCookie`](https://developer.mozilla.org/en-US/docs/Web/API/Headers/getSetCookie) method. */ function toNodeHeaders(headers?: Headers): NodeHeaders { const result: NodeHeaders = {} if (headers) { for (const [key, value] of headers.entries()) { - result[key] = - key.toLowerCase() === 'set-cookie' - ? // @ts-ignore getAll is hidden in Headers but exists. - headers.getAll('set-cookie') - : value + result[key] = key === 'set-cookie' ? headers.getSetCookie() : value } } return result diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8f87d302..168eb1e8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,13 +6,13 @@ importers: devDependencies: '@changesets/cli': specifier: latest - version: 2.26.2 + version: 2.26.0 '@jest/types': specifier: 29.5.0 version: 29.5.0 '@svitejs/changesets-changelog-github-compact': specifier: latest - version: 1.1.0 + version: 0.1.1 '@types/jest': specifier: 29.5.4 version: 29.5.4 @@ -21,16 +21,16 @@ importers: version: 16.18.40 c8: specifier: latest - version: 8.0.1 + version: 7.13.0 esbuild: specifier: 0.19.2 version: 0.19.2 finepack: specifier: latest - version: 2.11.2 + version: 2.10.15 git-authors-cli: specifier: latest - version: 1.0.46 + version: 1.0.44 jest: specifier: 29.6.4 version: 29.6.4(@types/node@16.18.40)(ts-node@10.9.1) @@ -45,7 +45,7 @@ importers: version: 3.0.3 simple-git-hooks: specifier: latest - version: 2.9.0 + version: 2.8.0 ts-jest: specifier: 29.1.1 version: 29.1.1(@babel/core@7.20.12)(@jest/types@29.5.0)(esbuild@0.19.2)(jest@29.6.4)(typescript@5.2.2) @@ -167,10 +167,6 @@ importers: version: link:../jest-environment packages/node-utils: - dependencies: - '@edge-runtime/cookies': - specifier: workspace:* - version: link:../cookies devDependencies: '@edge-runtime/primitives': specifier: workspace:* @@ -648,11 +644,11 @@ packages: resolution: {integrity: sha512-Tbsj02wXCbqGmzdnXNk0SOF19ChhRU70BsroIi4Pm6Ehp56in6vch94mfbdQ17DozxkL3BAVjbZ4Qc1a0HFRAg==} dev: false - /@changesets/apply-release-plan@6.1.4: - resolution: {integrity: sha512-FMpKF1fRlJyCZVYHr3CbinpZZ+6MwvOtWUuO8uo+svcATEoc1zRDcj23pAurJ2TZ/uVz1wFHH6K3NlACy0PLew==} + /@changesets/apply-release-plan@6.1.3: + resolution: {integrity: sha512-ECDNeoc3nfeAe1jqJb5aFQX7CqzQhD2klXRez2JDb/aVpGUbX673HgKrnrgJRuQR/9f2TtLoYIzrGB9qwD77mg==} dependencies: '@babel/runtime': 7.22.3 - '@changesets/config': 2.3.1 + '@changesets/config': 2.3.0 '@changesets/get-version-range-type': 0.3.2 '@changesets/git': 2.0.0 '@changesets/types': 5.2.1 @@ -663,18 +659,18 @@ packages: outdent: 0.5.0 prettier: 2.8.8 resolve-from: 5.0.0 - semver: 7.5.4 + semver: 5.7.1 dev: true - /@changesets/assemble-release-plan@5.2.4: - resolution: {integrity: sha512-xJkWX+1/CUaOUWTguXEbCDTyWJFECEhmdtbkjhn5GVBGxdP/JwaHBIU9sW3FR6gD07UwZ7ovpiPclQZs+j+mvg==} + /@changesets/assemble-release-plan@5.2.3: + resolution: {integrity: sha512-g7EVZCmnWz3zMBAdrcKhid4hkHT+Ft1n0mLussFMcB1dE2zCuwcvGoy9ec3yOgPGF4hoMtgHaMIk3T3TBdvU9g==} dependencies: '@babel/runtime': 7.22.3 '@changesets/errors': 0.1.4 - '@changesets/get-dependents-graph': 1.3.6 + '@changesets/get-dependents-graph': 1.3.5 '@changesets/types': 5.2.1 '@manypkg/get-packages': 1.1.3 - semver: 7.5.4 + semver: 5.7.1 dev: true /@changesets/changelog-git@0.1.14: @@ -683,18 +679,18 @@ packages: '@changesets/types': 5.2.1 dev: true - /@changesets/cli@2.26.2: - resolution: {integrity: sha512-dnWrJTmRR8bCHikJHl9b9HW3gXACCehz4OasrXpMp7sx97ECuBGGNjJhjPhdZNCvMy9mn4BWdplI323IbqsRig==} + /@changesets/cli@2.26.0: + resolution: {integrity: sha512-0cbTiDms+ICTVtEwAFLNW0jBNex9f5+fFv3I771nBvdnV/mOjd1QJ4+f8KtVSOrwD9SJkk9xbDkWFb0oXd8d1Q==} hasBin: true dependencies: '@babel/runtime': 7.22.3 - '@changesets/apply-release-plan': 6.1.4 - '@changesets/assemble-release-plan': 5.2.4 + '@changesets/apply-release-plan': 6.1.3 + '@changesets/assemble-release-plan': 5.2.3 '@changesets/changelog-git': 0.1.14 - '@changesets/config': 2.3.1 + '@changesets/config': 2.3.0 '@changesets/errors': 0.1.4 - '@changesets/get-dependents-graph': 1.3.6 - '@changesets/get-release-plan': 3.0.17 + '@changesets/get-dependents-graph': 1.3.5 + '@changesets/get-release-plan': 3.0.16 '@changesets/git': 2.0.0 '@changesets/logger': 0.0.5 '@changesets/pre': 1.0.14 @@ -703,7 +699,7 @@ packages: '@changesets/write': 0.2.3 '@manypkg/get-packages': 1.1.3 '@types/is-ci': 3.0.0 - '@types/semver': 7.5.1 + '@types/semver': 6.2.3 ansi-colors: 4.1.3 chalk: 2.4.2 enquirer: 2.3.6 @@ -716,17 +712,17 @@ packages: p-limit: 2.3.0 preferred-pm: 3.0.3 resolve-from: 5.0.0 - semver: 7.5.4 + semver: 5.7.1 spawndamnit: 2.0.0 term-size: 2.2.1 tty-table: 4.1.6 dev: true - /@changesets/config@2.3.1: - resolution: {integrity: sha512-PQXaJl82CfIXddUOppj4zWu+987GCw2M+eQcOepxN5s+kvnsZOwjEJO3DH9eVy+OP6Pg/KFEWdsECFEYTtbg6w==} + /@changesets/config@2.3.0: + resolution: {integrity: sha512-EgP/px6mhCx8QeaMAvWtRrgyxW08k/Bx2tpGT+M84jEdX37v3VKfh4Cz1BkwrYKuMV2HZKeHOh8sHvja/HcXfQ==} dependencies: '@changesets/errors': 0.1.4 - '@changesets/get-dependents-graph': 1.3.6 + '@changesets/get-dependents-graph': 1.3.5 '@changesets/logger': 0.0.5 '@changesets/types': 5.2.1 '@manypkg/get-packages': 1.1.3 @@ -740,18 +736,18 @@ packages: extendable-error: 0.1.7 dev: true - /@changesets/get-dependents-graph@1.3.6: - resolution: {integrity: sha512-Q/sLgBANmkvUm09GgRsAvEtY3p1/5OCzgBE5vX3vgb5CvW0j7CEljocx5oPXeQSNph6FXulJlXV3Re/v3K3P3Q==} + /@changesets/get-dependents-graph@1.3.5: + resolution: {integrity: sha512-w1eEvnWlbVDIY8mWXqWuYE9oKhvIaBhzqzo4ITSJY9hgoqQ3RoBqwlcAzg11qHxv/b8ReDWnMrpjpKrW6m1ZTA==} dependencies: '@changesets/types': 5.2.1 '@manypkg/get-packages': 1.1.3 chalk: 2.4.2 fs-extra: 7.0.1 - semver: 7.5.4 + semver: 5.7.1 dev: true - /@changesets/get-github-info@0.5.2: - resolution: {integrity: sha512-JppheLu7S114aEs157fOZDjFqUDpm7eHdq5E8SSR0gUBTEK0cNSHsrSR5a66xs0z3RWuo46QvA3vawp8BxDHvg==} + /@changesets/get-github-info@0.5.1: + resolution: {integrity: sha512-w2yl3AuG+hFuEEmT6j1zDlg7GQLM/J2UxTmk0uJBMdRqHni4zXGe/vUlPfLom5KfX3cRfHc0hzGvloDPjWFNZw==} dependencies: dataloader: 1.4.0 node-fetch: 2.7.0 @@ -759,12 +755,12 @@ packages: - encoding dev: true - /@changesets/get-release-plan@3.0.17: - resolution: {integrity: sha512-6IwKTubNEgoOZwDontYc2x2cWXfr6IKxP3IhKeK+WjyD6y3M4Gl/jdQvBw+m/5zWILSOCAaGLu2ZF6Q+WiPniw==} + /@changesets/get-release-plan@3.0.16: + resolution: {integrity: sha512-OpP9QILpBp1bY2YNIKFzwigKh7Qe9KizRsZomzLe6pK8IUo8onkAAVUD8+JRKSr8R7d4+JRuQrfSSNlEwKyPYg==} dependencies: '@babel/runtime': 7.22.3 - '@changesets/assemble-release-plan': 5.2.4 - '@changesets/config': 2.3.1 + '@changesets/assemble-release-plan': 5.2.3 + '@changesets/config': 2.3.0 '@changesets/pre': 1.0.14 '@changesets/read': 0.5.9 '@changesets/types': 5.2.1 @@ -1881,11 +1877,11 @@ packages: dependencies: '@sinonjs/commons': 2.0.0 - /@svitejs/changesets-changelog-github-compact@1.1.0: - resolution: {integrity: sha512-qhUGGDHcpbY2zpjW3SwqchuW8J/5EzlPFud7xNntHKA7f3a/mx5+g+ruJKFHSAiVZYo30PALt+AyhmPUNKH/Og==} - engines: {node: ^14.13.1 || ^16.0.0 || >=18} + /@svitejs/changesets-changelog-github-compact@0.1.1: + resolution: {integrity: sha512-eBi211CfmKtkxB6tINicaDPBMbolswPbaAy7kCx+uUFL/LxztLm9cB+7jP54TgCrv+mMz8vSJWIs/baH63PjsA==} + engines: {node: ^12.20 || ^14.13.1 || >= 16} dependencies: - '@changesets/get-github-info': 0.5.2 + '@changesets/get-github-info': 0.5.1 dotenv: 16.0.3 transitivePeerDependencies: - encoding @@ -2170,8 +2166,8 @@ packages: resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==} dev: false - /@types/semver@7.5.1: - resolution: {integrity: sha512-cJRQXpObxfNKkFAZbJl2yjWtJCqELQIdShsogr1d2MilP8dKD9TE/nEKHkJgUNHdGKCQaf9HbIynuV2csLGVLg==} + /@types/semver@6.2.3: + resolution: {integrity: sha512-KQf+QAMWKMrtBMsB8/24w53tEsxllMj6TuA80TT/5igJalLI/zm0L3oXRbIAl4Ohfc85gyHX/jhMwsVkmhLU4A==} dev: true /@types/serve-static@1.15.1: @@ -2620,9 +2616,9 @@ packages: dependencies: streamsearch: 1.1.0 - /c8@8.0.1: - resolution: {integrity: sha512-EINpopxZNH1mETuI0DzRA4MZpAUH+IFiRhnmFD3vFr3vdrgxqi3VfE3KL0AIL+zDq8rC9bZqwM/VDmmoe04y7w==} - engines: {node: '>=12'} + /c8@7.13.0: + resolution: {integrity: sha512-/NL4hQTv1gBL6J6ei80zu3IiTrmePDKXKXOTLpHvcIWZTVYQlDhVWjjWvkhICylE8EwwnMVzDZugCvdx0/DIIA==} + engines: {node: '>=10.12.0'} hasBin: true dependencies: '@bcoe/v8-coverage': 0.2.3 @@ -2635,8 +2631,8 @@ packages: rimraf: 3.0.2 test-exclude: 6.0.0 v8-to-istanbul: 9.1.0 - yargs: 17.7.2 - yargs-parser: 21.1.1 + yargs: 16.2.0 + yargs-parser: 20.2.9 dev: true /cac@6.7.14: @@ -2863,6 +2859,14 @@ packages: wrap-ansi: 6.2.0 dev: true + /cliui@7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + dev: true + /cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -3914,8 +3918,8 @@ packages: pkg-dir: 4.2.0 dev: true - /finepack@2.11.2: - resolution: {integrity: sha512-5oEOcNW9zUrGU2mUnZUDvsoOTlFsOh/drssR+r21bTTgrkz2DO/zq46SCEVaoMj9GFUbVlVgqr9P9vQ3vibRpA==} + /finepack@2.10.15: + resolution: {integrity: sha512-adX1h0YEF0hZKT6MZDZm0FnO26YUffxR/ioi6IVg6yckvWugOTsNPr5pw9spABoOFggP2Qb4qbi6ZHZBOZ6Rjg==} engines: {node: '>=4'} hasBin: true dependencies: @@ -4089,8 +4093,8 @@ packages: get-intrinsic: 1.2.0 dev: true - /git-authors-cli@1.0.46: - resolution: {integrity: sha512-aRByRbF2GjHzlc58AQDFzg5kvZoTyzUAmDRyAfU7jkR/R4hUP/hlxq4mfh+m9cXFSqSv6LUl5HJmJY97+d6AFg==} + /git-authors-cli@1.0.44: + resolution: {integrity: sha512-OD1mYIfWqxmL20IocGihWLYHNe5VsFWQT0SFGKZQM4/msXcnHQ9EX8qUeCc4WYNu/f50VMeMVxaOTwCohMKJhA==} engines: {node: '>= 8'} hasBin: true dependencies: @@ -4100,6 +4104,7 @@ packages: json-future: 2.2.18 mri: 1.2.0 picocolors: 1.0.0 + update-notifier: 5.1.0 dev: true /git-up@7.0.0: @@ -7718,8 +7723,8 @@ packages: engines: {node: '>=14'} dev: false - /simple-git-hooks@2.9.0: - resolution: {integrity: sha512-waSQ5paUQtyGC0ZxlHmcMmD9I1rRXauikBwX31bX58l5vTOhCEcBC5Bi+ZDkPXTjDnZAF8TbCqKBY+9+sVPScw==} + /simple-git-hooks@2.8.0: + resolution: {integrity: sha512-ocmZQORwa6x9mxg+gVIAp5o4wXiWOHGXyrDBA0+UxGKIEKOyFtL4LWNKkP/2ornQPdlnlDGDteVeYP5FjhIoWA==} hasBin: true requiresBuild: true dev: true @@ -9051,6 +9056,19 @@ packages: yargs-parser: 18.1.3 dev: true + /yargs@16.2.0: + resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} + engines: {node: '>=10'} + dependencies: + cliui: 7.0.4 + escalade: 3.1.1 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 20.2.9 + dev: true + /yargs@17.7.2: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'}