Skip to content

Commit

Permalink
chore: Package size reports.
Browse files Browse the repository at this point in the history
  • Loading branch information
kinyoklion committed Oct 29, 2024
1 parent 6cbf4f9 commit 26a67ab
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/browser-package-size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: sdk/browser/package-size

on:
pull_request:
branches: [main, 'feat/**']
paths-ignore:
- '**.md'

jobs:
package-size:
uses: launchdarkly/js-core/.github/workflows/package-size.yml@rlamb/sdk-167/bundle-size-report
with:
workspace_name: '@launchdarkly/js-client-sdk'
workspace_path: 'packages/sdk/browser'
5 changes: 5 additions & 0 deletions .github/workflows/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ jobs:
with:
workspace_name: '@launchdarkly/js-client-sdk'
workspace_path: packages/sdk/browser
package-size:
uses: launchdarkly/js-core/.github/workflows/package-size.yml@rlamb/sdk-167/bundle-size-report
with:
workspace_name: '@launchdarkly/js-client-sdk'
workspace_path: 'packages/sdk/browser'
26 changes: 26 additions & 0 deletions .github/workflows/package-size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Package size report.
on:
workflow_call:
inputs:
workspace_name:
type: string
description: 'Name, from the package.json, of the package to build/test.'
required: true
workspace_path:
type: string
description: 'Path to the package to release.'
required: true

permissions:
pull-requests: write
jobs:
size:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: andresz1/size-limit-action@v1
with:
directory: ${{ inputs.workspace_path }}
github_token: ${{ secrets.GITHUB_TOKEN }}
build_script: build-with-deps
package_manager: yarn
1 change: 1 addition & 0 deletions packages/sdk/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"scripts": {
"clean": "rimraf dist",
"build": "tsup",
"build-with-deps": "yarn workspaces foreach -pR --topological-dev --from '@launchdarkly/js-client-sdk' run build",
"lint": "eslint . --ext .ts,.tsx",
"prettier": "prettier --write '**/*.@(js|ts|tsx|json|css)' --ignore-path ../../../.prettierignore",
"test": "npx jest --runInBand",
Expand Down
1 change: 1 addition & 0 deletions packages/shared/sdk-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"make-esm-package-json": "echo '{\"type\":\"module\"}' > dist/esm/package.json",
"make-package-jsons": "npm run make-cjs-package-json && npm run make-esm-package-json",
"build": "npx tsc --noEmit && rollup -c rollup.config.js && npm run make-package-jsons",
"build-with-deps": "yarn workspaces foreach -pR --topological-dev --from '@launchdarkly/js-client-sdk-common' run build",
"clean": "rimraf dist",
"lint": "npx eslint . --ext .ts",
"lint:fix": "yarn run lint -- --fix",
Expand Down

0 comments on commit 26a67ab

Please sign in to comment.