@vscode/vsce 2.16.0 → 2.17.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.
- package/out/api.js +5 -1
- package/out/package.js +18 -2
- package/package.json +1 -1
package/out/api.js
CHANGED
|
@@ -34,7 +34,11 @@ exports.publish = publish;
|
|
|
34
34
|
* @public
|
|
35
35
|
*/
|
|
36
36
|
function listFiles(options = {}) {
|
|
37
|
-
return (0, package_1.listFiles)(
|
|
37
|
+
return (0, package_1.listFiles)({
|
|
38
|
+
...options,
|
|
39
|
+
useYarn: options.packageManager === PackageManager.Yarn,
|
|
40
|
+
dependencies: options.packageManager !== PackageManager.None,
|
|
41
|
+
});
|
|
38
42
|
}
|
|
39
43
|
exports.listFiles = listFiles;
|
|
40
44
|
/**
|
package/out/package.js
CHANGED
|
@@ -876,11 +876,27 @@ function validateManifest(manifest) {
|
|
|
876
876
|
if (!manifest.engines['vscode']) {
|
|
877
877
|
throw new Error('Manifest missing field: engines.vscode');
|
|
878
878
|
}
|
|
879
|
-
|
|
879
|
+
const engineVersion = manifest.engines['vscode'];
|
|
880
|
+
(0, validation_1.validateEngineCompatibility)(engineVersion);
|
|
880
881
|
const hasActivationEvents = !!manifest.activationEvents;
|
|
882
|
+
const hasImplicitActivationEvents = manifest.contributes?.commands ||
|
|
883
|
+
manifest.contributes?.authentication ||
|
|
884
|
+
manifest.contributes?.languages ||
|
|
885
|
+
manifest.contributes?.customEditors ||
|
|
886
|
+
manifest.contributes?.views;
|
|
881
887
|
const hasMain = !!manifest.main;
|
|
882
888
|
const hasBrowser = !!manifest.browser;
|
|
883
|
-
|
|
889
|
+
let parsedEngineVersion;
|
|
890
|
+
try {
|
|
891
|
+
const engineSemver = (0, parse_semver_1.default)(`vscode@${engineVersion}`);
|
|
892
|
+
parsedEngineVersion = engineSemver.version;
|
|
893
|
+
}
|
|
894
|
+
catch (err) {
|
|
895
|
+
throw new Error('Failed to parse semver of engines.vscode');
|
|
896
|
+
}
|
|
897
|
+
if (hasActivationEvents ||
|
|
898
|
+
((engineVersion === '*' || semver.satisfies(parsedEngineVersion, '>=1.74', { includePrerelease: true })) &&
|
|
899
|
+
hasImplicitActivationEvents)) {
|
|
884
900
|
if (!hasMain && !hasBrowser) {
|
|
885
901
|
throw new Error("Manifest needs either a 'main' or 'browser' property, given it has a 'activationEvents' property.");
|
|
886
902
|
}
|