Fix preact entry points; validate package.json integrity in CI (publint + attw) - #4645
Merged
Merged
Conversation
henryStelle
marked this pull request as ready for review
August 21, 2026 16:47
vividviolet
approved these changes
Aug 21, 2026
This was referenced Aug 21, 2026
Merged
Merged
Merged
henryStelle
added a commit
that referenced
this pull request
Aug 21, 2026
- Add a typesVersions entry for ./preact so its types resolve under moduleResolution 'node' (node10), matching checkout/preact and customer-account/preact. - Remove the dead ./point-of-sale/preact exports entry, which points at files that are never built or published. - Add publint and @arethetypeswrong/cli as devDependencies with package:publint / package:attw scripts. - Run both tools in CI after a package build so entry-point regressions fail the PR (attw ignores the pre-existing, harmless false-cjs rule). Backport of e62b515 (#4645) to 2025-10. Assisted-By: devx/7ecfa2dd-8bc7-47b2-a5ad-0ec47a969483
henryStelle
added a commit
that referenced
this pull request
Aug 21, 2026
- Add a typesVersions entry for ./preact so its types resolve under moduleResolution 'node' (node10), matching checkout/preact and customer-account/preact. - Remove the dead ./point-of-sale/preact exports entry, which points at files that are never built or published. - Add publint and @arethetypeswrong/cli as devDependencies with package:publint / package:attw scripts. - Run both tools in CI after a package build so entry-point regressions fail the PR (attw ignores false-cjs, which is pre-existing and harmless for bundled extension code). Backport of e62b515 (#4645) to 2026-01. Assisted-By: devx/ffe30952-4960-4347-b0e5-48d8697405ff
kumar303
approved these changes
Aug 24, 2026
kumar303
left a comment
Contributor
There was a problem hiding this comment.
I'm not sure why we didn't need preact in typesVersions before but it seems right 👍
vctrchu
approved these changes
Aug 25, 2026
Contributor
Author
|
/snapit |
Contributor
|
🫰✨ Thanks @henryStelle! Your snapshots have been published to npm. Test the snapshots by updating your "@shopify/ui-extensions": "0.0.0-snapshot-20260825224320",
"@shopify/ui-extensions-tester": "0.0.0-snapshot-20260825224320" |
- Add a typesVersions entry for ./preact so its types resolve under moduleResolution 'node' (node10), matching checkout/preact and customer-account/preact. Without it, import '@shopify/ui-extensions/preact' fails to resolve types in node10 projects (including the generated extension templates). - Remove the dead ./point-of-sale/preact exports entry. Its source file was deliberately deleted in 75cf356 ('Remove preact file to fix build') along with its typesVersions entry, but the exports entry was left behind pointing at files that are never built or published. The import has never resolved in any released version. - Add publint and @arethetypeswrong/cli (both already used elsewhere at Shopify, e.g. Shopify/worldwide and checkout-kit) as devDependencies with package:publint / package:attw scripts, and run them in CI after the build so both classes of regression fail the PR: - publint: exports entries must point at files that ship in the tarball - attw: types must resolve under every moduleResolution mode, including node10 (typesVersions parity with exports) attw runs with --ignore-rules false-cjs: the pre-existing lack of .d.mts type splits is harmless for bundled extension code.
henryStelle
force-pushed
the
henry/preact-typesversions-2026-10-rc
branch
from
August 25, 2026 22:49
e62b515 to
455b3ef
Compare
henryStelle
added a commit
that referenced
this pull request
Aug 25, 2026
#4646) - Add a typesVersions entry for ./preact so its types resolve under moduleResolution 'node' (node10), matching checkout/preact and customer-account/preact. - Remove the dead ./point-of-sale/preact exports entry, which points at files that are never built or published. - Add publint and @arethetypeswrong/cli as devDependencies with package:publint / package:attw scripts, and run them in CI after the build (attw with --ignore-rules false-cjs for the pre-existing .d.ts vs .d.mts split, harmless for bundled extension code). - Add a patch changeset. Backport of e62b515 (#4645) to 2026-04. Assisted-By: devx/6b10e95a-83bf-4991-ad7d-82f1c1f5ace6
henryStelle
added a commit
that referenced
this pull request
Aug 25, 2026
#4647) - Add a typesVersions entry for ./preact so its types resolve under moduleResolution 'node' (node10), matching checkout/preact and customer-account/preact. - Remove the dead ./point-of-sale/preact exports entry, which points at files that are never built or published. - Add publint and @arethetypeswrong/cli as devDependencies with package:publint / package:attw scripts. - Run both tools in CI after a package build so entry-point regressions fail the PR (attw ignores the pre-existing, harmless false-cjs rule). Backport of e62b515 (#4645) to 2025-10. Assisted-By: devx/7ecfa2dd-8bc7-47b2-a5ad-0ec47a969483
henryStelle
added a commit
that referenced
this pull request
Aug 25, 2026
#4648) - Add a typesVersions entry for ./preact so its types resolve under moduleResolution 'node' (node10), matching checkout/preact and customer-account/preact. - Remove the dead ./point-of-sale/preact exports entry, which points at files that are never built or published. - Add publint and @arethetypeswrong/cli as devDependencies with package:publint / package:attw scripts. - Run both tools in CI after a package build so entry-point regressions fail the PR (attw ignores false-cjs, which is pre-existing and harmless for bundled extension code). Backport of e62b515 (#4645) to 2026-01. Assisted-By: devx/ffe30952-4960-4347-b0e5-48d8697405ff
henryStelle
added a commit
that referenced
this pull request
Aug 25, 2026
#4649) - Add a typesVersions entry for ./preact so its types resolve under moduleResolution 'node' (node10), matching checkout/preact and customer-account/preact. - Remove the dead ./point-of-sale/preact exports entry, which points at files that are never built or published. - Add publint and @arethetypeswrong/cli as devDependencies with package:publint / package:attw scripts (attw ignores the pre-existing, harmless false-cjs rule). - Run both tools in CI after the build so entry-point regressions fail the PR. Backport of e62b515 (#4645) to 2026-07. Assisted-By: devx/09e297fa-f87b-4f47-8683-6c71df04a146
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
storage.currentsubscribable API for POS UI extensions shipped in API version 2026-10 (types: #4235, runtime: shop/world#554969), but has no public docs, so partners can't discover or correctly use it.Closes: https://github.com/shop/issues-retail/issues/33718
Solution
db/data/docs/templated_apis/pos_ui_extensions/2026-10-rc/generated JSON fromShopify/ui-extensions@2026-10-rc(addsStorage.currentas a required property,SubscribableStorage,ReadonlySignalLike). Thecurrentproperty row on the Storage API page carries the reference detail (cross-target reactivity, async-hydrationundefinedcaveat,subscribe()semantics).target-apis/platform-apis/storage-api.mdx: reactive access mentioned in the intro, cross-target communication use case, and a single-writer-per-key best practice.targets/app-background.mdx: "Share data with render targets" example.loyaltyPointskey (single writer, customer-change triggered, stale-response guard) and a tile renders it reactively viashopify.storage.current.loyaltyPoints.value(with the@shopify/ui-extensions/preactimport, matching cart/locale examples).Risk
pos.cart.line-item-details.action.render), confirmed expected.Follow-up
ReadonlySignalLikevalues); deliberately kept out of this PR.Top-hatting
Preview: https://pr-1007240.shopify-dev.shopify.io / comment shell
Forward port of: #4646, #4647, #4648, #4649