Starting with node 23, support for require-ing ES modules no longer throws but instead prints a warning in the output. This is problematic for homebrew users since homebrew aggressively upgrades node, regardless of what the preferred node version is for a package. This PR takes one approach, which is to suppress experimental warnings altogether for Node 23. This is only manually tested since I'm not convinced it's the approach we'd like to take (see Open Questions) - once we've settled on it, I'll need to figure out a way to test.
Open Questions
This feels a bit hacky and I'm not convinced this is the long term fix we'd like to use. Here are a few alternatives, ranked from easy to hard:
We could try and more narrowly suppress the specific require() warning.
We could restore the original warning emitter after importing fetch.
We could change moduleResolution to NodeNext and fix the issues that this causes (unfortunately, I wan't able to trace what they were).
Description
Starting with node 23, support for require-ing ES modules no longer throws but instead prints a warning in the output. This is problematic for homebrew users since homebrew aggressively upgrades node, regardless of what the preferred node version is for a package. This PR takes one approach, which is to suppress experimental warnings altogether for Node 23. This is only manually tested since I'm not convinced it's the approach we'd like to take (see Open Questions) - once we've settled on it, I'll need to figure out a way to test.
Open Questions
This feels a bit hacky and I'm not convinced this is the long term fix we'd like to use. Here are a few alternatives, ranked from easy to hard:
moduleResolution
toNodeNext
and fix the issues that this causes (unfortunately, I wan't able to trace what they were).Checklist