Skip to content

Commit

Permalink
Fix node:punycode usage by using a fork of fast-url-parser (#990)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
kamilkisiela and github-actions[bot] authored Dec 8, 2023
1 parent f593468 commit c6806ff
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 12 deletions.
6 changes: 6 additions & 0 deletions .changeset/@whatwg-node_node-fetch-990-dependencies.md
Original file line number Diff line number Diff line change
@@ -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`)
6 changes: 6 additions & 0 deletions .changeset/three-chefs-study.md
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion packages/node-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/node-fetch/src/URL.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/node-fetch/src/declarations.d.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
15 changes: 6 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"

[email protected]:
version "4.24.3"
resolved "https://registry.yarnpkg.com/fastify/-/fastify-4.24.3.tgz#bf97a3f5158ff7f78af949d483cac4e6115fb651"
Expand Down Expand Up @@ -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==

[email protected], punycode@^1.3.2:
[email protected]:
version "1.3.2"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d"
integrity sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit c6806ff

Please sign in to comment.