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

chore: Package size reports. #641

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
31 changes: 31 additions & 0 deletions .github/workflows/package-size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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
env:
CI: 0
steps:
- name: Setup Yarn
shell: bash
run: yarn set version 3.4.1
- uses: actions/checkout@v4
- uses: andresz1/size-limit-action@94bc357df29c36c8f8d50ea497c3e225c3c95d1d
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
Loading