@salesforce/source-testkit 1.2.0 → 1.2.1
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 +6 -0
- package/lib/assertions.js +4 -6
- package/lib/executionLog.js +1 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
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.2.1](https://github.com/salesforcecli/source-testkit/compare/v1.2.0...v1.2.1) (2022-06-18)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- remove autofetch queries that were set to 50k ([5854728](https://github.com/salesforcecli/source-testkit/commit/58547288360792b9ac2af11f4be4959c4828ede5))
|
|
10
|
+
|
|
5
11
|
## [1.2.0](https://github.com/salesforcecli/source-testkit/compare/v1.1.1...v1.2.0) (2022-06-08)
|
|
6
12
|
|
|
7
13
|
### Features
|
package/lib/assertions.js
CHANGED
|
@@ -16,6 +16,7 @@ const source_deploy_retrieve_1 = require("@salesforce/source-deploy-retrieve");
|
|
|
16
16
|
const debug_1 = require("debug");
|
|
17
17
|
const fileTracker_1 = require("./fileTracker");
|
|
18
18
|
(0, chai_1.use)(chaiEach);
|
|
19
|
+
const SOQL_QUERY_LIMIT = 50000;
|
|
19
20
|
/**
|
|
20
21
|
* Assertions is a class that is designed to encapsulate common assertions we want to
|
|
21
22
|
* make during NUT testings
|
|
@@ -336,10 +337,7 @@ class Assertions {
|
|
|
336
337
|
async retrieveSourceMembers(globs, ignore = []) {
|
|
337
338
|
var _a;
|
|
338
339
|
const query = 'SELECT Id,MemberName,MemberType,RevisionCounter FROM SourceMember';
|
|
339
|
-
const result = await ((_a = this.connection) === null || _a === void 0 ? void 0 : _a.tooling.query(query
|
|
340
|
-
autoFetch: true,
|
|
341
|
-
maxFetch: 50000,
|
|
342
|
-
}));
|
|
340
|
+
const result = await ((_a = this.connection) === null || _a === void 0 ? void 0 : _a.tooling.query(`${query} limit ${SOQL_QUERY_LIMIT}`));
|
|
343
341
|
const all = await this.doGlob(globs);
|
|
344
342
|
const ignoreFiles = await this.doGlob(ignore, false);
|
|
345
343
|
const toTrack = all.filter((file) => !ignoreFiles.includes(file));
|
|
@@ -367,13 +365,13 @@ class Assertions {
|
|
|
367
365
|
async retrieveApexTestResults() {
|
|
368
366
|
var _a;
|
|
369
367
|
const query = 'SELECT TestTimestamp, ApexClassId FROM ApexTestResult';
|
|
370
|
-
const result = await ((_a = this.connection) === null || _a === void 0 ? void 0 : _a.tooling.query(query
|
|
368
|
+
const result = await ((_a = this.connection) === null || _a === void 0 ? void 0 : _a.tooling.query(`${query} limit ${SOQL_QUERY_LIMIT}`));
|
|
371
369
|
return (result === null || result === void 0 ? void 0 : result.records) || [];
|
|
372
370
|
}
|
|
373
371
|
async retrieveApexClasses(classNames) {
|
|
374
372
|
var _a;
|
|
375
373
|
const query = 'SELECT Name,Id FROM ApexClass';
|
|
376
|
-
const result = await ((_a = this.connection) === null || _a === void 0 ? void 0 : _a.tooling.query(query
|
|
374
|
+
const result = await ((_a = this.connection) === null || _a === void 0 ? void 0 : _a.tooling.query(`${query} limit ${SOQL_QUERY_LIMIT}`));
|
|
377
375
|
const records = (result === null || result === void 0 ? void 0 : result.records) || [];
|
|
378
376
|
return classNames ? records.filter((r) => classNames.includes(r.Name)) : records;
|
|
379
377
|
}
|
package/lib/executionLog.js
CHANGED
|
@@ -51,10 +51,7 @@ class ExecutionLog {
|
|
|
51
51
|
async querySourceMembers() {
|
|
52
52
|
var _a;
|
|
53
53
|
const query = 'SELECT Id,MemberName,MemberType,RevisionCounter FROM SourceMember';
|
|
54
|
-
const result = await ((_a = this.context.connection) === null || _a === void 0 ? void 0 : _a.tooling.query(query
|
|
55
|
-
autoFetch: true,
|
|
56
|
-
maxFetch: 50000,
|
|
57
|
-
}));
|
|
54
|
+
const result = await ((_a = this.context.connection) === null || _a === void 0 ? void 0 : _a.tooling.query(`${query} limit 50000`));
|
|
58
55
|
return (result === null || result === void 0 ? void 0 : result.records) || [];
|
|
59
56
|
}
|
|
60
57
|
}
|
package/package.json
CHANGED