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

chore(deps): remove is-core-module dependency #295

Merged
merged 4 commits into from
Jul 14, 2024
Merged

chore(deps): remove is-core-module dependency #295

merged 4 commits into from
Jul 14, 2024

Conversation

wojtekmaj
Copy link
Contributor

Node.js from v6.13.0, v8.10.0, v9.3.0 includes module.builtinModules which we can use to natively check if some module belongs to Node.js core or not.

This drops not one, but three dependencies, removing 70 KB of bloat: https://npmgraph.js.org/?q=is-core-module

Copy link

changeset-bot bot commented Jun 28, 2024

🦋 Changeset detected

Latest commit: 96951da

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-import-resolver-typescript Patch

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

Copy link

codesandbox-ci bot commented Jun 28, 2024

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.

src/index.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@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.

LGTM!

cc @JounQin

Copy link

socket-security bot commented Jul 14, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/is-core-module@2.14.0 None 0 31.1 kB ljharb

🚮 Removed packages: npm/@types/is-core-module@2.2.2, npm/is-core-module@2.13.1

View full report↗︎

@JounQin
Copy link
Collaborator

JounQin commented Jul 14, 2024

CI is broken due to linting.

wojtekmaj and others added 4 commits July 14, 2024 23:16
Node.js from v6.13.0, v8.10.0, v9.3.0 includes `module.builtinModules` which we can use to natively check if some module belongs to Node.js core or not.

This drops not one, but _three_ dependencies, removing 70 KB of bloat: https://npmgraph.js.org/?q=is-core-module
Co-authored-by: Grigory <grigory.orlov.set@gmail.com>
@JounQin JounQin added this pull request to the merge queue Jul 14, 2024
Merged via the queue into import-js:master with commit ff3d3c6 Jul 14, 2024
8 checks passed
@wojtekmaj wojtekmaj deleted the no-is-core-module branch July 14, 2024 21:21
@ljharb
Copy link
Member

ljharb commented Jul 16, 2024

Heads up that this will break for node:test, node:sea, and node:sqlite, which aren't in that list (nor will any new prefix-only core modules). is-core-module handles it, however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants