oclif-plugin-update-notifier 1.5.1 → 1.5.3
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/CHANGELOG.md +14 -0
- package/README.md +2 -2
- package/lib/lib/fetchInfo.d.ts +2 -2
- package/lib/lib/fetchInfo.js +9 -51
- package/lib/lib/fetchInfo.js.map +1 -1
- package/lib/lib/multiUpdateNotifier.d.ts +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +31 -32
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.5.3](https://github.com/jayree/oclif-plugin-update-notifier/compare/v1.5.2...v1.5.3) (2022-12-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update dependencies ([39786fe](https://github.com/jayree/oclif-plugin-update-notifier/commit/39786fe91d8064ea878d099e16dc9d3a1715a88e))
|
|
7
|
+
|
|
8
|
+
## [1.5.2](https://github.com/jayree/oclif-plugin-update-notifier/compare/v1.5.1...v1.5.2) (2022-12-16)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* prefer releases/tag url ([ecf8dc7](https://github.com/jayree/oclif-plugin-update-notifier/commit/ecf8dc72c070ab7308c38495ce4475fc6f2a8d35))
|
|
14
|
+
|
|
1
15
|
## [1.5.1](https://github.com/jayree/oclif-plugin-update-notifier/compare/v1.5.0...v1.5.1) (2022-10-06)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ $ oclif-example plugins:install oclif-plugin-update-notifier
|
|
|
22
22
|
$ oclif-example plugins:[COMMAND]
|
|
23
23
|
running command...
|
|
24
24
|
$ oclif-example plugins
|
|
25
|
-
oclif-plugin-update-notifier 1.5.
|
|
25
|
+
oclif-plugin-update-notifier 1.5.3
|
|
26
26
|
$ oclif-example help plugins:[COMMAND]
|
|
27
27
|
USAGE
|
|
28
28
|
$ oclif-example plugins:COMMAND
|
|
@@ -60,5 +60,5 @@ DESCRIPTION
|
|
|
60
60
|
check installed plugins for updates
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
_See code: [src/commands/plugins/update/check.ts](https://github.com/jayree/oclif-plugin-update-notifier/blob/v1.5.
|
|
63
|
+
_See code: [src/commands/plugins/update/check.ts](https://github.com/jayree/oclif-plugin-update-notifier/blob/v1.5.3/src/commands/plugins/update/check.ts)_
|
|
64
64
|
<!-- commandsstop -->
|
package/lib/lib/fetchInfo.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import { SpawnOptions } from 'node:child_process';
|
|
3
3
|
import { Plugin } from '@oclif/core/lib/interfaces/index.js';
|
|
4
|
-
export
|
|
4
|
+
export type Options = {
|
|
5
5
|
spawnOptions: SpawnOptions;
|
|
6
6
|
defer: boolean;
|
|
7
7
|
pkg: Plugin;
|
|
8
8
|
baseFolder: string;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export type PkgUpdate = {
|
|
11
11
|
[distTag: string]: {
|
|
12
12
|
latest: string;
|
|
13
13
|
current: string;
|
package/lib/lib/fetchInfo.js
CHANGED
|
@@ -11,44 +11,7 @@ import { CliUx } from '@oclif/core';
|
|
|
11
11
|
import packageJson from 'package-json';
|
|
12
12
|
import fs from 'fs-extra';
|
|
13
13
|
const combineURLs = (baseURL, relativeURL) => baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '');
|
|
14
|
-
async function
|
|
15
|
-
if (changeLogBaseUrl) {
|
|
16
|
-
try {
|
|
17
|
-
const changeLogUrl = combineURLs(changeLogBaseUrl, `/blob/${distTag}/CHANGELOG.md`);
|
|
18
|
-
await got.head(changeLogUrl);
|
|
19
|
-
return changeLogUrl;
|
|
20
|
-
}
|
|
21
|
-
catch {
|
|
22
|
-
try {
|
|
23
|
-
const changeLogUrl = combineURLs(changeLogBaseUrl, '/blob/main/CHANGELOG.md');
|
|
24
|
-
await got.head(changeLogUrl);
|
|
25
|
-
return changeLogUrl;
|
|
26
|
-
}
|
|
27
|
-
catch {
|
|
28
|
-
try {
|
|
29
|
-
const changeLogUrl = combineURLs(changeLogBaseUrl, '/blob/master/CHANGELOG.md');
|
|
30
|
-
await got.head(changeLogUrl);
|
|
31
|
-
await got.head(changeLogBaseUrl);
|
|
32
|
-
return changeLogUrl;
|
|
33
|
-
}
|
|
34
|
-
catch {
|
|
35
|
-
try {
|
|
36
|
-
const changeLogUrl = combineURLs(changeLogBaseUrl, '/CHANGELOG.md');
|
|
37
|
-
await got.head(changeLogUrl);
|
|
38
|
-
return changeLogUrl;
|
|
39
|
-
}
|
|
40
|
-
catch {
|
|
41
|
-
throw new Error(`no valid changeLogUrl ${changeLogBaseUrl}`);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
throw new Error(`no valid changeLogBaseUrl ${changeLogBaseUrl}`);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
async function getChangelogURL(plugin, latest, distTag) {
|
|
14
|
+
async function getChangelogURL(plugin, latest) {
|
|
52
15
|
const pJson = plugin.pjson;
|
|
53
16
|
let changeLogUrl;
|
|
54
17
|
if (pJson.oclif?.info?.releasenotes?.releaseNotesPath && pJson.oclif?.info?.releasenotes?.releaseNotesFilename) {
|
|
@@ -71,23 +34,18 @@ async function getChangelogURL(plugin, latest, distTag) {
|
|
|
71
34
|
}
|
|
72
35
|
}
|
|
73
36
|
try {
|
|
74
|
-
|
|
37
|
+
const releaseUrl = combineURLs(changeLogBaseUrl, `releases/tag/v${latest}`);
|
|
38
|
+
await got.head(releaseUrl);
|
|
39
|
+
changeLogUrl = releaseUrl;
|
|
75
40
|
}
|
|
76
|
-
catch (
|
|
41
|
+
catch (err) {
|
|
77
42
|
try {
|
|
78
|
-
const releaseUrl = combineURLs(changeLogBaseUrl, `releases/tag
|
|
43
|
+
const releaseUrl = combineURLs(changeLogBaseUrl, `releases/tag/${latest}`);
|
|
79
44
|
await got.head(releaseUrl);
|
|
80
45
|
changeLogUrl = releaseUrl;
|
|
81
46
|
}
|
|
82
|
-
catch (
|
|
83
|
-
|
|
84
|
-
const releaseUrl = combineURLs(changeLogBaseUrl, `releases/tag/${latest}`);
|
|
85
|
-
await got.head(releaseUrl);
|
|
86
|
-
changeLogUrl = releaseUrl;
|
|
87
|
-
}
|
|
88
|
-
catch (e) {
|
|
89
|
-
changeLogUrl = '';
|
|
90
|
-
}
|
|
47
|
+
catch (e) {
|
|
48
|
+
changeLogUrl = '';
|
|
91
49
|
}
|
|
92
50
|
}
|
|
93
51
|
}
|
|
@@ -103,7 +61,7 @@ export async function fetchInfo(options) {
|
|
|
103
61
|
const type = semverDiff(options.pkg.version, latest);
|
|
104
62
|
let changeLogUrl;
|
|
105
63
|
if (type && type !== 'latest') {
|
|
106
|
-
changeLogUrl = await getChangelogURL(options.pkg, latest
|
|
64
|
+
changeLogUrl = await getChangelogURL(options.pkg, latest);
|
|
107
65
|
update[distTag] = { latest, current: options.pkg.version, type, name: options.pkg.name, changeLogUrl };
|
|
108
66
|
}
|
|
109
67
|
}
|
package/lib/lib/fetchInfo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchInfo.js","sourceRoot":"","sources":["../../src/lib/fetchInfo.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,WAAW,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,MAAM,UAAU,CAAC;AAa1B,MAAM,WAAW,GAAG,CAAC,OAAe,EAAE,WAAmB,E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GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC;YAC7C,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAW,CAAC;YAC/D,IAAI,YAAoB,CAAC;YAEzB,IAAI,IAAI,IAAI,IAAI,KAAK,QAAQ,EAAE;gBAC7B,YAAY,GAAG,MAAM,eAAe,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;gBAC1D,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,YAAY,EAAE,CAAC;aACxG;SACF;QACD,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE;YAC9B,MAAM,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC;YAC/E,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;SAC3F;KACF;IAAC,OAAO,KAAK,EAAE;QACd,KAAK,CAAC,EAAE,CAAC,IAAI,CAAE,KAAe,CAAC,OAAO,CAAC,CAAC;KACzC;AACH,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import { SpawnOptions } from 'node:child_process';
|
|
3
3
|
import { Config } from '@oclif/core/lib/interfaces/index.js';
|
|
4
|
-
export
|
|
4
|
+
export type Update = {
|
|
5
5
|
name: string;
|
|
6
6
|
current: string;
|
|
7
7
|
latest: string;
|
|
@@ -10,7 +10,7 @@ export declare type Update = {
|
|
|
10
10
|
pluginType: string;
|
|
11
11
|
distTag: string;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type Options = {
|
|
14
14
|
spawnOptions: SpawnOptions;
|
|
15
15
|
defer: boolean;
|
|
16
16
|
updateCheckInterval: number;
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.5.
|
|
1
|
+
{"version":"1.5.3","commands":{"plugins:update:check":{"id":"plugins:update:check","description":"check installed plugins for updates","strict":true,"pluginName":"oclif-plugin-update-notifier","pluginAlias":"oclif-plugin-update-notifier","pluginType":"core","aliases":[],"flags":{},"args":[]}}}
|
package/package.json
CHANGED
|
@@ -1,68 +1,67 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oclif-plugin-update-notifier",
|
|
3
3
|
"description": "update-notifier for oclif plugins",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.3",
|
|
5
5
|
"author": "jayree",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bugs": "https://github.com/jayree/oclif-plugin-update-notifier/issues",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@oclif/core": "^1.
|
|
10
|
-
"@salesforce/kit": "^1.
|
|
9
|
+
"@oclif/core": "^1.21.0",
|
|
10
|
+
"@salesforce/kit": "^1.8.0",
|
|
11
11
|
"boxen": "^7.0.0",
|
|
12
|
-
"chalk": "^5.0
|
|
12
|
+
"chalk": "^5.2.0",
|
|
13
13
|
"debug": "^4.3.4",
|
|
14
|
-
"fs-extra": "^
|
|
15
|
-
"got": "^12.5.
|
|
16
|
-
"marked": "^4.
|
|
14
|
+
"fs-extra": "^11.1.0",
|
|
15
|
+
"got": "^12.5.3",
|
|
16
|
+
"marked": "^4.2.4",
|
|
17
17
|
"marked-terminal": "^5.1.1",
|
|
18
18
|
"package-json": "^8.1.0",
|
|
19
|
-
"semver": "^7.3.
|
|
19
|
+
"semver": "^7.3.8",
|
|
20
20
|
"semver-diff": "^4.0.0",
|
|
21
|
-
"tslib": "^2.4.
|
|
21
|
+
"tslib": "^2.4.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@commitlint/cli": "^17.
|
|
25
|
-
"@commitlint/config-conventional": "^17.
|
|
26
|
-
"@oclif/plugin-command-snapshot": "^3.
|
|
27
|
-
"@oclif/plugin-help": "^5.1.
|
|
28
|
-
"@oclif/test": "^2.
|
|
24
|
+
"@commitlint/cli": "^17.3.0",
|
|
25
|
+
"@commitlint/config-conventional": "^17.3.0",
|
|
26
|
+
"@oclif/plugin-command-snapshot": "^3.2.12",
|
|
27
|
+
"@oclif/plugin-help": "^5.1.20",
|
|
28
|
+
"@oclif/test": "^2.2.15",
|
|
29
29
|
"@salesforce/dev-config": "^3.1.0",
|
|
30
30
|
"@salesforce/dev-scripts": "^3.1.0",
|
|
31
31
|
"@salesforce/prettier-config": "^0.0.2",
|
|
32
32
|
"@types/boxen": "^3.0.1",
|
|
33
|
-
"@types/chai": "^4.3.
|
|
33
|
+
"@types/chai": "^4.3.4",
|
|
34
34
|
"@types/debug": "^4.1.7",
|
|
35
35
|
"@types/fs-extra": "^9.0.13",
|
|
36
|
-
"@types/marked": "^4.0.
|
|
36
|
+
"@types/marked": "^4.0.8",
|
|
37
37
|
"@types/marked-terminal": "^3.1.3",
|
|
38
|
-
"@types/mocha": "^
|
|
39
|
-
"@types/node": "^18.
|
|
40
|
-
"@types/semver": "^7.3.
|
|
38
|
+
"@types/mocha": "^10.0.1",
|
|
39
|
+
"@types/node": "^18.11.15",
|
|
40
|
+
"@types/semver": "^7.3.13",
|
|
41
41
|
"@types/sinon": "^10.0.13",
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
43
|
-
"@typescript-eslint/parser": "^5.
|
|
44
|
-
"chai": "^4.3.
|
|
45
|
-
"eslint": "^8.
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^5.46.1",
|
|
43
|
+
"@typescript-eslint/parser": "^5.46.1",
|
|
44
|
+
"chai": "^4.3.7",
|
|
45
|
+
"eslint": "^8.29.0",
|
|
46
46
|
"eslint-config-prettier": "^8.5.0",
|
|
47
47
|
"eslint-config-salesforce": "^1.1.0",
|
|
48
48
|
"eslint-config-salesforce-typescript": "^1.1.1",
|
|
49
49
|
"eslint-plugin-header": "^3.1.1",
|
|
50
50
|
"eslint-plugin-import": "^2.26.0",
|
|
51
|
-
"eslint-plugin-jsdoc": "^39.
|
|
51
|
+
"eslint-plugin-jsdoc": "^39.6.4",
|
|
52
52
|
"eslint-plugin-prettier": "^4.2.1",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"mocha": "^10.0.0",
|
|
53
|
+
"husky": "^8.0.2",
|
|
54
|
+
"mocha": "^10.2.0",
|
|
56
55
|
"nyc": "^15.1.0",
|
|
57
|
-
"oclif": "^3.
|
|
58
|
-
"patch-package": "^6.
|
|
56
|
+
"oclif": "^3.4.2",
|
|
57
|
+
"patch-package": "^6.5.0",
|
|
59
58
|
"pinst": "^3.0.0",
|
|
60
|
-
"prettier": "^2.
|
|
59
|
+
"prettier": "^2.8.1",
|
|
61
60
|
"pretty-quick": "^3.1.3",
|
|
62
|
-
"sinon": "^
|
|
61
|
+
"sinon": "^15.0.1",
|
|
63
62
|
"source-map-support": "^0.5.21",
|
|
64
63
|
"ts-node": "^10.9.1",
|
|
65
|
-
"typescript": "^4.
|
|
64
|
+
"typescript": "^4.9.4"
|
|
66
65
|
},
|
|
67
66
|
"engines": {
|
|
68
67
|
"node": ">=14.0.0"
|