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

[meta] Add test and configuration files to .npmignore #400

Closed
wants to merge 1 commit into from
Closed

[meta] Add test and configuration files to .npmignore #400

wants to merge 1 commit into from

Conversation

ixth
Copy link

@ixth ixth commented Mar 15, 2021

I think most users don't need neither tests nor config files when they download a package. I'd also remove CHANGELOG.md, but npm won't let me do that.

Package size reduced by ~40% both packed and unpacked.

@@ -9,34 +9,26 @@ Detected non-install and non-publish: exiting.
 npm notice
 npm notice 📦  [email protected]
 npm notice === Tarball Contents ===
-npm notice 520B   .editorconfig
-npm notice 16B    .eslintignore
-npm notice 1.0kB  .eslintrc
-npm notice 216B   .nycrc
 npm notice 476B   lib/formats.js
 npm notice 211B   lib/index.js
 npm notice 9.3kB  lib/parse.js
-npm notice 33.3kB test/parse.js
 npm notice 26.1kB dist/qs.js
 npm notice 8.4kB  lib/stringify.js
-npm notice 30.8kB test/stringify.js
 npm notice 6.8kB  lib/utils.js
-npm notice 5.1kB  test/utils.js
 npm notice 2.0kB  package.json
 npm notice 20.0kB CHANGELOG.md
 npm notice 1.6kB  LICENSE.md
 npm notice 19.8kB README.md
-npm notice 548B   .github/FUNDING.yml
 npm notice === Tarball Details ===
 npm notice name:          qs
 npm notice version:       6.9.6
 npm notice filename:      qs-6.9.6.tgz
-npm notice package size:  37.0 kB
-npm notice unpacked size: 168.4 kB
-npm notice shasum:        af29cab02a478195f2e423b84c167d9cd927bd21
-npm notice integrity:     sha512-qF2xgWi49vJRz[...]czs7/dQzToK6g==
-npm notice total files:   20
+npm notice package size:  20.6 kB
+npm notice unpacked size: 96.9 kB
+npm notice shasum:        ef5052808def8c8c09588a370dc814d40a7e8d80
+npm notice integrity:     sha512-LB4f8bQhvX4NT[...]QTl7Y0WesYX6A==
+npm notice total files:   12
 npm notice
 qs-6.9.6.tgz

Copy link
Owner

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Absolutely not; tests are included very intentionally. npm explore foo && npm install foo && npm test should always work.

@ljharb
Copy link
Owner

ljharb commented Mar 15, 2021

Duplicate of #389. Duplicate of #356. Duplicate of #250.

The only files that currently show up in npm pack --dry-run that could be excluded are .github/workflows/rebase.yml and .github/FUNDING.yml - every other file is 100% necessary in the published package.

@ljharb ljharb closed this Mar 15, 2021
@ixth
Copy link
Author

ixth commented Mar 15, 2021

Are there any guidelines on that?
I mean, is that really necessary to be able to run tests on already released package?

UPD. Okay, nevermind, I see #250 (comment).

@ljharb ljharb mentioned this pull request Jan 12, 2022
@ljharb ljharb mentioned this pull request May 6, 2024
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