v3.0.0
Ground-up rewrite of the SDK with a slimmer, framework-agnostic surface. No Preact signals, plainError types, and a stateless controller model.See the v2 to v3 Upgrade Guide for migration instructions.Highlights
createSDK/getSDK/resetSDKreplacecreateClient/getClient; both return{ data, error }trackingTokenis now required alongsidestorefrontAccessToken(renamed fromtoken)- Stateless controllers — identity params go at controller creation, query params at
get(); overrides shallow-merge and never accumulate controller.get()replacesexecute()(kept as a deprecated alias);controller.statereplacesstate.value- No Preact signals —
subscribe(controller, cb)andcontroller.subscribe(cb)work with plain callbacks QueryState.loadingreplacesisFetching(kept as a deprecated alias); errors are plainError- New controllers:
sdk.similarProducts(),sdk.facets(),sdk.sortOrders()— facets and sort orders are now fetched at runtime instead of declared at init - New direct calls:
sdk.searchFeedback()for search-quality feedback andsdk.trackingEvent()for analytics viasendBeaconwith a fetch fallback autocomplete()unbundled from debounce — usecreateDebouncefrom@commerce-blocks/sdk/utilsto debounce calls;suggest()remains as a deprecated wrapper- Filter operator renames:
notEq→neq,exists→notNull,notExists→isNull; addedbetween,notBetween,contains,doesNotContain,beginsWith,endsWith - Storage simplified —
storageaccepts anyStorageBackend(getItem/setItem/removeItem/clear), solocalStoragecan be passed directly - Cache is internal-only — removed the public
client.cacheAPI; configure viacache: { ttl, maxSize }oncreateSDK - Removed:
filterAliases,initialData,restoreCache,ClientErrorhierarchy,isClientError,isRetryable,localStorageAdapter,fileStorage
v2.0.3
Breaking removal of client-side search tuning, plus controller and validation fixes.- Breaking: Removed
tuningparameter andSearchTuningtype fromsearch(),searchContent(),searchByImage(), andprepare(). Search tuning is now managed exclusively in the Layers dashboard. - Fix: Stale
preparedSearchIdis now discarded whenexecute()provides new query, filter, or linking parameters - Fix: Empty or whitespace-only strings are now rejected by required field validation
- Fix: Resolved multiple SDK bugs across cache, controllers, and validation
- Note:
priceRangein query results now requires{ name: 'Price', code: 'variants.price' }in yourfacetsconfiguration
v2.0.2
Patch release with stability improvements to cache and CI workflows.- Fix: Separated LRU timestamp from TTL expiry to prevent premature cache eviction
- Fix: Resolved cache key gaps, race conditions, and LRU eviction edge cases
- Fix: Resolved cache key, price leak, search race, and URL encoding bugs
- Fix: Resolved multiple SDK bugs across cache, layers, and filters
v2.0.0
Major release with a redesigned API surface, signal-based reactivity throughout, and a simplified architecture that removes the Shopify Storefront API dependency.See the v1 to v2 Upgrade Guide for migration instructions.Highlights
- New
createClientAPI replacingcreateSdkwith a cleaner configuration interface - Signal-based controllers with built-in
subscribe()on all controllers (Collection, Search, Blocks, Suggest) - Layers-only architecture — Storefront API hydration removed; products are built entirely from Layers data
- Reactive
createProductCardcontroller with signal-based state for variant selection, pricing, and images - Content search via the new
searchContentcontroller for article/blog search - Shallow products by default — only the matched variant is included, significantly reducing payload size
- Structured error types with
ClientErrorreplacingSdkError, andisRetryablecaller predicate - Request deduplication via a new
RequestCoordinatorthat prevents redundant in-flight API calls - Simplified cache API replacing the store module with a flat
cacheinterface - Renamed public API surface —
Sdkis nowClient,autocompleteis nowsuggest,filterMapis nowfilterAliases, and more - Variant breakout support with
breakoutOptionsfor expanding variants into individual tiles - Formatted price ranges included in query results
v1.3.0
- Feature: Pluggable storage adapters for cache persistence (
localStorageAdapter,fileStorage, or customStorageAdapter) - Feature:
initialDataandrestoreFromStorageoptions oncreateSdkfor hydrating the cache at initialization - Feature: Exposed additional Layers response fields (e.g.
attributionToken) in SDK results - Fix: Made
attributionTokenoptional to prevent runtime errors when absent
v1.2.1
- Feature: Exposed variant inventory levels on the
Producttype - Fix: Compile issue resolved
- Chore: Switched npm publish to OIDC trusted publishers
v1.1.0
First stable release under the@commerce-blocks/sdk package name on npm.- Feature: Dynamic linking —
dynamicLinkingpromoted to a first-class field on all Layers endpoints - Feature: Dynamic parameter injection for Layers API requests
- Chore: Renamed package to
@commerce-blocks/sdkand published to npm
v0.2.0
- Feature: Added
onReadylifecycle hook for detecting when the SDK is fully initialized - Feature: Optimized variant attribute requests to reduce payload size
v0.1.1
- Fix: Stable signal reference in providers to prevent unnecessary re-renders
- Breaking: Auto-wrap filter conditions in
ANDgroups — filters are now automatically grouped
v0.1.0
- Feature: App-ready promise pattern and theme injection support
- Feature: Template validation and Preact subpath export
- Feature: Explicit component registration and cache configuration options
- Test: Build verification and API contract tests