Skip to content

Commit

Permalink
fix: avoid warning from asking for old config (#829)
Browse files Browse the repository at this point in the history
* fix: avoid warning from asking for old config

* chore: bump deps for core/plugins-core

* chore: bump core

* refactor: use sf progress bar env to avoid warnings

* test: manage migrated envs, extra warnings, and imported configMeta

* test: use more bin/dev for stuff not under test
  • Loading branch information
mshanemc authored Apr 29, 2023
1 parent acd999c commit a72ee16
Show file tree
Hide file tree
Showing 10 changed files with 460 additions and 548 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"dependencies": {
"@oclif/core": "^2.8.2",
"@salesforce/apex-node": "^1.6.0",
"@salesforce/core": "^3.34.6",
"@salesforce/core": "^3.36.0",
"@salesforce/kit": "^1.9.2",
"@salesforce/sf-plugins-core": "^2.2.11",
"@salesforce/sf-plugins-core": "^2.4.0",
"@salesforce/source-deploy-retrieve": "^8.0.1",
"@salesforce/source-tracking": "^3.1.0",
"chalk": "^4.1.2",
Expand Down Expand Up @@ -283,4 +283,4 @@
"output": []
}
}
}
}
2 changes: 1 addition & 1 deletion src/commands/force/mdapi/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export class Deploy extends DeployCommand {

if (!this.isAsync) {
if (!this.jsonEnabled()) {
const progressFormatter: ProgressFormatter = env.getBoolean('SFDX_USE_PROGRESS_BAR', true)
const progressFormatter: ProgressFormatter = env.getBoolean('SF_USE_PROGRESS_BAR', true)
? new DeployProgressBarFormatter(new Ux({ jsonEnabled: this.jsonEnabled() }))
: new DeployProgressStatusFormatter(new Ux({ jsonEnabled: this.jsonEnabled() }));
progressFormatter.progress(deploy);
Expand Down
2 changes: 1 addition & 1 deletion src/commands/force/mdapi/deploy/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class Report extends DeployCommand {

const deploy = this.createDeploy(this.org.getConnection(), deployId);
if (!this.jsonEnabled()) {
const progressFormatter: ProgressFormatter = env.getBoolean('SFDX_USE_PROGRESS_BAR', true)
const progressFormatter: ProgressFormatter = env.getBoolean('SF_USE_PROGRESS_BAR', true)
? new DeployProgressBarFormatter(new Ux({ jsonEnabled: this.jsonEnabled() }))
: new DeployProgressStatusFormatter(new Ux({ jsonEnabled: this.jsonEnabled() }));
progressFormatter.progress(deploy);
Expand Down
2 changes: 1 addition & 1 deletion src/commands/force/source/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export class Deploy extends DeployCommand {
if (!this.isAsync) {
// we're not print JSON output
if (!this.jsonEnabled()) {
const progressFormatter: ProgressFormatter = env.getBoolean('SFDX_USE_PROGRESS_BAR', true)
const progressFormatter: ProgressFormatter = env.getBoolean('SF_USE_PROGRESS_BAR', true)
? new DeployProgressBarFormatter(new Ux({ jsonEnabled: this.jsonEnabled() }))
: new DeployProgressStatusFormatter(new Ux({ jsonEnabled: this.jsonEnabled() }), {
verbose: this.flags.verbose,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/force/source/deploy/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class Report extends DeployCommand {
const waitDuration = this.flags.wait;
const deploy = this.createDeploy(this.flags['target-org'].getConnection(), deployId);
if (!this.jsonEnabled()) {
const progressFormatter: ProgressFormatter = env.getBoolean('SFDX_USE_PROGRESS_BAR', true)
const progressFormatter: ProgressFormatter = env.getBoolean('SF_USE_PROGRESS_BAR', true)
? new DeployProgressBarFormatter(new Ux({ jsonEnabled: this.jsonEnabled() }))
: new DeployProgressStatusFormatter(new Ux({ jsonEnabled: this.jsonEnabled() }));
progressFormatter.progress(deploy);
Expand Down
2 changes: 1 addition & 1 deletion src/commands/force/source/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export default class Push extends DeployCommand {

// we're not print JSON output
if (!this.jsonEnabled()) {
const progressFormatter: ProgressFormatter = env.getBoolean('SFDX_USE_PROGRESS_BAR', true)
const progressFormatter: ProgressFormatter = env.getBoolean('SF_USE_PROGRESS_BAR', true)
? new DeployProgressBarFormatter(new Ux({ jsonEnabled: this.jsonEnabled() }))
: new DeployProgressStatusFormatter(new Ux({ jsonEnabled: this.jsonEnabled() }));
progressFormatter.progress(deploy);
Expand Down
5 changes: 1 addition & 4 deletions src/deployCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
Messages,
Org,
PollingClient,
SfdxPropertyKeys,
SfError,
StateAggregator,
StatusResult,
Expand Down Expand Up @@ -133,9 +132,7 @@ export abstract class DeployCommand extends SourceCommand {
return false;
}

const restDeployConfig =
this.configAggregator.getInfo(SfdxPropertyKeys.REST_DEPLOY).value ??
this.configAggregator.getInfo('org-metadata-rest-deploy').value;
const restDeployConfig = this.configAggregator.getInfo('org-metadata-rest-deploy').value;
// aggregator property values are returned as strings
if (restDeployConfig === 'false') {
this.debug('restDeploy SFDX config === false. Using SOAP');
Expand Down
Loading

0 comments on commit a72ee16

Please sign in to comment.