From 5d9b6f0537fbfe9ad0f8cf53d894a45ee6b5de23 Mon Sep 17 00:00:00 2001
From: Tristan Timblin
Date: Fri, 12 Jan 2024 14:22:04 -0800
Subject: [PATCH] CEC-5618: add all diagnostic commands and resolve node 16
error (#494)
---
package-lock.json | 13 ++
package.json | 1 +
src/components/App/App.test.js | 5 +
.../App/__snapshots__/App.test.js.snap | 154 +++++++++---------
.../BulkActions/actions/Diagnostic.jsx | 23 +--
src/components/BulkActions/index.jsx | 2 +-
.../Controls/SendDiagnosticCommand/index.jsx | 10 +-
7 files changed, 114 insertions(+), 94 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 3e21b28..161376d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -48,6 +48,7 @@
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
+ "@ungap/structured-clone": "^1.2.0",
"eslint": "^8.32.0",
"eslint-plugin-react": "^7.32.1",
"react-test-renderer": "^17.0.2"
@@ -4921,6 +4922,12 @@
"url": "https://opencollective.com/typescript-eslint"
}
},
+ "node_modules/@ungap/structured-clone": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
+ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==",
+ "dev": true
+ },
"node_modules/@webassemblyjs/ast": {
"version": "1.11.6",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz",
@@ -20684,6 +20691,12 @@
"eslint-visitor-keys": "^3.3.0"
}
},
+ "@ungap/structured-clone": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
+ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==",
+ "dev": true
+ },
"@webassemblyjs/ast": {
"version": "1.11.6",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz",
diff --git a/package.json b/package.json
index e1da079..56feb02 100644
--- a/package.json
+++ b/package.json
@@ -79,6 +79,7 @@
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
+ "@ungap/structured-clone": "^1.2.0",
"eslint": "^8.32.0",
"eslint-plugin-react": "^7.32.1",
"react-test-renderer": "^17.0.2"
diff --git a/src/components/App/App.test.js b/src/components/App/App.test.js
index 8bbf94d..9ec3805 100644
--- a/src/components/App/App.test.js
+++ b/src/components/App/App.test.js
@@ -18,6 +18,7 @@ import App from ".";
import addSnapshotSerializer from "../../utils/snapshot";
import { TEST_AUTH_OBJECT_FISKER, TEST_AUTH_OBJECT_MAGNA } from "../../utils/testing";
import { setToken } from "../Contexts/UserContext";
+import structuredClone from '@ungap/structured-clone';
const LOADING_STATUS = "Loading...";
@@ -51,6 +52,10 @@ describe("App", () => {
global.URL.createObjectURL = jest.fn();
addSnapshotSerializer(expect);
jest.setTimeout(10000);
+
+ if (!("structuredClone" in global)) {
+ global.structuredClone = structuredClone;
+ }
}, 60000);
afterEach(() => {
diff --git a/src/components/App/__snapshots__/App.test.js.snap b/src/components/App/__snapshots__/App.test.js.snap
index ad6d052..fb11ba2 100644
--- a/src/components/App/__snapshots__/App.test.js.snap
+++ b/src/components/App/__snapshots__/App.test.js.snap
@@ -4243,7 +4243,6 @@ exports[`App Route /package-deploy authenticated 1`] = `
class="makeStyles-paper-0"
>
-