Skip to content

fix(push-notifications): add customer-profiles subpath package.json for legacy/Metro resolution - #14899

Merged
soberm merged 1 commit into
mainfrom
fix-customer-profiles-push-subpath-shim
Jul 30, 2026
Merged

fix(push-notifications): add customer-profiles subpath package.json for legacy/Metro resolution#14899
soberm merged 1 commit into
mainfrom
fix-customer-profiles-push-subpath-shim

Conversation

@soberm

@soberm soberm commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the missing legacy subpath package.json "shim" for the aws-amplify/push-notifications/customer-profiles subpath introduced in #14866.

Modern bundlers resolve this subpath via the "exports" map in packages/aws-amplify/package.json. However, older bundlers — and notably Metro (React Native) in its default/legacy resolution mode — ignore the "exports" field entirely and instead resolve a subpath by looking for a real directory containing a package.json with main/module/react-native/browser/typings fields.

The sibling pinpoint provider already ships this shim at packages/aws-amplify/push-notifications/pinpoint/package.json, but no equivalent existed for customer-profiles. Since the Customer Profiles push provider is React-Native-only, this gap directly affects the only supported platform for the feature: consumers on legacy Metro resolution would fail to resolve aws-amplify/push-notifications/customer-profiles.

Changes

  • New file: packages/aws-amplify/push-notifications/customer-profiles/package.json

It mirrors the pinpoint shim exactly; the only textual difference is the service-name segment (pinpointcustomer-profiles):

sed 's/customer-profiles/pinpoint/g' push-notifications/customer-profiles/package.json \
  | diff - push-notifications/pinpoint/package.json   # no differences

The relative dist paths match the pattern already declared in the top-level "exports" entry for ./push-notifications/customer-profiles, and all five referenced files exist in a local build (dist/cjs/.../index.js, dist/esm/.../index.mjs, dist/esm/.../index.d.ts).

Notes

  • No runtime/source code changes. No export strings, API surface, or storage keys were touched.
  • Packaging-parity only; no behavior change for existing consumers.

Follow-up to #14866.

@soberm
soberm requested a review from a team as a code owner July 30, 2026 06:53
@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1ab6cc2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@soberm
soberm merged commit e1067a9 into main Jul 30, 2026
43 checks passed
@soberm
soberm deleted the fix-customer-profiles-push-subpath-shim branch July 30, 2026 08: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.

3 participants