Get changelog url in installed extension as well

This commit is contained in:
XVincentX 2016-09-14 09:57:29 +02:00
parent 1ad39acdbf
commit 4c93b48ef6
No known key found for this signature in database
GPG key ID: D618C95BD28F3AE0

View file

@ -203,9 +203,12 @@ export class ExtensionManagementService implements IExtensionManagementService {
const readme = children.filter(child => /^readme(\.txt|\.md|)$/i.test(child))[0];
const readmeUrl = readme ? URI.file(path.join(extensionPath, readme)).toString() : null;
const changelog = children.filter(child => /^changelog(\.txt|\.md|)$/i.test(child))[0];
const changelogUrl = changelog ? URI.file(path.join(extensionPath, changelog)).toString() : null;
return pfs.readFile(path.join(extensionPath, 'package.json'), 'utf8')
.then(raw => parseManifest(raw))
.then<ILocalExtension>(({ manifest, metadata }) => ({ id, manifest, metadata, path: extensionPath, readmeUrl }));
.then<ILocalExtension>(({ manifest, metadata }) => ({ id, manifest, metadata, path: extensionPath, readmeUrl, changelogUrl }));
}).then(null, () => null);
return limiter.queue(each);