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: use FinalizationRegistry compat if global is missing #1545

Merged
merged 1 commit into from Aug 23, 2022

Conversation

Kikobeats
Copy link
Contributor

@mcollina
Copy link
Member

How is this a problem? We have FinalizationRegistry in all versions of Node.js that are running that code. In case it's a bundling issue, please add a test that bundles Undici and loads it in a previous node runtime.

@Kikobeats
Copy link
Contributor Author

There are some contexts where FinalizationRegistry is not there (e.g., when you run inside a vm)

The fallback is already on the codebase; why not use it?

@mcollina
Copy link
Member

Could you add a unit test that would fail with this change? So it's clear we don't regress.

@mcollina mcollina merged commit b0f0f31 into nodejs:main Aug 23, 2022
@Kikobeats Kikobeats deleted the patch-1 branch August 24, 2022 08:39
metcoder95 pushed a commit to metcoder95/undici that referenced this pull request Dec 26, 2022
crysmags pushed a commit to crysmags/undici that referenced this pull request Feb 27, 2024
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.

None yet

2 participants