@salesforce/source-tracking 1.1.3 → 1.1.6
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 +10 -0
- package/lib/compatibility.js +6 -6
- package/lib/shared/localShadowRepo.js +4 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
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.6](https://github.com/forcedotcom/source-tracking/compare/v1.1.5...v1.1.6) (2022-03-14)
|
|
6
|
+
|
|
7
|
+
### [1.1.5](https://github.com/forcedotcom/source-tracking/compare/v1.1.4...v1.1.5) (2022-03-11)
|
|
8
|
+
|
|
9
|
+
### [1.1.4](https://github.com/forcedotcom/source-tracking/compare/v1.1.3...v1.1.4) (2022-03-07)
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
- clearer messaging and legacy accommodation ([9f14e0f](https://github.com/forcedotcom/source-tracking/commit/9f14e0f02c9df69018b396148b8b4c49c161bf4d))
|
|
14
|
+
|
|
5
15
|
### [1.1.3](https://github.com/forcedotcom/source-tracking/compare/v1.1.2...v1.1.3) (2022-03-07)
|
|
6
16
|
|
|
7
17
|
### Bug Fixes
|
package/lib/compatibility.js
CHANGED
|
@@ -54,16 +54,16 @@ const throwIfInvalid = ({ org, projectPath, toValidate, command, }) => {
|
|
|
54
54
|
// We expected it to be the toolbelt version but it is using the new tracking files
|
|
55
55
|
if (toValidate === 'toolbelt') {
|
|
56
56
|
// some of the toolbelt commands aren't using SfdxCommand and the SfdxError actions won't be automatically displayed
|
|
57
|
-
throw new core_1.SfdxError(`${messages.getMessage('sourceTrackingFileVersionMismatch', ['new'])}\n\nTry this:\n${messages.getMessage('useOtherVersion', ['new', (0, exports.replaceRenamedCommands)(command,
|
|
58
|
-
'new',
|
|
59
|
-
(0, exports.replaceRenamedCommands)('sfdx force:source:tracking:clear'
|
|
57
|
+
throw new core_1.SfdxError(`${messages.getMessage('sourceTrackingFileVersionMismatch', ['new/beta'])}\n\nTry this:\n${messages.getMessage('useOtherVersion', ['new/beta', (0, exports.replaceRenamedCommands)(command.replace(':legacy', ''))])}.\n${messages.getMessage('clearSuggestion', [
|
|
58
|
+
'new/beta',
|
|
59
|
+
(0, exports.replaceRenamedCommands)('sfdx force:source:tracking:clear'),
|
|
60
60
|
])}.`, 'SourceTrackingFileVersionMismatch');
|
|
61
61
|
}
|
|
62
62
|
// We expected it to be the plugin-source version but it is using the old tracking files
|
|
63
63
|
if (toValidate === 'plugin-source') {
|
|
64
|
-
throw new core_1.SfdxError(messages.getMessage('sourceTrackingFileVersionMismatch', ['old']), 'SourceTrackingFileVersionMismatch', [
|
|
65
|
-
messages.getMessage('useOtherVersion', ['old', (0, exports.replaceRenamedCommands)(command, true)]),
|
|
66
|
-
messages.getMessage('clearSuggestion', ['old', 'sfdx force:source:tracking:clear']),
|
|
64
|
+
throw new core_1.SfdxError(messages.getMessage('sourceTrackingFileVersionMismatch', ['old/legacy']), 'SourceTrackingFileVersionMismatch', [
|
|
65
|
+
messages.getMessage('useOtherVersion', ['old/legacy', (0, exports.replaceRenamedCommands)(command, true)]),
|
|
66
|
+
messages.getMessage('clearSuggestion', ['old/legacy', 'sfdx force:source:tracking:clear']),
|
|
67
67
|
]);
|
|
68
68
|
}
|
|
69
69
|
};
|
|
@@ -187,11 +187,13 @@ class ShadowRepo {
|
|
|
187
187
|
deployedFiles = deployedFiles.map((filepath) => path.normalize(filepath).split(path.sep).join(path.posix.sep));
|
|
188
188
|
deletedFiles = deletedFiles.map((filepath) => path.normalize(filepath).split(path.sep).join(path.posix.sep));
|
|
189
189
|
}
|
|
190
|
+
const uniqueDeployedFiles = Array.from(new Set(deployedFiles));
|
|
191
|
+
const uniqueDeletedFiles = Array.from(new Set(deletedFiles));
|
|
190
192
|
try {
|
|
191
193
|
// stage changes
|
|
192
194
|
await Promise.all([
|
|
193
|
-
...
|
|
194
|
-
...
|
|
195
|
+
...uniqueDeployedFiles.map((filepath) => git.add({ fs: core_1.fs, dir: this.projectPath, gitdir: this.gitDir, filepath })),
|
|
196
|
+
...uniqueDeletedFiles.map((filepath) => git.remove({ fs: core_1.fs, dir: this.projectPath, gitdir: this.gitDir, filepath })),
|
|
195
197
|
]);
|
|
196
198
|
const sha = await git.commit({
|
|
197
199
|
fs: core_1.fs,
|
package/package.json
CHANGED