提交 941c11cf 编写于 作者: M Martin Aeschlimann

allow undefined publisher

上级 258e8fc9
......@@ -334,6 +334,11 @@ class ExtensionManifestValidator extends ExtensionManifestHandler {
this._log.warn(this._absoluteFolderPath, error);
});
// allow publisher to be undefined to make the initial extension authoring experience smoother
if (!extensionDescription.publisher) {
extensionDescription.publisher = 'undefined_publisher';
}
// id := `publisher.name`
extensionDescription.id = `${extensionDescription.publisher}.${extensionDescription.name}`;
......@@ -366,8 +371,8 @@ class ExtensionManifestValidator extends ExtensionManifestHandler {
notices.push(nls.localize('extensionDescription.empty', "Got empty extension description"));
return false;
}
if (typeof extensionDescription.publisher !== 'string') {
notices.push(nls.localize('extensionDescription.publisher', "property `{0}` is mandatory and must be of type `string`", 'publisher'));
if (typeof extensionDescription.publisher !== 'undefined' && typeof extensionDescription.publisher !== 'string') {
notices.push(nls.localize('extensionDescription.publisher', "property publisher must be of type `string`."));
return false;
}
if (typeof extensionDescription.name !== 'string') {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册