@salesforce/source-tracking 1.4.0 → 1.5.0

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.5.0](https://github.com/forcedotcom/source-tracking/compare/v1.4.2...v1.5.0) (2022-05-04)
6
+
7
+ ### Features
8
+
9
+ - polling optimizations ([e39afd4](https://github.com/forcedotcom/source-tracking/commit/e39afd409ffa321ac7cf91aab3f850dea5dcb45e))
10
+
11
+ ### Bug Fixes
12
+
13
+ - 2 more types ([c5554f1](https://github.com/forcedotcom/source-tracking/commit/c5554f18c21283c85589ab0ea1c9e632be1bbeaf))
14
+
15
+ ### [1.4.2](https://github.com/forcedotcom/source-tracking/compare/v1.4.1...v1.4.2) (2022-04-29)
16
+
17
+ ### Bug Fixes
18
+
19
+ - use absolute paths in ComponentSet for matching local source ([#153](https://github.com/forcedotcom/source-tracking/issues/153)) ([b5690a5](https://github.com/forcedotcom/source-tracking/commit/b5690a5c4f3a3fe02f733fa1578467e2278e62bf))
20
+
21
+ ### [1.4.1](https://github.com/forcedotcom/source-tracking/compare/v1.4.0...v1.4.1) (2022-04-28)
22
+
5
23
  ## [1.4.0](https://github.com/forcedotcom/source-tracking/compare/v1.3.1...v1.4.0) (2022-04-27)
6
24
 
7
25
  ### Features
@@ -125,6 +125,10 @@ export declare class RemoteSourceTrackingService extends ConfigFile<RemoteSource
125
125
  * @param pollingTimeout maximum amount of time in seconds to poll for SourceMembers
126
126
  */
127
127
  pollForSourceTracking(expectedMembers: RemoteSyncInput[]): Promise<void>;
128
+ /**
129
+ * Filter out known source tracking issues
130
+ * This prevents the polling from waiting on things that may never return
131
+ */
128
132
  private calculateExpectedSourceMembers;
129
133
  private calculateTimeout;
130
134
  private querySourceMembersFrom;
@@ -432,12 +432,17 @@ class RemoteSourceTrackingService extends core_1.ConfigFile {
432
432
  });
433
433
  }
434
434
  }
435
+ /**
436
+ * Filter out known source tracking issues
437
+ * This prevents the polling from waiting on things that may never return
438
+ */
435
439
  calculateExpectedSourceMembers(expectedMembers) {
436
440
  const outstandingSourceMembers = new Map();
437
- // filter known Source tracking issues
438
441
  expectedMembers
439
- .filter((fileResponse) => {
440
- var _a, _b, _c, _d, _e, _f, _g, _h;
442
+ .filter(
443
+ // eslint-disable-next-line complexity
444
+ (fileResponse) => {
445
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
441
446
  // unchanged files will never be in the sourceMembers. Not really sure why SDR returns them.
442
447
  return fileResponse.state !== source_deploy_retrieve_1.ComponentStatus.Unchanged &&
443
448
  // 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
@@ -457,21 +462,29 @@ class RemoteSourceTrackingService extends core_1.ConfigFile {
457
462
  ].includes(fileResponse.type) &&
458
463
  // don't wait for standard fields on standard objects
459
464
  !(fileResponse.type === 'CustomField' && !((_a = fileResponse.filePath) === null || _a === void 0 ? void 0 : _a.includes('__c'))) &&
465
+ // deleted fields
466
+ !(fileResponse.type === 'CustomField' && !((_b = fileResponse.filePath) === null || _b === void 0 ? void 0 : _b.includes('_del__c'))) &&
467
+ // built-in report type ReportType__screen_flows_prebuilt_crt
468
+ !(fileResponse.type === 'ReportType' && ((_c = fileResponse.filePath) === null || _c === void 0 ? void 0 : _c.includes('screen_flows_prebuilt_crt'))) &&
460
469
  // they're settings to mdapi, and FooSettings in sourceMembers
461
470
  !fileResponse.type.includes('Settings') &&
462
471
  // mdapi encodes these, sourceMembers don't have encoding
463
- !((fileResponse.type === 'Layout' || fileResponse.type === 'BusinessProcess') &&
464
- ((_b = fileResponse.filePath) === null || _b === void 0 ? void 0 : _b.includes('%'))) &&
472
+ !((fileResponse.type === 'Layout' ||
473
+ fileResponse.type === 'BusinessProcess' ||
474
+ fileResponse.type === 'Profile' ||
475
+ fileResponse.type === 'HomePageComponent' ||
476
+ fileResponse.type === 'HomePageLayout') &&
477
+ ((_d = fileResponse.filePath) === null || _d === void 0 ? void 0 : _d.includes('%'))) &&
465
478
  // namespaced labels and CMDT don't resolve correctly
466
- !(['CustomLabels', 'CustomMetadata'].includes(fileResponse.type) && ((_c = fileResponse.filePath) === null || _c === void 0 ? void 0 : _c.includes('__'))) &&
479
+ !(['CustomLabels', 'CustomMetadata'].includes(fileResponse.type) && ((_e = fileResponse.filePath) === null || _e === void 0 ? void 0 : _e.includes('__'))) &&
467
480
  // don't wait on workflow children
468
481
  !fileResponse.type.startsWith('Workflow') &&
469
482
  // aura xml aren't tracked as SourceMembers
470
- !((_d = fileResponse.filePath) === null || _d === void 0 ? void 0 : _d.endsWith('.cmp-meta.xml')) &&
471
- !((_e = fileResponse.filePath) === null || _e === void 0 ? void 0 : _e.endsWith('.tokens-meta.xml')) &&
472
- !((_f = fileResponse.filePath) === null || _f === void 0 ? void 0 : _f.endsWith('.evt-meta.xml')) &&
473
- !((_g = fileResponse.filePath) === null || _g === void 0 ? void 0 : _g.endsWith('.app-meta.xml')) &&
474
- !((_h = fileResponse.filePath) === null || _h === void 0 ? void 0 : _h.endsWith('.intf-meta.xml'));
483
+ !((_f = fileResponse.filePath) === null || _f === void 0 ? void 0 : _f.endsWith('.cmp-meta.xml')) &&
484
+ !((_g = fileResponse.filePath) === null || _g === void 0 ? void 0 : _g.endsWith('.tokens-meta.xml')) &&
485
+ !((_h = fileResponse.filePath) === null || _h === void 0 ? void 0 : _h.endsWith('.evt-meta.xml')) &&
486
+ !((_j = fileResponse.filePath) === null || _j === void 0 ? void 0 : _j.endsWith('.app-meta.xml')) &&
487
+ !((_k = fileResponse.filePath) === null || _k === void 0 ? void 0 : _k.endsWith('.intf-meta.xml'));
475
488
  })
476
489
  .map((member) => {
477
490
  (0, metadataKeys_1.getMetadataKeyFromFileResponse)(member)
@@ -230,7 +230,7 @@ class SourceTracking extends kit_1.AsyncCreatable {
230
230
  fullName: element === null || element === void 0 ? void 0 : element.name,
231
231
  })));
232
232
  const matchingLocalSourceComponentsSet = source_deploy_retrieve_1.ComponentSet.fromSource({
233
- fsPaths: this.packagesDirs.map((dir) => dir.path),
233
+ fsPaths: this.packagesDirs.map((dir) => (0, path_1.resolve)(dir.fullPath)),
234
234
  include: remoteChangesAsComponentSet,
235
235
  });
236
236
  if (options.format === 'string') {
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.4.0",
4
+ "version": "1.5.0",
5
5
  "author": "Salesforce",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "lib/index.js",
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@salesforce/core": "^2.33.1",
47
47
  "@salesforce/kit": "^1.5.17",
48
- "@salesforce/source-deploy-retrieve": "^5.9.4",
48
+ "@salesforce/source-deploy-retrieve": "^5.12.12",
49
49
  "graceful-fs": "^4.2.9",
50
50
  "isomorphic-git": "1.17.0",
51
51
  "ts-retry-promise": "^0.6.0"