From 78bf9a2406725f7d3c0b7a18c0d24b11c1c2b4e2 Mon Sep 17 00:00:00 2001
From: Ahmed Ilyas <ahmed.ilyas@hu-berlin.de>
Date: Wed, 23 Oct 2024 10:12:33 +0000
Subject: [PATCH] Support windows commands

---
 gui/package.json | 15 ++++++++-------
 gui/yarn.lock    |  9 ++++++++-
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/gui/package.json b/gui/package.json
index fec46b3907..e14c14568d 100644
--- a/gui/package.json
+++ b/gui/package.json
@@ -5,10 +5,9 @@
     "@date-io/date-fns": "^1.3.13",
     "@fontsource/material-icons": "^4.2.1",
     "@fontsource/titillium-web": "^4.2.2",
-    "@lauri-codes/materia": "^1.0.1",
-    "crystcif-parse": "0.2.9",
     "@h5web/app": "8.0.0",
     "@h5web/lib": "8.0.0",
+    "@lauri-codes/materia": "^1.0.1",
     "@material-ui/core": "^4.12.4",
     "@material-ui/icons": "^4.11.3",
     "@material-ui/lab": "^4.0.0-alpha.61",
@@ -21,6 +20,7 @@
     "base-64": "^1.0.0",
     "chroma-js": "^2.0.3",
     "clsx": "^1.0.4",
+    "crystcif-parse": "0.2.9",
     "d3": "^5.9.1",
     "date-fns": "^2.22.1",
     "dompurify": "^3.0.1",
@@ -84,12 +84,12 @@
     "yup": "^0.32.11"
   },
   "scripts": {
-    "start": "export NODE_OPTIONS=--openssl-legacy-provider && craco start",
-    "build": "export CI=true && export NODE_OPTIONS=--openssl-legacy-provider && craco build",
-    "test": "export WAIT_FOR_GUI=None && craco test --testPathIgnorePatterns=.*/conftest.spec.js --watchAll=false --maxWorkers=4",
+    "start": "cross-env NODE_OPTIONS=--openssl-legacy-provider craco start",
+    "build": "cross-env CI=true NODE_OPTIONS=--openssl-legacy-provider && craco build",
+    "test": "cross-env WAIT_FOR_GUI=None craco test --testPathIgnorePatterns=.*/conftest.spec.js --watchAll=false --maxWorkers=4",
     "watch-test": "craco test --testPathIgnorePatterns=.*/conftest.spec.js --maxWorkers=4",
-    "test-integration": "export READ_MODE=api WRITE_MODE=none && craco test --testPathIgnorePatterns=.*/conftest.spec.js --watchAll=false --runInBand",
-    "test-record": "export READ_MODE=api WRITE_MODE=snapshot && craco test --testPathIgnorePatterns=.*/conftest.spec.js --watchAll=false --runInBand",
+    "test-integration": "cross-env READ_MODE=api WRITE_MODE=none craco test --testPathIgnorePatterns=.*/conftest.spec.js --watchAll=false --runInBand",
+    "test-record": "cross-env READ_MODE=api WRITE_MODE=snapshot craco test --testPathIgnorePatterns=.*/conftest.spec.js --watchAll=false --runInBand",
     "lint": "eslint 'src/**/*.js'",
     "eject": "craco eject"
   },
@@ -102,6 +102,7 @@
     "@testing-library/user-event": "^14.2.0",
     "@welldone-software/why-did-you-render": "^7.0.1",
     "craco-workbox": "^0.2.0",
+    "cross-env": "^7.0.3",
     "eslint": "^7.11.0",
     "eslint-config-standard": "^17.0.0",
     "eslint-plugin-import": "^2.14.0",
diff --git a/gui/yarn.lock b/gui/yarn.lock
index eef19c855f..1818adeee8 100644
--- a/gui/yarn.lock
+++ b/gui/yarn.lock
@@ -4865,6 +4865,13 @@ create-require@^1.1.0:
   resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
   integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==
 
+cross-env@^7.0.3:
+  version "7.0.3"
+  resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
+  integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==
+  dependencies:
+    cross-spawn "^7.0.1"
+
 cross-fetch@^3.1.5:
   version "3.1.5"
   resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f"
@@ -4872,7 +4879,7 @@ cross-fetch@^3.1.5:
   dependencies:
     node-fetch "2.6.7"
 
-cross-spawn@7.0.3, cross-spawn@^7.0.0, cross-spawn@^7.0.2:
+cross-spawn@7.0.3, cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.2:
   version "7.0.3"
   resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6"
   integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
-- 
GitLab