{"id":16439214,"url":"https://github.com/posva/size-check-action","last_synced_at":"2025-09-11T06:31:31.192Z","repository":{"id":53096878,"uuid":"302690637","full_name":"posva/size-check-action","owner":"posva","description":"A custom size action","archived":false,"fork":false,"pushed_at":"2024-05-27T08:44:32.000Z","size":1618,"stargazers_count":29,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T17:52:45.451Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/posva.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-09T16:05:23.000Z","updated_at":"2025-02-28T08:05:06.000Z","dependencies_parsed_at":"2022-08-22T15:00:55.694Z","dependency_job_id":null,"html_url":"https://github.com/posva/size-check-action","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/posva/size-check-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posva%2Fsize-check-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posva%2Fsize-check-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posva%2Fsize-check-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posva%2Fsize-check-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posva","download_url":"https://codeload.github.com/posva/size-check-action/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posva%2Fsize-check-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274589507,"owners_count":25312971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T09:08:31.337Z","updated_at":"2025-09-11T06:31:30.821Z","avatar_url":"https://github.com/posva.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Size Limit Action\" src=\"/assets/logo.png\" width=\"220\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  A GitHub action that compares the real cost of your JavaScript in every pull request\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"tests status\" src=\"https://github.com/andresz1/size-limit-action/workflows/test/badge.svg\"\u003e\n\u003c/p\u003e\n\nThis action uses [Size Limit](https://github.com/ai/size-limit) (performance budget tool for JavaScript) to calculate the real cost of your JavaScript for end-users. The main features of this action are:\n\n- **Commenting** pull requests with the comparison of Size Limit output.\n- **Rejecting** a pull request if the cost exceeds the limit.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"pr comment\" width=\"540\" src=\"/assets/pr.png\"\u003e\n\u003c/p\u003e\n\n## Usage\n1. Install Size Limit choosing the scenario that fits you better ([JS Application](https://github.com/ai/size-limit#js-applications), [Big Libraries](https://github.com/ai/size-limit#big-libraries) or [Small Libraries](https://github.com/ai/size-limit#small-libraries)).\n2. By default this action will try to build your PR by running `build` [npm script](https://docs.npmjs.com/misc/scripts) located in your `package.json`. If something need to be done after dependencies are installed but before building `postinstall` npm script could be used. For example, using [lerna](https://github.com/lerna/lerna):\n```json\n\"scripts\": {\n  \"postinstall\": \"lerna bootstrap\",\n  \"build\": \"lerna run build\"\n},\n```\n3. Define Size limit configuration. For example (inside `package.json`):\n```json\n\"size-limit\": [\n  {\n    \"path\": \"dist/index.js\",\n    \"limit\": \"4500 ms\"\n  }\n]\n```\n4. Add the following action inside `.github/workflows/size-limit.yml`\n```yaml\nname: \"size\"\non:\n  pull_request:\n    branches:\n      - master\njobs:\n  size:\n    runs-on: ubuntu-latest\n    env:\n      CI_JOB_NUMBER: 1\n    steps:\n      - uses: actions/checkout@v1\n      - uses: andresz1/size-limit-action@v1.4.0\n        with:\n          github_token: ${{ secrets.GITHUB_TOKEN }}\n```\nYou can optionally specify a custom npm script to run instead of the default `build` adding a `build_script` option to the yml workflow shown above. Additionally, providing a `skip_step` option will tell the action to skip either the `install` or `build` phase.\n\n```yaml\nwith:\n  github_token: ${{ secrets.GITHUB_TOKEN }}\n  build_script: custom-build\n  skip_step: install\n```\n\n5. You are now all set\n\n### Customizing working directory\n    \n`directory` option allow to run all the tasks in a subfolder.\nIt's only convenient if all your stuff is in a subdirectory of your git repository.\n\nFor instance, if `package.json` is in the subfolder `client/`:\n\n```yaml\nwith:\n  github_token: ${{ secrets.GITHUB_TOKEN }}\n  build_script: custom-build\n  skip_step: install\n  directory: client/\n```\n\n## Releasing\n\nNotes when releasing\n\n- `yarn run build`\n- `git commit`\n- `git tag v1.1.2`\n- `git push --follow-tags` or `git push origin v1.1.2`\n\n## Feedback\n\nPull requests, feature ideas and bug reports are very welcome. We highly appreciate any feedback.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposva%2Fsize-check-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposva%2Fsize-check-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposva%2Fsize-check-action/lists"}