@k03mad/actual-versions 2.6.0 → 3.0.0
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/.github/workflows/lint.yml +1 -1
- package/.github/workflows/publish.yml +1 -1
- package/.github/workflows/test.yml +1 -1
- package/.vscode/settings.json +5 -0
- package/app/cli.js +2 -3
- package/app/tools/aria.js +4 -4
- package/app/tools/chrome.js +4 -4
- package/app/tools/curl.js +4 -4
- package/app/tools/nodejs.js +4 -4
- package/package.json +3 -5
package/app/cli.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import {log, logError} from '@k03mad/simple-log';
|
|
4
3
|
import chalk from 'chalk';
|
|
5
4
|
import {getBorderCharacters, table} from 'table';
|
|
6
5
|
|
|
@@ -23,7 +22,7 @@ const output = await Promise.all(
|
|
|
23
22
|
version ? green(version) : red('———'),
|
|
24
23
|
];
|
|
25
24
|
} catch (err) {
|
|
26
|
-
|
|
25
|
+
console.log(`[${key}] ${err}`);
|
|
27
26
|
}
|
|
28
27
|
}),
|
|
29
28
|
);
|
|
@@ -32,4 +31,4 @@ const formattedTable = table(output.filter(Boolean), {
|
|
|
32
31
|
border: getBorderCharacters(config.table.border),
|
|
33
32
|
});
|
|
34
33
|
|
|
35
|
-
log(formattedTable);
|
|
34
|
+
console.log(formattedTable);
|
package/app/tools/aria.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {requestCache} from '@k03mad/request';
|
|
2
|
-
|
|
3
1
|
const ARIA_VERSIONS_URL = 'https://aria2.github.io/';
|
|
4
2
|
const ARIA_VERSION_RE = /href=".+\/releases\/tag\/release-([\d.]+)"/;
|
|
5
3
|
|
|
@@ -7,6 +5,8 @@ const ARIA_VERSION_RE = /href=".+\/releases\/tag\/release-([\d.]+)"/;
|
|
|
7
5
|
* @returns {Promise<string>}
|
|
8
6
|
*/
|
|
9
7
|
export default async () => {
|
|
10
|
-
const
|
|
11
|
-
|
|
8
|
+
const response = await fetch(ARIA_VERSIONS_URL);
|
|
9
|
+
const text = await response.text();
|
|
10
|
+
|
|
11
|
+
return text.match(ARIA_VERSION_RE)?.[1];
|
|
12
12
|
};
|
package/app/tools/chrome.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {requestCache} from '@k03mad/request';
|
|
2
|
-
|
|
3
1
|
const CHROME_VERSIONS_URL = 'https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions.json';
|
|
4
2
|
|
|
5
3
|
/**
|
|
6
4
|
* @returns {Promise<string>}
|
|
7
5
|
*/
|
|
8
6
|
export default async () => {
|
|
9
|
-
const
|
|
10
|
-
|
|
7
|
+
const response = await fetch(CHROME_VERSIONS_URL);
|
|
8
|
+
const json = await response.json();
|
|
9
|
+
|
|
10
|
+
return json?.channels?.Stable?.version;
|
|
11
11
|
};
|
package/app/tools/curl.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {requestCache} from '@k03mad/request';
|
|
2
|
-
|
|
3
1
|
const CURL_VERSIONS_URL = 'https://curl.se/download.html';
|
|
4
2
|
const CURL_VERSION_RE = /href="\/download\/curl-([\d.]+).tar.gz"/;
|
|
5
3
|
|
|
@@ -7,6 +5,8 @@ const CURL_VERSION_RE = /href="\/download\/curl-([\d.]+).tar.gz"/;
|
|
|
7
5
|
* @returns {Promise<string>}
|
|
8
6
|
*/
|
|
9
7
|
export default async () => {
|
|
10
|
-
const
|
|
11
|
-
|
|
8
|
+
const response = await fetch(CURL_VERSIONS_URL);
|
|
9
|
+
const text = await response.text();
|
|
10
|
+
|
|
11
|
+
return text.match(CURL_VERSION_RE)?.[1];
|
|
12
12
|
};
|
package/app/tools/nodejs.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {requestCache} from '@k03mad/request';
|
|
2
|
-
|
|
3
1
|
const NODE_VERSIONS_URL = 'https://nodejs.org/dist/index.json';
|
|
4
2
|
|
|
5
3
|
/**
|
|
6
4
|
* @returns {Promise<string>}
|
|
7
5
|
*/
|
|
8
6
|
export default async () => {
|
|
9
|
-
const
|
|
10
|
-
|
|
7
|
+
const response = await fetch(NODE_VERSIONS_URL);
|
|
8
|
+
const json = await response.json();
|
|
9
|
+
|
|
10
|
+
return json[0].version.replace('v', '');
|
|
11
11
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k03mad/actual-versions",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Get actual versions of some tools",
|
|
5
5
|
"maintainers": [
|
|
6
6
|
"Kirill Molchanov <k03.mad@gmail.com"
|
|
@@ -19,14 +19,12 @@
|
|
|
19
19
|
"node": ">=22"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@k03mad/request": "7.9.0",
|
|
23
|
-
"@k03mad/simple-log": "5.3.0",
|
|
24
22
|
"chalk": "5.4.1",
|
|
25
23
|
"table": "6.9.0"
|
|
26
24
|
},
|
|
27
25
|
"devDependencies": {
|
|
28
|
-
"@k03mad/eslint-config": "28.
|
|
29
|
-
"eslint": "9.
|
|
26
|
+
"@k03mad/eslint-config": "28.9.0",
|
|
27
|
+
"eslint": "9.24.0",
|
|
30
28
|
"husky": "9.1.7",
|
|
31
29
|
"npm-run-all": "4.1.5",
|
|
32
30
|
"strip-ansi": "7.1.0"
|