-
Notifications
You must be signed in to change notification settings - Fork 634
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
Unnecessary files are included in the published packages #6325
Comments
We used to ignore test files at some point, but reverted it by recommendation from JSR team. #4441 (comment) Can you elaborate on why test files should be excluded from published packages? |
As a library author, my thinking is that I don't want users reviewing their node_modules folder (to determine space-hogging libraries, for example), only to find there are a bunch of test data files being indirectly included by one of my libraries. |
Is your package published to npm, or jsr? If you publish your package to npm and let it depends on (BTW if you publish your package to JSR and it targets Deno runtime, then test files are not downloaded to the users as Deno only downloads the necessary files.) |
It is going to be to both. I currently have the necessary files from std vendored directly into my project.
Thanks, that's nice to know! |
@lucacasonato (cc @crowlKats) What do you think about the best practice here? Should we exclude test scripts and fixtures to make npm tarballs smaller? Or should we do something else? |
Describe the bug
Most (none?) packages don't distinguish between files that are necessary for end-projects and development-related files that happen to be inside the same folder.
Steps to Reproduce
For example, in the package for
@std/msgpack
, the test spec modules, and test data files are also included.Expected behavior
The packages implement filters described in https://jsr.io/docs/publishing-packages#filtering-files
Environment
Not applicable
The text was updated successfully, but these errors were encountered: