@salesforce/packaging 1.4.2 → 1.4.3
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.
- package/lib/package/packageVersionCreate.js +11 -3
- package/package.json +86 -12
|
@@ -178,6 +178,7 @@ class PackageVersionCreate {
|
|
|
178
178
|
SourceOrg: this.options.sourceorg,
|
|
179
179
|
CalculateCodeCoverage: this.options.codecoverage || false,
|
|
180
180
|
SkipValidation: this.options.skipvalidation || false,
|
|
181
|
+
// note: the createRequest's Language corresponds to the AllPackageVersion's language
|
|
181
182
|
Language: this.options.language,
|
|
182
183
|
};
|
|
183
184
|
// Ensure we only include the Language property for a connection api version
|
|
@@ -232,6 +233,7 @@ class PackageVersionCreate {
|
|
|
232
233
|
await fs.promises.mkdir(packageVersBlobDirectory, { recursive: true });
|
|
233
234
|
const settingsGenerator = new scratchOrgSettingsGenerator_1.default({ asDirectory: true });
|
|
234
235
|
const packageDescriptorJson = (0, kit_1.cloneJson)(this.packageObject);
|
|
236
|
+
const apvLanguage = packageDescriptorJson.language;
|
|
235
237
|
// Copy all the metadata from the workspace to a tmp folder
|
|
236
238
|
const componentSet = await this.metadataResolver.generateMDFolderForArtifact(mdOptions);
|
|
237
239
|
this.verifyHasSource(componentSet);
|
|
@@ -239,6 +241,11 @@ class PackageVersionCreate {
|
|
|
239
241
|
delete packageDescriptorJson.package;
|
|
240
242
|
packageDescriptorJson.id = this.packageId;
|
|
241
243
|
}
|
|
244
|
+
if (packageDescriptorJson.language) {
|
|
245
|
+
// the cloneJson() call above added the packageDir's language to the descriptor;
|
|
246
|
+
// remove that from the descriptor here; it will be set correctly from the definitionFile values below
|
|
247
|
+
delete packageDescriptorJson.language;
|
|
248
|
+
}
|
|
242
249
|
const definitionFile = this.options.definitionfile
|
|
243
250
|
? this.options.definitionfile
|
|
244
251
|
: packageDescriptorJson.definitionFile;
|
|
@@ -257,7 +264,8 @@ class PackageVersionCreate {
|
|
|
257
264
|
// this is not allowed, exit with an error
|
|
258
265
|
throw messages.createError('signupDuplicateSettingsSpecified');
|
|
259
266
|
}
|
|
260
|
-
|
|
267
|
+
// these scratch org definition file values will be applied to the build org
|
|
268
|
+
['country', 'language', 'edition', 'features', 'orgPreferences', 'snapshot', 'release', 'sourceOrg'].forEach((prop) => {
|
|
261
269
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
262
270
|
const propValue = definitionFileJson[prop];
|
|
263
271
|
if (propValue) {
|
|
@@ -270,9 +278,9 @@ class PackageVersionCreate {
|
|
|
270
278
|
// All dependencies for the packaging dir should be resolved to an 04t id to be passed to the server.
|
|
271
279
|
// (see _retrieveSubscriberPackageVersionId for details)
|
|
272
280
|
const dependencies = packageDescriptorJson.dependencies;
|
|
273
|
-
// branch and language can be set via options or
|
|
281
|
+
// branch and APV language can be set via options or packageDirectory; option takes precedence
|
|
274
282
|
this.options.branch = this.options.branch ?? packageDescriptorJson.branch;
|
|
275
|
-
this.options.language = this.options.language ??
|
|
283
|
+
this.options.language = this.options.language ?? apvLanguage;
|
|
276
284
|
const resultValues = await Promise.all(!dependencies ? [] : dependencies.map((dependency) => this.retrieveSubscriberPackageVersionId(dependency)));
|
|
277
285
|
const ancestorId = await this.getAncestorId(packageDescriptorJson, this.options.project, this.options.versionnumber ?? packageDescriptorJson.versionNumber, this.options.skipancestorcheck);
|
|
278
286
|
// If dependencies exist, the resultValues array will contain the dependencies populated with a resolved
|
package/package.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/packaging",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"description": "Packaging library for the Salesforce packaging platform",
|
|
5
5
|
"main": "lib/exported",
|
|
6
6
|
"types": "lib/exported.d.ts",
|
|
7
7
|
"license": "BSD-3-Clause",
|
|
8
8
|
"repository": "forcedotcom/packaging",
|
|
9
9
|
"scripts": {
|
|
10
|
-
"build": "
|
|
10
|
+
"build": "wireit",
|
|
11
11
|
"ci-docs": "yarn sf-ci-docs",
|
|
12
12
|
"clean": "sf-clean",
|
|
13
13
|
"clean-all": "sf-clean all",
|
|
14
|
-
"compile": "
|
|
14
|
+
"compile": "wireit",
|
|
15
15
|
"docs": "sf-docs",
|
|
16
|
-
"format": "
|
|
17
|
-
"lint": "
|
|
16
|
+
"format": "wireit",
|
|
17
|
+
"lint": "wireit",
|
|
18
18
|
"lint-fix": "yarn sf-lint --fix",
|
|
19
19
|
"postcompile": "tsc -p test",
|
|
20
20
|
"prepack": "sf-prepack",
|
|
21
21
|
"prepare": "sf-install",
|
|
22
|
-
"pretest": "sf-compile-test",
|
|
23
22
|
"repl": "node --inspect ./scripts/repl.js",
|
|
24
|
-
"test": "
|
|
25
|
-
"test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 1800000 --parallel"
|
|
23
|
+
"test": "wireit",
|
|
24
|
+
"test:nuts": "nyc mocha \"**/*.nut.ts\" --slow 4500 --timeout 1800000 --parallel",
|
|
25
|
+
"test:only": "wireit"
|
|
26
26
|
},
|
|
27
27
|
"keywords": [
|
|
28
28
|
"force",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@oclif/core": "^1.26.1",
|
|
42
42
|
"@salesforce/core": "^3.32.11",
|
|
43
|
-
"@salesforce/kit": "^1.
|
|
43
|
+
"@salesforce/kit": "^1.9.2",
|
|
44
44
|
"@salesforce/schemas": "^1.5.0",
|
|
45
45
|
"@salesforce/source-deploy-retrieve": "^7.7.5",
|
|
46
46
|
"@salesforce/ts-types": "^1.7.1",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"xml2js": "^0.4.23"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@salesforce/cli-plugins-testkit": "^3.2.
|
|
61
|
+
"@salesforce/cli-plugins-testkit": "^3.2.24",
|
|
62
62
|
"@salesforce/dev-config": "^3.1.0",
|
|
63
|
-
"@salesforce/dev-scripts": "^
|
|
63
|
+
"@salesforce/dev-scripts": "^4.1.2",
|
|
64
64
|
"@salesforce/prettier-config": "^0.0.2",
|
|
65
65
|
"@salesforce/ts-sinon": "^1.4.6",
|
|
66
66
|
"@types/debug": "4.1.7",
|
|
@@ -87,9 +87,83 @@
|
|
|
87
87
|
"shelljs": "0.8.5",
|
|
88
88
|
"sinon": "14.0.2",
|
|
89
89
|
"ts-node": "^10.9.1",
|
|
90
|
-
"typescript": "4.9.5"
|
|
90
|
+
"typescript": "4.9.5",
|
|
91
|
+
"wireit": "^0.9.5"
|
|
91
92
|
},
|
|
92
93
|
"publishConfig": {
|
|
93
94
|
"access": "public"
|
|
95
|
+
},
|
|
96
|
+
"wireit": {
|
|
97
|
+
"build": {
|
|
98
|
+
"dependencies": [
|
|
99
|
+
"compile",
|
|
100
|
+
"lint"
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"compile": {
|
|
104
|
+
"command": "tsc -p . --pretty --incremental",
|
|
105
|
+
"files": [
|
|
106
|
+
"src/**/*.ts",
|
|
107
|
+
"tsconfig.json",
|
|
108
|
+
"messages/**"
|
|
109
|
+
],
|
|
110
|
+
"output": [
|
|
111
|
+
"lib/**",
|
|
112
|
+
"*.tsbuildinfo"
|
|
113
|
+
],
|
|
114
|
+
"clean": "if-file-deleted"
|
|
115
|
+
},
|
|
116
|
+
"format": {
|
|
117
|
+
"command": "prettier --write \"+(src|test|schemas)/**/*.+(ts|js|json)|command-snapshot.json\"",
|
|
118
|
+
"files": [
|
|
119
|
+
"src/**/*.ts",
|
|
120
|
+
"test/**/*.ts",
|
|
121
|
+
"schemas/**/*.json",
|
|
122
|
+
"command-snapshot.json",
|
|
123
|
+
".prettier*"
|
|
124
|
+
],
|
|
125
|
+
"output": []
|
|
126
|
+
},
|
|
127
|
+
"lint": {
|
|
128
|
+
"command": "eslint src test --color --cache --cache-location .eslintcache",
|
|
129
|
+
"files": [
|
|
130
|
+
"src/**/*.ts",
|
|
131
|
+
"test/**/*.ts",
|
|
132
|
+
"messages/**",
|
|
133
|
+
".eslint*"
|
|
134
|
+
],
|
|
135
|
+
"output": []
|
|
136
|
+
},
|
|
137
|
+
"test:compile": {
|
|
138
|
+
"command": "tsc -p \"./test\" --pretty",
|
|
139
|
+
"files": [
|
|
140
|
+
"test/**/*.ts",
|
|
141
|
+
"tsconfig.json",
|
|
142
|
+
"test/tsconfig.json"
|
|
143
|
+
],
|
|
144
|
+
"output": []
|
|
145
|
+
},
|
|
146
|
+
"test": {
|
|
147
|
+
"dependencies": [
|
|
148
|
+
"test:only",
|
|
149
|
+
"test:compile"
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"test:only": {
|
|
153
|
+
"command": "nyc mocha \"test/**/*.test.ts\"",
|
|
154
|
+
"env": {
|
|
155
|
+
"FORCE_COLOR": "2"
|
|
156
|
+
},
|
|
157
|
+
"files": [
|
|
158
|
+
"test/**/*.ts",
|
|
159
|
+
"src/**/*.ts",
|
|
160
|
+
"tsconfig.json",
|
|
161
|
+
".mocha*",
|
|
162
|
+
"test/tsconfig.json",
|
|
163
|
+
"!*.nut.ts",
|
|
164
|
+
".nycrc"
|
|
165
|
+
],
|
|
166
|
+
"output": []
|
|
167
|
+
}
|
|
94
168
|
}
|
|
95
169
|
}
|