@faststore/api 1.12.19 → 1.12.21
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/CHANGELOG.md +18 -0
- package/dist/api.cjs.development.js +4 -2
- package/dist/api.cjs.development.js.map +1 -1
- package/dist/api.cjs.production.min.js +1 -1
- package/dist/api.cjs.production.min.js.map +1 -1
- package/dist/api.esm.js +4 -2
- package/dist/api.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/platforms/vtex/resolvers/validateSession.ts +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.12.21](https://github.com/vtex/faststore/compare/v1.12.20...v1.12.21) (2022-10-31)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Takes sales channel in consideration when getting region ([#1499](https://github.com/vtex/faststore/issues/1499)) ([6827c39](https://github.com/vtex/faststore/commit/6827c396a43e025e5bafb726471fdd212baba330))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## 1.12.20 (2022-10-26)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Chores
|
|
19
|
+
|
|
20
|
+
* git blame ignore modification by data-fs ([#1494](https://github.com/vtex/faststore/issues/1494)) ([783079e](https://github.com/vtex/faststore/commit/783079e7095b39270bbb60e79063b774056dc5d4))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## 1.12.19 (2022-10-25)
|
|
7
25
|
|
|
8
26
|
|
|
@@ -1251,10 +1251,12 @@ const validateSession = async (_, {
|
|
|
1251
1251
|
const postalCode = String((_oldSession$postalCod = oldSession.postalCode) != null ? _oldSession$postalCod : '').replace(/\D/g, '');
|
|
1252
1252
|
const country = (_oldSession$country = oldSession.country) != null ? _oldSession$country : '';
|
|
1253
1253
|
const params = new URLSearchParams(search);
|
|
1254
|
-
|
|
1254
|
+
const salesChannel = (_params$get = params.get('sc')) != null ? _params$get : channel.salesChannel;
|
|
1255
|
+
params.set('sc', salesChannel);
|
|
1255
1256
|
const [regionData, sessionData] = await Promise.all([postalCode ? clients.commerce.checkout.region({
|
|
1256
1257
|
postalCode,
|
|
1257
|
-
country
|
|
1258
|
+
country,
|
|
1259
|
+
salesChannel
|
|
1258
1260
|
}) : Promise.resolve(null), clients.commerce.session(params.toString()).catch(() => null)]);
|
|
1259
1261
|
const profile = (_sessionData$namespac = sessionData == null ? void 0 : sessionData.namespaces.profile) != null ? _sessionData$namespac : null;
|
|
1260
1262
|
const store = (_sessionData$namespac2 = sessionData == null ? void 0 : sessionData.namespaces.store) != null ? _sessionData$namespac2 : null;
|