Skip to content

Commit 76c3431

Browse files
authored
chore(deps): fix punycode node deprecation warning (#1109)
1 parent de0c973 commit 76c3431

File tree

5 files changed

+72
-0
lines changed

5 files changed

+72
-0
lines changed

NODE_DEPRECATIONS.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Node deprecation warnings
2+
3+
Patch npm dependencies with:
4+
5+
- Use `patch-package` (<https://www.npmjs.com/package/patch-package>)
6+
- Or with `pnpm`
7+
- <https://pnpm.io/cli/patch>
8+
- vite example: <https://github.com/vitejs/vite/pull/16655>
9+
10+
## `util._extend`
11+
12+
<https://github.com/chimurai/http-proxy-middleware/pull/1084>
13+
14+
```shell
15+
[DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
16+
```
17+
18+
## `punycode`
19+
20+
<https://github.com/chimurai/http-proxy-middleware/pull/1109>
21+
22+
```shell
23+
[DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
24+
```

cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"node_modules/**",
66
"coverage/**",
77
"dist/**",
8+
"patches/**",
89
"tsconfig.tsbuildinfo",
910
"package.json",
1011
"yarn.lock",

patches/tr46+0.0.3.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/node_modules/tr46/index.js b/node_modules/tr46/index.js
2+
index 9ce12ca..7c3b5d7 100644
3+
--- a/node_modules/tr46/index.js
4+
+++ b/node_modules/tr46/index.js
5+
@@ -1,6 +1,6 @@
6+
"use strict";
7+
8+
-var punycode = require("punycode");
9+
+var punycode = require("punycode/");
10+
var mappingTable = require("./lib/mappingTable.json");
11+
12+
var PROCESSING_OPTIONS = {

patches/uri-js+4.4.1.patch

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
diff --git a/node_modules/uri-js/dist/esnext/schemes/mailto.js b/node_modules/uri-js/dist/esnext/schemes/mailto.js
2+
index 2553713..df0ecfd 100755
3+
--- a/node_modules/uri-js/dist/esnext/schemes/mailto.js
4+
+++ b/node_modules/uri-js/dist/esnext/schemes/mailto.js
5+
@@ -1,5 +1,5 @@
6+
import { pctEncChar, pctDecChars, unescapeComponent } from "../uri";
7+
-import punycode from "punycode";
8+
+import punycode from "punycode/";
9+
import { merge, subexp, toUpperCase, toArray } from "../util";
10+
const O = {};
11+
const isIRI = true;
12+
diff --git a/node_modules/uri-js/dist/esnext/uri.js b/node_modules/uri-js/dist/esnext/uri.js
13+
index 659ce26..1806aa5 100755
14+
--- a/node_modules/uri-js/dist/esnext/uri.js
15+
+++ b/node_modules/uri-js/dist/esnext/uri.js
16+
@@ -34,7 +34,7 @@
17+
*/
18+
import URI_PROTOCOL from "./regexps-uri";
19+
import IRI_PROTOCOL from "./regexps-iri";
20+
-import punycode from "punycode";
21+
+import punycode from "punycode/";
22+
import { toUpperCase, typeOf, assign } from "./util";
23+
export const SCHEMES = {};
24+
export function pctEncChar(chr) {

patches/whatwg-url+5.0.0.patch

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
diff --git a/node_modules/whatwg-url/lib/url-state-machine.js b/node_modules/whatwg-url/lib/url-state-machine.js
2+
index c25dbc2..8c2d955 100644
3+
--- a/node_modules/whatwg-url/lib/url-state-machine.js
4+
+++ b/node_modules/whatwg-url/lib/url-state-machine.js
5+
@@ -1,5 +1,5 @@
6+
"use strict";
7+
-const punycode = require("punycode");
8+
+const punycode = require("punycode/");
9+
const tr46 = require("tr46");
10+
11+
const specialSchemes = {

0 commit comments

Comments
 (0)