From 9bf0bb3044a9dd603225e967296be8d2b0399c10 Mon Sep 17 00:00:00 2001 From: Daniel Kift Date: Thu, 8 Oct 2026 14:22:44 +0100 Subject: [PATCH] Budget Web bundle bytes per source package Add soft/hard budgets for the code each package contributes to the shipped Web JavaScript, measured with `bundlePackage`: - @shopify/checkout-kit: 18 / 24 KiB (currently 15.9 KiB) - @shopify/checkout-kit-protocol: 16 / 20 KiB (currently 14.3 KiB) - @shopify/checkout-kit-telemetry: 5 / 8 KiB (currently 4.2 KiB) Requires the `bundlePackage` measurement on the default branch; until then Size budgets rejects this budget file. --- .ci/bundle-size-budgets.json | 18 ++++++++++++++++++ .ci/bundle-size-budgets.md | 8 ++++++++ 2 files changed, 26 insertions(+) diff --git a/.ci/bundle-size-budgets.json b/.ci/bundle-size-budgets.json index e5138d363..c898c380c 100644 --- a/.ci/bundle-size-budgets.json +++ b/.ci/bundle-size-budgets.json @@ -4,6 +4,24 @@ "measurement": "bundle", "softKiB": 40, "hardKiB": 50 + }, + "checkoutKit": { + "measurement": "bundlePackage", + "package": "@shopify/checkout-kit", + "softKiB": 18, + "hardKiB": 24 + }, + "protocol": { + "measurement": "bundlePackage", + "package": "@shopify/checkout-kit-protocol", + "softKiB": 16, + "hardKiB": 20 + }, + "telemetry": { + "measurement": "bundlePackage", + "package": "@shopify/checkout-kit-telemetry", + "softKiB": 5, + "hardKiB": 8 } }, "react-native": { diff --git a/.ci/bundle-size-budgets.md b/.ci/bundle-size-budgets.md index 498517987..22254ab3b 100644 --- a/.ci/bundle-size-budgets.md +++ b/.ci/bundle-size-budgets.md @@ -39,6 +39,14 @@ Budget one package with `"measurement": "bundlePackage"` and its npm name: } ``` +Configured Web package budgets (uncompressed, minified bytes): + +| Package | Soft limit | Hard limit | +| --- | --- | --- | +| `@shopify/checkout-kit` | 18 KiB | 24 KiB | +| `@shopify/checkout-kit-protocol` | 16 KiB | 20 KiB | +| `@shopify/checkout-kit-telemetry` | 5 KiB | 8 KiB | + A budgeted package that no longer contributes bytes reports a missing measurement. Remove or rename its budget in the same change. Accepting a per-package breach records that package, so the acceptance cannot satisfy