From 960a292ec3cd4568dbec802a6fd93f39dd260757 Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Wed, 30 Oct 2024 10:14:47 -0600 Subject: [PATCH 1/3] test: update nuts --- test/commands/alias/list.nut.ts | 12 ++++++------ test/commands/alias/set.nut.ts | 12 ++++++------ test/commands/alias/unset.nut.ts | 14 +++++++------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/test/commands/alias/list.nut.ts b/test/commands/alias/list.nut.ts index f9fff437..a13ab23c 100644 --- a/test/commands/alias/list.nut.ts +++ b/test/commands/alias/list.nut.ts @@ -65,8 +65,8 @@ describe('alias list NUTs', () => { env: { ...process.env, SF_NO_TABLE_STYLE: 'true' }, }).shellOutput; expect(res).to.include('Alias List'); // Table header - expect(res).to.include('alias value'); - expect(res).to.include('DevHub mydevhuborg@salesforce.com'); + expect(res).to.include('alias value'); + expect(res).to.include('DevHub mydevhuborg@salesforce.com'); }); }); @@ -103,10 +103,10 @@ describe('alias list NUTs', () => { }).shellOutput; expect(res).to.include('Alias List'); // Table header - expect(res).to.include('alias value'); - expect(res).to.include('DevHub mydevhuborg@salesforce.com'); - expect(res).to.include('Admin admin@salesforce.com'); - expect(res).to.include('user user@salesforce.com'); + expect(res).to.include('alias value'); + expect(res).to.include('DevHub mydevhuborg@salesforce.com'); + expect(res).to.include('Admin admin@salesforce.com'); + expect(res).to.include('user user@salesforce.com'); }); }); }); diff --git a/test/commands/alias/set.nut.ts b/test/commands/alias/set.nut.ts index 41cf9286..01831593 100644 --- a/test/commands/alias/set.nut.ts +++ b/test/commands/alias/set.nut.ts @@ -54,9 +54,9 @@ describe('alias set NUTs', () => { }).shellOutput; expect(res).to.include('Alias Set'); // Table header - expect(res).to.include('alias value success'); - expect(res).to.include('DevHub devhuborg@salesforce.com true'); - expect(res).to.include('Admin admin@salesforce.com true'); + expect(res).to.match(/alias\s+value\s+success/); + expect(res).to.match(/DevHub\s+devhuborg@salesforce.com\s+true/); + expect(res).to.match(/Admin\s+admin@salesforce.com\s+true/); }); it('alias set with spaces in value', () => { @@ -128,9 +128,9 @@ describe('alias set NUTs', () => { }).shellOutput; expect(res).to.include('Alias Set'); // Table header - expect(res).to.include('alias value success'); - expect(res).to.include('DevHub newdevhub@salesforce.com true'); - expect(res).to.include('Admin admin@salesforce.com true'); + expect(res).to.match(/alias\s+value\s+success/); + expect(res).to.match(/DevHub\s+newdevhub@salesforce.com\s+true/); + expect(res).to.match(/Admin\s+admin@salesforce.com\s+true/); }); }); diff --git a/test/commands/alias/unset.nut.ts b/test/commands/alias/unset.nut.ts index 64a15e57..9502dac7 100644 --- a/test/commands/alias/unset.nut.ts +++ b/test/commands/alias/unset.nut.ts @@ -46,8 +46,8 @@ describe('alias unset NUTs', () => { }).shellOutput; expect(res).to.include('Alias Unset'); // Table header - expect(res).to.include('alias value success'); - expect(res).to.include('noAlias true'); + expect(res).to.match(/alias\s+value\s+success/); + expect(res).to.match(/noAlias\s+true/); }); }); @@ -89,8 +89,8 @@ describe('alias unset NUTs', () => { }).shellOutput; expect(res).to.include('Alias Unset'); // Table header - expect(res).to.include('alias value success'); - expect(res).to.include('DevHub mydevhuborg@salesforce.com true'); + expect(res).to.match(/alias\s+value\s+success/); + expect(res).to.match(/DevHub\s+mydevhuborg@salesforce.com\s+true/); }); }); @@ -151,9 +151,9 @@ describe('alias unset NUTs', () => { }).shellOutput; expect(res).to.include('Alias Unset'); // Table header - expect(res).to.include('alias value success'); - expect(res).to.include('DevHub mydevhuborg@salesforce.com true'); - expect(res).to.include('user user@salesforce.com true'); + expect(res).to.match(/alias\s+value\s+success/); + expect(res).to.match(/DevHub\s+mydevhuborg@salesforce.com\s+true/); + expect(res).to.match(/user\s+user@salesforce.com\s+true/); }); it('removes all aliases when passing --all', () => { From dab606ee65829b549979c75cd6693400714958b0 Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Wed, 30 Oct 2024 10:15:47 -0600 Subject: [PATCH 2/3] fix: bump sf-plugins-core --- package.json | 2 +- yarn.lock | 76 ++++++++++++++++++++++++++++++++-------------------- 2 files changed, 48 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index 7179c285..8f631c1e 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "dependencies": { "@oclif/core": "^4", "@salesforce/core": "^8.6.2", - "@salesforce/sf-plugins-core": "^12.0.9", + "@salesforce/sf-plugins-core": "^12.0.10", "fast-levenshtein": "^3.0.0" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 525370ec..26a3cf36 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1349,6 +1349,22 @@ strip-ansi "^7.1.0" wrap-ansi "^9.0.0" +"@oclif/table@^0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@oclif/table/-/table-0.3.1.tgz#e18a4c2cfe1ba0a86ba45675fef1a839cd9b0b01" + integrity sha512-qx4ChjK440RssoBxPJ0QLza+wndfuvX4g9Run98OnembCWgDfpu4dSuXM1zW/PnbqeX1KPk9xFoBniyhafPVmw== + dependencies: + "@oclif/core" "^4" + "@types/react" "^18.3.12" + change-case "^5.4.4" + cli-truncate "^4.0.0" + ink "^5.0.1" + natural-orderby "^3.0.2" + object-hash "^3.0.0" + react "^18.3.1" + strip-ansi "^7.1.0" + wrap-ansi "^9.0.0" + "@oclif/test@^4": version "4.0.9" resolved "https://registry.yarnpkg.com/@oclif/test/-/test-4.0.9.tgz#c4b4b4878911489a79f296a15448e76d860b39d2" @@ -1540,7 +1556,26 @@ string-width "^7.2.0" terminal-link "^3.0.0" -"@salesforce/sf-plugins-core@^12.0.4", "@salesforce/sf-plugins-core@^12.0.9": +"@salesforce/sf-plugins-core@^12.0.10": + version "12.0.10" + resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-12.0.10.tgz#193796818cc9caad99f2fdc5bbaefd0206d1a08f" + integrity sha512-SCrA7NARQYEPlQZjEgEgBAVxAAEJLyDRJ2CDS2jm+H5sy3tmr8f4+Wvif7zO0MdWk2rLaR+D+L27171NG0PreQ== + dependencies: + "@inquirer/confirm" "^3.1.22" + "@inquirer/password" "^2.2.0" + "@oclif/core" "^4.0.27" + "@oclif/table" "^0.3.0" + "@salesforce/core" "^8.5.1" + "@salesforce/kit" "^3.2.3" + "@salesforce/ts-types" "^2.0.12" + ansis "^3.3.2" + cli-progress "^3.12.0" + natural-orderby "^3.0.2" + slice-ansi "^7.1.0" + string-width "^7.2.0" + terminal-link "^3.0.0" + +"@salesforce/sf-plugins-core@^12.0.4": version "12.0.9" resolved "https://registry.yarnpkg.com/@salesforce/sf-plugins-core/-/sf-plugins-core-12.0.9.tgz#8a48828924d7e7fd2b402188077e87f4fa424156" integrity sha512-CklAvBje/t+a85Djp961Ly84Yeh3+jF5n9G7Uy3NniUqJ6WwQc2M4jy+nTbqsRxomEuEb60AP3/rPQH9eBO7KA== @@ -2393,6 +2428,14 @@ "@types/prop-types" "*" csstype "^3.0.2" +"@types/react@^18.3.12": + version "18.3.12" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.12.tgz#99419f182ccd69151813b7ee24b792fe08774f60" + integrity sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw== + dependencies: + "@types/prop-types" "*" + csstype "^3.0.2" + "@types/responselike@^1.0.0": version "1.0.3" resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.3.tgz#cc29706f0a397cfe6df89debfe4bf5cea159db50" @@ -7486,16 +7529,7 @@ static-eval@2.0.2: dependencies: escodegen "^1.8.1" -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -7563,14 +7597,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -8154,7 +8181,7 @@ workerpool@^6.5.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -8172,15 +8199,6 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From d6291e1f5155be44fa171cbca07fabb0ee03008a Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Wed, 30 Oct 2024 10:17:43 -0600 Subject: [PATCH 3/3] test: use regex in list.nut.ts --- test/commands/alias/list.nut.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/commands/alias/list.nut.ts b/test/commands/alias/list.nut.ts index a13ab23c..c3e1f666 100644 --- a/test/commands/alias/list.nut.ts +++ b/test/commands/alias/list.nut.ts @@ -65,8 +65,8 @@ describe('alias list NUTs', () => { env: { ...process.env, SF_NO_TABLE_STYLE: 'true' }, }).shellOutput; expect(res).to.include('Alias List'); // Table header - expect(res).to.include('alias value'); - expect(res).to.include('DevHub mydevhuborg@salesforce.com'); + expect(res).to.match(/alias\s+value/); + expect(res).to.match(/DevHub\s+mydevhuborg@salesforce\.com/); }); }); @@ -103,10 +103,10 @@ describe('alias list NUTs', () => { }).shellOutput; expect(res).to.include('Alias List'); // Table header - expect(res).to.include('alias value'); - expect(res).to.include('DevHub mydevhuborg@salesforce.com'); - expect(res).to.include('Admin admin@salesforce.com'); - expect(res).to.include('user user@salesforce.com'); + expect(res).to.match(/alias\s+value/); + expect(res).to.match(/DevHub\s+mydevhuborg@salesforce\.com/); + expect(res).to.match(/Admin\s+admin@salesforce\.com/); + expect(res).to.match(/user\s+user@salesforce\.com/); }); }); });