Skip to content

Commit

Permalink
test: remove plugin-settings as devPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Oct 30, 2023
1 parent 3241df2 commit cb73785
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 24 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"@salesforce/dev-config": "^4.0.1",
"@salesforce/dev-scripts": "^5.7.0",
"@salesforce/plugin-command-reference": "^3.0.25",
"@salesforce/plugin-settings": "^1.4.27",
"@salesforce/prettier-config": "^0.0.3",
"@salesforce/ts-sinon": "^1.4.6",
"@swc/core": "1.3.39",
Expand Down Expand Up @@ -77,8 +76,7 @@
"devPlugins": [
"@oclif/plugin-help",
"@oclif/plugin-command-snapshot",
"@salesforce/plugin-command-reference",
"@salesforce/plugin-settings"
"@salesforce/plugin-command-reference"
],
"topics": {
"org": {
Expand Down
9 changes: 6 additions & 3 deletions test/commands/org/logout.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ describe('org:logout NUTs', () => {
});

it('should clear any configs that use the removed username (json)', () => {
execCmd(`config:set target-org=${username} --global`, { ensureExitCode: 0 });
execCmd(`config:set target-dev-hub=${username} --global`, { ensureExitCode: 0 });
execCmd(`config:set target-org=${username} --global`, { ensureExitCode: 0, cli: 'sf' });
execCmd(`config:set target-dev-hub=${username} --global`, { ensureExitCode: 0, cli: 'sf' });
const json = execCmd(`org:logout -p -o ${username} --json`, { ensureExitCode: 0 }).jsonOutput;
expect(json).to.deep.equal({
status: 0,
Expand All @@ -68,11 +68,13 @@ describe('org:logout NUTs', () => {

const configGetUsername = execCmd<Array<{ key: string }>>('config:get target-org --json', {
ensureExitCode: 0,
cli: 'sf',
}).jsonOutput?.result as Array<{ key: string }>;
expect(['target-org', 'defaultusername']).to.include(configGetUsername[0].key);

const configGetDevhub = execCmd<Array<{ key: string }>>('config:get target-dev-hub --json', {
ensureExitCode: 0,
cli: 'sf',
}).jsonOutput?.result as Array<{ key: string }>;
expect(['target-dev-hub', 'defaultdevhubusername']).to.include(configGetDevhub[0].key);
});
Expand All @@ -89,7 +91,7 @@ describe('org:logout NUTs', () => {
});

it('should remove the default username if the -o flag is not specified (json)', () => {
execCmd(`config:set target-org=${username} --global`, { ensureExitCode: 0 });
execCmd(`config:set target-org=${username} --global`, { ensureExitCode: 0, cli: 'sf' });
const json = execCmd('org:logout -p --json', { ensureExitCode: 0 }).jsonOutput;
expect(json).to.deep.equal({
status: 0,
Expand All @@ -100,6 +102,7 @@ describe('org:logout NUTs', () => {
// we expect the config for target-org to be cleared out after the logout
const configGet = execCmd<Array<{ key: string }>>('config:get target-org --json', {
ensureExitCode: 0,
cli: 'sf',
}).jsonOutput?.result as Array<{ key: string }>;
expect(['target-org', 'defaultusername']).to.include(configGet[0].key);
});
Expand Down
18 changes: 0 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -974,17 +974,6 @@
handlebars "^4.7.8"
tslib "^2"

"@salesforce/plugin-settings@^1.4.27":
version "1.4.27"
resolved "https://registry.yarnpkg.com/@salesforce/plugin-settings/-/plugin-settings-1.4.27.tgz#7b31dbfd0d3ca8511b8d735001293131b40931a0"
integrity sha512-OJLGOtM6MXHIbi6r1Gzmy0+bTvDcYEmUhAPbs1hQrc9ina4FDsx5usJ0wl5JRmg8TGulDLe99eRBrZ6pd6ldHg==
dependencies:
"@oclif/core" "^2.11.10"
"@salesforce/core" "^5.2.0"
"@salesforce/sf-plugins-core" "^3.1.18"
fast-levenshtein "^3.0.0"
tslib "^2"

"@salesforce/prettier-config@^0.0.3":
version "0.0.3"
resolved "https://registry.yarnpkg.com/@salesforce/prettier-config/-/prettier-config-0.0.3.tgz#ba648d4886bb38adabe073dbea0b3a91b3753bb0"
Expand Down Expand Up @@ -1030,13 +1019,6 @@
dependencies:
tslib "^2.6.2"

"@salesforce/ts-types@^2.0.7":
version "2.0.7"
resolved "https://registry.yarnpkg.com/@salesforce/ts-types/-/ts-types-2.0.7.tgz#02a6999d0b0e7bcd6c6d8ce621c79fa61af24701"
integrity sha512-8csXgstPuy6QXL3JavkIi/f8DOWHBNCvWeszrFu5sbVlcKO3YqOOCE+rDFGPkrZsYv5OywV6H8kEi877bWOz6Q==
dependencies:
tslib "^2.6.2"

"@sindresorhus/is@^4.0.0":
version "4.6.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-4.6.0.tgz#3c7c9c46e678feefe7a2e5bb609d3dbd665ffb3f"
Expand Down

0 comments on commit cb73785

Please sign in to comment.