Skip to content

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

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

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

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 export, which points at files that are never built or published.
  • Add publint + attw as devDependencies and run them in CI after a package build to validate that every entry point resolves in the packed tarball and 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 don't resolve under node10 module resolution, which the generated extension templates use. With the fixes reverted, publint fails on the missing point-of-sale/preact files and attw reports a node10 resolution failure for ./preact; with them applied, both checks pass.

Backport of #4645 to 2026-01.

- 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
henryStelle force-pushed the henry/backport-preact-entry-points-2026-01 branch from 2007ec8 to df830c8 Compare August 21, 2026 20:37
@henryStelle
henryStelle marked this pull request as ready for review August 21, 2026 20:42
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