From 9a6e77dedbda63e89442c1d2af246e75efb52262 Mon Sep 17 00:00:00 2001 From: Sebastian Hildebrandt Date: Fri, 9 Jun 2023 05:59:02 +0200 Subject: [PATCH] tests improved key handling, updated, fixed graphics mac OS --- .github/workflows/test.yml | 10 +++++----- CHANGELOG.md | 3 ++- docs/history.html | 7 ++++++- docs/index.html | 2 +- lib/graphics.js | 2 +- test/si.js | 2 +- test/test.js | 1 + 7 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a6f5306..a4ddecb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,20 +11,20 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node-version: [10.x, 12.x, 14.x, 16.x, 17.x, 18.x, 19.x] + node-version: [16.x, 17.x, 18.x, 19.x, 20.x] include: - - os: macos-latest - node-version: 14.x - os: macos-latest node-version: 16.x - os: macos-latest node-version: 18.x - - os: windows-latest - node-version: 14.x + - os: macos-latest + node-version: 20.x - os: windows-latest node-version: 16.x - os: windows-latest node-version: 18.x + - os: windows-latest + node-version: 20.x runs-on: ${{ matrix.os }} diff --git a/CHANGELOG.md b/CHANGELOG.md index d8d96c5..2c943ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,7 +73,7 @@ We had to make **several interface changes** to keep systeminformation as consis #### Test Full Version 5 Functionality -If you want to see all function results on your machine, please head over to (Testing section)[https://systeminformation.io/tests.html]. We implemented a tiny test suite where you can easily go through all functions and test resuls on your machine without coding. +If you want to see all function results on your machine, please head over to [Testing section](https://systeminformation.io/tests.html). We implemented a tiny test suite where you can easily go through all functions and test resuls on your machine without coding. For major (breaking) changes - **version 4, 3 and 2** - see end of page. @@ -82,6 +82,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.18.3 | 2023-06-09 | `tests` improved key handling, updated docs | | 5.18.2 | 2023-06-08 | `fsSize()` improved error handling (linux alpine) | | 5.18.1 | 2023-06-07 | `networkInterfaces()` cleaned up testVirtualNic | | 5.18.0 | 2023-06-06 | `fsSize()` added optional drive parameter | diff --git a/docs/history.html b/docs/history.html index 992e829..4405cd0 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,9 +57,14 @@ + + 5.18.3 + 2023-06-09 + tests improved key handling, updated docs + 5.18.2 - 2023-06-07 + 2023-06-08 fsSize() improved error handling (alpine linux) diff --git a/docs/index.html b/docs/index.html index ab7c7c9..de66d71 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
-
New Version: 5.18.2
+
New Version: 5.18.3
diff --git a/lib/graphics.js b/lib/graphics.js index 5d2b51f..963f0d7 100644 --- a/lib/graphics.js +++ b/lib/graphics.js @@ -669,7 +669,7 @@ function graphics(callback) { } catch (e) { util.noop(); } - stdout = execSync('defaults read /Library/Preferences/com.apple.windowserver.plist 2>/dev/null;defaults read /Library/Preferences/com.apple.windowserver.displays.plist 2>/dev/null; echo ""'); + stdout = execSync('defaults read /Library/Preferences/com.apple.windowserver.plist 2>/dev/null;defaults read /Library/Preferences/com.apple.windowserver.displays.plist 2>/dev/null; echo ""', { maxBuffer: 1024 * 20000 }); const output = (stdout || '').toString(); const obj = util.plistReader(output); if (obj['DisplayAnyUserSets'] && obj['DisplayAnyUserSets']['Configs'] && obj['DisplayAnyUserSets']['Configs'][0] && obj['DisplayAnyUserSets']['Configs'][0]['DisplayConfig']) { diff --git a/test/si.js b/test/si.js index e4a2837..2290735 100644 --- a/test/si.js +++ b/test/si.js @@ -56,7 +56,7 @@ function test(f) { else if (f === ',') { si.getStaticData().then((data) => { if (data !== null) { resolve({ data, title: 'All Static Data' }); } else { resolve('not_supported'); } }); } else if (f === '.') { si.getDynamicData('apache2, postgres, wsearch').then((data) => { if (data !== null) { resolve({ data, title: 'All Dynamic Data' }); } else { resolve('not_supported'); } }); } else if (f === '/') { si.getAllData('apache2, postgres, wsearch').then((data) => { if (data !== null) { resolve({ data, title: 'All Data' }); } else { resolve('not_supported'); } }); } - else if (f === '?') { + else if (f === 'getObj') { const valueObject = { cpu: '*', osInfo: 'platform, release', diff --git a/test/test.js b/test/test.js index f2cdf8f..c6f01ab 100644 --- a/test/test.js +++ b/test/test.js @@ -79,6 +79,7 @@ process.stdin.on('keypress', (key, data) => { console.time(['Time to complete']); startDots(); const siPath = path.join(__dirname, 'si.js'); + if (key === '?') { key = 'getObj'; } const sanitizedKey = utils.sanitizeShellString(key); exec(`node ${siPath} '${sanitizedKey}'`, { timeout: 30000 }, (error, stdout) => { waiting = false;