From 5bb657087cf10f8dd70569b6bc1954623abecd9a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Nov 2023 01:50:30 +0000 Subject: [PATCH 1/8] chore(dev-deps): bump @salesforce/plugin-source from 2.10.46 to 2.11.0 Bumps [@salesforce/plugin-source](https://github.com/salesforcecli/plugin-source) from 2.10.46 to 2.11.0. - [Release notes](https://github.com/salesforcecli/plugin-source/releases) - [Changelog](https://github.com/salesforcecli/plugin-source/blob/main/CHANGELOG.md) - [Commits](https://github.com/salesforcecli/plugin-source/compare/2.10.46...2.11.0) --- updated-dependencies: - dependency-name: "@salesforce/plugin-source" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 2fb4767f..62074672 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "@salesforce/cli-plugins-testkit": "^5.0.2", "@salesforce/dev-scripts": "^6.0.3", "@salesforce/plugin-command-reference": "^3.0.46", - "@salesforce/plugin-source": "^2.10.46", + "@salesforce/plugin-source": "^2.11.0", "@salesforce/source-testkit": "^2.1.62", "@salesforce/ts-sinon": "1.4.15", "@salesforce/ts-types": "^2.0.8", diff --git a/yarn.lock b/yarn.lock index 44453a42..34ff461d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1053,18 +1053,18 @@ handlebars "^4.7.8" tslib "^2" -"@salesforce/plugin-source@^2.10.46": - version "2.10.46" - resolved "https://registry.yarnpkg.com/@salesforce/plugin-source/-/plugin-source-2.10.46.tgz#6f3d28776e2bf642b4c54faa603769c3b9d40072" - integrity sha512-qo6HH32aJ6spXNAwEqIhla32fPB2tEZyII8rauPpSidetREnUMZztC7x3XOYEWlvMxm6PqXkOorN1MhPTgys1A== +"@salesforce/plugin-source@^2.11.0": + version "2.11.0" + resolved "https://registry.yarnpkg.com/@salesforce/plugin-source/-/plugin-source-2.11.0.tgz#078d1f66378f1e73fafc34da005c44745adcbdac" + integrity sha512-sT0Tj1V0U7xqZ90OfS4jmigv8yLgPuTq5yYAGKnKhqYgsZ0afmR9Z6GBn2j439peaV+KElNjUEg1nLro3fWQpA== dependencies: "@oclif/core" "^2.15.0" "@salesforce/apex-node" "^2.1.0" - "@salesforce/core" "^5.3.10" - "@salesforce/kit" "^3.0.14" + "@salesforce/core" "^5.3.18" + "@salesforce/kit" "^3.0.15" "@salesforce/sf-plugins-core" "^3.1.25" - "@salesforce/source-deploy-retrieve" "^9.7.28" - "@salesforce/source-tracking" "^4.2.17" + "@salesforce/source-deploy-retrieve" "^9.8.4" + "@salesforce/source-tracking" "^4.3.0" chalk "^4.1.2" got "^11.8.6" proxy-agent "^6.3.1" @@ -1092,7 +1092,7 @@ chalk "^4" inquirer "^8.2.5" -"@salesforce/source-deploy-retrieve@^9.7.28", "@salesforce/source-deploy-retrieve@^9.8.3", "@salesforce/source-deploy-retrieve@^9.8.4": +"@salesforce/source-deploy-retrieve@^9.8.3", "@salesforce/source-deploy-retrieve@^9.8.4": version "9.8.4" resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-9.8.4.tgz#e6d21d8f2e0b44fae242e31ef8b4f31991a07deb" integrity sha512-/g/WkUFCogCANnKkeHmQyXpAbIy+A2htEYliVaoxg3UccDqHCZd5Gmlk6Gwsd03YsLAt249bay5mAokD7y39sQ== @@ -1126,7 +1126,7 @@ shelljs "^0.8.4" sinon "^10.0.0" -"@salesforce/source-tracking@^4.2.17", "@salesforce/source-tracking@^4.3.0": +"@salesforce/source-tracking@^4.3.0": version "4.3.0" resolved "https://registry.yarnpkg.com/@salesforce/source-tracking/-/source-tracking-4.3.0.tgz#dc281b260d28f831042475468aa0b0350d7328a7" integrity sha512-1ysyxU7lLi2pQNgEQbLpfSciLhsYrYwVu+VEq+tCXzm0TfmyscT1a1vcyykOzztpWMtKNQW/HdJEaAPBPd9FVg== From 4a25bb73c56f037c8895af9c049c96e9b46ac4e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Nov 2023 01:50:44 +0000 Subject: [PATCH 2/8] chore(dev-deps): bump @oclif/plugin-command-snapshot Bumps [@oclif/plugin-command-snapshot](https://github.com/oclif/plugin-command-snapshot) from 4.0.12 to 4.0.16. - [Release notes](https://github.com/oclif/plugin-command-snapshot/releases) - [Changelog](https://github.com/oclif/plugin-command-snapshot/blob/main/CHANGELOG.md) - [Commits](https://github.com/oclif/plugin-command-snapshot/compare/4.0.12...4.0.16) --- updated-dependencies: - dependency-name: "@oclif/plugin-command-snapshot" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 119 ++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 91 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index 2fb4767f..5c09e81a 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "tslib": "^2" }, "devDependencies": { - "@oclif/plugin-command-snapshot": "^4.0.12", + "@oclif/plugin-command-snapshot": "^4.0.16", "@salesforce/cli-plugins-testkit": "^5.0.2", "@salesforce/dev-scripts": "^6.0.3", "@salesforce/plugin-command-reference": "^3.0.46", diff --git a/yarn.lock b/yarn.lock index 44453a42..c4223825 100644 --- a/yarn.lock +++ b/yarn.lock @@ -746,7 +746,7 @@ read-package-json-fast "^3.0.0" which "^3.0.0" -"@oclif/core@^2.11.10", "@oclif/core@^2.11.4", "@oclif/core@^2.11.8", "@oclif/core@^2.15.0": +"@oclif/core@^2.11.10", "@oclif/core@^2.11.4", "@oclif/core@^2.15.0": version "2.15.0" resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.15.0.tgz#f27797b30a77d13279fba88c1698fc34a0bd0d2a" integrity sha512-fNEMG5DzJHhYmI3MgpByTvltBOMyFcnRIUMxbiz2ai8rhaYgaTHMG3Q38HcosfIvtw9nCjxpcQtC8MN8QtVCcA== @@ -780,18 +780,52 @@ wordwrap "^1.0.0" wrap-ansi "^7.0.0" -"@oclif/plugin-command-snapshot@^4.0.12": - version "4.0.12" - resolved "https://registry.yarnpkg.com/@oclif/plugin-command-snapshot/-/plugin-command-snapshot-4.0.12.tgz#b9caad06005f6f7c660498e527d1c9907ebf4aae" - integrity sha512-QzBUGoxrt/KyO5rp/z3bbWObGF+8QBenEhs5MLrSHK5ujOCfOdahFuCvdkFzv0q7vI5VPRma8vFVkp02C5GOXA== +"@oclif/core@^3.5.0": + version "3.10.8" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-3.10.8.tgz#8a855841107576b88a2ebe2e20e6e0d7ee885713" + integrity sha512-DRiEiXUvijq/1dXL80/sFGdhTjejFiUzxURW7N310TEKlONujas66KhLATfF/nG3mICqTCU0f9B+VNfLtZoGqw== dependencies: - "@oclif/core" "^2.11.8" + ansi-escapes "^4.3.2" + ansi-styles "^4.3.0" + cardinal "^2.1.1" chalk "^4.1.2" + clean-stack "^3.0.1" + cli-progress "^3.12.0" + debug "^4.3.4" + ejs "^3.1.9" + get-package-type "^0.1.0" + globby "^11.1.0" + hyperlinker "^1.0.0" + indent-string "^4.0.0" + is-wsl "^2.2.0" + js-yaml "^3.14.1" + natural-orderby "^2.0.3" + object-treeify "^1.1.33" + password-prompt "^1.1.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + supports-color "^8.1.1" + supports-hyperlinks "^2.2.0" + tsconfck "^3.0.0" + widest-line "^3.1.0" + wordwrap "^1.0.0" + wrap-ansi "^7.0.0" + +"@oclif/plugin-command-snapshot@^4.0.16": + version "4.0.16" + resolved "https://registry.yarnpkg.com/@oclif/plugin-command-snapshot/-/plugin-command-snapshot-4.0.16.tgz#50ab214246088d16c86af7ae81b3c5084478571e" + integrity sha512-J4q2e7l7jNxzuS4qvmLPALoFftsRXczE54I2qnFpSp7YC9RyS9cUcBdoXklOsX2yZckj234o5gmGdkAmBAAqHA== + dependencies: + "@oclif/core" "^3.5.0" + "@types/lodash.difference" "^4.5.8" + chalk "^5.3.0" just-diff "^5.2.0" - lodash "^4.17.21" + lodash.difference "^4.5.0" + lodash.get "^4.4.2" + lodash.sortby "^4.7.0" semver "^7.5.4" - ts-json-schema-generator "^1.2.0" - tslib "^2.6.1" + ts-json-schema-generator "^1.4.0" "@oclif/plugin-help@^5.2.14": version "5.2.19" @@ -1444,7 +1478,7 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/json-schema@^7.0.11", "@types/json-schema@^7.0.12", "@types/json-schema@^7.0.9": +"@types/json-schema@^7.0.12", "@types/json-schema@^7.0.9": version "7.0.14" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.14.tgz#74a97a5573980802f32c8e47b663530ab3b6b7d1" integrity sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw== @@ -1461,6 +1495,18 @@ dependencies: "@types/node" "*" +"@types/lodash.difference@^4.5.8": + version "4.5.9" + resolved "https://registry.yarnpkg.com/@types/lodash.difference/-/lodash.difference-4.5.9.tgz#69e82a68557779abac489585f43159997cab874c" + integrity sha512-MNlajcjtwzLpXk+cw38UkBvEXJNEPhULgS8A4EHwtUwT7f7yFH/SFKD0iw5Rfilwh60yJIgFo0vsMr7xsa5+aw== + dependencies: + "@types/lodash" "*" + +"@types/lodash@*": + version "4.14.201" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.201.tgz#76f47cb63124e806824b6c18463daf3e1d480239" + integrity sha512-y9euML0cim1JrykNxADLfaG0FgD1g/yTHwUs/Jg9ZIU7WKj2/4IW9Lbb1WZbvck78W/lfGXFfe+u2EGfIJXdLQ== + "@types/minimatch@*": version "5.1.2" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" @@ -2438,6 +2484,11 @@ chalk@^4, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + change-case@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/change-case/-/change-case-4.1.2.tgz#fedfc5f136045e2398c0410ee441f95704641e12" @@ -2669,16 +2720,16 @@ commander@7.1.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.1.0.tgz#f2eaecf131f10e36e07d894698226e36ae0eb5ff" integrity sha512-pRxBna3MJe6HKnBGsDyMv8ETbptw3axEdYHoqNh7gu5oDcew8fs0xnivZGm06Ogk8zGAJ9VX+OPEr2GXEQK4dg== +commander@^11.0.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-11.1.0.tgz#62fdce76006a68e5c1ab3314dc92e800eb83d906" + integrity sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ== + commander@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== -commander@^9.4.1: - version "9.5.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" - integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== - comment-parser@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.4.0.tgz#0f8c560f59698193854f12884c20c0e39a26d32c" @@ -3117,7 +3168,7 @@ ecdsa-sig-formatter@1.0.11: dependencies: safe-buffer "^5.0.1" -ejs@^3.1.8: +ejs@^3.1.8, ejs@^3.1.9: version "3.1.9" resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.9.tgz#03c9e8777fe12686a9effcef22303ca3d8eeb361" integrity sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ== @@ -4989,7 +5040,7 @@ json5@^1.0.2: dependencies: minimist "^1.2.0" -json5@^2.2.1, json5@^2.2.2: +json5@^2.2.2, json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -5231,6 +5282,11 @@ lodash.snakecase@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" integrity sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw== +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== + lodash.startcase@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.startcase/-/lodash.startcase-4.4.0.tgz#9436e34ed26093ed7ffae1936144350915d9add8" @@ -7140,7 +7196,7 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" -safe-stable-stringify@^2.3.1, safe-stable-stringify@^2.4.1: +safe-stable-stringify@^2.3.1, safe-stable-stringify@^2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz#138c84b6f6edb3db5f8ef3ef7115b8f55ccbf886" integrity sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g== @@ -7843,18 +7899,18 @@ ts-api-utils@^1.0.1: resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== -ts-json-schema-generator@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/ts-json-schema-generator/-/ts-json-schema-generator-1.2.0.tgz#5ccce26c7475ff60a034885bff6bd38e574fb073" - integrity sha512-tUMeO3ZvA12d3HHh7T/AK8W5hmUhDRNtqWRHSMN3ZRbUFt+UmV0oX8k1RK4SA+a+BKNHpmW2v06MS49e8Fi3Yg== +ts-json-schema-generator@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ts-json-schema-generator/-/ts-json-schema-generator-1.4.0.tgz#f341b36792c372d3d09245414a4f3a6efa2697f8" + integrity sha512-wm8vyihmGgYpxrqRshmYkWGNwEk+sf3xV2rUgxv8Ryeh7bSpMO7pZQOht+2rS002eDkFTxR7EwRPXVzrS0WJTg== dependencies: - "@types/json-schema" "^7.0.11" - commander "^9.4.1" + "@types/json-schema" "^7.0.12" + commander "^11.0.0" glob "^8.0.3" - json5 "^2.2.1" + json5 "^2.2.3" normalize-path "^3.0.0" - safe-stable-stringify "^2.4.1" - typescript "~4.9.3" + safe-stable-stringify "^2.4.3" + typescript "~5.2.2" ts-node@^10.8.1, ts-node@^10.9.1: version "10.9.1" @@ -7880,6 +7936,11 @@ ts-retry-promise@^0.7.0, ts-retry-promise@^0.7.1: resolved "https://registry.yarnpkg.com/ts-retry-promise/-/ts-retry-promise-0.7.1.tgz#176d6eee6415f07b6c7c286d3657355e284a6906" integrity sha512-NhHOCZ2AQORvH42hOPO5UZxShlcuiRtm7P2jIq2L2RY3PBxw2mLnUsEdHrIslVBFya1v5aZmrR55lWkzo13LrQ== +tsconfck@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/tsconfck/-/tsconfck-3.0.0.tgz#b469f1ced12973bbec3209a55ed8de3bb04223c9" + integrity sha512-w3wnsIrJNi7avf4Zb0VjOoodoO0woEqGgZGQm+LHH9przdUI+XDKsWAXwxHA1DaRTjeuZNcregSzr7RaA8zG9A== + tsconfig-paths@^3.14.2: version "3.14.2" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" @@ -8021,12 +8082,12 @@ typedoc@0.23.16: minimatch "^5.1.0" shiki "^0.11.1" -"typescript@^4.6.4 || ^5.0.0", typescript@^5.2.2: +"typescript@^4.6.4 || ^5.0.0", typescript@^5.2.2, typescript@~5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== -typescript@^4.9.5, typescript@~4.9.3: +typescript@^4.9.5: version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== From 20057b35c47b02132164f885830b16abc17f0350 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Nov 2023 05:44:50 +0000 Subject: [PATCH 3/8] chore(dev-deps): bump @salesforce/ts-sinon from 1.4.15 to 1.4.19 Bumps [@salesforce/ts-sinon](https://github.com/forcedotcom/ts-sinon) from 1.4.15 to 1.4.19. - [Release notes](https://github.com/forcedotcom/ts-sinon/releases) - [Changelog](https://github.com/forcedotcom/ts-sinon/blob/main/CHANGELOG.md) - [Commits](https://github.com/forcedotcom/ts-sinon/compare/1.4.15...1.4.19) --- updated-dependencies: - dependency-name: "@salesforce/ts-sinon" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index c6f125e1..3bf6af1c 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "@salesforce/plugin-command-reference": "^3.0.46", "@salesforce/plugin-source": "^2.11.0", "@salesforce/source-testkit": "^2.1.62", - "@salesforce/ts-sinon": "1.4.15", + "@salesforce/ts-sinon": "1.4.19", "@salesforce/ts-types": "^2.0.8", "@swc/core": "1.3.39", "cross-env": "^7.0.3", diff --git a/yarn.lock b/yarn.lock index ea83072a..90a38aaa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1174,12 +1174,12 @@ isomorphic-git "1.23.0" ts-retry-promise "^0.7.0" -"@salesforce/ts-sinon@1.4.15": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@salesforce/ts-sinon/-/ts-sinon-1.4.15.tgz#6214b73fc53fe0ee2583bbd87d4b4217e557279d" - integrity sha512-mw//jI+QkkS+PEwqMtazlhdi3eYY49InnJ/EipmrsdsdV9b+W79D5N4C92LROYe9VNq+3q5VHJcT/jhARxZsTg== +"@salesforce/ts-sinon@1.4.19": + version "1.4.19" + resolved "https://registry.yarnpkg.com/@salesforce/ts-sinon/-/ts-sinon-1.4.19.tgz#64157b6c8cf4a3c637867e2ddd90c2d058c334f7" + integrity sha512-vopxKrI6QD0OCtPlge1eGGHFWLkoDee7KaB/dpGeRwioeNfCVJ8ikELN0hv0zq9Ys6gUYWYcdpxzTP1upslCJA== dependencies: - "@salesforce/ts-types" "^2.0.7" + "@salesforce/ts-types" "^2.0.9" sinon "^5.1.1" tslib "^2.6.1" From 720b03f6ce509e937ce70ea3ec83dc1b9c8ccf86 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 Nov 2023 05:45:11 +0000 Subject: [PATCH 4/8] fix(deps): bump @salesforce/apex-node from 2.1.0 to 2.1.2 Bumps [@salesforce/apex-node](https://github.com/forcedotcom/salesforcedx-apex) from 2.1.0 to 2.1.2. - [Release notes](https://github.com/forcedotcom/salesforcedx-apex/releases) - [Commits](https://github.com/forcedotcom/salesforcedx-apex/compare/2.1.0...2.1.2) --- updated-dependencies: - dependency-name: "@salesforce/apex-node" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index c6f125e1..9619bbf9 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/forcedotcom/cli/issues", "dependencies": { "@oclif/core": "^2.15.0", - "@salesforce/apex-node": "^2.1.0", + "@salesforce/apex-node": "^2.1.2", "@salesforce/core": "^5.3.18", "@salesforce/kit": "^3.0.15", "@salesforce/sf-plugins-core": "^3.1.22", diff --git a/yarn.lock b/yarn.lock index ea83072a..9cc72a5f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -962,12 +962,12 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@salesforce/apex-node@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@salesforce/apex-node/-/apex-node-2.1.0.tgz#11ed10af2e89690f398224f12c44820129d030c0" - integrity sha512-W7OcqcBNHhf2wQMiPWOx/MED7ao1ZlML4vX5+A6hMDZTCZ5g34rj5wwVUQFOOAxHnS5F8jQUU5VpxpKo01jrTQ== +"@salesforce/apex-node@^2.1.0", "@salesforce/apex-node@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@salesforce/apex-node/-/apex-node-2.1.2.tgz#f42935b9be6ad7d28b5810ea36a88124789e6f5f" + integrity sha512-4ShpuymejVotaK4BYa9h33jc3zj0J9xPV7IIKfTscBTfFHspgPEPaDghTODC+DZMn6TJ1M2nNzRfeHmlF7J2kA== dependencies: - "@salesforce/core" "^5.2.0" + "@salesforce/core" "^5.3.18" "@types/istanbul-reports" "^3.0.1" faye "1.4.0" glob "^8.0.3" @@ -1005,7 +1005,7 @@ strip-ansi "6.0.1" ts-retry-promise "^0.7.1" -"@salesforce/core@^5.2.0", "@salesforce/core@^5.3.1", "@salesforce/core@^5.3.10", "@salesforce/core@^5.3.14", "@salesforce/core@^5.3.17", "@salesforce/core@^5.3.18": +"@salesforce/core@^5.3.1", "@salesforce/core@^5.3.10", "@salesforce/core@^5.3.14", "@salesforce/core@^5.3.17", "@salesforce/core@^5.3.18": version "5.3.18" resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-5.3.18.tgz#c0b7b59fbef7f0689e88968c614dd1ae2c420f02" integrity sha512-/Ag7elFngTT13PRblSPJPB2Q+xk3jR2SX8bYa83fcQljVF7ApGB5qtFpauXmUv8lgRnN+F01HNqM16iszAMP9w== From af7c52daa3b595931331ad3ccc578e43aab9c688 Mon Sep 17 00:00:00 2001 From: svc-cli-bot Date: Sat, 11 Nov 2023 08:44:37 +0000 Subject: [PATCH 5/8] chore(release): 1.20.3 [skip ci] --- CHANGELOG.md | 6 ++++++ README.md | 34 +++++++++++++++++----------------- package.json | 2 +- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67d338bc..6d6d9e4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.20.3](https://github.com/salesforcecli/plugin-deploy-retrieve/compare/1.20.2...1.20.3) (2023-11-11) + +### Bug Fixes + +- **deps:** bump @salesforce/apex-node from 2.1.0 to 2.1.2 ([720b03f](https://github.com/salesforcecli/plugin-deploy-retrieve/commit/720b03f6ce509e937ce70ea3ec83dc1b9c8ccf86)) + ## [1.20.2](https://github.com/salesforcecli/plugin-deploy-retrieve/compare/1.20.1...1.20.2) (2023-11-08) ### Bug Fixes diff --git a/README.md b/README.md index dd628d7c..694c12a2 100644 --- a/README.md +++ b/README.md @@ -141,7 +141,7 @@ FLAG DESCRIPTIONS If you specify this parameter, don’t specify --metadata or --source-dir. ``` -_See code: [src/commands/project/convert/mdapi.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.2/src/commands/project/convert/mdapi.ts)_ +_See code: [src/commands/project/convert/mdapi.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.3/src/commands/project/convert/mdapi.ts)_ ## `sf project convert source` @@ -153,7 +153,7 @@ USAGE | -m ] FLAGS - -d, --output-dir= [default: metadataPackage_1699478247112] Output directory to store the Metadata + -d, --output-dir= [default: metadataPackage_1699692272222] Output directory to store the Metadata API–formatted files in. -m, --metadata=... Metadata component names to convert. -n, --package-name= Name of the package to associate with the metadata-formatted files. @@ -213,7 +213,7 @@ FLAG DESCRIPTIONS Override the api version used for api requests made by this command ``` -_See code: [src/commands/project/convert/source.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.2/src/commands/project/convert/source.ts)_ +_See code: [src/commands/project/convert/source.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.3/src/commands/project/convert/source.ts)_ ## `sf project delete source` @@ -351,7 +351,7 @@ FLAG DESCRIPTIONS - Separate the test names with spaces: --tests Test1 Test2 "Test With Space" ``` -_See code: [src/commands/project/delete/source.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.2/src/commands/project/delete/source.ts)_ +_See code: [src/commands/project/delete/source.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.3/src/commands/project/delete/source.ts)_ ## `sf project delete tracking` @@ -386,7 +386,7 @@ EXAMPLES $ sf project delete tracking --target-org my-scratch ``` -_See code: [src/commands/project/delete/tracking.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.2/src/commands/project/delete/tracking.ts)_ +_See code: [src/commands/project/delete/tracking.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.3/src/commands/project/delete/tracking.ts)_ ## `sf project deploy cancel` @@ -456,7 +456,7 @@ FLAG DESCRIPTIONS project deploy report". ``` -_See code: [src/commands/project/deploy/cancel.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.2/src/commands/project/deploy/cancel.ts)_ +_See code: [src/commands/project/deploy/cancel.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.3/src/commands/project/deploy/cancel.ts)_ ## `sf project deploy preview` @@ -539,7 +539,7 @@ FLAG DESCRIPTIONS All child components are included. If you specify this flag, don’t specify --metadata or --source-dir. ``` -_See code: [src/commands/project/deploy/preview.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.2/src/commands/project/deploy/preview.ts)_ +_See code: [src/commands/project/deploy/preview.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.3/src/commands/project/deploy/preview.ts)_ ## `sf project deploy quick` @@ -623,7 +623,7 @@ FLAG DESCRIPTIONS deploy report". ``` -_See code: [src/commands/project/deploy/quick.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.2/src/commands/project/deploy/quick.ts)_ +_See code: [src/commands/project/deploy/quick.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.3/src/commands/project/deploy/quick.ts)_ ## `sf project deploy report` @@ -718,7 +718,7 @@ FLAG DESCRIPTIONS --coverage-formatters lcov --coverage-formatters clover ``` -_See code: [src/commands/project/deploy/report.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.2/src/commands/project/deploy/report.ts)_ +_See code: [src/commands/project/deploy/report.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.3/src/commands/project/deploy/report.ts)_ ## `sf project deploy resume` @@ -802,7 +802,7 @@ FLAG DESCRIPTIONS --coverage-formatters lcov --coverage-formatters clover ``` -_See code: [src/commands/project/deploy/resume.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.2/src/commands/project/deploy/resume.ts)_ +_See code: [src/commands/project/deploy/resume.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.3/src/commands/project/deploy/resume.ts)_ ## `sf project deploy start` @@ -1013,7 +1013,7 @@ FLAG DESCRIPTIONS --coverage-formatters lcov --coverage-formatters clover ``` -_See code: [src/commands/project/deploy/start.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.2/src/commands/project/deploy/start.ts)_ +_See code: [src/commands/project/deploy/start.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.3/src/commands/project/deploy/start.ts)_ ## `sf project deploy validate` @@ -1174,7 +1174,7 @@ FLAG DESCRIPTIONS --coverage-formatters lcov --coverage-formatters clover ``` -_See code: [src/commands/project/deploy/validate.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.2/src/commands/project/deploy/validate.ts)_ +_See code: [src/commands/project/deploy/validate.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.3/src/commands/project/deploy/validate.ts)_ ## `sf project generate manifest` @@ -1249,7 +1249,7 @@ EXAMPLES $ sf project generate manifest --from-org test@myorg.com --include-packages unlocked ``` -_See code: [src/commands/project/generate/manifest.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.2/src/commands/project/generate/manifest.ts)_ +_See code: [src/commands/project/generate/manifest.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.3/src/commands/project/generate/manifest.ts)_ ## `sf project list ignored` @@ -1290,7 +1290,7 @@ EXAMPLES $ sf project list ignored --source-dir package.xml ``` -_See code: [src/commands/project/list/ignored.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.2/src/commands/project/list/ignored.ts)_ +_See code: [src/commands/project/list/ignored.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.3/src/commands/project/list/ignored.ts)_ ## `sf project reset tracking` @@ -1337,7 +1337,7 @@ EXAMPLES $ sf project reset tracking --revision 30 ``` -_See code: [src/commands/project/reset/tracking.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.2/src/commands/project/reset/tracking.ts)_ +_See code: [src/commands/project/reset/tracking.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.3/src/commands/project/reset/tracking.ts)_ ## `sf project retrieve preview` @@ -1392,7 +1392,7 @@ FLAG DESCRIPTIONS Overrides your default org. ``` -_See code: [src/commands/project/retrieve/preview.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.2/src/commands/project/retrieve/preview.ts)_ +_See code: [src/commands/project/retrieve/preview.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.3/src/commands/project/retrieve/preview.ts)_ ## `sf project retrieve start` @@ -1538,6 +1538,6 @@ FLAG DESCRIPTIONS If you specify this parameter, don’t specify --metadata or --source-dir. ``` -_See code: [src/commands/project/retrieve/start.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.2/src/commands/project/retrieve/start.ts)_ +_See code: [src/commands/project/retrieve/start.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/1.20.3/src/commands/project/retrieve/start.ts)_ diff --git a/package.json b/package.json index 9619bbf9..8b0147a9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@salesforce/plugin-deploy-retrieve", "description": "deploy and retrieve commands for sf", - "version": "1.20.2", + "version": "1.20.3", "author": "Salesforce", "bugs": "https://github.com/forcedotcom/cli/issues", "dependencies": { From 161e41f10f179997f68a455cf82ca6c0077d4f34 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Sun, 12 Nov 2023 17:00:34 -0600 Subject: [PATCH 6/8] feat!: esm --- .eslintignore | 1 + .gitignore | 2 + .lintstagedrc.cjs | 3 + .lintstagedrc.js | 3 - .mocharc.json | 5 +- DEVELOPING.md | 4 +- README.md | 4 +- bin/dev | 21 - bin/dev.cmd | 4 +- bin/dev.js | 8 + bin/run | 5 - bin/run.js | 9 + commitlint.config.js => commitlint.config.cjs | 0 package.json | 58 +- schemas/project-retrieve-start.json | 25 +- src/commands/deploy.ts | 7 +- src/commands/project/convert/mdapi.ts | 9 +- src/commands/project/convert/source.ts | 17 +- src/commands/project/delete/source.ts | 32 +- src/commands/project/delete/tracking.ts | 6 +- src/commands/project/deploy/cancel.ts | 14 +- src/commands/project/deploy/preview.ts | 8 +- src/commands/project/deploy/quick.ts | 22 +- src/commands/project/deploy/report.ts | 18 +- src/commands/project/deploy/resume.ts | 26 +- src/commands/project/deploy/start.ts | 34 +- src/commands/project/deploy/validate.ts | 37 +- src/commands/project/generate/manifest.ts | 7 +- src/commands/project/list/ignored.ts | 9 +- src/commands/project/reset/tracking.ts | 4 +- src/commands/project/retrieve/preview.ts | 6 +- src/commands/project/retrieve/start.ts | 17 +- src/configMeta.ts | 6 +- .../asyncDeployCancelResultFormatter.ts | 7 +- src/formatters/asyncDeployResultFormatter.ts | 7 +- src/formatters/deleteResultFormatter.ts | 12 +- src/formatters/deployCancelResultFormatter.ts | 2 +- src/formatters/deployReportResultFormatter.ts | 4 +- src/formatters/deployResultFormatter.ts | 14 +- .../metadataConvertResultFormatter.ts | 2 +- .../metadataRetrieveResultFormatter.ts | 13 +- src/formatters/retrieveResultFormatter.ts | 4 +- .../sourceConvertResultFormatter.ts | 7 +- src/formatters/testResultsFormatter.ts | 16 +- src/hooks/deploy.ts | 2 +- src/index.ts | 2 +- src/utils/coverage.ts | 4 +- src/utils/deploy.ts | 20 +- src/utils/deployCache.ts | 4 +- src/utils/errorCodes.ts | 4 +- src/utils/flags.ts | 11 +- src/utils/metadataDeployer.ts | 18 +- src/utils/output.ts | 8 +- src/utils/previewOutput.ts | 41 +- src/utils/progressBar.ts | 8 +- test/.eslintrc.cjs | 2 - test/commands/convert/source.test.ts | 8 +- test/commands/delete/source.test.ts | 16 +- test/commands/deploy.nut.ts | 6 +- test/commands/deploy.test.ts | 2 +- test/commands/deploy/metadata/cancel.nut.ts | 4 +- test/commands/deploy/metadata/quick.nut.ts | 2 +- .../deploy/metadata/report-mdapi.nut.ts | 2 +- test/commands/deploy/metadata/report.nut.ts | 2 +- test/commands/deploy/metadata/resume.nut.ts | 4 +- test/commands/deploy/metadata/validate.nut.ts | 2 +- test/commands/deploy/start.test.ts | 8 +- test/commands/retrieve/start.test.ts | 23 +- test/nuts/convert/mdapi.nut.ts | 2 +- test/nuts/convert/source.nut.ts | 2 +- test/nuts/delete/source.nut.ts | 2 +- test/nuts/deploy/formatter.nut.ts | 2 +- test/nuts/deploy/noProject.nut.ts | 2 +- test/nuts/deploy/noTracking.nut.ts | 2 +- .../nuts/digitalExperienceBundle/constants.ts | 2 +- .../deb.manifest.nut.ts | 6 +- .../deb.metadata.nut.ts | 6 +- .../deb.sourcepath.nut.ts | 6 +- .../deb.tracking.nut.ts | 13 +- test/nuts/digitalExperienceBundle/helper.ts | 4 +- test/nuts/generateNuts.ts | 2 +- test/nuts/list/ignored.nut.ts | 2 +- test/nuts/retrieve/customLabels.nut.ts | 2 +- test/nuts/retrieve/noProject.ts | 2 +- test/nuts/retrieve/noTracking.ts | 2 +- test/nuts/retrieve/partialBundleDelete.nut.ts | 4 +- .../seeds/deploy.metadata.manifest.seed.ts | 4 +- .../deploy.metadata.metadata-dir.seed.ts | 4 +- .../seeds/deploy.metadata.metadata.seed.ts | 4 +- .../seeds/deploy.metadata.source-dir.seed.ts | 4 +- .../seeds/deploy.metadata.test-level.seed.ts | 2 +- test/nuts/specialTypes/folderTypes.nut.ts | 2 +- test/nuts/specialTypes/nestedLwc.nut.ts | 2 +- test/nuts/specialTypes/territory2.nut.ts | 2 +- test/nuts/specialTypes/translation.nut.ts | 4 +- test/nuts/tracking/basics.nut.ts | 12 +- test/nuts/tracking/conflicts.nut.ts | 8 +- test/nuts/tracking/deleteResetTracking.nut.ts | 2 +- test/nuts/tracking/forceIgnore.nut.ts | 6 +- test/nuts/tracking/lwc.nut.ts | 6 +- test/nuts/tracking/mpd-non-sequential.nut.ts | 2 +- test/nuts/tracking/remoteChanges.nut.ts | 8 +- test/tsconfig.json | 2 +- test/utils/coverage.test.ts | 2 +- test/utils/deploy.test.ts | 8 +- test/utils/errorCodes.test.ts | 2 +- test/utils/flags.test.ts | 8 +- test/utils/manifestCache.test.ts | 4 +- test/utils/output.test.ts | 8 +- test/utils/promiseQueue.test.ts | 2 +- test/utils/testConsts.ts | 2 +- test/utils/types.test.ts | 2 +- tsconfig.json | 8 +- yarn.lock | 516 ++++++++++-------- 114 files changed, 755 insertions(+), 666 deletions(-) create mode 100644 .eslintignore create mode 100644 .lintstagedrc.cjs delete mode 100644 .lintstagedrc.js delete mode 100755 bin/dev mode change 100644 => 100755 bin/dev.cmd create mode 100755 bin/dev.js delete mode 100755 bin/run create mode 100755 bin/run.js rename commitlint.config.js => commitlint.config.cjs (100%) diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..ee638464 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +*.cjs/ diff --git a/.gitignore b/.gitignore index c32d10c9..9d793718 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,5 @@ oclif.manifest.json # ignore generated nut tests test/nuts/generated/ + +oclif.lock \ No newline at end of file diff --git a/.lintstagedrc.cjs b/.lintstagedrc.cjs new file mode 100644 index 00000000..9a99d41c --- /dev/null +++ b/.lintstagedrc.cjs @@ -0,0 +1,3 @@ +module.exports = { + '**/*.{js,json,md}?(x)': () => 'npm run reformat', +}; diff --git a/.lintstagedrc.js b/.lintstagedrc.js deleted file mode 100644 index d7fab80d..00000000 --- a/.lintstagedrc.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - '**/*.{js,json,md}?(x)': () => 'npm run reformat' -}; diff --git a/.mocharc.json b/.mocharc.json index e59ba8bf..a8398045 100644 --- a/.mocharc.json +++ b/.mocharc.json @@ -1,8 +1,9 @@ { - "require": "ts-node/register,source-map-support/register", + "require": ["ts-node/register"], "watch-extensions": "ts", "watch-files": ["src", "test"], "recursive": true, "reporter": "spec", - "timeout": 10000 + "timeout": 10000, + "node-option": ["loader=ts-node/esm"] } diff --git a/DEVELOPING.md b/DEVELOPING.md index 166c1bda..e021276d 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -29,7 +29,7 @@ 1. Build and lint the code: `yarn build` 1. Create a branch off main for new work: `git checkout -b ` _Suggestion: use branch_name format of initials/work-title_. For external contributors, please fork the main branch of the repo instead and PR the fork to the main branch. 1. Make code changes and build: `yarn build` -1. Run changed commands: `./bin/dev project:deploy:start --help` +1. Run changed commands: `./bin/dev.js project:deploy:start --help` 1. Write tests and run: `yarn test` (unit) and/or `yarn test:nuts` (NUTs) 1. Show all changed files: `git status` 1. Add all files to staging: `git add .` @@ -93,7 +93,7 @@ If there are conflict errors in the tests then we need to make a similar modific ## Running Commands -To run your modified plugin commands locally, use `./bin/dev` or `./bin/dev.cmd` file, which uses ts-node to execute the plugin's TypeScript commands. +To run your modified plugin commands locally, use `./bin/dev.js` or `./bin/dev.cmd` file, which uses ts-node to execute the plugin's TypeScript commands. ```bash # Run using local dev file. diff --git a/README.md b/README.md index dd628d7c..501d7ef2 100644 --- a/README.md +++ b/README.md @@ -44,11 +44,11 @@ yarn install yarn build ``` -To use your plugin, run using the local `./bin/dev` or `./bin/dev.cmd` file. +To use your plugin, run using the local `./bin/dev.js` or `./bin/dev.cmd` file. ```bash # Run using local run file. -./bin/dev deploy +./bin/dev.js deploy ``` There should be no differences when running via the Salesforce CLI or using the local run file. However, it can be useful to link the plugin to do some additional testing or run your commands from anywhere on your machine. diff --git a/bin/dev b/bin/dev deleted file mode 100755 index d88b6a38..00000000 --- a/bin/dev +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env node - -const oclif = require('@oclif/core'); - -const path = require('path'); -const project = path.join(__dirname, '..', 'tsconfig.json'); - -// In dev mode -> use ts-node and dev plugins -process.env.NODE_ENV = 'development'; - -// Enable SWC for faster typescript compiling -require('ts-node').register({ project, swc: true }); - -// In dev mode, always show stack traces -const g = (global.oclif = global.oclif || {}); - -// In dev mode, always show stack traces -global.oclif.debug = true; - -// Start the CLI -oclif.run().then(require('@oclif/core/flush')).catch(require('@oclif/core/handle')); diff --git a/bin/dev.cmd b/bin/dev.cmd old mode 100644 new mode 100755 index d7ee75da..cec553be --- a/bin/dev.cmd +++ b/bin/dev.cmd @@ -1,3 +1,3 @@ @echo off -set NODE_ENV=development -node "%~dp0\dev" %* + +node --loader ts-node/esm --no-warnings=ExperimentalWarning "%~dp0\dev" %* diff --git a/bin/dev.js b/bin/dev.js new file mode 100755 index 00000000..89a549a7 --- /dev/null +++ b/bin/dev.js @@ -0,0 +1,8 @@ +#!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning +// eslint-disable-next-line node/shebang +async function main() { + const { execute } = await import('@oclif/core'); + await execute({ development: true, dir: import.meta.url }); +} + +await main(); diff --git a/bin/run b/bin/run deleted file mode 100755 index eaa62fea..00000000 --- a/bin/run +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node - -require('@oclif/core').run() -.then(require('@oclif/core/flush')) -.catch(require('@oclif/core/handle')) diff --git a/bin/run.js b/bin/run.js new file mode 100755 index 00000000..cf13fb93 --- /dev/null +++ b/bin/run.js @@ -0,0 +1,9 @@ +#!/usr/bin/env node + +// eslint-disable-next-line node/shebang +async function main() { + const { execute } = await import('@oclif/core'); + await execute({ dir: import.meta.url }); +} + +await main(); diff --git a/commitlint.config.js b/commitlint.config.cjs similarity index 100% rename from commitlint.config.js rename to commitlint.config.cjs diff --git a/package.json b/package.json index 2fb4767f..c30c8503 100644 --- a/package.json +++ b/package.json @@ -1,55 +1,55 @@ { "name": "@salesforce/plugin-deploy-retrieve", "description": "deploy and retrieve commands for sf", - "version": "1.20.2", + "version": "2.0.0", "author": "Salesforce", "bugs": "https://github.com/forcedotcom/cli/issues", "dependencies": { - "@oclif/core": "^2.15.0", - "@salesforce/apex-node": "^2.1.0", - "@salesforce/core": "^5.3.18", + "@oclif/core": "^3.10.8", + "@salesforce/apex-node": "^2.1.2", + "@salesforce/core": "^5.3.20", "@salesforce/kit": "^3.0.15", - "@salesforce/sf-plugins-core": "^3.1.22", - "@salesforce/source-deploy-retrieve": "^9.8.4", - "@salesforce/source-tracking": "^4.3.0", - "chalk": "^4.1.2", - "tslib": "^2" + "@salesforce/sf-plugins-core": "^4.1.1", + "@salesforce/source-deploy-retrieve": "^9.8.6", + "@salesforce/source-tracking": "^4.4.3", + "chalk": "^5.3.0" }, "devDependencies": { - "@oclif/plugin-command-snapshot": "^4.0.12", + "@oclif/plugin-command-snapshot": "^5.0.2", "@salesforce/cli-plugins-testkit": "^5.0.2", - "@salesforce/dev-scripts": "^6.0.3", + "@salesforce/dev-scripts": "^6.0.4", "@salesforce/plugin-command-reference": "^3.0.46", - "@salesforce/plugin-source": "^2.10.46", - "@salesforce/source-testkit": "^2.1.62", - "@salesforce/ts-sinon": "1.4.15", - "@salesforce/ts-types": "^2.0.8", - "@swc/core": "1.3.39", + "@salesforce/plugin-source": "^2.11.0", + "@salesforce/source-testkit": "^2.1.64", + "@salesforce/ts-sinon": "^1.4.19", + "@salesforce/ts-types": "^2.0.9", "cross-env": "^7.0.3", - "eslint-plugin-sf-plugin": "^1.16.14", - "oclif": "^3.16.0", + "eslint-plugin-sf-plugin": "^1.16.15", + "oclif": "^4.0.3", "shx": "0.3.4", "ts-node": "^10.9.1", "typescript": "^5.2.2" }, "config": {}, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" }, "files": [ "/lib", "/messages", "/oclif.manifest.json", - "/schemas" + "/schemas", + "/oclif.lock" ], "homepage": "https://github.com/salesforcecli/plugin-deploy-retrieve", "keywords": [ "force", "salesforce", - "sfdx", "sf", + "sf deploy", "sf retrieve", - "sf deploy" + "sf-plugin", + "sfdx" ], "license": "BSD-3-Clause", "oclif": { @@ -93,7 +93,8 @@ } } } - } + }, + "flexibleTaxonomy": true }, "repository": "salesforcecli/plugin-deploy-retrieve", "scripts": { @@ -132,7 +133,6 @@ "publishConfig": { "access": "public" }, - "main": "lib/index.js", "wireit": { "build": { "dependencies": [ @@ -209,7 +209,7 @@ "output": [] }, "test:command-reference": { - "command": "\"./bin/dev\" commandreference:generate --erroronwarnings", + "command": "ts-node \"./bin/dev.js\" commandreference:generate --erroronwarnings", "files": [ "src/**/*.ts", "messages/**", @@ -220,7 +220,7 @@ ] }, "test:deprecation-policy": { - "command": "\"./bin/dev\" snapshot:compare", + "command": "ts-node \"./bin/dev.js\" snapshot:compare", "files": [ "src/**/*.ts" ], @@ -230,12 +230,14 @@ ] }, "test:json-schema": { - "command": "\"./bin/dev\" schema:compare", + "command": "ts-node \"./bin/dev.js\" schema:compare", "files": [ "src/**/*.ts", "schemas" ], "output": [] } - } + }, + "exports": "./lib/index.js", + "type": "module" } diff --git a/schemas/project-retrieve-start.json b/schemas/project-retrieve-start.json index 1937b5a8..465b3a45 100644 --- a/schemas/project-retrieve-start.json +++ b/schemas/project-retrieve-start.json @@ -154,17 +154,7 @@ "type": "string" }, "manageableState": { - "type": "string", - "enum": [ - "beta", - "deleted", - "deprecated", - "deprecatedEditable", - "installed", - "installedEditable", - "released", - "unmanaged" - ] + "$ref": "#/definitions/ManageableState" }, "namespacePrefix": { "type": "string" @@ -187,6 +177,19 @@ ], "additionalProperties": false }, + "ManageableState": { + "type": "string", + "enum": [ + "beta", + "deleted", + "deprecated", + "deprecatedEditable", + "installed", + "installedEditable", + "released", + "unmanaged" + ] + }, "RequestStatus": { "type": "string", "enum": ["Pending", "InProgress", "Succeeded", "SucceededPartial", "Failed", "Canceling", "Canceled"] diff --git a/src/commands/deploy.ts b/src/commands/deploy.ts index 178b34aa..a7ac0039 100644 --- a/src/commands/deploy.ts +++ b/src/commands/deploy.ts @@ -10,6 +10,8 @@ import { EOL } from 'node:os'; import { writeFile, readFile } from 'node:fs/promises'; import { existsSync } from 'node:fs'; import { exec } from 'node:child_process'; +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { Hook } from '@oclif/core'; import { Messages } from '@salesforce/core'; import { Env, parseJsonMap } from '@salesforce/kit'; @@ -22,8 +24,9 @@ import { SfHook, Flags, } from '@salesforce/sf-plugins-core'; -import { DeployerResult } from '@salesforce/sf-plugins-core/lib/deployer'; -Messages.importMessagesDirectory(__dirname); +import { DeployerResult } from '@salesforce/sf-plugins-core/lib/deployer.js'; + +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy'); diff --git a/src/commands/project/convert/mdapi.ts b/src/commands/project/convert/mdapi.ts index bed2ac7b..637f5869 100644 --- a/src/commands/project/convert/mdapi.ts +++ b/src/commands/project/convert/mdapi.ts @@ -6,7 +6,8 @@ */ import { dirname, resolve } from 'node:path'; -import * as fs from 'node:fs'; +import fs from 'node:fs'; +import { fileURLToPath } from 'node:url'; import { Messages, SfError } from '@salesforce/core'; import { ComponentSet, @@ -22,10 +23,10 @@ import { SfCommand, } from '@salesforce/sf-plugins-core'; import { Interfaces } from '@oclif/core'; -import { ConvertMdapiJson } from '../../../utils/types'; -import { MetadataConvertResultFormatter } from '../../../formatters/metadataConvertResultFormatter'; +import { ConvertMdapiJson } from '../../../utils/types.js'; +import { MetadataConvertResultFormatter } from '../../../formatters/metadataConvertResultFormatter.js'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'convert.mdapi'); export interface EnsureFsFlagOptions { diff --git a/src/commands/project/convert/source.ts b/src/commands/project/convert/source.ts index 3a416f5a..df9b1264 100644 --- a/src/commands/project/convert/source.ts +++ b/src/commands/project/convert/source.ts @@ -5,9 +5,9 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import { resolve } from 'node:path'; -import * as fs from 'node:fs'; - +import { resolve, dirname } from 'node:path'; +import fs from 'node:fs'; +import { fileURLToPath } from 'node:url'; import { Messages } from '@salesforce/core'; import { ComponentSet, @@ -15,7 +15,6 @@ import { ConvertResult, MetadataConverter, } from '@salesforce/source-deploy-retrieve'; -import { getString } from '@salesforce/ts-types'; import { arrayWithDeprecation, Flags, @@ -24,11 +23,11 @@ import { SfCommand, } from '@salesforce/sf-plugins-core'; import { Interfaces } from '@oclif/core'; -import { getPackageDirs, getSourceApiVersion } from '../../../utils/project'; -import { SourceConvertResultFormatter } from '../../../formatters/sourceConvertResultFormatter'; -import { ConvertResultJson } from '../../../utils/types'; +import { getPackageDirs, getSourceApiVersion } from '../../../utils/project.js'; +import { SourceConvertResultFormatter } from '../../../formatters/sourceConvertResultFormatter.js'; +import { ConvertResultJson } from '../../../utils/types.js'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'convert.source'); export class Source extends SfCommand { @@ -153,7 +152,7 @@ export class Source extends SfCommand { } protected resolveSuccess(): void { - if (!getString(this.convertResult, 'packagePath')) { + if (!this.convertResult.packagePath) { process.exitCode = 1; } } diff --git a/src/commands/project/delete/source.ts b/src/commands/project/delete/source.ts index 08843c3b..5ef74f57 100644 --- a/src/commands/project/delete/source.ts +++ b/src/commands/project/delete/source.ts @@ -5,9 +5,10 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import * as fs from 'node:fs'; -import * as path from 'node:path'; -import * as os from 'node:os'; +import fs from 'node:fs'; +import path from 'node:path'; +import os from 'node:os'; +import { fileURLToPath } from 'node:url'; import { Interfaces } from '@oclif/core'; import { Lifecycle, Messages, Org, SfError } from '@salesforce/core'; import { @@ -31,19 +32,19 @@ import { requiredOrgFlagWithDeprecations, SfCommand, } from '@salesforce/sf-plugins-core'; -import * as chalk from 'chalk'; -import { API, DeleteSourceJson, isSourceComponent } from '../../../utils/types'; -import { getPackageDirs, getSourceApiVersion } from '../../../utils/project'; -import { resolveApi, validateTests } from '../../../utils/deploy'; -import { DeployResultFormatter } from '../../../formatters/deployResultFormatter'; -import { DeleteResultFormatter } from '../../../formatters/deleteResultFormatter'; -import { DeployProgress } from '../../../utils/progressBar'; -import { DeployCache } from '../../../utils/deployCache'; -import { testLevelFlag, testsFlag } from '../../../utils/flags'; +import chalk from 'chalk'; +import { API, DeleteSourceJson, isSourceComponent } from '../../../utils/types.js'; +import { getPackageDirs, getSourceApiVersion } from '../../../utils/project.js'; +import { resolveApi, validateTests } from '../../../utils/deploy.js'; +import { DeployResultFormatter } from '../../../formatters/deployResultFormatter.js'; +import { DeleteResultFormatter } from '../../../formatters/deleteResultFormatter.js'; +import { DeployProgress } from '../../../utils/progressBar.js'; +import { DeployCache } from '../../../utils/deployCache.js'; +import { testLevelFlag, testsFlag } from '../../../utils/flags.js'; const fsPromises = fs.promises; const testFlags = 'Test'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(path.dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'delete.source'); const xorFlags = ['metadata', 'source-dir']; export class Source extends SfCommand { @@ -72,11 +73,10 @@ export class Source extends SfCommand { description: messages.getMessage('flags.wait.description'), summary: messages.getMessage('flags.wait.summary'), }), - tests: { - ...testsFlag, + tests: testsFlag({ helpGroup: testFlags, char: undefined, - }, + }), 'test-level': testLevelFlag({ aliases: ['testlevel'], deprecateAliases: true, diff --git a/src/commands/project/delete/tracking.ts b/src/commands/project/delete/tracking.ts index 3c4fa34c..275bbd5c 100644 --- a/src/commands/project/delete/tracking.ts +++ b/src/commands/project/delete/tracking.ts @@ -5,8 +5,10 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { Messages } from '@salesforce/core'; -import * as chalk from 'chalk'; +import chalk from 'chalk'; import { SourceTracking } from '@salesforce/source-tracking'; import { Flags, @@ -16,7 +18,7 @@ import { SfCommand, } from '@salesforce/sf-plugins-core'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'delete.tracking'); export type DeleteTrackingResult = { diff --git a/src/commands/project/deploy/cancel.ts b/src/commands/project/deploy/cancel.ts index 4e19ad19..e34b1da1 100644 --- a/src/commands/project/deploy/cancel.ts +++ b/src/commands/project/deploy/cancel.ts @@ -5,17 +5,19 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { Messages } from '@salesforce/core'; import { Duration } from '@salesforce/kit'; import { SfCommand, Flags } from '@salesforce/sf-plugins-core'; import { RequestStatus } from '@salesforce/source-deploy-retrieve'; -import { cancelDeploy, cancelDeployAsync } from '../../../utils/deploy'; -import { DeployCache } from '../../../utils/deployCache'; -import { AsyncDeployCancelResultFormatter } from '../../../formatters/asyncDeployCancelResultFormatter'; -import { DeployCancelResultFormatter } from '../../../formatters/deployCancelResultFormatter'; -import { DeployResultJson } from '../../../utils/types'; +import { cancelDeploy, cancelDeployAsync } from '../../../utils/deploy.js'; +import { DeployCache } from '../../../utils/deployCache.js'; +import { AsyncDeployCancelResultFormatter } from '../../../formatters/asyncDeployCancelResultFormatter.js'; +import { DeployCancelResultFormatter } from '../../../formatters/deployCancelResultFormatter.js'; +import { DeployResultJson } from '../../../utils/types.js'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata.cancel'); export default class DeployMetadataCancel extends SfCommand { diff --git a/src/commands/project/deploy/preview.ts b/src/commands/project/deploy/preview.ts index 37e4fc31..25e717a7 100644 --- a/src/commands/project/deploy/preview.ts +++ b/src/commands/project/deploy/preview.ts @@ -4,14 +4,16 @@ * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { Messages } from '@salesforce/core'; import { SfCommand, Flags } from '@salesforce/sf-plugins-core'; import { SourceTracking } from '@salesforce/source-tracking'; import { ForceIgnore } from '@salesforce/source-deploy-retrieve'; -import { buildComponentSet } from '../../../utils/deploy'; -import { PreviewResult, printTables, compileResults, getConflictFiles } from '../../../utils/previewOutput'; +import { buildComponentSet } from '../../../utils/deploy.js'; +import { PreviewResult, printTables, compileResults, getConflictFiles } from '../../../utils/previewOutput.js'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata.preview'); const exclusiveFlags = ['manifest', 'source-dir', 'metadata']; diff --git a/src/commands/project/deploy/quick.ts b/src/commands/project/deploy/quick.ts index d95b76a7..1e3a504c 100644 --- a/src/commands/project/deploy/quick.ts +++ b/src/commands/project/deploy/quick.ts @@ -5,19 +5,21 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import { bold } from 'chalk'; +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import chalk from 'chalk'; import { Messages, Org } from '@salesforce/core'; import { SfCommand, toHelpSection, Flags } from '@salesforce/sf-plugins-core'; import { MetadataApiDeploy, RequestStatus } from '@salesforce/source-deploy-retrieve'; import { Duration } from '@salesforce/kit'; -import { DeployOptions, determineExitCode, resolveApi } from '../../../utils/deploy'; -import { DeployCache } from '../../../utils/deployCache'; -import { DEPLOY_STATUS_CODES_DESCRIPTIONS } from '../../../utils/errorCodes'; -import { AsyncDeployResultFormatter } from '../../../formatters/asyncDeployResultFormatter'; -import { DeployResultFormatter } from '../../../formatters/deployResultFormatter'; -import { API, DeployResultJson } from '../../../utils/types'; - -Messages.importMessagesDirectory(__dirname); +import { DeployOptions, determineExitCode, resolveApi } from '../../../utils/deploy.js'; +import { DeployCache } from '../../../utils/deployCache.js'; +import { DEPLOY_STATUS_CODES_DESCRIPTIONS } from '../../../utils/errorCodes.js'; +import { AsyncDeployResultFormatter } from '../../../formatters/asyncDeployResultFormatter.js'; +import { DeployResultFormatter } from '../../../formatters/deployResultFormatter.js'; +import { API, DeployResultJson } from '../../../utils/types.js'; + +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata.quick'); export default class DeployMetadataQuick extends SfCommand { @@ -99,7 +101,7 @@ export default class DeployMetadataQuick extends SfCommand { }); // This is the ID of the deploy (of the validated metadata) const deployId = await mdapiDeploy.deployRecentValidation(api === API['REST']); - this.log(`Deploy ID: ${bold(deployId)}`); + this.log(`Deploy ID: ${chalk.bold(deployId)}`); if (flags.async) { const asyncFormatter = new AsyncDeployResultFormatter(deployId, this.config.bin); diff --git a/src/commands/project/deploy/report.ts b/src/commands/project/deploy/report.ts index 6e660994..4019c26d 100644 --- a/src/commands/project/deploy/report.ts +++ b/src/commands/project/deploy/report.ts @@ -5,17 +5,19 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { Messages, Org, SfProject } from '@salesforce/core'; import { SfCommand, Flags } from '@salesforce/sf-plugins-core'; import { ComponentSet, DeployResult, MetadataApiDeploy } from '@salesforce/source-deploy-retrieve'; -import { buildComponentSet } from '../../../utils/deploy'; -import { DeployProgress } from '../../../utils/progressBar'; -import { DeployCache } from '../../../utils/deployCache'; -import { DeployReportResultFormatter } from '../../../formatters/deployReportResultFormatter'; -import { API, DeployResultJson } from '../../../utils/types'; -import { coverageFormattersFlag } from '../../../utils/flags'; +import { buildComponentSet } from '../../../utils/deploy.js'; +import { DeployProgress } from '../../../utils/progressBar.js'; +import { DeployCache } from '../../../utils/deployCache.js'; +import { DeployReportResultFormatter } from '../../../formatters/deployReportResultFormatter.js'; +import { API, DeployResultJson } from '../../../utils/types.js'; +import { coverageFormattersFlag } from '../../../utils/flags.js'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata.report'); const deployMessages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata'); const testFlags = 'Test'; @@ -47,7 +49,7 @@ export default class DeployMetadataReport extends SfCommand { summary: messages.getMessage('flags.use-most-recent.summary'), exactlyOne: ['use-most-recent', 'job-id'], }), - 'coverage-formatters': { ...coverageFormattersFlag, helpGroup: testFlags }, + 'coverage-formatters': coverageFormattersFlag({ helpGroup: testFlags }), junit: Flags.boolean({ summary: messages.getMessage('flags.junit.summary'), helpGroup: testFlags, diff --git a/src/commands/project/deploy/resume.ts b/src/commands/project/deploy/resume.ts index 9c621d22..13a42965 100644 --- a/src/commands/project/deploy/resume.ts +++ b/src/commands/project/deploy/resume.ts @@ -5,20 +5,22 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import { bold } from 'chalk'; +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import chalk from 'chalk'; import { EnvironmentVariable, Messages, Org, SfError } from '@salesforce/core'; import { SfCommand, toHelpSection, Flags } from '@salesforce/sf-plugins-core'; import { DeployResult, MetadataApiDeploy } from '@salesforce/source-deploy-retrieve'; import { Duration } from '@salesforce/kit'; -import { DeployResultFormatter } from '../../../formatters/deployResultFormatter'; -import { DeployProgress } from '../../../utils/progressBar'; -import { API, DeployResultJson } from '../../../utils/types'; -import { buildComponentSet, determineExitCode, executeDeploy, isNotResumable } from '../../../utils/deploy'; -import { DeployCache } from '../../../utils/deployCache'; -import { DEPLOY_STATUS_CODES_DESCRIPTIONS } from '../../../utils/errorCodes'; -import { coverageFormattersFlag } from '../../../utils/flags'; - -Messages.importMessagesDirectory(__dirname); +import { DeployResultFormatter } from '../../../formatters/deployResultFormatter.js'; +import { DeployProgress } from '../../../utils/progressBar.js'; +import { API, DeployResultJson } from '../../../utils/types.js'; +import { buildComponentSet, determineExitCode, executeDeploy, isNotResumable } from '../../../utils/deploy.js'; +import { DeployCache } from '../../../utils/deployCache.js'; +import { DEPLOY_STATUS_CODES_DESCRIPTIONS } from '../../../utils/errorCodes.js'; +import { coverageFormattersFlag } from '../../../utils/flags.js'; + +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata.resume'); const testFlags = 'Test'; @@ -63,7 +65,7 @@ export default class DeployMetadataResume extends SfCommand { helpValue: '', min: 1, }), - 'coverage-formatters': { ...coverageFormattersFlag, helpGroup: testFlags }, + 'coverage-formatters': coverageFormattersFlag({ helpGroup: testFlags }), junit: Flags.boolean({ summary: messages.getMessage('flags.junit.summary'), helpGroup: testFlags, @@ -125,7 +127,7 @@ export default class DeployMetadataResume extends SfCommand { jobId ); - this.log(`Deploy ID: ${bold(jobId)}`); + this.log(`Deploy ID: ${chalk.bold(jobId)}`); new DeployProgress(deploy, this.jsonEnabled()).start(); result = await deploy.pollStatus(500, wait.seconds); diff --git a/src/commands/project/deploy/start.ts b/src/commands/project/deploy/start.ts index d29330f8..80f3ea33 100644 --- a/src/commands/project/deploy/start.ts +++ b/src/commands/project/deploy/start.ts @@ -4,25 +4,27 @@ * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import { bold } from 'chalk'; +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import chalk from 'chalk'; import { EnvironmentVariable, Lifecycle, Messages, OrgConfigProperties, SfError } from '@salesforce/core'; import { DeployVersionData } from '@salesforce/source-deploy-retrieve'; import { Duration } from '@salesforce/kit'; import { SfCommand, toHelpSection, Flags } from '@salesforce/sf-plugins-core'; import { SourceConflictError } from '@salesforce/source-tracking'; -import { AsyncDeployResultFormatter } from '../../../formatters/asyncDeployResultFormatter'; -import { DeployResultFormatter } from '../../../formatters/deployResultFormatter'; -import { DeployProgress } from '../../../utils/progressBar'; -import { DeployResultJson, TestLevel } from '../../../utils/types'; -import { executeDeploy, resolveApi, validateTests, determineExitCode } from '../../../utils/deploy'; -import { DeployCache } from '../../../utils/deployCache'; -import { DEPLOY_STATUS_CODES_DESCRIPTIONS } from '../../../utils/errorCodes'; -import { ConfigVars } from '../../../configMeta'; -import { coverageFormattersFlag, fileOrDirFlag, testLevelFlag, testsFlag } from '../../../utils/flags'; -import { writeConflictTable } from '../../../utils/conflicts'; -import { getOptionalProject } from '../../../utils/project'; +import { AsyncDeployResultFormatter } from '../../../formatters/asyncDeployResultFormatter.js'; +import { DeployResultFormatter } from '../../../formatters/deployResultFormatter.js'; +import { DeployProgress } from '../../../utils/progressBar.js'; +import { DeployResultJson, TestLevel } from '../../../utils/types.js'; +import { executeDeploy, resolveApi, validateTests, determineExitCode } from '../../../utils/deploy.js'; +import { DeployCache } from '../../../utils/deployCache.js'; +import { DEPLOY_STATUS_CODES_DESCRIPTIONS } from '../../../utils/errorCodes.js'; +import { ConfigVars } from '../../../configMeta.js'; +import { coverageFormattersFlag, fileOrDirFlag, testLevelFlag, testsFlag } from '../../../utils/flags.js'; +import { writeConflictTable } from '../../../utils/conflicts.js'; +import { getOptionalProject } from '../../../utils/project.js'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata'); const exclusiveFlags = ['manifest', 'source-dir', 'metadata', 'metadata-dir']; @@ -115,7 +117,7 @@ export default class DeployMetadata extends SfCommand { summary: messages.getMessage('flags.target-org.summary'), required: true, }), - tests: { ...testsFlag, helpGroup: testFlags }, + tests: testsFlag({ helpGroup: testFlags }), 'test-level': testLevelFlag({ description: messages.getMessage('flags.test-level.description'), summary: messages.getMessage('flags.test-level.summary'), @@ -152,7 +154,7 @@ export default class DeployMetadata extends SfCommand { dependsOn: ['manifest'], helpGroup: destructiveFlags, }), - 'coverage-formatters': { ...coverageFormattersFlag, helpGroup: testFlags }, + 'coverage-formatters': coverageFormattersFlag({ helpGroup: testFlags }), junit: Flags.boolean({ summary: messages.getMessage('flags.junit.summary'), helpGroup: testFlags, @@ -233,7 +235,7 @@ export default class DeployMetadata extends SfCommand { if (!deploy.id) { throw new SfError('The deploy id is not available.'); } - this.log(`Deploy ID: ${bold(deploy.id)}`); + this.log(`Deploy ID: ${chalk.bold(deploy.id)}`); if (flags.async) { if (flags['coverage-formatters']) { diff --git a/src/commands/project/deploy/validate.ts b/src/commands/project/deploy/validate.ts index d5ea2716..1e9346e5 100644 --- a/src/commands/project/deploy/validate.ts +++ b/src/commands/project/deploy/validate.ts @@ -5,22 +5,23 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ import * as os from 'node:os'; -import { bold } from 'chalk'; +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import chalk from 'chalk'; import { EnvironmentVariable, Lifecycle, Messages, OrgConfigProperties, SfError } from '@salesforce/core'; import { CodeCoverageWarnings, DeployVersionData, RequestStatus } from '@salesforce/source-deploy-retrieve'; -import { Duration } from '@salesforce/kit'; +import { Duration, ensureArray } from '@salesforce/kit'; import { SfCommand, toHelpSection, Flags } from '@salesforce/sf-plugins-core'; -import { ensureArray } from '@salesforce/kit'; -import { AsyncDeployResultFormatter } from '../../../formatters/asyncDeployResultFormatter'; -import { DeployResultFormatter } from '../../../formatters/deployResultFormatter'; -import { DeployProgress } from '../../../utils/progressBar'; -import { DeployResultJson, TestLevel } from '../../../utils/types'; -import { executeDeploy, resolveApi, determineExitCode, validateTests } from '../../../utils/deploy'; -import { DEPLOY_STATUS_CODES_DESCRIPTIONS } from '../../../utils/errorCodes'; -import { ConfigVars } from '../../../configMeta'; -import { coverageFormattersFlag, fileOrDirFlag, testLevelFlag, testsFlag } from '../../../utils/flags'; - -Messages.importMessagesDirectory(__dirname); +import { AsyncDeployResultFormatter } from '../../../formatters/asyncDeployResultFormatter.js'; +import { DeployResultFormatter } from '../../../formatters/deployResultFormatter.js'; +import { DeployProgress } from '../../../utils/progressBar.js'; +import { DeployResultJson, TestLevel } from '../../../utils/types.js'; +import { executeDeploy, resolveApi, determineExitCode, validateTests } from '../../../utils/deploy.js'; +import { DEPLOY_STATUS_CODES_DESCRIPTIONS } from '../../../utils/errorCodes.js'; +import { ConfigVars } from '../../../configMeta.js'; +import { coverageFormattersFlag, fileOrDirFlag, testLevelFlag, testsFlag } from '../../../utils/flags.js'; + +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata.validate'); const deployMessages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata'); @@ -90,7 +91,7 @@ export default class DeployMetadataValidate extends SfCommand summary: messages.getMessage('flags.target-org.summary'), required: true, }), - tests: { ...testsFlag, helpGroup: testFlags }, + tests: testsFlag({ helpGroup: testFlags }), 'test-level': testLevelFlag({ options: [TestLevel.RunAllTestsInOrg, TestLevel.RunLocalTests, TestLevel.RunSpecifiedTests], default: TestLevel.RunLocalTests, @@ -117,7 +118,7 @@ export default class DeployMetadataValidate extends SfCommand description: deployMessages.getMessage('flags.ignore-warnings.description'), default: false, }), - 'coverage-formatters': { ...coverageFormattersFlag, helpGroup: testFlags }, + 'coverage-formatters': coverageFormattersFlag({ helpGroup: testFlags }), junit: Flags.boolean({ summary: messages.getMessage('flags.junit.summary'), helpGroup: testFlags, @@ -199,7 +200,7 @@ export default class DeployMetadataValidate extends SfCommand if (!deploy.id) { throw new SfError('The deploy id is not available.'); } - this.log(`Deploy ID: ${bold(deploy.id)}`); + this.log(`Deploy ID: ${chalk.bold(deploy.id)}`); if (flags.async) { const asyncFormatter = new AsyncDeployResultFormatter(deploy.id, this.config.bin); @@ -211,7 +212,9 @@ export default class DeployMetadataValidate extends SfCommand const result = await deploy.pollStatus(500, flags.wait?.seconds); process.exitCode = determineExitCode(result); - const formatter = new DeployResultFormatter(result, flags); + const formatter = new DeployResultFormatter(result, { + ...flags, + }); if (!this.jsonEnabled()) { formatter.display(); diff --git a/src/commands/project/generate/manifest.ts b/src/commands/project/generate/manifest.ts index 484a65ce..91146dfe 100644 --- a/src/commands/project/generate/manifest.ts +++ b/src/commands/project/generate/manifest.ts @@ -4,8 +4,9 @@ * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import { join } from 'node:path'; +import { join, dirname } from 'node:path'; import * as fs from 'node:fs'; +import { fileURLToPath } from 'node:url'; import { Messages, Org } from '@salesforce/core'; import { ComponentSetBuilder } from '@salesforce/source-deploy-retrieve'; import { @@ -15,9 +16,9 @@ import { orgApiVersionFlagWithDeprecations, SfCommand, } from '@salesforce/sf-plugins-core'; -import { getPackageDirs, getSourceApiVersion } from '../../../utils/project'; +import { getPackageDirs, getSourceApiVersion } from '../../../utils/project.js'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'manifest.generate'); const manifestTypes = { diff --git a/src/commands/project/list/ignored.ts b/src/commands/project/list/ignored.ts index 0f0ff1fb..02eaac8d 100644 --- a/src/commands/project/list/ignored.ts +++ b/src/commands/project/list/ignored.ts @@ -4,13 +4,14 @@ * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import * as path from 'node:path'; -import * as fs from 'node:fs'; +import { join, dirname } from 'node:path'; +import fs from 'node:fs'; +import { fileURLToPath } from 'node:url'; import { Messages, SfError } from '@salesforce/core'; import { ForceIgnore } from '@salesforce/source-deploy-retrieve'; import { SfCommand, Flags } from '@salesforce/sf-plugins-core'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'list.ignored'); export type SourceIgnoredResults = { @@ -80,7 +81,7 @@ export class Ignored extends SfCommand { // Recursively search a directory for source files to test. private async findIgnored(dir: string): Promise>> { - return (await fs.promises.readdir(dir)).map((filename) => this.statIgnored(path.join(dir, filename))); + return (await fs.promises.readdir(dir)).map((filename) => this.statIgnored(join(dir, filename))); } // Test if a source file is denied, adding any ignored files to diff --git a/src/commands/project/reset/tracking.ts b/src/commands/project/reset/tracking.ts index 267f4ba5..f19b27ff 100644 --- a/src/commands/project/reset/tracking.ts +++ b/src/commands/project/reset/tracking.ts @@ -5,6 +5,8 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { Messages } from '@salesforce/core'; import { SourceTracking } from '@salesforce/source-tracking'; import { @@ -16,7 +18,7 @@ import { StandardColors, } from '@salesforce/sf-plugins-core'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'delete.tracking'); export type ResetTrackingResult = { diff --git a/src/commands/project/retrieve/preview.ts b/src/commands/project/retrieve/preview.ts index c8a99afc..4b67866f 100644 --- a/src/commands/project/retrieve/preview.ts +++ b/src/commands/project/retrieve/preview.ts @@ -4,13 +4,15 @@ * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { Messages } from '@salesforce/core'; import { SfCommand, Flags } from '@salesforce/sf-plugins-core'; import { SourceTracking } from '@salesforce/source-tracking'; import { ForceIgnore } from '@salesforce/source-deploy-retrieve'; -import { PreviewResult, printTables, compileResults, getConflictFiles } from '../../../utils/previewOutput'; +import { PreviewResult, printTables, compileResults, getConflictFiles } from '../../../utils/previewOutput.js'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'retrieve.metadata.preview'); export default class RetrieveMetadataPreview extends SfCommand { diff --git a/src/commands/project/retrieve/start.ts b/src/commands/project/retrieve/start.ts index d12adb15..fef75887 100644 --- a/src/commands/project/retrieve/start.ts +++ b/src/commands/project/retrieve/start.ts @@ -9,6 +9,7 @@ import { rm } from 'node:fs/promises'; import { dirname, join, resolve } from 'node:path'; import * as fs from 'node:fs'; +import { fileURLToPath } from 'node:url'; import { EnvironmentVariable, Lifecycle, Messages, OrgConfigProperties, SfError, SfProject } from '@salesforce/core'; import { RetrieveResult, @@ -27,15 +28,15 @@ import { SourceTracking, SourceConflictError } from '@salesforce/source-tracking import { Duration } from '@salesforce/kit'; import { Interfaces } from '@oclif/core'; -import { DEFAULT_ZIP_FILE_NAME, ensuredDirFlag, zipFileFlag } from '../../../utils/flags'; -import { RetrieveResultFormatter } from '../../../formatters/retrieveResultFormatter'; -import { MetadataRetrieveResultFormatter } from '../../../formatters/metadataRetrieveResultFormatter'; -import { getOptionalProject, getPackageDirs } from '../../../utils/project'; -import { RetrieveResultJson } from '../../../utils/types'; -import { writeConflictTable } from '../../../utils/conflicts'; -import { promisesQueue } from '../../../utils/promiseQueue'; +import { DEFAULT_ZIP_FILE_NAME, ensuredDirFlag, zipFileFlag } from '../../../utils/flags.js'; +import { RetrieveResultFormatter } from '../../../formatters/retrieveResultFormatter.js'; +import { MetadataRetrieveResultFormatter } from '../../../formatters/metadataRetrieveResultFormatter.js'; +import { getOptionalProject, getPackageDirs } from '../../../utils/project.js'; +import { RetrieveResultJson } from '../../../utils/types.js'; +import { writeConflictTable } from '../../../utils/conflicts.js'; +import { promisesQueue } from '../../../utils/promiseQueue.js'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'retrieve.start'); const mdTransferMessages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'metadata.transfer'); diff --git a/src/configMeta.ts b/src/configMeta.ts index 3cde41a3..e2d8b7fe 100644 --- a/src/configMeta.ts +++ b/src/configMeta.ts @@ -5,10 +5,12 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; import type { ConfigValue } from '@salesforce/core'; +import { Messages } from '@salesforce/core/lib/messages.js'; -import { Messages } from '@salesforce/core/lib/messages'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'config'); export enum ConfigVars { diff --git a/src/formatters/asyncDeployCancelResultFormatter.ts b/src/formatters/asyncDeployCancelResultFormatter.ts index 3f55a265..06e11aa5 100644 --- a/src/formatters/asyncDeployCancelResultFormatter.ts +++ b/src/formatters/asyncDeployCancelResultFormatter.ts @@ -4,11 +4,12 @@ * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { ux } from '@oclif/core'; import { Messages } from '@salesforce/core'; -import { AsyncDeployResultJson, DeployResultJson, Formatter } from '../utils/types'; - -Messages.importMessagesDirectory(__dirname); +import { AsyncDeployResultJson, DeployResultJson, Formatter } from '../utils/types.js'; +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); export const deployAsyncMessages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.async'); diff --git a/src/formatters/asyncDeployResultFormatter.ts b/src/formatters/asyncDeployResultFormatter.ts index 6c2f6196..f43a3772 100644 --- a/src/formatters/asyncDeployResultFormatter.ts +++ b/src/formatters/asyncDeployResultFormatter.ts @@ -4,11 +4,12 @@ * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { ux } from '@oclif/core'; import { Messages } from '@salesforce/core'; -import { AsyncDeployResultJson, Formatter } from '../utils/types'; - -Messages.importMessagesDirectory(__dirname); +import { AsyncDeployResultJson, Formatter } from '../utils/types.js'; +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); export const deployAsyncMessages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.async'); export class AsyncDeployResultFormatter implements Formatter { diff --git a/src/formatters/deleteResultFormatter.ts b/src/formatters/deleteResultFormatter.ts index 5b16f806..fd70548c 100644 --- a/src/formatters/deleteResultFormatter.ts +++ b/src/formatters/deleteResultFormatter.ts @@ -7,11 +7,11 @@ import { ux } from '@oclif/core'; import { DeployResult, FileResponse, RequestStatus } from '@salesforce/source-deploy-retrieve'; import { ensureArray } from '@salesforce/kit'; -import { bold, blue } from 'chalk'; +import chalk from 'chalk'; import { StandardColors } from '@salesforce/sf-plugins-core'; -import { DeleteSourceJson, Formatter, TestLevel } from '../utils/types'; -import { sortFileResponses, asRelativePaths } from '../utils/output'; -import { TestResultsFormatter } from '../formatters/testResultsFormatter'; +import { DeleteSourceJson, Formatter, TestLevel } from '../utils/types.js'; +import { sortFileResponses, asRelativePaths } from '../utils/output.js'; +import { TestResultsFormatter } from '../formatters/testResultsFormatter.js'; export class DeleteResultFormatter extends TestResultsFormatter implements Formatter { public constructor( @@ -75,7 +75,7 @@ export class DeleteResultFormatter extends TestResultsFormatter implements Forma } ux.log(''); - ux.styledHeader(blue('Deleted Source')); + ux.styledHeader(chalk.blue('Deleted Source')); ux.table( successes.map((entry) => ({ fullName: entry.fullName, @@ -106,7 +106,7 @@ export class DeleteResultFormatter extends TestResultsFormatter implements Forma error: { header: 'Problem' }, }; const options: ux.Table.table.Options = { - title: StandardColors.error(bold(`Component Failures [${failures.length}]`)), + title: StandardColors.error(chalk.bold(`Component Failures [${failures.length}]`)), 'no-truncate': true, }; ux.log(); diff --git a/src/formatters/deployCancelResultFormatter.ts b/src/formatters/deployCancelResultFormatter.ts index 08de925d..b1f57780 100644 --- a/src/formatters/deployCancelResultFormatter.ts +++ b/src/formatters/deployCancelResultFormatter.ts @@ -6,7 +6,7 @@ */ import { ux } from '@oclif/core'; import { DeployResult, RequestStatus } from '@salesforce/source-deploy-retrieve'; -import { DeployResultJson, Formatter } from '../utils/types'; +import { DeployResultJson, Formatter } from '../utils/types.js'; export class DeployCancelResultFormatter implements Formatter { public constructor(protected result: DeployResult) {} diff --git a/src/formatters/deployReportResultFormatter.ts b/src/formatters/deployReportResultFormatter.ts index 0654c0ac..71a13ed6 100644 --- a/src/formatters/deployReportResultFormatter.ts +++ b/src/formatters/deployReportResultFormatter.ts @@ -8,8 +8,8 @@ import { ux } from '@oclif/core'; import { RequestStatus } from '@salesforce/source-deploy-retrieve'; import { StandardColors } from '@salesforce/sf-plugins-core'; import { Duration } from '@salesforce/kit'; -import { tableHeader } from '../utils/output'; -import { DeployResultFormatter } from './deployResultFormatter'; +import { tableHeader } from '../utils/output.js'; +import { DeployResultFormatter } from './deployResultFormatter.js'; export class DeployReportResultFormatter extends DeployResultFormatter { public display(): void { diff --git a/src/formatters/deployResultFormatter.ts b/src/formatters/deployResultFormatter.ts index 55a60e62..ef2e1c3e 100644 --- a/src/formatters/deployResultFormatter.ts +++ b/src/formatters/deployResultFormatter.ts @@ -18,16 +18,22 @@ import { JUnitReporter, TestResult, } from '@salesforce/apex-node'; -import { DeployResultJson, isSdrFailure, isSdrSuccess, TestLevel, Verbosity, Formatter } from '../utils/types'; +import { DeployResultJson, isSdrFailure, isSdrSuccess, TestLevel, Verbosity, Formatter } from '../utils/types.js'; import { generateCoveredLines, getCoverageFormattersOptions, getCoverageNumbers, mapTestResults, transformCoverageToApexCoverage, -} from '../utils/coverage'; -import { sortFileResponses, asRelativePaths, tableHeader, getFileResponseSuccessProps, error } from '../utils/output'; -import { TestResultsFormatter } from '../formatters/testResultsFormatter'; +} from '../utils/coverage.js'; +import { + sortFileResponses, + asRelativePaths, + tableHeader, + getFileResponseSuccessProps, + error, +} from '../utils/output.js'; +import { TestResultsFormatter } from '../formatters/testResultsFormatter.js'; export class DeployResultFormatter extends TestResultsFormatter implements Formatter { private relativeFiles: FileResponse[]; diff --git a/src/formatters/metadataConvertResultFormatter.ts b/src/formatters/metadataConvertResultFormatter.ts index 11a86b2b..8c6d82f7 100644 --- a/src/formatters/metadataConvertResultFormatter.ts +++ b/src/formatters/metadataConvertResultFormatter.ts @@ -7,7 +7,7 @@ import * as path from 'node:path'; import { ux } from '@oclif/core'; import { ConvertResult } from '@salesforce/source-deploy-retrieve'; -import { Formatter, ConvertMdapiJson } from '../utils/types'; +import { Formatter, ConvertMdapiJson } from '../utils/types.js'; export class MetadataConvertResultFormatter implements Formatter { private convertResults!: ConvertMdapiJson; diff --git a/src/formatters/metadataRetrieveResultFormatter.ts b/src/formatters/metadataRetrieveResultFormatter.ts index 7b7467a7..ef0f9076 100644 --- a/src/formatters/metadataRetrieveResultFormatter.ts +++ b/src/formatters/metadataRetrieveResultFormatter.ts @@ -4,14 +4,15 @@ * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import * as path from 'node:path'; +import { join, parse, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { ux } from '@oclif/core'; import { FileResponse, RetrieveResult } from '@salesforce/source-deploy-retrieve'; import { Messages } from '@salesforce/core'; -import { Formatter, MetadataRetrieveResultJson } from '../utils/types'; -import { sortFileResponses, asRelativePaths } from '../utils/output'; +import { Formatter, MetadataRetrieveResultJson } from '../utils/types.js'; +import { sortFileResponses, asRelativePaths } from '../utils/output.js'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); export const retrieveMessages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'retrieve.start'); export class MetadataRetrieveResultFormatter implements Formatter { @@ -21,7 +22,7 @@ export class MetadataRetrieveResultFormatter implements Formatter { ux.log(retrieveMessages.getMessage('info.WroteZipFile', [this.zipFilePath])); if (this.opts.unzip) { - const extractPath = path.join(this.opts['target-metadata-dir'], path.parse(this.opts['zip-file-name']).name); + const extractPath = join(this.opts['target-metadata-dir'], parse(this.opts['zip-file-name']).name); ux.log(retrieveMessages.getMessage('info.ExtractedZipFile', [this.zipFilePath, extractPath])); } } diff --git a/src/formatters/retrieveResultFormatter.ts b/src/formatters/retrieveResultFormatter.ts index 82a29fa8..fd6dff8e 100644 --- a/src/formatters/retrieveResultFormatter.ts +++ b/src/formatters/retrieveResultFormatter.ts @@ -9,8 +9,8 @@ import { Ux } from '@salesforce/sf-plugins-core'; import { FileResponse, RetrieveMessage, RetrieveResult } from '@salesforce/source-deploy-retrieve'; import { NamedPackageDir, SfProject } from '@salesforce/core'; import { ensureArray } from '@salesforce/kit'; -import { Formatter, isSdrSuccess, RetrieveResultJson } from '../utils/types'; -import { sortFileResponses, asRelativePaths, tableHeader, getFileResponseSuccessProps } from '../utils/output'; +import { Formatter, isSdrSuccess, RetrieveResultJson } from '../utils/types.js'; +import { sortFileResponses, asRelativePaths, tableHeader, getFileResponseSuccessProps } from '../utils/output.js'; export class RetrieveResultFormatter implements Formatter { private files: FileResponse[]; diff --git a/src/formatters/sourceConvertResultFormatter.ts b/src/formatters/sourceConvertResultFormatter.ts index f1211492..d554f650 100644 --- a/src/formatters/sourceConvertResultFormatter.ts +++ b/src/formatters/sourceConvertResultFormatter.ts @@ -4,13 +4,14 @@ * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import { resolve } from 'node:path'; +import { resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { ux } from '@oclif/core'; import { ConvertResult } from '@salesforce/source-deploy-retrieve'; import { SfError, Messages } from '@salesforce/core'; -import { ConvertResultJson, Formatter } from '../utils/types'; +import { ConvertResultJson, Formatter } from '../utils/types.js'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); export const convertMessages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'convert.source'); export class SourceConvertResultFormatter implements Formatter { diff --git a/src/formatters/testResultsFormatter.ts b/src/formatters/testResultsFormatter.ts index 6c8047c2..37f9857b 100644 --- a/src/formatters/testResultsFormatter.ts +++ b/src/formatters/testResultsFormatter.ts @@ -6,7 +6,7 @@ */ import * as os from 'node:os'; import { ux } from '@oclif/core'; -import { dim, underline } from 'chalk'; +import chalk from 'chalk'; import { CodeCoverage, CodeCoverageWarnings, @@ -17,9 +17,9 @@ import { Successes, } from '@salesforce/source-deploy-retrieve'; import { ensureArray } from '@salesforce/kit'; -import { TestLevel, Verbosity } from '../utils/types'; -import { tableHeader, error, success, check } from '../utils/output'; -import { coverageOutput } from '../utils/coverage'; +import { TestLevel, Verbosity } from '../utils/types.js'; +import { tableHeader, error, success, check } from '../utils/output.js'; +import { coverageOutput } from '../utils/coverage.js'; export class TestResultsFormatter { public testLevel: TestLevel | undefined; @@ -75,7 +75,7 @@ const displayVerboseTestSuccesses = (resultSuccesses: RunTestResult['successes'] ux.log(); ux.log(success(`Test Success [${successes.length}]`)); for (const test of successes) { - const testName = underline(`${test.name}.${test.methodName}`); + const testName = chalk.underline(`${test.name}.${test.methodName}`); ux.log(`${check} ${testName}`); } } @@ -89,12 +89,12 @@ const displayVerboseTestFailures = (response: MetadataApiDeployStatus): void => ux.log(); ux.log(error(`Test Failures [${failureCount}]`)); for (const test of failures) { - const testName = underline(`${test.name}.${test.methodName}`); + const testName = chalk.underline(`${test.name}.${test.methodName}`); ux.log(`• ${testName}`); - ux.log(` ${dim('message')}: ${test.message}`); + ux.log(` ${chalk.dim('message')}: ${test.message}`); if (test.stackTrace) { const stackTrace = test.stackTrace.replace(/\n/g, `${os.EOL} `); - ux.log(` ${dim('stacktrace')}: ${os.EOL} ${stackTrace}`); + ux.log(` ${chalk.dim('stacktrace')}: ${os.EOL} ${stackTrace}`); } ux.log(); } diff --git a/src/hooks/deploy.ts b/src/hooks/deploy.ts index a7834d42..1870a1d3 100644 --- a/src/hooks/deploy.ts +++ b/src/hooks/deploy.ts @@ -7,7 +7,7 @@ import { SfProject } from '@salesforce/core'; import { SfHook } from '@salesforce/sf-plugins-core'; -import { MetadataDeployer } from '../utils/metadataDeployer'; +import { MetadataDeployer } from '../utils/metadataDeployer.js'; const hook: SfHook.Deploy = async function () { const project = await SfProject.resolve(); diff --git a/src/index.ts b/src/index.ts index c5811107..af79a8cd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,4 +5,4 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -export = {}; +export default {}; diff --git a/src/utils/coverage.ts b/src/utils/coverage.ts index 46e4352d..2946054d 100644 --- a/src/utils/coverage.ts +++ b/src/utils/coverage.ts @@ -5,7 +5,6 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ import * as path from 'node:path'; - import { ApexTestResultData, ApexTestResultOutcome, @@ -18,7 +17,6 @@ import { import { Successes, Failures, CodeCoverage } from '@salesforce/source-deploy-retrieve'; import { ensureArray } from '@salesforce/kit'; import { StandardColors } from '@salesforce/sf-plugins-core'; -import { Chalk } from 'chalk'; export const mapTestResults = (testResults: T[]): ApexTestResultData[] => testResults.map((testResult) => ({ @@ -104,7 +102,7 @@ export const coverageOutput = ( : '', }); -const color = (percent: number): Chalk => +const color = (percent: number): typeof StandardColors.success => percent >= 90 ? StandardColors.success : percent >= 75 ? StandardColors.warning : StandardColors.error; const formatPercent = (percent: number): string => color(percent)(`${percent}%`); diff --git a/src/utils/deploy.ts b/src/utils/deploy.ts index 33701bae..466b8f91 100644 --- a/src/utils/deploy.ts +++ b/src/utils/deploy.ts @@ -5,6 +5,8 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { ConfigAggregator, Messages, Org, SfError, SfProject } from '@salesforce/core'; import { Duration } from '@salesforce/kit'; import { Nullable } from '@salesforce/ts-types'; @@ -17,14 +19,14 @@ import { RequestStatus, } from '@salesforce/source-deploy-retrieve'; import { SourceTracking } from '@salesforce/source-tracking'; -import ConfigMeta, { ConfigVars } from '../configMeta'; -import { getPackageDirs, getSourceApiVersion } from './project'; -import { API, PathInfo, TestLevel } from './types'; -import { DEPLOY_STATUS_CODES } from './errorCodes'; -import { DeployCache } from './deployCache'; -import { writeManifest } from './manifestCache'; - -Messages.importMessagesDirectory(__dirname); +import ConfigMeta, { ConfigVars } from '../configMeta.js'; +import { getPackageDirs, getSourceApiVersion } from './project.js'; +import { API, PathInfo, TestLevel } from './types.js'; +import { DEPLOY_STATUS_CODES } from './errorCodes.js'; +import { DeployCache } from './deployCache.js'; +import { writeManifest } from './manifestCache.js'; + +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); export const cacheMessages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'cache'); const deployMessages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata'); @@ -79,7 +81,7 @@ export async function buildComponentSet(opts: Partial, stl?: Sour /** localChangesAsComponentSet returned an array to support multiple sequential deploys. * `sf` chooses not to support this so we force one ComponentSet */ - const cs = (await stl.localChangesAsComponentSet(false))?.[0] ?? new ComponentSet(); + const cs = (await stl.localChangesAsComponentSet(false))[0] ?? new ComponentSet(); // stl produces a cs with api version already set. command might have specified a version. if (opts['api-version']) { cs.apiVersion = opts['api-version']; diff --git a/src/utils/deployCache.ts b/src/utils/deployCache.ts index df38990a..d7446abd 100644 --- a/src/utils/deployCache.ts +++ b/src/utils/deployCache.ts @@ -7,8 +7,8 @@ import { Global, TTLConfig } from '@salesforce/core'; import { Duration } from '@salesforce/kit'; import { JsonMap } from '@salesforce/ts-types'; -import { DeployOptions, CachedOptions, cacheMessages } from './deploy'; -import { maybeDestroyManifest } from './manifestCache'; +import { DeployOptions, CachedOptions, cacheMessages } from './deploy.js'; +import { maybeDestroyManifest } from './manifestCache.js'; export class DeployCache extends TTLConfig { public static getFileName(): string { diff --git a/src/utils/errorCodes.ts b/src/utils/errorCodes.ts index 90c67866..bdfbea7a 100644 --- a/src/utils/errorCodes.ts +++ b/src/utils/errorCodes.ts @@ -5,10 +5,12 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { Messages } from '@salesforce/core'; import { RequestStatus } from '@salesforce/source-deploy-retrieve'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'errorCodes'); export const DEPLOY_STATUS_CODES = new Map([ diff --git a/src/utils/flags.ts b/src/utils/flags.ts index df4b86d9..20a35235 100644 --- a/src/utils/flags.ts +++ b/src/utils/flags.ts @@ -5,12 +5,13 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ import * as fs from 'node:fs'; -import { resolve, extname } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { resolve, extname, dirname } from 'node:path'; import { Flags } from '@oclif/core'; import { Messages, Lifecycle } from '@salesforce/core'; -import { PathInfo, TestLevel, reportsFormatters } from './types'; +import { PathInfo, TestLevel, reportsFormatters } from './types.js'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'validation'); const commonFlagMessages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'commonFlags'); @@ -88,7 +89,7 @@ export const zipFileFlag = Flags.custom({ parse: async (input) => Promise.resolve(resolveZipFileName(input)), }); -export const testsFlag = Flags.string({ +export const testsFlag = Flags.custom({ char: 't', multiple: true, dependsOn: ['test-level'], @@ -102,7 +103,7 @@ export const testsFlag = Flags.string({ ), }); -export const coverageFormattersFlag = Flags.string({ +export const coverageFormattersFlag = Flags.custom({ multiple: true, summary: commonFlagMessages.getMessage('flags.coverage-formatters.summary'), description: commonFlagMessages.getMessage('flags.coverage-formatters.description'), diff --git a/src/utils/metadataDeployer.ts b/src/utils/metadataDeployer.ts index 8a41f442..8e5662c0 100644 --- a/src/utils/metadataDeployer.ts +++ b/src/utils/metadataDeployer.ts @@ -6,8 +6,10 @@ */ /* eslint-disable class-methods-use-this */ +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { EOL } from 'node:os'; -import { cyan, red } from 'chalk'; +import chalk from 'chalk'; import { Duration } from '@salesforce/kit'; import { AuthInfo, @@ -21,12 +23,12 @@ import { } from '@salesforce/core'; import { Deployable, Deployer, DeployerResult, generateTableChoices } from '@salesforce/sf-plugins-core'; -import { DeployResultFormatter } from '../formatters/deployResultFormatter'; -import { TestLevel } from './types'; -import { DeployProgress } from './progressBar'; -import { determineExitCode, executeDeploy, resolveApi } from './deploy'; +import { DeployResultFormatter } from '../formatters/deployResultFormatter.js'; +import { TestLevel } from './types.js'; +import { DeployProgress } from './progressBar.js'; +import { determineExitCode, executeDeploy, resolveApi } from './deploy.js'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy'); type OrgAuthWithTimestamp = OrgAuthorization & { timestamp: Date }; @@ -123,7 +125,7 @@ export class MetadataDeployer extends Deployer { public async deploy(): Promise { const directories = this.deployables.map((d) => d.pkg.fullPath); - const name = this.deployables.map((p) => cyan.bold(p.getPath())).join(', '); + const name = this.deployables.map((p) => chalk.cyan.bold(p.getPath())).join(', '); const api = await resolveApi(); this.log(`${EOL}Deploying ${name} to ${this.username} using ${api} API`); @@ -176,7 +178,7 @@ export class MetadataDeployer extends Deployer { { name: 'continue', type: 'confirm', - message: red(messages.getMessage('warning.TargetOrgIsExpired', [aliasOrUsername])), + message: chalk.red(messages.getMessage('warning.TargetOrgIsExpired', [aliasOrUsername])), }, ]); if (!continueAnswer.continue) { diff --git a/src/utils/output.ts b/src/utils/output.ts index 432a506b..a566e4be 100644 --- a/src/utils/output.ts +++ b/src/utils/output.ts @@ -6,12 +6,12 @@ */ import * as path from 'node:path'; -import { blue, bold } from 'chalk'; +import chalk from 'chalk'; import { StandardColors } from '@salesforce/sf-plugins-core'; import { FileResponse, FileResponseFailure, FileResponseSuccess } from '@salesforce/source-deploy-retrieve'; export function tableHeader(message: string): string { - return blue(bold(message)); + return chalk.blue.bold(message); } export function asRelativePaths( @@ -46,11 +46,11 @@ export const getFileResponseSuccessProps = ( successes.map((s) => ({ filePath: s.filePath, fullName: s.fullName, type: s.type, state: s.state })); export function error(message: string): string { - return StandardColors.error(bold(message)); + return StandardColors.error(chalk.bold(message)); } export function success(message: string): string { - return StandardColors.success(bold(message)); + return StandardColors.success(chalk.bold(message)); } export const check = StandardColors.success('✓'); diff --git a/src/utils/previewOutput.ts b/src/utils/previewOutput.ts index 348ddf8b..32c2dc52 100644 --- a/src/utils/previewOutput.ts +++ b/src/utils/previewOutput.ts @@ -4,10 +4,11 @@ * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import * as path from 'node:path'; +import { isAbsolute, relative, resolve, dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { ux } from '@oclif/core'; import { StandardColors } from '@salesforce/sf-plugins-core'; -import { bold, dim } from 'chalk'; +import chalk from 'chalk'; import { Messages } from '@salesforce/core'; import { ComponentSet, @@ -18,12 +19,12 @@ import { MetadataType, SourceComponent, } from '@salesforce/source-deploy-retrieve'; -import { filePathsFromMetadataComponent } from '@salesforce/source-deploy-retrieve/lib/src/utils/filePathGenerator'; +import { filePathsFromMetadataComponent } from '@salesforce/source-deploy-retrieve/lib/src/utils/filePathGenerator.js'; import { SourceTracking } from '@salesforce/source-tracking'; -import { isSourceComponentWithXml } from './types'; +import { isSourceComponentWithXml } from './types.js'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'previewMessages'); type BaseOperation = 'deploy' | 'retrieve'; @@ -48,7 +49,7 @@ export interface PreviewResult { toRetrieve: PreviewFile[]; } -const ensureAbsolutePath = (f: string): string => (path.isAbsolute(f) ? f : path.resolve(f)); +const ensureAbsolutePath = (f: string): string => (isAbsolute(f) ? f : resolve(f)); // borrowed from STL populateFilesPaths. // TODO: this goes in SDR maybe? @@ -134,9 +135,9 @@ export const compileResults = ({ const someFile = c.xml ?? c.content; if (someFile) { return { - path: path.isAbsolute(someFile) ? someFile : path.resolve(someFile), + path: isAbsolute(someFile) ? someFile : resolve(someFile), // for cleaner output - projectRelativePath: path.relative(projectPath, someFile), + projectRelativePath: relative(projectPath, someFile), }; } return {}; @@ -183,7 +184,7 @@ export const compileResults = ({ const ignoredSourceComponents = resolvePaths([...(componentSet.forceIgnoredPaths ?? [])]).map( (resolved): PreviewFile => ({ ...resolved, - ...(resolved.path ? { projectRelativePath: path.relative(projectPath, resolved.path) } : {}), + ...(resolved.path ? { projectRelativePath: relative(projectPath, resolved.path) } : {}), conflict: false, ignored: true, }) @@ -201,10 +202,10 @@ export const compileResults = ({ const printDeployTable = (files: PreviewFile[]): void => { ux.log(); if (files.length === 0) { - ux.log(dim(messages.getMessage('deploy.none'))); + ux.log(chalk.dim(messages.getMessage('deploy.none'))); } else { // not using table title property to avoid all the ASCII art - ux.log(StandardColors.success(bold(messages.getMessage('deploy.header', [files.length])))); + ux.log(StandardColors.success(chalk.bold(messages.getMessage('deploy.header', [files.length])))); ux.table(files, columns); } }; @@ -212,10 +213,10 @@ const printDeployTable = (files: PreviewFile[]): void => { const printRetrieveTable = (files: PreviewFile[]): void => { ux.log(); if (files.length === 0) { - ux.log(dim(messages.getMessage('retrieve.none'))); + ux.log(chalk.dim(messages.getMessage('retrieve.none'))); } else { // not using table title property to avoid all the ASCII art - ux.log(StandardColors.success(bold(messages.getMessage('retrieve.header', [files.length])))); + ux.log(StandardColors.success(chalk.bold(messages.getMessage('retrieve.header', [files.length])))); ux.table(files, columns); } }; @@ -223,9 +224,9 @@ const printRetrieveTable = (files: PreviewFile[]): void => { const printDeleteTable = (files: PreviewFile[]): void => { ux.log(); if (files.length === 0) { - ux.log(dim(messages.getMessage('delete.none'))); + ux.log(chalk.dim(messages.getMessage('delete.none'))); } else { - ux.log(StandardColors.warning(bold(messages.getMessage('delete.header', [files.length])))); + ux.log(StandardColors.warning(chalk.bold(messages.getMessage('delete.header', [files.length])))); ux.table(files, columns); } }; @@ -233,9 +234,9 @@ const printDeleteTable = (files: PreviewFile[]): void => { const printConflictsTable = (files: PreviewFile[]): void => { ux.log(); if (files.length === 0) { - ux.log(dim(messages.getMessage('conflicts.none'))); + ux.log(chalk.dim(messages.getMessage('conflicts.none'))); } else { - ux.log(StandardColors.error(bold(messages.getMessage('conflicts.header', [files.length])))); + ux.log(StandardColors.error(chalk.bold(messages.getMessage('conflicts.header', [files.length])))); ux.table(files, columns, { sort: 'path' }); } }; @@ -243,9 +244,9 @@ const printConflictsTable = (files: PreviewFile[]): void => { export const printIgnoredTable = (files: PreviewFile[], baseOperation: BaseOperation): void => { ux.log(); if (files.length === 0) { - ux.log(dim(messages.getMessage('ignored.none'))); + ux.log(chalk.dim(messages.getMessage('ignored.none'))); } else { - ux.log(dim(messages.getMessage('ignored.header', [files.length, baseOperation]))); + ux.log(chalk.dim(messages.getMessage('ignored.header', [files.length, baseOperation]))); ux.table(files, columns, { sort: 'path' }); } }; @@ -265,4 +266,4 @@ export const printTables = (result: PreviewResult, baseOperation: BaseOperation) export const getConflictFiles = async (stl?: SourceTracking, ignore = false): Promise> => !stl || ignore ? new Set() - : new Set((await stl.getConflicts()).flatMap((conflict) => (conflict.filenames ?? []).map((f) => path.resolve(f)))); + : new Set((await stl.getConflicts()).flatMap((conflict) => (conflict.filenames ?? []).map((f) => resolve(f)))); diff --git a/src/utils/progressBar.ts b/src/utils/progressBar.ts index 6d189be7..1a2de233 100644 --- a/src/utils/progressBar.ts +++ b/src/utils/progressBar.ts @@ -4,13 +4,13 @@ * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ - -import { envVars as env, EnvironmentVariable } from '@salesforce/core'; +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { envVars as env, EnvironmentVariable, Messages } from '@salesforce/core'; import { MetadataApiDeploy, MetadataApiDeployStatus } from '@salesforce/source-deploy-retrieve'; -import { Messages } from '@salesforce/core'; import { Progress } from '@salesforce/sf-plugins-core'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const mdTransferMessages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'metadata.transfer'); const showBar = Boolean( diff --git a/test/.eslintrc.cjs b/test/.eslintrc.cjs index fadf2c90..05cd7ab8 100644 --- a/test/.eslintrc.cjs +++ b/test/.eslintrc.cjs @@ -13,8 +13,6 @@ module.exports = { // Allow assert style expressions. i.e. expect(true).to.be.true 'no-unused-expressions': 'off', - // It is common for tests to stub out method. - // Return types are defined by the source code. Allows for quick overwrites. '@typescript-eslint/explicit-function-return-type': 'off', // Mocked out the methods that shouldn't do anything in the tests. diff --git a/test/commands/convert/source.test.ts b/test/commands/convert/source.test.ts index df6f07d8..794e0994 100644 --- a/test/commands/convert/source.test.ts +++ b/test/commands/convert/source.test.ts @@ -7,14 +7,14 @@ import { join, resolve, sep } from 'node:path'; import { ComponentSetBuilder, ComponentSetOptions, MetadataConverter } from '@salesforce/source-deploy-retrieve'; -import * as sinon from 'sinon'; +import sinon from 'sinon'; import { expect } from 'chai'; import { stubMethod } from '@salesforce/ts-sinon'; -import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup'; +import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup.js'; import { stubSfCommandUx } from '@salesforce/sf-plugins-core'; -import * as oclifUtils from '@oclif/core/lib/util'; +import oclifUtils from '@oclif/core/lib/util/fs.js'; import { SfProject } from '@salesforce/core'; -import { Source } from '../../../src/commands/project/convert/source'; +import { Source } from '../../../src/commands/project/convert/source.js'; describe('project convert source', () => { const $$ = new TestContext(); diff --git a/test/commands/delete/source.test.ts b/test/commands/delete/source.test.ts index c1ebbf55..4b77d2ea 100644 --- a/test/commands/delete/source.test.ts +++ b/test/commands/delete/source.test.ts @@ -5,8 +5,8 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import * as fs from 'node:fs'; -import * as sinon from 'sinon'; +import fs from 'node:fs'; +import sinon from 'sinon'; import { expect } from 'chai'; import { ComponentSet, @@ -17,13 +17,11 @@ import { import { Lifecycle, SfProject } from '@salesforce/core'; import { fromStub, stubInterface, stubMethod } from '@salesforce/ts-sinon'; import { Config } from '@oclif/core'; -import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup'; +import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup.js'; import { SfCommand } from '@salesforce/sf-plugins-core'; -import { ComponentProperties } from '@salesforce/source-deploy-retrieve/lib/src/resolve/sourceComponent'; -import { Source } from '../../../src/commands/project/delete/source'; -import { DeployCache } from '../../../src/utils/deployCache'; - -const fsPromises = fs.promises; +import { ComponentProperties } from '@salesforce/source-deploy-retrieve/lib/src/resolve/sourceComponent.js'; +import { Source } from '../../../src/commands/project/delete/source.js'; +import { DeployCache } from '../../../src/utils/deployCache.js'; export const exampleSourceComponent: ComponentProperties = { name: 'GeocodingService', @@ -151,7 +149,7 @@ describe('project delete source', () => { onError: () => {}, }); stubMethod($$.SANDBOX, cmd, 'handlePrompt').returns(confirm); - fsUnlink = stubMethod($$.SANDBOX, fsPromises, 'unlink').resolves(true); + fsUnlink = stubMethod($$.SANDBOX, fs.promises, 'unlink').resolves(true); stubMethod($$.SANDBOX, DeployCache, 'update').resolves(); return cmd.runIt(); diff --git a/test/commands/deploy.nut.ts b/test/commands/deploy.nut.ts index 4df08955..b7f13afc 100644 --- a/test/commands/deploy.nut.ts +++ b/test/commands/deploy.nut.ts @@ -7,9 +7,9 @@ import * as path from 'node:path'; import { SourceTestkit } from '@salesforce/source-testkit'; -import { writeJson } from '../../src/commands/deploy'; -import { TestLevel } from '../../src/utils/types'; -import { MetadataDeployer } from '../../src/utils/metadataDeployer'; +import { writeJson } from '../../src/commands/deploy.js'; +import { TestLevel } from '../../src/utils/types.js'; +import { MetadataDeployer } from '../../src/utils/metadataDeployer.js'; describe('deploy NUTs', () => { let testkit: SourceTestkit; diff --git a/test/commands/deploy.test.ts b/test/commands/deploy.test.ts index c4afa3c1..5de53559 100644 --- a/test/commands/deploy.test.ts +++ b/test/commands/deploy.test.ts @@ -9,7 +9,7 @@ import { expect } from 'chai'; import { Hook } from '@oclif/core'; import { Deployer } from '@salesforce/sf-plugins-core'; -import Deploy from '../../src/commands/deploy'; +import Deploy from '../../src/commands/deploy.js'; import Result = Hook.Result; class TestDeploy extends Deploy { diff --git a/test/commands/deploy/metadata/cancel.nut.ts b/test/commands/deploy/metadata/cancel.nut.ts index 7a419e61..f875d007 100644 --- a/test/commands/deploy/metadata/cancel.nut.ts +++ b/test/commands/deploy/metadata/cancel.nut.ts @@ -11,8 +11,8 @@ import { strict as assert } from 'node:assert'; import { TestSession, execCmd } from '@salesforce/cli-plugins-testkit'; import { expect } from 'chai'; import { RequestStatus } from '@salesforce/source-deploy-retrieve'; -import { DeployResultJson } from '../../../../src/utils/types'; -import { CachedOptions } from '../../../../src/utils/deploy'; +import { DeployResultJson } from '../../../../src/utils/types.js'; +import { CachedOptions } from '../../../../src/utils/deploy.js'; function readDeployCache(sessionDir: string): Record { const contents = fs.readFileSync(path.join(sessionDir, '.sf', 'deploy-cache.json'), 'utf-8'); diff --git a/test/commands/deploy/metadata/quick.nut.ts b/test/commands/deploy/metadata/quick.nut.ts index 7bad5ebe..da6eab6a 100644 --- a/test/commands/deploy/metadata/quick.nut.ts +++ b/test/commands/deploy/metadata/quick.nut.ts @@ -8,7 +8,7 @@ import { SourceTestkit } from '@salesforce/source-testkit'; import { assert, config } from 'chai'; import { execCmd } from '@salesforce/cli-plugins-testkit'; -import { DeployResultJson } from '../../../../src/utils/types'; +import { DeployResultJson } from '../../../../src/utils/types.js'; config.truncateThreshold = 0; describe('deploy metadata quick NUTs', () => { diff --git a/test/commands/deploy/metadata/report-mdapi.nut.ts b/test/commands/deploy/metadata/report-mdapi.nut.ts index 8c0cbfff..b86333de 100644 --- a/test/commands/deploy/metadata/report-mdapi.nut.ts +++ b/test/commands/deploy/metadata/report-mdapi.nut.ts @@ -10,7 +10,7 @@ import { join, resolve } from 'node:path'; import { SourceTestkit } from '@salesforce/source-testkit'; import { assert, expect } from 'chai'; import { RequestStatus } from '@salesforce/source-deploy-retrieve'; -import { DeployResultJson } from '../../../../src/utils/types'; +import { DeployResultJson } from '../../../../src/utils/types.js'; describe('[project deploy report] NUTs with metadata-dir', () => { let testkit: SourceTestkit; diff --git a/test/commands/deploy/metadata/report.nut.ts b/test/commands/deploy/metadata/report.nut.ts index f21f11a0..69004d76 100644 --- a/test/commands/deploy/metadata/report.nut.ts +++ b/test/commands/deploy/metadata/report.nut.ts @@ -10,7 +10,7 @@ import { join, resolve } from 'node:path'; import { SourceTestkit } from '@salesforce/source-testkit'; import { assert, isObject } from '@salesforce/ts-types'; import { expect } from 'chai'; -import { DeployResultJson } from '../../../../src/utils/types'; +import { DeployResultJson } from '../../../../src/utils/types.js'; describe('[project deploy report] NUTs with source-dir', () => { let testkit: SourceTestkit; diff --git a/test/commands/deploy/metadata/resume.nut.ts b/test/commands/deploy/metadata/resume.nut.ts index 0864350d..d1ff038a 100644 --- a/test/commands/deploy/metadata/resume.nut.ts +++ b/test/commands/deploy/metadata/resume.nut.ts @@ -11,8 +11,8 @@ import { strict as assert } from 'node:assert'; import { SourceTestkit } from '@salesforce/source-testkit'; import { expect } from 'chai'; import { RequestStatus } from '@salesforce/source-deploy-retrieve'; -import { DeployResultJson } from '../../../../src/utils/types'; -import { CachedOptions } from '../../../../src/utils/deploy'; +import { DeployResultJson } from '../../../../src/utils/types.js'; +import { CachedOptions } from '../../../../src/utils/deploy.js'; function readDeployCache(projectDir: string): Record { // source-testkit doesn't expose the session, so we'll go up 1 level from the project to get to it diff --git a/test/commands/deploy/metadata/validate.nut.ts b/test/commands/deploy/metadata/validate.nut.ts index 83042650..5dc1506c 100644 --- a/test/commands/deploy/metadata/validate.nut.ts +++ b/test/commands/deploy/metadata/validate.nut.ts @@ -10,7 +10,7 @@ import { SourceTestkit } from '@salesforce/source-testkit'; import { isObject } from '@salesforce/ts-types'; import { assert, expect } from 'chai'; import { execCmd } from '@salesforce/cli-plugins-testkit'; -import { DeployResultJson } from '../../../../src/utils/types'; +import { DeployResultJson } from '../../../../src/utils/types.js'; describe('deploy metadata validate NUTs', () => { let testkit: SourceTestkit; diff --git a/test/commands/deploy/start.test.ts b/test/commands/deploy/start.test.ts index 21fecb60..39b2d801 100644 --- a/test/commands/deploy/start.test.ts +++ b/test/commands/deploy/start.test.ts @@ -5,13 +5,15 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { expect } from 'chai'; -import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup'; +import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup.js'; import { stubSfCommandUx } from '@salesforce/sf-plugins-core'; import { Messages } from '@salesforce/core'; -import DeployMetadata from '../../../src/commands/project/deploy/start'; +import DeployMetadata from '../../../src/commands/project/deploy/start.js'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'deploy.metadata'); describe('project deploy start', () => { diff --git a/test/commands/retrieve/start.test.ts b/test/commands/retrieve/start.test.ts index ce7f2ce7..f71211bf 100644 --- a/test/commands/retrieve/start.test.ts +++ b/test/commands/retrieve/start.test.ts @@ -5,8 +5,9 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import * as path from 'node:path'; -import * as sinon from 'sinon'; +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import sinon from 'sinon'; import { expect } from 'chai'; import { ComponentLike, @@ -20,15 +21,15 @@ import { import { Messages, SfProject } from '@salesforce/core'; import { stubMethod } from '@salesforce/ts-sinon'; import { stubSfCommandUx, stubSpinner, stubUx } from '@salesforce/sf-plugins-core'; -import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup'; -import * as oclifUtils from '@oclif/core/lib/util'; -import { RetrieveResultFormatter } from '../../../src/formatters/retrieveResultFormatter'; -import { getRetrieveResult } from '../../utils/retrieveResponse'; -import { RetrieveResultJson } from '../../../src/utils/types'; -import { exampleSourceComponent } from '../../utils/testConsts'; -import RetrieveMetadata from '../../../src/commands/project/retrieve/start'; +import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup.js'; +import oclifUtils from '@oclif/core/lib/util/fs.js'; +import { RetrieveResultFormatter } from '../../../src/formatters/retrieveResultFormatter.js'; +import { getRetrieveResult } from '../../utils/retrieveResponse.js'; +import { RetrieveResultJson } from '../../../src/utils/types.js'; +import { exampleSourceComponent } from '../../utils/testConsts.js'; +import RetrieveMetadata from '../../../src/commands/project/retrieve/start.js'; -Messages.importMessagesDirectory(__dirname); +Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url))); const messages = Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'retrieve.start'); describe('project retrieve start', () => { @@ -151,7 +152,7 @@ describe('project retrieve start', () => { metadataEntries: ['ApexClass:MyClass'], }, }); - ensureRetrieveArgs({ output: path.resolve(sourcepath[0]), format: 'source' }); + ensureRetrieveArgs({ output: resolve(sourcepath[0]), format: 'source' }); expect(renameStub.calledOnce).to.be.true; }); diff --git a/test/nuts/convert/mdapi.nut.ts b/test/nuts/convert/mdapi.nut.ts index 7f571ad0..f130e6df 100644 --- a/test/nuts/convert/mdapi.nut.ts +++ b/test/nuts/convert/mdapi.nut.ts @@ -9,7 +9,7 @@ import * as path from 'node:path'; import { expect, assert } from 'chai'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { ComponentSet, SourceComponent } from '@salesforce/source-deploy-retrieve'; -import { ConvertMdapiJson } from '../../../src/utils/types'; +import { ConvertMdapiJson } from '../../../src/utils/types.js'; let session: TestSession; diff --git a/test/nuts/convert/source.nut.ts b/test/nuts/convert/source.nut.ts index 12af8012..fe9c1e2b 100644 --- a/test/nuts/convert/source.nut.ts +++ b/test/nuts/convert/source.nut.ts @@ -8,7 +8,7 @@ import * as fs from 'node:fs'; import * as path from 'node:path'; import { expect } from 'chai'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; -import { ConvertResultJson } from '../../../src/utils/types'; +import { ConvertResultJson } from '../../../src/utils/types.js'; let session: TestSession; diff --git a/test/nuts/delete/source.nut.ts b/test/nuts/delete/source.nut.ts index 020f764d..2ed79d06 100644 --- a/test/nuts/delete/source.nut.ts +++ b/test/nuts/delete/source.nut.ts @@ -13,7 +13,7 @@ import { SourceTestkit } from '@salesforce/source-testkit'; import { FileResponse } from '@salesforce/source-deploy-retrieve'; import { AuthInfo, Connection } from '@salesforce/core'; import { ensureArray } from '@salesforce/ts-types'; -import { DeleteSourceJson } from '../../../src/utils/types'; +import { DeleteSourceJson } from '../../../src/utils/types.js'; const isNameObsolete = async (username: string, memberType: string, memberName: string): Promise => { const connection = await Connection.create({ diff --git a/test/nuts/deploy/formatter.nut.ts b/test/nuts/deploy/formatter.nut.ts index 3e4653b4..c3c889a8 100644 --- a/test/nuts/deploy/formatter.nut.ts +++ b/test/nuts/deploy/formatter.nut.ts @@ -9,7 +9,7 @@ import * as path from 'node:path'; import { EOL } from 'node:os'; import { expect } from 'chai'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; -import { DeployResultJson } from '../../../src/utils/types'; +import { DeployResultJson } from '../../../src/utils/types.js'; describe('Deploy Formatter', () => { let testkit: TestSession; diff --git a/test/nuts/deploy/noProject.nut.ts b/test/nuts/deploy/noProject.nut.ts index 4340e8e0..1a23b487 100644 --- a/test/nuts/deploy/noProject.nut.ts +++ b/test/nuts/deploy/noProject.nut.ts @@ -8,7 +8,7 @@ import { join } from 'node:path'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { expect } from 'chai'; -import { DeployResultJson } from '../../../src/utils/types'; +import { DeployResultJson } from '../../../src/utils/types.js'; describe('deploy mdapi format without project', () => { let session: TestSession; diff --git a/test/nuts/deploy/noTracking.nut.ts b/test/nuts/deploy/noTracking.nut.ts index 4b8e26ab..cffa4bd2 100644 --- a/test/nuts/deploy/noTracking.nut.ts +++ b/test/nuts/deploy/noTracking.nut.ts @@ -8,7 +8,7 @@ import { join } from 'node:path'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { expect } from 'chai'; -import { DeployResultJson } from '../../../src/utils/types'; +import { DeployResultJson } from '../../../src/utils/types.js'; describe('deploy mdapi format without tracking', () => { let session: TestSession; diff --git a/test/nuts/digitalExperienceBundle/constants.ts b/test/nuts/digitalExperienceBundle/constants.ts index f8d69d17..7b956502 100644 --- a/test/nuts/digitalExperienceBundle/constants.ts +++ b/test/nuts/digitalExperienceBundle/constants.ts @@ -6,7 +6,7 @@ */ import { join } from 'node:path'; -import { TestSessionOptions } from '@salesforce/cli-plugins-testkit/lib/testSession'; +import { TestSessionOptions } from '@salesforce/cli-plugins-testkit/lib/testSession.js'; import { registry } from '@salesforce/source-deploy-retrieve'; import { META_XML_SUFFIX } from '@salesforce/source-deploy-retrieve/lib/src/common'; import { assert } from 'chai'; diff --git a/test/nuts/digitalExperienceBundle/deb.manifest.nut.ts b/test/nuts/digitalExperienceBundle/deb.manifest.nut.ts index 454016e7..18cb0c63 100644 --- a/test/nuts/digitalExperienceBundle/deb.manifest.nut.ts +++ b/test/nuts/digitalExperienceBundle/deb.manifest.nut.ts @@ -9,8 +9,8 @@ import { join } from 'node:path'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { assert, expect } from 'chai'; import { beforeEach } from 'mocha'; -import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types'; -import { DEBS_RELATIVE_PATH, FULL_NAMES, METADATA, STORE, TEST_SESSION_OPTIONS, TYPES } from './constants'; +import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types.js'; +import { DEBS_RELATIVE_PATH, FULL_NAMES, METADATA, STORE, TEST_SESSION_OPTIONS, TYPES } from './constants.js'; import { assertAllDEBAndTheirDECounts, assertDECountOfSingleDEB, @@ -21,7 +21,7 @@ import { assertViewHome, createDocumentDetailPageAInLocal, deleteLocalSource, -} from './helper'; +} from './helper.js'; describe('deb -- manifest option', () => { let session: TestSession; diff --git a/test/nuts/digitalExperienceBundle/deb.metadata.nut.ts b/test/nuts/digitalExperienceBundle/deb.metadata.nut.ts index ba865201..13234ae3 100644 --- a/test/nuts/digitalExperienceBundle/deb.metadata.nut.ts +++ b/test/nuts/digitalExperienceBundle/deb.metadata.nut.ts @@ -7,9 +7,9 @@ import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { assert } from 'chai'; import { beforeEach } from 'mocha'; -import { DeleteSourceJson, DeployResultJson, RetrieveResultJson } from '../../../src/utils/types'; +import { DeleteSourceJson, DeployResultJson, RetrieveResultJson } from '../../../src/utils/types.js'; -import { DEBS_RELATIVE_PATH, FULL_NAMES, METADATA, TEST_SESSION_OPTIONS, TYPES } from './constants'; +import { DEBS_RELATIVE_PATH, FULL_NAMES, METADATA, TEST_SESSION_OPTIONS, TYPES } from './constants.js'; import { assertAllDEBAndTheirDECounts, assertDECountOfSingleDEB, @@ -21,7 +21,7 @@ import { createDocumentDetailPageAInLocal, deleteLocalSource, metadataToArray, -} from './helper'; +} from './helper.js'; describe('deb -- metadata option', () => { let session: TestSession; diff --git a/test/nuts/digitalExperienceBundle/deb.sourcepath.nut.ts b/test/nuts/digitalExperienceBundle/deb.sourcepath.nut.ts index c2648877..c55711c4 100644 --- a/test/nuts/digitalExperienceBundle/deb.sourcepath.nut.ts +++ b/test/nuts/digitalExperienceBundle/deb.sourcepath.nut.ts @@ -7,7 +7,7 @@ // import * as fs from 'fs'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { assert } from 'chai'; -import { DeleteSourceJson, DeployResultJson, RetrieveResultJson } from '../../../src/utils/types'; +import { DeleteSourceJson, DeployResultJson, RetrieveResultJson } from '../../../src/utils/types.js'; import { DEB_A_RELATIVE_PATH, @@ -16,7 +16,7 @@ import { FULL_NAMES, TEST_SESSION_OPTIONS, TYPES, -} from './constants'; +} from './constants.js'; import { assertAllDEBAndTheirDECounts, assertDocumentDetailPageA, @@ -25,7 +25,7 @@ import { assertViewHome, metadataToArray, createDocumentDetailPageAInLocal, -} from './helper'; +} from './helper.js'; describe('deb -- sourcepath option', () => { let session: TestSession; diff --git a/test/nuts/digitalExperienceBundle/deb.tracking.nut.ts b/test/nuts/digitalExperienceBundle/deb.tracking.nut.ts index df3972cb..89e11a8e 100644 --- a/test/nuts/digitalExperienceBundle/deb.tracking.nut.ts +++ b/test/nuts/digitalExperienceBundle/deb.tracking.nut.ts @@ -8,13 +8,10 @@ import * as fs from 'node:fs'; import { join } from 'node:path'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { assert, expect } from 'chai'; -import { PreviewResult } from '../../../src/utils/previewOutput'; -import { DeleteTrackingResult } from '../../../src/commands/project/delete/tracking'; -import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types'; - -// import { SourceTrackingClearResult } from '../../../src/commands/force/source/tracking/clear'; -// import { PullResponse } from '../../../src/formatters/source/pullFormatter'; -import { FILE_RELATIVE_PATHS, TEST_SESSION_OPTIONS, TYPES } from './constants'; +import { PreviewResult } from '../../../src/utils/previewOutput.js'; +import { DeleteTrackingResult } from '../../../src/commands/project/delete/tracking.js'; +import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types.js'; +import { FILE_RELATIVE_PATHS, TEST_SESSION_OPTIONS, TYPES } from './constants.js'; import { assertAllDEBAndTheirDECounts, assertDEBMeta, @@ -27,7 +24,7 @@ import { createDocumentDetailPageAInLocal, deleteDocumentDetailPageAInLocal, previewFileResponseToFileResponse, -} from './helper'; +} from './helper.js'; describe('deb -- tracking/push/pull', () => { let session: TestSession; diff --git a/test/nuts/digitalExperienceBundle/helper.ts b/test/nuts/digitalExperienceBundle/helper.ts index 683766b6..e4104371 100644 --- a/test/nuts/digitalExperienceBundle/helper.ts +++ b/test/nuts/digitalExperienceBundle/helper.ts @@ -10,8 +10,8 @@ import { FileResponse } from '@salesforce/source-deploy-retrieve'; import { assert, expect } from 'chai'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { AuthInfo, Connection } from '@salesforce/core'; -import { PreviewFile, PreviewResult } from '../../../src/utils/previewOutput'; -import { DIR_RELATIVE_PATHS, FILE_RELATIVE_PATHS, FULL_NAMES, STORE, TYPES } from './constants'; +import { PreviewFile, PreviewResult } from '../../../src/utils/previewOutput.js'; +import { DIR_RELATIVE_PATHS, FILE_RELATIVE_PATHS, FULL_NAMES, STORE, TYPES } from './constants.js'; type CustomFileResponses = Array>; diff --git a/test/nuts/generateNuts.ts b/test/nuts/generateNuts.ts index cc45ab6f..e94eb0fa 100644 --- a/test/nuts/generateNuts.ts +++ b/test/nuts/generateNuts.ts @@ -7,7 +7,7 @@ import * as path from 'node:path'; import * as fs from 'node:fs'; -import { RepoConfig, TEST_REPOS_MAP } from './testMatrix'; +import { RepoConfig, TEST_REPOS_MAP } from './testMatrix.js'; const SEED_FILTER = process.env.PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER ?? ''; const SEED_EXCLUDE = process.env.PLUGIN_DEPLOY_RETRIEVE_SEED_EXCLUDE; diff --git a/test/nuts/list/ignored.nut.ts b/test/nuts/list/ignored.nut.ts index 5688d0fe..c29548f5 100644 --- a/test/nuts/list/ignored.nut.ts +++ b/test/nuts/list/ignored.nut.ts @@ -9,7 +9,7 @@ import * as os from 'node:os'; import * as path from 'node:path'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { expect } from 'chai'; -import { SourceIgnoredResults } from '../../../src/commands/project/list/ignored'; +import { SourceIgnoredResults } from '../../../src/commands/project/list/ignored.js'; describe('project:list:ignored', () => { let session: TestSession; diff --git a/test/nuts/retrieve/customLabels.nut.ts b/test/nuts/retrieve/customLabels.nut.ts index 2ce755ac..9de8d0ce 100644 --- a/test/nuts/retrieve/customLabels.nut.ts +++ b/test/nuts/retrieve/customLabels.nut.ts @@ -11,7 +11,7 @@ import { expect } from 'chai'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { AuthInfo, Connection } from '@salesforce/core'; -import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types'; +import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types.js'; let session: TestSession; diff --git a/test/nuts/retrieve/noProject.ts b/test/nuts/retrieve/noProject.ts index f7595c75..a0af05c4 100644 --- a/test/nuts/retrieve/noProject.ts +++ b/test/nuts/retrieve/noProject.ts @@ -9,7 +9,7 @@ import * as fs from 'node:fs'; import { join } from 'node:path'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { assert, expect } from 'chai'; -import { RetrieveResultJson } from '../../../src/utils/types'; +import { RetrieveResultJson } from '../../../src/utils/types.js'; const packageXml = ` diff --git a/test/nuts/retrieve/noTracking.ts b/test/nuts/retrieve/noTracking.ts index 1ba35fdd..f6fc4739 100644 --- a/test/nuts/retrieve/noTracking.ts +++ b/test/nuts/retrieve/noTracking.ts @@ -9,7 +9,7 @@ import * as fs from 'node:fs'; import { join } from 'node:path'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { assert, expect } from 'chai'; -import { RetrieveResultJson } from '../../../src/utils/types'; +import { RetrieveResultJson } from '../../../src/utils/types.js'; const packageXml = ` diff --git a/test/nuts/retrieve/partialBundleDelete.nut.ts b/test/nuts/retrieve/partialBundleDelete.nut.ts index ebd2b285..58af6484 100644 --- a/test/nuts/retrieve/partialBundleDelete.nut.ts +++ b/test/nuts/retrieve/partialBundleDelete.nut.ts @@ -19,8 +19,8 @@ import { MetadataApiRetrieve, RetrieveSetOptions, } from '@salesforce/source-deploy-retrieve'; -import { RetrieveResultJson } from '../../../src/utils/types'; -import RetrieveMetadata from '../../../src/commands/project/retrieve/start'; +import { RetrieveResultJson } from '../../../src/utils/types.js'; +import RetrieveMetadata from '../../../src/commands/project/retrieve/start.js'; describe('Partial Bundle Delete Retrieves', () => { let session: TestSession; diff --git a/test/nuts/seeds/deploy.metadata.manifest.seed.ts b/test/nuts/seeds/deploy.metadata.manifest.seed.ts index d3d1c828..e21a336f 100644 --- a/test/nuts/seeds/deploy.metadata.manifest.seed.ts +++ b/test/nuts/seeds/deploy.metadata.manifest.seed.ts @@ -8,8 +8,8 @@ import * as path from 'node:path'; import { SourceTestkit } from '@salesforce/source-testkit'; import { assert } from 'chai'; -import { TEST_REPOS_MAP } from '../testMatrix'; -import { DeployResultJson } from '../../../src/utils/types'; +import { TEST_REPOS_MAP } from '../testMatrix.js'; +import { DeployResultJson } from '../../../src/utils/types.js'; // DO NOT TOUCH. generateNuts.ts will insert these values const REPO = TEST_REPOS_MAP.get('%REPO_URL%'); diff --git a/test/nuts/seeds/deploy.metadata.metadata-dir.seed.ts b/test/nuts/seeds/deploy.metadata.metadata-dir.seed.ts index 880bc610..7ace3ee0 100644 --- a/test/nuts/seeds/deploy.metadata.metadata-dir.seed.ts +++ b/test/nuts/seeds/deploy.metadata.metadata-dir.seed.ts @@ -10,8 +10,8 @@ import { SourceTestkit } from '@salesforce/source-testkit'; import { RequestStatus } from '@salesforce/source-deploy-retrieve'; import { JsonMap } from '@salesforce/ts-types'; import { assert } from 'chai'; -import { TEST_REPOS_MAP } from '../testMatrix'; -import { DeployResultJson } from '../../../src/utils/types'; +import { TEST_REPOS_MAP } from '../testMatrix.js'; +import { DeployResultJson } from '../../../src/utils/types.js'; // DO NOT TOUCH. generateNuts.ts will insert these values const REPO = TEST_REPOS_MAP.get('%REPO_URL%'); diff --git a/test/nuts/seeds/deploy.metadata.metadata.seed.ts b/test/nuts/seeds/deploy.metadata.metadata.seed.ts index 13a7eea2..7614e20a 100644 --- a/test/nuts/seeds/deploy.metadata.metadata.seed.ts +++ b/test/nuts/seeds/deploy.metadata.metadata.seed.ts @@ -7,8 +7,8 @@ import { SourceTestkit } from '@salesforce/source-testkit'; import { assert } from 'chai'; -import { TEST_REPOS_MAP } from '../testMatrix'; -import { DeployResultJson } from '../../../src/utils/types'; +import { TEST_REPOS_MAP } from '../testMatrix.js'; +import { DeployResultJson } from '../../../src/utils/types.js'; // DO NOT TOUCH. generateNuts.ts will insert these values const REPO = TEST_REPOS_MAP.get('%REPO_URL%'); diff --git a/test/nuts/seeds/deploy.metadata.source-dir.seed.ts b/test/nuts/seeds/deploy.metadata.source-dir.seed.ts index 11ee4081..7da38916 100644 --- a/test/nuts/seeds/deploy.metadata.source-dir.seed.ts +++ b/test/nuts/seeds/deploy.metadata.source-dir.seed.ts @@ -8,8 +8,8 @@ import * as path from 'node:path'; import { assert } from 'chai'; import { SourceTestkit } from '@salesforce/source-testkit'; -import { TEST_REPOS_MAP } from '../testMatrix'; -import { DeployResultJson } from '../../../src/utils/types'; +import { TEST_REPOS_MAP } from '../testMatrix.js'; +import { DeployResultJson } from '../../../src/utils/types.js'; // DO NOT TOUCH. generateNuts.ts will insert these values const REPO = TEST_REPOS_MAP.get('%REPO_URL%'); diff --git a/test/nuts/seeds/deploy.metadata.test-level.seed.ts b/test/nuts/seeds/deploy.metadata.test-level.seed.ts index 5991839d..2d0b3849 100644 --- a/test/nuts/seeds/deploy.metadata.test-level.seed.ts +++ b/test/nuts/seeds/deploy.metadata.test-level.seed.ts @@ -10,7 +10,7 @@ import * as path from 'node:path'; import { SourceTestkit } from '@salesforce/source-testkit'; import { assert, expect } from 'chai'; import { execCmd } from '@salesforce/cli-plugins-testkit'; -import { TEST_REPOS_MAP } from '../testMatrix'; +import { TEST_REPOS_MAP } from '../testMatrix.js'; // DO NOT TOUCH. generateNuts.ts will insert these values const REPO = TEST_REPOS_MAP.get('%REPO_URL%'); diff --git a/test/nuts/specialTypes/folderTypes.nut.ts b/test/nuts/specialTypes/folderTypes.nut.ts index ce216670..9706506a 100644 --- a/test/nuts/specialTypes/folderTypes.nut.ts +++ b/test/nuts/specialTypes/folderTypes.nut.ts @@ -9,7 +9,7 @@ import * as path from 'node:path'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { assert, expect } from 'chai'; import { FileResponse } from '@salesforce/source-deploy-retrieve'; -import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types'; +import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types.js'; describe('metadata types that go in folders', () => { let session: TestSession; diff --git a/test/nuts/specialTypes/nestedLwc.nut.ts b/test/nuts/specialTypes/nestedLwc.nut.ts index 17f863b4..fc3bec5a 100644 --- a/test/nuts/specialTypes/nestedLwc.nut.ts +++ b/test/nuts/specialTypes/nestedLwc.nut.ts @@ -8,7 +8,7 @@ import * as path from 'node:path'; import { expect } from 'chai'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; -import { DeployResultJson } from '../../../src/utils/types'; +import { DeployResultJson } from '../../../src/utils/types.js'; describe('Nested LWCs', () => { let session: TestSession; diff --git a/test/nuts/specialTypes/territory2.nut.ts b/test/nuts/specialTypes/territory2.nut.ts index 39bad588..f57af331 100644 --- a/test/nuts/specialTypes/territory2.nut.ts +++ b/test/nuts/specialTypes/territory2.nut.ts @@ -8,7 +8,7 @@ import * as fs from 'node:fs'; import * as path from 'node:path'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { expect } from 'chai'; -import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types'; +import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types.js'; describe('territories', () => { let session: TestSession; diff --git a/test/nuts/specialTypes/translation.nut.ts b/test/nuts/specialTypes/translation.nut.ts index 09758e65..835df2fb 100644 --- a/test/nuts/specialTypes/translation.nut.ts +++ b/test/nuts/specialTypes/translation.nut.ts @@ -8,8 +8,8 @@ import * as fs from 'node:fs'; import * as path from 'node:path'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { expect } from 'chai'; -import { PreviewResult } from '../../../src/utils/previewOutput'; -import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types'; +import { PreviewResult } from '../../../src/utils/previewOutput.js'; +import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types.js'; describe('translations', () => { let session: TestSession; diff --git a/test/nuts/tracking/basics.nut.ts b/test/nuts/tracking/basics.nut.ts index d0bf10ee..eecea14c 100644 --- a/test/nuts/tracking/basics.nut.ts +++ b/test/nuts/tracking/basics.nut.ts @@ -10,14 +10,16 @@ import * as fs from 'node:fs'; import { expect, assert } from 'chai'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { ComponentStatus } from '@salesforce/source-deploy-retrieve'; -import { StatusResult } from '@salesforce/plugin-source/lib/formatters/source/statusFormatter'; -import { DeployResultJson, RetrieveResultJson, isSdrFailure } from '../../../src/utils/types'; -import { PreviewResult } from '../../../src/utils/previewOutput'; -import { eBikesDeployResultCount } from './constants'; +import { StatusResult } from '@salesforce/plugin-source/lib/formatters/source/statusFormatter.js'; +import { DeployResultJson, RetrieveResultJson, isSdrFailure } from '../../../src/utils/types.js'; +import { PreviewResult } from '../../../src/utils/previewOutput.js'; +import { eBikesDeployResultCount } from './constants.js'; + const filterIgnored = (r: StatusResult): boolean => r.ignored !== true; -let session: TestSession; describe('end-to-end-test for tracking with an org (single packageDir)', () => { + let session: TestSession; + before(async () => { session = await TestSession.create({ project: { diff --git a/test/nuts/tracking/conflicts.nut.ts b/test/nuts/tracking/conflicts.nut.ts index dbd91027..6639fb6b 100644 --- a/test/nuts/tracking/conflicts.nut.ts +++ b/test/nuts/tracking/conflicts.nut.ts @@ -12,10 +12,10 @@ import { expect } from 'chai'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { AuthInfo, Connection } from '@salesforce/core'; import { ComponentStatus } from '@salesforce/source-deploy-retrieve'; -import { StatusResult } from '@salesforce/plugin-source/lib/formatters/source/statusFormatter'; -import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types'; -import { PreviewResult } from '../../../src/utils/previewOutput'; -import { eBikesDeployResultCount } from './constants'; +import { StatusResult } from '@salesforce/plugin-source/lib/formatters/source/statusFormatter.js'; +import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types.js'; +import { PreviewResult } from '../../../src/utils/previewOutput.js'; +import { eBikesDeployResultCount } from './constants.js'; let session: TestSession; describe('conflict detection and resolution', () => { diff --git a/test/nuts/tracking/deleteResetTracking.nut.ts b/test/nuts/tracking/deleteResetTracking.nut.ts index 0b66862f..b65e2ca9 100644 --- a/test/nuts/tracking/deleteResetTracking.nut.ts +++ b/test/nuts/tracking/deleteResetTracking.nut.ts @@ -10,7 +10,7 @@ import * as fs from 'node:fs'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { expect } from 'chai'; import { AuthInfo, Connection } from '@salesforce/core'; -import { DeleteTrackingResult } from '../../../src/commands/project/delete/tracking'; +import { DeleteTrackingResult } from '../../../src/commands/project/delete/tracking.js'; let session: TestSession; let orgId: string; diff --git a/test/nuts/tracking/forceIgnore.nut.ts b/test/nuts/tracking/forceIgnore.nut.ts index baa88934..464a408c 100644 --- a/test/nuts/tracking/forceIgnore.nut.ts +++ b/test/nuts/tracking/forceIgnore.nut.ts @@ -12,9 +12,9 @@ import { expect } from 'chai'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { AuthInfo, Connection } from '@salesforce/core'; import { ComponentStatus } from '@salesforce/source-deploy-retrieve'; -import { StatusResult } from '@salesforce/plugin-source/lib/formatters/source/statusFormatter'; -import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types'; -import { PreviewResult } from '../../../src/utils/previewOutput'; +import { StatusResult } from '@salesforce/plugin-source/lib/formatters/source/statusFormatter.js'; +import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types.js'; +import { PreviewResult } from '../../../src/utils/previewOutput.js'; let session: TestSession; // leave this in posix path mode since it's used in forceignore diff --git a/test/nuts/tracking/lwc.nut.ts b/test/nuts/tracking/lwc.nut.ts index 9795ff10..a525498a 100644 --- a/test/nuts/tracking/lwc.nut.ts +++ b/test/nuts/tracking/lwc.nut.ts @@ -9,10 +9,10 @@ import * as path from 'node:path'; import * as fs from 'node:fs'; import { assert, expect } from 'chai'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; -import { StatusResult } from '@salesforce/plugin-source/lib/formatters/source/statusFormatter'; +import { StatusResult } from '@salesforce/plugin-source/lib/formatters/source/statusFormatter.js'; import { ComponentStatus } from '@salesforce/source-deploy-retrieve'; -import { PreviewResult } from '../../../src/utils/previewOutput'; -import { DeployResultJson } from '../../../src/utils/types'; +import { PreviewResult } from '../../../src/utils/previewOutput.js'; +import { DeployResultJson } from '../../../src/utils/types.js'; let session: TestSession; let cssPathAbsolute: string; diff --git a/test/nuts/tracking/mpd-non-sequential.nut.ts b/test/nuts/tracking/mpd-non-sequential.nut.ts index efe0519b..9b693e83 100644 --- a/test/nuts/tracking/mpd-non-sequential.nut.ts +++ b/test/nuts/tracking/mpd-non-sequential.nut.ts @@ -10,7 +10,7 @@ import { AuthInfo, Connection } from '@salesforce/core'; import { expect } from 'chai'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { assert } from '@salesforce/ts-types'; -import { DeployResultJson } from '../../../src/utils/types'; +import { DeployResultJson } from '../../../src/utils/types.js'; let session: TestSession; let conn: Connection; diff --git a/test/nuts/tracking/remoteChanges.nut.ts b/test/nuts/tracking/remoteChanges.nut.ts index 2c6f6425..89fa06e8 100644 --- a/test/nuts/tracking/remoteChanges.nut.ts +++ b/test/nuts/tracking/remoteChanges.nut.ts @@ -12,10 +12,10 @@ import { expect, assert } from 'chai'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { AuthInfo, Connection } from '@salesforce/core'; import { ComponentStatus, FileResponse } from '@salesforce/source-deploy-retrieve'; -import { StatusResult } from '@salesforce/plugin-source/lib/formatters/source/statusFormatter'; -import { PreviewResult, PreviewFile } from '../../../src/utils/previewOutput'; -import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types'; -import { eBikesDeployResultCount } from './constants'; +import { StatusResult } from '@salesforce/plugin-source/lib/formatters/source/statusFormatter.js'; +import { PreviewResult, PreviewFile } from '../../../src/utils/previewOutput.js'; +import { DeployResultJson, RetrieveResultJson } from '../../../src/utils/types.js'; +import { eBikesDeployResultCount } from './constants.js'; let session: TestSession; let conn: Connection; diff --git a/test/tsconfig.json b/test/tsconfig.json index 779a1b5f..a5f451cf 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@salesforce/dev-config/tsconfig-test-strict", + "extends": "@salesforce/dev-config/tsconfig-test-strict-esm", "include": ["./**/*.ts"], "compilerOptions": { "skipLibCheck": true diff --git a/test/utils/coverage.test.ts b/test/utils/coverage.test.ts index 7a761c26..a6d0bcf1 100644 --- a/test/utils/coverage.test.ts +++ b/test/utils/coverage.test.ts @@ -8,7 +8,7 @@ import { expect } from 'chai'; import { ApexTestResultOutcome } from '@salesforce/apex-node'; import { StandardColors } from '@salesforce/sf-plugins-core'; -import { coverageOutput, getCoveragePct, mapTestResults } from '../../src/utils/coverage'; +import { coverageOutput, getCoveragePct, mapTestResults } from '../../src/utils/coverage.js'; // methods are mutating the object instead of returning new ones function getSampleTestResult() { diff --git a/test/utils/deploy.test.ts b/test/utils/deploy.test.ts index a67dc434..ec75d535 100644 --- a/test/utils/deploy.test.ts +++ b/test/utils/deploy.test.ts @@ -7,11 +7,11 @@ import { DeployResult, RequestStatus } from '@salesforce/source-deploy-retrieve'; import { expect } from 'chai'; -import * as sinon from 'sinon'; +import sinon from 'sinon'; import { ConfigAggregator } from '@salesforce/core'; -import { determineExitCode, resolveApi, validateTests } from '../../src/utils/deploy'; -import { API, TestLevel } from '../../src/utils/types'; -import { ConfigVars } from '../../src/configMeta'; +import { determineExitCode, resolveApi, validateTests } from '../../src/utils/deploy.js'; +import { API, TestLevel } from '../../src/utils/types.js'; +import { ConfigVars } from '../../src/configMeta.js'; describe('deploy utils', () => { describe('validateTests', () => { diff --git a/test/utils/errorCodes.test.ts b/test/utils/errorCodes.test.ts index 690cd35f..3ebfa9bf 100644 --- a/test/utils/errorCodes.test.ts +++ b/test/utils/errorCodes.test.ts @@ -5,7 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ import { expect } from 'chai'; -import { DEPLOY_STATUS_CODES_DESCRIPTIONS, DEPLOY_STATUS_CODES } from '../../src/utils/errorCodes'; +import { DEPLOY_STATUS_CODES_DESCRIPTIONS, DEPLOY_STATUS_CODES } from '../../src/utils/errorCodes.js'; describe('error codes', () => { describe('help descriptions DEPLOY_STATUS_CODES_DESCRIPTIONS', () => { diff --git a/test/utils/flags.test.ts b/test/utils/flags.test.ts index 58364dbc..76e2530d 100644 --- a/test/utils/flags.test.ts +++ b/test/utils/flags.test.ts @@ -5,19 +5,19 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import * as fs from 'node:fs'; +import fs from 'node:fs'; import * as path from 'node:path'; import { assert, expect } from 'chai'; import { Parser } from '@oclif/core'; -import * as sinon from 'sinon'; +import sinon from 'sinon'; import { testLevelFlag, fileOrDirFlag, ensuredDirFlag, zipFileFlag, DEFAULT_ZIP_FILE_NAME, -} from '../../src/utils/flags'; -import { TestLevel } from '../../src/utils/types'; +} from '../../src/utils/flags.js'; +import { TestLevel } from '../../src/utils/types.js'; const STAT = { // 'BigIntStats': atimeNs, mtimeNs, ctimeNs, birthtimeNs diff --git a/test/utils/manifestCache.test.ts b/test/utils/manifestCache.test.ts index 9a4d1d27..be5b3e19 100644 --- a/test/utils/manifestCache.test.ts +++ b/test/utils/manifestCache.test.ts @@ -7,8 +7,8 @@ import * as fs from 'node:fs'; import { expect } from 'chai'; import { ComponentSet } from '@salesforce/source-deploy-retrieve'; -import * as sinon from 'sinon'; -import { writeManifest } from '../../src/utils/manifestCache'; +import sinon from 'sinon'; +import { writeManifest } from '../../src/utils/manifestCache.js'; describe('manifest cache', () => { let sandbox: sinon.SinonSandbox; diff --git a/test/utils/output.test.ts b/test/utils/output.test.ts index 84fbf062..bb9fff4f 100644 --- a/test/utils/output.test.ts +++ b/test/utils/output.test.ts @@ -6,12 +6,12 @@ */ import * as path from 'node:path'; import { assert, expect, config } from 'chai'; -import * as sinon from 'sinon'; +import sinon from 'sinon'; import { DeployResult } from '@salesforce/source-deploy-retrieve'; import { ux } from '@oclif/core'; -import { getCoverageFormattersOptions } from '../../src/utils/coverage'; -import { DeployResultFormatter } from '../../src/formatters/deployResultFormatter'; -import { getDeployResult } from './deployResponses'; +import { getCoverageFormattersOptions } from '../../src/utils/coverage.js'; +import { DeployResultFormatter } from '../../src/formatters/deployResultFormatter.js'; +import { getDeployResult } from './deployResponses.js'; config.truncateThreshold = 0; diff --git a/test/utils/promiseQueue.test.ts b/test/utils/promiseQueue.test.ts index c67d49c3..b4d24229 100644 --- a/test/utils/promiseQueue.test.ts +++ b/test/utils/promiseQueue.test.ts @@ -5,7 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ import { expect } from 'chai'; -import { promisesQueue } from '../../src/utils/promiseQueue'; +import { promisesQueue } from '../../src/utils/promiseQueue.js'; describe('promisesQueue', () => { const numberResolver = (n: number) => Promise.resolve(n); it('should handle 0 queue entries', async () => { diff --git a/test/utils/testConsts.ts b/test/utils/testConsts.ts index 17396a6a..96745e89 100644 --- a/test/utils/testConsts.ts +++ b/test/utils/testConsts.ts @@ -5,7 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -import { ComponentProperties } from '@salesforce/source-deploy-retrieve/lib/src/resolve/sourceComponent'; +import { ComponentProperties } from '@salesforce/source-deploy-retrieve/lib/src/resolve/sourceComponent.js'; export const exampleSourceComponent: ComponentProperties = { name: 'GeocodingService', diff --git a/test/utils/types.test.ts b/test/utils/types.test.ts index 19fa572f..94e62c26 100644 --- a/test/utils/types.test.ts +++ b/test/utils/types.test.ts @@ -7,7 +7,7 @@ import { expect, config } from 'chai'; import { SourceComponent, RegistryAccess } from '@salesforce/source-deploy-retrieve'; -import { isSourceComponent, isSourceComponentWithXml } from '../../src/utils/types'; +import { isSourceComponent, isSourceComponentWithXml } from '../../src/utils/types.js'; config.truncateThreshold = 0; diff --git a/tsconfig.json b/tsconfig.json index 776b408c..1fa9d631 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,14 +1,10 @@ { - "extends": "@salesforce/dev-config/tsconfig-strict", + "extends": "@salesforce/dev-config/tsconfig-strict-esm", "compilerOptions": { "outDir": "lib", "rootDir": "src", "skipLibCheck": true, - "baseUrl": ".", - "paths": { - "@salesforce/core": ["node_modules/@salesforce/core"], - "@salesforce/source-deploy-retrieve": ["node_modules/@salesforce/source-deploy-retrieve"] - } + "baseUrl": "." }, "include": ["./src/**/*.ts"] } diff --git a/yarn.lock b/yarn.lock index 44453a42..cfeb594d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -170,7 +170,7 @@ core-js-pure "^3.30.2" regenerator-runtime "^0.13.11" -"@babel/runtime@^7.12.5", "@babel/runtime@^7.21.0": +"@babel/runtime@^7.12.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.5.tgz#8564dd588182ce0047d55d7a75e93921107b57ec" integrity sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA== @@ -746,7 +746,7 @@ read-package-json-fast "^3.0.0" which "^3.0.0" -"@oclif/core@^2.11.10", "@oclif/core@^2.11.4", "@oclif/core@^2.11.8", "@oclif/core@^2.15.0": +"@oclif/core@^2.15.0": version "2.15.0" resolved "https://registry.yarnpkg.com/@oclif/core/-/core-2.15.0.tgz#f27797b30a77d13279fba88c1698fc34a0bd0d2a" integrity sha512-fNEMG5DzJHhYmI3MgpByTvltBOMyFcnRIUMxbiz2ai8rhaYgaTHMG3Q38HcosfIvtw9nCjxpcQtC8MN8QtVCcA== @@ -780,18 +780,52 @@ wordwrap "^1.0.0" wrap-ansi "^7.0.0" -"@oclif/plugin-command-snapshot@^4.0.12": - version "4.0.12" - resolved "https://registry.yarnpkg.com/@oclif/plugin-command-snapshot/-/plugin-command-snapshot-4.0.12.tgz#b9caad06005f6f7c660498e527d1c9907ebf4aae" - integrity sha512-QzBUGoxrt/KyO5rp/z3bbWObGF+8QBenEhs5MLrSHK5ujOCfOdahFuCvdkFzv0q7vI5VPRma8vFVkp02C5GOXA== +"@oclif/core@^3.0.0", "@oclif/core@^3.0.4", "@oclif/core@^3.10.8", "@oclif/core@^3.3.1": + version "3.10.8" + resolved "https://registry.yarnpkg.com/@oclif/core/-/core-3.10.8.tgz#8a855841107576b88a2ebe2e20e6e0d7ee885713" + integrity sha512-DRiEiXUvijq/1dXL80/sFGdhTjejFiUzxURW7N310TEKlONujas66KhLATfF/nG3mICqTCU0f9B+VNfLtZoGqw== dependencies: - "@oclif/core" "^2.11.8" + ansi-escapes "^4.3.2" + ansi-styles "^4.3.0" + cardinal "^2.1.1" chalk "^4.1.2" + clean-stack "^3.0.1" + cli-progress "^3.12.0" + debug "^4.3.4" + ejs "^3.1.9" + get-package-type "^0.1.0" + globby "^11.1.0" + hyperlinker "^1.0.0" + indent-string "^4.0.0" + is-wsl "^2.2.0" + js-yaml "^3.14.1" + natural-orderby "^2.0.3" + object-treeify "^1.1.33" + password-prompt "^1.1.2" + slice-ansi "^4.0.0" + string-width "^4.2.3" + strip-ansi "^6.0.1" + supports-color "^8.1.1" + supports-hyperlinks "^2.2.0" + tsconfck "^3.0.0" + widest-line "^3.1.0" + wordwrap "^1.0.0" + wrap-ansi "^7.0.0" + +"@oclif/plugin-command-snapshot@^5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@oclif/plugin-command-snapshot/-/plugin-command-snapshot-5.0.2.tgz#41e88d245e1ffb1822b4cb127df39f61672cf2b1" + integrity sha512-4Aun0P/K9uVC5JLmG968OJhDT5HMiOs4mmw7A2cWmf1Paw8zp4xZ40PvYOOKN86gaKukKFDTQ1sDuLBzqNhZow== + dependencies: + "@oclif/core" "^3.10.8" + "@types/lodash.difference" "^4.5.8" + chalk "^5.3.0" just-diff "^5.2.0" - lodash "^4.17.21" + lodash.difference "^4.5.0" + lodash.get "^4.4.2" + lodash.sortby "^4.7.0" semver "^7.5.4" - ts-json-schema-generator "^1.2.0" - tslib "^2.6.1" + ts-json-schema-generator "^1.4.0" "@oclif/plugin-help@^5.2.14": version "5.2.19" @@ -809,18 +843,16 @@ chalk "^4" fast-levenshtein "^3.0.0" -"@oclif/plugin-warn-if-update-available@^2.0.44": - version "2.0.49" - resolved "https://registry.yarnpkg.com/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-2.0.49.tgz#1f2923ecf9153d885be0123f965072ee55635a29" - integrity sha512-9Xc54BTDD5JFgMvMZLYnvi+xrhFg4dkn2AYRunZ5KNC0kejn5zUzxCy7x6hSdg5hop2TkeEnJYIQVMVzSNoX3A== +"@oclif/plugin-warn-if-update-available@^3.0.0": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@oclif/plugin-warn-if-update-available/-/plugin-warn-if-update-available-3.0.2.tgz#76d02069c0d5545b5000660460edb6085272cbcd" + integrity sha512-dUXfRNFtnezS4uqQ+Ap4qb6UP0DWExTvoqghNvvGTIN4PEgfYHogvBORn+rFnDXXE8kgZFuqP4ZQJRP9NyLhOA== dependencies: - "@oclif/core" "^2.11.10" - chalk "^4.1.0" + "@oclif/core" "^3.3.1" + chalk "^5.3.0" debug "^4.1.0" - fs-extra "^9.0.1" http-call "^5.2.2" - lodash "^4.17.21" - semver "^7.5.4" + lodash.template "^4.5.0" "@octokit/auth-token@^2.4.4": version "2.5.0" @@ -928,12 +960,12 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@salesforce/apex-node@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@salesforce/apex-node/-/apex-node-2.1.0.tgz#11ed10af2e89690f398224f12c44820129d030c0" - integrity sha512-W7OcqcBNHhf2wQMiPWOx/MED7ao1ZlML4vX5+A6hMDZTCZ5g34rj5wwVUQFOOAxHnS5F8jQUU5VpxpKo01jrTQ== +"@salesforce/apex-node@^2.1.0", "@salesforce/apex-node@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@salesforce/apex-node/-/apex-node-2.1.2.tgz#f42935b9be6ad7d28b5810ea36a88124789e6f5f" + integrity sha512-4ShpuymejVotaK4BYa9h33jc3zj0J9xPV7IIKfTscBTfFHspgPEPaDghTODC+DZMn6TJ1M2nNzRfeHmlF7J2kA== dependencies: - "@salesforce/core" "^5.2.0" + "@salesforce/core" "^5.3.18" "@types/istanbul-reports" "^3.0.1" faye "1.4.0" glob "^8.0.3" @@ -941,7 +973,7 @@ istanbul-lib-report "^3.0.1" istanbul-reports "^3.1.6" -"@salesforce/cli-plugins-testkit@^4.4.8": +"@salesforce/cli-plugins-testkit@^4.4.12": version "4.4.12" resolved "https://registry.yarnpkg.com/@salesforce/cli-plugins-testkit/-/cli-plugins-testkit-4.4.12.tgz#425132a4cd49b5aacb979df07af987b338ec00ae" integrity sha512-k0jJYqB0PazmVyhNBau8FtJDa3+4EbhvD8F3u+yZ71jjPkp7YLKqtxfs1y7P3LCrmtel8JE3faHTfMaahdK96Q== @@ -971,10 +1003,10 @@ strip-ansi "6.0.1" ts-retry-promise "^0.7.1" -"@salesforce/core@^5.2.0", "@salesforce/core@^5.3.1", "@salesforce/core@^5.3.10", "@salesforce/core@^5.3.14", "@salesforce/core@^5.3.17", "@salesforce/core@^5.3.18": - version "5.3.18" - resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-5.3.18.tgz#c0b7b59fbef7f0689e88968c614dd1ae2c420f02" - integrity sha512-/Ag7elFngTT13PRblSPJPB2Q+xk3jR2SX8bYa83fcQljVF7ApGB5qtFpauXmUv8lgRnN+F01HNqM16iszAMP9w== +"@salesforce/core@^5.3.1", "@salesforce/core@^5.3.10", "@salesforce/core@^5.3.14", "@salesforce/core@^5.3.17", "@salesforce/core@^5.3.18", "@salesforce/core@^5.3.20": + version "5.3.20" + resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-5.3.20.tgz#4e934d4551bb70423cb1c4115615bc41cffca41e" + integrity sha512-y+O6O2c8OYFDrAy2qsG+pAcNxoyL14nmBXcBRRcYA7Huj8ikK+aLJK84PuVAYdQz+hNwImQF+69IWtDkpK4Irg== dependencies: "@salesforce/kit" "^3.0.15" "@salesforce/schemas" "^1.6.1" @@ -995,21 +1027,21 @@ semver "^7.5.4" ts-retry-promise "^0.7.1" -"@salesforce/dev-config@^4.0.1": +"@salesforce/dev-config@^4.1.0": version "4.1.0" resolved "https://registry.yarnpkg.com/@salesforce/dev-config/-/dev-config-4.1.0.tgz#e529576466d074e7a5f1441236510fef123da01e" integrity sha512-2iDDepiIwjXHS5IVY7pwv8jMo4xWosJ7p/UTj+lllpB/gnJiYLhjJPE4Z3FCGFKyvfg5jGaimCd8Ca6bLGsCQA== -"@salesforce/dev-scripts@^6.0.3": - version "6.0.3" - resolved "https://registry.yarnpkg.com/@salesforce/dev-scripts/-/dev-scripts-6.0.3.tgz#6cf4504fd0ec8b4685e729b26685eed60f9c8b26" - integrity sha512-WLl1N07oNeRywdypwUrebX/kCkSm3IzmAQpUt4q4Sk8r4vTWv5b6F0pHLv0pGS8/QWNJT7xWGZDF1lgJBHOsmA== +"@salesforce/dev-scripts@^6.0.4": + version "6.0.4" + resolved "https://registry.yarnpkg.com/@salesforce/dev-scripts/-/dev-scripts-6.0.4.tgz#0043b8ef4b970f8c2f945cc74eada3b1db52fa9a" + integrity sha512-/kdl99bHaNeCoVwfeQhIaKzorcmgpe/nZhlT7ru+If+18NRvBgW5OGmh++Q/NsraaYbsQ/0cDcGNz1dnQ11weA== dependencies: "@commitlint/cli" "^17.1.2" "@commitlint/config-conventional" "^17.1.0" - "@salesforce/dev-config" "^4.0.1" + "@salesforce/dev-config" "^4.1.0" "@salesforce/prettier-config" "^0.0.3" - "@types/chai" "^4.2.11" + "@types/chai" "^4.3.9" "@types/mocha" "^10.0.3" "@types/node" "^18" "@types/sinon" "^10.0.20" @@ -1053,18 +1085,18 @@ handlebars "^4.7.8" tslib "^2" -"@salesforce/plugin-source@^2.10.46": - version "2.10.46" - resolved "https://registry.yarnpkg.com/@salesforce/plugin-source/-/plugin-source-2.10.46.tgz#6f3d28776e2bf642b4c54faa603769c3b9d40072" - integrity sha512-qo6HH32aJ6spXNAwEqIhla32fPB2tEZyII8rauPpSidetREnUMZztC7x3XOYEWlvMxm6PqXkOorN1MhPTgys1A== +"@salesforce/plugin-source@^2.11.0": + version "2.11.0" + resolved "https://registry.yarnpkg.com/@salesforce/plugin-source/-/plugin-source-2.11.0.tgz#078d1f66378f1e73fafc34da005c44745adcbdac" + integrity sha512-sT0Tj1V0U7xqZ90OfS4jmigv8yLgPuTq5yYAGKnKhqYgsZ0afmR9Z6GBn2j439peaV+KElNjUEg1nLro3fWQpA== dependencies: "@oclif/core" "^2.15.0" "@salesforce/apex-node" "^2.1.0" - "@salesforce/core" "^5.3.10" - "@salesforce/kit" "^3.0.14" + "@salesforce/core" "^5.3.18" + "@salesforce/kit" "^3.0.15" "@salesforce/sf-plugins-core" "^3.1.25" - "@salesforce/source-deploy-retrieve" "^9.7.28" - "@salesforce/source-tracking" "^4.2.17" + "@salesforce/source-deploy-retrieve" "^9.8.4" + "@salesforce/source-tracking" "^4.3.0" chalk "^4.1.2" got "^11.8.6" proxy-agent "^6.3.1" @@ -1080,7 +1112,7 @@ resolved "https://registry.yarnpkg.com/@salesforce/schemas/-/schemas-1.6.1.tgz#7d1c071e1e509ca9d2d8a6e48ac7447dd67a534d" integrity sha512-eVy947ZMxCJReKJdgfddUIsBIbPTa/i8RwQGwxq4/ss38H5sLOAeSTaun9V7HpJ1hkpDznWKfgzYvjsst9K6ig== -"@salesforce/sf-plugins-core@^3.1.22", "@salesforce/sf-plugins-core@^3.1.25", "@salesforce/sf-plugins-core@^3.1.28": +"@salesforce/sf-plugins-core@^3.1.25", "@salesforce/sf-plugins-core@^3.1.28": version "3.1.28" resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-3.1.28.tgz#7714c5b1ce26052bb5cbc524c5990bc52eb601cd" integrity sha512-Z1fVS/pqLCX/3ESrjvtzyuvDFwXu8qxjqs5Gana0J7RKkhDL0f7w+pz3DR1/YfQPeHK8rk9pFDOKB3tOnXf9Lw== @@ -1092,10 +1124,23 @@ chalk "^4" inquirer "^8.2.5" -"@salesforce/source-deploy-retrieve@^9.7.28", "@salesforce/source-deploy-retrieve@^9.8.3", "@salesforce/source-deploy-retrieve@^9.8.4": - version "9.8.4" - resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-9.8.4.tgz#e6d21d8f2e0b44fae242e31ef8b4f31991a07deb" - integrity sha512-/g/WkUFCogCANnKkeHmQyXpAbIy+A2htEYliVaoxg3UccDqHCZd5Gmlk6Gwsd03YsLAt249bay5mAokD7y39sQ== +"@salesforce/sf-plugins-core@^4.1.1": + version "4.1.1" + resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-4.1.1.tgz#685843bf9fbb1c2e448b922a1399dde1808ed549" + integrity sha512-oyRjy/WpU7F8sVWwsUuxZ+WnfnJ4s/60dsIOXyKYezHfywMp8APPmZwETpyFTkKl23rZQT1vciFwTDKXYEP82A== + dependencies: + "@oclif/core" "^3.0.0" + "@salesforce/core" "^5.3.1" + "@salesforce/kit" "^3.0.13" + "@salesforce/ts-types" "^2.0.7" + "@types/inquirer" "^8.2.3" + chalk "^4" + inquirer "^8.2.5" + +"@salesforce/source-deploy-retrieve@^9.8.4", "@salesforce/source-deploy-retrieve@^9.8.5", "@salesforce/source-deploy-retrieve@^9.8.6": + version "9.8.6" + resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-9.8.6.tgz#3b9240bc776a44bc740e59acbd86da3072f3efdc" + integrity sha512-avsfR/hB54ZdSOI3bYdUqRPQbjExKEwAZfsIbs6N1vtidPrc1TSHvloCZhY0Clou+vLgjabIHEHVyQJUln0FKA== dependencies: "@salesforce/core" "^5.3.17" "@salesforce/kit" "^3.0.15" @@ -1110,15 +1155,15 @@ minimatch "^5.1.6" proxy-agent "^6.3.1" -"@salesforce/source-testkit@^2.1.62": - version "2.1.62" - resolved "https://registry.yarnpkg.com/@salesforce/source-testkit/-/source-testkit-2.1.62.tgz#502e8a90c0359e886a1654beb0567861d4ad0173" - integrity sha512-c7Qd7hHOd+x3V0sFzOSgPbQFBrMX3uZNbxJ1HMIa/xrEalm2tkk+cdH0HiXgpoqDZQUvn80hdeDoOdOFNYUzsw== +"@salesforce/source-testkit@^2.1.64": + version "2.1.64" + resolved "https://registry.yarnpkg.com/@salesforce/source-testkit/-/source-testkit-2.1.64.tgz#32a86c094d9c1a68fbbca030b1a91b155039e301" + integrity sha512-tFFK/MfocFfya4ZEDjX25bZ1sNDyXmXlzpzb5H8wPNw0HRWSnALRZBA8s3mJS5mCr8upjBYz/QVSBl1XSFBUPQ== dependencies: - "@salesforce/cli-plugins-testkit" "^4.4.8" + "@salesforce/cli-plugins-testkit" "^4.4.12" "@salesforce/core" "^5.3.14" "@salesforce/kit" "^3.0.14" - "@salesforce/source-deploy-retrieve" "^9.8.3" + "@salesforce/source-deploy-retrieve" "^9.8.5" "@salesforce/ts-types" "^2.0.9" archiver "^5.3.2" chai-each "^0.0.1" @@ -1126,30 +1171,31 @@ shelljs "^0.8.4" sinon "^10.0.0" -"@salesforce/source-tracking@^4.2.17", "@salesforce/source-tracking@^4.3.0": - version "4.3.0" - resolved "https://registry.yarnpkg.com/@salesforce/source-tracking/-/source-tracking-4.3.0.tgz#dc281b260d28f831042475468aa0b0350d7328a7" - integrity sha512-1ysyxU7lLi2pQNgEQbLpfSciLhsYrYwVu+VEq+tCXzm0TfmyscT1a1vcyykOzztpWMtKNQW/HdJEaAPBPd9FVg== +"@salesforce/source-tracking@^4.3.0", "@salesforce/source-tracking@^4.4.3": + version "4.4.3" + resolved "https://registry.yarnpkg.com/@salesforce/source-tracking/-/source-tracking-4.4.3.tgz#3e83f5afd3935650e358410122cf1611f859d1b3" + integrity sha512-98XA3NKDmIauloX8PUQZ/fjDm/Llm8fW7Ro4U+VwF8zLFi4LQX3+hZPNlY1LesT08YfWmcLMtgek4ycDIrPeyQ== dependencies: - "@salesforce/core" "^5.3.18" + "@oclif/core" "^3.10.8" + "@salesforce/core" "^5.3.20" "@salesforce/kit" "^3.0.15" - "@salesforce/source-deploy-retrieve" "^9.8.4" + "@salesforce/source-deploy-retrieve" "^9.8.5" "@salesforce/ts-types" "^2.0.9" fast-xml-parser "^4.2.5" graceful-fs "^4.2.11" isomorphic-git "1.23.0" ts-retry-promise "^0.7.0" -"@salesforce/ts-sinon@1.4.15": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@salesforce/ts-sinon/-/ts-sinon-1.4.15.tgz#6214b73fc53fe0ee2583bbd87d4b4217e557279d" - integrity sha512-mw//jI+QkkS+PEwqMtazlhdi3eYY49InnJ/EipmrsdsdV9b+W79D5N4C92LROYe9VNq+3q5VHJcT/jhARxZsTg== +"@salesforce/ts-sinon@^1.4.19": + version "1.4.19" + resolved "https://registry.yarnpkg.com/@salesforce/ts-sinon/-/ts-sinon-1.4.19.tgz#64157b6c8cf4a3c637867e2ddd90c2d058c334f7" + integrity sha512-vopxKrI6QD0OCtPlge1eGGHFWLkoDee7KaB/dpGeRwioeNfCVJ8ikELN0hv0zq9Ys6gUYWYcdpxzTP1upslCJA== dependencies: - "@salesforce/ts-types" "^2.0.7" + "@salesforce/ts-types" "^2.0.9" sinon "^5.1.1" tslib "^2.6.1" -"@salesforce/ts-types@^2.0.6", "@salesforce/ts-types@^2.0.7", "@salesforce/ts-types@^2.0.8", "@salesforce/ts-types@^2.0.9": +"@salesforce/ts-types@^2.0.6", "@salesforce/ts-types@^2.0.7", "@salesforce/ts-types@^2.0.9": version "2.0.9" resolved "https://registry.yarnpkg.com/@salesforce/ts-types/-/ts-types-2.0.9.tgz#66bff7b41720065d6b01631b6f6a3ccca02857c5" integrity sha512-boUD9jw5vQpTCPCCmK/NFTWjSuuW+lsaxOynkyNXLW+zxOc4GDjhtKc4j0vWZJQvolpafbyS8ZLFHZJvs12gYA== @@ -1264,72 +1310,6 @@ resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.2.tgz#5981a8db18b56ba38ef0efb7d995b12aa7b51918" integrity sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ== -"@swc/core-darwin-arm64@1.3.39": - version "1.3.39" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.39.tgz#7c6e87dc8b27ce406eeb5d5cd39bde9fe06f416c" - integrity sha512-qYR47BEfUvK1WRAP/LVbHakCo4mcksgDjRutJbkx3maTgHlSGYQKCQo7hz+or+n3cbR2abY0rFEgoCLjZctGOw== - -"@swc/core-darwin-x64@1.3.39": - version "1.3.39" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.39.tgz#709f269e2af553b16d35a702c90553ef0af3e400" - integrity sha512-kqJ8OleY/y3S+HXnZxDWFVbKpRsb7gZDZr6Pksr8tzFba/6pLkZFBxds/zgfWIlUwri2Lcx0X872MJ46ghwv9w== - -"@swc/core-linux-arm-gnueabihf@1.3.39": - version "1.3.39" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.39.tgz#04e83e963ecf42228994bee3028f74b17a871456" - integrity sha512-+c3A2BV0esPNHn/KKMqP+bphUF86sVKUIaxn5tKMDrnO8ckOpEMbJ+SwzYLtwC9JIYjWwryg/0yvWrdma26Irw== - -"@swc/core-linux-arm64-gnu@1.3.39": - version "1.3.39" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.39.tgz#fae7fa25a1b22ea51ce53d9982ffbb17c99f7071" - integrity sha512-IRrfft7ANk3NR0qX6bXbfkqbT+WR0TMvgODQdZAtRQIt5ERFpdhcnYc4tlJzfV23R0Ek3kpdA8Gduj4tHk0K6w== - -"@swc/core-linux-arm64-musl@1.3.39": - version "1.3.39" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.39.tgz#74544b4fe31c708e5baad73a6ca52c6f9de4b4c1" - integrity sha512-N8tnynqBdRzY8m2blPAnLUtaln0m8gb96q6ipnY+XoHQ3Z6uZoUq8jWAeFDhD+MCzM7qD2HyBDN7sEqiwMRO/g== - -"@swc/core-linux-x64-gnu@1.3.39": - version "1.3.39" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.39.tgz#8b8345d7080dbbda3e673ce21419bae4fc7cd214" - integrity sha512-Jif56kWHOjQexCib4FVbGeUcBUc56cgNW7ELEKAUCID70z20JHMVTd5utcmfi1L9tywGMvfzqD5z+NQtrFV8GQ== - -"@swc/core-linux-x64-musl@1.3.39": - version "1.3.39" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.39.tgz#70d00f78ec1695b8d6581b0a885ac9ba1bca3867" - integrity sha512-ZiGERr/mdsEwfSiWn2Qokd8a4TTJkLVta6Nan39Bozo6J789u4uDF9Cj5TWWMSanHYAK/oRDaUm1yo2/DSecAA== - -"@swc/core-win32-arm64-msvc@1.3.39": - version "1.3.39" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.39.tgz#9f35782f008a722f8ae230766e16e426f2b146f9" - integrity sha512-eUAk12LZ6RQHhe0ikZZsi0CPbRA6qsvoNQQ/6uwVF60CT0UnJrLiX3w3q30aXK3WjVR6uUlVEn7ze5t7HUeGyQ== - -"@swc/core-win32-ia32-msvc@1.3.39": - version "1.3.39" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.39.tgz#3964c477d542ac41990c8cb12558d6f616cc3d64" - integrity sha512-c3MIt+0gvZD0hmPOyoIJtdgx1ubP7E+uUnljw2+Nk8rO6qhIrWI08tWRNbT0HNLXHfHhKMJHvSAg3DGW8vG3Rg== - -"@swc/core-win32-x64-msvc@1.3.39": - version "1.3.39" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.39.tgz#81344093a5e4b4e24894b1abcf35689f3838b5c2" - integrity sha512-c4xGToLavhHjrE0Um0GyXCilL3sKNRP71GgQTVvqTFHxMmdUCBdug28olMDE1gYsCqXHaF6rPtg3QmD6dhTzKQ== - -"@swc/core@1.3.39": - version "1.3.39" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.39.tgz#c59f92dc116cf32a08d788aa5e0ce7eb856e3d40" - integrity sha512-r5oIySPo2OkC14+gmhK5H1HnDEgOvj5kx6Ogxa+Og7KyWIHE8l1JjjW+4wzYdjxtdhRjVRhvoI6mPQNQz/btBg== - optionalDependencies: - "@swc/core-darwin-arm64" "1.3.39" - "@swc/core-darwin-x64" "1.3.39" - "@swc/core-linux-arm-gnueabihf" "1.3.39" - "@swc/core-linux-arm64-gnu" "1.3.39" - "@swc/core-linux-arm64-musl" "1.3.39" - "@swc/core-linux-x64-gnu" "1.3.39" - "@swc/core-linux-x64-musl" "1.3.39" - "@swc/core-win32-arm64-msvc" "1.3.39" - "@swc/core-win32-ia32-msvc" "1.3.39" - "@swc/core-win32-x64-msvc" "1.3.39" - "@szmarczak/http-timer@^4.0.5": version "4.0.6" resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.6.tgz#b4a914bb62e7c272d4e5989fe4440f812ab1d807" @@ -1395,10 +1375,10 @@ "@types/node" "*" "@types/responselike" "^1.0.0" -"@types/chai@^4.2.11": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.5.tgz#ae69bcbb1bebb68c4ac0b11e9d8ed04526b3562b" - integrity sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng== +"@types/chai@^4.3.9": + version "4.3.10" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.10.tgz#2ad2959d1767edee5b0e4efb1a0cd2b500747317" + integrity sha512-of+ICnbqjmFCiixUnqRulbylyXQrPqIGf/B3Jax1wIF3DvSheysQxAWvqHhZiW3IQrycvokcLcFQlveGp+vyNg== "@types/cli-progress@^3.11.0": version "3.11.0" @@ -1425,6 +1405,14 @@ resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== +"@types/inquirer@^8.2.3": + version "8.2.10" + resolved "https://registry.yarnpkg.com/@types/inquirer/-/inquirer-8.2.10.tgz#9444dce2d764c35bc5bb4d742598aaa4acb6561b" + integrity sha512-IdD5NmHyVjWM8SHWo/kPBgtzXatwPkfwzyP3fN1jF2g9BWt5WO+8hL2F4o2GKIYsU40PpqeevuUWvkS/roXJkA== + dependencies: + "@types/through" "*" + rxjs "^7.2.0" + "@types/istanbul-lib-coverage@*": version "2.0.4" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" @@ -1444,7 +1432,7 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/json-schema@^7.0.11", "@types/json-schema@^7.0.12", "@types/json-schema@^7.0.9": +"@types/json-schema@^7.0.12", "@types/json-schema@^7.0.9": version "7.0.14" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.14.tgz#74a97a5573980802f32c8e47b663530ab3b6b7d1" integrity sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw== @@ -1461,6 +1449,18 @@ dependencies: "@types/node" "*" +"@types/lodash.difference@^4.5.8": + version "4.5.9" + resolved "https://registry.yarnpkg.com/@types/lodash.difference/-/lodash.difference-4.5.9.tgz#69e82a68557779abac489585f43159997cab874c" + integrity sha512-MNlajcjtwzLpXk+cw38UkBvEXJNEPhULgS8A4EHwtUwT7f7yFH/SFKD0iw5Rfilwh60yJIgFo0vsMr7xsa5+aw== + dependencies: + "@types/lodash" "*" + +"@types/lodash@*": + version "4.14.201" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.201.tgz#76f47cb63124e806824b6c18463daf3e1d480239" + integrity sha512-y9euML0cim1JrykNxADLfaG0FgD1g/yTHwUs/Jg9ZIU7WKj2/4IW9Lbb1WZbvck78W/lfGXFfe+u2EGfIJXdLQ== + "@types/minimatch@*": version "5.1.2" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" @@ -1545,6 +1545,13 @@ resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz#bf2e02a3dbd4aecaf95942ecd99b7402e03fad5e" integrity sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA== +"@types/through@*": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/through/-/through-0.0.33.tgz#14ebf599320e1c7851e7d598149af183c6b9ea56" + integrity sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ== + dependencies: + "@types/node" "*" + "@types/vinyl@^2.0.4": version "2.0.7" resolved "https://registry.yarnpkg.com/@types/vinyl/-/vinyl-2.0.7.tgz#9739a9a2afaf9af32761c54a0e82c735279f726c" @@ -1589,6 +1596,14 @@ "@typescript-eslint/types" "5.62.0" "@typescript-eslint/visitor-keys" "5.62.0" +"@typescript-eslint/scope-manager@6.10.0": + version "6.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz#b0276118b13d16f72809e3cecc86a72c93708540" + integrity sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg== + dependencies: + "@typescript-eslint/types" "6.10.0" + "@typescript-eslint/visitor-keys" "6.10.0" + "@typescript-eslint/scope-manager@6.9.1": version "6.9.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.9.1.tgz#e96afeb9a68ad1cd816dba233351f61e13956b75" @@ -1612,6 +1627,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== +"@typescript-eslint/types@6.10.0": + version "6.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.10.0.tgz#f4f0a84aeb2ac546f21a66c6e0da92420e921367" + integrity sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg== + "@typescript-eslint/types@6.9.1": version "6.9.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.9.1.tgz#a6cfc20db0fcedcb2f397ea728ef583e0ee72459" @@ -1630,6 +1650,19 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@6.10.0": + version "6.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz#667381eed6f723a1a8ad7590a31f312e31e07697" + integrity sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg== + dependencies: + "@typescript-eslint/types" "6.10.0" + "@typescript-eslint/visitor-keys" "6.10.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + "@typescript-eslint/typescript-estree@6.9.1": version "6.9.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.1.tgz#8c77910a49a04f0607ba94d78772da07dab275ad" @@ -1670,6 +1703,19 @@ eslint-scope "^5.1.1" semver "^7.3.7" +"@typescript-eslint/utils@^6.7.5": + version "6.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.10.0.tgz#4d76062d94413c30e402c9b0df8c14aef8d77336" + integrity sha512-v+pJ1/RcVyRc0o4wAGux9x42RHmAjIGzPRo538Z8M1tVx6HOnoQBCX/NoadHQlZeC+QO2yr4nNSFWOoraZCAyg== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "6.10.0" + "@typescript-eslint/types" "6.10.0" + "@typescript-eslint/typescript-estree" "6.10.0" + semver "^7.5.4" + "@typescript-eslint/visitor-keys@5.62.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" @@ -1678,6 +1724,14 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@6.10.0": + version "6.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz#b9eaf855a1ac7e95633ae1073af43d451e8f84e3" + integrity sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg== + dependencies: + "@typescript-eslint/types" "6.10.0" + eslint-visitor-keys "^3.4.1" + "@typescript-eslint/visitor-keys@6.9.1": version "6.9.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.1.tgz#6753a9225a0ba00459b15d6456b9c2780b66707d" @@ -2057,11 +2111,6 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== -at-least-node@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" - integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - atomic-sleep@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/atomic-sleep/-/atomic-sleep-1.0.0.tgz#eb85b77a601fc932cfe432c5acd364a9e2c9075b" @@ -2438,7 +2487,12 @@ chalk@^4, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" -change-case@^4.1.2: +chalk@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== + +change-case@^4, change-case@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/change-case/-/change-case-4.1.2.tgz#fedfc5f136045e2398c0410ee441f95704641e12" integrity sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A== @@ -2669,16 +2723,16 @@ commander@7.1.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.1.0.tgz#f2eaecf131f10e36e07d894698226e36ae0eb5ff" integrity sha512-pRxBna3MJe6HKnBGsDyMv8ETbptw3axEdYHoqNh7gu5oDcew8fs0xnivZGm06Ogk8zGAJ9VX+OPEr2GXEQK4dg== +commander@^11.0.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-11.1.0.tgz#62fdce76006a68e5c1ab3314dc92e800eb83d906" + integrity sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ== + commander@^4.0.1: version "4.1.1" resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== -commander@^9.4.1: - version "9.5.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" - integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== - comment-parser@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/comment-parser/-/comment-parser-1.4.0.tgz#0f8c560f59698193854f12884c20c0e39a26d32c" @@ -2717,21 +2771,6 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -concurrently@^7.6.0: - version "7.6.0" - resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-7.6.0.tgz#531a6f5f30cf616f355a4afb8f8fcb2bba65a49a" - integrity sha512-BKtRgvcJGeZ4XttiDiNcFiRlxoAeZOseqUvyYRUp/Vtd+9p1ULmeoSqGsDA+2ivdeDFpqrJvGvmI+StKfKl5hw== - dependencies: - chalk "^4.1.0" - date-fns "^2.29.1" - lodash "^4.17.21" - rxjs "^7.0.0" - shell-quote "^1.7.3" - spawn-command "^0.0.2-1" - supports-color "^8.1.0" - tree-kill "^1.2.2" - yargs "^17.3.1" - console-control-strings@^1.0.0, console-control-strings@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" @@ -2898,13 +2937,6 @@ data-uri-to-buffer@^5.0.1: resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-5.0.1.tgz#db89a9e279c2ffe74f50637a59a32fb23b3e4d7c" integrity sha512-a9l6T1qqDogvvnw0nKlfZzqsyikEBZBClF39V3TFoKhDtGBqHu2HkuomJc02j5zft8zrUaXEuoicLeW54RkzPg== -date-fns@^2.29.1: - version "2.30.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0" - integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw== - dependencies: - "@babel/runtime" "^7.21.0" - dateformat@^4.5.0, dateformat@^4.6.3: version "4.6.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-4.6.3.tgz#556fa6497e5217fedb78821424f8a1c22fa3f4b5" @@ -3117,7 +3149,7 @@ ecdsa-sig-formatter@1.0.11: dependencies: safe-buffer "^5.0.1" -ejs@^3.1.8: +ejs@^3.1.8, ejs@^3.1.9: version "3.1.9" resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.9.tgz#03c9e8777fe12686a9effcef22303ca3d8eeb361" integrity sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ== @@ -3366,12 +3398,21 @@ eslint-plugin-jsdoc@^46.8.2: semver "^7.5.4" spdx-expression-parse "^3.0.1" -eslint-plugin-sf-plugin@^1.16.14: - version "1.16.14" - resolved "https://registry.yarnpkg.com/eslint-plugin-sf-plugin/-/eslint-plugin-sf-plugin-1.16.14.tgz#64138f6c597ad7b750d9d7615894e2fe504852ec" - integrity sha512-numvHHhJjExz4ojxK3O25G8Vh8pXtMgZzwEaKGGsKaOJFm4rmSS2NabmfkRPYX2NCO/xn4eNHm1iGTnnQywGvg== +eslint-plugin-perfectionist@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-perfectionist/-/eslint-plugin-perfectionist-2.2.0.tgz#a1b1f1407ce9bc20a4f0e2b8113fb84e5b9dfb9f" + integrity sha512-/nG2Uurd6AY7CI6zlgjHPOoiPY8B7EYMUWdNb5w+EzyauYiQjjD5lQwAI1FlkBbCCFFZw/CdZIPQhXumYoiyaw== dependencies: - "@salesforce/core" "^5.3.17" + "@typescript-eslint/utils" "^6.7.5" + minimatch "^9.0.3" + natural-compare-lite "^1.4.0" + +eslint-plugin-sf-plugin@^1.16.15: + version "1.16.15" + resolved "https://registry.yarnpkg.com/eslint-plugin-sf-plugin/-/eslint-plugin-sf-plugin-1.16.15.tgz#99d0b522bb7eebefc8e456aa4b725f6fbbf2fa01" + integrity sha512-Vog0xc8DwLOCoPbwFx9GxaXHqpG0FvlpITkGzp//SdjcV7wqVW4CT76JES8IGenGv6mAecW5VqSyQzsIHFZGew== + dependencies: + "@salesforce/core" "^5.3.20" "@typescript-eslint/utils" "^5.59.11" eslint-plugin-unicorn@^49.0.0: @@ -3805,16 +3846,6 @@ fs-extra@^8.1, fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^9.0.1: - version "9.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" - integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - dependencies: - at-least-node "^1.0.0" - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - fs-minipass@^2.0.0, fs-minipass@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" @@ -4989,7 +5020,7 @@ json5@^1.0.2: dependencies: minimist "^1.2.0" -json5@^2.2.1, json5@^2.2.2: +json5@^2.2.2, json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== @@ -5141,6 +5172,11 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA== + lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" @@ -5231,11 +5267,31 @@ lodash.snakecase@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" integrity sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw== +lodash.sortby@^4.7.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA== + lodash.startcase@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.startcase/-/lodash.startcase-4.4.0.tgz#9436e34ed26093ed7ffae1936144350915d9add8" integrity sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg== +lodash.template@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" + integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.union@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" @@ -5549,10 +5605,10 @@ minimatch@^7.2.0: dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.0, minimatch@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.1.tgz#8a555f541cf976c622daf078bb28f29fb927c253" - integrity sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w== +minimatch@^9.0.0, minimatch@^9.0.1, minimatch@^9.0.3: + version "9.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== dependencies: brace-expansion "^2.0.1" @@ -5767,6 +5823,11 @@ nanoid@3.3.3: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" integrity sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w== +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -6186,28 +6247,27 @@ object.values@^1.1.7: define-properties "^1.2.0" es-abstract "^1.22.1" -oclif@^3.16.0: - version "3.17.2" - resolved "https://registry.yarnpkg.com/oclif/-/oclif-3.17.2.tgz#f13756c9b1968047e76b99cb09db9725e96fb2f6" - integrity sha512-+vFXxgmR7dGGz+g6YiqSZu2LXVkBMaS9/rhtsLGkYw45e53CW/3kBgPRnOvxcTDM3Td9JPeBD2JWxXnPKGQW3A== +oclif@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/oclif/-/oclif-4.0.3.tgz#2ff8fab10c29b2cd0bbf8e9c87640a64151b65ff" + integrity sha512-Bq7t1bJvAKYwW3DKQIzok3jkXv7yUIMneoSec1qUr9wfSqzRTZQB0UUDovwlT/L+3TBMVoRyw1WeX+YDvfRJNA== dependencies: - "@oclif/core" "^2.11.4" + "@oclif/core" "^3.0.4" "@oclif/plugin-help" "^5.2.14" "@oclif/plugin-not-found" "^2.3.32" - "@oclif/plugin-warn-if-update-available" "^2.0.44" + "@oclif/plugin-warn-if-update-available" "^3.0.0" async-retry "^1.3.3" aws-sdk "^2.1231.0" - concurrently "^7.6.0" + change-case "^4" debug "^4.3.3" + eslint-plugin-perfectionist "^2.1.0" find-yarn-workspace-root "^2.0.0" fs-extra "^8.1" github-slugger "^1.5.0" got "^11" - lodash "^4.17.21" + lodash.template "^4.5.0" normalize-package-data "^3.0.3" semver "^7.3.8" - shelljs "^0.8.5" - tslib "^2.3.1" yeoman-environment "^3.15.1" yeoman-generator "^5.8.0" @@ -7104,7 +7164,7 @@ rxjs@^6.6.0: dependencies: tslib "^1.9.0" -rxjs@^7.0.0, rxjs@^7.5.5: +rxjs@^7.2.0, rxjs@^7.5.5: version "7.8.1" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== @@ -7140,7 +7200,7 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" -safe-stable-stringify@^2.3.1, safe-stable-stringify@^2.4.1: +safe-stable-stringify@^2.3.1, safe-stable-stringify@^2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz#138c84b6f6edb3db5f8ef3ef7115b8f55ccbf886" integrity sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g== @@ -7281,11 +7341,6 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shell-quote@^1.7.3: - version "1.8.1" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" - integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== - shelljs@^0.8.4, shelljs@^0.8.5, shelljs@~0.8.4: version "0.8.5" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" @@ -7481,11 +7536,6 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -spawn-command@^0.0.2-1: - version "0.0.2-1" - resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0" - integrity sha512-n98l9E2RMSJ9ON1AKisHzz7V42VDiBQGY6PB1BwRglz99wpVsSuGzQ+jOi6lFXBGVTCrRpltvjm+/XA+tpeJrg== - spawn-wrap@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-2.0.0.tgz#103685b8b8f9b79771318827aa78650a610d457e" @@ -7689,7 +7739,7 @@ strnum@^1.0.5: resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db" integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA== -supports-color@8.1.1, supports-color@^8.1.0, supports-color@^8.1.1: +supports-color@8.1.1, supports-color@^8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== @@ -7823,11 +7873,6 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== -tree-kill@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" - integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== - treeverse@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/treeverse/-/treeverse-1.0.4.tgz#a6b0ebf98a1bca6846ddc7ecbc900df08cb9cd5f" @@ -7843,18 +7888,18 @@ ts-api-utils@^1.0.1: resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== -ts-json-schema-generator@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/ts-json-schema-generator/-/ts-json-schema-generator-1.2.0.tgz#5ccce26c7475ff60a034885bff6bd38e574fb073" - integrity sha512-tUMeO3ZvA12d3HHh7T/AK8W5hmUhDRNtqWRHSMN3ZRbUFt+UmV0oX8k1RK4SA+a+BKNHpmW2v06MS49e8Fi3Yg== +ts-json-schema-generator@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ts-json-schema-generator/-/ts-json-schema-generator-1.4.0.tgz#f341b36792c372d3d09245414a4f3a6efa2697f8" + integrity sha512-wm8vyihmGgYpxrqRshmYkWGNwEk+sf3xV2rUgxv8Ryeh7bSpMO7pZQOht+2rS002eDkFTxR7EwRPXVzrS0WJTg== dependencies: - "@types/json-schema" "^7.0.11" - commander "^9.4.1" + "@types/json-schema" "^7.0.12" + commander "^11.0.0" glob "^8.0.3" - json5 "^2.2.1" + json5 "^2.2.3" normalize-path "^3.0.0" - safe-stable-stringify "^2.4.1" - typescript "~4.9.3" + safe-stable-stringify "^2.4.3" + typescript "~5.2.2" ts-node@^10.8.1, ts-node@^10.9.1: version "10.9.1" @@ -7880,6 +7925,11 @@ ts-retry-promise@^0.7.0, ts-retry-promise@^0.7.1: resolved "https://registry.yarnpkg.com/ts-retry-promise/-/ts-retry-promise-0.7.1.tgz#176d6eee6415f07b6c7c286d3657355e284a6906" integrity sha512-NhHOCZ2AQORvH42hOPO5UZxShlcuiRtm7P2jIq2L2RY3PBxw2mLnUsEdHrIslVBFya1v5aZmrR55lWkzo13LrQ== +tsconfck@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/tsconfck/-/tsconfck-3.0.0.tgz#b469f1ced12973bbec3209a55ed8de3bb04223c9" + integrity sha512-w3wnsIrJNi7avf4Zb0VjOoodoO0woEqGgZGQm+LHH9przdUI+XDKsWAXwxHA1DaRTjeuZNcregSzr7RaA8zG9A== + tsconfig-paths@^3.14.2: version "3.14.2" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" @@ -7895,7 +7945,7 @@ tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.1, tslib@^2.5.0, tslib@^2.6.1, tslib@^2.6.2: +tslib@^2, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.5.0, tslib@^2.6.1, tslib@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== @@ -8021,12 +8071,12 @@ typedoc@0.23.16: minimatch "^5.1.0" shiki "^0.11.1" -"typescript@^4.6.4 || ^5.0.0", typescript@^5.2.2: +"typescript@^4.6.4 || ^5.0.0", typescript@^5.2.2, typescript@~5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== -typescript@^4.9.5, typescript@~4.9.3: +typescript@^4.9.5: version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== @@ -8535,7 +8585,7 @@ yargs@^15.0.2: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^17.0.0, yargs@^17.3.1: +yargs@^17.0.0: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== From d5874b3354b8b16bc087d16bdbf2799a503235f0 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 13 Nov 2023 07:08:17 -0600 Subject: [PATCH 7/8] test: generated nuts vs. ts-node --- package.json | 12 ++++++------ test/nuts/generateNuts.ts | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index c30c8503..a5c96d68 100644 --- a/package.json +++ b/package.json @@ -110,16 +110,16 @@ "prepack": "sf-prepack", "prepare": "sf-install", "test": "wireit", - "test:nuts": "ts-node ./test/nuts/generateNuts.ts && nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 10", + "test:nuts": "node --experimental-specifier-resolution=node ./test/nuts/generateNuts.ts && nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 10", "test:nuts:convert": "nyc mocha \"test/nuts/convert/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", "test:nuts:deb": "nyc mocha \"test/nuts/digitalExperienceBundle/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", "test:nuts:delete": "nyc mocha \"test/nuts/delete/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", "test:nuts:deploy": "nyc mocha \"test/nuts/deploy/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", - "test:nuts:deploy:metadata:manifest": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.manifest ts-node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", - "test:nuts:deploy:metadata:metadata": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.metadata ts-node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", - "test:nuts:deploy:metadata:metadata-dir": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.metadata-dir ts-node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", - "test:nuts:deploy:metadata:source-dir": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.source-dir ts-node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", - "test:nuts:deploy:metadata:test-level": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.test-level ts-node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", + "test:nuts:deploy:metadata:manifest": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.manifest node --experimental-specifier-resolution=node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", + "test:nuts:deploy:metadata:metadata": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.metadata node --experimental-specifier-resolution=node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", + "test:nuts:deploy:metadata:metadata-dir": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.metadata-dir node --experimental-specifier-resolution=node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", + "test:nuts:deploy:metadata:source-dir": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.source-dir node --experimental-specifier-resolution=node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", + "test:nuts:deploy:metadata:test-level": "cross-env PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER=deploy.metadata.test-level node --experimental-specifier-resolution=node ./test/nuts/generateNuts.ts && mocha \"test/nuts/generated/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", "test:nuts:destructive": "nyc mocha \"test/nuts/destructive/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", "test:nuts:manifest": "nyc mocha \"test/nuts/manifest/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", "test:nuts:retrieve": "nyc mocha \"test/nuts/retrieve/*.nut.ts\" --slow 4500 --timeout 1200000 --parallel --retries 0 --jobs 20", diff --git a/test/nuts/generateNuts.ts b/test/nuts/generateNuts.ts index e94eb0fa..9ec137f3 100644 --- a/test/nuts/generateNuts.ts +++ b/test/nuts/generateNuts.ts @@ -7,13 +7,14 @@ import * as path from 'node:path'; import * as fs from 'node:fs'; +import { fileURLToPath } from 'node:url'; import { RepoConfig, TEST_REPOS_MAP } from './testMatrix.js'; const SEED_FILTER = process.env.PLUGIN_DEPLOY_RETRIEVE_SEED_FILTER ?? ''; const SEED_EXCLUDE = process.env.PLUGIN_DEPLOY_RETRIEVE_SEED_EXCLUDE; function getSeedFiles(): string[] { - const seedDir = path.join(__dirname, 'seeds'); + const seedDir = path.join(path.dirname(fileURLToPath(import.meta.url)), 'seeds'); const files = fs.readdirSync(seedDir); return files .filter((f) => f.endsWith('.seed.ts')) @@ -39,7 +40,7 @@ function generateNut(generatedDir: string, seedName: string, seedContents: strin } function generateNuts(): void { - const generatedDir = path.resolve(__dirname, 'generated'); + const generatedDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), 'generated'); fs.rmSync(generatedDir, { recursive: true, force: true }); fs.mkdirSync(generatedDir, { recursive: true }); const seeds = getSeedFiles(); From 5e85a404ba3217aee399553383a1f9976bd1b1c7 Mon Sep 17 00:00:00 2001 From: mshanemc Date: Mon, 13 Nov 2023 07:24:55 -0600 Subject: [PATCH 8/8] chore: __filename --- test/commands/deploy.nut.ts | 3 ++- test/commands/deploy/metadata.nut.ts | 3 ++- test/commands/deploy/metadata/quick.nut.ts | 3 ++- test/commands/deploy/metadata/report-mdapi.nut.ts | 3 ++- test/commands/deploy/metadata/report.nut.ts | 3 ++- test/commands/deploy/metadata/resume.nut.ts | 3 ++- test/commands/deploy/metadata/validate.nut.ts | 3 ++- test/nuts/delete/source.nut.ts | 3 ++- test/nuts/destructive/destructiveChanges.nut.ts | 3 ++- test/nuts/retrieve/metadata.nut.ts | 3 ++- test/nuts/seeds/deploy.metadata.manifest.seed.ts | 3 ++- test/nuts/seeds/deploy.metadata.metadata-dir.seed.ts | 3 ++- test/nuts/seeds/deploy.metadata.metadata.seed.ts | 3 ++- test/nuts/seeds/deploy.metadata.source-dir.seed.ts | 3 ++- test/nuts/seeds/deploy.metadata.test-level.seed.ts | 3 ++- test/nuts/specialTypes/customLabels.nut.ts | 3 ++- 16 files changed, 32 insertions(+), 16 deletions(-) diff --git a/test/commands/deploy.nut.ts b/test/commands/deploy.nut.ts index b7f13afc..8e6ed314 100644 --- a/test/commands/deploy.nut.ts +++ b/test/commands/deploy.nut.ts @@ -6,6 +6,7 @@ */ import * as path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { writeJson } from '../../src/commands/deploy.js'; import { TestLevel } from '../../src/utils/types.js'; @@ -17,7 +18,7 @@ describe('deploy NUTs', () => { before(async () => { testkit = await SourceTestkit.create({ repository: 'https://github.com/trailheadapps/dreamhouse-lwc.git', - nut: __filename, + nut: fileURLToPath(import.meta.url), }); }); diff --git a/test/commands/deploy/metadata.nut.ts b/test/commands/deploy/metadata.nut.ts index 487d2aca..4760d0a1 100644 --- a/test/commands/deploy/metadata.nut.ts +++ b/test/commands/deploy/metadata.nut.ts @@ -5,6 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; describe('deploy metadata NUTs', () => { @@ -13,7 +14,7 @@ describe('deploy metadata NUTs', () => { before(async () => { testkit = await SourceTestkit.create({ repository: 'https://github.com/trailheadapps/dreamhouse-lwc.git', - nut: __filename, + nut: fileURLToPath(import.meta.url), }); }); diff --git a/test/commands/deploy/metadata/quick.nut.ts b/test/commands/deploy/metadata/quick.nut.ts index da6eab6a..d7636c33 100644 --- a/test/commands/deploy/metadata/quick.nut.ts +++ b/test/commands/deploy/metadata/quick.nut.ts @@ -5,6 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { assert, config } from 'chai'; import { execCmd } from '@salesforce/cli-plugins-testkit'; @@ -17,7 +18,7 @@ describe('deploy metadata quick NUTs', () => { before(async () => { testkit = await SourceTestkit.create({ repository: 'https://github.com/salesforcecli/sample-project-multiple-packages.git', - nut: __filename, + nut: fileURLToPath(import.meta.url), }); }); diff --git a/test/commands/deploy/metadata/report-mdapi.nut.ts b/test/commands/deploy/metadata/report-mdapi.nut.ts index b86333de..d838828b 100644 --- a/test/commands/deploy/metadata/report-mdapi.nut.ts +++ b/test/commands/deploy/metadata/report-mdapi.nut.ts @@ -7,6 +7,7 @@ import { unlinkSync, existsSync } from 'node:fs'; import { join, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { assert, expect } from 'chai'; import { RequestStatus } from '@salesforce/source-deploy-retrieve'; @@ -20,7 +21,7 @@ describe('[project deploy report] NUTs with metadata-dir', () => { before(async () => { testkit = await SourceTestkit.create({ repository: 'https://github.com/salesforcecli/sample-project-multiple-packages.git', - nut: __filename, + nut: fileURLToPath(import.meta.url), scratchOrgs: [{ duration: 1, alias: orgAlias, config: join('config', 'project-scratch-def.json') }], }); await testkit.convert({ diff --git a/test/commands/deploy/metadata/report.nut.ts b/test/commands/deploy/metadata/report.nut.ts index 69004d76..a4ce3620 100644 --- a/test/commands/deploy/metadata/report.nut.ts +++ b/test/commands/deploy/metadata/report.nut.ts @@ -7,6 +7,7 @@ import { unlinkSync, existsSync } from 'node:fs'; import { join, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { assert, isObject } from '@salesforce/ts-types'; import { expect } from 'chai'; @@ -20,7 +21,7 @@ describe('[project deploy report] NUTs with source-dir', () => { before(async () => { testkit = await SourceTestkit.create({ repository: 'https://github.com/salesforcecli/sample-project-multiple-packages.git', - nut: __filename, + nut: fileURLToPath(import.meta.url), scratchOrgs: [{ duration: 1, alias: orgAlias, config: join('config', 'project-scratch-def.json') }], }); }); diff --git a/test/commands/deploy/metadata/resume.nut.ts b/test/commands/deploy/metadata/resume.nut.ts index d1ff038a..8afa3c6f 100644 --- a/test/commands/deploy/metadata/resume.nut.ts +++ b/test/commands/deploy/metadata/resume.nut.ts @@ -6,6 +6,7 @@ */ import * as fs from 'node:fs'; +import { fileURLToPath } from 'node:url'; import * as path from 'node:path'; import { strict as assert } from 'node:assert'; import { SourceTestkit } from '@salesforce/source-testkit'; @@ -26,7 +27,7 @@ describe('[project deploy resume] NUTs', () => { before(async () => { testkit = await SourceTestkit.create({ repository: 'https://github.com/salesforcecli/sample-project-multiple-packages.git', - nut: __filename, + nut: fileURLToPath(import.meta.url), }); }); diff --git a/test/commands/deploy/metadata/validate.nut.ts b/test/commands/deploy/metadata/validate.nut.ts index 5dc1506c..5fa12870 100644 --- a/test/commands/deploy/metadata/validate.nut.ts +++ b/test/commands/deploy/metadata/validate.nut.ts @@ -6,6 +6,7 @@ */ import * as path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { isObject } from '@salesforce/ts-types'; import { assert, expect } from 'chai'; @@ -18,7 +19,7 @@ describe('deploy metadata validate NUTs', () => { before(async () => { testkit = await SourceTestkit.create({ repository: 'https://github.com/salesforcecli/sample-project-multiple-packages.git', - nut: __filename, + nut: fileURLToPath(import.meta.url), }); }); diff --git a/test/nuts/delete/source.nut.ts b/test/nuts/delete/source.nut.ts index 2ed79d06..f1d3c2fe 100644 --- a/test/nuts/delete/source.nut.ts +++ b/test/nuts/delete/source.nut.ts @@ -6,6 +6,7 @@ */ import * as fs from 'node:fs'; +import { fileURLToPath } from 'node:url'; import * as path from 'node:path'; import { expect } from 'chai'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; @@ -109,7 +110,7 @@ describe('project delete source NUTs', () => { before(async () => { testkit = await SourceTestkit.create({ - nut: __filename, + nut: fileURLToPath(import.meta.url), repository: 'https://github.com/trailheadapps/dreamhouse-lwc.git', }); execCmd('project:deploy:start --source-dir force-app', { ensureExitCode: 0 }); diff --git a/test/nuts/destructive/destructiveChanges.nut.ts b/test/nuts/destructive/destructiveChanges.nut.ts index 053f2c5a..4f528df2 100644 --- a/test/nuts/destructive/destructiveChanges.nut.ts +++ b/test/nuts/destructive/destructiveChanges.nut.ts @@ -6,6 +6,7 @@ */ import * as path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { expect } from 'chai'; import { execCmd } from '@salesforce/cli-plugins-testkit'; import { SourceTestkit } from '@salesforce/source-testkit'; @@ -47,7 +48,7 @@ describe('project deploy start --destructive NUTs', () => { before(async () => { testkit = await SourceTestkit.create({ - nut: __filename, + nut: fileURLToPath(import.meta.url), repository: 'https://github.com/trailheadapps/dreamhouse-lwc.git', }); execCmd('project:deploy:start --source-dir force-app', { ensureExitCode: 0 }); diff --git a/test/nuts/retrieve/metadata.nut.ts b/test/nuts/retrieve/metadata.nut.ts index bb51e45f..8b2bad21 100644 --- a/test/nuts/retrieve/metadata.nut.ts +++ b/test/nuts/retrieve/metadata.nut.ts @@ -7,6 +7,7 @@ import * as path from 'node:path'; import * as fs from 'node:fs'; +import { fileURLToPath } from 'node:url'; import { execCmd } from '@salesforce/cli-plugins-testkit'; import { SourceTestkit } from '@salesforce/source-testkit'; import { expect } from 'chai'; @@ -19,7 +20,7 @@ describe('retrieve metadata NUTs', () => { before(async () => { testkit = await SourceTestkit.create({ repository: 'https://github.com/trailheadapps/dreamhouse-lwc.git', - nut: __filename, + nut: fileURLToPath(import.meta.url), }); await testkit.addTestFiles(); await testkit.deploy({ args: '--source-dir force-app', exitCode: 0 }); diff --git a/test/nuts/seeds/deploy.metadata.manifest.seed.ts b/test/nuts/seeds/deploy.metadata.manifest.seed.ts index e21a336f..6fddc705 100644 --- a/test/nuts/seeds/deploy.metadata.manifest.seed.ts +++ b/test/nuts/seeds/deploy.metadata.manifest.seed.ts @@ -6,6 +6,7 @@ */ import * as path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { assert } from 'chai'; import { TEST_REPOS_MAP } from '../testMatrix.js'; @@ -20,7 +21,7 @@ context('deploy metadata --manifest NUTs [name: %REPO_NAME%]', () => { before(async () => { testkit = await SourceTestkit.create({ repository: REPO.gitUrl, - nut: __filename, + nut: fileURLToPath(import.meta.url), }); // some deploys reference other metadata not included in the deploy, if it's not already in the org it will fail const args = testkit.packageNames.map((p) => `--source-dir ${p}`).join(' '); diff --git a/test/nuts/seeds/deploy.metadata.metadata-dir.seed.ts b/test/nuts/seeds/deploy.metadata.metadata-dir.seed.ts index 7ace3ee0..feaab68a 100644 --- a/test/nuts/seeds/deploy.metadata.metadata-dir.seed.ts +++ b/test/nuts/seeds/deploy.metadata.metadata-dir.seed.ts @@ -6,6 +6,7 @@ */ import * as path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { RequestStatus } from '@salesforce/source-deploy-retrieve'; import { JsonMap } from '@salesforce/ts-types'; @@ -22,7 +23,7 @@ context('deploy metadata --metadata-dir NUTs [name: %REPO_NAME%]', () => { before(async () => { testkit = await SourceTestkit.create({ repository: REPO.gitUrl, - nut: __filename, + nut: fileURLToPath(import.meta.url), }); }); diff --git a/test/nuts/seeds/deploy.metadata.metadata.seed.ts b/test/nuts/seeds/deploy.metadata.metadata.seed.ts index 7614e20a..166866a0 100644 --- a/test/nuts/seeds/deploy.metadata.metadata.seed.ts +++ b/test/nuts/seeds/deploy.metadata.metadata.seed.ts @@ -5,6 +5,7 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { assert } from 'chai'; import { TEST_REPOS_MAP } from '../testMatrix.js'; @@ -19,7 +20,7 @@ context('deploy metadata --metadata NUTs [name: %REPO_NAME%]', () => { before(async () => { testkit = await SourceTestkit.create({ repository: REPO.gitUrl, - nut: __filename, + nut: fileURLToPath(import.meta.url), }); // some deploys reference other metadata not included in the deploy, if it's not already in the org it will fail const args = testkit.packageNames.map((p) => `--source-dir ${p}`).join(' '); diff --git a/test/nuts/seeds/deploy.metadata.source-dir.seed.ts b/test/nuts/seeds/deploy.metadata.source-dir.seed.ts index 7da38916..afc3ef5f 100644 --- a/test/nuts/seeds/deploy.metadata.source-dir.seed.ts +++ b/test/nuts/seeds/deploy.metadata.source-dir.seed.ts @@ -6,6 +6,7 @@ */ import * as path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { assert } from 'chai'; import { SourceTestkit } from '@salesforce/source-testkit'; import { TEST_REPOS_MAP } from '../testMatrix.js'; @@ -20,7 +21,7 @@ context('deploy metadata --source-dir NUTs [name: %REPO_NAME%]', () => { before(async () => { testkit = await SourceTestkit.create({ repository: REPO.gitUrl, - nut: __filename, + nut: fileURLToPath(import.meta.url), }); }); diff --git a/test/nuts/seeds/deploy.metadata.test-level.seed.ts b/test/nuts/seeds/deploy.metadata.test-level.seed.ts index 2d0b3849..494d511d 100644 --- a/test/nuts/seeds/deploy.metadata.test-level.seed.ts +++ b/test/nuts/seeds/deploy.metadata.test-level.seed.ts @@ -7,6 +7,7 @@ import * as fs from 'node:fs'; import * as path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; import { assert, expect } from 'chai'; import { execCmd } from '@salesforce/cli-plugins-testkit'; @@ -22,7 +23,7 @@ context('deploy metadata --test-level NUTs [name: %REPO_NAME%]', () => { before(async () => { testkit = await SourceTestkit.create({ repository: REPO.gitUrl, - nut: __filename, + nut: fileURLToPath(import.meta.url), }); const args = testkit.packageNames.map((p) => `--source-dir ${p}`).join(' '); diff --git a/test/nuts/specialTypes/customLabels.nut.ts b/test/nuts/specialTypes/customLabels.nut.ts index d3a0c059..146b7c02 100644 --- a/test/nuts/specialTypes/customLabels.nut.ts +++ b/test/nuts/specialTypes/customLabels.nut.ts @@ -6,6 +6,7 @@ */ import * as path from 'node:path'; +import { fileURLToPath } from 'node:url'; import { SourceTestkit } from '@salesforce/source-testkit'; context('deploy metadata CustomLabels NUTs', () => { @@ -14,7 +15,7 @@ context('deploy metadata CustomLabels NUTs', () => { before(async () => { testkit = await SourceTestkit.create({ repository: 'https://github.com/salesforcecli/sample-project-multiple-packages.git', - nut: __filename, + nut: fileURLToPath(import.meta.url), }); });