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

perf(npm): remove superfluous files from npm package #328

Merged
merged 2 commits into from
Aug 11, 2023

Conversation

sheerlox
Copy link
Contributor

Description

This PR reduces the npm package size by 64%, mainly preventing the test folder from being published.

I've replaced the .npmignore file with the opposite, the files section in package.json which specifies which files should be published to npm. This is the preferred behavior, as it will automatically filter any useless file not explicitly added to the files array.

The root index.d.ts has been removed as it wasn't needed, and package.json has been adjusted to point types directly to types/index.d.ts.

Motivation

I am considering using this library in another I'm maintaining, and the main blocking point is the package size. If this gets merged, it will instantly become a better option.

@sheerlox sheerlox force-pushed the perf/reduce-npm-package-size branch from c8b690d to d4e78ed Compare August 3, 2023 14:19
@sheerlox sheerlox changed the title perf(npm): remove useless files from npm package perf(npm): remove superfluous files from npm package Aug 3, 2023
@sheerlox
Copy link
Contributor Author

sheerlox commented Aug 3, 2023

hello @harrisiirak 👋 are you interested in the improvement changes proposed in this PR? thanks in advance 🙏

@harrisiirak
Copy link
Owner

Hi @sheerlox!

I saw your PR but I haven't really had time to look into it. I'll assign it to myself and try to find some time next week.

Best regards

@harrisiirak harrisiirak self-requested a review August 4, 2023 08:08
@harrisiirak harrisiirak self-assigned this Aug 4, 2023
Copy link
Owner

@harrisiirak harrisiirak left a comment

Choose a reason for hiding this comment

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

LGTM! I'll merge it now and try to release it later today or over the weekend. Thanks for your contribution!

@harrisiirak harrisiirak merged commit 61f8ec7 into harrisiirak:master Aug 11, 2023
7 checks passed
@harrisiirak
Copy link
Owner

@sheerlox published: https://github.com/harrisiirak/cron-parser/releases/tag/4.9.0

@sheerlox
Copy link
Contributor Author

Let's go 🎉 thank you very much!

@sheerlox sheerlox deleted the perf/reduce-npm-package-size branch August 14, 2023 14:18
harrisiirak pushed a commit that referenced this pull request Aug 28, 2023
* perf(npm): remove superfluous files from npm package

* test: fix TS tests to point to the right file
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