diff --git a/.changeset/@whatwg-node_node-fetch-990-dependencies.md b/.changeset/@whatwg-node_node-fetch-990-dependencies.md new file mode 100644 index 00000000000..48e663ad4d6 --- /dev/null +++ b/.changeset/@whatwg-node_node-fetch-990-dependencies.md @@ -0,0 +1,6 @@ +--- +"@whatwg-node/node-fetch": patch +--- +dependencies updates: + - Added dependency [`@kamilkisiela/fast-url-parser@^1.1.4` ↗︎](https://www.npmjs.com/package/@kamilkisiela/fast-url-parser/v/1.1.4) (to `dependencies`) + - Removed dependency [`fast-url-parser@^1.1.3` ↗︎](https://www.npmjs.com/package/fast-url-parser/v/1.1.3) (from `dependencies`) diff --git a/.changeset/three-chefs-study.md b/.changeset/three-chefs-study.md new file mode 100644 index 00000000000..d0efb603827 --- /dev/null +++ b/.changeset/three-chefs-study.md @@ -0,0 +1,6 @@ +--- +'@whatwg-node/node-fetch': patch +--- + +Fix https://github.com/petkaantonov/urlparser/issues/20 by using +https://github.com/kamilkisiela/fast-url-parser fork diff --git a/packages/node-fetch/package.json b/packages/node-fetch/package.json index 76c4f805ec7..5751a279eeb 100644 --- a/packages/node-fetch/package.json +++ b/packages/node-fetch/package.json @@ -34,10 +34,10 @@ }, "typings": "dist/typings/index.d.ts", "dependencies": { + "@kamilkisiela/fast-url-parser": "^1.1.4", "@whatwg-node/events": "^0.1.0", "busboy": "^1.6.0", "fast-querystring": "^1.1.1", - "fast-url-parser": "^1.1.3", "tslib": "^2.3.1" }, "devDependencies": { diff --git a/packages/node-fetch/src/URL.ts b/packages/node-fetch/src/URL.ts index 9e2b129353e..6e30932e4b6 100644 --- a/packages/node-fetch/src/URL.ts +++ b/packages/node-fetch/src/URL.ts @@ -1,5 +1,5 @@ import FastQuerystring from 'fast-querystring'; -import FastUrl from 'fast-url-parser'; +import FastUrl from '@kamilkisiela/fast-url-parser'; import { PonyfillURLSearchParams } from './URLSearchParams.js'; FastUrl.queryString = FastQuerystring; diff --git a/packages/node-fetch/src/declarations.d.ts b/packages/node-fetch/src/declarations.d.ts index 61e11213c4d..a8d1dc5048c 100644 --- a/packages/node-fetch/src/declarations.d.ts +++ b/packages/node-fetch/src/declarations.d.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -declare module 'fast-url-parser' { +declare module '@kamilkisiela/fast-url-parser' { class Url { static queryString: { parse(value: string): any; diff --git a/yarn.lock b/yarn.lock index 4ed0ae8085f..c1ff40a366c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1875,6 +1875,11 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@kamilkisiela/fast-url-parser@^1.1.4": + version "1.1.4" + resolved "https://registry.yarnpkg.com/@kamilkisiela/fast-url-parser/-/fast-url-parser-1.1.4.tgz#9d68877a489107411b953c54ea65d0658b515809" + integrity sha512-gbkePEBupNydxCelHCESvFSFM8XPh1Zs/OAVRW/rKpEqPAl5PbOM90Si8mv9bvnR53uPD2s/FiRxdvSejpRJew== + "@logdna/tail-file@^2.0.6": version "2.2.0" resolved "https://registry.yarnpkg.com/@logdna/tail-file/-/tail-file-2.2.0.tgz#158a362d293f940dacfd07c835bf3ae2f9e0455a" @@ -4692,13 +4697,6 @@ fast-uri@^2.0.0, fast-uri@^2.1.0: resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-2.3.0.tgz#bdae493942483d299e7285dcb4627767d42e2793" integrity sha512-eel5UKGn369gGEWOqBShmFJWfq/xSJvsgDzgLYC845GneayWvXBf0lJCBn5qTABfewy1ZDPoaR5OZCP+kssfuw== -fast-url-parser@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" - integrity sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ== - dependencies: - punycode "^1.3.2" - fastify@4.24.3: version "4.24.3" resolved "https://registry.yarnpkg.com/fastify/-/fastify-4.24.3.tgz#bf97a3f5158ff7f78af949d483cac4e6115fb651" @@ -7453,7 +7451,7 @@ pseudomap@^1.0.2: resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== -punycode@1.3.2, punycode@^1.3.2: +punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" integrity sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw== @@ -8721,7 +8719,6 @@ typescript@~3.8.3: uWebSockets.js@uNetworking/uWebSockets.js#v20.27.0: version "20.27.0" - uid "666954999fb67b303c6bc11b577599d51aa39e7c" resolved "https://codeload.github.com/uNetworking/uWebSockets.js/tar.gz/666954999fb67b303c6bc11b577599d51aa39e7c" unbox-primitive@^1.0.2: