Repository navigation
Add badge to display install size - #24282
Steven (styfle) wants to merge 1 commit into
Conversation
|
ppl on the team rarely look at the badges.. so i do not think this is an effective way of measuring output size. I would say a better solution is to do this in |
|
The badge is also useful for users, not just developers of TypeScript |
|
I am not sure i agree about the usefulness of the size, specially that it is something we are not optimizing for. for instance we could minify the output, but we are not.. and developers can easily tell how big the package with a quick test. |
The reason why I wrote Package Phobia is because it's not that quick to test for this, especially for users who are using slow internet connections.
That's about 12 minutes to download TypeScript over 3G! |
|
Developers can always use hit https://packagephobia.now.sh/result?p=typescript to know how big is the package.. Seems like easy test for me. No need for a badge. |
|
The badge creates some accountability because users will see it...even if they have never heard of Package Phobia. |
|
As I noted earlier, this is not something we are willing to commit to, we are not optimizing for package size at the moment. If you would like to help us keep the package size in check, we would appreciate a change to the |
|
What is the max size that should cause the build to fail? |
|
I would say 10% than the current size. |
|
Ok so I can put a hard limit at Should I modify |
|
I would say compute the size of the |
|
I saw that the React team uses a dangerfile to add a comment on each PR with the change in size. It looks like this: react/react#12564 This might better than a gulp task because it lets the reviewers decide if it should be merged or not. Thoughts? |
|
Do not think we want to pay the setup cost for a new tool. a check in LKG would be sufficient. |
|
Mohamed Hegazy (@mhegazy) I created PR #24712 Let me know if I did it right or if it needs to be revised, thanks 😅 |
|
Closing in favor of #24712. thanks Steven (@styfle)! |
This adds a badge to the
README.mdfile to display the install size of the npm package.This will catch bugs such as the one described in #23339