Skip to content

Commit 1c15155

Browse files
authored
fix(NODE-3561): umd bundle fails to require util (#455)
1 parent 5396ab3 commit 1c15155

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/parser/utils.ts

-8
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,6 @@ export function isObjectLike(candidate: unknown): candidate is Record<string, un
111111

112112
declare let console: { warn(...message: unknown[]): void };
113113
export function deprecate<T extends Function>(fn: T, message: string): T {
114-
if (
115-
typeof require === 'function' &&
116-
typeof window === 'undefined' &&
117-
typeof self === 'undefined'
118-
) {
119-
// eslint-disable-next-line @typescript-eslint/no-var-requires
120-
return require('util').deprecate(fn, message);
121-
}
122114
let warned = false;
123115
function deprecated(this: unknown, ...args: unknown[]) {
124116
if (!warned) {

0 commit comments

Comments
 (0)