Conversation
✅ Deploy Preview for commercelayer-react-components ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
gciotola
approved these changes
Sep 16, 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.
Version bump to 5.0.4 across the three packages, on top of #845.
What ships
OrderList no longer refetches in a loop. It fired a fetch roughly once per API round-trip, through two independent routes that each had to be closed:
useCustomerProviderValuememoized the whole context value withstateamong its deps and spread...stateinto it, so every landed fetch produced a newgetCustomerOrdersidentity — andOrderListhas that callback in its effect deps. It is now a stableactionsmemo plus a thin outer memo joining state and actions, with the one callback that readstate.addressesdirectly going through a ref. The callbacks still change identity whenaccessTokenorcustomerIdchange, so a fetch still reruns when the token arrives.defaultSdkSortingwas a bare object literal — a new identity every render, which refired the effect even once the callbacks were stable. Now memoized on the primitives it derives from.CommerceLayerhands out a stable context value. The provider wrapped its value in an object literal, giving every consumer a fresh identity on every render. This provider sits at the root of the tree and consumers put its values into effect dependency arrays: it was the amplifier behind the refetch loop rather than its cause, and it stayed a trap for anything else downstream. The five other providers built from object literals are deliberately left alone — three sit inside.map()callbacks where the value is a single loop variable, and the other two are narrow leaf contexts. None of them wraps the app.Two props stop leaking onto DOM elements.
BillingAddressFormdeclaredfieldEventin Props but never destructured it, so it survived into the rest spread landing on the<form>and React warned about it;ShippingAddressFormalready did this correctly, which is what makes it an omission rather than a decision.AddressleakeddisabledClassNamethe same way.CI now runs the tests
Nothing in CI ran them. The check reading "test / test" comes from
merge-test-env-check.yml, whosetestjob only lists licenses — three seconds, passing regardless of the code. The 1376 tests across the three packages ran only in the local pre-commit hook, so a PR that broke them showed all green.The new workflow is named
unit-testswith avitestjob, so it cannot be mistaken for the licenses check next to it.pnpm testis not reused: the react-components script starts withpnpm audit --prod --audit-level high, which fails on any newly published advisory and would turn the suite red for reasons unrelated to the change. Lint and vitest run directly instead, after a build —react-hooks-components' lint script ends intsc, which resolves@commercelayer/core-componentsthrough itsdist/, absent on a clean checkout.🤖 Generated with Claude Code