@salesforce/source-tracking 1.1.0 → 1.1.3

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,6 +2,24 @@
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.3](https://github.com/forcedotcom/source-tracking/compare/v1.1.2...v1.1.3) (2022-03-07)
6
+
7
+ ### Bug Fixes
8
+
9
+ - revert beta/legacy mapping ([4d3380c](https://github.com/forcedotcom/source-tracking/commit/4d3380c74a72572a8c1e464c739c4d5b8af69442))
10
+
11
+ ### [1.1.2](https://github.com/forcedotcom/source-tracking/compare/v1.1.1...v1.1.2) (2022-03-02)
12
+
13
+ ### Bug Fixes
14
+
15
+ - more metadata polling exclusions based on telemetry ([ae5adf3](https://github.com/forcedotcom/source-tracking/commit/ae5adf34600676f54c0e5efa2f5e7c96e2fd10f6))
16
+
17
+ ### [1.1.1](https://github.com/forcedotcom/source-tracking/compare/v1.1.0...v1.1.1) (2022-02-23)
18
+
19
+ ### Bug Fixes
20
+
21
+ - message formatting for GA ([194ba4b](https://github.com/forcedotcom/source-tracking/commit/194ba4b4bd08a26e7f7c5c6ef28dc1fb20acc1de))
22
+
5
23
  ## [1.1.0](https://github.com/forcedotcom/source-tracking/compare/v1.0.2...v1.1.0) (2022-02-16)
6
24
 
7
25
  ### Features
@@ -53,10 +53,11 @@ const throwIfInvalid = ({ org, projectPath, toValidate, command, }) => {
53
53
  }
54
54
  // We expected it to be the toolbelt version but it is using the new tracking files
55
55
  if (toValidate === 'toolbelt') {
56
- throw new core_1.SfdxError(messages.getMessage('sourceTrackingFileVersionMismatch', ['new']), 'SourceTrackingFileVersionMismatch', [
57
- messages.getMessage('useOtherVersion', ['new', (0, exports.replaceRenamedCommands)(command)]),
58
- messages.getMessage('clearSuggestion', ['new', (0, exports.replaceRenamedCommands)('sfdx force:source:tracking:clear')]),
59
- ]);
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, true)])}.\n${messages.getMessage('clearSuggestion', [
58
+ 'new',
59
+ (0, exports.replaceRenamedCommands)('sfdx force:source:tracking:clear', true),
60
+ ])}.`, 'SourceTrackingFileVersionMismatch');
60
61
  }
61
62
  // We expected it to be the plugin-source version but it is using the old tracking files
62
63
  if (toValidate === 'plugin-source') {
@@ -436,27 +436,52 @@ class RemoteSourceTrackingService extends core_1.ConfigFile {
436
436
  // filter known Source tracking issues
437
437
  expectedMembers
438
438
  .filter((fileResponse) => {
439
- var _a, _b, _c, _d, _e;
439
+ var _a, _b, _c, _d, _e, _f, _g, _h;
440
440
  // unchanged files will never be in the sourceMembers. Not really sure why SDR returns them.
441
441
  return fileResponse.state !== source_deploy_retrieve_1.ComponentStatus.Unchanged &&
442
442
  // if a listView is the only change inside an object, the object won't have a sourceMember change. We won't wait for those to be found
443
443
  // we don't know which email folder type might be there, so don't require either
444
444
  // Portal doesn't support source tracking, according to the coverage report
445
- !['CustomObject', 'EmailFolder', 'EmailTemplateFolder', 'StandardValueSet', 'Portal'].includes(fileResponse.type) &&
445
+ ![
446
+ 'CustomObject',
447
+ 'EmailFolder',
448
+ 'EmailTemplateFolder',
449
+ 'StandardValueSet',
450
+ 'Portal',
451
+ 'StandardValueSetTranslation',
452
+ 'SharingRules',
453
+ 'SharingCriteriaRule',
454
+ 'GlobalValueSetTranslation',
455
+ 'AssignmentRules',
456
+ ].includes(fileResponse.type) &&
457
+ // don't wait for standard fields on standard objects
458
+ !(fileResponse.type === 'CustomField' && !((_a = fileResponse.filePath) === null || _a === void 0 ? void 0 : _a.includes('__c'))) &&
459
+ // they're settings to mdapi, and FooSettings in sourceMembers
460
+ !fileResponse.type.includes('Settings') &&
461
+ // mdapi encodes these, sourceMembers don't have encoding
462
+ !((fileResponse.type === 'Layout' || fileResponse.type === 'BusinessProcess') &&
463
+ ((_b = fileResponse.filePath) === null || _b === void 0 ? void 0 : _b.includes('%'))) &&
464
+ // namespaced labels and CMDT don't resolve correctly
465
+ !(['CustomLabels', 'CustomMetadata'].includes(fileResponse.type) && ((_c = fileResponse.filePath) === null || _c === void 0 ? void 0 : _c.includes('__'))) &&
446
466
  // don't wait on workflow children
447
467
  !fileResponse.type.startsWith('Workflow') &&
448
468
  // aura xml aren't tracked as SourceMembers
449
- !((_a = fileResponse.filePath) === null || _a === void 0 ? void 0 : _a.endsWith('.cmp-meta.xml')) &&
450
- !((_b = fileResponse.filePath) === null || _b === void 0 ? void 0 : _b.endsWith('.tokens-meta.xml')) &&
451
- !((_c = fileResponse.filePath) === null || _c === void 0 ? void 0 : _c.endsWith('.evt-meta.xml')) &&
452
- !((_d = fileResponse.filePath) === null || _d === void 0 ? void 0 : _d.endsWith('.app-meta.xml')) &&
453
- !((_e = fileResponse.filePath) === null || _e === void 0 ? void 0 : _e.endsWith('.intf-meta.xml'));
469
+ !((_d = fileResponse.filePath) === null || _d === void 0 ? void 0 : _d.endsWith('.cmp-meta.xml')) &&
470
+ !((_e = fileResponse.filePath) === null || _e === void 0 ? void 0 : _e.endsWith('.tokens-meta.xml')) &&
471
+ !((_f = fileResponse.filePath) === null || _f === void 0 ? void 0 : _f.endsWith('.evt-meta.xml')) &&
472
+ !((_g = fileResponse.filePath) === null || _g === void 0 ? void 0 : _g.endsWith('.app-meta.xml')) &&
473
+ !((_h = fileResponse.filePath) === null || _h === void 0 ? void 0 : _h.endsWith('.intf-meta.xml'));
454
474
  })
455
475
  .map((member) => {
456
476
  (0, metadataKeys_1.getMetadataKeyFromFileResponse)(member)
457
- // CustomObject could have been added by the key generator
458
477
  // remove some individual members known to not work with tracking even when their type does
459
- .filter((key) => !key.startsWith('CustomObject') && key !== 'Profile__Standard' && key !== 'CustomTab__standard-home')
478
+ .filter((key) =>
479
+ // CustomObject could have been re-added by the key generator from one of its fields
480
+ !key.startsWith('CustomObject') &&
481
+ key !== 'Profile__Standard' &&
482
+ key !== 'CustomTab__standard-home' &&
483
+ key !== 'AssignmentRules__Case' &&
484
+ key !== 'ListView__CollaborationGroup.All_ChatterGroups')
460
485
  .map((key) => outstandingSourceMembers.set(key, member));
461
486
  });
462
487
  return outstandingSourceMembers;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "sourceTrackingFileVersionMismatch": "This project uses the %s version of source tracking files.",
3
3
  "clearSuggestion": "Clear the %s version of the tracking files by running '%s'",
4
- "useOtherVersion": "Use the %s version of the command, '%s' to preserve the tracking files"
4
+ "useOtherVersion": "Use the %s version of the command, '%s' with your existing tracking files."
5
5
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/source-tracking",
3
3
  "description": "API for tracking local and remote Salesforce metadata changes",
4
- "version": "1.1.0",
4
+ "version": "1.1.3",
5
5
  "author": "Salesforce",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "lib/index.js",