Skip to content

Commit d6d533a

Browse files
committed
Merge branch 'main' into mdonnalley/refactor-tests
2 parents 9ea730f + f28fd65 commit d6d533a

File tree

13 files changed

+299
-665
lines changed

13 files changed

+299
-665
lines changed

CHANGELOG.md

Lines changed: 111 additions & 321 deletions
Large diffs are not rendered by default.

command-snapshot.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
{
4141
"command": "force:org:delete",
4242
"plugin": "@salesforce/plugin-org",
43-
"flags": ["api-version", "json", "loglevel", "no-prompt", "target-org"],
43+
"flags": ["api-version", "json", "loglevel", "no-prompt", "target-org", "targetdevhubusername"],
4444
"alias": []
4545
},
4646
{

messages/delete.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ To mark the org for deletion without being prompted to confirm, specify --noprom
2222

2323
No prompt to confirm deletion.
2424

25+
# flags.targetdevhubusername
26+
27+
The targetdevhubusername flag exists only for backwards compatibility. It is not necessary and has no effect.
28+
2529
# confirmDelete
2630

2731
Enqueue %s org with name: %s for deletion? Are you sure (y/n)?

package.json

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@salesforce/plugin-org",
33
"description": "Commands to interact with Salesforce orgs",
4-
"version": "2.3.4",
4+
"version": "2.4.1",
55
"author": "Salesforce",
66
"main": "lib/index.js",
77
"bugs": "https://github.com/forcedotcom/cli/issues",
@@ -15,13 +15,13 @@
1515
},
1616
"devDependencies": {
1717
"@oclif/plugin-command-snapshot": "^3.3.4",
18-
"@salesforce/cli-plugins-testkit": "^3.2.18",
18+
"@salesforce/cli-plugins-testkit": "^3.2.21",
1919
"@salesforce/dev-config": "^3.1.0",
20-
"@salesforce/dev-scripts": "^3.1.1",
20+
"@salesforce/dev-scripts": "^4.0.0-beta.9",
2121
"@salesforce/plugin-command-reference": "^2.2.9",
2222
"@salesforce/prettier-config": "^0.0.2",
23-
"@salesforce/ts-sinon": "1.4.4",
24-
"@swc/core": "^1.3.24",
23+
"@salesforce/ts-sinon": "1.4.6",
24+
"@swc/core": "^1.3.36",
2525
"@types/chai-as-promised": "^7.1.5",
2626
"@types/shelljs": "^0.8.10",
2727
"@typescript-eslint/eslint-plugin": "^5.42.1",
@@ -36,13 +36,13 @@
3636
"eslint-plugin-header": "^3.0.0",
3737
"eslint-plugin-import": "2.27.5",
3838
"eslint-plugin-jsdoc": "^39.6.7",
39-
"eslint-plugin-sf-plugin": "^1.7.0",
39+
"eslint-plugin-sf-plugin": "^1.8.1",
4040
"husky": "^7.0.4",
4141
"mocha": "^9.1.3",
4242
"moment": "^2.29.1",
4343
"nyc": "^15.1.0",
44-
"oclif": "^3.6.1",
45-
"prettier": "^2.8.3",
44+
"oclif": "^3.6.5",
45+
"prettier": "^2.8.4",
4646
"pretty-quick": "^3.1.0",
4747
"shelljs": "^0.8.5",
4848
"shx": "0.3.4",
@@ -103,19 +103,18 @@
103103
},
104104
"repository": "salesforcecli/plugin-org",
105105
"scripts": {
106-
"build": "sf-build",
106+
"build": "wireit",
107107
"clean": "sf-clean",
108108
"clean-all": "sf-clean all",
109109
"clean:lib": "shx rm -rf lib && shx rm -rf coverage && shx rm -rf .nyc_output && shx rm -f oclif.manifest.json",
110-
"compile": "sf-compile",
110+
"compile": "wireit",
111111
"docs": "sf-docs",
112-
"format": "sf-format",
113-
"lint": "sf-lint",
112+
"format": "wireit",
113+
"lint": "wireit",
114114
"postpack": "shx rm -f oclif.manifest.json",
115115
"prepack": "sf-prepack",
116116
"prepare": "sf-install",
117-
"pretest": "sf-compile-test",
118-
"test": "sf-test",
117+
"test": "wireit",
119118
"test:command-reference": "wireit",
120119
"test:compile": "wireit",
121120
"test:deprecation-policy": "wireit",

schemas/org-display.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
"clientId": {
2222
"type": "string"
2323
},
24+
"apiVersion": {
25+
"type": "string"
26+
},
2427
"alias": {
2528
"type": "string"
2629
},

src/commands/force/org/delete.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ export class Delete extends SfCommand<DeleteResult> {
3131
};
3232
public static readonly flags = {
3333
'target-org': requiredOrgFlagWithDeprecations,
34+
targetdevhubusername: Flags.string({
35+
summary: messages.getMessage('flags.targetdevhubusername'),
36+
char: 'v',
37+
hidden: true,
38+
deprecated: {
39+
version: '58.0',
40+
message: messages.getMessage('flags.targetdevhubusername'),
41+
},
42+
}),
3443
'api-version': orgApiVersionFlagWithDeprecations,
3544
'no-prompt': Flags.boolean({
3645
char: 'p',

src/commands/org/display.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export class OrgDisplayCommand extends SfCommand<OrgDisplayReturn> {
6464
devHubId: fields.devHubUsername,
6565

6666
// copied properties
67+
apiVersion: fields.instanceApiVersion,
6768
accessToken: fields.accessToken,
6869
instanceUrl: fields.instanceUrl,
6970
username: fields.username,

src/shared/orgTypes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export type OrgDisplayReturn = Partial<ScratchOrgFields> & {
1414
accessToken: string;
1515
instanceUrl: string;
1616
clientId: string;
17+
apiVersion?: string;
1718

1819
alias?: string;
1920
password?: string;

test/nut/async-create-resume.nut.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('env:create:scratch async/resume', () => {
3939

4040
before(async () => {
4141
session = await TestSession.create({
42-
project: { name: 'testProject' },
42+
project: {},
4343
devhubAuthStrategy: 'AUTO',
4444
});
4545
cacheFilePath = path.join(session.dir, '.sf', ScratchOrgCache.getFileName());

test/nut/legacy/create.nut.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import * as path from 'path';
88
import { assert, expect } from 'chai';
99
import { TestSession, execCmd, genUniqueString } from '@salesforce/cli-plugins-testkit';
10-
import { ScratchOrgCreateResult, Messages } from '@salesforce/core';
10+
import { ScratchOrgCreateResult } from '@salesforce/core';
1111

1212
let session: TestSession;
1313

@@ -43,16 +43,8 @@ describe('org:create command', () => {
4343
{
4444
ensureExitCode: 1,
4545
}
46-
).jsonOutput as unknown as { message: string };
47-
48-
Messages.importMessagesDirectory(
49-
// 'messages' is appended to the path
50-
path.join(__dirname, '..', '..', '..', 'node_modules', '@salesforce', 'core'),
51-
false,
52-
'@salesforce/core'
53-
);
54-
const messages = Messages.loadMessages('@salesforce/core', 'scratchOrgErrorCodes');
55-
expect(errorOutput.message).to.be.a('string').and.to.include(messages.getMessage('C-1007'));
46+
).jsonOutput as unknown as { name: string };
47+
expect(errorOutput.name).to.be.a('string').and.include('C-1007');
5648
});
5749
});
5850

0 commit comments

Comments
 (0)