@vscode/vsce 3.2.2-1 → 3.2.2-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/out/package.js +9 -6
- package/package.json +1 -1
package/out/package.js
CHANGED
|
@@ -300,16 +300,19 @@ class ManifestProcessor extends BaseProcessor {
|
|
|
300
300
|
const target = options.target;
|
|
301
301
|
const preRelease = options.preRelease;
|
|
302
302
|
if (target || preRelease) {
|
|
303
|
-
let
|
|
303
|
+
let engineSemver;
|
|
304
304
|
try {
|
|
305
|
-
|
|
306
|
-
engineVersion = engineSemver.version;
|
|
305
|
+
engineSemver = (0, parse_semver_1.default)(`vscode@${manifest.engines.vscode}`);
|
|
307
306
|
}
|
|
308
307
|
catch (err) {
|
|
309
308
|
throw new Error('Failed to parse semver of engines.vscode');
|
|
310
309
|
}
|
|
310
|
+
const minEngineVersion = semver.minVersion(engineSemver.range);
|
|
311
|
+
if (!minEngineVersion) {
|
|
312
|
+
throw new Error('Failed to get minVersion of engines.vscode');
|
|
313
|
+
}
|
|
311
314
|
if (target) {
|
|
312
|
-
if (
|
|
315
|
+
if (engineSemver.version !== 'latest' && !semver.satisfies(minEngineVersion, '>=1.61', { includePrerelease: true })) {
|
|
313
316
|
throw new Error(`Platform specific extension is supported by VS Code >=1.61. Current 'engines.vscode' is '${manifest.engines.vscode}'.`);
|
|
314
317
|
}
|
|
315
318
|
if (!exports.Targets.has(target)) {
|
|
@@ -317,7 +320,7 @@ class ManifestProcessor extends BaseProcessor {
|
|
|
317
320
|
}
|
|
318
321
|
}
|
|
319
322
|
if (preRelease) {
|
|
320
|
-
if (
|
|
323
|
+
if (engineSemver.version !== 'latest' && !semver.satisfies(minEngineVersion, '>=1.63', { includePrerelease: true })) {
|
|
321
324
|
throw new Error(`Pre-release versions are supported by VS Code >=1.63. Current 'engines.vscode' is '${manifest.engines.vscode}'.`);
|
|
322
325
|
}
|
|
323
326
|
}
|
|
@@ -1533,7 +1536,7 @@ async function printAndValidatePackagedFiles(files, cwd, manifest, options) {
|
|
|
1533
1536
|
}
|
|
1534
1537
|
}
|
|
1535
1538
|
// Print the files included in the package
|
|
1536
|
-
const printableFileStructure = await util.generateFileStructureTree(
|
|
1539
|
+
const printableFileStructure = await util.generateFileStructureTree(path.basename(await getPackagePath(cwd, manifest, options)), files.map(f => ({
|
|
1537
1540
|
// File path relative to the extension root
|
|
1538
1541
|
origin: !isInMemoryFile(f) ? f.localPath : util.vsixPathToFilePath(f.path),
|
|
1539
1542
|
// File path in the VSIX
|