parent
f9107201f9
commit
9871b82a42
3 changed files with 32 additions and 3 deletions
|
@ -10,13 +10,14 @@
|
|||
<Badges><% _.forEach(badges, function (badge) { %><Badge Link="<%- badge.href %>" ImgUri="<%- badge.url %>" Description="<%- badge.description %>" /><% }); %></Badges>
|
||||
<Properties>
|
||||
<Property Id="Microsoft.VisualStudio.Code.Engine" Value="<%- engine %>" />
|
||||
<Property Id="Microsoft.VisualStudio.Code.ExtensionDependencies" Value="<%- extensionDependencies %>" />
|
||||
<% if (links.repository) { %>
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Source" Value="<%- links.repository %>" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Getstarted" Value="<%- links.repository %>" />
|
||||
<% if (links.github) { %>
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.GitHub" Value="<%- links.github %>" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.GitHub" Value="<%- links.github %>" />
|
||||
<% } else { %>
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Repository" Value="<%- links.repository %>" />
|
||||
<Property Id="Microsoft.VisualStudio.Services.Links.Repository" Value="<%- links.repository %>" />
|
||||
<% } %>
|
||||
<% } %>
|
||||
<% if (links.bugs) { %><Property Id="Microsoft.VisualStudio.Services.Links.Support" Value="<%- links.bugs %>" /><% } %>
|
||||
|
|
|
@ -134,7 +134,8 @@ class ManifestProcessor extends BaseProcessor {
|
|||
},
|
||||
galleryBanner: manifest.galleryBanner || {},
|
||||
badges: manifest.badges,
|
||||
githubMarkdown: manifest.markdown !== 'standard'
|
||||
githubMarkdown: manifest.markdown !== 'standard',
|
||||
extensionDependencies: (manifest.extensionDependencies || []).join(',')
|
||||
});
|
||||
|
||||
if (/^https:\/\/github\.com\/|^git@github\.com:/.test(repository)) {
|
||||
|
|
|
@ -938,6 +938,33 @@ describe('toVsixManifest', () => {
|
|||
assert(properties.some(p => p.$.Id === 'Microsoft.VisualStudio.Services.GitHubFlavoredMarkdown' && p.$.Value === 'true'));
|
||||
});
|
||||
});
|
||||
|
||||
it('should add extension dependencies property', () => {
|
||||
const manifest = {
|
||||
name: 'test',
|
||||
publisher: 'mocha',
|
||||
version: '0.0.1',
|
||||
description: 'test extension',
|
||||
engines: Object.create(null),
|
||||
extensionDependencies: [
|
||||
"foo.bar",
|
||||
"monkey.hello"
|
||||
]
|
||||
};
|
||||
|
||||
return _toVsixManifest(manifest, [])
|
||||
.then(parseXmlManifest)
|
||||
.then(result => {
|
||||
const properties = result.PackageManifest.Metadata[0].Properties[0].Property;
|
||||
const dependenciesProp = properties.filter(p => p.$.Id === 'Microsoft.VisualStudio.Code.ExtensionDependencies');
|
||||
assert.equal(dependenciesProp.length, 1);
|
||||
|
||||
const dependencies = dependenciesProp[0].$.Value.split(',');
|
||||
assert.equal(dependencies.length, 2);
|
||||
assert(dependencies.some(d => d === 'foo.bar'));
|
||||
assert(dependencies.some(d => d === 'monkey.hello'));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('toContentTypes', () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue