@jayree/sfdx-plugin-manifest 3.0.1 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +18 -0
- package/README.md +4 -4
- package/lib/hooks/changelog.d.ts +1 -1
- package/lib/hooks/changelog.js +7 -78
- package/lib/hooks/changelog.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +14 -19
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
+
## [3.0.3](https://github.com/jayree/sfdx-plugin-manifest/compare/v3.0.2...v3.0.3) (2023-03-17)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* **deps:** bump @oclif/core from 2.6.2 to 2.6.4 ([#618](https://github.com/jayree/sfdx-plugin-manifest/issues/618)) ([be7b542](https://github.com/jayree/sfdx-plugin-manifest/commit/be7b5421fe5d7e0d06f043481de17ecfaee9c70f))
|
7
|
+
* **deps:** bump @salesforce/source-deploy-retrieve from 7.11.3 to 7.12.0 ([#616](https://github.com/jayree/sfdx-plugin-manifest/issues/616)) ([04578d9](https://github.com/jayree/sfdx-plugin-manifest/commit/04578d96c57abac31ea91f277bf7873bc6214a11))
|
8
|
+
* **deps:** bump graceful-fs from 4.2.10 to 4.2.11 ([#620](https://github.com/jayree/sfdx-plugin-manifest/issues/620)) ([0b33da8](https://github.com/jayree/sfdx-plugin-manifest/commit/0b33da83fa59b7041e228b5e25d59cec0980985e))
|
9
|
+
* **deps:** bump isomorphic-git from 1.21.0 to 1.22.0 ([#624](https://github.com/jayree/sfdx-plugin-manifest/issues/624)) ([c57739c](https://github.com/jayree/sfdx-plugin-manifest/commit/c57739c80a926a719c61ef9d65c7f477b2923282))
|
10
|
+
* **deps:** bump listr2 from 5.0.7 to 5.0.8 ([#623](https://github.com/jayree/sfdx-plugin-manifest/issues/623)) ([4ae28a2](https://github.com/jayree/sfdx-plugin-manifest/commit/4ae28a29a214bd0add6fc2d55319ee380d8a8c44))
|
11
|
+
|
12
|
+
## [3.0.2](https://github.com/jayree/sfdx-plugin-manifest/compare/v3.0.1...v3.0.2) (2023-03-15)
|
13
|
+
|
14
|
+
|
15
|
+
### Bug Fixes
|
16
|
+
|
17
|
+
* use new changelog ([48c4f91](https://github.com/jayree/sfdx-plugin-manifest/commit/48c4f91e096fc11407ca08180c9241caedde4afb))
|
18
|
+
|
1
19
|
## [3.0.1](https://github.com/jayree/sfdx-plugin-manifest/compare/v3.0.0...v3.0.1) (2023-03-10)
|
2
20
|
|
3
21
|
|
package/README.md
CHANGED
@@ -48,7 +48,7 @@ EXAMPLES
|
|
48
48
|
$ sfdx jayree:manifest:cleanup --manifest=package.xml --file=packageignore.xml
|
49
49
|
```
|
50
50
|
|
51
|
-
_See code: [src/commands/jayree/manifest/cleanup.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.
|
51
|
+
_See code: [src/commands/jayree/manifest/cleanup.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.3/src/commands/jayree/manifest/cleanup.ts)_
|
52
52
|
|
53
53
|
### `sfdx jayree:manifest:generate`
|
54
54
|
|
@@ -84,7 +84,7 @@ EXAMPLES
|
|
84
84
|
<Package xmlns='http://soap.sforce.com/2006/04/metadata'>...</Package>
|
85
85
|
```
|
86
86
|
|
87
|
-
_See code: [src/commands/jayree/manifest/generate.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.
|
87
|
+
_See code: [src/commands/jayree/manifest/generate.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.3/src/commands/jayree/manifest/generate.ts)_
|
88
88
|
|
89
89
|
### `sfdx jayree:manifest:git:diff`
|
90
90
|
|
@@ -166,7 +166,7 @@ FLAG DESCRIPTIONS
|
|
166
166
|
The location can be an absolute path or relative to the current working directory.
|
167
167
|
```
|
168
168
|
|
169
|
-
_See code: [src/commands/jayree/manifest/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.
|
169
|
+
_See code: [src/commands/jayree/manifest/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.3/src/commands/jayree/manifest/git/diff.ts)_
|
170
170
|
|
171
171
|
### `sfdx jayree:manifest:legacy:git:diff`
|
172
172
|
|
@@ -244,5 +244,5 @@ FLAG DESCRIPTIONS
|
|
244
244
|
The location can be an absolute path or relative to the current working directory.
|
245
245
|
```
|
246
246
|
|
247
|
-
_See code: [src/commands/jayree/manifest/legacy/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.
|
247
|
+
_See code: [src/commands/jayree/manifest/legacy/git/diff.ts](https://github.com/jayree/sfdx-plugin-manifest/blob/v3.0.3/src/commands/jayree/manifest/legacy/git/diff.ts)_
|
248
248
|
<!-- commandsstop -->
|
package/lib/hooks/changelog.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
import { Hook } from '@oclif/core';
|
2
|
-
export declare const changelog: Hook<'
|
2
|
+
export declare const changelog: Hook<'update'>;
|
package/lib/hooks/changelog.js
CHANGED
@@ -7,91 +7,20 @@
|
|
7
7
|
/* istanbul ignore file */
|
8
8
|
import { join, dirname } from 'node:path';
|
9
9
|
import { fileURLToPath } from 'node:url';
|
10
|
-
import
|
10
|
+
import printChangeLog from '@jayree/changelog';
|
11
11
|
import Debug from 'debug';
|
12
|
-
import TerminalRenderer from 'marked-terminal';
|
13
|
-
import { marked } from 'marked';
|
14
|
-
import semver from 'semver';
|
15
12
|
// eslint-disable-next-line no-underscore-dangle
|
16
13
|
const __filename = fileURLToPath(import.meta.url);
|
17
14
|
// eslint-disable-next-line no-underscore-dangle
|
18
15
|
const __dirname = dirname(__filename);
|
19
|
-
// original from https://github.com/salesforcecli/plugin-info/blob/main/src/shared/parseReleaseNotes.ts
|
20
|
-
const parseReleaseNotes = (notes, version, currentVersion) => {
|
21
|
-
let found = false;
|
22
|
-
let versions = [];
|
23
|
-
const parsed = marked.lexer(notes);
|
24
|
-
let tokens = [];
|
25
|
-
const findVersion = (desiredVersion, localVersion) => {
|
26
|
-
versions = [];
|
27
|
-
tokens = parsed.filter((token) => {
|
28
|
-
// TODO: Could make header depth (2) a setting in oclif.info.releasenotes
|
29
|
-
if (token.type === 'heading' && token.depth <= 2) {
|
30
|
-
const coercedVersion = semver.coerce(token.text)?.version;
|
31
|
-
if (coercedVersion) {
|
32
|
-
// We will use this to find the closest patch if passed version is not found
|
33
|
-
versions.push(coercedVersion);
|
34
|
-
if (coercedVersion <= desiredVersion && coercedVersion > localVersion) {
|
35
|
-
found = true;
|
36
|
-
return token;
|
37
|
-
}
|
38
|
-
}
|
39
|
-
found = false;
|
40
|
-
}
|
41
|
-
else if (found === true) {
|
42
|
-
return token;
|
43
|
-
}
|
44
|
-
});
|
45
|
-
};
|
46
|
-
findVersion(version, currentVersion);
|
47
|
-
if (!versions.includes(version)) {
|
48
|
-
const semverRange = `${semver.major(version)}.${semver.minor(version)}.x`;
|
49
|
-
const closestVersion = semver.maxSatisfying(versions, semverRange);
|
50
|
-
const warning = marked.lexer(`# ATTENTION: Version ${version} was not found. Showing notes for closest patch version ${closestVersion}.`)[0];
|
51
|
-
tokens.unshift(warning);
|
52
|
-
}
|
53
|
-
return tokens;
|
54
|
-
};
|
55
16
|
// eslint-disable-next-line @typescript-eslint/require-await
|
56
17
|
export const changelog = async function () {
|
57
|
-
const debug = Debug(
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
const cacheDir = join(this.config.cacheDir, name);
|
64
|
-
const versionFile = join(cacheDir, 'version');
|
65
|
-
fs.ensureFileSync(versionFile);
|
66
|
-
let latestVersion;
|
67
|
-
try {
|
68
|
-
latestVersion = fs.readJSONSync(versionFile);
|
69
|
-
}
|
70
|
-
catch (error) {
|
71
|
-
latestVersion = { version: '0.0.0' };
|
72
|
-
}
|
73
|
-
debug({ latestVersion: latestVersion.version, version });
|
74
|
-
if (latestVersion.version !== version) {
|
75
|
-
const tokens = parseReleaseNotes(changelogFile, version, latestVersion.version);
|
76
|
-
if (!tokens.length) {
|
77
|
-
debug(`${name} - didn't find version '${version}'.`);
|
78
|
-
}
|
79
|
-
else {
|
80
|
-
marked.setOptions({
|
81
|
-
renderer: new TerminalRenderer({ emoji: false }),
|
82
|
-
});
|
83
|
-
tokens.unshift(marked.lexer(`# Changelog for '${name}':`)[0]);
|
84
|
-
this.log(marked.parser(tokens));
|
85
|
-
fs.writeJsonSync(versionFile, { version });
|
86
|
-
}
|
87
|
-
}
|
88
|
-
else {
|
89
|
-
debug(`${name} - no update`);
|
90
|
-
}
|
91
|
-
}
|
92
|
-
catch (error) {
|
93
|
-
debug(error);
|
94
|
-
}
|
18
|
+
const debug = Debug([this.config.bin, '@jayree/sfdx-plugin-manifest', 'hooks', 'update'].join(':'));
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
20
|
+
process.once('beforeExit', async () => {
|
21
|
+
const changes = await printChangeLog(this.config.cacheDir, join(__dirname, '..', '..'), debug);
|
22
|
+
if (changes)
|
23
|
+
this.log(changes);
|
95
24
|
});
|
96
25
|
};
|
97
26
|
//# sourceMappingURL=changelog.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../src/hooks/changelog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,0BAA0B;AAC1B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
1
|
+
{"version":3,"file":"changelog.js","sourceRoot":"","sources":["../../src/hooks/changelog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,0BAA0B;AAC1B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,gDAAgD;AAChD,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,gDAAgD;AAChD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,4DAA4D;AAC5D,MAAM,CAAC,MAAM,SAAS,GAAmB,KAAK;IAC5C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,8BAA8B,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAEpG,kEAAkE;IAClE,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE;QACpC,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;QAC/F,IAAI,OAAO;YAAE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
@@ -1,31 +1,29 @@
|
|
1
1
|
{
|
2
2
|
"name": "@jayree/sfdx-plugin-manifest",
|
3
3
|
"description": "A Salesforce CLI plugin containing commands for creating manifest files from Salesforce orgs or git commits of sfdx projects.",
|
4
|
-
"version": "3.0.
|
4
|
+
"version": "3.0.3",
|
5
5
|
"author": "jayree",
|
6
6
|
"type": "module",
|
7
7
|
"bugs": "https://github.com/jayree/sfdx-plugin-manifest/issues",
|
8
8
|
"dependencies": {
|
9
|
-
"@
|
9
|
+
"@jayree/changelog": "^1.1.0",
|
10
|
+
"@oclif/core": "^2.6.4",
|
10
11
|
"@salesforce/kit": "^1.9.2",
|
11
12
|
"@salesforce/sf-plugins-core": "^2.2.4",
|
12
|
-
"@salesforce/source-deploy-retrieve": "^7.
|
13
|
+
"@salesforce/source-deploy-retrieve": "^7.12.0",
|
13
14
|
"@salesforce/ts-types": "^1.7.3",
|
14
15
|
"debug": "^4.3.4",
|
15
16
|
"fast-deep-equal": "^3.1.3",
|
16
17
|
"fast-xml-parser": "^4.1.3",
|
17
18
|
"fs-extra": "^11.1.0",
|
18
|
-
"graceful-fs": "^4.2.
|
19
|
-
"isomorphic-git": "^1.
|
20
|
-
"listr2": "^5.0.
|
21
|
-
"marked": "^4.2.12",
|
22
|
-
"marked-terminal": "^5.1.1",
|
23
|
-
"semver": "^7.3.8",
|
19
|
+
"graceful-fs": "^4.2.11",
|
20
|
+
"isomorphic-git": "^1.22.0",
|
21
|
+
"listr2": "^5.0.8",
|
24
22
|
"tslib": "^2.5.0"
|
25
23
|
},
|
26
24
|
"devDependencies": {
|
27
25
|
"@oclif/plugin-command-snapshot": "^3.3.8",
|
28
|
-
"@oclif/plugin-help": "^5.2.
|
26
|
+
"@oclif/plugin-help": "^5.2.8",
|
29
27
|
"@salesforce/dev-config": "^3.1.0",
|
30
28
|
"@salesforce/dev-scripts": "^4.1.2",
|
31
29
|
"@salesforce/prettier-config": "^0.0.2",
|
@@ -33,14 +31,11 @@
|
|
33
31
|
"@types/debug": "^4.1.7",
|
34
32
|
"@types/fs-extra": "^11.0.1",
|
35
33
|
"@types/inquirer": "^9.0.3",
|
36
|
-
"@
|
37
|
-
"@
|
38
|
-
"@types/semver": "^7.3.13",
|
39
|
-
"@typescript-eslint/eslint-plugin": "^5.54.1",
|
40
|
-
"@typescript-eslint/parser": "^5.54.1",
|
34
|
+
"@typescript-eslint/eslint-plugin": "^5.55.0",
|
35
|
+
"@typescript-eslint/parser": "^5.55.0",
|
41
36
|
"c8": "^7.13.0",
|
42
37
|
"chai": "^4.3.7",
|
43
|
-
"eslint": "^8.
|
38
|
+
"eslint": "^8.36.0",
|
44
39
|
"eslint-config-oclif": "^4.0",
|
45
40
|
"eslint-config-prettier": "^8.7.0",
|
46
41
|
"eslint-config-salesforce": "^1.1.1",
|
@@ -48,9 +43,9 @@
|
|
48
43
|
"eslint-config-salesforce-typescript": "^1.1.1",
|
49
44
|
"eslint-plugin-header": "^3.1.1",
|
50
45
|
"eslint-plugin-import": "2.27.5",
|
51
|
-
"eslint-plugin-jsdoc": "^40.0.
|
46
|
+
"eslint-plugin-jsdoc": "^40.0.3",
|
52
47
|
"eslint-plugin-prettier": "^4.2.1",
|
53
|
-
"eslint-plugin-sf-plugin": "^1.
|
48
|
+
"eslint-plugin-sf-plugin": "^1.14.0",
|
54
49
|
"husky": "^8.0.3",
|
55
50
|
"is-ci": "^3.0.1",
|
56
51
|
"mocha": "^10.2.0",
|
@@ -60,7 +55,7 @@
|
|
60
55
|
"prettier": "^2.8.4",
|
61
56
|
"pretty-quick": "^3.1.3",
|
62
57
|
"shx": "^0.3.4",
|
63
|
-
"sinon": "15.0.
|
58
|
+
"sinon": "15.0.2",
|
64
59
|
"ts-node": "^10.9.1",
|
65
60
|
"typescript": "^4.9.5",
|
66
61
|
"wireit": "^0.9.5"
|