Skip to content

Commit 99227ae

Browse files
ci: release (#7049)
* ci: release * docs: add changelogs and api references --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Wojciech Sikora <[email protected]>
1 parent 8ea533e commit 99227ae

File tree

8 files changed

+609
-142
lines changed

8 files changed

+609
-142
lines changed

Diff for: .changeset/six-dolls-accept.md

-31
This file was deleted.

Diff for: .changeset/soft-kiwis-fly.md

-5
This file was deleted.

Diff for: docs/content/3.middleware/3.api/multistore.api.json

+96-101
Original file line numberDiff line numberDiff line change
@@ -300,50 +300,99 @@
300300
"extendsTokenRanges": []
301301
},
302302
{
303-
"kind": "Interface",
304-
"canonicalReference": "@vue-storefront/multistore!ExtensionParams:interface",
305-
"docComment": "/**\n * Parameters containing multistore configuration used by the extension.\n */\n",
303+
"kind": "Variable",
304+
"canonicalReference": "@vue-storefront/multistore!createMultistoreExtension:var",
305+
"docComment": "",
306306
"excerptTokens": [
307307
{
308308
"kind": "Content",
309-
"text": "export interface ExtensionParams "
310-
}
311-
],
312-
"fileUrlPath": "src/types.ts",
313-
"releaseTag": "Public",
314-
"name": "ExtensionParams",
315-
"preserveMemberOrder": false,
316-
"members": [
309+
"text": "createMultistoreExtension: "
310+
},
317311
{
318-
"kind": "PropertySignature",
319-
"canonicalReference": "@vue-storefront/multistore!ExtensionParams#configuration:member",
320-
"docComment": "/**\n * Middleware configuration.\n */\n",
321-
"excerptTokens": [
322-
{
323-
"kind": "Content",
324-
"text": "configuration: "
325-
},
326-
{
327-
"kind": "Reference",
328-
"text": "MiddlewareConfiguration",
329-
"canonicalReference": "@vue-storefront/multistore!MiddlewareConfiguration:interface"
330-
},
331-
{
332-
"kind": "Content",
333-
"text": ";"
334-
}
335-
],
336-
"isReadonly": false,
337-
"isOptional": false,
338-
"releaseTag": "Public",
339-
"name": "configuration",
340-
"propertyTypeTokenRange": {
341-
"startIndex": 1,
342-
"endIndex": 2
343-
}
312+
"kind": "Content",
313+
"text": "(multistoreConfig: "
314+
},
315+
{
316+
"kind": "Reference",
317+
"text": "MultistoreExtensionMethods",
318+
"canonicalReference": "@vue-storefront/multistore!MultistoreExtensionMethods:interface"
319+
},
320+
{
321+
"kind": "Content",
322+
"text": ") => {\n name: string;\n isNamespaced: false;\n extendApp: () => void;\n hooks: (req: import(\"express\")."
323+
},
324+
{
325+
"kind": "Reference",
326+
"text": "Request",
327+
"canonicalReference": "@types/express!e.Request:interface"
328+
},
329+
{
330+
"kind": "Content",
331+
"text": "<import(\"express-serve-static-core\")."
332+
},
333+
{
334+
"kind": "Reference",
335+
"text": "ParamsDictionary",
336+
"canonicalReference": "@types/express-serve-static-core!ParamsDictionary:interface"
337+
},
338+
{
339+
"kind": "Content",
340+
"text": ", any, any, import(\"qs\")."
341+
},
342+
{
343+
"kind": "Reference",
344+
"text": "ParsedQs",
345+
"canonicalReference": "@types/qs!QueryString.ParsedQs:interface"
346+
},
347+
{
348+
"kind": "Content",
349+
"text": ", "
350+
},
351+
{
352+
"kind": "Reference",
353+
"text": "Record",
354+
"canonicalReference": "!Record:type"
355+
},
356+
{
357+
"kind": "Content",
358+
"text": "<string, any>>) => {\n beforeCreate: ({ "
359+
},
360+
{
361+
"kind": "Reference",
362+
"text": "configuration",
363+
"canonicalReference": "@vue-storefront/middleware!HookParams#configuration"
364+
},
365+
{
366+
"kind": "Content",
367+
"text": ": baseConfig }: import(\"@vue-storefront/middleware\")."
368+
},
369+
{
370+
"kind": "Reference",
371+
"text": "HookParams",
372+
"canonicalReference": "@vue-storefront/middleware!HookParams:interface"
373+
},
374+
{
375+
"kind": "Content",
376+
"text": "<any>) => import(\"./types\")."
377+
},
378+
{
379+
"kind": "Reference",
380+
"text": "StoreConfig",
381+
"canonicalReference": "@vue-storefront/multistore!StoreConfig:type"
382+
},
383+
{
384+
"kind": "Content",
385+
"text": ";\n };\n}"
344386
}
345387
],
346-
"extendsTokenRanges": []
388+
"fileUrlPath": "src/extension.ts",
389+
"isReadonly": true,
390+
"releaseTag": "Public",
391+
"name": "createMultistoreExtension",
392+
"variableTypeTokenRange": {
393+
"startIndex": 1,
394+
"endIndex": 18
395+
}
347396
},
348397
{
349398
"kind": "Interface",
@@ -536,56 +585,6 @@
536585
],
537586
"extendsTokenRanges": []
538587
},
539-
{
540-
"kind": "Variable",
541-
"canonicalReference": "@vue-storefront/multistore!multistoreExtension:var",
542-
"docComment": "",
543-
"excerptTokens": [
544-
{
545-
"kind": "Content",
546-
"text": "multistoreExtension: "
547-
},
548-
{
549-
"kind": "Content",
550-
"text": "{\n name: string;\n extendApp: ({ configuration }: "
551-
},
552-
{
553-
"kind": "Reference",
554-
"text": "ExtensionParams",
555-
"canonicalReference": "@vue-storefront/multistore!ExtensionParams:interface"
556-
},
557-
{
558-
"kind": "Content",
559-
"text": ") => void;\n hooks: (req: "
560-
},
561-
{
562-
"kind": "Reference",
563-
"text": "Request",
564-
"canonicalReference": "@types/express!e.Request:interface"
565-
},
566-
{
567-
"kind": "Content",
568-
"text": ") => {\n beforeCreate: ({ configuration }: "
569-
},
570-
{
571-
"kind": "Reference",
572-
"text": "ExtensionParams",
573-
"canonicalReference": "@vue-storefront/multistore!ExtensionParams:interface"
574-
},
575-
{
576-
"kind": "Content",
577-
"text": ") => any;\n };\n}"
578-
}
579-
],
580-
"fileUrlPath": "src/extension.ts",
581-
"isReadonly": true,
582-
"releaseTag": "Public",
583-
"name": "multistoreExtension",
584-
"variableTypeTokenRange": {
585-
"startIndex": 1,
586-
"endIndex": 8
587-
}
588-
},
589588
{
590589
"kind": "Interface",
591590
"canonicalReference": "@vue-storefront/multistore!MultistoreExtensionMethods:interface",
@@ -612,16 +611,7 @@
612611
},
613612
{
614613
"kind": "Content",
615-
"text": "(configuration: "
616-
},
617-
{
618-
"kind": "Reference",
619-
"text": "StoreConfig",
620-
"canonicalReference": "@vue-storefront/multistore!StoreConfig:type"
621-
},
622-
{
623-
"kind": "Content",
624-
"text": ") => "
614+
"text": "() => "
625615
},
626616
{
627617
"kind": "Reference",
@@ -639,7 +629,7 @@
639629
"name": "cacheManagerFactory",
640630
"propertyTypeTokenRange": {
641631
"startIndex": 1,
642-
"endIndex": 5
632+
"endIndex": 3
643633
}
644634
},
645635
{
@@ -749,9 +739,14 @@
749739
"kind": "Content",
750740
"text": "export type StoreConfig = "
751741
},
742+
{
743+
"kind": "Reference",
744+
"text": "Record",
745+
"canonicalReference": "!Record:type"
746+
},
752747
{
753748
"kind": "Content",
754-
"text": "any"
749+
"text": "<string, any>"
755750
},
756751
{
757752
"kind": "Content",
@@ -763,7 +758,7 @@
763758
"name": "StoreConfig",
764759
"typeTokenRange": {
765760
"startIndex": 1,
766-
"endIndex": 2
761+
"endIndex": 3
767762
}
768763
}
769764
]

Diff for: docs/content/3.middleware/4.reference/multistore/change-log.md

+34
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
# Change log
22

3+
## 2.0.0
4+
5+
### Major Changes
6+
7+
- 8ea533e05: [CHANGED] We standardized the way of creating and configuring multistore extension.
8+
Previously, the extension was created by importing `multistoreExtension` from `@vue-storefront/multistore` and passing it to the `extensions` function.
9+
Configuration was passed to the extension by adding `multistore` property to the `configuration` object.
10+
Now, the extension is created by calling `createMultistoreExtension` from `@vue-storefront/multistore` and passing the multistore configuration to it.
11+
12+
```diff [middleware.config.ts]
13+
- import { multistoreExtension } from "@vue-storefront/multistore";
14+
+ import { createMultistoreExtension } from "@vue-storefront/multistore";
15+
import { multistoreConfig } from "./multistore.config";
16+
17+
export default {
18+
integrations: {
19+
sapcc: {
20+
location: "@vue-storefront/sapcc-api/server",
21+
configuration: {
22+
// ...
23+
- multistore: multistoreConfig,
24+
},
25+
extensions: (predefinedExtensions) => [
26+
...predefinedExtensions,
27+
- multistoreExtension,
28+
+ createMultistoreExtension(multistoreConfig),
29+
],
30+
},
31+
},
32+
};
33+
```
34+
35+
- 8ea533e05: [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.
36+
337
## 1.0.2
438

539
### Patch Changes

0 commit comments

Comments
 (0)