diff --git a/global.d.ts b/global.d.ts index 73978e004..b35933e17 100644 --- a/global.d.ts +++ b/global.d.ts @@ -1,3 +1,7 @@ +declare module '@bundled-es-modules/cookie' { + export * as default from 'cookie' +} + declare module '@bundled-es-modules/statuses' { import * as statuses from 'statuses' export default statuses diff --git a/package.json b/package.json index 58163ff54..73dc51602 100644 --- a/package.json +++ b/package.json @@ -133,6 +133,7 @@ ], "sideEffects": false, "dependencies": { + "@bundled-es-modules/cookie": "^2.0.0", "@bundled-es-modules/statuses": "^1.0.1", "@bundled-es-modules/tough-cookie": "^0.1.6", "@inquirer/confirm": "^3.0.0", @@ -141,7 +142,6 @@ "@types/cookie": "^0.6.0", "@types/statuses": "^2.0.4", "chalk": "^4.1.2", - "cookie": "^1.0.0", "graphql": "^16.8.1", "headers-polyfill": "^4.0.2", "is-node-process": "^1.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d12ee352e..611143cee 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,6 +5,9 @@ settings: excludeLinksFromLockfile: false dependencies: + '@bundled-es-modules/cookie': + specifier: ^2.0.0 + version: 2.0.0 '@bundled-es-modules/statuses': specifier: ^1.0.1 version: 1.0.1 @@ -29,9 +32,6 @@ dependencies: chalk: specifier: ^4.1.2 version: 4.1.2 - cookie: - specifier: ^1.0.0 - version: 1.0.0 graphql: specifier: ^16.8.1 version: 16.9.0 @@ -420,6 +420,12 @@ packages: to-fast-properties: 2.0.0 dev: true + /@bundled-es-modules/cookie@2.0.0: + resolution: {integrity: sha512-Or6YHg/kamKHpxULAdSqhGqnWFneIXu1NKvvfBBzKGwpVsYuFIQ5aBPHDnnoR3ghW1nvSkALd+EF9iMtY7Vjxw==} + dependencies: + cookie: 0.5.0 + dev: false + /@bundled-es-modules/statuses@1.0.1: resolution: {integrity: sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==} dependencies: @@ -3491,16 +3497,16 @@ packages: engines: {node: '>= 0.6'} dev: true + /cookie@0.5.0: + resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} + engines: {node: '>= 0.6'} + dev: false + /cookie@0.6.0: resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} engines: {node: '>= 0.6'} dev: true - /cookie@1.0.0: - resolution: {integrity: sha512-bsSztFoaR8bw9MlFCrTHzc1wOKCUKOBsbgFdoDilZDkETAOOjKSqV7L+EQLbTaylwvZasd9vM4MGKotJaUfSpA==} - engines: {node: '>=18'} - dev: false - /cookies@0.9.1: resolution: {integrity: sha512-TG2hpqe4ELx54QER/S3HQ9SRVnQnGBtKUz5bLQWtYAQ+o6GpgMs6sYUvaiJjVxb+UXwhRhAEP3m7LbsIZ77Hmw==} engines: {node: '>= 0.8'} diff --git a/src/core/utils/request/getRequestCookies.ts b/src/core/utils/request/getRequestCookies.ts index 78356d36e..5cbe4bd7d 100644 --- a/src/core/utils/request/getRequestCookies.ts +++ b/src/core/utils/request/getRequestCookies.ts @@ -1,4 +1,4 @@ -import * as cookieUtils from 'cookie' +import cookieUtils from '@bundled-es-modules/cookie' import { cookieStore } from '../cookieStore' function parseCookies(input: string): Record { diff --git a/test/browser/graphql-api/cookies.test.ts b/test/browser/graphql-api/cookies.test.ts index c451f8dcc..fdc988853 100644 --- a/test/browser/graphql-api/cookies.test.ts +++ b/test/browser/graphql-api/cookies.test.ts @@ -1,4 +1,4 @@ -import * as cookieUtils from 'cookie' +import cookieUtils from '@bundled-es-modules/cookie' import { test, expect } from '../playwright.extend' import { gql } from '../../support/graphql' diff --git a/test/node/graphql-api/cookies.node.test.ts b/test/node/graphql-api/cookies.node.test.ts index 4cab39b82..7d6bd77b4 100644 --- a/test/node/graphql-api/cookies.node.test.ts +++ b/test/node/graphql-api/cookies.node.test.ts @@ -1,5 +1,5 @@ // @vitest-environment node -import * as cookieUtils from 'cookie' +import cookieUtils from '@bundled-es-modules/cookie' import { graphql as executeGraphql, buildSchema } from 'graphql' import { graphql, HttpResponse } from 'msw' import { setupServer } from 'msw/node'