From a131e11cda756aad4a95ec6561ec9ecc67ec01c5 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Sun, 27 Aug 2023 21:48:43 +0200 Subject: [PATCH] graphics() improved vendor, model parsing (linux), memLayout() DDR5 detection (windows) --- CHANGELOG.md | 2 +- README.md | 3 ++- docs/graphics.html | 14 ++++++++++++-- docs/history.html | 4 ++-- docs/index.html | 4 ++-- lib/graphics.js | 7 ++++--- lib/index.d.ts | 1 + 7 files changed, 24 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a7cc38..704cfb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -83,7 +83,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | -| 5.20.1 | 2023-08-28 | `graphics()` improved vendor, model parsing (linux) `memLayout()` DDR5 detection (windows) | +| 5.21.0 | 2023-08-28 | `graphics()` added subvendor (linux) `memLayout()` DDR5 detection (windows) | | 5.20.0 | 2023-08-25 | `mem()` added writenack and dirty (linux) | | 5.19.1 | 2023-08-23 | `wifiNetworks()` improved SSID parsing (macOS) | | 5.19.0 | 2023-08-22 | `currentLoad()` added steal and guest time (linux) | diff --git a/README.md b/README.md index 42739ee..c478fbf 100644 --- a/README.md +++ b/README.md @@ -328,7 +328,8 @@ Full function reference with examples can be found at [https://systeminformation | --------------- | ------------------------- | ----- | --- | --- | --- | --- | ------------------------------------------- | | si.graphics(cb) | {...} | X | | X | X | | arrays of graphics controllers and displays | | | controllers[] | X | | X | X | | graphics controllers array | -| | ...[0].vendor | X | | X | X | | e.g. ATI | +| | ...[0].vendor | X | | X | X | | e.g. NVIDIA | +| | ...[0].subvendor | X | | | | | e.g. Gigabyte | | | ...[0].vendorId | | | X | | | vendor ID | | | ...[0].model | X | | X | X | | graphics controller model | | | ...[0].deviceId | | | X | | | device ID | diff --git a/docs/graphics.html b/docs/graphics.html index 7307d57..528ca52 100644 --- a/docs/graphics.html +++ b/docs/graphics.html @@ -95,7 +95,17 @@ X X - e.g. ATI + Chip manufacturer e.g. NVIDIA + + + + ...[0].subvendor + X + + + + + Subvendor e.g. Gigabyte @@ -649,4 +659,4 @@ si.graphics().then(data => console.log(data)); - \ No newline at end of file + diff --git a/docs/history.html b/docs/history.html index 8995c9a..1d8be53 100644 --- a/docs/history.html +++ b/docs/history.html @@ -58,9 +58,9 @@ - 5.20.1 + 5.21.0 2023-08-28 - graphics() improved parsing (linux) mamLayout() DDR5 detection (windows) + graphics() added subvendor (linux) mamLayout() DDR5 detection (windows) 5.20.0 diff --git a/docs/index.html b/docs/index.html index 681d6de..e1227c1 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.20.1
+
New Version: 5.21.0
@@ -212,7 +212,7 @@
Downloads last month
-
642
+
645
Dependents
diff --git a/lib/graphics.js b/lib/graphics.js index 2664d8f..ee0d61a 100644 --- a/lib/graphics.js +++ b/lib/graphics.js @@ -204,6 +204,7 @@ function graphics(callback) { let controllers = []; let currentController = { vendor: '', + subvendor: '', model: '', bus: '', busAddress: '', @@ -292,9 +293,9 @@ function graphics(callback) { } } if (currentController.model && subsystem.indexOf(currentController.model) !== -1) { - const vendor2 = subsystem.split(currentController.model)[0].trim(); - if (vendor2) { - currentController.vendor += ', ' + vendor2; + const subvendor = subsystem.split(currentController.model)[0].trim(); + if (subvendor) { + currentController.subvendor = subvendor; } } } diff --git a/lib/index.d.ts b/lib/index.d.ts index 408af37..3234219 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -306,6 +306,7 @@ export namespace Systeminformation { interface GraphicsControllerData { vendor: string; + subvendor?: string; vendorId?: string; model: string; deviceId?: string;