Skip to content
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: fix prefix-only modules not correctly recognized as builtin #86

Closed
wants to merge 1 commit into from
Closed

Conversation

wojtekmaj
Copy link

Following import-js/eslint-import-resolver-typescript#295 (comment), a fix has been implemented. I believe that once we have a module which name starts with node:, it's already safe to assume it's a builtin module.

Following import-js/eslint-import-resolver-typescript#295 (comment), a fix has been implemented. I believe that once we have a module which name starts with `node:`, it's already safe to assume it's a builtin module.
Copy link
Owner

@SukkaW SukkaW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see! LGTM, thanks!

@SukkaW SukkaW self-requested a review July 17, 2024 02:15
Copy link
Owner

@SukkaW SukkaW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temporary block for now, I have some thoughts.

Copy link
Owner

@SukkaW SukkaW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes a typo like node:slqite to become a core module as well.

@SukkaW
Copy link
Owner

SukkaW commented Jul 19, 2024

@wojtekmaj Thanks for your contributions!

In the end, I've updated is-core-module to be like this:

"use strict";const e=require("module"),t=new Set(e.builtinModules.concat(e.builtinModules.map(e=>"node:"+e)).concat(["node:sea","node:test/reporters","node:test"]));module.exports=(e,o)=>t.has(e);

This should fix the problem.

@SukkaW SukkaW closed this Jul 19, 2024
@wojtekmaj wojtekmaj deleted the patch-1 branch July 19, 2024 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants