Releases: Shopify/js-buy-sdk
v3.0.2
Patch Changes
- d651304: Fix cart query for lines pagination
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.json
to match Storefront API version2023-07
schema.
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
MoneyFragment
and replaced all usage of the fragment with the correspondingMoneyV2
fields. 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-10
includes the removal of theMoney
scalar 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.src
to 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.fetchRecommendations
function 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
description
withtitle
inScriptDiscountApplication
typedvalue
object in discount application fragment - Remove deprecated
currencyCode
from shop fragment - Remove deprecated
presentmentPrices
from 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
width
andheight
fields to theProductFragment
andVariantFragment
.
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-language
header 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
handleCheckoutMutation
to 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
compareAtPrice
to thepresentmentPrices
object in the variant fragment - Adds
unitPrice
andunitPriceMeasurement
fields to the variant fragment - Updates
graphql-js-client
to fix an error when callingfetchNextPage
for products in thefetchWithProducts
andfetchAllWithProducts
collection 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.fetchWithProducts
for specifying the number of products to return. - Adds
priceV2
to theshippingLine
object in the checkout fragment - Update the contributing guide to recommend using
yarn
instead 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
, `metafield...
- ProductVariant fields:
v3.0.1
Patch Changes
- 462d162: Move npm releases to github actions with changeset and provenance
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.json
to match Storefront API version2023-07
schema.
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
MoneyFragment
and replaced all usage of the fragment with the correspondingMoneyV2
fields. 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-10
includes the removal of theMoney
scalar 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.src
to 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.fetchRecommendations
function 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
description
withtitle
inScriptDiscountApplication
typedvalue
object in discount application fragment - Remove deprecated
currencyCode
from shop fragment - Remove deprecated
presentmentPrices
from 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
width
andheight
fields to theProductFragment
andVariantFragment
.
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-language
header 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
handleCheckoutMutation
to 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
compareAtPrice
to thepresentmentPrices
object in the variant fragment - Adds
unitPrice
andunitPriceMeasurement
fields to the variant fragment - Updates
graphql-js-client
to fix an error when callingfetchNextPage
for products in thefetchWithProducts
andfetchAllWithProducts
collection 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.fetchWithProducts
for specifying the number of products to return. - Adds
priceV2
to theshippingLine
object in the checkout fragment - Update the contributing guide to recommend using
yarn
instead 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 f...
v2.22.0
Bumps the SDK to use Storefront API version 2024-04. For more information, see the Release Notes.
v2.21.1
- Bumps the SDK to use Storefront API version 2023-10. For more information, see the Release Notes.
v2.20.0
- Bumps the SDK to use Storefront API version 2023-07. For more information, see the Release Notes.
v2.19.0
- 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
- Bumps the SDK to use Storefront API version
2023-01
. For more information, see the Release Notes.
v2.17.1
- Removed the common
MoneyFragment
and replaced all usage of the fragment with the correspondingMoneyV2
fields. This fixes an error that was occurring when theclient.fetchNextPage()
is called
v2.17.0
- 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-10
includes the removal of theMoney
scalar 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
- Bumps the SDK to use Storefront API version
2022-07
. For more information, see the Release Notes. - Alias all instances of
Image.src
to useImage.url
.