@salesforce/source-testkit 1.1.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 CHANGED
@@ -2,6 +2,25 @@
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
+
11
+ ## [1.2.0](https://github.com/salesforcecli/source-testkit/compare/v1.1.1...v1.2.0) (2022-06-08)
12
+
13
+ ### Features
14
+
15
+ - bump core and regular testkit ([59701f8](https://github.com/salesforcecli/source-testkit/commit/59701f8da94028bc39fb34fc0ae2b0b32d582bef))
16
+
17
+ ### [1.1.1](https://github.com/salesforcecli/source-testkit/compare/v1.1.0...v1.1.1) (2022-06-06)
18
+
19
+ ### Bug Fixes
20
+
21
+ - don't clear StateAggregator ([c6cdc17](https://github.com/salesforcecli/source-testkit/commit/c6cdc171bdb8c53e9c5920b8dcb92952db6a2f9c))
22
+ - testkit with no StateAgg clearing ([63b5c0f](https://github.com/salesforcecli/source-testkit/commit/63b5c0fe31caaa0ff576fab2d49cb3de024a6c69))
23
+
5
24
  ## [1.1.0](https://github.com/salesforcecli/source-testkit/compare/v1.0.2...v1.1.0) (2022-06-06)
6
25
 
7
26
  ### 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, { autoFetch: true, maxFetch: 50000 }));
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, { autoFetch: true, maxFetch: 50000 }));
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
  }
@@ -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/lib/testkit.js CHANGED
@@ -473,11 +473,9 @@ class SourceTestkit extends kit_1.AsyncCreatable {
473
473
  async createConnection() {
474
474
  if (this.orgless)
475
475
  return;
476
- core_1.StateAggregator.clearInstance();
477
476
  const conn = await core_1.Connection.create({
478
477
  authInfo: await core_1.AuthInfo.create({ username: this.username }),
479
478
  });
480
- core_1.StateAggregator.clearInstance();
481
479
  return conn;
482
480
  }
483
481
  async doGlob(globs) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/source-testkit",
3
3
  "description": "testkit for running NUTs for source related commands",
4
- "version": "1.1.0",
4
+ "version": "1.2.1",
5
5
  "author": "Salesforce",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "lib/index.js",
@@ -30,8 +30,8 @@
30
30
  "!lib/**/*.map"
31
31
  ],
32
32
  "dependencies": {
33
- "@salesforce/cli-plugins-testkit": "^2.1.3",
34
- "@salesforce/core": "^3.19.4",
33
+ "@salesforce/cli-plugins-testkit": "^2.2.0",
34
+ "@salesforce/core": "^3.20.1",
35
35
  "@salesforce/kit": "^1.5.42",
36
36
  "@salesforce/source-deploy-retrieve": "^6.0.2",
37
37
  "@salesforce/ts-types": "^1.5.20",