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

prefer-node-protocol: Add checkRequire option #1206

Merged

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Apr 23, 2021

Requested #1198 (comment)

@sindresorhus
Copy link
Owner

I would personally have just waited for Node.js to backport the feature. Seems like a bit of waste of time to add an option that will soon be moot. But the work is already done, so why not.

@sindresorhus sindresorhus merged commit 8d8411b into sindresorhus:main Apr 23, 2021
@fisker fisker deleted the prefer-node-protocol-check-require branch April 23, 2021 16:27
@karlhorky
Copy link

So looks like the node: scheme / prefix was backported to Node.js 14.13.1 / 12.20.0 🎉

https://nodejs.org/api/esm.html -> link "node: Imports" (links with anchors don't scroll properly right now)

Screen Shot 2021-05-30 at 11 04 39

@karlhorky
Copy link

karlhorky commented May 30, 2021

Ah, maybe require / CommonJS support is not quite there yet:

In Node 16 require('node:fs') works, but it looks like it still doesn't in 14.17.0.

DefinitelyTyped/DefinitelyTyped#52595 (comment)

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

3 participants