Repository navigation
Conversation
Vite 8.0 -> 8.3.4 (rolldown 1.0 -> 1.2). Build output is unchanged in shape: declarations are byte-identical, including the tag-name augmentation, and runtime JS moves by +42 B net (-52 B index.js, +94 B component chunk) from rolldown codegen changes. Also address Vite's forward-compatibility warning for the future native config loader: import package.json with a JSON import attribute and the tag-name-map helper with its file extension.
Enable isolatedDeclarations for the protocol TypeScript package so every exported value carries a type that can be emitted without type inference across files: - The generated catalog (`checkoutProtocolCatalogPayloadDecoders`, `notificationDescriptors`, `requestDescriptors`) now has explicit named types instead of `satisfies`. The three new type aliases are additive. - `EmbeddedCheckoutProtocol` is annotated with `typeof` queries instead of relying on `as const` inference over shorthand properties. - Codegen passes --isolatedDeclarations to the declaration emit so the committed .d.ts files stay compliant. The committed declarations are shorter (named mapped types rather than expanded object types) but structurally identical: Checkout Kit Web's rolled-up dist/index.d.ts is byte-for-byte unchanged. This removes the protocol-package reasons that rolldown-plugin-dts needed tsc-mode workarounds for in the #958 spike.
Bundle Size Budgets
Bundle and package sizeWeb bundle sizes cover shipped runtime JavaScript. Package sizes cover the full published archive, including any source maps, declarations, and documentation it contains.
Web package files (uncompressed)These are uncompressed file sizes; they do not sum to the compressed package size above.
React Native package files (uncompressed)These are uncompressed file sizes; they do not sum to the compressed package size above.
Android package files (uncompressed)These are uncompressed file sizes; they do not sum to the compressed package size above.
How sizes are measuredMeasured from the PR base SHA and PR head SHA. Web bundle rows sum shipped |
Coverage Report
|
Bitrise buildsInstall this buildOpen Tophat, select your target device, then click Install. Links open on the Mac running Tophat.
Checkout Kit E2E results
FailuresCaution If you believe an assertion is flaky, please raise a ticket in the #checkout-kit-devs channel so it can be addressed.
iOS — swift
|
80a4a86 to
1bc6ad1
Compare
Replace vite-plugin-dts (API Extractor) with rolldown-plugin-dts, which keeps `declare global` augmentations in the bundled declarations (microsoft/rushstack#1709). The tag-name collection workaround from #958 (scripts/tag-name-map.ts and its tests) is deleted. The HTMLElementTagNameMap entry moves from register.ts to the class module it describes: both the package root and the component entry import that module, so either import types <shopify-checkout>, and the component entry declaration stays a shim onto the root as before. The custom-elements manifest is unchanged. With #961 (Vite 8.3, Rolldown >= 1.2) and #962 (protocol declarations emittable in isolation), the plugin runs on its default isolated- declarations generator with two config lines: an oxc exclude for emitted declarations and `sideEffects: true`. No tsc-mode workarounds remain. Output: one rolled-up dist/index.d.ts with the same 26 exports as before, the protocol package still inlined, no external imports. Package file set is unchanged. The full web build is ~0.8 s end to end.
1bc6ad1 to
80a4a86
Compare
Replace vite-plugin-dts (API Extractor) with rolldown-plugin-dts, which keeps `declare global` augmentations in the bundled declarations (microsoft/rushstack#1709). The tag-name collection workaround from #958 (scripts/tag-name-map.ts and its tests) is deleted. The HTMLElementTagNameMap entry moves from register.ts to the class module it describes: both the package root and the component entry import that module, so either import types <shopify-checkout>, and the component entry declaration stays a shim onto the root as before. The custom-elements manifest is unchanged. With #961 (Vite 8.3, Rolldown >= 1.2) and #962 (protocol declarations emittable in isolation), the plugin runs on its default isolated- declarations generator with two config lines: an oxc exclude for emitted declarations and `sideEffects: true`. No tsc-mode workarounds remain. Output: one rolled-up dist/index.d.ts with the same 26 exports as before, the protocol package still inlined, no external imports. Package file set is unchanged. The full web build is ~0.8 s end to end.
What changes are you making?
Enable
isolatedDeclarationsforprotocol/languages/typescript, so every exported value has a type that can be emitted file-by-file without cross-file inference.tsc --isolatedDeclarationsreported five sites; this fixes them at the source:generate_typescript_notifications.mjs):checkoutProtocolCatalogPayloadDecoders,notificationDescriptorsandrequestDescriptorsget explicit named types (CheckoutProtocolCatalogPayloadDecoders,NotificationDescriptors,RequestDescriptors) in place ofsatisfies. The types are the same mapped types that were previously used forsatisfies; the three new aliases are additive exports.EmbeddedCheckoutProtocol: explicit annotation usingtypeofqueries instead ofas constinference over shorthand properties.isolatedDeclarations: true(+declaration: true, which it requires), sopnpm typecheckenforces this going forward.tsccall passes--isolatedDeclarationstoo, so regenerated.d.tsstay compliant.The committed
.d.tsfiles are regenerated:ProtocolNotifications.d.tsis 43 lines shorter (named mapped types instead of expanded object types) andembedded_checkout_protocol.d.tsusestypeof. Structurally identical: Checkout Kit Web's rolled-updist/index.d.tsis byte-for-byte unchanged before and after, because API Extractor resolves the named types to the same shapes it produced before.Why: this is the protocol-side half of the path recorded in #958. Four of the six config workarounds the
rolldown-plugin-dtsspike needed (generator: 'tsc',resolver: 'tsc',eager,isolatedDeclarations: false) existed only because the protocol package couldn't be emitted in isolation. With this in, a future swap torolldown-plugin-dtsneeds essentially no workarounds — and the change is worth having regardless: isolated declarations make the package's types explicit and its declaration emit parallelisable. It doesn't do the swap; that remains a separate decision.Stacked on #961 (Vite 8.3) so the eventual swap has both prerequisites in place.
How to test
Validated: protocol typecheck with isolated declarations, 88 protocol tests, web lint / 337 unit / build / 9 built-package tests / snapshot, and the web
index.d.tsdiff is empty.Before you merge
Important
isolatedDeclarationsenforcement in typecheck and existing suites)