versions() added pip, pip3

This commit is contained in:
Sebastian Hildebrandt 2019-03-13 20:05:30 +01:00
parent 3d489932c1
commit 0050b7ba34
5 changed files with 29 additions and 4 deletions

View File

@ -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 |

View File

@ -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

View File

@ -80,6 +80,11 @@
</tr>
</thead>
<tbody>
<tr>
<th scope="row">4.1.0</th>
<td>2019-03-13</td>
<td><span class="code">versions()</span>added pip, pip3</td>
</tr>
<tr>
<th scope="row">4.0.16</th>
<td>2019-03-12</td>

View File

@ -170,7 +170,7 @@
<img class="logo" src="assets/logo.png">
<div class="title">systeminformation</div>
<div class="subtitle"><span id="typed"></span></div>
<div class="version">Current Version: <span id="version">4.0.16</span></div>
<div class="version">Current Version: <span id="version">4.1.0</span></div>
<button class="btn btn-light" onclick="location.href='https://github.com/sebhildebrandt/systeminformation'">View on Github <i class=" fab fa-github"></i></button>
</div>
<div class="down">
@ -193,7 +193,7 @@
</div>
<div class="row number-section">
<div class="col-xl-4 col-lg-4 col-md-4 col-12">
<div class="numbers">8,197</div>
<div class="numbers">8,215</div>
<div class="title">Lines of code</div>
</div>
<div class="col-xl-4 col-lg-4 col-md-4 col-12">

View File

@ -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] || '';