Skip to content

Commit 5206a3b

Browse files
fix: devScripts update (#1006) + core v6
* chore: updates from devScripts * chore: remove some devDeps * chore: refresh schema * test: decouple PDR dependency stuff --------- Co-authored-by: mshanemc <[email protected]>
1 parent 0b2c9d2 commit 5206a3b

File tree

4 files changed

+289
-194
lines changed

4 files changed

+289
-194
lines changed

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"main": "lib/index.js",
77
"bugs": "https://github.com/forcedotcom/cli/issues",
88
"dependencies": {
9-
"@oclif/core": "^2.15.0",
10-
"@salesforce/apex-node": "^2.1.0",
11-
"@salesforce/core": "^5.3.20",
9+
"@oclif/core": "^3.11.0",
10+
"@salesforce/apex-node": "^2.1.2",
11+
"@salesforce/core": "^6.1.3",
1212
"@salesforce/kit": "^3.0.15",
13-
"@salesforce/sf-plugins-core": "^3.1.25",
14-
"@salesforce/source-deploy-retrieve": "^9.8.5",
15-
"@salesforce/source-tracking": "^4.4.0",
13+
"@salesforce/sf-plugins-core": "^5.0.1",
14+
"@salesforce/source-deploy-retrieve": "^10.0.0",
15+
"@salesforce/source-tracking": "^5.0.0",
1616
"chalk": "^4.1.2",
1717
"got": "^11.8.6",
1818
"proxy-agent": "^6.3.1",
@@ -22,9 +22,9 @@
2222
"@oclif/plugin-command-snapshot": "^4.0.16",
2323
"@oclif/plugin-help": "^5.2.20",
2424
"@salesforce/cli-plugins-testkit": "^5.0.2",
25-
"@salesforce/dev-scripts": "^6.0.3",
25+
"@salesforce/dev-scripts": "^7.1.0",
2626
"@salesforce/plugin-command-reference": "^3.0.45",
27-
"@salesforce/plugin-deploy-retrieve": "^1.19.3",
27+
"@salesforce/plugin-deploy-retrieve": "^2.1.1",
2828
"@salesforce/plugin-info": "^2.6.51",
2929
"@salesforce/source-testkit": "^2.1.62",
3030
"@salesforce/ts-sinon": "1.4.19",
@@ -33,7 +33,7 @@
3333
"archiver": "^5.3.2",
3434
"chai-each": "^0.0.1",
3535
"cross-env": "^7.0.3",
36-
"eslint-plugin-sf-plugin": "^1.16.13",
36+
"eslint-plugin-sf-plugin": "^1.16.15",
3737
"oclif": "^3.16.0",
3838
"shx": "0.3.4",
3939
"ts-node": "^10.9.1",

schemas/force-source-retrieve.json

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -200,17 +200,7 @@
200200
"type": "string"
201201
},
202202
"manageableState": {
203-
"type": "string",
204-
"enum": [
205-
"beta",
206-
"deleted",
207-
"deprecated",
208-
"deprecatedEditable",
209-
"installed",
210-
"installedEditable",
211-
"released",
212-
"unmanaged"
213-
]
203+
"$ref": "#/definitions/ManageableState"
214204
},
215205
"namespacePrefix": {
216206
"type": "string"
@@ -233,6 +223,19 @@
233223
],
234224
"additionalProperties": false
235225
},
226+
"ManageableState": {
227+
"type": "string",
228+
"enum": [
229+
"beta",
230+
"deleted",
231+
"deprecated",
232+
"deprecatedEditable",
233+
"installed",
234+
"installedEditable",
235+
"released",
236+
"unmanaged"
237+
]
238+
},
236239
"RequestStatus": {
237240
"type": "string",
238241
"enum": ["Pending", "InProgress", "Succeeded", "SucceededPartial", "Failed", "Canceling", "Canceled"]

test/commands/source/deploy.test.ts

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { ConfigAggregator, Lifecycle, Messages, SfProject } from '@salesforce/co
1414
import { Config } from '@oclif/core';
1515
import { SfCommand } from '@salesforce/sf-plugins-core';
1616
import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup';
17-
import ConfigMeta, { ConfigVars } from '@salesforce/plugin-deploy-retrieve/lib/configMeta';
1817
import { Deploy } from '../../../src/commands/force/source/deploy';
1918
import { DeployCommandResult, DeployResultFormatter } from '../../../src/formatters/deployResultFormatter';
2019
import {
@@ -86,7 +85,26 @@ describe('force:source:deploy', () => {
8685
const runDeployCmd = async (params: string[], options?: { sourceApiVersion?: string }) => {
8786
const cmd = new TestDeploy(params, oclifConfigStub);
8887
cmd.project = SfProject.getInstance();
89-
cmd.configAggregator = await (await ConfigAggregator.create({ customConfigMeta: ConfigMeta })).reload();
88+
cmd.configAggregator =
89+
await // this is simplified from https://github.com/salesforcecli/plugin-deploy-retrieve/blob/d481ac1d79e29e20302924e688be7ec75df22957/src/configMeta.ts#L24-L25
90+
// as a workaround for
91+
// 1. PDR being ESM before plugin-source
92+
// 2. lib/configMeta.js not being in the top-level exports
93+
(
94+
await ConfigAggregator.create({
95+
customConfigMeta: [
96+
{
97+
key: 'org-metadata-rest-deploy',
98+
description: 'foo',
99+
hidden: true,
100+
input: {
101+
validator: (value: string): boolean => typeof value === 'string' && ['true', 'false'].includes(value),
102+
failedMessage: 'boo!',
103+
},
104+
},
105+
],
106+
})
107+
).reload();
90108
sandbox.stub(cmd.project, 'getDefaultPackage').returns({ name: '', path: '', fullPath: defaultDir });
91109
sandbox.stub(cmd.project, 'getUniquePackageDirectories').returns([{ fullPath: defaultDir, path: '', name: '' }]);
92110
sandbox.stub(cmd.project, 'getPackageDirectories').returns([{ fullPath: defaultDir, path: '', name: '' }]);
@@ -416,7 +434,7 @@ describe('force:source:deploy', () => {
416434
});
417435

418436
it('should REST deploy with config', async () => {
419-
await $$.stubConfig({ [ConfigVars.ORG_METADATA_REST_DEPLOY]: 'true', 'target-org': testOrg.username });
437+
await $$.stubConfig({ 'org-metadata-rest-deploy': 'true', 'target-org': testOrg.username });
420438

421439
const manifest = 'package.xml';
422440
const result = await runDeployCmd(['--manifest', manifest, '--json']);

0 commit comments

Comments
 (0)