Skip to content

[2025-10] Fix preact entry points; validate package.json integrity in CI (publint + attw) - #4647

Open
henryStelle wants to merge 1 commit into
2025-10from
henry/backport-preact-entry-points-2025-10
Open

[2025-10] Fix preact entry points; validate package.json integrity in CI (publint + attw)#4647
henryStelle wants to merge 1 commit into
2025-10from
henry/backport-preact-entry-points-2025-10

Conversation

@henryStelle

Copy link
Copy Markdown
Contributor

What

  • Add a typesVersions["*"] entry for ./preact so @shopify/ui-extensions/preact types resolve under TypeScript's legacy moduleResolution: "node" (node10), matching the existing checkout/preact and customer-account/preact entries.
  • Remove the dead ./point-of-sale/preact exports entry, which points at files that are never built or published; POS extensions should use the generic @shopify/ui-extensions/preact entry point.
  • Add publint + attw (@arethetypeswrong/cli) validation to CI so entry-point regressions fail the PR, with attw ignoring the pre-existing, harmless false-cjs rule (ESM types declared as .d.ts rather than .d.mts).

Why

import "@shopify/ui-extensions/preact" is required for signal-driven re-rendering, but its types do not resolve under node10 module resolution, which the generated extension templates use. This branch matters in particular because extensions-templates pins @shopify/ui-extensions@2025.10.x. Verified locally: with the two package.json fixes reverted, publint errors on the missing point-of-sale/preact files and attw reports node10 resolution failure for ./preact; with the fixes applied, both checks pass.

Backport of #4645 to 2025-10.

@henryStelle
henryStelle marked this pull request as ready for review August 21, 2026 20:35
@henryStelle
henryStelle marked this pull request as draft August 21, 2026 20:36
- 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
henryStelle force-pushed the henry/backport-preact-entry-points-2025-10 branch from 437b7f2 to fdb216b Compare August 21, 2026 20:37
@henryStelle
henryStelle marked this pull request as ready for review August 21, 2026 20:40
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.

1 participant