Universal package name prefix to represent standard library #5081
trymeouteh
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
These standard libraries are exclusive to Node.js. Other runtimes make it their goal to make compatible implementations, but at the end of the day, they are different libraries. This prefix ( However, many thanks for taking the time to give us feedback, and we look forward to seeing more in the future 😃. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently you can use
node
such asimport fs from 'node:fs';
to tell Node that this package is apart of the standard library. However many of the standard libraries in NodeJS are also available in other runtimes such as Deno or Bun. And when you useimport fs from 'node:fs';
in Deno or Bun to use the standardfs
library, it looks a bit odd since your not using Node.I would like to suggest adding another prefix name to packages that are apart of the standard library for NodeJS. By having a secondary prefix name, it will also suggest that this standard library is not exclusive to NodeJS. Here are some name ideas
import fs from 'runtime:fs';
import fs from 'std:fs';
Beta Was this translation helpful? Give feedback.
All reactions