diff --git a/CHANGELOG.md b/CHANGELOG.md index cb148b9..9f25d97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ For major (breaking) changes - version 3 and 2 see end of page. | Version | Date | Comment | | -------------- | -------------- | -------- | +| 4.1.0 | 2019-03-13 | `versions()` added pip, pip3 | | 4.0.16 | 2019-03-12 | Happy birthday - 5th aniversary | | 4.0.15 | 2019-03-02 | `versions()` added java, python3, optimized gcc | | 4.0.14 | 2019-03-01 | updated typescript typings | diff --git a/README.md b/README.md index f343917..a699e20 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ `-.__ __.-' ````"""""""```` ``` -Today is the **5th birthday** of systeminformation. This is amazing. Started as a small projekt just for myself, it now has > 8,000 lines of code, > 200 versions published, up to 100,000 downloads per month, > 888,000 downloads overall. Thank you to all who contributed to this project! +2019-03-12 - the **5th birthday** of systeminformation. This is amazing. Started as a small projekt just for myself, it now has > 8,000 lines of code, > 200 versions published, up to 100,000 downloads per month, > 888,000 downloads overall. Thank you to all who contributed to this project! ## New Version 4.0 @@ -98,6 +98,7 @@ si.cpu() (last 7 major and minor version releases) +- Version 4.1.0: `versions()` added python3, pip, pip3, java - Version 4.0.0: new version ... read the [detailed changelog][changelog-url] to see all breaking changes - Version 3.54.0: added TypeScript type definitions - Version 3.53.0: `versions()` added perl, python, gcc diff --git a/docs/history.html b/docs/history.html index 257c398..5c5b90e 100644 --- a/docs/history.html +++ b/docs/history.html @@ -80,6 +80,11 @@ + + 4.1.0 + 2019-03-13 + versions()added pip, pip3 + 4.0.16 2019-03-12 diff --git a/docs/index.html b/docs/index.html index 559a905..226327b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
-
Current Version: 4.0.16
+
Current Version: 4.1.0
@@ -193,7 +193,7 @@
-
8,197
+
8,215
Lines of code
diff --git a/lib/osinfo.js b/lib/osinfo.js index e244a9b..be922ea 100644 --- a/lib/osinfo.js +++ b/lib/osinfo.js @@ -332,12 +332,14 @@ function versions(callback) { perl: '', python: '', python3: '', + pip: '', + pip3: '', java: '', gcc: '' }; let functionProcessed = (function () { - let totalFunctions = 21; + let totalFunctions = 23; return function () { if (--totalFunctions === 0) { if (callback) { @@ -564,6 +566,22 @@ function versions(callback) { } functionProcessed(); }); + exec('pip -V 2>&1', function (error, stdout) { + if (!error) { + const pip = stdout.toString().split('\n')[0] || ''; + const parts = pip.split(' '); + result.pip = parts.length >= 2 ? parts[2] : ''; + } + functionProcessed(); + }); + exec('pip3 -V 2>&1', function (error, stdout) { + if (!error) { + const pip = stdout.toString().split('\n')[0] || ''; + const parts = pip.split(' '); + result.pip3 = parts.length >= 2 ? parts[2] : ''; + } + functionProcessed(); + }); exec('java -version 2>&1', function (error, stdout) { if (!error) { const java = stdout.toString().split('\n')[0] || '';