Skip to content

Releases: vuestorefront/vue-storefront

@vue-storefront/[email protected]

22 Mar 10:02
79c2bc0

Choose a tag to compare

Patch Changes

  • [FIXED] type issue with obligatory generic type argument for Extension interface. Now, it can be used without any type arg.
  • [FIXED] BaseConfig extensibility. Now, it allows to add additional custom properties.

@vue-storefront/[email protected]

19 Mar 10:57
d873f33

Choose a tag to compare

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]

19 Mar 10:57
4bd0c13

Choose a tag to compare

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]

15 Mar 14:43
eb87255

Choose a tag to compare

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]

12 Mar 11:03
27826fc

Choose a tag to compare

Releases

@vue-storefront/[email protected]

Minor changes

  • [ADDED] middlewareModule to createSdk params.
- 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] middlewareModule to defineSdkConfig params.
- 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, use getRequestHeaders instead
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]

11 Mar 13:10
c137e25

Choose a tag to compare

Releases

@vue-storefront/[email protected]

Patch Changes

  • [CHANGED] Updated buildModule function to work well with modules, whether they have optional or mandatory options.

  • Simplified how buildModule is set up,

  • Added a new type, ModuleInitializerWithMandatoryOptions.

@vue-storefront/[email protected], @vue-storefront/[email protected]

05 Mar 14:43
dcbad44

Choose a tag to compare

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

@vue-storefront/[email protected]

19 Feb 13:39
34e9605

Choose a tag to compare

Releases

@vue-storefront/[email protected]

Patch Changes

  • d95379e: [FIXED] Type issue in multistore package. Cache control set method returns any type and get returns StoreConfig | undefined. Also, MiddlewareConfiguration type has been removed as it is no longer necessary.

@vue-storefront/[email protected]

15 Feb 15:15
99227ae

Choose a tag to compare

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 importing multistoreExtension from @vue-storefront/multistore and passing it to the extensions function.
    Configuration was passed to the extension by adding multistore property to the configuration object.
    Now, the extension is created by calling createMultistoreExtension from @vue-storefront/multistore and 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]

15 Feb 12:19
3ab1aa8

Choose a tag to compare

Releases

@vue-storefront/[email protected]

Patch Changes

  • 44c067d: [FIXED] Make the second generic argument in the buildModule function optional. It's not required for the buildModule function to have the second argument. In some cases, when the first generic argument was provided, the second one was required.