Skip to content

use is-core-module@^2.3.0 to support node: scheme#277

Merged
sosukesuzuki merged 1 commit intomysticatea:masterfrom
kevinoid:support-node-scheme
Jun 1, 2021
Merged

use is-core-module@^2.3.0 to support node: scheme#277
sosukesuzuki merged 1 commit intomysticatea:masterfrom
kevinoid:support-node-scheme

Conversation

@kevinoid
Copy link
Copy Markdown
Contributor

@kevinoid kevinoid commented May 5, 2021

As requested in #275, recognize Node.js core modules referenced using the node: URL scheme.

Since resolve.isCore was moved to is-core-module in browserify/resolve@7c26483 and [email protected] added support for node: in inspect-js/is-core-module@7341223 require is-core-module@^2.3.0.

Note: is-core-module checks whether the module is supported in a given Node.js version (if not provided, the current version is checked). Although checking whether a name is a core module in all Node.js versions supported by the package would be ideal, it will require significantly more design and implementation work and is therefore not included in this commit.

Fixes: #275

Thanks for considering,
Kevin

@sosukesuzuki
Copy link
Copy Markdown
Collaborator

You mention #257 in the description, isn't it correctly #275?

As requested in mysticatea#275, recognize Node.js core modules referenced using
the [`node:`](https://nodejs.org/api/esm.html#esm_node_imports) URL
scheme.

Since `resolve.isCore` was moved to `is-core-module` in
browserify/resolve@7c26483
and `[email protected]` added support for `node:` in
inspect-js/is-core-module@7341223
require `is-core-module@^2.3.0`.

Note: `is-core-module` checks whether the module is supported in a given
Node.js version (if not provided, the current version is checked).
Although checking whether a name is a core module in all Node.js
versions supported by the package would be ideal, it will require
significantly more design and implementation work and is therefore not
included in this commit.

Fixes: mysticatea#275

Signed-off-by: Kevin Locke <[email protected]>
@kevinoid kevinoid force-pushed the support-node-scheme branch from 2b59338 to 18327ed Compare May 31, 2021 12:17
@kevinoid
Copy link
Copy Markdown
Contributor Author

You mention #257 in the description, isn't it correctly #275?

Yes indeed. Thanks @sosukesuzuki, good catch!

Fixed and rebased on current master (c4a37a6).

@sosukesuzuki sosukesuzuki merged commit c817f6c into mysticatea:master Jun 1, 2021
@misha-erm
Copy link
Copy Markdown

Hello, when can we expect this to be published?

Thanks in advance

cc: @sosukesuzuki

brettz9 pushed a commit to brettz9/eslint-plugin-node that referenced this pull request Jul 24, 2024
…ticatea#277)

* fix: Remove "node:" prefix from "no-unsupported-features/node-builtins" message

* docs: Remove enumeration in docs for no-unsupported-features/node-builtins

* chore: Remove accidental `gi`

* Update docs/rules/no-unsupported-features/node-builtins.md

Co-authored-by: Sebastian Good <[email protected]>

---------

Co-authored-by: 唯然 <[email protected]>
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.

[no-missing-import/-require] Support node: URL scheme

3 participants