-
Notifications
You must be signed in to change notification settings - Fork 1.1k
remove functions that are removed from node:util #7942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| "@cloudflare/unenv-preset": patch | ||
| --- | ||
|
|
||
| Remove removed functions from node:util polyfills | ||
|
|
||
| These function were removed from Node.js before the current LTS versions. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,51 +1,15 @@ | ||
| // https://nodejs.org/api/util.html | ||
| import { | ||
| _errnoException, | ||
| _exceptionWithHostPort, | ||
| getSystemErrorMap, | ||
| getSystemErrorName, | ||
| isArray, | ||
| isBoolean, | ||
| isBuffer, | ||
| isDate, | ||
| isDeepStrictEqual, | ||
| isError, | ||
| isFunction, | ||
| isNull, | ||
| isNullOrUndefined, | ||
| isNumber, | ||
| isObject, | ||
| isPrimitive, | ||
| isRegExp, | ||
| isString, | ||
| isSymbol, | ||
| isUndefined, | ||
| parseEnv, | ||
| styleText, | ||
| } from "unenv/runtime/node/util/index"; | ||
| import type nodeUtil from "node:util"; | ||
|
|
||
| export { | ||
| _errnoException, | ||
| _exceptionWithHostPort, | ||
| getSystemErrorMap, | ||
| getSystemErrorName, | ||
| isArray, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note:
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isArray is available and implemented on workerd
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I should have commented on l94 instead. But if we have some of the functions here implemented in workerd (and not going away) we should definitely use the workerd version instead - I guess it will be a different PR. Thanks |
||
| isBoolean, | ||
| isBuffer, | ||
| isDate, | ||
| isDeepStrictEqual, | ||
| isError, | ||
| isFunction, | ||
| isNull, | ||
| isNullOrUndefined, | ||
| isNumber, | ||
| isObject, | ||
| isPrimitive, | ||
| isRegExp, | ||
| isString, | ||
| isSymbol, | ||
| isUndefined, | ||
| parseEnv, | ||
| styleText, | ||
| } from "unenv/runtime/node/util/index"; | ||
|
|
@@ -71,6 +35,7 @@ export const { | |
| getCallSite, | ||
| inherits, | ||
| inspect, | ||
| isDeepStrictEqual, | ||
| log, | ||
| parseArgs, | ||
| promisify, | ||
|
|
@@ -86,27 +51,9 @@ export default { | |
| /** | ||
| * manually unroll unenv-polyfilled-symbols to make it tree-shakeable | ||
| */ | ||
| // @ts-expect-error undocumented public API | ||
| _errnoException, | ||
| _exceptionWithHostPort, | ||
| getSystemErrorMap, | ||
| getSystemErrorName, | ||
| isArray, | ||
| isBoolean, | ||
| isBuffer, | ||
| isDate, | ||
| isDeepStrictEqual, | ||
| isError, | ||
| isFunction, | ||
| isNull, | ||
| isNullOrUndefined, | ||
| isNumber, | ||
| isObject, | ||
| isPrimitive, | ||
| isRegExp, | ||
| isString, | ||
| isSymbol, | ||
| isUndefined, | ||
| parseEnv, | ||
| styleText, | ||
|
|
||
|
|
@@ -117,6 +64,7 @@ export default { | |
| MIMEType, | ||
| TextDecoder, | ||
| TextEncoder, | ||
| // @ts-expect-error missing types? | ||
| _extend, | ||
| aborted, | ||
| callbackify, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.