-
-
Notifications
You must be signed in to change notification settings - Fork 728
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
Update .npmignore #250
Update .npmignore #250
Conversation
Remove test/ folder from being published with the npm package
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is intentionally included; npm explore foo && npm install && npm test
should always work.
Shouldn't npm test work only if you directly git clone the repository? If this is just an npm dependency, we shouldn't pull in the test/ folder |
No, running tests for installed deps is an important debugging tool, and it should work offline. |
Important for what use-case? |
Not having an internet connection when i want to run my deps’ tests, to help debug issues. |
@ljharb that's what I mean. What is the use-case when you want to run your deps' tests? I never heard about this scenario and almost any npm package comes with tests excluded, that's why I'm asking. |
Every package i maintain includes tests, and i learned the practice back when virtually every package included tests, so I’m not sure how accurate “almost any” is. The use case is when I’m verifying that the dep is working on my exact platform and node version, with my exact NODE_OPTIONS, on my exact filesystem. It has turned out to be a bug in the dep more often than you likely expect. |
if we go through top 100 npm packages, only 7 of them have tests included and 2 (of these 7) are dead / no longer maintained. Here are the results and a script which produces them: https://gist.github.com/mdevils/0674355bc679e281d57c0cc167b344ce
OK, I see how it might be useful for you. But I believe for everyone else who uses your libs, tests are just space on the hard drive. Especially in case of this package, which has nothing to do with node.js built-in libraries and just operates with strings, arrays and objects. |
"top" is irrelevant; npm has 1.5 million packages, 100 isn't nearly enough of a sample to be significant. Disk space is effectively infinite and free; we're talking about 70 kilobytes here. The browser cache space taken up by viewing this very page is likely a hundred times that. |
@ljharb Whatever's clever 🤷♀️ |
There are size limits when deploying to serverless functions
On Mon, Mar 15, 2021 at 3:08 PM Marat Dulin ***@***.***> wrote:
@ljharb <https://github.com/ljharb> Whatever's clever 🤷♀️
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#250 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADTRD23Y3S6LNUXZRKQ3TLTDZSKLANCNFSM4EQZEHTA>
.
--
Kind regards,
Eu Gene Lim
|
@eugenelim then you should be bundling your application, because otherwise you're always shipping files you don't need, like package.jsons and README.md, but also like implementation files you don't happen to be using. |
Remove test/ folder from being published with the npm package