pkg-size / action Goto Github PK
View Code? Open in Web Editor NEW๐ฆ๐ GitHub Action to reports on the size of your npm package
License: MIT License
๐ฆ๐ GitHub Action to reports on the size of your npm package
License: MIT License
Ability to create groups with filters
Probably a glob filter for each group
Howdy ๐ Firstly, thanks for this amazing action.
I wanted to post a feature request. It would be nice to be able to pass silent: false
to the exec
options here:
Line 55 in 7cbd522
To be able to see the full output of the buildCommand
that could help with debugging or prove informative in other ways.
I already changed it in my fork, and it's working pretty nicely. Let me know what you think ๐
If you accept contributions, I can shoot you a quick PR for this.
I'm getting this error in this github action:
Error: Resource not accessible by integration
Warning: HttpError: Resource not accessible by integration
at /home/runner/work/_actions/pkg-size/action/v1/dist/index.js:2990:27
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async to (/home/runner/work/_actions/pkg-size/action/v1/dist/index.js:4591:9)
at async /home/runner/work/_actions/pkg-size/action/v1/dist/index.js:7912:9
The github action log is here:
https://github.com/ant-design/ant-design-mobile/runs/4029511668?check_suite_focus=true
And the related workflow config is here:
https://github.com/ant-design/ant-design-mobile/blob/master/.github/workflows/bundle-size.yml
pkg-size-action
version: v1Using the recommended yml
from the README.md
:
name: Package Size Report
on:
pull_request:
branches: [ master, develop ] # โฌ
Add other branches you want size checks on
jobs:
pkg-size-report:
name: Package Size Report
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14' # โฌ
Specify a version of Node.js to build your app
- name: Package size report
uses: pkg-size/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
results in the following error when the action is triggered:
Solution: add the following to your recommended yml
permissions:
pull-requests: write
See above
pkg-size-action
version: v1.1.1When a file is emptied, the size report interprets it as a deleted file
pkg-size-action
version:As title
For "packageManager": "[email protected]"
, we should use pnpm i
for installation and pnpm build
for build clearly
N/A
N/A
When adding this action to a non-library repo, often times the BASE and HEAD branches have different files to package. The initial repo will usually fail because the base branch includes all files which is too excessive for pkg-size to handle.
files
array (or when HEAD has one defined and BASE doesn't)Currently, if the registry isn't accessible (eg. proprietary registry behind VPN), the action hangs with no logs.
Check if the registry is connectable and log error if not.
I see the percentage differences, but I'm also interested in the raw difference values
Add the raw byte difference as a title
attribute on the percentage change
Manually passing in GITHUB_TOKEN is unnecessary.
Extracted as default input. For example:
Build time is an important aspect of a build, and this action can access that data but is not available.
An option to enable reporting on build time as well
This is a super useful package. In my specific use-case I'm working in a pretty large monolith where there are a significant number of people that only work in ruby, so a significant portion of the PRs opened in the repo don't change any js.
It would be cool if we could specify a list of files that would cause this action to only execute and comment and such if those specified files were changed.
Not sure if there is an alternative besides ignoring the comment a majority of the time. It is pretty slow though currently since there's no caching, so might also end up being added noise for a significant percentage of PRs.
In monorepo scenario, It would be great if there is package path option so the action will not run against the whole packages
name: Package size report
uses: pkg-size/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
path: path/to/package
Sometimes, it's useful to debug why a distribution is so large by assessing the content.
An option to enable uploading the build output as an artifact: https://docs.github.com/en/actions/guides/storing-workflow-data-as-artifacts
Support for monorepos.
Running pnpm i --frozen-lock
with the latest pnpm can fail if the lock was made by a different version (eg. pnpm 6 with pnpm 5 lock).
Should read pnpm version from yaml file instead.
pkg-size-action
version:I receive the following warning for this action
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
From the blog:
Action authors who are using the toolkit should update the @actions/core package to v1.10.0 or greater to get the updated saveState and setOutput functions.
pkg-size-action
version: latestA declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.