Skip to content

Commit 6c94c68

Browse files
Merge branch 'main' into wr/sf2suggestion
2 parents fb0eeec + 0b34448 commit 6c94c68

15 files changed

+2071
-1487
lines changed

CHANGELOG.md

+171
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,174 @@
1+
## [2.6.29](https://github.com/salesforcecli/plugin-info/compare/2.6.28...2.6.29) (2023-07-09)
2+
3+
4+
### Bug Fixes
5+
6+
* **deps:** bump @salesforce/sf-plugins-core from 3.1.3 to 3.1.5 ([5c663da](https://github.com/salesforcecli/plugin-info/commit/5c663da4fb9b21a0a820a3af74bf8c2bc028a9bf))
7+
8+
9+
10+
## [2.6.28](https://github.com/salesforcecli/plugin-info/compare/2.6.27...2.6.28) (2023-07-09)
11+
12+
13+
### Bug Fixes
14+
15+
* **deps:** bump @salesforce/kit from 3.0.3 to 3.0.4 ([da52e59](https://github.com/salesforcecli/plugin-info/commit/da52e598af5f69caa7e68a2ca50daef6a731bd25))
16+
17+
18+
19+
## [2.6.27](https://github.com/salesforcecli/plugin-info/compare/2.6.26...2.6.27) (2023-07-09)
20+
21+
22+
### Bug Fixes
23+
24+
* **deps:** bump @salesforce/core from 4.3.5 to 4.3.7 ([bacb85b](https://github.com/salesforcecli/plugin-info/commit/bacb85b78ae50cf089ee73f98cae77b123cb7571))
25+
26+
27+
28+
## [2.6.26](https://github.com/salesforcecli/plugin-info/compare/2.6.25...2.6.26) (2023-07-09)
29+
30+
31+
### Bug Fixes
32+
33+
* **deps:** bump @oclif/core from 2.8.7 to 2.8.11 ([a133578](https://github.com/salesforcecli/plugin-info/commit/a133578c9ce0c8c4cb02dd1c839716f8fa2beea6))
34+
35+
36+
37+
## [2.6.25](https://github.com/salesforcecli/plugin-info/compare/2.6.24...2.6.25) (2023-07-02)
38+
39+
40+
### Bug Fixes
41+
42+
* **deps:** bump @salesforce/sf-plugins-core from 3.1.2 to 3.1.3 ([5d5f45f](https://github.com/salesforcecli/plugin-info/commit/5d5f45fce2b20ed1d11ff77efc4aa2b48679507a))
43+
44+
45+
46+
## [2.6.24](https://github.com/salesforcecli/plugin-info/compare/2.6.23...2.6.24) (2023-06-25)
47+
48+
49+
### Bug Fixes
50+
51+
* **deps:** bump semver from 7.5.2 to 7.5.3 ([600c14e](https://github.com/salesforcecli/plugin-info/commit/600c14e2317da87c087d07f3b83de1ce33046597))
52+
53+
54+
55+
## [2.6.23](https://github.com/salesforcecli/plugin-info/compare/2.6.22...2.6.23) (2023-06-24)
56+
57+
58+
### Bug Fixes
59+
60+
* **deps:** bump semver from 7.5.1 to 7.5.2 ([2ea4b06](https://github.com/salesforcecli/plugin-info/commit/2ea4b061477b76a5daef432c1a3c94bafbdb5cbf))
61+
62+
63+
64+
## [2.6.22](https://github.com/salesforcecli/plugin-info/compare/2.6.21...2.6.22) (2023-06-18)
65+
66+
67+
### Bug Fixes
68+
69+
* **deps:** bump @salesforce/sf-plugins-core from 3.0.4 to 3.1.1 ([d77bcac](https://github.com/salesforcecli/plugin-info/commit/d77bcac90e53cfb91b8f813d1b49d9f8a6ef46e7))
70+
71+
72+
73+
## [2.6.21](https://github.com/salesforcecli/plugin-info/compare/2.6.20...2.6.21) (2023-06-18)
74+
75+
76+
### Bug Fixes
77+
78+
* **deps:** bump @oclif/core from 2.8.5 to 2.8.7 ([973128f](https://github.com/salesforcecli/plugin-info/commit/973128f58b1b5094793e564f9f1317f203357a7d))
79+
80+
81+
82+
## [2.6.20](https://github.com/salesforcecli/plugin-info/compare/2.6.19...2.6.20) (2023-06-12)
83+
84+
85+
### Bug Fixes
86+
87+
* bump proxy-agent to new major version ([#429](https://github.com/salesforcecli/plugin-info/issues/429)) ([20b0680](https://github.com/salesforcecli/plugin-info/commit/20b068077e59037f190af2d1d9ba4b4b001cb044))
88+
89+
90+
91+
## [2.6.19](https://github.com/salesforcecli/plugin-info/compare/2.6.18...2.6.19) (2023-06-05)
92+
93+
94+
### Bug Fixes
95+
96+
* use SF prefixed env vars, add UTs ([58e0a9f](https://github.com/salesforcecli/plugin-info/commit/58e0a9f2ec3ff19e9351e9392dce9e1b68389188))
97+
98+
99+
100+
## [2.6.18](https://github.com/salesforcecli/plugin-info/compare/2.6.17...2.6.18) (2023-06-05)
101+
102+
103+
### Bug Fixes
104+
105+
* **deps:** bump tslib from 2.5.2 to 2.5.3 ([1a51d97](https://github.com/salesforcecli/plugin-info/commit/1a51d9757d80f42ac1ba294256ddd40bbe68a07f))
106+
107+
108+
109+
## [2.6.17](https://github.com/salesforcecli/plugin-info/compare/2.6.16...2.6.17) (2023-06-04)
110+
111+
112+
### Bug Fixes
113+
114+
* **deps:** bump @salesforce/core from 4.0.1 to 4.1.0 ([9f185d5](https://github.com/salesforcecli/plugin-info/commit/9f185d5cbf4640d931887b9bc3a722fc10aaa9a5))
115+
116+
117+
118+
## [2.6.16](https://github.com/salesforcecli/plugin-info/compare/2.6.15...2.6.16) (2023-05-28)
119+
120+
121+
### Bug Fixes
122+
123+
* **deps:** bump tslib from 2.5.0 to 2.5.2 ([2013886](https://github.com/salesforcecli/plugin-info/commit/2013886a38c569e98b45124d8cd262b2bfde6226))
124+
125+
126+
127+
## [2.6.15](https://github.com/salesforcecli/plugin-info/compare/2.6.14...2.6.15) (2023-05-28)
128+
129+
130+
### Bug Fixes
131+
132+
* **deps:** bump @salesforce/core from 3.36.1 to 3.36.2 ([fc197b1](https://github.com/salesforcecli/plugin-info/commit/fc197b1afc42e9cdc5499f86eca0ef9ef6d01345))
133+
134+
135+
136+
## [2.6.14](https://github.com/salesforcecli/plugin-info/compare/2.6.13...2.6.14) (2023-05-21)
137+
138+
139+
### Bug Fixes
140+
141+
* **deps:** bump @salesforce/sf-plugins-core from 2.4.2 to 2.4.3 ([5d650f4](https://github.com/salesforcecli/plugin-info/commit/5d650f45ee54ab6c8458d395c9ff56b91a456a81))
142+
143+
144+
145+
## [2.6.13](https://github.com/salesforcecli/plugin-info/compare/2.6.12...2.6.13) (2023-05-16)
146+
147+
148+
### Bug Fixes
149+
150+
* **deps:** bump vm2 from 3.9.17 to 3.9.18 ([9bf4a1a](https://github.com/salesforcecli/plugin-info/commit/9bf4a1adcc053e3f0f0a9ccf3e3d307418db7e4a))
151+
152+
153+
154+
## [2.6.12](https://github.com/salesforcecli/plugin-info/compare/2.6.11...2.6.12) (2023-05-14)
155+
156+
157+
### Bug Fixes
158+
159+
* **deps:** bump @salesforce/core from 3.36.0 to 3.36.1 ([e6272ec](https://github.com/salesforcecli/plugin-info/commit/e6272ec64425a169a6ca4ee072d8691ea69c7c43))
160+
161+
162+
163+
## [2.6.11](https://github.com/salesforcecli/plugin-info/compare/2.6.10...2.6.11) (2023-05-14)
164+
165+
166+
### Bug Fixes
167+
168+
* **deps:** bump @salesforce/sf-plugins-core from 2.4.0 to 2.4.2 ([56ab945](https://github.com/salesforcecli/plugin-info/commit/56ab945cdf018d3746e50b4e6e8ba970ae88e7f7))
169+
170+
171+
1172
## [2.6.10](https://github.com/salesforcecli/plugin-info/compare/2.6.9...2.6.10) (2023-04-30)
2173

3174

command-snapshot.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33
"command": "doctor",
44
"plugin": "@salesforce/plugin-info",
55
"flags": ["command", "create-issue", "json", "loglevel", "output-dir", "plugin"],
6-
"alias": []
6+
"alias": [],
7+
"flagChars": ["c", "d", "i", "p"],
8+
"flagAliases": ["createissue", "o", "outputdir"]
79
},
810
{
911
"command": "info:releasenotes:display",
1012
"plugin": "@salesforce/plugin-info",
1113
"flags": ["hook", "json", "loglevel", "version"],
12-
"alias": ["whatsnew"]
14+
"alias": ["whatsnew"],
15+
"flagChars": ["v"],
16+
"flagAliases": []
1317
}
1418
]

package.json

+24-26
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,54 @@
11
{
22
"name": "@salesforce/plugin-info",
33
"description": "Plugin for accessing cli info from the command line",
4-
"version": "2.6.10",
4+
"version": "2.6.29",
55
"author": "Salesforce",
66
"bugs": "https://github.com/forcedotcom/cli/issues",
77
"main": "lib/index.js",
88
"dependencies": {
9-
"@oclif/core": "^2.8.0",
10-
"@salesforce/core": "^3.34.1",
11-
"@salesforce/kit": "^1.9.2",
12-
"@salesforce/sf-plugins-core": "^2.4.0",
9+
"@oclif/core": "^2.8.11",
10+
"@salesforce/core": "^4.3.7",
11+
"@salesforce/kit": "^3.0.4",
12+
"@salesforce/sf-plugins-core": "^3.1.5",
1313
"got": "^11.8.6",
1414
"marked": "^4.3.0",
1515
"marked-terminal": "^4.2.0",
1616
"open": "^8.4.2",
17-
"proxy-agent": "^5.0.0",
18-
"proxy-from-env": "^1.1.0",
19-
"semver": "^7.5.0",
17+
"proxy-agent": "^6.2.1",
18+
"semver": "^7.5.3",
2019
"tslib": "^2"
2120
},
2221
"devDependencies": {
23-
"@oclif/plugin-command-snapshot": "^3.3.11",
24-
"@salesforce/cli-plugins-testkit": "^3.3.4",
25-
"@salesforce/dev-config": "^3.1.0",
26-
"@salesforce/dev-scripts": "^4.3.1",
27-
"@salesforce/plugin-command-reference": "^1.6.13",
28-
"@salesforce/prettier-config": "^0.0.2",
29-
"@salesforce/ts-sinon": "^1.4.6",
22+
"@oclif/plugin-command-snapshot": "^4.0.6",
23+
"@salesforce/cli-plugins-testkit": "^4.0.1",
24+
"@salesforce/dev-config": "^4.0.1",
25+
"@salesforce/dev-scripts": "^5.4.2",
26+
"@salesforce/plugin-command-reference": "^3.0.8",
27+
"@salesforce/prettier-config": "^0.0.3",
28+
"@salesforce/ts-sinon": "^1.4.8",
3029
"@swc/core": "1.3.39",
3130
"@types/fs-extra": "^9.0.13",
3231
"@types/marked": "^4.0.8",
3332
"@types/marked-terminal": "^3.1.3",
34-
"@types/proxy-from-env": "^1.0.1",
35-
"@types/semver": "^7.3.8",
33+
"@types/semver": "^7.5.0",
3634
"@types/sinon-chai": "^3.2.9",
37-
"@typescript-eslint/eslint-plugin": "^5.59.1",
38-
"@typescript-eslint/parser": "^5.57.0",
35+
"@typescript-eslint/eslint-plugin": "^5.61.0",
36+
"@typescript-eslint/parser": "^5.60.1",
3937
"chai": "^4.3.7",
40-
"eslint": "^8.39.0",
38+
"eslint": "^8.44.0",
4139
"eslint-config-prettier": "^8.8.0",
42-
"eslint-config-salesforce": "^1.1.1",
40+
"eslint-config-salesforce": "^2.0.1",
4341
"eslint-config-salesforce-license": "^0.2.0",
4442
"eslint-config-salesforce-typescript": "^1.1.1",
4543
"eslint-plugin-header": "^3.1.1",
4644
"eslint-plugin-import": "^2.27.5",
47-
"eslint-plugin-jsdoc": "^39.9.1",
48-
"eslint-plugin-sf-plugin": "^1.15.1",
45+
"eslint-plugin-jsdoc": "^43.0.5",
46+
"eslint-plugin-sf-plugin": "^1.15.8",
4947
"husky": "^7.0.4",
5048
"mocha": "^9.1.3",
5149
"nyc": "^15.1.0",
52-
"oclif": "^3.8.1",
53-
"prettier": "^2.8.7",
50+
"oclif": "^3.9.1",
51+
"prettier": "^2.8.8",
5452
"pretty-quick": "^3.1.0",
5553
"shx": "0.3.4",
5654
"sinon": "^11.1.1",
@@ -61,7 +59,7 @@
6159
},
6260
"config": {},
6361
"engines": {
64-
"node": ">=14.0.0"
62+
"node": ">=16.0.0"
6563
},
6664
"files": [
6765
"/lib",

src/commands/doctor.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ import { Flags, loglevel, SfCommand } from '@salesforce/sf-plugins-core';
1212
import { Lifecycle, Messages, SfError } from '@salesforce/core';
1313
import * as open from 'open';
1414
import got from 'got';
15-
import * as ProxyAgent from 'proxy-agent';
16-
import { getProxyForUrl } from 'proxy-from-env';
15+
import { ProxyAgent } from 'proxy-agent';
1716
import { Doctor as SFDoctor, SfDoctor, SfDoctorDiagnosis } from '../doctor';
1817
import { DiagnosticStatus } from '../diagnostics';
1918

@@ -63,10 +62,9 @@ export default class Doctor extends SfCommand<SfDoctorDiagnosis> {
6362

6463
this.outputDir = path.resolve(flags['output-dir'] ?? process.cwd());
6564

66-
// eslint-disable-next-line @typescript-eslint/require-await
6765
lifecycle.on<DiagnosticStatus>('Doctor:diagnostic', async (data) => {
6866
this.log(`${data.status} - ${data.testName}`);
69-
this.doctor.addDiagnosticStatus(data);
67+
return Promise.resolve(this.doctor.addDiagnosticStatus(data));
7068
});
7169

7270
if (flags.command) {
@@ -120,7 +118,7 @@ export default class Doctor extends SfCommand<SfDoctorDiagnosis> {
120118
const raw = 'https://raw.githubusercontent.com/forcedotcom/cli/main/.github/ISSUE_TEMPLATE/bug_report.md';
121119
const ghIssue = await got(raw, {
122120
throwHttpErrors: false,
123-
agent: { https: ProxyAgent(getProxyForUrl(raw)) },
121+
agent: { https: new ProxyAgent() },
124122
});
125123

126124
const title = (

src/commands/info/releasenotes/display.ts

+9-14
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

8-
// Needed this to ensure the "helpers" were declared before read in examples
9-
/* eslint-disable @typescript-eslint/member-ordering */
10-
118
import * as os from 'os';
129
import { marked } from 'marked';
1310
import * as TerminalRenderer from 'marked-terminal';
@@ -23,22 +20,19 @@ import { parseReleaseNotes } from '../../../shared/parseReleaseNotes';
2320
// Initialize Messages with the current plugin directory
2421
Messages.importMessagesDirectory(__dirname);
2522

26-
const HIDE_NOTES = 'SFDX_HIDE_RELEASE_NOTES';
27-
const HIDE_FOOTER = 'SFDX_HIDE_RELEASE_NOTES_FOOTER';
23+
const helpers = ['stable', 'stable-rc', 'latest', 'latest-rc', 'rc'];
2824

2925
// Load the specific messages for this file. Messages from @salesforce/command, @salesforce/core,
3026
// or any library that is using the messages framework can also be loaded this way.
3127
const messages = Messages.loadMessages('@salesforce/plugin-info', 'display');
3228

3329
export default class Display extends SfCommand<DisplayOutput | undefined> {
34-
private static helpers = ['stable', 'stable-rc', 'latest', 'latest-rc', 'rc'];
35-
3630
public static readonly summary = messages.getMessage('summary');
3731
public static readonly description = messages.getMessage('description');
3832

3933
public static readonly aliases = ['whatsnew'];
4034

41-
public static readonly examples = messages.getMessages('examples', [Display.helpers.join(', ')]);
35+
public static readonly examples = messages.getMessages('examples', [helpers.join(', ')]);
4236

4337
public static readonly flags = {
4438
version: Flags.string({
@@ -53,13 +47,14 @@ export default class Display extends SfCommand<DisplayOutput | undefined> {
5347
};
5448

5549
public async run(): Promise<DisplayOutput | undefined> {
50+
const HIDE_NOTES = this.config.bin === 'sf' ? 'SF_HIDE_RELEASE_NOTES' : 'SFDX_HIDE_RELEASE_NOTES';
51+
const HIDE_FOOTER = this.config.bin === 'sf' ? 'SF_HIDE_RELEASE_NOTES_FOOTER' : 'SFDX_HIDE_RELEASE_NOTES_FOOTER';
52+
5653
const logger = Logger.childFromRoot(this.constructor.name);
5754
const { flags } = await this.parse(Display);
5855
const env = new Env();
5956

60-
const isHook = flags.hook;
61-
62-
if (env.getBoolean(HIDE_NOTES) && isHook) {
57+
if (env.getBoolean(HIDE_NOTES) && flags.hook) {
6358
// We don't ever want to exit the process for info:releasenotes:display (whatsnew)
6459
// In most cases we will log a message, but here we only trace log in case someone using stdout of the update command
6560
logger.trace(`release notes disabled via env var: ${HIDE_NOTES}`);
@@ -78,7 +73,7 @@ export default class Display extends SfCommand<DisplayOutput | undefined> {
7873

7974
let version = flags.version ?? installedVersion;
8075

81-
if (Display.helpers.includes(version)) {
76+
if (helpers.includes(version)) {
8277
version = await getDistTagVersion(distTagUrl, version);
8378
}
8479

@@ -100,7 +95,7 @@ export default class Display extends SfCommand<DisplayOutput | undefined> {
10095
this.log(marked.parser(tokens));
10196
}
10297

103-
if (isHook) {
98+
if (flags.hook) {
10499
if (env.getBoolean(HIDE_FOOTER)) {
105100
await Lifecycle.getInstance().emitTelemetry({ eventName: 'FOOTER_HIDDEN' });
106101
} else {
@@ -109,7 +104,7 @@ export default class Display extends SfCommand<DisplayOutput | undefined> {
109104
}
110105
}
111106
} catch (err) {
112-
if (isHook) {
107+
if (flags.hook) {
113108
// Do not throw error if --hook is passed, just warn so we don't exit any processes.
114109
// --hook is passed in the post install/update scripts
115110
const { message, stack, name } = err as Error;

0 commit comments

Comments
 (0)