Skip to content

refactor: SDKE 283 remove cart related function from persistence#1073

Merged
jaissica12 merged 7 commits into
developmentfrom
refactor/SDKE-283-remove-cart-related-function-from-persistence
Oct 6, 2025
Merged

refactor: SDKE 283 remove cart related function from persistence#1073
jaissica12 merged 7 commits into
developmentfrom
refactor/SDKE-283-remove-cart-related-function-from-persistence

Conversation

@jaissica12

Copy link
Copy Markdown
Contributor

Instructions

  1. PR target branch should be against development
  2. PR title name should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-title-check.yml
  3. PR branch prefix should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-branch-check-name.yml

Summary

  • Removed functions related to cart products across code since that is deprecated.

Testing Plan

  • Was this tested locally? If not, explain why.
  • {explain how this has been tested, and what, if any, additional testing should be done}

Reference Issue (For mParticle employees only. Ignore if you are an outside contributor)

@alexs-mparticle alexs-mparticle left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check with @rmi22186 for a second review since this touches a lot of older code, but it looks good to me.

@rmi22186 rmi22186 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nits

Comment thread src/identity.js Outdated
Comment thread src/identity.js Outdated
Comment thread src/identity.js Outdated
Comment thread src/identity.js Outdated
Comment thread src/mp-instance.ts Outdated
@jaissica12 jaissica12 requested a review from rmi22186 October 1, 2025 21:09
Comment thread src/identity.js Outdated
Comment thread src/identity.js Outdated
Comment thread src/utils.ts
Comment thread src/utils.ts
Comment thread test/src/tests-eCommerce.js Outdated
Comment thread test/src/tests-identity.ts
);

done();
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. This is giving me some pause. I am actually not sure if Android and iOS carts are deprecated or not. Basically in web bridge mode (when MP is embedded in a web view in a native app), when a developer calls various commands, instead of going through the code of the web sdk, it will bridge to the ios/android layers and send the data to native, and native handles the rest.

@Mansi-mParticle and @BrandonStalnaker - The context here is that we have warned developers that the mParticle Cart API has been deprecated for several years now and are looking to finally remove it. However, I see code potentially touching native's addToCart and removeFromCart and clearCart. Can you confirm if the cart is deprecated? This shouldn't have anything to do with the ProductAction Enums. Maybe this is worth having a call over, or testing E2E to confirm.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I see this in Android docs, and this in iOS docs that their cart has also been deprecated...so based on that, we are good to go here.

Comment thread test/src/tests-native-sdk.js

@rmi22186 rmi22186 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly nits, with one comment that might change some of the work. Let's way to hear back from Brandon/Mansi

@rmi22186

rmi22186 commented Oct 2, 2025

Copy link
Copy Markdown
Member

LGTM. I'd say let's confirm 100% with mansi/brandon before merging, but I'm pretty confident about it given the docs.

Comment thread test/jest/persistence.spec.ts Outdated
@sonarqubecloud

sonarqubecloud Bot commented Oct 2, 2025

Copy link
Copy Markdown

@jaissica12 jaissica12 requested a review from rmi22186 October 2, 2025 21:04
@jaissica12 jaissica12 merged commit 4a25339 into development Oct 6, 2025
115 of 129 checks passed
@mparticle-automation

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.47.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants