Skip to content

[2026-04] Fix preact entry points; validate package.json integrity in CI (publint + attw) - #4646

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

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

Conversation

@henryStelle

Copy link
Copy Markdown
Contributor

What

  • Add a typesVersions["*"] entry for ./preact so @shopify/ui-extensions/preact types resolve under moduleResolution: "node" (node10), matching the existing checkout/preact and customer-account/preact entries.
  • Remove the dead ./point-of-sale/preact export, which points at files that are never built or published.
  • Run publint and @arethetypeswrong/cli in CI after the build to validate that every entry point ships in the npm tarball and that types resolve under every moduleResolution mode (attw ignores false-cjs, a pre-existing .d.ts-vs-.d.mts split that is harmless for bundled extension code).

Why

import "@shopify/ui-extensions/preact" is required for signal-driven re-rendering, but its types fail to resolve under node10 module resolution, which the generated extension templates use. With the fixes reverted, both new CI checks fail (publint errors on the missing point-of-sale/preact files; attw reports node10 resolution failure for ./preact); with them applied, both pass.

Backport of #4645 to 2026-04.

- 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
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