From 7d644f215d7c0bcfe413d1fcfafc10122b17a412 Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Wed, 31 Jul 2024 14:20:20 -0600 Subject: [PATCH] fix: use jsforce's `cancelDeploy` method (#1380) * fix: use jsforce's cancelDeploy method * chore: update yarn.lock * chore: bump jsforce/sfdx-core --------- Co-authored-by: Cristian Dominguez --- package.json | 4 ++-- src/client/metadataApiDeploy.ts | 4 +--- yarn.lock | 18 +++++++++--------- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 1fa9c4b95..daf700428 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "node": ">=18.0.0" }, "dependencies": { - "@salesforce/core": "^8.2.7", + "@salesforce/core": "^8.2.8", "@salesforce/kit": "^3.1.6", "@salesforce/ts-types": "^2.0.12", "fast-levenshtein": "^3.0.0", @@ -39,7 +39,7 @@ "proxy-agent": "^6.4.0" }, "devDependencies": { - "@jsforce/jsforce-node": "^3.3.3", + "@jsforce/jsforce-node": "^3.4.0", "@salesforce/cli-plugins-testkit": "^5.3.20", "@salesforce/dev-scripts": "^10.2.8", "@types/deep-equal-in-any-order": "^1.0.1", diff --git a/src/client/metadataApiDeploy.ts b/src/client/metadataApiDeploy.ts index 669827215..51dc67563 100644 --- a/src/client/metadataApiDeploy.ts +++ b/src/client/metadataApiDeploy.ts @@ -165,9 +165,7 @@ export class MetadataApiDeploy extends MetadataTransfer< const connection = await this.getConnection(); - // jsforce has an on this - // eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access,no-underscore-dangle - await connection.metadata._invoke('cancelDeploy', { id: this.id }); + await connection.metadata.cancelDeploy(this.id); } protected async pre(): Promise { diff --git a/yarn.lock b/yarn.lock index a4cee7f95..280373d5f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -502,10 +502,10 @@ "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" -"@jsforce/jsforce-node@^3.3.2", "@jsforce/jsforce-node@^3.3.3": - version "3.3.3" - resolved "https://registry.yarnpkg.com/@jsforce/jsforce-node/-/jsforce-node-3.3.3.tgz#cef75219f467233b8e0c537e2026bd5860dc6fcb" - integrity sha512-oIheBN4vB9xvSaAjJXi1lcXe3KLShZKGITebD6X5ssoGZ+FPqoaXbI1I2yVWeWg8aWHh8VqhFRdz3duc7Rq8/w== +"@jsforce/jsforce-node@^3.4.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@jsforce/jsforce-node/-/jsforce-node-3.4.0.tgz#d7e4ee0895b4258c5b82fce0489a4569efa70a7b" + integrity sha512-2PZh7s0KQM8C5+lLuuBXpjYqWpgux9LKy5OfH4EzMmr6D+Yg7wQftSmIG1SiD1jyapOj66TmD7yn3n3tWGbAag== dependencies: "@sindresorhus/is" "^4" abort-controller "^3.0.0" @@ -562,12 +562,12 @@ strip-ansi "6.0.1" ts-retry-promise "^0.8.1" -"@salesforce/core@^8.2.3", "@salesforce/core@^8.2.7": - version "8.2.7" - resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-8.2.7.tgz#ea9f7c5b4255ed71c4ae68dd1eb6e495a8476c5a" - integrity sha512-vrD2ArIaYS+6XNbW/FekgdwzhD3Pe5IpUwe2vtLKjw2QIWMD/4zkGuPGd8QIgw5VHbEZeXQSKPSVhD41+VJHRg== +"@salesforce/core@^8.2.3", "@salesforce/core@^8.2.8": + version "8.2.8" + resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-8.2.8.tgz#1e93ddd8b9f348f1e20547de4cdff30062520fd9" + integrity sha512-Fyy1TG9cUtQV+YAjyYCHerZ0K/t9fuB6dU9HrXFvcjMKorMS5JaI1wkZh8w1+zfvu6GY/MOzeqVZCq2W+9ShLA== dependencies: - "@jsforce/jsforce-node" "^3.3.2" + "@jsforce/jsforce-node" "^3.4.0" "@salesforce/kit" "^3.1.6" "@salesforce/schemas" "^1.9.0" "@salesforce/ts-types" "^2.0.10"