@salesforce/packaging 2.4.20 → 2.4.21
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.
|
@@ -531,11 +531,11 @@ class PackageVersionCreate {
|
|
|
531
531
|
async validateOptionsForPackageType() {
|
|
532
532
|
if ((await this.getPackageType()) === 'Unlocked') {
|
|
533
533
|
// Don't allow scripts in unlocked packages
|
|
534
|
-
if (this.options.postinstallscript || this.options.uninstallscript) {
|
|
534
|
+
if (Boolean(this.options.postinstallscript) || this.options.uninstallscript) {
|
|
535
535
|
throw messages.createError('errorScriptsNotApplicableToUnlockedPackage');
|
|
536
536
|
}
|
|
537
537
|
// Don't allow ancestor in unlocked packages
|
|
538
|
-
if (this.packageObject.ancestorId || this.packageObject.ancestorVersion) {
|
|
538
|
+
if (Boolean(this.packageObject.ancestorId) || this.packageObject.ancestorVersion) {
|
|
539
539
|
throw messages.createError('errorAncestorNotApplicableToUnlockedPackage');
|
|
540
540
|
}
|
|
541
541
|
}
|
|
@@ -9,10 +9,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.byId = exports.list = void 0;
|
|
10
10
|
const util = require("node:util");
|
|
11
11
|
const core_1 = require("@salesforce/core");
|
|
12
|
+
const interfaces_1 = require("../interfaces");
|
|
12
13
|
const packageUtils_1 = require("../utils/packageUtils");
|
|
13
14
|
core_1.Messages.importMessagesDirectory(__dirname);
|
|
14
15
|
const messages = core_1.Messages.loadMessages('@salesforce/packaging', 'package_version_create');
|
|
15
|
-
const STATUS_ERROR = 'Error';
|
|
16
16
|
const QUERY = 'SELECT Id, Status, Package2Id, Package2VersionId, Package2Version.SubscriberPackageVersionId, Tag, Branch, ' +
|
|
17
17
|
'CreatedDate, Package2Version.HasMetadataRemoved, CreatedById, IsConversionRequest, Package2Version.ConvertedFromVersionId ' +
|
|
18
18
|
'FROM Package2VersionCreateRequest ' +
|
|
@@ -37,7 +37,7 @@ async function list(connection, options) {
|
|
|
37
37
|
exports.list = list;
|
|
38
38
|
async function byId(packageVersionCreateRequestId, connection) {
|
|
39
39
|
const results = await query(util.format(QUERY, `WHERE Id = '${packageVersionCreateRequestId}' `), connection);
|
|
40
|
-
if (results && results.length === 1 && results[0].Status ===
|
|
40
|
+
if (results && results.length === 1 && results[0].Status === interfaces_1.PackagingSObjects.Package2VersionStatus.error) {
|
|
41
41
|
results[0].Error = await queryForErrors(packageVersionCreateRequestId, connection);
|
|
42
42
|
}
|
|
43
43
|
return results;
|
|
@@ -291,7 +291,7 @@ class SubscriberPackageVersion {
|
|
|
291
291
|
* @returns {PackagingSObjects.SubscriberPackageVersion} SObject data.
|
|
292
292
|
*/
|
|
293
293
|
async getData(options = { force: false, includeHighCostFields: false }) {
|
|
294
|
-
if (!this.data || options.force || options.includeHighCostFields) {
|
|
294
|
+
if (!this.data || Boolean(options.force) || options.includeHighCostFields) {
|
|
295
295
|
const queryFields = this.getFieldsForQuery(options);
|
|
296
296
|
if (queryFields.length === 0) {
|
|
297
297
|
return this.data;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/packaging",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.21",
|
|
4
4
|
"description": "Packaging library for the Salesforce packaging platform",
|
|
5
5
|
"main": "lib/exported",
|
|
6
6
|
"types": "lib/exported.d.ts",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@salesforce/core": "^5.3.14",
|
|
46
46
|
"@salesforce/kit": "^3.0.15",
|
|
47
47
|
"@salesforce/schemas": "^1.6.1",
|
|
48
|
-
"@salesforce/source-deploy-retrieve": "^9.8.
|
|
48
|
+
"@salesforce/source-deploy-retrieve": "^9.8.5",
|
|
49
49
|
"@salesforce/ts-types": "^2.0.9",
|
|
50
50
|
"fast-xml-parser": "^4.3.1",
|
|
51
51
|
"globby": "^11",
|
|
@@ -56,35 +56,15 @@
|
|
|
56
56
|
"jszip": "^3.10.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@salesforce/cli-plugins-testkit": "^4.4.
|
|
60
|
-
"@salesforce/dev-
|
|
61
|
-
"@salesforce/dev-scripts": "^5.12.2",
|
|
62
|
-
"@salesforce/prettier-config": "^0.0.3",
|
|
59
|
+
"@salesforce/cli-plugins-testkit": "^4.4.12",
|
|
60
|
+
"@salesforce/dev-scripts": "^6.0.3",
|
|
63
61
|
"@salesforce/ts-sinon": "^1.4.19",
|
|
64
62
|
"@types/globby": "^9.1.0",
|
|
65
63
|
"@types/jszip": "^3.4.1",
|
|
66
|
-
"
|
|
67
|
-
"@typescript-eslint/parser": "^5.62.0",
|
|
68
|
-
"chai": "^4.3.10",
|
|
69
|
-
"eslint": "^8.53.0",
|
|
70
|
-
"eslint-config-prettier": "^8.10.0",
|
|
71
|
-
"eslint-config-salesforce": "^2.0.2",
|
|
72
|
-
"eslint-config-salesforce-license": "^0.2.0",
|
|
73
|
-
"eslint-config-salesforce-typescript": "^2.0.0",
|
|
74
|
-
"eslint-plugin-header": "3.1.1",
|
|
75
|
-
"eslint-plugin-import": "^2.28.1",
|
|
76
|
-
"eslint-plugin-jsdoc": "^46.8.2",
|
|
77
|
-
"eslint-plugin-sf-plugin": "^1.16.13",
|
|
78
|
-
"husky": "^8.0.3",
|
|
79
|
-
"mocha": "^10.2.0",
|
|
80
|
-
"nyc": "^15.1.0",
|
|
81
|
-
"prettier": "^2.8.8",
|
|
82
|
-
"pretty-quick": "^3.1.3",
|
|
64
|
+
"eslint-plugin-sf-plugin": "^1.16.14",
|
|
83
65
|
"shelljs": "0.8.5",
|
|
84
|
-
"sinon": "14.0.2",
|
|
85
66
|
"ts-node": "^10.9.1",
|
|
86
|
-
"typescript": "^5.2.2"
|
|
87
|
-
"wireit": "^0.14.1"
|
|
67
|
+
"typescript": "^5.2.2"
|
|
88
68
|
},
|
|
89
69
|
"publishConfig": {
|
|
90
70
|
"access": "public"
|