fix(push-notifications): add customer-profiles subpath package.json for legacy/Metro resolution - #14899
Merged
Merged
Conversation
…or legacy/Metro resolution
|
osama-rizk
approved these changes
Jul 30, 2026
sarayev
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds the missing legacy subpath
package.json"shim" for theaws-amplify/push-notifications/customer-profilessubpath introduced in #14866.Modern bundlers resolve this subpath via the
"exports"map inpackages/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 apackage.jsonwithmain/module/react-native/browser/typingsfields.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 resolveaws-amplify/push-notifications/customer-profiles.Changes
packages/aws-amplify/push-notifications/customer-profiles/package.jsonIt mirrors the pinpoint shim exactly; the only textual difference is the service-name segment (
pinpoint→customer-profiles):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
Follow-up to #14866.