Skip to content
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

feat: define and check dist size limit [KHCP-7179] #455

Merged
merged 9 commits into from
May 26, 2023
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ jobs:
# The `...` syntax tells pnpm to include dependent packages
run: pnpm --stream --filter "...${{steps.changed_packages.outputs.filter}}..." run build

- name: Check dist bundle size against max-limit
uses: Kong/github-action-dist-size-checker@main

- name: Publish Previews
if: ${{github.event_name == 'pull_request' && steps.changed_packages.outputs.filter != ''}}
run: |
Expand Down
3 changes: 3 additions & 0 deletions packages/analytics/analytics-utilities/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
"volta": {
"extends": "../../../package.json"
},
"distSizeChecker": {
"errorLimit": "500KB"
},
"dependencies": {
"date-fns": "^2.30.0"
}
Expand Down
3 changes: 3 additions & 0 deletions packages/analytics/metric-cards/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,8 @@
"license": "Apache-2.0",
"volta": {
"extends": "../../../package.json"
},
"distSizeChecker": {
"errorLimit": "500KB"
}
}
3 changes: 3 additions & 0 deletions packages/core/app-layout/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@
"license": "Apache-2.0",
"volta": {
"extends": "../../../package.json"
},
"distSizeChecker": {
"errorLimit": "500KB"
}
}
3 changes: 3 additions & 0 deletions packages/core/cli/src/__template__/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,8 @@
"license": "Apache-2.0",
"volta": {
"extends": "../../../package.json"
},
"distSizeChecker": {
"errorLimit": "200KB"
}
}
3 changes: 3 additions & 0 deletions packages/core/copy-uuid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,8 @@
"license": "Apache-2.0",
"volta": {
"extends": "../../../package.json"
},
"distSizeChecker": {
"errorLimit": "250KB"
}
}
3 changes: 3 additions & 0 deletions packages/core/i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
"volta": {
"extends": "../../../package.json"
},
"distSizeChecker": {
"errorLimit": "300KB"
},
"peerDependencies": {
"vue": "^3.2.47"
},
Expand Down
6 changes: 4 additions & 2 deletions packages/core/misc-widgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
"author": "Kong, Inc.",
"license": "Apache-2.0",
"volta": {
"extends": "../../../package.json",
"yarn": "1.22.19"
"extends": "../../../package.json"
},
"distSizeChecker": {
"errorLimit": "250KB"
}
}
3 changes: 3 additions & 0 deletions packages/portal/document-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,8 @@
"license": "Apache-2.0",
"volta": {
"extends": "../../../package.json"
},
"distSizeChecker": {
"errorLimit": "3MB"
}
}
3 changes: 3 additions & 0 deletions packages/portal/spec-renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,8 @@
"license": "Apache-2.0",
"volta": {
"extends": "../../../package.json"
},
"distSizeChecker": {
"errorLimit": "7.5MB"
}
}
3 changes: 3 additions & 0 deletions packages/portal/swagger-ui-web-component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
"volta": {
"extends": "../../../package.json"
},
"distSizeChecker": {
"errorLimit": "3MB"
},
"devDependencies": {
"css-loader": "^6.7.3",
"raw-loader": "^4.0.2",
Expand Down