Skip to content

Releases: spree/spree-api-v2-js-sdk

v4.7.2

27 Aug 17:02
15a520b
Compare
Choose a tag to compare
  • Fix parsing of non-JSON responses to JSON in the fetch request handler. Non-JSON responses are returned by delete requests as they return no content.

v4.7.1

24 Aug 15:36
9aad0b1
Compare
Choose a tag to compare
  • Fix fetch-based Fetcher to return more specific Error types.

v4.7.0

20 Aug 13:06
009e57f
Compare
Choose a tag to compare
  • 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

16 Aug 10:57
7722623
Compare
Choose a tag to compare
  • Add an optional token parameter to list and show 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

07 Jun 11:33
a4ca7d7
Compare
Choose a tag to compare
  • Add forgotPassword and resetPassword Account endpoints - #206. Thanks @JoshYan!
  • Security updates.

v4.5.3

12 May 19:04
0730638
Compare
Choose a tag to compare

v4.5.2

27 Apr 13:13
7186b71
Compare
Choose a tag to compare

v4.5.1

21 Apr 10:10
4f1d7f0
Compare
Choose a tag to compare
  • Make HTTP class easier to extend.
  • Type Spree errors in ExpandedSpreeError.

v4.5.0

09 Apr 16:58
c941c11
Compare
Choose a tag to compare
  • 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 with importsNotUsedAsValues.
  • Use MJS modules to setup Webpack.
  • Use default export to provide paths to Spree endpoints instead of Routes.

v4.4.4

29 Mar 11:39
6b92809
Compare
Choose a tag to compare
  • Security updates