Skip to content

Commit

Permalink
Merge branch 'main' into cd/improve-error-msg
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiand391 committed Jan 22, 2024
2 parents 555fb97 + 4a291d4 commit 6691844
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 57 deletions.
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
## [3.2.4](https://github.com/salesforcecli/plugin-deploy-retrieve/compare/3.2.3...3.2.4) (2024-01-21)

### Bug Fixes

- **deps:** bump @salesforce/sf-plugins-core from 7.1.1 to 7.1.3 ([2445627](https://github.com/salesforcecli/plugin-deploy-retrieve/commit/244562790c783816051e4c5d540d0528280ad7ae))

## [3.2.3](https://github.com/salesforcecli/plugin-deploy-retrieve/compare/3.2.2...3.2.3) (2024-01-20)

### Bug Fixes

- **deps:** bump @salesforce/source-tracking from 5.1.3 to 5.1.5 ([926286f](https://github.com/salesforcecli/plugin-deploy-retrieve/commit/926286fae90dfbd153a8341c27d3a92a0dcb4f23))

## [3.2.2](https://github.com/salesforcecli/plugin-deploy-retrieve/compare/3.2.1...3.2.2) (2024-01-20)

### Bug Fixes

- **deps:** bump @salesforce/source-deploy-retrieve ([add0425](https://github.com/salesforcecli/plugin-deploy-retrieve/commit/add04254f30f726b12840892a1570829b18135f9))

## [3.2.1](https://github.com/salesforcecli/plugin-deploy-retrieve/compare/3.2.0...3.2.1) (2024-01-20)

### Bug Fixes

- **deps:** bump @salesforce/apex-node from 3.0.1 to 3.0.2 ([96e4981](https://github.com/salesforcecli/plugin-deploy-retrieve/commit/96e49814a1f75f802b25fdbc6e8781401cd6c5f2))

# [3.2.0](https://github.com/salesforcecli/plugin-deploy-retrieve/compare/3.1.3...3.2.0) (2024-01-16)

### Bug Fixes

- correct test to match fix ([20cee7b](https://github.com/salesforcecli/plugin-deploy-retrieve/commit/20cee7b63921da59a9f3c5d359bd2060ce2b3f82))

### Features

- add concise flag to deploy preview ([6729b4d](https://github.com/salesforcecli/plugin-deploy-retrieve/commit/6729b4db6f43a9a2940577baa4687b87c8c659db))

## [3.1.3](https://github.com/salesforcecli/plugin-deploy-retrieve/compare/3.1.2...3.1.3) (2024-01-13)

### Bug Fixes
Expand Down
37 changes: 19 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ FLAG DESCRIPTIONS
If you specify this parameter, don’t specify --metadata or --source-dir.
```

_See code: [lib/commands/project/convert/mdapi.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.1.3/lib/commands/project/convert/mdapi.ts)_
_See code: [src/commands/project/convert/mdapi.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.2.4/src/commands/project/convert/mdapi.ts)_

## `sf project convert source`

Expand All @@ -151,7 +151,7 @@ USAGE
<value> | -m <value>]
FLAGS
-d, --output-dir=<value> [default: metadataPackage_1705146262954] Output directory to store the Metadata
-d, --output-dir=<value> [default: metadataPackage_1705805249874] Output directory to store the Metadata
API–formatted files in.
-m, --metadata=<value>... Metadata component names to convert.
-n, --package-name=<value> Name of the package to associate with the metadata-formatted files.
Expand Down Expand Up @@ -211,7 +211,7 @@ FLAG DESCRIPTIONS
Override the api version used for api requests made by this command
```

_See code: [lib/commands/project/convert/source.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.1.3/lib/commands/project/convert/source.ts)_
_See code: [src/commands/project/convert/source.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.2.4/src/commands/project/convert/source.ts)_

## `sf project delete source`

Expand Down Expand Up @@ -350,7 +350,7 @@ FLAG DESCRIPTIONS
- Separate the test names with spaces: --tests Test1 Test2 "Test With Space"
```

_See code: [lib/commands/project/delete/source.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.1.3/lib/commands/project/delete/source.ts)_
_See code: [src/commands/project/delete/source.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.2.4/src/commands/project/delete/source.ts)_

## `sf project delete tracking`

Expand Down Expand Up @@ -386,7 +386,7 @@ EXAMPLES
$ sf project delete tracking --target-org my-scratch
```

_See code: [lib/commands/project/delete/tracking.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.1.3/lib/commands/project/delete/tracking.ts)_
_See code: [src/commands/project/delete/tracking.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.2.4/src/commands/project/delete/tracking.ts)_

## `sf project deploy cancel`

Expand Down Expand Up @@ -456,22 +456,23 @@ FLAG DESCRIPTIONS
project deploy report".
```

_See code: [lib/commands/project/deploy/cancel.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.1.3/lib/commands/project/deploy/cancel.ts)_
_See code: [src/commands/project/deploy/cancel.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.2.4/src/commands/project/deploy/cancel.ts)_

## `sf project deploy preview`

Preview a deployment to see what will deploy to the org, the potential conflicts, and the ignored files.

```
USAGE
$ sf project deploy preview -o <value> [--json] [-c] [-x <value> | -d <value> | -m <value>]
$ sf project deploy preview -o <value> [--json] [-c] [-x <value> | -d <value> | -m <value>] [--concise]
FLAGS
-c, --ignore-conflicts Don't display conflicts in preview of the deployment.
-d, --source-dir=<value>... Path to the local source files to preview.
-m, --metadata=<value>... Metadata component names to preview.
-o, --target-org=<value> (required) Login username or alias for the target org.
-x, --manifest=<value> Full file path for manifest (package.xml) of components to preview.
--concise Show only the changes that will be deployed; omits files that are forceignored.
GLOBAL FLAGS
--json Format output as json.
Expand Down Expand Up @@ -539,7 +540,7 @@ FLAG DESCRIPTIONS
All child components are included. If you specify this flag, don’t specify --metadata or --source-dir.
```

_See code: [lib/commands/project/deploy/preview.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.1.3/lib/commands/project/deploy/preview.ts)_
_See code: [src/commands/project/deploy/preview.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.2.4/src/commands/project/deploy/preview.ts)_

## `sf project deploy quick`

Expand Down Expand Up @@ -623,7 +624,7 @@ FLAG DESCRIPTIONS
deploy report".
```

_See code: [lib/commands/project/deploy/quick.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.1.3/lib/commands/project/deploy/quick.ts)_
_See code: [src/commands/project/deploy/quick.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.2.4/src/commands/project/deploy/quick.ts)_

## `sf project deploy report`

Expand Down Expand Up @@ -718,7 +719,7 @@ FLAG DESCRIPTIONS
--coverage-formatters lcov --coverage-formatters clover
```

_See code: [lib/commands/project/deploy/report.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.1.3/lib/commands/project/deploy/report.ts)_
_See code: [src/commands/project/deploy/report.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.2.4/src/commands/project/deploy/report.ts)_

## `sf project deploy resume`

Expand Down Expand Up @@ -802,7 +803,7 @@ FLAG DESCRIPTIONS
--coverage-formatters lcov --coverage-formatters clover
```

_See code: [lib/commands/project/deploy/resume.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.1.3/lib/commands/project/deploy/resume.ts)_
_See code: [src/commands/project/deploy/resume.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.2.4/src/commands/project/deploy/resume.ts)_

## `sf project deploy start`

Expand Down Expand Up @@ -1014,7 +1015,7 @@ FLAG DESCRIPTIONS
--coverage-formatters lcov --coverage-formatters clover
```

_See code: [lib/commands/project/deploy/start.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.1.3/lib/commands/project/deploy/start.ts)_
_See code: [src/commands/project/deploy/start.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.2.4/src/commands/project/deploy/start.ts)_

## `sf project deploy validate`

Expand Down Expand Up @@ -1176,7 +1177,7 @@ FLAG DESCRIPTIONS
--coverage-formatters lcov --coverage-formatters clover
```

_See code: [lib/commands/project/deploy/validate.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.1.3/lib/commands/project/deploy/validate.ts)_
_See code: [src/commands/project/deploy/validate.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.2.4/src/commands/project/deploy/validate.ts)_

## `sf project generate manifest`

Expand Down Expand Up @@ -1251,7 +1252,7 @@ EXAMPLES
$ sf project generate manifest --from-org [email protected] --include-packages unlocked
```

_See code: [lib/commands/project/generate/manifest.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.1.3/lib/commands/project/generate/manifest.ts)_
_See code: [src/commands/project/generate/manifest.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.2.4/src/commands/project/generate/manifest.ts)_

## `sf project list ignored`

Expand Down Expand Up @@ -1292,7 +1293,7 @@ EXAMPLES
$ sf project list ignored --source-dir package.xml
```

_See code: [lib/commands/project/list/ignored.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.1.3/lib/commands/project/list/ignored.ts)_
_See code: [src/commands/project/list/ignored.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.2.4/src/commands/project/list/ignored.ts)_

## `sf project reset tracking`

Expand Down Expand Up @@ -1340,7 +1341,7 @@ EXAMPLES
$ sf project reset tracking --revision 30
```

_See code: [lib/commands/project/reset/tracking.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.1.3/lib/commands/project/reset/tracking.ts)_
_See code: [src/commands/project/reset/tracking.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.2.4/src/commands/project/reset/tracking.ts)_

## `sf project retrieve preview`

Expand Down Expand Up @@ -1396,7 +1397,7 @@ FLAG DESCRIPTIONS
Overrides your default org.
```

_See code: [lib/commands/project/retrieve/preview.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.1.3/lib/commands/project/retrieve/preview.ts)_
_See code: [src/commands/project/retrieve/preview.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.2.4/src/commands/project/retrieve/preview.ts)_

## `sf project retrieve start`

Expand Down Expand Up @@ -1542,6 +1543,6 @@ FLAG DESCRIPTIONS
If you specify this parameter, don’t specify --metadata or --source-dir.
```

_See code: [lib/commands/project/retrieve/start.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.1.3/lib/commands/project/retrieve/start.ts)_
_See code: [src/commands/project/retrieve/start.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/3.2.4/src/commands/project/retrieve/start.ts)_

<!-- commandsstop -->
2 changes: 1 addition & 1 deletion command-snapshot.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"command": "project:deploy:preview",
"flagAliases": [],
"flagChars": ["c", "d", "m", "o", "x"],
"flags": ["ignore-conflicts", "json", "manifest", "metadata", "source-dir", "target-org"],
"flags": ["ignore-conflicts", "json", "manifest", "metadata", "source-dir", "target-org", "concise"],
"plugin": "@salesforce/plugin-deploy-retrieve"
},
{
Expand Down
2 changes: 1 addition & 1 deletion messages/deploy.metadata.preview.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ This flag applies only to orgs that allow source tracking. It has no effect on o

# flags.concise.summary

Omit ignored files.
Show only the changes that will be deployed; omits files that are forceignored.

# flags.api-version.summary

Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "@salesforce/plugin-deploy-retrieve",
"description": "deploy and retrieve commands for sf",
"version": "3.1.3",
"version": "3.2.4",
"author": "Salesforce",
"bugs": "https://github.com/forcedotcom/cli/issues",
"dependencies": {
"@oclif/core": "^3.18.1",
"@salesforce/apex-node": "^3.0.1",
"@salesforce/apex-node": "^3.0.2",
"@salesforce/core": "^6.4.4",
"@salesforce/kit": "^3.0.15",
"@salesforce/sf-plugins-core": "^7.1.1",
"@salesforce/source-deploy-retrieve": "^10.2.10",
"@salesforce/source-tracking": "^5.1.4",
"@salesforce/sf-plugins-core": "^7.1.3",
"@salesforce/source-deploy-retrieve": "^10.2.11",
"@salesforce/source-tracking": "^5.1.5",
"@salesforce/ts-types": "^2.0.9",
"chalk": "^5.3.0"
},
Expand All @@ -21,7 +21,7 @@
"@salesforce/dev-scripts": "^8.3.0",
"@salesforce/plugin-command-reference": "^3.0.59",
"@salesforce/plugin-source": "^2.11.4",
"@salesforce/source-testkit": "^2.1.80",
"@salesforce/source-testkit": "^2.1.86",
"@salesforce/ts-sinon": "^1.4.19",
"cross-env": "^7.0.3",
"eslint-plugin-sf-plugin": "^1.17.0",
Expand Down
6 changes: 5 additions & 1 deletion src/commands/project/deploy/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ export default class DeployMetadataPreview extends SfCommand<PreviewResult> {
summary: messages.getMessage('flags.target-org.summary'),
required: true,
}),
concise: Flags.boolean({
summary: messages.getMessage('flags.concise.summary'),
default: false,
}),
};

public async run(): Promise<PreviewResult> {
Expand Down Expand Up @@ -88,7 +92,7 @@ export default class DeployMetadataPreview extends SfCommand<PreviewResult> {
});

if (!this.jsonEnabled()) {
printTables(output, 'deploy');
printTables(output, 'deploy', flags.concise);
}
return output;
}
Expand Down
15 changes: 14 additions & 1 deletion test/nuts/tracking/forceIgnore.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,26 @@ describe('forceignore changes', () => {
expect(pullOutput?.files.length).to.equal(0);
});

it('will not display ignored files with --concise', () => {
it('will not display retrieved ignored files with --concise', () => {
// gets file into source tracking
const output = execCmd<PreviewResult>('project:retrieve:preview --concise', {
ensureExitCode: 0,
}).shellOutput.stdout;
expect(output).to.not.include("These files won't retrieve because they're ignored by your .forceignore file.");
expect(output).to.not.include('ApexClass CreatedClass');
});

it('will not display deployed ignored files with --concise', async () => {
const newForceIgnore = originalForceIgnore + '\n' + `${classdir}/IgnoreTest.cls*`;
await fs.promises.writeFile(path.join(session.project.dir, '.forceignore'), newForceIgnore);

const output = execCmd<DeployResultJson>(`project:deploy:preview -d ${classdir} --concise`, {
ensureExitCode: 0,
}).shellOutput.stdout;
expect(output).to.include('Will Deploy [1] files.');
expect(output).to.include('ApexClass UnIgnoreTest');
expect(output).to.not.include("These files won't deploy because they're ignored by your .forceignore file.");
expect(output).to.not.include('ApexClass IgnoreTest');
});
});
});
Loading

0 comments on commit 6691844

Please sign in to comment.