Releases: vuestorefront/vue-storefront
@vue-storefront/[email protected]
Patch Changes
- [FIXED] type issue with obligatory generic type argument for
Extensioninterface. Now, it can be used without any type arg. - [FIXED] BaseConfig extensibility. Now, it allows to add additional custom properties.
@vue-storefront/[email protected]
Releases
@vue-storefront/[email protected]
Patch Changes
- [FIXED] issue with type inference. Previously, types were not infered properly when there were no extension declared. Now it has been fixed.
@vue-storefront/[email protected]
Releases
@vue-storefront/[email protected]
Patch Changes
- [FIXED] handling void response in
middlewareModule. Previously an invalid-json error was thrown, now undefined will be returned.
@vue-storefront/[email protected]
Releases
@vue-storefront/[email protected]
Patch Changes
- [FIXED] error handling for default HTTP client. Default HTTP Client was not throwing an error on each failed request, now it does.
@vue-storefront/[email protected], @vue-storefront/[email protected]
Releases
@vue-storefront/[email protected]
Minor changes
- [ADDED]
middlewareModuletocreateSdkparams.
- import { UnifiedApiExtension } from "storefront-middleware/types"
+ import { UnifiedEndpoints } from "storefront-middleware/types"
export const { getSdk } = createSdk(
options,
- ({ buildModule, middlewareUrl, getRequestHeaders }) => ({
- commerce: buildModule(unifiedModule<UnifiedApiExtension>, {
- apiUrl: `${middlewareUrl}/commerce`,
- requestOptions: {
- headers: getRequestHeaders,
+ ({ buildModule, middlewareModule, middlewareUrl, getRequestHeaders }) => ({
+ commerce: buildModule(middlewareModule<UnifiedEndpoints>, {
+ apiUrl: `${middlewareUrl}/commerce`,
+ defaultRequestConfig: {
+ headers: getRequestHeaders(),
},
}),
})
);@vue-storefront/[email protected]
Minor changes
- [ADDED]
middlewareModuletodefineSdkConfigparams.
- import { UnifiedApiExtension } from "storefront-middleware/types"
+ import { UnifiedEndpoints } from "storefront-middleware/types"
export default defineSdkConfig(
- ({ buildModule, middlewareUrl, getRequestHeaders }) => ({
- commerce: buildModule(unifiedModule<UnifiedApiExtension>, {
- apiUrl: `${middlewareUrl}/commerce`,
- requestOptions: { headers: getRequestHeaders },
+ ({ buildModule, middlewareModule, middlewareUrl, getRequestHeaders }) => ({
+ commerce: buildModule(middlewareModule<UnifiedEndpoints>, {
+ apiUrl: `${middlewareUrl}/commerce`,
+ defaultRequestConfig: { headers: getRequestHeaders() },
}),
})
);- [CHANGED] deprecate
getCookieHeader, usegetRequestHeadersinstead
export default defineSdkConfig(
- ({ buildModule, middlewareModule, middlewareUrl, getCookieHeader }) => ({
+ ({ buildModule, middlewareModule, middlewareUrl, getRequestHeaders }) => ({
commerce: buildModule(middlewareModule<UnifiedEndpoints>, {
apiUrl: `${middlewareUrl}/commerce`,
- defaultRequestConfig: { headers: getCookieHeader() }, // Only cookie header is included.
+ defaultRequestConfig: { headers: getRequestHeaders() }, // All headers are included.
}),
})
);@vue-storefront/[email protected]
Releases
@vue-storefront/[email protected]
Patch Changes
-
[CHANGED] Updated
buildModulefunction to work well with modules, whether they have optional or mandatory options. -
Simplified how
buildModuleis set up, -
Added a new type,
ModuleInitializerWithMandatoryOptions.
@vue-storefront/[email protected], @vue-storefront/[email protected]
Releases
@vue-storefront/[email protected]
Minor Changes
-
712ba85: [ADDED] Adds WithoutContext type helper.
type ApiClientMethods = { getProduct: (context: any, id: string) => Promise<Product>; }; type Endpoints = WithoutContext<ApiClientMethods>;
@vue-storefront/[email protected]
Patch Changes
- Updated dependencies [712ba85]
- @vue-storefront/[email protected]
@vue-storefront/[email protected]
Releases
@vue-storefront/[email protected]
Patch Changes
- d95379e: [FIXED] Type issue in multistore package. Cache control
setmethod returnsanytype andgetreturnsStoreConfig | undefined. Also,MiddlewareConfigurationtype has been removed as it is no longer necessary.
@vue-storefront/[email protected]
Releases
@vue-storefront/[email protected]
Major Changes
-
8ea533e: [CHANGED] We standardized the way of creating and configuring multistore extension.
Previously, the extension was created by importingmultistoreExtensionfrom@vue-storefront/multistoreand passing it to theextensionsfunction.
Configuration was passed to the extension by addingmultistoreproperty to theconfigurationobject.
Now, the extension is created by callingcreateMultistoreExtensionfrom@vue-storefront/multistoreand passing the multistore configuration to it.- import { multistoreExtension } from "@vue-storefront/multistore"; + import { createMultistoreExtension } from "@vue-storefront/multistore"; import { multistoreConfig } from "./multistore.config"; export default { integrations: { sapcc: { location: "@vue-storefront/sapcc-api/server", configuration: { // ... - multistore: multistoreConfig, }, extensions: (predefinedExtensions) => [ ...predefinedExtensions, - multistoreExtension, + createMultistoreExtension(multistoreConfig), ], }, }, };
-
8ea533e: [FIXED] singleton cache issue, previously the cache was a singleton which could lead to unexpected behaviour when extension was used in different integrations in parallel. Now, the cache is being created during extension creation, what ensures proper cache behaviour.
@vue-storefront/[email protected]
Releases
@vue-storefront/[email protected]
Patch Changes
- 44c067d: [FIXED] Make the second generic argument in the
buildModulefunction optional. It's not required for thebuildModulefunction to have the second argument. In some cases, when the first generic argument was provided, the second one was required.