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

Remove is-core-module dependency #335

Merged
merged 4 commits into from
Jul 4, 2024
Merged

Remove is-core-module dependency #335

merged 4 commits into from
Jul 4, 2024

Conversation

wojtekmaj
Copy link
Contributor

Please provide enough information so that others can review your pull request:

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

Closing issues

Closes #334

javierbrea and others added 2 commits May 16, 2024 19:33
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
@javierbrea javierbrea changed the base branch from master to release June 28, 2024 10:42
@javierbrea
Copy link
Owner

Hi @wojtekmaj ,
First of all, thanks for your contribution! 😃

Could you please add some test? I suppose that adding a pair of tests checking that importing both types of core modules is valid would be enough (with or without prefix, I suppose, according to the implementation). You could add them to the test function in the test/rules/one-level/element-types.spec.js, for example.

Anyway, just let me know if you need help to run tests locally or whatever.

@wojtekmaj
Copy link
Contributor Author

Sorry for the delay. Added these :)

@javierbrea javierbrea merged commit 521a272 into javierbrea:release Jul 4, 2024
8 checks passed
@wojtekmaj wojtekmaj deleted the no-is-core-module branch July 5, 2024 06:38
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.

Remove is-core-module dependency
2 participants