@salesforce/core 3.31.19 → 3.32.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.
@@ -177,7 +177,7 @@ class Connection extends jsforce_1.Connection {
177
177
  */
178
178
  async deployRecentValidation(options) {
179
179
  // REST returns an object with an id property, SOAP returns the id as a string directly. That is now handled
180
- // in jsforce, so we have to cast a string as unkown as JsonCollection to support backwards compatibility.
180
+ // in jsforce, so we have to cast a string as unknown as JsonCollection to support backwards compatibility.
181
181
  return (await this.metadata.deployRecentValidation(options));
182
182
  }
183
183
  /**
package/lib/org/org.d.ts CHANGED
@@ -357,8 +357,12 @@ export declare class Org extends AsyncOptionalCreatable<Org.Options> {
357
357
  getFields(keys: Org.Fields[]): JsonMap;
358
358
  /**
359
359
  * Returns the JSForce connection for the org.
360
+ * side effect: If you pass it an apiVersion, it will set it on the Org
361
+ * so that future calls to getConnection() will also use that version.
362
+ *
363
+ * @param apiVersion The API version to use for the connection.
360
364
  */
361
- getConnection(): Connection;
365
+ getConnection(apiVersion?: string): Connection;
362
366
  supportsSourceTracking(): Promise<boolean>;
363
367
  /**
364
368
  * query SandboxProcess via sandbox name
package/lib/org/org.js CHANGED
@@ -686,8 +686,20 @@ class Org extends kit_1.AsyncOptionalCreatable {
686
686
  }
687
687
  /**
688
688
  * Returns the JSForce connection for the org.
689
+ * side effect: If you pass it an apiVersion, it will set it on the Org
690
+ * so that future calls to getConnection() will also use that version.
691
+ *
692
+ * @param apiVersion The API version to use for the connection.
689
693
  */
690
- getConnection() {
694
+ getConnection(apiVersion) {
695
+ if (apiVersion) {
696
+ if (this.connection.getApiVersion() === apiVersion) {
697
+ this.logger.warn(`Default API version is already ${apiVersion}`);
698
+ }
699
+ else {
700
+ this.connection.setApiVersion(apiVersion);
701
+ }
702
+ }
691
703
  return this.connection;
692
704
  }
693
705
  async supportsSourceTracking() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/core",
3
- "version": "3.31.19",
3
+ "version": "3.32.1",
4
4
  "description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
5
5
  "main": "lib/exported",
6
6
  "types": "lib/exported.d.ts",
@@ -35,7 +35,7 @@
35
35
  ],
36
36
  "dependencies": {
37
37
  "@salesforce/bunyan": "^2.0.0",
38
- "@salesforce/kit": "^1.7.0",
38
+ "@salesforce/kit": "^1.8.0",
39
39
  "@salesforce/schemas": "^1.1.0",
40
40
  "@salesforce/ts-types": "^1.5.21",
41
41
  "@types/graceful-fs": "^4.1.5",
@@ -62,7 +62,7 @@
62
62
  "@types/debug": "0.0.31",
63
63
  "@types/jsen": "0.0.21",
64
64
  "@types/jsonwebtoken": "8.5.9",
65
- "@types/lodash": "^4.14.186",
65
+ "@types/lodash": "^4.14.189",
66
66
  "@types/shelljs": "0.8.11",
67
67
  "@typescript-eslint/eslint-plugin": "^5.41.0",
68
68
  "@typescript-eslint/parser": "^5.41.0",