From 4344dcc48a6e0a2bbf6d15924121aac7bb4a324b Mon Sep 17 00:00:00 2001 From: Raiya Jessa Date: Mon, 12 Dec 2022 15:26:22 -0800 Subject: [PATCH 1/5] add explicit dependency on ws --- packages/pwa-kit-dev/package-lock.json | 180 +++++++++---------------- packages/pwa-kit-dev/package.json | 3 +- 2 files changed, 66 insertions(+), 117 deletions(-) diff --git a/packages/pwa-kit-dev/package-lock.json b/packages/pwa-kit-dev/package-lock.json index 8aa45ed975..37af2fd0cb 100644 --- a/packages/pwa-kit-dev/package-lock.json +++ b/packages/pwa-kit-dev/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "pwa-kit-dev", - "version": "2.4.0-dev", + "version": "2.5.0-dev", "license": "SEE LICENSE IN LICENSE", "dependencies": { "@babel/cli": "^7.4.4", @@ -60,7 +60,6 @@ "jest-fetch-mock": "^2.1.2", "mime-types": "2.1.32", "minimatch": "3.0.5", - "morgan": "1.9.1", "open": "^8.4.0", "prettier": "^1.18.2", "react-refresh": "^0.13.0", @@ -78,7 +77,8 @@ "webpack-dev-middleware": "^5.2.2", "webpack-hot-middleware": "^2.25.1", "webpack-hot-server-middleware": "^0.6.1", - "webpack-notifier": "^1.12.0" + "webpack-notifier": "^1.12.0", + "ws": "^8.11.0" }, "bin": { "pwa-kit-dev": "bin/pwa-kit-dev.js" @@ -3951,17 +3951,6 @@ } ] }, - "node_modules/basic-auth": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", - "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", - "dependencies": { - "safe-buffer": "5.1.2" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -9110,6 +9099,26 @@ } } }, + "node_modules/jsdom/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -9624,53 +9633,6 @@ "node": ">=0.10.0" } }, - "node_modules/morgan": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz", - "integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==", - "dependencies": { - "basic-auth": "~2.0.0", - "debug": "2.6.9", - "depd": "~1.1.2", - "on-finished": "~2.3.0", - "on-headers": "~1.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/morgan/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/morgan/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/morgan/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "node_modules/morgan/node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/mrmime": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.0.tgz", @@ -13877,6 +13839,26 @@ "node": ">= 10" } }, + "node_modules/webpack-bundle-analyzer/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/webpack-cli": { "version": "4.9.2", "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.9.2.tgz", @@ -14416,11 +14398,11 @@ } }, "node_modules/ws": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", - "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", "engines": { - "node": ">=8.3.0" + "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", @@ -17359,14 +17341,6 @@ "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, - "basic-auth": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", - "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", - "requires": { - "safe-buffer": "5.1.2" - } - }, "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -21288,6 +21262,14 @@ "whatwg-url": "^8.5.0", "ws": "^7.4.6", "xml-name-validator": "^3.0.0" + }, + "dependencies": { + "ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "requires": {} + } } }, "jsesc": { @@ -21698,46 +21680,6 @@ } } }, - "morgan": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz", - "integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==", - "requires": { - "basic-auth": "~2.0.0", - "debug": "2.6.9", - "depd": "~1.1.2", - "on-finished": "~2.3.0", - "on-headers": "~1.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "requires": { - "ee-first": "1.1.1" - } - } - } - }, "mrmime": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.0.tgz", @@ -25015,6 +24957,12 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==" + }, + "ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "requires": {} } } }, @@ -25379,9 +25327,9 @@ } }, "ws": { - "version": "7.5.7", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz", - "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==", + "version": "8.11.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", + "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", "requires": {} }, "xml-name-validator": { diff --git a/packages/pwa-kit-dev/package.json b/packages/pwa-kit-dev/package.json index 0e17723bba..5531e1b744 100644 --- a/packages/pwa-kit-dev/package.json +++ b/packages/pwa-kit-dev/package.json @@ -104,7 +104,8 @@ "webpack-dev-middleware": "^5.2.2", "webpack-hot-middleware": "^2.25.1", "webpack-hot-server-middleware": "^0.6.1", - "webpack-notifier": "^1.12.0" + "webpack-notifier": "^1.12.0", + "ws": "^8.11.0" }, "devDependencies": { "@loadable/component": "^5.15.0", From 269c1c6dae07c1281a855d2bd53068657168ebe7 Mon Sep 17 00:00:00 2001 From: Raiya Jessa Date: Mon, 12 Dec 2022 15:45:18 -0800 Subject: [PATCH 2/5] update changelog --- packages/pwa-kit-dev/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/pwa-kit-dev/CHANGELOG.md b/packages/pwa-kit-dev/CHANGELOG.md index 37a5ae0ac8..9b9f82672d 100644 --- a/packages/pwa-kit-dev/CHANGELOG.md +++ b/packages/pwa-kit-dev/CHANGELOG.md @@ -1,4 +1,6 @@ ## v2.5.0-dev (Dec 01, 2022) +- Add explicit `ws` dependency [#861](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/861) + ## v2.4.0 (Dec 01, 2022) - Add `tail-logs` command [#789](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/789) - Upgrade minimatch [#793](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/793) From 8c9c8c902c474e486f01c09c68078c55aaf8c8a1 Mon Sep 17 00:00:00 2001 From: Raiya Jessa Date: Tue, 13 Dec 2022 09:45:40 -0800 Subject: [PATCH 3/5] empty commit From 689ce9c4c66e02d6b22d0b767093e57b170e2a1f Mon Sep 17 00:00:00 2001 From: Raiya Jessa Date: Thu, 15 Dec 2022 11:53:48 -0800 Subject: [PATCH 4/5] update docs url for 403 errors --- packages/pwa-kit-dev/scripts/utils.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/pwa-kit-dev/scripts/utils.js b/packages/pwa-kit-dev/scripts/utils.js index c7ee883a29..5fd4bc9813 100644 --- a/packages/pwa-kit-dev/scripts/utils.js +++ b/packages/pwa-kit-dev/scripts/utils.js @@ -169,6 +169,10 @@ Utils.errorForStatus = (response) => { error = {} } + if (status === 403) { + error.docs_url = 'https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/mrt-overview.html#users,-abilities,-and-roles' + } + return new Error( [ `HTTP ${status}`, From 1334180e51b744e5f6f9335a53da923ea2320000 Mon Sep 17 00:00:00 2001 From: Raiya Jessa Date: Thu, 15 Dec 2022 11:58:50 -0800 Subject: [PATCH 5/5] lint --- packages/pwa-kit-dev/scripts/utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/pwa-kit-dev/scripts/utils.js b/packages/pwa-kit-dev/scripts/utils.js index 5fd4bc9813..2d5ca2898a 100644 --- a/packages/pwa-kit-dev/scripts/utils.js +++ b/packages/pwa-kit-dev/scripts/utils.js @@ -170,7 +170,8 @@ Utils.errorForStatus = (response) => { } if (status === 403) { - error.docs_url = 'https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/mrt-overview.html#users,-abilities,-and-roles' + error.docs_url = + 'https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/mrt-overview.html#users,-abilities,-and-roles' } return new Error(