Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: remove plugin-settings as devPlugin #848

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.1.0",
"@salesforce/dev-scripts": "^5.12.2",
"@salesforce/plugin-command-reference": "^3.0.42",
"@salesforce/plugin-settings": "^1.4.35",
"@salesforce/prettier-config": "^0.0.3",
"@salesforce/ts-sinon": "^1.4.15",
"@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
15 changes: 2 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@
strip-ansi "6.0.1"
ts-retry-promise "^0.7.1"

"@salesforce/core@^5.2.10", "@salesforce/core@^5.3.1", "@salesforce/core@^5.3.14", "@salesforce/core@^5.3.5", "@salesforce/core@^5.3.9":
"@salesforce/core@^5.3.1", "@salesforce/core@^5.3.14", "@salesforce/core@^5.3.5", "@salesforce/core@^5.3.9":
version "5.3.14"
resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-5.3.14.tgz#a5a3d02be6727492469ed39b23eaf3c56675496b"
integrity sha512-IFmLZCpFBcreTFEaH+Rn4BozUpFx3vvf43yWuXWdOvALz4ad18yU3Kzk9GxwzablrQxPFmJ43ClQG10dmoh/ig==
Expand Down Expand Up @@ -983,17 +983,6 @@
handlebars "^4.7.8"
tslib "^2"

"@salesforce/plugin-settings@^1.4.35":
version "1.4.35"
resolved "https://registry.yarnpkg.com/@salesforce/plugin-settings/-/plugin-settings-1.4.35.tgz#9fc4ebb1fcb0fdb115f06fc0f7e2e7e6084dff38"
integrity sha512-BKimSUDwLiDzW4/SZjXvQVg1hFIKmYAQRonwk8rUzQgGyCx33fmwZivBGnpXiBaZwXPScM9IAIl7kI3OWY1veA==
dependencies:
"@oclif/core" "^2.15.0"
"@salesforce/core" "^5.2.10"
"@salesforce/sf-plugins-core" "^3.1.25"
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 All @@ -1004,7 +993,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.25", "@salesforce/sf-plugins-core@^3.1.28":
"@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==
Expand Down