Skip to content

Fix preact entry points; validate package.json integrity in CI (publint + attw) - #4645

Merged
henryStelle merged 1 commit into
2026-10-rcfrom
henry/preact-typesversions-2026-10-rc
Aug 25, 2026
Merged

Fix preact entry points; validate package.json integrity in CI (publint + attw)#4645
henryStelle merged 1 commit into
2026-10-rcfrom
henry/preact-typesversions-2026-10-rc

Conversation

@henryStelle

@henryStelle henryStelle commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Problem

The storage.current subscribable 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

  • Synced db/data/docs/templated_apis/pos_ui_extensions/2026-10-rc/ generated JSON from Shopify/ui-extensions@2026-10-rc (adds Storage.current as a required property, SubscribableStorage, ReadonlySignalLike). The current property row on the Storage API page carries the reference detail (cross-target reactivity, async-hydration undefined caveat, 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.
  • Two new examples forming one flow: the background target owns a loyaltyPoints key (single writer, customer-change triggered, stale-response guard) and a tile renders it reactively via shopify.storage.current.loyaltyPoints.value (with the @shopify/ui-extensions/preact import, matching cart/locale examples).

Risk

  1. Visibility: Changes to existing reference pages for the 2026-10-rc API version only.
  2. Impact: No nav changes. The JSON sync also carries unrelated upstream changes (validation events, removal of pos.cart.line-item-details.action.render), confirmed expected.
  3. Type: New feature docs on existing pages.
  4. Unknowns: None outstanding.

Follow-up

  • Developer changelog entry (published through the changelog system, not this repo).
  • Broader treatment of signal reactivity across POS target API docs (cart, connectivity, locale, session all expose ReadonlySignalLike values); 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

@henryStelle
henryStelle marked this pull request as ready for review August 21, 2026 16:47
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 kumar303 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why we didn't need preact in typesVersions before but it seems right 👍

@henryStelle

Copy link
Copy Markdown
Contributor Author

/snapit

@shopify-github-actions-access

Copy link
Copy Markdown
Contributor

🫰✨ Thanks @henryStelle! Your snapshots have been published to npm.

Test the snapshots by updating your package.json with the newly published versions:

"@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
henryStelle force-pushed the henry/preact-typesversions-2026-10-rc branch from e62b515 to 455b3ef Compare August 25, 2026 22:49
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
@henryStelle
henryStelle merged commit acbaf2d into 2026-10-rc Aug 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants