-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Feature] Do not always include the changelog.*
files in a package
#6793
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
Comments
It was inherited from Yarn 1, which I think inherited it from npm: I don't have a very strong opinion on this - although just a small note the size isn't really an issue in PnP installs since the files won't be unpacked to disk, and text files are typically trivial to compress. |
Shall I open a PR removing these pattern? (Feel free to merge without rush, at any comfortable time.) |
Right, seems like they removed this behaviour in npm/npm-packlist#61 (or that’s something else?) |
That seems like it indeed; I'm ok to remove it, but note it'll have to wait the next major, which may take some time. |
Understandable. I saw that the change in Thank you for quick and constructive response. |
Hmm... npm's current docs still lists |
Funny. Click a link at the bottom of that section:
Scroll to UPDATE: They just merged a PR removing the line which was still listing |
changelog.*
fileschangelog.*
files in a package
Describe the user story
Currently
yarn npm publish
andyarn pack
do always includechangelog.*
files and do not allow to ignore them.The problem is that the change-log file is always growing and it makes the package install size become larger all the time. For instance, in the
jest
repo the change-log file takes roughly 310 kB.Not sure how they publish, but in
jest
s casechangelog.md
is not included in the published packages. Perhaps because it is a monorepo and they have only a single change-log in the root.I work on a small project which is not a monorepo and its size is only 238 kB. In this case,
yarn npm publish
would always includechangelog.md
. That blows up the install size.Even when I add optimisations and document them in the change-log file, the published package is getting larger. Although, I wanted to make it smaller. That is rather demotivating.
I mentioned
jest
, because my project is a CLI tool as well. It is not bundled. Hence the install size is the important measure.Describe the solution you'd like
Add an option that would allow ignoring
changelog.*
files.Describe the drawbacks of your solution
Publishing a package with or without
changelog.md
makes no difference. I understand a package manager can be opinionated, but still there is no difference, whereverchangelog.md
is included in a package or not.Adding an option increases the API surface. If that is not acceptable, simply do not include
changelog.md
in published packages. Force including is a drawback because all the packages become larger and larger over the time.Describe alternatives you've considered
To use different name for the file:
history.md
,releases.md
or so.This works, but at the same time I feel like getting punished, when I name the file
changelog.md
. I really like Yarn. It is the best of all. Could I use thechangelog.md
file name without that feeling, please?Or I am pushed to use
npm publish
. But I do not like some aspects of its behaviour.Or I could write a script that would pack and publish the package just like
yarn npm publish
does, but without includingchangelog.md
. Honestly, sounds like dream!The text was updated successfully, but these errors were encountered: