File tree Expand file tree Collapse file tree 3 files changed +17
-11
lines changed Expand file tree Collapse file tree 3 files changed +17
-11
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @cloudflare/unenv-preset " : patch
3+ ---
4+
5+ Use builtin implementation for isArray and isDeepStrictEqual
Original file line number Diff line number Diff line change @@ -4,11 +4,9 @@ import {
44 _exceptionWithHostPort ,
55 getSystemErrorMap ,
66 getSystemErrorName ,
7- isArray ,
87 isBoolean ,
98 isBuffer ,
109 isDate ,
11- isDeepStrictEqual ,
1210 isError ,
1311 isFunction ,
1412 isNull ,
@@ -30,11 +28,9 @@ export {
3028 _exceptionWithHostPort ,
3129 getSystemErrorMap ,
3230 getSystemErrorName ,
33- isArray ,
3431 isBoolean ,
3532 isBuffer ,
3633 isDate ,
37- isDeepStrictEqual ,
3834 isError ,
3935 isFunction ,
4036 isNull ,
@@ -71,6 +67,8 @@ export const {
7167 getCallSite,
7268 inherits,
7369 inspect,
70+ isArray,
71+ isDeepStrictEqual,
7472 log,
7573 parseArgs,
7674 promisify,
@@ -91,11 +89,9 @@ export default {
9189 _exceptionWithHostPort,
9290 getSystemErrorMap,
9391 getSystemErrorName,
94- isArray,
9592 isBoolean,
9693 isBuffer,
9794 isDate,
98- isDeepStrictEqual,
9995 isError,
10096 isFunction,
10197 isNull,
@@ -113,10 +109,6 @@ export default {
113109 /**
114110 * manually unroll workerd-polyfilled-symbols to make it tree-shakeable
115111 */
116- MIMEParams,
117- MIMEType,
118- TextDecoder,
119- TextEncoder,
120112 _extend,
121113 aborted,
122114 callbackify,
@@ -128,10 +120,16 @@ export default {
128120 getCallSite,
129121 inherits,
130122 inspect,
123+ isArray,
124+ isDeepStrictEqual,
131125 log,
126+ MIMEParams,
127+ MIMEType,
132128 parseArgs,
133129 promisify,
134130 stripVTControlCharacters,
131+ TextDecoder,
132+ TextEncoder,
135133 toUSVString,
136134 transferableAbortController,
137135 transferableAbortSignal,
Original file line number Diff line number Diff line change @@ -109,9 +109,12 @@ async function testNodeCompatModules() {
109109}
110110
111111async function testUtilImplements ( ) {
112- const { types } = await import ( "node:util" ) ;
112+ const util = await import ( "node:util" ) ;
113+ const { types } = util ;
113114 assert . strictEqual ( types . isExternal ( "hello world" ) , false ) ;
114115 assert . strictEqual ( types . isAnyArrayBuffer ( new ArrayBuffer ( 0 ) ) , true ) ;
116+ assert . strictEqual ( util . isArray ( [ ] ) , true ) ;
117+ assert . strictEqual ( util . isDeepStrictEqual ( 0 , 0 ) , true ) ;
115118}
116119
117120async function testPath ( ) {
You can’t perform that action at this time.
0 commit comments