Use node:
-prefixed imports for Node.js core modules
#1803
Labels
dependencies
Pull requests that update a dependency file
javascript
Pull requests that update Javascript code
semver:major
Milestone
FYI: nodejs/node#36098
The
node:
-prefix was introduced to avoid namespace conflicts when importing Node.js core modules.At this time, it does not affect the operation without prefixes, but since some modules, such as
node:test
, require prefixes, I suggest that you modify your entire codebase with prefixes while you are at it.Also, as a side effect of prefixing, you may be able to run bolt on Cloudflare Workers.
Cloudflare Workers has announced the availability of Node.js compatible APIs, but the
node:
-prefix is now required to use them.Details of how to run on Cloudflare Workers should be a separate issue, but this possibility is a great motivation to introduce prefixes.
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
The text was updated successfully, but these errors were encountered: