fix(ga4, sap, mux): use sdk.cma instead of manual createClient [AIS-59]#11037
Open
Jared Jolton (jjolton-contentful) wants to merge 2 commits into
Open
fix(ga4, sap, mux): use sdk.cma instead of manual createClient [AIS-59]#11037Jared Jolton (jjolton-contentful) wants to merge 2 commits into
Jared Jolton (jjolton-contentful) wants to merge 2 commits into
Conversation
app-sdk >=4.58.0 introduces a nested contentful-management@12 dep that
conflicts with apps' own v11 direct dep when bundled by react-scripts,
causing "createClient is not a function" at runtime.
Replace createClient({ apiAdapter: sdk.cmaAdapter }, ...) with sdk.cma
(the pre-configured plain CMA client the SDK already provides):
- google-analytics-4: fetchAllContentTypes uses sdk.cma.contentType.getMany
- sap-commerce-cloud: config useEffect uses sdk.cma.contentType/editorInterface.getMany
- mux: class component stores sdk.cma directly instead of constructing a client
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1c23c02 to
74ca92b
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
app-sdk>=4.58.0 introduces a nestedcontentful-management@12dependency that conflicts with apps' own v11 direct dep when bundled, causingcreateClient is not a functionat runtime (same root cause as marketplace-partner-apps#8449 for vwo-fme)google-analytics-4:fetchAllContentTypesrewritten to usesdk.cma.contentType.getManyinstead ofgetSpace().getEnvironment().getContentTypes()sap-commerce-cloud: configuseEffectrewritten to usesdk.cma.contentType.getManyandsdk.cma.editorInterface.getManymux: class component storessdk.cmadirectly instead of constructing a plain client fromsdk.cmaAdapterTest plan
createClient is not a functionerrors in any of the three appsGenerated with Claude Code