diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b2e30a..576b65a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,7 +30,8 @@ For major (breaking) changes - version 3 and 2 see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | -| 4.30.9 | 2020-11-30 | `cpu()` corrected processor names (Raspberry Pi) | +| 4.30.10 | 2020-12-01 | `cpu()` handled speed parsing error (Apple Silicon) | +| 4.30.9 | 2020-12-01 | `cpu()` corrected processor names (Raspberry Pi) | | 4.30.8 | 2020-11-30 | `fsSize()` catch error (mac OS) | | 4.30.7 | 2020-11-29 | `cpuTemperature()` rewrite hwmon parsing | | 4.30.6 | 2020-11-27 | wmic added default windows path (windows) | diff --git a/README.md b/README.md index 578ef1c..09d9e43 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,13 @@ [![Sponsoring][sponsor-badge]][sponsor-url] [![MIT license][license-img]][license-url] -This is amazing. Started as a small project just for myself, it now has > 10,000 lines of code, > 350 versions published, up to 2 mio downloads per month, > 20 mio downloads overall. Thank you to all who contributed to this project! +This is amazing. Started as a small project just for myself, it now has > 10,000 lines of code, > 350 versions published, up to 2.5 mio downloads per month, > 20 mio downloads overall. Thank you to all who contributed to this project! + +## Upcoming + +**MacOS on ARM (Apple silicon support), Windows on ARM**: November 11th 2020 - We will have a closer look on that! As soon as we have the new hardware here, will work on support for those platforms! + +**Version 5**: we are planning a new major version with some minor breaking changes and some additional features. Will try to make this available Q1 of 2021. ## New Version 4.0 @@ -49,12 +55,6 @@ This next major version release 4.0 comes with several optimizations and changes Breaking Changes in version 4: you will see some minor breaking changes. Read the [detailed changelog][changelog-url]. -## Upcoming - -**MacOS on ARM, Windows on ARM**: November 11th 2020 - We will have a closer look on that! As soon as we have the new hardware here, will definitely work on support for those platforms. - -**Version 5**: we are planning a new major version with some minor breaking changes and some additional features. Will try to make this available Q1 of 2021. - ## Quick Start Lightweight collection of 40+ functions to retrieve detailed hardware, system and OS information. diff --git a/docs/history.html b/docs/history.html index ede11ce..dc74a72 100644 --- a/docs/history.html +++ b/docs/history.html @@ -83,6 +83,11 @@ + + 4.30.10 + 2020-12-01 + cpu() handled speed parsing error (Apple Silicon) + 4.30.9 2020-12-01 diff --git a/docs/index.html b/docs/index.html index 121790e..97a771c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -169,7 +169,7 @@
systeminformation
-
Current Version: 4.30.9
+
Current Version: 4.30.10
diff --git a/lib/cpu.js b/lib/cpu.js index b29ea98..3de30ab 100644 --- a/lib/cpu.js +++ b/lib/cpu.js @@ -413,8 +413,9 @@ function getCpu() { // if (!error) { let lines = stdout.toString().split('\n'); const modelline = util.getValue(lines, 'machdep.cpu.brand_string'); - result.brand = modelline.split('@')[0].trim(); - result.speed = modelline.split('@')[1].trim(); + const modellineParts = modelline.split('@'); + result.brand = modellineParts[0].trim(); + result.speed = modellineParts[1] ? modellineParts.trim() : '0'; result.speed = parseFloat(result.speed.replace(/GHz+/g, '')).toFixed(2); _cpu_speed = result.speed; result = cpuBrandManufacturer(result); @@ -450,8 +451,9 @@ function getCpu() { lines = stdout.toString().split('\n'); } modelline = util.getValue(lines, 'model name') || modelline; - result.brand = modelline.split('@')[0].trim(); - result.speed = modelline.split('@')[1] ? parseFloat(modelline.split('@')[1].trim()).toFixed(2) : '0.00'; + const modellineParts = modelline.split('@'); + result.brand = modellineParts[0].trim(); + result.speed = modellineParts[1] ? parseFloat(modellineParts[1].trim()).toFixed(2) : '0.00'; if (result.speed === '0.00' && (result.brand.indexOf('AMD') > -1 || result.brand.toLowerCase().indexOf('ryzen') > -1)) { result.speed = getAMDSpeed(result.brand); }