Skip to content

Commit

Permalink
refactor: handle missing data in conflicts fn
Browse files Browse the repository at this point in the history
* chore: bump deps

* refactor: handle missing data in conflicts fn
  • Loading branch information
mshanemc authored Nov 21, 2023
1 parent b3f8d60 commit 6a8428a
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 56 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
"author": "Salesforce",
"bugs": "https://github.com/forcedotcom/cli/issues",
"dependencies": {
"@oclif/core": "^3.11.0",
"@oclif/core": "^3.12.0",
"@salesforce/apex-node": "^2.1.2",
"@salesforce/core": "^6.1.3",
"@salesforce/core": "^6.2.0",
"@salesforce/kit": "^3.0.15",
"@salesforce/sf-plugins-core": "^5.0.1",
"@salesforce/source-deploy-retrieve": "^10.0.0",
"@salesforce/source-tracking": "^5.0.0",
"@salesforce/sf-plugins-core": "^5.0.3",
"@salesforce/source-deploy-retrieve": "^10.0.2",
"@salesforce/source-tracking": "^5.0.1",
"chalk": "^5.3.0"
},
"devDependencies": {
"@oclif/plugin-command-snapshot": "^5.0.2",
"@salesforce/cli-plugins-testkit": "^5.0.4",
"@salesforce/dev-scripts": "^7.1.1",
"@salesforce/plugin-command-reference": "^3.0.46",
"@salesforce/plugin-command-reference": "^3.0.47",
"@salesforce/plugin-source": "^2.11.4",
"@salesforce/source-testkit": "^2.1.65",
"@salesforce/ts-sinon": "^1.4.19",
Expand Down
5 changes: 4 additions & 1 deletion src/utils/conflicts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
import { ux } from '@oclif/core';
import { ConflictResponse } from '@salesforce/source-tracking';

export const writeConflictTable = (conflicts: ConflictResponse[]): void => {
export const writeConflictTable = (conflicts?: ConflictResponse[]): void => {
// Interfaces cannot be casted to Record<string, unknown> so we have to cast to unknown first
// See https://github.com/microsoft/TypeScript/issues/15300
if (!conflicts || conflicts.length === 0) {
return;
}
ux.table(
conflicts.map((c) => ({ state: c.state, fullName: c.fullName, type: c.type, filePath: c.filePath })),
{
Expand Down
128 changes: 79 additions & 49 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -780,17 +780,18 @@
wordwrap "^1.0.0"
wrap-ansi "^7.0.0"

"@oclif/core@^3.0.4", "@oclif/core@^3.10.8", "@oclif/core@^3.11.0", "@oclif/core@^3.3.1":
version "3.11.0"
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-3.11.0.tgz#dadfac39238af3b717e33b910dde1f1f0fd2105e"
integrity sha512-9A2LhDQATf1vrRqPoO0gGuBrey0jt3kDafC+eazxTNWV2EvlEpgY2587iyrxPK/fL2xg7f+0mtxYaSHdO2k8eg==
"@oclif/core@^3.0.0", "@oclif/core@^3.0.4", "@oclif/core@^3.10.8", "@oclif/core@^3.11.0", "@oclif/core@^3.12.0", "@oclif/core@^3.3.1":
version "3.12.0"
resolved "https://registry.yarnpkg.com/@oclif/core/-/core-3.12.0.tgz#4b38b1b5dab2f7585f89c3927a8a157b258b4bd6"
integrity sha512-mT1Vpd1E20IJ7P6GDYOivylPdTHq/xVgFjeCDjitFW86UAklFM8BEFyFB7KpsTvpmjRbCoda3yU10lSI1224lw==
dependencies:
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"
color "^4.2.3"
debug "^4.3.4"
ejs "^3.1.9"
get-package-type "^0.1.0"
Expand Down Expand Up @@ -988,7 +989,7 @@
strip-ansi "6.0.1"
ts-retry-promise "^0.7.1"

"@salesforce/core@^5.3.1", "@salesforce/core@^5.3.17", "@salesforce/core@^5.3.18", "@salesforce/core@^5.3.20":
"@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==
Expand All @@ -1012,10 +1013,10 @@
semver "^7.5.4"
ts-retry-promise "^0.7.1"

"@salesforce/core@^6.1.0", "@salesforce/core@^6.1.3":
version "6.1.3"
resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.1.3.tgz#32e71846cad033e0d2b369ecf0fafb4f76d63ad7"
integrity sha512-M7EQ4+LSXU4ZqD4R5ttY4RqSaYNaNBGDG0KC51IdDfpGtL4kJXeQHdr5HfMfgyCyYNM9LqqfBS7zQTBY1rf+Yg==
"@salesforce/core@^6.1.0", "@salesforce/core@^6.1.3", "@salesforce/core@^6.2.0":
version "6.2.0"
resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-6.2.0.tgz#9bac72c0b48c733cf1d32d19f9775c34d895f207"
integrity sha512-HuggjBCLA18yXYHChnsrPDGbM+fAPx+9NeS7Dkx3/o1VhJ2hok5BUkvdaeoAVex/0Oc2J+KcvX/gqrjY51iOhQ==
dependencies:
"@salesforce/kit" "^3.0.15"
"@salesforce/schemas" "^1.6.1"
Expand All @@ -1029,7 +1030,7 @@
jsforce "^2.0.0-beta.28"
jsonwebtoken "9.0.2"
jszip "3.10.1"
pino "^8.16.1"
pino "^8.16.2"
pino-abstract-transport "^1.1.0"
pino-pretty "^10.2.3"
proper-lockfile "^4.1.2"
Expand Down Expand Up @@ -1072,23 +1073,23 @@
typescript "^4.9.5"
wireit "^0.14.1"

"@salesforce/kit@^3.0.13", "@salesforce/kit@^3.0.15":
"@salesforce/kit@^3.0.15":
version "3.0.15"
resolved "https://registry.yarnpkg.com/@salesforce/kit/-/kit-3.0.15.tgz#713df3f5767f874c70a2e731c7cb5ba677989559"
integrity sha512-XkA8jsuLvVnyP460dAbU3pBFP2IkmmmsVxMQVifcKKbNWaIBbZBzAfj+vdaQfnvZyflLhsrFT3q2xkb0vHouPg==
dependencies:
"@salesforce/ts-types" "^2.0.9"
tslib "^2.6.2"

"@salesforce/plugin-command-reference@^3.0.46":
version "3.0.46"
resolved "https://registry.yarnpkg.com/@salesforce/plugin-command-reference/-/plugin-command-reference-3.0.46.tgz#8ade210de4c235fa8daa9b59272481bea61bcd54"
integrity sha512-tUe8pAarH/km7wbRDpKgWc3qCzh52q5FmJpnJbs7wwWnvM5X4MzdpZ/sF/8MT3cS6FkZy//ls796QIC0vvOYsA==
"@salesforce/plugin-command-reference@^3.0.47":
version "3.0.47"
resolved "https://registry.yarnpkg.com/@salesforce/plugin-command-reference/-/plugin-command-reference-3.0.47.tgz#477c3384402ef08458f4259b100447e136384e85"
integrity sha512-A3syaw8bf8Bovne6WDiYOcOeLFKTqf1T+MXlxXPwDkDM0X5squkwVvE6wun7S54Q3n4gCSlCPiAMbJfpF8wwaw==
dependencies:
"@oclif/core" "^2.15.0"
"@salesforce/core" "^5.3.17"
"@oclif/core" "^3.0.0"
"@salesforce/core" "^5.3.20"
"@salesforce/kit" "^3.0.15"
"@salesforce/sf-plugins-core" "^3.1.28"
"@salesforce/sf-plugins-core" "^4"
"@salesforce/ts-types" "^2.0.9"
chalk "^4"
handlebars "^4.7.8"
Expand Down Expand Up @@ -1121,44 +1122,45 @@
resolved "https://registry.yarnpkg.com/@salesforce/schemas/-/schemas-1.6.1.tgz#7d1c071e1e509ca9d2d8a6e48ac7447dd67a534d"
integrity sha512-eVy947ZMxCJReKJdgfddUIsBIbPTa/i8RwQGwxq4/ss38H5sLOAeSTaun9V7HpJ1hkpDznWKfgzYvjsst9K6ig==

"@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==
"@salesforce/sf-plugins-core@^4":
version "4.1.3"
resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-4.1.3.tgz#06fa96fec1903fe945def9303eb8c43058625a3d"
integrity sha512-cia0FRknxeQU0IK5gOxlP2KGxqc5zxwSmHLKJsd5+sUFWpn3Hnun/3rDO94UXIDjuGKV7HK08hQNBKkSLeYaRA==
dependencies:
"@oclif/core" "^2.15.0"
"@salesforce/core" "^5.3.1"
"@salesforce/kit" "^3.0.13"
"@salesforce/ts-types" "^2.0.7"
"@oclif/core" "^3.11.0"
"@salesforce/core" "^6.1.0"
"@salesforce/kit" "^3.0.15"
"@salesforce/ts-types" "^2.0.9"
"@types/inquirer" "^8.2.3"
chalk "^4"
inquirer "^8.2.5"

"@salesforce/sf-plugins-core@^5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-5.0.1.tgz#16b085eda99e28f2607957954d6ac957a8d0a0eb"
integrity sha512-gKUhAP9DDUlB4bjr0a6bsWiM16hn/n1cW8BglhYHAow8UJ0OQBxx+dfvAO0ftXmfzg82IZdMViiDmQXt0Z+e6A==
"@salesforce/sf-plugins-core@^5.0.1", "@salesforce/sf-plugins-core@^5.0.3":
version "5.0.3"
resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-5.0.3.tgz#a771dc887c0a13ac23a5b1c16a6965791914f3aa"
integrity sha512-D+RCUzrYIWpJakNfxtHXJd6LZr6bK4gA4e7jLPR1G1FmDFss13PT7hOdFRxmAqTPbcp1jf65vwYZzu5nbqzmvQ==
dependencies:
"@oclif/core" "^3.11.0"
"@salesforce/core" "^6.1.0"
"@salesforce/core" "^6.1.3"
"@salesforce/kit" "^3.0.15"
"@salesforce/ts-types" "^2.0.9"
"@types/inquirer" "^8.2.3"
chalk "^4"
inquirer "^8.2.5"

"@salesforce/source-deploy-retrieve@^10.0.0":
version "10.0.0"
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-10.0.0.tgz#572642bb3bfb1d7421afb201d7dc7de0a43271d9"
integrity sha512-6d9F1jTkD4fXYd5i+xowTey//Vns3ZlOhNNNqkQv7UlfZA8ttoxY5aYQAsAv8A/q/IcMx3UoeIKJZxUE2zNgPQ==
"@salesforce/source-deploy-retrieve@^10.0.0", "@salesforce/source-deploy-retrieve@^10.0.2":
version "10.0.2"
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-10.0.2.tgz#bfa522145eaad6a9ec601a2f5f004bee266736ae"
integrity sha512-Lj9QXoRBZANW4PNZpGwRA5CDztnczwrJyETcDADRFVzQG/HmCJKlRMVEKck+rs4ZB2PE891raNR2v5zo6vtvvg==
dependencies:
"@salesforce/core" "^6.1.0"
"@salesforce/core" "^6.1.3"
"@salesforce/kit" "^3.0.15"
"@salesforce/ts-types" "^2.0.9"
fast-levenshtein "^3.0.0"
fast-xml-parser "^4.3.2"
got "^11.8.6"
graceful-fs "^4.2.11"
ignore "^5.2.4"
ignore "^5.3.0"
jszip "^3.10.1"
mime "2.6.0"
minimatch "^5.1.6"
Expand Down Expand Up @@ -1198,13 +1200,13 @@
shelljs "^0.8.4"
sinon "^10.0.0"

"@salesforce/source-tracking@^5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@salesforce/source-tracking/-/source-tracking-5.0.0.tgz#54fa3adfc48fb476daac9167125425a5ae9e3986"
integrity sha512-v1AOBJvKC2nVbgzwtbJCWNV3SiQ1cV62pw5yrjKXTPKZJbyj71kK1tvQO3iyf4SVZvbI+bV44JwQStQgEp1xDg==
"@salesforce/source-tracking@^5.0.0", "@salesforce/source-tracking@^5.0.1":
version "5.0.1"
resolved "https://registry.yarnpkg.com/@salesforce/source-tracking/-/source-tracking-5.0.1.tgz#3b54b2ed8eee9c7bc8506ca9b1c0e88f961b435a"
integrity sha512-9ckOvid03/J5Lvq83aW7GIlLm9HtJ9NMLwalppDMvSd4T/lyWe8y4bxh4LKbqTC7fhzHMxet8yYTpzub0t+DPA==
dependencies:
"@oclif/core" "^3.10.8"
"@salesforce/core" "^6.1.0"
"@salesforce/core" "^6.1.3"
"@salesforce/kit" "^3.0.15"
"@salesforce/source-deploy-retrieve" "^10.0.0"
"@salesforce/ts-types" "^2.0.9"
Expand All @@ -1222,7 +1224,7 @@
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.9":
"@salesforce/ts-types@^2.0.6", "@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==
Expand Down Expand Up @@ -2676,16 +2678,32 @@ [email protected]:
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==

color-name@~1.1.4:
color-name@^1.0.0, color-name@~1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==

color-string@^1.9.0:
version "1.9.1"
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.9.1.tgz#4467f9146f036f855b764dfb5bf8582bf342c7a4"
integrity sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==
dependencies:
color-name "^1.0.0"
simple-swizzle "^0.2.2"

color-support@^1.1.2, color-support@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2"
integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==

color@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/color/-/color-4.2.3.tgz#d781ecb5e57224ee43ea9627560107c0e0c6463a"
integrity sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==
dependencies:
color-convert "^2.0.1"
color-string "^1.9.0"

colorette@^2.0.7:
version "2.0.20"
resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a"
Expand Down Expand Up @@ -4389,10 +4407,10 @@ ignore-walk@^6.0.0:
dependencies:
minimatch "^9.0.0"

ignore@^5.1.4, ignore@^5.2.0, ignore@^5.2.4:
version "5.2.4"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==
ignore@^5.1.4, ignore@^5.2.0, ignore@^5.2.4, ignore@^5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78"
integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==

immediate@~3.0.5:
version "3.0.6"
Expand Down Expand Up @@ -4526,6 +4544,11 @@ is-arrayish@^0.2.1:
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==

is-arrayish@^0.3.1:
version "0.3.2"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03"
integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==

is-bigint@^1.0.1:
version "1.0.4"
resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3"
Expand Down Expand Up @@ -6651,7 +6674,7 @@ pino-std-serializers@^6.0.0:
resolved "https://registry.yarnpkg.com/pino-std-serializers/-/pino-std-serializers-6.2.2.tgz#d9a9b5f2b9a402486a5fc4db0a737570a860aab3"
integrity sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==

pino@^8.16.0, pino@^8.16.1:
pino@^8.16.0, pino@^8.16.2:
version "8.16.2"
resolved "https://registry.yarnpkg.com/pino/-/pino-8.16.2.tgz#7a906f2d9a8c5b4c57412c9ca95d6820bd2090cd"
integrity sha512-2advCDGVEvkKu9TTVSa/kWW7Z3htI/sBKEZpqiHk6ive0i/7f5b1rsU8jn0aimxqfnSz5bj/nOYkwhBUn5xxvg==
Expand Down Expand Up @@ -7396,6 +7419,13 @@ simple-get@^4.0.1:
once "^1.3.1"
simple-concat "^1.0.0"

simple-swizzle@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a"
integrity sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==
dependencies:
is-arrayish "^0.3.1"

[email protected]:
version "10.0.0"
resolved "https://registry.yarnpkg.com/sinon/-/sinon-10.0.0.tgz#52279f97e35646ff73d23207d0307977c9b81430"
Expand Down

0 comments on commit 6a8428a

Please sign in to comment.