@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 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.1/src/commands/jayree/manifest/cleanup.ts)_
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.1/src/commands/jayree/manifest/generate.ts)_
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.1/src/commands/jayree/manifest/git/diff.ts)_
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.1/src/commands/jayree/manifest/legacy/git/diff.ts)_
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 -->
@@ -1,2 +1,2 @@
1
1
  import { Hook } from '@oclif/core';
2
- export declare const changelog: Hook<'changelog'>;
2
+ export declare const changelog: Hook<'update'>;
@@ -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 fs from 'fs-extra';
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(`${this.config.bin}:jayree-sfdx-plugin-manifest:hooks:changelog`);
58
- process.once('exit', () => {
59
- try {
60
- const pluginRootPath = join(__dirname, '..', '..');
61
- const { name, version } = fs.readJsonSync(join(pluginRootPath, 'package.json'));
62
- const changelogFile = fs.readFileSync(join(pluginRootPath, 'CHANGELOG.md'), 'utf8');
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 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AAC,CAAC;AACL,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.0.1",
2
+ "version": "3.0.3",
3
3
  "commands": {
4
4
  "jayree:manifest:cleanup": {
5
5
  "id": "jayree:manifest:cleanup",
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.1",
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
- "@oclif/core": "^2.6.2",
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.11.3",
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.10",
19
- "isomorphic-git": "^1.21.0",
20
- "listr2": "^5.0.7",
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.7",
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
- "@types/marked": "^4.0.8",
37
- "@types/marked-terminal": "^3.1.3",
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.35.0",
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.1",
46
+ "eslint-plugin-jsdoc": "^40.0.3",
52
47
  "eslint-plugin-prettier": "^4.2.1",
53
- "eslint-plugin-sf-plugin": "^1.11.0",
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.1",
58
+ "sinon": "15.0.2",
64
59
  "ts-node": "^10.9.1",
65
60
  "typescript": "^4.9.5",
66
61
  "wireit": "^0.9.5"