@k03mad/actual-versions 2.5.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.
@@ -10,7 +10,7 @@ on:
10
10
 
11
11
  jobs:
12
12
  lint:
13
- runs-on: ubuntu-22.04
13
+ runs-on: ubuntu-latest
14
14
  steps:
15
15
  - uses: actions/checkout@v4
16
16
  - uses: actions/setup-node@v4
@@ -8,7 +8,7 @@ on:
8
8
  jobs:
9
9
  publish:
10
10
  environment: npm
11
- runs-on: ubuntu-22.04
11
+ runs-on: ubuntu-latest
12
12
  steps:
13
13
  - uses: actions/checkout@v4
14
14
  with:
@@ -10,7 +10,7 @@ on:
10
10
 
11
11
  jobs:
12
12
  test:
13
- runs-on: ubuntu-22.04
13
+ runs-on: ubuntu-latest
14
14
  steps:
15
15
  - uses: actions/checkout@v4
16
16
  - uses: actions/setup-node@v4
@@ -0,0 +1,5 @@
1
+ {
2
+ "cSpell.words": [
3
+ "acver"
4
+ ]
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
- logError([key, err]);
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 {body} = await requestCache(ARIA_VERSIONS_URL);
11
- return body.match(ARIA_VERSION_RE)?.[1];
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
  };
@@ -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 {body} = await requestCache(CHROME_VERSIONS_URL);
10
- return body?.channels?.Stable?.version;
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 {body} = await requestCache(CURL_VERSIONS_URL);
11
- return body.match(CURL_VERSION_RE)?.[1];
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
  };
@@ -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 {body} = await requestCache(NODE_VERSIONS_URL);
10
- return body[0].version.replace('v', '');
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": "2.5.0",
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.7.0",
23
- "@k03mad/simple-log": "5.2.1",
24
22
  "chalk": "5.4.1",
25
23
  "table": "6.9.0"
26
24
  },
27
25
  "devDependencies": {
28
- "@k03mad/eslint-config": "28.4.0",
29
- "eslint": "9.18.0",
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"