@salesforce/packaging 4.9.0 → 4.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -198,6 +198,7 @@ export type PackageVersionCreateRequest = {
|
|
|
198
198
|
CalculateCodeCoverage: boolean;
|
|
199
199
|
SkipValidation: boolean;
|
|
200
200
|
AsyncValidation?: boolean;
|
|
201
|
+
CalcTransitiveDependencies?: boolean;
|
|
201
202
|
};
|
|
202
203
|
export type PackageVersionListOptions = {
|
|
203
204
|
orderBy?: string;
|
|
@@ -26,6 +26,7 @@ export declare class PackageVersionCreate {
|
|
|
26
26
|
private validateDependencyValues;
|
|
27
27
|
private resolveBuildNumber;
|
|
28
28
|
private createRequestObject;
|
|
29
|
+
private stripUnsupportedPropertiesBasedOnApiVersion;
|
|
29
30
|
/**
|
|
30
31
|
* Convert the list of command line options to a JSON object that can be used to create an Package2VersionCreateRequest entity.
|
|
31
32
|
*
|
|
@@ -241,25 +241,10 @@ class PackageVersionCreate {
|
|
|
241
241
|
CalculateCodeCoverage: this.options.codecoverage ?? false,
|
|
242
242
|
SkipValidation: this.options.skipvalidation ?? false,
|
|
243
243
|
AsyncValidation: this.options.asyncvalidation ?? false,
|
|
244
|
-
// note: the createRequest's Language corresponds to the AllPackageVersion's language
|
|
245
|
-
|
|
244
|
+
Language: this.options.language, // note: the createRequest's Language corresponds to the AllPackageVersion's language
|
|
245
|
+
CalcTransitiveDependencies: this.packageObject.calculateTransitiveDependencies ?? false,
|
|
246
246
|
};
|
|
247
|
-
|
|
248
|
-
// of v57.0 or higher.
|
|
249
|
-
if (this.connection.getApiVersion() < '57.0') {
|
|
250
|
-
if (requestObject.Language) {
|
|
251
|
-
this.logger.warn(`The language option is only valid for API version 57.0 and higher. Ignoring ${requestObject.Language}`);
|
|
252
|
-
}
|
|
253
|
-
delete requestObject.Language;
|
|
254
|
-
}
|
|
255
|
-
// Ensure we only include the async validation property for a connection api version
|
|
256
|
-
// of v60.0 or higher.
|
|
257
|
-
if (this.connection.getApiVersion() <= '60.0') {
|
|
258
|
-
if (requestObject.AsyncValidation) {
|
|
259
|
-
this.logger.warn(`The async validation option is only valid for API version 60.0 and higher. Ignoring ${requestObject.AsyncValidation}`);
|
|
260
|
-
}
|
|
261
|
-
delete requestObject.AsyncValidation;
|
|
262
|
-
}
|
|
247
|
+
this.stripUnsupportedPropertiesBasedOnApiVersion(requestObject);
|
|
263
248
|
if (preserveFiles) {
|
|
264
249
|
const message = messages.getMessage('tempFileLocation', [packageVersTmpRoot]);
|
|
265
250
|
await core_1.Lifecycle.getInstance().emit(interfaces_1.PackageVersionEvents.create['preserve-files'], {
|
|
@@ -273,6 +258,27 @@ class PackageVersionCreate {
|
|
|
273
258
|
return node_fs_1.default.promises.rm(packageVersTmpRoot, { recursive: true, force: true }).then(() => requestObject);
|
|
274
259
|
}
|
|
275
260
|
}
|
|
261
|
+
// TODO: W-18696754 - None of the logger.warn() calls work, nothing is printed to the console when they're hit.
|
|
262
|
+
stripUnsupportedPropertiesBasedOnApiVersion(requestObject) {
|
|
263
|
+
if (this.connection.getApiVersion() < '57.0') {
|
|
264
|
+
if (requestObject.Language) {
|
|
265
|
+
this.logger.warn(`The language option is only valid for API version 57.0 and higher. Ignoring ${requestObject.Language}`);
|
|
266
|
+
}
|
|
267
|
+
delete requestObject.Language;
|
|
268
|
+
}
|
|
269
|
+
if (this.connection.getApiVersion() < '60.0') {
|
|
270
|
+
if (requestObject.AsyncValidation) {
|
|
271
|
+
this.logger.warn(`The async validation option is only valid for API version 60.0 and higher. Ignoring ${requestObject.AsyncValidation}`);
|
|
272
|
+
}
|
|
273
|
+
delete requestObject.AsyncValidation;
|
|
274
|
+
}
|
|
275
|
+
if (this.connection.getApiVersion() < '65.0') {
|
|
276
|
+
if (requestObject.CalcTransitiveDependencies) {
|
|
277
|
+
this.logger.warn(`The CalculateTransitiveDependencies option is only valid for API version 65.0 and higher. Ignoring ${requestObject.CalcTransitiveDependencies}`);
|
|
278
|
+
}
|
|
279
|
+
delete requestObject.CalcTransitiveDependencies;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
276
282
|
/**
|
|
277
283
|
* Convert the list of command line options to a JSON object that can be used to create an Package2VersionCreateRequest entity.
|
|
278
284
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/packaging",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.10.0",
|
|
4
4
|
"description": "Packaging library for the Salesforce packaging platform",
|
|
5
5
|
"main": "lib/exported",
|
|
6
6
|
"types": "lib/exported.d.ts",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@jsforce/jsforce-node": "^3.6.5",
|
|
46
|
-
"@salesforce/core": "^8.
|
|
46
|
+
"@salesforce/core": "^8.15.0",
|
|
47
47
|
"@salesforce/kit": "^3.2.3",
|
|
48
|
-
"@salesforce/schemas": "^1.9.
|
|
48
|
+
"@salesforce/schemas": "^1.9.1",
|
|
49
49
|
"@salesforce/source-deploy-retrieve": "^12.16.9",
|
|
50
50
|
"@salesforce/ts-types": "^2.0.11",
|
|
51
51
|
"@salesforce/types": "^1.2.0",
|