@salesforce/retail-react-app 2.1.0-preview.0 → 2.1.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/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
- ## v2.1.0-preview.0 (Nov 2, 2023)
1
+ ## v2.1.1 (Nov 7, 2023)
2
2
 
3
- - Support Storefront Preview
3
+ - Use the new opt-in mechanism for enforcing the default security headers required by PWA Kit projects. [#1528](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1528)
4
+
5
+ ## v2.1.0 (Nov 3, 2023)
6
+
7
+ - Support Storefront Preview
4
8
  - [#1413](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1413)
5
9
  - [#1440](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1440)
6
10
  - Show discounted and strikethrough prices when there is a promotion on product detail page [1455](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/1455)
package/app/ssr.js CHANGED
@@ -9,6 +9,7 @@
9
9
 
10
10
  import path from 'path'
11
11
  import {getRuntime} from '@salesforce/pwa-kit-runtime/ssr/server/express'
12
+ import {defaultPwaKitSecurityHeaders} from '@salesforce/pwa-kit-runtime/utils/middleware'
12
13
  import {getConfig} from '@salesforce/pwa-kit-runtime/utils/ssr-config'
13
14
  import helmet from 'helmet'
14
15
 
@@ -34,11 +35,11 @@ const options = {
34
35
  const runtime = getRuntime()
35
36
 
36
37
  const {handler} = runtime.createHandler(options, (app) => {
37
- // Set HTTP security headers
38
+ // Set default HTTP security headers required by PWA Kit
39
+ app.use(defaultPwaKitSecurityHeaders)
40
+ // Set custom HTTP security headers
38
41
  app.use(
39
42
  helmet({
40
- // pwa-kit-runtime ensures that the Content-Security-Policy header always contains the
41
- // directives required for PWA Kit to function. Add custom directives here.
42
43
  contentSecurityPolicy: {
43
44
  useDefaults: true,
44
45
  directives: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/retail-react-app",
3
- "version": "2.1.0-preview.0",
3
+ "version": "2.1.1",
4
4
  "license": "See license in LICENSE",
5
5
  "author": "cc-pwa-kit@salesforce.com",
6
6
  "ccExtensibility": {
@@ -45,10 +45,10 @@
45
45
  "@lhci/cli": "^0.11.0",
46
46
  "@loadable/component": "^5.15.3",
47
47
  "@peculiar/webcrypto": "^1.4.2",
48
- "@salesforce/commerce-sdk-react": "1.1.0-preview.0",
49
- "@salesforce/pwa-kit-dev": "3.2.0-preview.0",
50
- "@salesforce/pwa-kit-react-sdk": "3.2.0-preview.0",
51
- "@salesforce/pwa-kit-runtime": "3.2.0-preview.0",
48
+ "@salesforce/commerce-sdk-react": "1.1.0",
49
+ "@salesforce/pwa-kit-dev": "3.2.1",
50
+ "@salesforce/pwa-kit-react-sdk": "3.2.1",
51
+ "@salesforce/pwa-kit-runtime": "3.2.1",
52
52
  "@tanstack/react-query": "^4.28.0",
53
53
  "@tanstack/react-query-devtools": "^4.29.1",
54
54
  "@testing-library/dom": "^9.0.1",
@@ -103,5 +103,5 @@
103
103
  "overrides": {
104
104
  "nwsapi": "2.2.2"
105
105
  },
106
- "gitHead": "2796cec01d4462b66b9efbc2171aa921f0b7aec6"
106
+ "gitHead": "2c8502478dc9f571f57042565d3d5938e46336a2"
107
107
  }