-
Notifications
You must be signed in to change notification settings - Fork 24
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
Don't publish tests or TypeScript source files #148
base: master
Are you sure you want to change the base?
Conversation
Sorry for the late response. it does make sense, but what if someone is already relying on *.ts delivered with the package? |
I don't think someone can be relying on The easiest way to find out for sure is to post an update, then check for incoming bug reports. Splitting the package would be nice, and would mean that users interested in |
nah, there were a couple of bad episodes when I was breaking other tools dependent on the parser, and I am not feeling confident making any assumptions. I will look into how to automate smaller packages publishing, thanks for suggesting this kind of improvement. |
On other hand, I am not completely sure this is something to be solved in comment-parser. Whoever uses it will do the bundling/tree-shaking/etc the way they need, unless it's some rare pull-in-runtime case |
On the node side, when I do an And when I build a docker container from scratch (or in CI, when running tests) I get those files. I wouldn't expect these files to make it through to a browser endpoint. But they're going to get pulled down when running test on or building something server-side. And I don't think they need to be. |
I see. It's arguable that 180kB improves the Build/CI time, but baking specific node/browser/es packages may still make sense for someone. I will put it on my stack. |
Certainly, I don't expect removing files in just this package to be noticeable -- but if all my dependencies are packaging 180kB they don't need to, that quickly adds up. Thanks for engaging here! |
I also just noticed through the usage of https://github.com/duniul/clean-modules that Can we get this PR merged? |
Looking at unpkg, you're currently publishing the tests, among other files. I don't think this is necessary.
This PR limits the published files to those in
browser
,es6
,lib
,package.json
,LICENSE
andREADME.md
(the last three are implicit with howfiles
works). I think this should cover everythingcomment-parser
needs to work.This saves about 180kB, or about half the size of the package.