-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
fix: enhance hints for bare Node.js built-in modules #26669
base: main
Are you sure you want to change the base?
Conversation
I'm wondering if it makes sense to silence these warnings when the explicit --unstable-bare-node-builtins flag is provided. Maybe a bit of nudging to get things cleaned up is okay. ➜ deno run --unstable-bare-node-builtins -A ../packages/create-solid/src/index.ts
Warning Resolving "fs/promises" as "node:fs/promises" at file:///Users/admin/repos/solid-cli/packages/commands/dist/handlers/new.mjs:1:324. If you want to use a built-in Node module, add a "node:" prefix.
Warning Resolving "path" as "node:path" at file:///Users/admin/repos/solid-cli/packages/commands/dist/handlers/new.mjs:1:372. If you want to use a built-in Node module, add a "node:" prefix.
Warning Resolving "fs" as "node:fs" at file:///Users/admin/repos/solid-cli/packages/commands/dist/handlers/new.mjs:1:475. If you want to use a built-in Node module, add a "node:" prefix.
Warning Resolving "fs/promises" as "node:fs/promises" at file:///Users/admin/repos/solid-cli/packages/utils/dist/index.mjs:1:256. If you want to use a built-in Node module, add a "node:" prefix.
Warning Resolving "os" as "node:os" at file:///Users/admin/repos/solid-cli/packages/utils/dist/index.mjs:1:306. If you want to use a built-in Node module, add a "node:" prefix.
Warning Resolving "path" as "node:path" at file:///Users/admin/repos/solid-cli/packages/utils/dist/index.mjs:1:375. If you want to use a built-in Node module, add a "node:" prefix.
Warning Resolving "util" as "node:util" at file:///Users/admin/repos/solid-cli/packages/utils/dist/index.mjs:5:158. If you want to use a built-in Node module, add a "node:" prefix.
Warning Resolving "fs/promises" as "node:fs/promises" at file:///Users/admin/repos/solid-cli/packages/utils/dist/fs/index.mjs:1:26. If you want to use a built-in Node module, add a "node:" prefix.
Warning Resolving "fs/promises" as "node:fs/promises" at file:///Users/admin/repos/solid-cli/packages/utils/dist/updates/index.mjs:1:37. If you want to use a built-in Node module, add a "node:" prefix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Some(format!("If you want to use a built-in Node module, add a \"node:\" prefix (ex. \"node:{specifier}\"), or use | ||
--unstable-bare-node-builtins flag, or specify `bare-node-builtins` in the `unstable` option in the config file.")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should actually be reverted, because it's only shown when the flag is present
This reverts commit 5eac6f4.
The hint was not helpful in all situations as it didn't list the
--unstable-bare-node-builtins
flag or thebare-node-builtins
option in the
unstable
config.