From 41d8c0895e5ca7bf12da86a8a94b974e19b93d5d Mon Sep 17 00:00:00 2001 From: Artem Zakharchenko Date: Thu, 15 Sep 2022 13:58:42 +0200 Subject: [PATCH] fix: update "headers-polyfill" and "@mswjs/interceptors" to fix "/lib" issue (#1407) --- package.json | 4 ++-- src/handlers/GraphQLHandler.test.ts | 2 +- src/utils/request/MockedRequest.test.ts | 2 +- src/utils/request/MockedRequest.ts | 2 +- yarn.lock | 19 ++++++++++--------- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index ec17393e1..d3497b0c4 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "sideEffects": false, "dependencies": { "@mswjs/cookies": "^0.2.2", - "@mswjs/interceptors": "^0.17.2", + "@mswjs/interceptors": "^0.17.5", "@open-draft/until": "^1.0.3", "@types/cookie": "^0.4.1", "@types/js-levenshtein": "^1.1.1", @@ -93,7 +93,7 @@ "chokidar": "^3.4.2", "cookie": "^0.4.2", "graphql": "^15.0.0 || ^16.0.0", - "headers-polyfill": "^3.0.4", + "headers-polyfill": "^3.1.0", "inquirer": "^8.2.0", "is-node-process": "^1.0.1", "js-levenshtein": "^1.1.6", diff --git a/src/handlers/GraphQLHandler.test.ts b/src/handlers/GraphQLHandler.test.ts index 630e2cea4..6a60e51f8 100644 --- a/src/handlers/GraphQLHandler.test.ts +++ b/src/handlers/GraphQLHandler.test.ts @@ -3,7 +3,7 @@ */ import { encodeBuffer } from '@mswjs/interceptors' import { OperationTypeNode, parse } from 'graphql' -import { Headers } from 'headers-polyfill/lib' +import { Headers } from 'headers-polyfill' import { context, MockedRequest, MockedRequestInit } from '..' import { response } from '../response' import { diff --git a/src/utils/request/MockedRequest.test.ts b/src/utils/request/MockedRequest.test.ts index 56a316169..1565a77f2 100644 --- a/src/utils/request/MockedRequest.test.ts +++ b/src/utils/request/MockedRequest.test.ts @@ -1,4 +1,4 @@ -import { Headers } from 'headers-polyfill/lib' +import { Headers } from 'headers-polyfill' import { clearCookies } from '../../../test/support/utils' import { MockedRequest } from './MockedRequest' diff --git a/src/utils/request/MockedRequest.ts b/src/utils/request/MockedRequest.ts index 9677170cc..8d7d258d4 100644 --- a/src/utils/request/MockedRequest.ts +++ b/src/utils/request/MockedRequest.ts @@ -2,7 +2,7 @@ import * as cookieUtils from 'cookie' import { store } from '@mswjs/cookies' import { IsomorphicRequest, RequestInit } from '@mswjs/interceptors' import { decodeBuffer } from '@mswjs/interceptors/lib/utils/bufferUtils' -import { Headers } from 'headers-polyfill/lib' +import { Headers } from 'headers-polyfill' import { DefaultBodyType } from '../../handlers/RequestHandler' import { MockedResponse } from '../../response' import { getRequestCookies } from './getRequestCookies' diff --git a/yarn.lock b/yarn.lock index 456464d10..675d56543 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1722,15 +1722,16 @@ "@types/set-cookie-parser" "^2.4.0" set-cookie-parser "^2.4.6" -"@mswjs/interceptors@^0.17.2": - version "0.17.2" - resolved "https://registry.yarnpkg.com/@mswjs/interceptors/-/interceptors-0.17.2.tgz#a1d1cd8ef98b944c91d9fe202f27a68ec3673b88" - integrity sha512-DbfVSteMnBbxTmtldNO2PRmEXl+f5ehxN6cxbbhp22xcQx4wldbpW6xk3zlxS0gTbyBe0hvdIR7CCUnm2OIDRw== +"@mswjs/interceptors@^0.17.5": + version "0.17.5" + resolved "https://registry.yarnpkg.com/@mswjs/interceptors/-/interceptors-0.17.5.tgz#38a7502e5bf8b579901adece32693b1620ea7172" + integrity sha512-/uZkyPUZMRExZs+DZQVnc+uoDwLfs1gFNvcRY5S3Gu78U+uhovaSEUW3tuyld1e7Oke5Qphfseb8v66V+H1zWQ== dependencies: "@open-draft/until" "^1.0.3" + "@types/debug" "^4.1.7" "@xmldom/xmldom" "^0.7.5" debug "^4.3.3" - headers-polyfill "^3.0.4" + headers-polyfill "^3.1.0" outvariant "^1.2.1" strict-event-emitter "^0.2.4" web-encoding "^1.1.5" @@ -5492,10 +5493,10 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -headers-polyfill@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/headers-polyfill/-/headers-polyfill-3.0.4.tgz#cd70c815a441dd882372fcd6eda212ce997c9b18" - integrity sha512-I1DOM1EdWYntdrnCvqQtcKwSSuiTzoqOExy4v1mdcFixFZABlWP4IPHdmoLtPda0abMHqDOY4H9svhQ10DFR4w== +headers-polyfill@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/headers-polyfill/-/headers-polyfill-3.1.0.tgz#22135c594feb4d5efd56e5c7f587552b9feac0e7" + integrity sha512-AVwgTAzeGpF7kwUCMc9HbAoCKFcHGEfmWkaI8g0jprrkh9VPRaofIsfV7Lw8UuR9pi4Rk7IIjJce8l0C+jSJNA== headers-utils@^3.0.2: version "3.0.2"