v3.0.4
Patch Changes
- a3cdfdf: Add support for ComponentizableCartLine
Caution
Deprecation notice
Note: The JS Buy SDK is deprecated as of January, 2025. It will no longer be updated or maintained by Shopify past that point. A final major version, v3.0, has been released to remove the SDK's dependency on the deprecated Checkout APIs, replacing them with Cart APIs. Updating to this new version will allow the SDK to continue to function for most use cases.
If you are using the JS Buy SDK, you have two options:
- Recommended Option: switch to the Storefront API Client
- The Storefront API Client manages the API's authentication information and provides various methods that enable devs to interact with the API. This is the preferred and more future-proof solution. See this migration guide to help you transition.
- Stopgap Option: Upgrade to JS Buy SDK v3.0
- This allows you to maintain your current setup with minimal changes for use cases that are supported by the Cart API. A migration guide with details on supported use cases will be available soon. If you choose this option, we still recommend that you switch to the Storefront API Client in the future.
Critical Deadline: July 1st, 2025. You must implement one of these changes by this date, or customers will not be able to complete purchases. Please choose the option that best suits your needs and timelines.
v3.0.0 (March 12, 2025)
- Bumps the SDK to use Storefront API version
2025-01. - Removes the dependency on Checkout APIs and replaces them with Cart APIs.
- For more information, see the migration guide.
v2.22.0 (May 1, 2024)
- Bumps the SDK to use Storefront API version
2024-04. For more information, see the Release Notes.
v2.21.1 (October 5, 2023)
- Bumps the SDK to use Storefront API version
2023-10. For more information, see the Release Notes.
v2.20.1 (July 19, 2023)
- Update
schema.jsonto match Storefront API version2023-07schema.
v2.20.0 (July 5, 2023)
- Bumps the SDK to use Storefront API version
2023-07. For more information, see the Release Notes.
v2.19.0 (April 4, 2023)
- Bumps the SDK to use Storefront API version
2023-04. For more information, see the Release Notes. - Security patch handlebars version vulnerability
v2.18.0 (January 9, 2023)
- Bumps the SDK to use Storefront API version
2023-01. For more information, see the Release Notes.
v2.17.1 (November 2, 2022)
- Removed the common
MoneyFragmentand replaced all usage of the fragment with the correspondingMoneyV2fields. This fixes an error that was occuring whenclient.fetchNextPage()is called
v2.17.0 (October 11, 2022)
- Bumps the SDK to use Storefront API version
2022-10. For more information, see the Release Notes. - NOTABLE API DATA CHANGE: Storefront API version
2022-10includes the removal of theMoneyscalar and all fields that had previously returned a Money scalar will now return a MoneyV2 object. Affected fields include:- AppliedGiftCard fields:
amountUsed,balance - Checkout fields:
paymentDue,totalTax,subtotalPrice,totalPrice - ShippingRate fields:
price - Order fields:
subtotalPrice,totalShippingPrice,totalTax,totalPrice,totalRefunded - ProductVariant fields:
price,compareAtPrice
- AppliedGiftCard fields:
v2.16.1 (July 5, 2022)
- Bumps the SDK to use Storefront API version
2022-07. For more information, see the Release Notes. - Alias all instances of
Image.srcto useImage.url.
v2.15.1 (April 4, 2022)
- Bumps the SDK to use Storefront API version
2022-04. For more information, see the Release Notes. - Add
product.fetchRecommendationsfunction that allows for fetching recommended products for a product.
v2.14.0 (January 6, 2022)
- Bumps the SDK to use Storefront API version
2022-01. For more information, see the Release Notes. - Replace deprecated
descriptionwithtitleinScriptDiscountApplicationtypedvalueobject in discount application fragment - Remove deprecated
currencyCodefrom shop fragment - Remove deprecated
presentmentPricesfrom product variant fragment
v2.13.0 (October 28, 2021)
- Bumps the SDK to use Storefront API version
2021-10. For more information, see the Release Notes. - Add image
widthandheightfields to theProductFragmentandVariantFragment.
v2.12.0 (August 30, 2021)
- Bumps the SDK to use Storefront API version
2021-07. For more information, see the Release Notes.
v2.11.0 (July 7, 2020)
- Bumps the SDK to use Storefront API version
2020-07. For more information, see the Release Notes.
v2.10.0 (April 24, 2020)
- Bumps the SDK to use Storefront API version
2020-04. For more information, see the Release Notes.
v2.9.3 (April 6, 2020)
- Update code of conduct report link
v2.9.2 (March 23, 2020)
- Update the client to always set the
accept-languageheader for all requests and will use*as the default value when a language config is not set during client initialization
v2.9.1 (February 19, 2020)
- Update
handleCheckoutMutationto invoke proper schema level error when no data/model is provided
v2.9.0 (January 8, 2020)
- Bumps the SDK to use Storefront API version
2020-01. For more information, see the Release Notes. - Adds a language option to the client config to support retrieving translated content from the Storefront API. For more information, see the Multi-Language API Guide.
- Adds
compareAtPriceto thepresentmentPricesobject in the variant fragment - Adds
unitPriceandunitPriceMeasurementfields to the variant fragment - Updates
graphql-js-clientto fix an error when callingfetchNextPagefor products in thefetchWithProductsandfetchAllWithProductscollection queries
v2.8.1 (November 15, 2019)
- Updates some description strings in the Storefront API schema version
2019-10. - Adds an optional param to
collection.fetchWithProductsfor specifying the number of products to return. - Adds
priceV2to theshippingLineobject in the checkout fragment - Update the contributing guide to recommend using
yarninstead ofnpm.
v2.8.0 (October 3, 2019)
- Bumps the SDK to use Storefront API version
2019-10. For more information, see the Release Notes.
v2.7.2 (September 18, 2019)
- Fixed error caused by getting additional images and variants information when product is null
v2.7.1 (August 26, 2019)
- Update header configuration
v2.7.0 (August 12, 2019)
- Add the following fields to the queries:
- VariantFrament:
priceV2,compareAtPriceV2 - DiscountApplicationFragment:
value
- VariantFrament:
v2.6.1 (July 4, 2019)
- Includes code changes missed in previous version (2.6.0) to send all requests to API version 2019-07.
v2.6.0 (July 3, 2018)
- Introduces API Versioning! Starting with this release, each release will be tied to a new API version. Learn more about versioning here.
- Exposes the following information in the graphql schema:
- Queryroot field
publicApiVersions- list of supported API versions - Checkout field
requiresShipping - CheckoutErrorCode:
BAD_DOMAIN,INVALID_FOR_COUNTRY,GIFT_CARD_DEPLETED,TOTAL_PRICE_MISMATCH
- Queryroot field
v2.5.0 (Jun 18, 2019)
- Add the following fields to the queries:
- AppliedGiftCard:
presentmentAmountUsed. - CheckoutFragment:
paymentDueV2,totalTaxV2,subtotalPriceV2,totalPriceV2. - order:
subtotalPriceV2,totalShippingPriceV2,totalTaxV2,totalPriceV2,totalRefundedV2. - VariantFrament:
presentmentPrices. - ShopQuery:
paymentSettings(that includesenabledPresentmentCurrencies)
- AppliedGiftCard:
v2.4.0 (Jun 13, 2019)
- Bump the graphql schema to pull the latest fields:
- Applied Gift Card field
presentmentAmountUsed - Payment field
amountV2 - Product field
presentmentPriceRanges - Transaction field
amountV2
- Applied Gift Card field
v2.3.0 (Jun 13, 2019)
- Duplicate of v2.4.0
v2.2.4 (May 14, 2019)
- Bump the graphql schema to pull the latest fields into the unoptimized version:
- ProductVariant fields:
metafield,metafields - Product fields:
metafield,metafields - QueryRoot field:
productRecommendations
- ProductVariant fields:
- Add
handleto checkout's line item's variant's product.
v2.2.3 (May 8, 2019)
- Add support for the
checkoutGiftCardsAppendandcheckoutGiftCardRemoveV2mutations, which allows clients to add and remove gift cards from a checkout.
v2.2.2 (April 17, 2019)
- Bump the graphql schema to pull the latest fields into the unoptimized version:
- Order fields:
subtotalPriceV2,totalPriceV2,totalRefundedV2,totalShippingPriceV2,totalTaxV2 - ProductVariant fields:
compareAtPriceV2,priceV2 - Checkout fields:
paymentDueV2,subtotalPriceV2,totalPriceV2,totalTaxV2 - AppliedGiftCard fields:
balanceV2,amountUsedV2 - Shop field:
presentmentCurrencyCode - ShippingRate field:
priceV2
- Order fields:
These fields are all of type MoneyV2 and contain both an amount and a currency.
v2.2.1 (April 10, 2019)
- Bump the graphql-js-client package, which fixes support for IE browsers
v2.2.0 (March 28, 2019)
- Add currency support for Bermudian Dollar
- Add seo field to article which exposes SEO title and description information
- Deprecate
statusfield on transaction and replaces it withstatusV2, which supports a null status. - Add
lineItemsSubtotalPricefield to checkout. It contains the sum of all line items prices before any tax, shipping or discount applications.
v2.1.1 (March 7, 2019)
- Bump the graphql-js-client package, which includes support for falling back when a GraphQL interface object can't be translated.
v2.1.0 (February 25, 2019)
- Add support for the
checkoutShippingAddressUpdateV2mutation, which allows clients to update the shipping address of a checkout. - Add the
checkoutUserErrorsfield to all of the checkout mutation fragments that did not previously contain this.
v2.0.1 (January 14, 2019)
- Build an unoptimized release version that contains all fields that are available in the Storefront API.
v2.0.0 (January 3, 2019)
- Fetch
collections,products,collectionByHandleandproductByHandlefrom the QueryRoot instead of from the Shop object. - Return
checkoutUserErrorsinstead ofuserErrorswhen present. This will add an extra field called code. - Expose
checkoutLineItemsReplacemutation (to replace deprecatedcheckoutLineItemsAdd,checkoutLineItemsRemove, andcheckoutLineItemsUpdatemutations). - Remove unused fixtures
v1.11.0 (November 27, 2018)
- Added availableForSale field to Product query fragment
- Removed tags field from Product query fragment
- Add field aliasing to deprecated fields in affected query fragments:
- availableForSale on VariantFragment
- countryCode on CheckoutFragment
- src on CollectionFragment and VariantFragment
v1.10.0 (November 7, 2018)
- Updates deprecated Storefront API methods used for some checkout mutations.
v1.9.1 (October 24, 2018)
- Specifies pageInfo for discountApplications connection
[UNSAFE] v1.9.0 (October 23, 2018)
- Updates schema.json
- Support checkoutDiscountCodeRemove mutation
- Exposes discounts on the checkout Object
- Allows a null checkout response from CheckoutResource.fetch (#563)
v1.8.0 (August 30, 2018)
- Support checkoutEmailUpdate mutation
v0.1.3 (March 30, 2016)
- Adds IE9 support for
atobandbtoausing polyfills via #52 - Cleans up some deployment noise (#54). Thanks @tessalt