From 2661b924c15fab169a3f43c77367deeb8912fab0 Mon Sep 17 00:00:00 2001
From: Ingo Fischer <github@fischer-ka.de>
Date: Mon, 6 Nov 2023 10:59:16 +0100
Subject: [PATCH] Lets also upgrade usb

---
 package-lock.json | 53 +++++++++++++++++++++++++++++++----------------
 package.json      |  2 +-
 2 files changed, 36 insertions(+), 19 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index 21e68ff..786c915 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -24,8 +24,11 @@
       "devDependencies": {
         "jshint": "^2.13.6"
       },
+      "engines": {
+        "node": ">=14.0.0"
+      },
       "optionalDependencies": {
-        "usb": "^1.9.2"
+        "usb": "^2.11.0"
       }
     },
     "node_modules/@isaacs/cliui": {
@@ -175,6 +178,12 @@
         "node": ">=14"
       }
     },
+    "node_modules/@types/w3c-web-usb": {
+      "version": "1.0.9",
+      "resolved": "https://registry.npmjs.org/@types/w3c-web-usb/-/w3c-web-usb-1.0.9.tgz",
+      "integrity": "sha512-6EIpb9g9k/SGu59mQ6RW3tedmabtE+N3iGRa98+1CCFuhGt565wLEYKXoEVKTuNrCr2SrgfvBMN5db6hggkzKQ==",
+      "optional": true
+    },
     "node_modules/abbrev": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
@@ -1149,9 +1158,9 @@
       }
     },
     "node_modules/node-addon-api": {
-      "version": "4.3.0",
-      "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz",
-      "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==",
+      "version": "7.0.0",
+      "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.0.0.tgz",
+      "integrity": "sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA==",
       "optional": true
     },
     "node_modules/node-fetch": {
@@ -1681,17 +1690,18 @@
       }
     },
     "node_modules/usb": {
-      "version": "1.9.2",
-      "resolved": "https://registry.npmjs.org/usb/-/usb-1.9.2.tgz",
-      "integrity": "sha512-dryNz030LWBPAf6gj8vyq0Iev3vPbCLHCT8dBw3gQRXRzVNsIdeuU+VjPp3ksmSPkeMAl1k+kQ14Ij0QHyeiAg==",
+      "version": "2.11.0",
+      "resolved": "https://registry.npmjs.org/usb/-/usb-2.11.0.tgz",
+      "integrity": "sha512-u5+NZ6DtoW8TIBtuSArQGAZZ/K15i3lYvZBAYmcgI+RcDS9G50/KPrUd3CrU8M92ahyCvg5e0gc8BDvr5Hwejg==",
       "hasInstallScript": true,
       "optional": true,
       "dependencies": {
-        "node-addon-api": "^4.2.0",
-        "node-gyp-build": "^4.3.0"
+        "@types/w3c-web-usb": "^1.0.6",
+        "node-addon-api": "^7.0.0",
+        "node-gyp-build": "^4.5.0"
       },
       "engines": {
-        "node": ">=10.16.0"
+        "node": ">=12.22.0 <13.0 || >=14.17.0"
       }
     },
     "node_modules/util-deprecate": {
@@ -1949,6 +1959,12 @@
       "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
       "optional": true
     },
+    "@types/w3c-web-usb": {
+      "version": "1.0.9",
+      "resolved": "https://registry.npmjs.org/@types/w3c-web-usb/-/w3c-web-usb-1.0.9.tgz",
+      "integrity": "sha512-6EIpb9g9k/SGu59mQ6RW3tedmabtE+N3iGRa98+1CCFuhGt565wLEYKXoEVKTuNrCr2SrgfvBMN5db6hggkzKQ==",
+      "optional": true
+    },
     "abbrev": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
@@ -2721,9 +2737,9 @@
       "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="
     },
     "node-addon-api": {
-      "version": "4.3.0",
-      "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz",
-      "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==",
+      "version": "7.0.0",
+      "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.0.0.tgz",
+      "integrity": "sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA==",
       "optional": true
     },
     "node-fetch": {
@@ -3089,13 +3105,14 @@
       }
     },
     "usb": {
-      "version": "1.9.2",
-      "resolved": "https://registry.npmjs.org/usb/-/usb-1.9.2.tgz",
-      "integrity": "sha512-dryNz030LWBPAf6gj8vyq0Iev3vPbCLHCT8dBw3gQRXRzVNsIdeuU+VjPp3ksmSPkeMAl1k+kQ14Ij0QHyeiAg==",
+      "version": "2.11.0",
+      "resolved": "https://registry.npmjs.org/usb/-/usb-2.11.0.tgz",
+      "integrity": "sha512-u5+NZ6DtoW8TIBtuSArQGAZZ/K15i3lYvZBAYmcgI+RcDS9G50/KPrUd3CrU8M92ahyCvg5e0gc8BDvr5Hwejg==",
       "optional": true,
       "requires": {
-        "node-addon-api": "^4.2.0",
-        "node-gyp-build": "^4.3.0"
+        "@types/w3c-web-usb": "^1.0.6",
+        "node-addon-api": "^7.0.0",
+        "node-gyp-build": "^4.5.0"
       }
     },
     "util-deprecate": {
diff --git a/package.json b/package.json
index 7aad16f..0e78a5a 100644
--- a/package.json
+++ b/package.json
@@ -33,7 +33,7 @@
     "node-gyp": "^10.0.1"
   },
   "optionalDependencies": {
-    "usb": "^1.9.2"
+    "usb": "^2.11.0"
   },
   "devDependencies": {
     "jshint": "^2.13.6"