fix: prefix stream/web import with node:
#122
Merged
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
The purpose of this PR is:
Making it more obvious that
stream/web
is a Node built-in. Since we upgraded tonode-fetch
3.0 final our deploys are failing on Netlify (netlify/zip-it-and-ship-it#743). I'm hoping this would be part of a solutionThis is what had to change:
Add
node:
prefixThis is what like reviewers to know:
This is a supported syntax for importing core modules. I believe the
node:
prefix is only available on Node 16. However, sincestream/web
is only available on Node 16 as well, I don't think that should be an issue. It does skip the require cache, which might cause some small performance loss - if the user's application is importingstream/web
elsewhere I believe this will cause a new instance to be importedI might wait to merge this until seeing what the reviewers of the detection package think about the idea as well (dependents/node-precinct#88). However, I thought I'd at least raise it here to see whether you'd be amenable to the idea.
docs:
,fix(area):
,feat(area):
orbreaking(area):