Modules: Document node: scheme

Created on 22 Sep 2020  路  4Comments  路  Source: nodejs/modules

Since at least Node 14 one can import builtin modules using the nodejs: scheme. e.g. import fs from "nodejs:fs"; or import("nodejs:fs"). However this capability doesn't seem to be documented anywhere (particularly not on the esm docs).

It would be good to either document this, if it is officially supported, or to warn when nodejs: scheme is used (if it's only for internal use).

Most helpful comment

https://github.com/nodejs/node/pull/35387 has landed so the features have unified on node:, do we want to officially document this now? We have a semi-implicit documentation bit in the resolver spec already.

All 4 comments

@Jamesernator that isn't stable and actually has been a discussion on if it should be node: since that is what policies use. Whenever we converge it will be documented

https://github.com/nodejs/node/pull/35387 has landed so the features have unified on node:, do we want to officially document this now? We have a semi-implicit documentation bit in the resolver spec already.

made a PR to docs

this has landed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GeoffreyBooth picture GeoffreyBooth  路  4Comments

WebReflection picture WebReflection  路  5Comments

GeoffreyBooth picture GeoffreyBooth  路  5Comments

guybedford picture guybedford  路  5Comments

mhdawson picture mhdawson  路  5Comments