diff --git a/.changeset/lazy-oranges-jump.md b/.changeset/lazy-oranges-jump.md new file mode 100644 index 000000000000..372445113e7c --- /dev/null +++ b/.changeset/lazy-oranges-jump.md @@ -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. diff --git a/packages/unenv-preset/src/runtime/node/util/index.ts b/packages/unenv-preset/src/runtime/node/util/index.ts index a814ec5c814c..80ee4c9d0576 100644 --- a/packages/unenv-preset/src/runtime/node/util/index.ts +++ b/packages/unenv-preset/src/runtime/node/util/index.ts @@ -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, - 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,