Skip to content

Fix: import isNullOrUndefined from ExtensionMethods instead of removed util builtin#460

Open
perbergland wants to merge 1 commit into
gautamsi:masterfrom
ref-app:fix/node24-isnullorundefined
Open

Fix: import isNullOrUndefined from ExtensionMethods instead of removed util builtin#460
perbergland wants to merge 1 commit into
gautamsi:masterfrom
ref-app:fix/node24-isnullorundefined

Conversation

@perbergland

Copy link
Copy Markdown

What

ExtendedPropertyDefinition.ts imported isNullOrUndefined from Node's built-in util module. util.isNullOrUndefined was runtime-deprecated (DEP0054) and has since been removed from Node.js — on Node 24+ the import resolves to undefined and any use of ExtendedPropertyDefinition throws TypeError: isNullOrUndefined is not a function.

Change

This is the only file in the codebase still using the removed built-in. The library already exports its own isNullOrUndefined from ExtensionMethods with identical semantics (obj === undefined || obj === null), and every other call site already imports it from there. This PR just redirects the import:

-import { StringHelper, Convert } from "../ExtensionMethods";
+import { StringHelper, Convert, isNullOrUndefined } from "../ExtensionMethods";
 ...
-import { isNullOrUndefined } from "util";

No new dependency, no behavior change.

Verification

$ node -e "console.log(typeof require('util').isNullOrUndefined)"   # Node 25
undefined

Fixes #459

🤖 Generated with Claude Code

… builtin

util.isNullOrUndefined was removed from Node.js (deprecated as DEP0054),
so the import from "util" resolves to undefined on Node 24+ and throws
TypeError when ExtendedPropertyDefinition is used. Use the library's own
identically-behaving isNullOrUndefined from ExtensionMethods instead.

Fixes gautamsi#459

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ExtendedPropertyDefinition imports removed util.isNullOrUndefined — breaks on Node 24+

1 participant