diff --git a/.github/workflows/browser.yml b/.github/workflows/browser.yml index d680e33ac..1442c4a56 100644 --- a/.github/workflows/browser.yml +++ b/.github/workflows/browser.yml @@ -41,3 +41,4 @@ jobs: target_file: 'packages/sdk/browser/dist/index.js' package_name: '@launchdarkly/js-client-sdk' pr_number: ${{ github.event.number }} + size_limit: 21000 diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 27de974c0..a64766e4c 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -33,3 +33,4 @@ jobs: target_file: 'packages/shared/common/dist/esm/index.mjs' package_name: '@launchdarkly/js-sdk-common' pr_number: ${{ github.event.number }} + size_limit: 21000 diff --git a/.github/workflows/sdk-client.yml b/.github/workflows/sdk-client.yml index 8dc250891..2c2fbaa7b 100644 --- a/.github/workflows/sdk-client.yml +++ b/.github/workflows/sdk-client.yml @@ -30,3 +30,4 @@ jobs: target_file: 'packages/shared/sdk-client/dist/esm/index.mjs' package_name: '@launchdarkly/js-client-sdk-common' pr_number: ${{ github.event.number }} + size_limit: 20000 diff --git a/actions/package-size/action.yml b/actions/package-size/action.yml index 3ad6e6eaa..4413259e9 100644 --- a/actions/package-size/action.yml +++ b/actions/package-size/action.yml @@ -11,7 +11,10 @@ inputs: description: 'The name of the package' required: true pr_number: - description: 'Th PR number' + description: 'The PR number' + required: true + size_limit: + description: 'The maximum size of the library' required: true runs: using: composite @@ -44,6 +47,7 @@ runs: ${{ inputs.package_name }} size report This is the brotli compressed size of the ESM build. Size: ${{ env.PACK_SIZE }} bytes + Size limit: ${{ inputs.size_limit }} - name: Update comment if: steps.fc.outputs.comment-id != '' @@ -55,8 +59,9 @@ runs: ${{ inputs.package_name }} size report This is the brotli compressed size of the ESM build. Size: ${{ env.PACK_SIZE }} bytes + Size limit: ${{ inputs.size_limit }} - name: Check package size limit shell: bash run: | - [ $PACK_SIZE -le 25000 ] || exit 1 + [ $PACK_SIZE -le ${{ inputs.size_limit }} ] || exit 1