Vue Storefront is now Alokai! Learn More
@vsf-enterprise/contentful-sdk

@vsf-enterprise/contentful-sdk

4.0.1

Patch Changes

Update axios to ^0.28.0 to mitigate security vulnerability CVE-2023-45857

4.0.0

Major Changes

  • CHANGED Changed minimum Node version from 16 to 18. The condition that was forcing the Node version to be lower than 19 is also removed.

3.1.0

Minor Changes

  • CHANGED Upgraded @contentful/live-preview library to the new major version 3.x. Our initLivePreview utility no longer clones input & output data since it is no longer required after the upgrade.

3.1.0-rc.0

Minor Changes

  • CHANGED Upgraded @contentful/live-preview library to the new major version 3.x. Our initLivePreview utility no longer clones input & output data since it is no longer required after the upgrade.

3.0.2

Patch Changes

  • CHANGED Prevent error when calling extractComponents method on an entry which does not have a sys property in it.

3.0.1

Patch Changes

  • ec79e46: Fixed initLivePreview util throwing in Firefox due to unsupported window.location.ancestorOrigins property

3.0.0

Major Changes

  • Implemented @vue-storefront/sdk-axios-request-sender package in all SDK methods. All methods now send GET instead of POST requests to Vue Storefront's Server Middleware.

2.1.0

Minor Changes

  • @vsf-enterprise/contentful-api now implements Contentful's Typescript SDK. Methods coming from the SDK client are available as endpoints of Vue Storefront's Server Middleware. For example:
    curl --request POST 'http://localhost:8181/cntf/getEntries'
    

    The getContent endpoint has been marked as @deprecated and will be removed in 4 years from now (July 2027).
    @vsf-enterprise/contentful-sdk has been aligned with the changes in the @vsf-enterprise/contentful-api package. It exposes a proxy for all of the new endpoints. Proxy methods are fully typed and documented with TSDoc.
    import { sdk } from "~/sdk.config.ts";
    
    const entries = await sdk.contentful.getEntries();
    

    The getContent method has been marked as @deprecated and will be removed in 4 years from now.
  • Add node 18 support

2.0.0

Major Changes

  • Added new version of the extractComponents method. It now scans raw Contentful data objects recursively and resolves nested entries at all levels. It also ships with customizable resolver functions. The contract of the method has changed - refer to its documentation for more information,
  • Added a new initLivePreview() utility method and removed redundant getImageObject() utility method,

1.0.1

  • In this release, we fixed an issue with the lack of generic types in the getContent method.