-
-
Notifications
You must be signed in to change notification settings - Fork 69
fix: fix prefix-only modules not marked as builtin #303
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
Conversation
🦋 Changeset detectedLatest commit: a63eb46 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Following @ljharb's feedback in #295 (comment), a different version of isBuiltin function has been implemented.
This will still be a false positive on a node version that lacks the builtin module - node:sqlite before node 22.5, for example. |
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.
Agree w/ @ljharb on this one, but for a different reason.
E.g. If I accidentally typo node:slqtie
, I'd expect ESLint to help me find out about this.
Block for now, I still prefer porting Node.js implementation:
it just checks if the module id is in the lists, very similar to what |
@SukkaW the problem is that node doesn't expose which core modules exist at runtime, so to do it without is-core-module (or its approach), you'd need to |
Following @ljharb's feedback in #295 (comment), a different version of isBuiltin function has been implemented.