Skip to content

Commit 42bbdaa

Browse files
committed
remove removed functions from node:util polyfills
1 parent 17ce7f5 commit 42bbdaa

File tree

2 files changed

+7
-54
lines changed

2 files changed

+7
-54
lines changed

.changeset/lazy-oranges-jump.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cloudflare/unenv-preset": patch
3+
---
4+
5+
Remove removed functions from node:util polyfills

packages/unenv-preset/src/runtime/node/util/index.ts

Lines changed: 2 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,15 @@
11
// https://nodejs.org/api/util.html
22
import {
3-
_errnoException,
4-
_exceptionWithHostPort,
53
getSystemErrorMap,
64
getSystemErrorName,
7-
isArray,
8-
isBoolean,
9-
isBuffer,
10-
isDate,
11-
isDeepStrictEqual,
12-
isError,
13-
isFunction,
14-
isNull,
15-
isNullOrUndefined,
16-
isNumber,
17-
isObject,
18-
isPrimitive,
19-
isRegExp,
20-
isString,
21-
isSymbol,
22-
isUndefined,
235
parseEnv,
246
styleText,
257
} from "unenv/runtime/node/util/index";
268
import type nodeUtil from "node:util";
279

2810
export {
29-
_errnoException,
30-
_exceptionWithHostPort,
3111
getSystemErrorMap,
3212
getSystemErrorName,
33-
isArray,
34-
isBoolean,
35-
isBuffer,
36-
isDate,
37-
isDeepStrictEqual,
38-
isError,
39-
isFunction,
40-
isNull,
41-
isNullOrUndefined,
42-
isNumber,
43-
isObject,
44-
isPrimitive,
45-
isRegExp,
46-
isString,
47-
isSymbol,
48-
isUndefined,
4913
parseEnv,
5014
styleText,
5115
} from "unenv/runtime/node/util/index";
@@ -71,6 +35,7 @@ export const {
7135
getCallSite,
7236
inherits,
7337
inspect,
38+
isDeepStrictEqual,
7439
log,
7540
parseArgs,
7641
promisify,
@@ -86,27 +51,9 @@ export default {
8651
/**
8752
* manually unroll unenv-polyfilled-symbols to make it tree-shakeable
8853
*/
89-
// @ts-expect-error undocumented public API
90-
_errnoException,
91-
_exceptionWithHostPort,
9254
getSystemErrorMap,
9355
getSystemErrorName,
94-
isArray,
95-
isBoolean,
96-
isBuffer,
97-
isDate,
9856
isDeepStrictEqual,
99-
isError,
100-
isFunction,
101-
isNull,
102-
isNullOrUndefined,
103-
isNumber,
104-
isObject,
105-
isPrimitive,
106-
isRegExp,
107-
isString,
108-
isSymbol,
109-
isUndefined,
11057
parseEnv,
11158
styleText,
11259

@@ -117,6 +64,7 @@ export default {
11764
MIMEType,
11865
TextDecoder,
11966
TextEncoder,
67+
// @ts-expect-error missing types?
12068
_extend,
12169
aborted,
12270
callbackify,

0 commit comments

Comments
 (0)