Skip to content

Commit 26a67ab

Browse files
committed
chore: Package size reports.
1 parent 6cbf4f9 commit 26a67ab

File tree

5 files changed

+47
-0
lines changed

5 files changed

+47
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: sdk/browser/package-size
2+
3+
on:
4+
pull_request:
5+
branches: [main, 'feat/**']
6+
paths-ignore:
7+
- '**.md'
8+
9+
jobs:
10+
package-size:
11+
uses: launchdarkly/js-core/.github/workflows/package-size.yml@rlamb/sdk-167/bundle-size-report
12+
with:
13+
workspace_name: '@launchdarkly/js-client-sdk'
14+
workspace_path: 'packages/sdk/browser'

.github/workflows/browser.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,8 @@ jobs:
3131
with:
3232
workspace_name: '@launchdarkly/js-client-sdk'
3333
workspace_path: packages/sdk/browser
34+
package-size:
35+
uses: launchdarkly/js-core/.github/workflows/package-size.yml@rlamb/sdk-167/bundle-size-report
36+
with:
37+
workspace_name: '@launchdarkly/js-client-sdk'
38+
workspace_path: 'packages/sdk/browser'

.github/workflows/package-size.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Package size report.
2+
on:
3+
workflow_call:
4+
inputs:
5+
workspace_name:
6+
type: string
7+
description: 'Name, from the package.json, of the package to build/test.'
8+
required: true
9+
workspace_path:
10+
type: string
11+
description: 'Path to the package to release.'
12+
required: true
13+
14+
permissions:
15+
pull-requests: write
16+
jobs:
17+
size:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: andresz1/size-limit-action@v1
22+
with:
23+
directory: ${{ inputs.workspace_path }}
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
build_script: build-with-deps
26+
package_manager: yarn

packages/sdk/browser/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"scripts": {
4949
"clean": "rimraf dist",
5050
"build": "tsup",
51+
"build-with-deps": "yarn workspaces foreach -pR --topological-dev --from '@launchdarkly/js-client-sdk' run build",
5152
"lint": "eslint . --ext .ts,.tsx",
5253
"prettier": "prettier --write '**/*.@(js|ts|tsx|json|css)' --ignore-path ../../../.prettierignore",
5354
"test": "npx jest --runInBand",

packages/shared/sdk-client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"make-esm-package-json": "echo '{\"type\":\"module\"}' > dist/esm/package.json",
3636
"make-package-jsons": "npm run make-cjs-package-json && npm run make-esm-package-json",
3737
"build": "npx tsc --noEmit && rollup -c rollup.config.js && npm run make-package-jsons",
38+
"build-with-deps": "yarn workspaces foreach -pR --topological-dev --from '@launchdarkly/js-client-sdk-common' run build",
3839
"clean": "rimraf dist",
3940
"lint": "npx eslint . --ext .ts",
4041
"lint:fix": "yarn run lint -- --fix",

0 commit comments

Comments
 (0)