-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Pricing update and refactor product API tests to not rely on internals #6892
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicr work – overall LGTM
packages/core-flows/src/product/steps/get-variant-pricing-link.ts
Outdated
Show resolved
Hide resolved
const linkForVariant = data.variantPriceSetLinks.find( | ||
(link) => link.variant_id === variant.id | ||
) | ||
|
||
const priceSetForVariant = data.updatedPriceSets.find( | ||
(priceSet) => priceSet.id === linkForVariant?.price_set_id | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: convert to maps, this is one of those potentially heavy operations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@olivermrbl I'd like to do some benchmarking and optimization as a separate task if you agree (I'm taking notes on this)
bd6b9bb
to
2779055
Compare
2779055
to
3577d2e
Compare
This PR achieves the following
I will do a follow-up PR to further clean up the tests and remove all internal dependencies