systeminformation 5.22.6 → 5.22.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/battery.js CHANGED
@@ -229,7 +229,7 @@ module.exports = function (callback) {
229
229
  try {
230
230
  const workload = [];
231
231
  workload.push(util.powerShell('Get-CimInstance Win32_Battery | select BatteryStatus, DesignCapacity, DesignVoltage, EstimatedChargeRemaining, DeviceID | fl'));
232
- workload.push(util.powerShell('(Get-CimInstance -Class BatteryStaticData -Namespace ROOT/WMI).DesignedCapacity'));
232
+ workload.push(util.powerShell('(Get-WmiObject -Class BatteryStaticData -Namespace ROOT/WMI).DesignedCapacity'));
233
233
  workload.push(util.powerShell('(Get-CimInstance -Class BatteryFullChargedCapacity -Namespace ROOT/WMI).FullChargedCapacity'));
234
234
  util.promiseAll(
235
235
  workload
package/lib/util.js CHANGED
@@ -52,7 +52,7 @@ const execOptsWin = {
52
52
  windowsHide: true,
53
53
  maxBuffer: 1024 * 20000,
54
54
  encoding: 'UTF-8',
55
- env: util._extend({}, process.env, { LANG: 'en_US.UTF-8' })
55
+ env: Object.assign({}, process.env, { LANG: 'en_US.UTF-8' })
56
56
  };
57
57
 
58
58
  function toInt(value) {
@@ -398,7 +398,7 @@ function powerShellStart() {
398
398
  windowsHide: true,
399
399
  maxBuffer: 1024 * 20000,
400
400
  encoding: 'UTF-8',
401
- env: util._extend({}, process.env, { LANG: 'en_US.UTF-8' })
401
+ env: Object.assign({}, process.env, { LANG: 'en_US.UTF-8' })
402
402
  });
403
403
  if (_psChild && _psChild.pid) {
404
404
  _psPersistent = true;
@@ -476,7 +476,7 @@ function powerShell(cmd) {
476
476
  windowsHide: true,
477
477
  maxBuffer: 1024 * 20000,
478
478
  encoding: 'UTF-8',
479
- env: util._extend({}, process.env, { LANG: 'en_US.UTF-8' })
479
+ env: Object.assign({}, process.env, { LANG: 'en_US.UTF-8' })
480
480
  });
481
481
 
482
482
  if (child && !child.pid) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "systeminformation",
3
- "version": "5.22.6",
3
+ "version": "5.22.8",
4
4
  "description": "Advanced, lightweight system and OS information library",
5
5
  "license": "MIT",
6
6
  "author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",