Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions src/vs/platform/extensions/common/extensionValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export function validateExtensionManifest(productVersion: string, productDate: P
return validations;
}
if (typeof extensionManifest.main === 'undefined' && typeof extensionManifest.browser === 'undefined') {
validations.push([Severity.Error, nls.localize('extensionDescription.activationEvents2', "properties `{0}` and `{1}` must both be specified or must both be omitted", 'activationEvents', 'main')]);
validations.push([Severity.Error, nls.localize('extensionDescription.activationEvents2', "property `{0}` should be omitted if the extension doesn't have a `{1}` or `{2}` property.", 'activationEvents', 'main', 'browser')]);
return validations;
}
}
Expand All @@ -294,10 +294,6 @@ export function validateExtensionManifest(productVersion: string, productDate: P
// not a failure case
}
}
if (typeof extensionManifest.activationEvents === 'undefined') {
validations.push([Severity.Error, nls.localize('extensionDescription.main3', "properties `{0}` and `{1}` must both be specified or must both be omitted", 'activationEvents', 'main')]);
return validations;
}
}
if (typeof extensionManifest.browser !== 'undefined') {
if (typeof extensionManifest.browser !== 'string') {
Expand All @@ -310,10 +306,6 @@ export function validateExtensionManifest(productVersion: string, productDate: P
// not a failure case
}
}
if (typeof extensionManifest.activationEvents === 'undefined') {
validations.push([Severity.Error, nls.localize('extensionDescription.browser3', "properties `{0}` and `{1}` must both be specified or must both be omitted", 'activationEvents', 'browser')]);
return validations;
}
}

if (!semver.valid(extensionManifest.version)) {
Expand Down