diff --git a/.changeset/flat-hotels-study.md b/.changeset/flat-hotels-study.md deleted file mode 100644 index 2bf4d6f432..0000000000 --- a/.changeset/flat-hotels-study.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@vue-storefront/sdk": patch ---- - -[FIXED] support for `GET` requests in default HTTP client, which was throwing an error "SDKError: Request with GET/HEAD method cannot have body". Now, the client can handle `GET` requests properly. diff --git a/.changeset/nasty-guests-run.md b/.changeset/nasty-guests-run.md deleted file mode 100644 index c241704c2d..0000000000 --- a/.changeset/nasty-guests-run.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -"@vue-storefront/sdk": major ---- - -[ADDED] CDN support for the `middlewareModule`. -Now, the module's configuration includes `cdnCacheBustingId` property, which allows you to set a unique identifier for the CDN cache busting. -**The property is obligatory and must be a string.** - -```diff [sdk.config.ts] - -export const { getSdk } = createSdk( - options, - ({ buildModule, middlewareModule, middlewareUrl, getRequestHeaders }) => ({ - example: buildModule(middlewareModule, { - apiUrl: `${middlewareUrl}/test_integration`, -+ cdnCacheBustingId: process.env.CDN_CACHE_BUSTING_ID, - defaultRequestConfig: { - headers: getRequestHeaders(), - }, - }), - }) -); -``` diff --git a/docs/content/4.sdk/4.api/sdk.api.json b/docs/content/4.sdk/4.api/sdk.api.json index 696d4b457f..be5755fd85 100644 --- a/docs/content/4.sdk/4.api/sdk.api.json +++ b/docs/content/4.sdk/4.api/sdk.api.json @@ -2705,7 +2705,7 @@ }, { "kind": "Content", - "text": ";\n}" + "text": ";\n cdnCacheBustingId: string;\n}" }, { "kind": "Content", diff --git a/docs/content/4.sdk/5.reference/change-log.md b/docs/content/4.sdk/5.reference/change-log.md index b008bdb63c..8a2f5f4403 100644 --- a/docs/content/4.sdk/5.reference/change-log.md +++ b/docs/content/4.sdk/5.reference/change-log.md @@ -1,5 +1,33 @@ # Change log +## 2.0.0 + +### Major Changes + +- **[ADDED]** CDN support for the `middlewareModule`. + Now, the module's configuration includes `cdnCacheBustingId` property, which allows you to set a unique identifier for the CDN cache busting. + **The property is obligatory and must be a string.** + +```diff [sdk.config.ts] + +export const { getSdk } = createSdk( + options, + ({ buildModule, middlewareModule, middlewareUrl, getRequestHeaders }) => ({ + example: buildModule(middlewareModule, { + apiUrl: `${middlewareUrl}/test_integration`, ++ cdnCacheBustingId: process.env.CDN_CACHE_BUSTING_ID, + defaultRequestConfig: { + headers: getRequestHeaders(), + }, + }), + }) +); +``` + +### Patch Changes + +- **[FIXED]** support for `GET` requests in default HTTP client, which was throwing an error "SDKError: Request with GET/HEAD method cannot have body". Now, the client can handle `GET` requests properly. + ## 1.5.0 ### Minor Changes diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md index b008bdb63c..8a2f5f4403 100644 --- a/packages/sdk/CHANGELOG.md +++ b/packages/sdk/CHANGELOG.md @@ -1,5 +1,33 @@ # Change log +## 2.0.0 + +### Major Changes + +- **[ADDED]** CDN support for the `middlewareModule`. + Now, the module's configuration includes `cdnCacheBustingId` property, which allows you to set a unique identifier for the CDN cache busting. + **The property is obligatory and must be a string.** + +```diff [sdk.config.ts] + +export const { getSdk } = createSdk( + options, + ({ buildModule, middlewareModule, middlewareUrl, getRequestHeaders }) => ({ + example: buildModule(middlewareModule, { + apiUrl: `${middlewareUrl}/test_integration`, ++ cdnCacheBustingId: process.env.CDN_CACHE_BUSTING_ID, + defaultRequestConfig: { + headers: getRequestHeaders(), + }, + }), + }) +); +``` + +### Patch Changes + +- **[FIXED]** support for `GET` requests in default HTTP client, which was throwing an error "SDKError: Request with GET/HEAD method cannot have body". Now, the client can handle `GET` requests properly. + ## 1.5.0 ### Minor Changes diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 5e82912fe5..91985fb75a 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,7 +1,7 @@ { "name": "@vue-storefront/sdk", "license": "MIT", - "version": "1.5.0", + "version": "2.0.0", "main": "lib/index.cjs.js", "module": "lib/index.es.js", "types": "lib/index.d.ts",