@vue-storefront/next 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.mts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +9 -7
- package/CHANGELOG.md +0 -48
- /package/dist/{types-6cqVOIZW.d.mts → types-B1fiGk0-.d.mts} +0 -0
- /package/dist/{types-6cqVOIZW.d.ts → types-B1fiGk0-.d.ts} +0 -0
package/dist/client.d.mts
CHANGED
package/dist/client.d.ts
CHANGED
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -40,7 +40,7 @@ __export(src_exports, {
|
|
|
40
40
|
});
|
|
41
41
|
module.exports = __toCommonJS(src_exports);
|
|
42
42
|
|
|
43
|
-
//
|
|
43
|
+
// ../shared/src/helpers/composeMiddlewareUrl.ts
|
|
44
44
|
function calculateMiddlewareUrl({
|
|
45
45
|
options,
|
|
46
46
|
headers
|
|
@@ -78,7 +78,7 @@ function composeMiddlewareUrl({
|
|
|
78
78
|
return removeTrailingSlash(url);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
//
|
|
81
|
+
// ../shared/src/helpers/defaultConfigs.ts
|
|
82
82
|
var contextConfig = {
|
|
83
83
|
unifiedCommerce: {
|
|
84
84
|
middlewareModule: {
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
__spreadValues
|
|
4
4
|
} from "./chunk-EX6ADWAR.mjs";
|
|
5
5
|
|
|
6
|
-
//
|
|
6
|
+
// ../shared/src/helpers/composeMiddlewareUrl.ts
|
|
7
7
|
function calculateMiddlewareUrl({
|
|
8
8
|
options,
|
|
9
9
|
headers
|
|
@@ -41,7 +41,7 @@ function composeMiddlewareUrl({
|
|
|
41
41
|
return removeTrailingSlash(url);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
//
|
|
44
|
+
// ../shared/src/helpers/defaultConfigs.ts
|
|
45
45
|
var contextConfig = {
|
|
46
46
|
unifiedCommerce: {
|
|
47
47
|
middlewareModule: {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@vue-storefront/next",
|
|
3
3
|
"description": "Vue Storefront dedicated features for Next.js",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "2.0.
|
|
5
|
+
"version": "2.0.1",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
8
|
"import": "./dist/index.mjs",
|
|
@@ -34,16 +34,16 @@
|
|
|
34
34
|
"build:pages-router": "cd __tests__/apps/pages-router && yarn build",
|
|
35
35
|
"dev:app-router": "cd __tests__/apps/app-router && yarn dev",
|
|
36
36
|
"dev:pages-router": "cd __tests__/apps/pages-router && yarn dev",
|
|
37
|
-
"dev:middleware": "cd
|
|
37
|
+
"dev:middleware": "cd ../shared/src/__tests__/middleware && yarn dev",
|
|
38
38
|
"lint": "eslint . --ext .ts",
|
|
39
39
|
"test:app-router": "start-server-and-test dev:middleware localhost:4000/test_integration/getSuccess dev:app-router localhost:3000 \"yarn test:e2e\"",
|
|
40
40
|
"test:pages-router": "start-server-and-test dev:middleware localhost:4000/test_integration/getSuccess dev:pages-router localhost:3000 \"yarn test:e2e\"",
|
|
41
41
|
"test": "yarn test:app-router && yarn test:pages-router",
|
|
42
|
-
"test:e2e": "cd
|
|
42
|
+
"test:e2e": "cd ../shared/ && yarn test:e2e",
|
|
43
43
|
"test:unit": "vitest run"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@vue-storefront/sdk": "^
|
|
46
|
+
"@vue-storefront/sdk": "^3.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/react": "^18.2.31",
|
|
@@ -51,11 +51,13 @@
|
|
|
51
51
|
"react-dom": "^18.2.0",
|
|
52
52
|
"start-server-and-test": "^2.0.3",
|
|
53
53
|
"tsup": "8.0.1",
|
|
54
|
-
"vitest": "^0.34.6"
|
|
54
|
+
"vitest": "^0.34.6",
|
|
55
|
+
"react": "^18.2.0",
|
|
56
|
+
"next": "^13.4.7 || ^14.0.0"
|
|
55
57
|
},
|
|
56
58
|
"peerDependencies": {
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
+
"react": "^18.2.0",
|
|
60
|
+
"next": "^13.4.7 || ^14.0.0"
|
|
59
61
|
},
|
|
60
62
|
"engines": {
|
|
61
63
|
"npm": ">=8.0.0",
|
package/CHANGELOG.md
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# Change log
|
|
2
|
-
|
|
3
|
-
## 2.0.0
|
|
4
|
-
|
|
5
|
-
- **[CHANGED]** Updated the `@vue-storefront/sdk` dependency to version `2.0.0`.
|
|
6
|
-
- **[ADDED]** `defaults` property to the injected context
|
|
7
|
-
|
|
8
|
-
## 1.1.1
|
|
9
|
-
|
|
10
|
-
- **[FIXED]** "The inferred type of 'SdkProvider' cannot be named without a reference to (...)" error when calling `createSdkContext`.
|
|
11
|
-
|
|
12
|
-
## 1.1.0
|
|
13
|
-
|
|
14
|
-
- **[ADDED]** `middlewareModule` to `createSdk` params.
|
|
15
|
-
|
|
16
|
-
```diff [sdk.config.ts]
|
|
17
|
-
- import { UnifiedApiExtension } from "storefront-middleware/types"
|
|
18
|
-
+ import { UnifiedEndpoints } from "storefront-middleware/types"
|
|
19
|
-
|
|
20
|
-
export const { getSdk } = createSdk(
|
|
21
|
-
options,
|
|
22
|
-
- ({ buildModule, middlewareUrl, getRequestHeaders }) => ({
|
|
23
|
-
- commerce: buildModule(unifiedModule<UnifiedApiExtension>, {
|
|
24
|
-
- apiUrl: `${middlewareUrl}/commerce`,
|
|
25
|
-
- requestOptions: {
|
|
26
|
-
- headers: getRequestHeaders,
|
|
27
|
-
+ ({ buildModule, middlewareModule, middlewareUrl, getRequestHeaders }) => ({
|
|
28
|
-
+ commerce: buildModule(middlewareModule<UnifiedEndpoints>, {
|
|
29
|
-
+ apiUrl: `${middlewareUrl}/commerce`,
|
|
30
|
-
+ defaultRequestConfig: {
|
|
31
|
-
+ headers: getRequestHeaders(),
|
|
32
|
-
},
|
|
33
|
-
}),
|
|
34
|
-
})
|
|
35
|
-
);
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## 1.0.2
|
|
39
|
-
|
|
40
|
-
- **[FIXED]** Multi-store URL calculation, now working correctly in the browser.
|
|
41
|
-
|
|
42
|
-
## 1.0.1
|
|
43
|
-
|
|
44
|
-
- **[CHANGED]** Set `@vue-storefront/sdk` as a dependency instead of a peer dependency
|
|
45
|
-
|
|
46
|
-
## 1.0.0
|
|
47
|
-
|
|
48
|
-
- Initialized the package
|
|
File without changes
|
|
File without changes
|