Skip to content
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

fix: Changed judgment of undefined to not use a function #1552

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chimame
Copy link

@chimame chimame commented Aug 19, 2024

Overview

Changed to not use isUndefined, which is deprecated in Node.js.

Reason for change

As written in the overview, it is deprecated in Node.js. I changed it because it is possible to determine without using it.

Also, this may be a personal opinion, but I use this library with Cloudflare Workers. There are two options to use Node.js API with Cloudflare Workers.

I won't go into detail on how these two options are different, but the only way to make this library work is to use the former node_compat. Because to use the nodejs_compat option, you need to specify node: (node:util in this library) when using the Node.js API.

Initially, I used this library with the node_compat option, but started to migrate to using the nodejs_compat option. However, I noticed that this library cannot be built with the nodejs_compat option. Those are the isUndefined and util in this case.
I could have patched it to reference node:util, but when I looked at the Node.js documentation I noticed that it was deprecated, so I submitted a pull request to fix the library.

@chimame
Copy link
Author

chimame commented Aug 28, 2024

@maticzav ping

@cpvdeveloper
Copy link

Also facing this issue when trying to run on Node version 23

@tsongas
Copy link

tsongas commented Oct 23, 2024

Same issue.

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.

3 participants