Releases: spree/spree-api-v2-js-sdk
v4.7.2
v4.7.1
v4.7.0
- Add the ability to use fetch or any custom fetcher instead of Axios. It will make future SDK bundles smaller in size and allow better integration with other JavaScript libraries and frameworks.
These improvement to the SDK may require some adjustments in projects using it. Especially the ones which extend the SDK with custom endpoints. Still, these adjustments should be small. For example, we changed the options required by the Http
class from { host: string }
to { fetcher: Fetcher }
so whatever mechanism is used to communicate with Spree - Axios, fetch or something else, it's shared between all endpoint groups. Axios is still the default mechanism and included in the browser bundle. The Client
class and makeClient
function now accept two additional options: fetcherType: 'axios' | 'fetch' | 'custom'
and createFetcher: CreateFetcher
. Switching to the 'fetch'
fetcherType
requires installing node-fetch
in Node. If you want to use a different fetch
implementation in Node use the custom
option and create a custom fetcher using createCustomizedFetchFetcher
.
v4.6.0
- Add an optional token parameter to
list
andshow
products endpoints. Thanks @ddombrowsky!
The position of the arguments for the list
and show
product methods has changed. Make sure to add an IToken
as one of the arguments or a {}
in its place. Specifically, products.list(params)
was changed to products.list(token, params)
and products.show(id, params)
to products.show(id, token, params)
.
v4.5.4
v4.5.3
- Add fetch single address endpoint (https://api.spreecommerce.org/docs/api-v2/api/docs/v2/platform/index.yaml/paths/~1api~1v2~1platform~1addresses~1%7Bid%7D/get).
- Security updates.
v4.5.2
- Add delete address endpoint added in Spree 4.2.2 (https://github.com/spree/spree/releases/tag/v4.2.2)
v4.5.1
v4.5.0
- Check code style with CodeClimate.
- Stop using Babel. Use only
ts-loader
. - Test CJS bundle in Node runtime.
- Test the browser bundle (
window.SpreeSDK
). - Fix
npm run watch
withimportsNotUsedAsValues
. - Use MJS modules to setup Webpack.
- Use default export to provide paths to Spree endpoints instead of
Routes
.