@salesforce/plugin-info 1.1.1 → 1.2.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.
package/CHANGELOG.md CHANGED
@@ -2,28 +2,56 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ### [1.1.1](https://github.com/salesforcecli/plugin-info/compare/v1.1.0...v1.1.1) (2021-11-30)
5
+ ## [1.2.0](https://github.com/salesforcecli/plugin-info/compare/v1.1.4...v1.2.0) (2022-01-05)
6
+
7
+ ### Features
6
8
 
9
+ - find close version fallback ([f1b2edc](https://github.com/salesforcecli/plugin-info/commit/f1b2edcb26057b1eef10656a8c7fb255f1e4dd08))
7
10
 
8
11
  ### Bug Fixes
9
12
 
10
- * add more telemetry ([b8af2d7](https://github.com/salesforcecli/plugin-info/commit/b8af2d7e516cd1f5347d379d1c29d6389299fab8))
13
+ - type and typos ([75d46c6](https://github.com/salesforcecli/plugin-info/commit/75d46c66b1b22c74b1d8dfeb56da727c1e51ea51))
11
14
 
12
- ## [1.1.0](https://github.com/salesforcecli/plugin-info/compare/v1.0.0...v1.1.0) (2021-11-22)
15
+ ### [1.1.4](https://github.com/salesforcecli/plugin-info/compare/v1.1.3...v1.1.4) (2021-12-07)
13
16
 
17
+ ### Bug Fixes
14
18
 
15
- ### Features
19
+ - update help message to make the CLI Command Ref work ([268a7b5](https://github.com/salesforcecli/plugin-info/commit/268a7b551fd05d3358691e98cb04ad70df2cef95))
20
+
21
+ ### [1.1.3](https://github.com/salesforcecli/plugin-info/compare/v1.1.2...v1.1.3) (2021-12-07)
22
+
23
+ ### Bug Fixes
24
+
25
+ - disable emoji ([b4edbae](https://github.com/salesforcecli/plugin-info/commit/b4edbae03f308198c8fa6a90323a3c69c1e9efc5))
26
+ - emoji test ([10229c4](https://github.com/salesforcecli/plugin-info/commit/10229c40da67b6ea65577ddd53f685d0ce79c0ea))
27
+
28
+ ### [1.1.2](https://github.com/salesforcecli/plugin-info/compare/v1.1.1...v1.1.2) (2021-12-01)
16
29
 
17
- * initial setup and release notes fetch ([d258d91](https://github.com/salesforcecli/plugin-info/commit/d258d91cf3f781c0afbc4f8b3c776cd4fd0085ef))
18
- * parse and render release notes ([f5e3398](https://github.com/salesforcecli/plugin-info/commit/f5e3398f14e74aa1f83fa308c9601f1b770afcae))
19
- * parse release notes ([83f0a47](https://github.com/salesforcecli/plugin-info/commit/83f0a47d5e54e0e0cacace1f3bc12ad757aa6e38))
30
+ ### Bug Fixes
31
+
32
+ - always show notes when running directly ([a0cd11e](https://github.com/salesforcecli/plugin-info/commit/a0cd11ec3777eb91adcfcac180d85b442b34b52a))
33
+ - merge conflict ([e4f7103](https://github.com/salesforcecli/plugin-info/commit/e4f7103b04f23cc9f66fa02f18286166be819812))
34
+ - whitespace conflict ([605d782](https://github.com/salesforcecli/plugin-info/commit/605d782be93a060e0eda69441806fe0cb76193d5))
35
+
36
+ ### [1.1.1](https://github.com/salesforcecli/plugin-info/compare/v1.1.0...v1.1.1) (2021-11-30)
37
+
38
+ ### Bug Fixes
39
+
40
+ - add more telemetry ([b8af2d7](https://github.com/salesforcecli/plugin-info/commit/b8af2d7e516cd1f5347d379d1c29d6389299fab8))
41
+
42
+ ## [1.1.0](https://github.com/salesforcecli/plugin-info/compare/v1.0.0...v1.1.0) (2021-11-22)
43
+
44
+ ### Features
20
45
 
46
+ - initial setup and release notes fetch ([d258d91](https://github.com/salesforcecli/plugin-info/commit/d258d91cf3f781c0afbc4f8b3c776cd4fd0085ef))
47
+ - parse and render release notes ([f5e3398](https://github.com/salesforcecli/plugin-info/commit/f5e3398f14e74aa1f83fa308c9601f1b770afcae))
48
+ - parse release notes ([83f0a47](https://github.com/salesforcecli/plugin-info/commit/83f0a47d5e54e0e0cacace1f3bc12ad757aa6e38))
21
49
 
22
50
  ### Bug Fixes
23
51
 
24
- * no more partial version match. updates footer ([010c4f3](https://github.com/salesforcecli/plugin-info/commit/010c4f38e963e416f57032db9578a28b26ed2b08))
25
- * pin typescript ([c02bd4e](https://github.com/salesforcecli/plugin-info/commit/c02bd4e0beb4b686e5a3e6ced866e97d4d61ed88))
26
- * switch from axios to got, added tests ([ef74275](https://github.com/salesforcecli/plugin-info/commit/ef74275517f2305e705e9f21d62f9f916a17471a))
27
- * test for Windows ([16db159](https://github.com/salesforcecli/plugin-info/commit/16db159ca3fb64a51f0076881bea5df37e4edce9))
52
+ - no more partial version match. updates footer ([010c4f3](https://github.com/salesforcecli/plugin-info/commit/010c4f38e963e416f57032db9578a28b26ed2b08))
53
+ - pin typescript ([c02bd4e](https://github.com/salesforcecli/plugin-info/commit/c02bd4e0beb4b686e5a3e6ced866e97d4d61ed88))
54
+ - switch from axios to got, added tests ([ef74275](https://github.com/salesforcecli/plugin-info/commit/ef74275517f2305e705e9f21d62f9f916a17471a))
55
+ - test for Windows ([16db159](https://github.com/salesforcecli/plugin-info/commit/16db159ca3fb64a51f0076881bea5df37e4edce9))
28
56
 
29
57
  ## 1.0.0 (2021-10-12)
package/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2018, Salesforce.com, Inc.
1
+ Copyright (c) 2022, Salesforce.com, Inc.
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # plugin-info
2
2
 
3
3
  [![NPM](https://img.shields.io/npm/v/@salesforce/plugin-info.svg?label=@salesforce/plugin-info)](https://www.npmjs.com/package/@salesforce/plugin-info) [![CircleCI](https://circleci.com/gh/salesforcecli/plugin-info/tree/main.svg?style=shield)](https://circleci.com/gh/salesforcecli/plugin-info/tree/main) [![Downloads/week](https://img.shields.io/npm/dw/@salesforce/plugin-info.svg)](https://npmjs.org/package/@salesforce/plugin-info) [![License](https://img.shields.io/badge/License-BSD%203--Clause-brightgreen.svg)](https://raw.githubusercontent.com/salesforcecli/plugin-info/main/LICENSE.txt)
4
+
4
5
  ## Learn about the plugin-info
5
6
 
6
7
  Salesforce CLI plugins are based on the [oclif plugin framework](<(https://oclif.io/docs/introduction.html)>). Read the [plugin developer guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_plugins.meta/sfdx_cli_plugins/cli_plugins_architecture_sf_cli.htm) to learn about Salesforce CLI plugin development.
@@ -74,20 +75,21 @@ sfdx plugins
74
75
  ## Commands
75
76
 
76
77
  <!-- commands -->
77
- * [`sfdx info:releasenotes:display [-v <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-inforeleasenotesdisplay--v-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
78
+
79
+ - [`sfdx info:releasenotes:display [-v <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-inforeleasenotesdisplay--v-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
78
80
 
79
81
  ## `sfdx info:releasenotes:display [-v <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`
80
82
 
81
- display Salesforce CLI release notes on the command line
83
+ Display Salesforce CLI release notes on the command line.
82
84
 
83
85
  ```
84
86
  USAGE
85
- $ sfdx info:releasenotes:display [-v <string>] [--json] [--loglevel
87
+ $ sfdx info:releasenotes:display [-v <string>] [--json] [--loglevel
86
88
  trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
87
89
 
88
90
  OPTIONS
89
91
  -v, --version=version CLI version or tag for which to
90
- display release notes
92
+ display release notes.
91
93
 
92
94
  --json format output as json
93
95
 
@@ -99,14 +101,13 @@ ALIASES
99
101
 
100
102
  EXAMPLES
101
103
  Display release notes for the currently installed CLI version:
102
- sfdx info:releasenotes:display
103
-
104
+ sfdx info:releasenotes:display
104
105
  Display release notes for CLI version 7.120.0:
105
- sfdx info:releasenotes:display --version 7.120.0
106
-
106
+ sfdx info:releasenotes:display --version 7.120.0
107
107
  Display release notes for the CLI version that corresponds to a tag (stable, stable-rc, latest, latest-rc, rc):
108
- sfdx info:releasenotes:display --version latest
108
+ sfdx info:releasenotes:display --version latest
109
109
  ```
110
110
 
111
- _See code: [src/commands/info/releasenotes/display.ts](https://github.com/salesforcecli/plugin-info/blob/v1.1.0/src/commands/info/releasenotes/display.ts)_
111
+ _See code: [src/commands/info/releasenotes/display.ts](https://github.com/salesforcecli/plugin-info/blob/v1.1.4/src/commands/info/releasenotes/display.ts)_
112
+
112
113
  <!-- commandsstop -->
@@ -20,8 +20,8 @@ const getDistTagVersion_1 = require("../../../shared/getDistTagVersion");
20
20
  const parseReleaseNotes_1 = require("../../../shared/parseReleaseNotes");
21
21
  // Initialize Messages with the current plugin directory
22
22
  core_1.Messages.importMessagesDirectory(__dirname);
23
- const HIDE_NOTES = 'PLUGIN_INFO_HIDE_RELEASE_NOTES';
24
- const HIDE_FOOTER = 'PLUGIN_INFO_HIDE_FOOTER';
23
+ const HIDE_NOTES = 'SFDX_HIDE_RELEASE_NOTES';
24
+ const HIDE_FOOTER = 'SFDX_HIDE_RELEASE_NOTES_FOOTER';
25
25
  // Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
26
26
  // or any library that is using the messages framework can also be loaded this way.
27
27
  const messages = core_1.Messages.loadMessages('@salesforce/plugin-info', 'display');
@@ -29,7 +29,8 @@ class Display extends command_1.SfdxCommand {
29
29
  async run() {
30
30
  var _a;
31
31
  const env = new kit_1.Env();
32
- if (env.getBoolean(HIDE_NOTES)) {
32
+ const isHook = !!this.flags.hook;
33
+ if (env.getBoolean(HIDE_NOTES) && isHook) {
33
34
  // We don't ever want to exit the process for info:releasenotes:display (whatsnew)
34
35
  // In most cases we will log a message, but here we only trace log in case someone using stdout of the update command
35
36
  this.logger.trace(`release notes disabled via env var: ${HIDE_NOTES}`);
@@ -37,7 +38,6 @@ class Display extends command_1.SfdxCommand {
37
38
  await core_1.Lifecycle.getInstance().emitTelemetry({ eventName: 'NOTES_HIDDEN' });
38
39
  return;
39
40
  }
40
- const isHook = !!this.flags.hook;
41
41
  try {
42
42
  const installedVersion = this.config.pjson.version;
43
43
  const infoConfig = await (0, getInfoConfig_1.getInfoConfig)(this.config.root);
@@ -49,8 +49,9 @@ class Display extends command_1.SfdxCommand {
49
49
  const releaseNotes = await (0, getReleaseNotes_1.getReleaseNotes)(releaseNotesPath, releaseNotesFilename, version);
50
50
  const tokens = (0, parseReleaseNotes_1.parseReleaseNotes)(releaseNotes, version, releaseNotesPath);
51
51
  marked_1.marked.setOptions({
52
- renderer: new TerminalRenderer(),
52
+ renderer: new TerminalRenderer({ emoji: false }),
53
53
  });
54
+ tokens.unshift(marked_1.marked.lexer(`# Release notes for '${this.config.bin}':`)[0]);
54
55
  this.ux.log(marked_1.marked.parser(tokens));
55
56
  if (isHook) {
56
57
  if (env.getBoolean(HIDE_FOOTER)) {
@@ -1 +1 @@
1
- {"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../src/commands/info/releasenotes/display.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;AAEH,4EAA4E;AAC5E,uDAAuD;AAEvD,yBAAyB;AACzB,mCAAgC;AAChC,oDAAoD;AACpD,yCAAsC;AACtC,iDAAyD;AACzD,2CAAuD;AAEvD,iEAA8D;AAC9D,qEAAkE;AAClE,yEAAsE;AACtE,yEAAsE;AAEtE,wDAAwD;AACxD,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAE5C,MAAM,UAAU,GAAG,gCAAgC,CAAC;AACpD,MAAM,WAAW,GAAG,yBAAyB,CAAC;AAE9C,iGAAiG;AACjG,mFAAmF;AACnF,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,yBAAyB,EAAE,SAAS,CAAC,CAAC;AAE7E,MAAqB,OAAQ,SAAQ,qBAAW;IAoBvC,KA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f,YAAY,EAAE,OAAO;oBACrB,KAAK,EAAE,MAAM,CAAC,MAAM,CAClB;wBACE,IAAI;wBACJ,OAAO;wBACP,KAAK;qBACK,EACZ,GAAG,CACO;iBACb,CAAC,CAAC;gBAEH,OAAO;aACR;YAED,MAAM,GAAG,CAAC;SACX;IACH,CAAC;;AAjGH,0BAkGC;AAjGgB,eAAO,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;AAEhE,mBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAExD,eAAO,GAAG,CAAC,UAAU,CAAC,CAAC;AAEvB,gBAAQ,GAAG,QAAQ,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;AAEpF,mBAAW,GAAG;IAC7B,OAAO,EAAE,eAAK,CAAC,MAAM,CAAC;QACpB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,eAAe,CAAC;KAClD,CAAC;IACF,IAAI,EAAE,eAAK,CAAC,OAAO,CAAC;QAClB,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC;KAC/C,CAAC;CACH,CAAC"}
@@ -1 +1 @@
1
- export declare const PLUGIN_INFO_GET_TIMEOUT: number;
1
+ export declare const SFDX_RELEASE_NOTES_TIMEOUT: number;
package/lib/constants.js CHANGED
@@ -5,7 +5,8 @@
5
5
  * Licensed under the BSD 3-Clause license.
6
6
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
7
  */
8
+ var _a;
8
9
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.PLUGIN_INFO_GET_TIMEOUT = void 0;
10
- exports.PLUGIN_INFO_GET_TIMEOUT = (process.env.PLUGIN_INFO_GET_TIMEOUT || 3000);
10
+ exports.SFDX_RELEASE_NOTES_TIMEOUT = void 0;
11
+ exports.SFDX_RELEASE_NOTES_TIMEOUT = ((_a = process.env.SFDX_RELEASE_NOTES_TIMEOUT) !== null && _a !== void 0 ? _a : 3000);
11
12
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,uBAAuB,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,IAAI,CAAW,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;AAEU,QAAA,0BAA0B,GAAG,CAAC,MAAA,OAAO,CAAC,GAAG,CAAC,0BAA0B,mCAAI,IAAI,CAAW,CAAC"}
@@ -12,7 +12,7 @@ const constants_1 = require("../constants");
12
12
  const getDistTagVersion = async (url, distTag) => {
13
13
  // TODO: Could use npm instead here. That way private cli repos could auth with .npmrc
14
14
  // -- could utilize this: https://github.com/salesforcecli/plugin-trust/blob/0393b906a30e8858816625517eda5db69377c178/src/lib/npmCommand.ts
15
- const options = { timeout: constants_1.PLUGIN_INFO_GET_TIMEOUT };
15
+ const options = { timeout: constants_1.SFDX_RELEASE_NOTES_TIMEOUT };
16
16
  const body = await (0, got_1.default)(url, options).json();
17
17
  // We are only interested in latest and latest-rc, could update this if other tags are desired
18
18
  return distTag.includes('rc') ? body['latest-rc'] : body['latest'];
@@ -1 +1 @@
1
- {"version":3,"file":"getDistTagVersion.js","sourceRoot":"","sources":["../../src/shared/getDistTagVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAAsB;AACtB,4CAAuD;AAOvD,MAAM,iBAAiB,GAAG,KAAK,EAAE,GAAW,EAAE,OAAe,EAAmB,EAAE;IAChF,sFAAsF;IACtF,2IAA2I;IAC3I,MAAM,OAAO,GAAG,EAAE,OAAO,EAAE,mCAAuB,EAAE,CAAC;IAErD,MAAM,IAAI,GAAG,MAAM,IAAA,aAAG,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC,IAAI,EAAe,CAAC;IAEzD,8FAA8F;IAC9F,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACrE,CAAC,CAAC;AAEO,8CAAiB"}
1
+ {"version":3,"file":"getDistTagVersion.js","sourceRoot":"","sources":["../../src/shared/getDistTagVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAAsB;AACtB,4CAA0D;AAO1D,MAAM,iBAAiB,GAAG,KAAK,EAAE,GAAW,EAAE,OAAe,EAAmB,EAAE;IAChF,sFAAsF;IACtF,2IAA2I;IAC3I,MAAM,OAAO,GAAG,EAAE,OAAO,EAAE,sCAA0B,EAAE,CAAC;IAExD,MAAM,IAAI,GAAG,MAAM,IAAA,aAAG,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC,IAAI,EAAe,CAAC;IAEzD,8FAA8F;IAC9F,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACrE,CAAC,CAAC;AAEO,8CAAiB"}
@@ -14,7 +14,7 @@ const getReleaseNotes = async (base, filename, version) => {
14
14
  const majorVersion = (0, semver_1.major)(version);
15
15
  const rawBase = base.replace('github.com', 'raw.githubusercontent.com').replace('/blob/', '/').replace('/tree/', '/');
16
16
  const options = {
17
- timeout: constants_1.PLUGIN_INFO_GET_TIMEOUT,
17
+ timeout: constants_1.SFDX_RELEASE_NOTES_TIMEOUT,
18
18
  throwHttpErrors: false,
19
19
  };
20
20
  const getPromises = [
@@ -1 +1 @@
1
- {"version":3,"file":"getReleaseNotes.js","sourceRoot":"","sources":["../../src/shared/getReleaseNotes.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAAsB;AACtB,mCAA+B;AAC/B,4CAAuD;AAEvD,MAAM,eAAe,GAAG,KAAK,EAAE,IAAY,EAAE,QAAgB,EAAE,OAAe,EAAmB,EAAE;IACjG,MAAM,YAAY,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,CAAC;IAEpC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,2BAA2B,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAEtH,MAAM,OAAO,GAAG;QACd,OAAO,EAAE,mCAAuB;QAChC,eAAe,EAAE,KAAK;KACvB,CAAC;IAEF,MAAM,WAAW,GAAG;QAClB,IAAA,aAAG,EAAC,GAAG,OAAO,KAAK,YAAY,KAAK,EAAE,OAAO,CAAC;QAC9C,IAAA,aAAG,EAAC,GAAG,OAAO,IAAI,QAAQ,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;KACrE,CAAC;IAEF,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAE3D,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IAEnE,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEO,0CAAe"}
1
+ {"version":3,"file":"getReleaseNotes.js","sourceRoot":"","sources":["../../src/shared/getReleaseNotes.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,6BAAsB;AACtB,mCAA+B;AAC/B,4CAA0D;AAE1D,MAAM,eAAe,GAAG,KAAK,EAAE,IAAY,EAAE,QAAgB,EAAE,OAAe,EAAmB,EAAE;IACjG,MAAM,YAAY,GAAG,IAAA,cAAK,EAAC,OAAO,CAAC,CAAC;IAEpC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,2BAA2B,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAEtH,MAAM,OAAO,GAAG;QACd,OAAO,EAAE,sCAA0B;QACnC,eAAe,EAAE,KAAK;KACvB,CAAC;IAEF,MAAM,WAAW,GAAG;QAClB,IAAA,aAAG,EAAC,GAAG,OAAO,KAAK,YAAY,KAAK,EAAE,OAAO,CAAC;QAC9C,IAAA,aAAG,EAAC,GAAG,OAAO,IAAI,QAAQ,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;KACrE,CAAC;IAEF,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAE3D,MAAM,EAAE,IAAI,EAAE,GAAG,SAAS,CAAC,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IAEnE,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEO,0CAAe"}
@@ -8,29 +8,41 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.parseReleaseNotes = void 0;
10
10
  const marked_1 = require("marked");
11
+ const semver = require("semver");
11
12
  const parseReleaseNotes = (notes, version, baseUrl) => {
12
13
  let found = false;
14
+ let closestVersion;
15
+ let versions;
13
16
  const parsed = marked_1.marked.lexer(notes);
14
- // https://stackoverflow.com/a/6969486
15
- const escapeRegExp = (string) => {
16
- return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
17
- };
18
- const regexp = new RegExp(`\\b${escapeRegExp(version)}\\b`);
19
- const tokens = parsed.filter((token) => {
20
- // TODO: Could make header depth (2) a setting in oclif.info.releasenotes
21
- if (token.type === 'heading' && token.depth === 2) {
22
- if (regexp.exec(token.text)) {
23
- found = true;
17
+ let tokens;
18
+ const findVersion = (desiredVersion) => {
19
+ versions = [];
20
+ tokens = parsed.filter((token) => {
21
+ // TODO: Could make header depth (2) a setting in oclif.info.releasenotes
22
+ if (token.type === 'heading' && token.depth === 2) {
23
+ const coercedVersion = semver.coerce(token.text).version;
24
+ // We will use this to find the closest patch if passed version is not found
25
+ versions.push(coercedVersion);
26
+ if (coercedVersion === desiredVersion) {
27
+ found = true;
28
+ return token;
29
+ }
30
+ found = false;
31
+ }
32
+ else if (found === true) {
24
33
  return token;
25
34
  }
26
- found = false;
27
- }
28
- else if (found === true) {
29
- return token;
30
- }
31
- });
35
+ });
36
+ };
37
+ findVersion(version);
32
38
  if (!tokens.length) {
33
- throw new Error(`Didn't find version '${version}'. View release notes online at: ${baseUrl}`);
39
+ // If version was not found, try again with the closest patch version
40
+ const semverRange = `${semver.major(version)}.${semver.minor(version)}.x`;
41
+ closestVersion = semver.maxSatisfying(versions, semverRange);
42
+ findVersion(closestVersion);
43
+ if (!tokens.length) {
44
+ throw new Error(`Didn't find version '${version}'. View release notes online at: ${baseUrl}`);
45
+ }
34
46
  }
35
47
  const fixRelativeLinks = (token) => {
36
48
  // If link is relative, add the baseurl. https://regex101.com/r/h802kJ/1
@@ -40,6 +52,10 @@ const parseReleaseNotes = (notes, version, baseUrl) => {
40
52
  }
41
53
  };
42
54
  marked_1.marked.walkTokens(tokens, fixRelativeLinks);
55
+ if (closestVersion !== undefined) {
56
+ const warning = marked_1.marked.lexer(`# ATTENTION: Version ${version} was not found. Showing notes for closest patch version ${closestVersion}.`)[0];
57
+ tokens.unshift(warning);
58
+ }
43
59
  return tokens;
44
60
  };
45
61
  exports.parseReleaseNotes = parseReleaseNotes;
@@ -1 +1 @@
1
- {"version":3,"file":"parse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+ commandDescription: 'Display Salesforce CLI release notes on the command line.',
3
3
  flags: {
4
- version: 'CLI version or tag for which to display release notes',
5
- hook: 'suppresses errors; this is a hidden parameter used after install or update',
4
+ version: 'CLI version or tag for which to display release notes.',
5
+ hook: 'This hidden parameter is used in post install or update hooks.',
6
6
  },
7
7
  examples: [
8
8
  `Display release notes for the currently installed CLI version:
9
9
  <%= config.bin %> <%= command.id %>
10
-
11
10
  Display release notes for CLI version 7.120.0:
12
11
  <%= config.bin %> <%= command.id %> --version 7.120.0
13
-
14
12
  Display release notes for the CLI version that corresponds to a tag (%s):
15
13
  <%= config.bin %> <%= command.id %> --version latest
16
14
  `,
@@ -1 +1 @@
1
- {"version":"1.1.1","commands":{"info:releasenotes:display":{"id":"info:releasenotes:display","description":"display Salesforce CLI release notes on the command line","usage":"<%= command.id %> [-v <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-info","pluginType":"core","aliases":["whatsnew"],"examples":["Display release notes for the currently installed CLI version:"," <%= config.bin %> <%= command.id %>","","Display release notes for CLI version 7.120.0:"," <%= config.bin %> <%= command.id %> --version 7.120.0","","Display release notes for the CLI version that corresponds to a tag (stable, stable-rc, latest, latest-rc, rc):"," <%= config.bin %> <%= command.id %> --version latest"," "],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"version":{"name":"version","type":"option","char":"v","description":"CLI version or tag for which to display release notes"},"hook":{"name":"hook","type":"boolean","description":"suppresses errors; this is a hidden parameter used after install or update","hidden":true,"allowNo":false}},"args":[]}}}
1
+ {"version":"1.2.0","commands":{"info:releasenotes:display":{"id":"info:releasenotes:display","description":"Display Salesforce CLI release notes on the command line.","usage":"<%= command.id %> [-v <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]","pluginName":"@salesforce/plugin-info","pluginType":"core","aliases":["whatsnew"],"examples":["Display release notes for the currently installed CLI version:"," <%= config.bin %> <%= command.id %>","Display release notes for CLI version 7.120.0:"," <%= config.bin %> <%= command.id %> --version 7.120.0","Display release notes for the CLI version that corresponds to a tag (stable, stable-rc, latest, latest-rc, rc):"," <%= config.bin %> <%= command.id %> --version latest"," "],"flags":{"json":{"name":"json","type":"boolean","description":"format output as json","allowNo":false},"loglevel":{"name":"loglevel","type":"option","description":"logging level for this command invocation","required":false,"helpValue":"(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)","options":["trace","debug","info","warn","error","fatal","TRACE","DEBUG","INFO","WARN","ERROR","FATAL"],"default":"warn"},"version":{"name":"version","type":"option","char":"v","description":"CLI version or tag for which to display release notes."},"hook":{"name":"hook","type":"boolean","description":"This hidden parameter is used in post install or update hooks.","hidden":true,"allowNo":false}},"args":[]}}}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-info",
3
3
  "description": "Plugin for accessing cli info from the command line",
4
- "version": "1.1.1",
4
+ "version": "1.2.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/forcedotcom/cli/issues",
7
7
  "dependencies": {
@@ -13,15 +13,14 @@
13
13
  "marked": "^4.0.1",
14
14
  "marked-terminal": "^4.2.0",
15
15
  "semver": "^7.3.5",
16
- "sinon-chai": "^3.7.0",
17
16
  "tslib": "^2"
18
17
  },
19
18
  "devDependencies": {
20
19
  "@oclif/dev-cli": "^1",
21
20
  "@oclif/plugin-command-snapshot": "^2.2.2",
22
21
  "@salesforce/cli-plugins-testkit": "^1.4.17",
23
- "@salesforce/dev-config": "^2.1.2",
24
- "@salesforce/dev-scripts": "^0.9.18",
22
+ "@salesforce/dev-config": "^3.0.0",
23
+ "@salesforce/dev-scripts": "^2.0.0",
25
24
  "@salesforce/plugin-command-reference": "^1.3.17",
26
25
  "@salesforce/prettier-config": "^0.0.2",
27
26
  "@salesforce/ts-sinon": "1.3.21",
@@ -42,14 +41,15 @@
42
41
  "eslint-plugin-import": "^2.25.3",
43
42
  "eslint-plugin-jsdoc": "^35.5.1",
44
43
  "eslint-plugin-prettier": "^3.4.1",
45
- "husky": "^4.3.8",
44
+ "husky": "^7.0.4",
46
45
  "lint-staged": "^11.2.6",
47
- "mocha": "^8.4.0",
46
+ "mocha": "^9.1.3",
48
47
  "nyc": "^15.1.0",
49
48
  "prettier": "^2.4.1",
50
49
  "pretty-quick": "^3.1.0",
51
50
  "shx": "0.3.3",
52
51
  "sinon": "^11.1.1",
52
+ "sinon-chai": "^3.7.0",
53
53
  "ts-node": "^10.4.0",
54
54
  "typescript": "^4.5.2"
55
55
  },
@@ -115,18 +115,11 @@
115
115
  "test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 600000 --parallel",
116
116
  "version": "oclif-dev readme"
117
117
  },
118
- "husky": {
119
- "hooks": {
120
- "pre-commit": "sf-husky-pre-commit",
121
- "commit-msg": "sf-husky-commit-msg",
122
- "pre-push": "sf-husky-pre-push"
123
- }
124
- },
125
118
  "publishConfig": {
126
119
  "access": "public"
127
120
  },
128
121
  "sfdx": {
129
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/1.1.1.crt",
130
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/1.1.1.sig"
122
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/1.2.0.crt",
123
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-info/1.2.0.sig"
131
124
  }
132
125
  }