@akinon/next 1.60.0-rc.17 → 1.60.0-rc.18

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 1.60.0-rc.18
4
+
5
+ ### Minor Changes
6
+
7
+ - e6f3653e: ZERO-2985: Add resetBasketOnCurrencyChange option to Settings
8
+
3
9
  ## 1.60.0-rc.17
4
10
 
5
11
  ### Minor Changes
File without changes
File without changes
File without changes
package/bin/pz-postdev.js CHANGED
File without changes
File without changes
File without changes
File without changes
package/bin/pz-predev.js CHANGED
File without changes
File without changes
@@ -75,7 +75,8 @@ const withCurrency =
75
75
  url.pathname.match(urlLocaleMatcherRegex) &&
76
76
  !url.search.includes('mobile_app=true') &&
77
77
  !url.search.includes('page=CreditCardThreeDSecurePage') &&
78
- !url.search.includes('page=RedirectionPageCompletePage')
78
+ !url.search.includes('page=RedirectionPageCompletePage') &&
79
+ settings.resetBasketOnCurrencyChange !== false
79
80
  ) {
80
81
  logger.info('Currency changed. Resetting basket...', {
81
82
  sessionid: req.cookies.get('osessionid')?.value ?? '',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@akinon/next",
3
3
  "description": "Core package for Project Zero Next",
4
- "version": "1.60.0-rc.17",
4
+ "version": "1.60.0-rc.18",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -30,7 +30,7 @@
30
30
  "set-cookie-parser": "2.6.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@akinon/eslint-plugin-projectzero": "1.60.0-rc.17",
33
+ "@akinon/eslint-plugin-projectzero": "1.60.0-rc.18",
34
34
  "@types/react-redux": "7.1.30",
35
35
  "@types/set-cookie-parser": "2.4.7",
36
36
  "@typescript-eslint/eslint-plugin": "6.7.4",
package/types/index.ts CHANGED
@@ -194,6 +194,11 @@ export interface Settings {
194
194
  useOptimizedTranslations?: boolean;
195
195
  plugins?: Record<string, Record<string, any>>;
196
196
  includedProxyHeaders?: string[];
197
+ /**
198
+ * By default, the currency will be reset when the currency is changed.
199
+ * If you want to keep the basket when the currency is changed, you can set this option to `false`.
200
+ */
201
+ resetBasketOnCurrencyChange?: boolean;
197
202
  }
198
203
 
199
204
  export interface CacheOptions {