soja-cli 1.5.0 → 1.5.1

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/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  ▄▄▄▄▄▄█▀ ▀█▄▄▄▄█▀ ▀█▄▄▄▄█▀ ██ ██ ▄▄▄
7
7
  ```
8
8
 
9
- **Software Operations & Job Assistant** · v1.5.0 · by Enmauel.biz
9
+ **Software Operations & Job Assistant** · v1.5.1 · by Enmauel.biz
10
10
 
11
11
  > No dashboards. No browser. No bullshit. Just work.
12
12
 
@@ -33,12 +33,15 @@ export class GhReleases {
33
33
  /** Public release metadata and tarballs from npm; no GitHub account is needed to update. */
34
34
  export class NpmReleases {
35
35
  packageName;
36
- constructor(packageName = 'soja-cli') {
36
+ fetchImpl;
37
+ constructor(packageName = 'soja-cli', fetchImpl = fetch) {
37
38
  this.packageName = packageName;
39
+ this.fetchImpl = fetchImpl;
38
40
  }
39
41
  async latest() {
40
- const response = await fetch(`https://registry.npmjs.org/${encodeURIComponent(this.packageName)}/latest`, {
41
- headers: { accept: 'application/vnd.npm.install-v1+json' },
42
+ // The `/latest` document only speaks plain JSON: the abbreviated install format gets a 406.
43
+ const response = await this.fetchImpl(`https://registry.npmjs.org/${encodeURIComponent(this.packageName)}/latest`, {
44
+ headers: { accept: 'application/json' },
42
45
  signal: AbortSignal.timeout(10_000),
43
46
  });
44
47
  if (!response.ok)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "soja-cli",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "Software Operations & Job Assistant",
5
5
  "author": "Enmauel.biz",
6
6
  "license": "SEE LICENSE IN LICENSE",