Skip to content

Commit ccdb8f9

Browse files
Merge pull request #904 from salesforcecli/2gp-readiness/W-17625437/patch_version_convert_option
2 parents 3c50ef4 + d40064d commit ccdb8f9

5 files changed

Lines changed: 28 additions & 9 deletions

File tree

command-snapshot.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@
6565
"installationkey",
6666
"installationkeybypass",
6767
"target-hub-org",
68-
"targetdevhubusername"
68+
"targetdevhubusername",
69+
"patchversion"
6970
],
70-
"flagChars": ["f", "k", "m", "p", "s", "v", "w", "x"],
71+
"flagChars": ["f", "k", "m", "p", "s", "v", "w", "x", "a"],
7172
"flags": [
7273
"api-version",
7374
"build-instance",
@@ -81,7 +82,8 @@
8182
"seed-metadata",
8283
"target-dev-hub",
8384
"verbose",
84-
"wait"
85+
"wait",
86+
"patch-version"
8587
],
8688
"plugin": "@salesforce/plugin-packaging"
8789
},

messages/package_convert.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The package convert creates a new package in the Dev Hub if one does not already
88

99
It then creates a new package version in the Dev Hub with contents based on the specified first-generation package.
1010

11-
The latest released non-patch package version from the specified first-generation package will be converted.
11+
By default, the latest released non-patch version from the specified first-generation package will be converted. Use --patch-version to override the default. Read more about --patch-version option in help
1212

1313
To retrieve details about a package version create request, including status and package version ID (04t), run "<%= config.bin %> package version create report -i 08c...".
1414

@@ -77,3 +77,11 @@ Directory containing metadata to be deployed prior to conversion.
7777
# flags.seed-metadata.description
7878

7979
The directory containing metadata that will be deployed on the build org prior to attempting conversion.
80+
81+
# flags.patch-version.summary
82+
83+
Specific released patch version to convert
84+
85+
# flags.patch-version.description
86+
87+
Specify a released patch version as major.minor.patch.build to convert to second generation package version

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"@oclif/core": "^4",
99
"@salesforce/core": "^8.8.6",
1010
"@salesforce/kit": "^3.2.3",
11-
"@salesforce/packaging": "^4.4.0",
11+
"@salesforce/packaging": "^4.5.0",
1212
"@salesforce/sf-plugins-core": "^12.2.1",
1313
"chalk": "^5.4.1"
1414
},

src/commands/package/convert.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ export class PackageConvert extends SfCommand<PackageVersionCreateRequestResult>
8484
verbose: Flags.boolean({
8585
summary: messages.getMessage('flags.verbose.summary'),
8686
}),
87+
'patch-version': Flags.string({
88+
summary: messages.getMessage('flags.patch-version.summary'),
89+
description: messages.getMessage('flags.patch-version.description'),
90+
char: 'a',
91+
deprecateAliases: true,
92+
aliases: ['patchversion'],
93+
hidden: true,
94+
}),
8795
};
8896

8997
public async run(): Promise<PackageVersionCreateRequestResult> {
@@ -124,6 +132,7 @@ export class PackageConvert extends SfCommand<PackageVersionCreateRequestResult>
124132
installationKeyBypass: flags['installation-key-bypass'],
125133
buildInstance: flags['build-instance'] as string,
126134
seedMetadata: flags['seed-metadata'] as string,
135+
patchversion: flags['patch-version'] as string,
127136
},
128137
project
129138
);

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,10 +1677,10 @@
16771677
dependencies:
16781678
"@salesforce/ts-types" "^2.0.12"
16791679

1680-
"@salesforce/packaging@^4.4.0":
1681-
version "4.4.0"
1682-
resolved "https://registry.yarnpkg.com/@salesforce/packaging/-/packaging-4.4.0.tgz#f7dfca8bbe82024722f35c02d71c6c676ce339e7"
1683-
integrity sha512-O3XYD3h7ur9x9vjzOvNApMIVYKu+0VTm0Kf+WdN7ZdtuTNCy0lTuO38yTS79QP79NfvdaRIKiTH3zQnPnP05yg==
1680+
"@salesforce/packaging@^4.5.0":
1681+
version "4.5.0"
1682+
resolved "https://registry.yarnpkg.com/@salesforce/packaging/-/packaging-4.5.0.tgz#05b9bb10c2f4aef4db272d5f98be2d11bfaeef54"
1683+
integrity sha512-gIwDkkX+XNR5gAqP/sfbF6lmZuC75dndTd4GjYhqlkvcWMCNIJyB8hTj72KlHz3dK8cGoicOeZWuqxX+ZRpGqA==
16841684
dependencies:
16851685
"@jsforce/jsforce-node" "^3.6.5"
16861686
"@salesforce/core" "^8.8.5"

0 commit comments

Comments
 (0)