diff --git a/CHANGELOG.md b/CHANGELOG.md index b0d4153..145131f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -53,8 +53,8 @@ We had to make **several interface changes** to keep systeminformation as consis - `getData()`: support for passing parameters and filters (see section General / getData) - `graphics()`: extended nvidia-smi parsing - `networkInterfaces()`: type detection improved (win - wireless) -- `memoryLayout()`: extended manufacturer list (decoding) -- `memoryLayout()`: added ECC flag +- `memLayout()`: extended manufacturer list (decoding) +- `memLayout()`: added ECC flag - `osInfo()`: better fqdn (win) - `osinfo()`: added hypervizor if hyper-v is enabled (win only) - `osInfo()`: added remoteSession (win only) @@ -77,6 +77,8 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | +| 5.7.6 | 2021-06-09 | `battery()` improved detection (additional batteries windows) | +| 5.7.5 | 2021-06-08 | `memLayout()` improved clock speed detection (windows) | | 5.7.4 | 2021-05-27 | `osInfo()`, `cpu()` improved hypervisor, virtualization detection (windows) | | 5.7.3 | 2021-05-26 | `osInfo()` improved UEFI detection (windows) | | 5.7.2 | 2021-05-24 | `system()` virtual detection improvement | diff --git a/docs/battery.html b/docs/battery.html index 9ebed0b..d912070 100644 --- a/docs/battery.html +++ b/docs/battery.html @@ -226,6 +226,16 @@ battery serial + + + additionalBatteries[] + + + + X + + array of additional batteries + diff --git a/docs/changes.html b/docs/changes.html index d913931..71200a0 100644 --- a/docs/changes.html +++ b/docs/changes.html @@ -179,8 +179,8 @@
  • getData(): support for passing parameters and filters (see section General / getData)
  • graphics(): extended nvidia-smi parsing
  • networkInterfaces(): type detection improved (win - wireless)
  • -
  • memoryLayout(): extended manufacturer list (decoding)
  • -
  • memoryLayout(): added ECC flag
  • +
  • memLayout(): extended manufacturer list (decoding)
  • +
  • memLayout(): added ECC flag
  • osInfo(): better fqdn (win)
  • osinfo(): added hypervizor if hyper-v is enabled (win only)
  • system(): better Raspberry PI detection
  • diff --git a/docs/history.html b/docs/history.html index 8666a71..fa11c5f 100644 --- a/docs/history.html +++ b/docs/history.html @@ -56,6 +56,16 @@ + + 5.7.6 + 2021-06-09 + battery() improved detection (additional batteries windows) + + + 5.7.5 + 2021-06-08 + memLayout() improved clock speed detection (windows) + 5.7.4 2021-05-27 @@ -329,7 +339,7 @@ 5.0.4 2021-01-27 - memoryLayout() improved manufacturer decoding (linux) + memLayout() improved manufacturer decoding (linux) 5.0.3 diff --git a/docs/index.html b/docs/index.html index 36875fd..7d3caf6 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
    systeminformation
     
    -
    New Version: 5.7.4
    +
    New Version: 5.7.6
    @@ -211,7 +211,7 @@
    Downloads last month
    -
    414
    +
    420
    Dependents
    diff --git a/lib/battery.js b/lib/battery.js index e0713de..7c049e8 100644 --- a/lib/battery.js +++ b/lib/battery.js @@ -217,12 +217,13 @@ module.exports = function (callback) { workload ).then(data => { if (data) { - let parts = data.results[0].split('\r\n') + // let parts = data.results[0].split(/\n\s*\n/); + let parts = data.results[0].split('\r\n'); let batteries = []; for (let i = 0; i < parts.length; i++) { const hasValue = value => /\S/.test(value); if (hasValue(parts[i]) && (!batteries.length || !hasValue(parts[i - 1]))) { - batteries.push([]) + batteries.push([]); } if (hasValue(parts[i])) { batteries[batteries.length - 1].push(parts[i]); @@ -234,7 +235,7 @@ module.exports = function (callback) { let first = false; let additionalBatteries = []; for (let i = 0; i < batteries.length; i++) { - let lines = batteries[i] + let lines = batteries[i]; const designCapacity = designCapacities && designCapacities.length >= (i + 1) && designCapacities[i] ? util.toInt(designCapacities[i]) : 0; const fullChargeCapacity = fullChargeCapacities && fullChargeCapacities.length >= (i + 1) && fullChargeCapacities[i] ? util.toInt(fullChargeCapacities[i]) : 0; const parsed = parseWinBatteryPart(lines, designCapacity, fullChargeCapacity); diff --git a/lib/index.d.ts b/lib/index.d.ts index e72dc39..eeb620b 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -284,6 +284,7 @@ export namespace Systeminformation { model: string; manufacturer: string; serial: string; + additionalBatteries?: BatteryData[]; } interface GraphicsData { diff --git a/lib/memory.js b/lib/memory.js index 90bfc1c..e1aa80a 100644 --- a/lib/memory.js +++ b/lib/memory.js @@ -510,7 +510,7 @@ function memLayout(callback) { bank: util.getValue(lines, 'abel', '='), // BankLabel type: memoryTypes[parseInt(util.getValue(lines, 'MemoryType', '='), 10)], ecc: dataWidth && totalWidth ? totalWidth > dataWidth : false, - clockSpeed: parseInt(util.getValue(lines, 'ConfiguredClockSpeed', '='), 10) || 0, + clockSpeed: parseInt(util.getValue(lines, 'ConfiguredClockSpeed', '='), 10) || parseInt(util.getValue(lines, 'Speed', '='), 10) || 0, formFactor: FormFactors[parseInt(util.getValue(lines, 'FormFactor', '='), 10) || 0], manufacturer: util.getValue(lines, 'Manufacturer', '='), partNum: util.getValue(lines, 'PartNumber', '='), diff --git a/package.json b/package.json index 2c60340..bf3ae91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "systeminformation", - "version": "5.7.4", + "version": "5.7.6", "description": "Simple system and OS information library", "license": "MIT", "author": "Sebastian Hildebrandt (https://plus-innovations.com)",