From 24f4a24c3757751235c56a56083b64aed61aced7 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Thu, 21 Jan 2021 17:31:08 +0000 Subject: [PATCH] support for productIconThemes --- src/package.ts | 2 ++ src/test/package.test.ts | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/package.ts b/src/package.ts index 24dd83b8..22a13906 100644 --- a/src/package.ts +++ b/src/package.ts @@ -359,6 +359,7 @@ export class TagsProcessor extends BaseProcessor { const colorThemes = doesContribute('themes') ? ['theme', 'color-theme'] : []; const iconThemes = doesContribute('iconThemes') ? ['theme', 'icon-theme'] : []; + const productIconThemes = doesContribute('productIconThemes') ? ['theme', 'product-icon-theme'] : []; const snippets = doesContribute('snippets') ? ['snippet'] : []; const keybindings = doesContribute('keybindings') ? ['keybindings'] : []; const debuggers = doesContribute('debuggers') ? ['debuggers'] : []; @@ -394,6 +395,7 @@ export class TagsProcessor extends BaseProcessor { ...keywords, ...colorThemes, ...iconThemes, + ...productIconThemes, ...snippets, ...keybindings, ...debuggers, diff --git a/src/test/package.test.ts b/src/test/package.test.ts index e324aea7..e7efeef8 100644 --- a/src/test/package.test.ts +++ b/src/test/package.test.ts @@ -916,6 +916,25 @@ describe('toVsixManifest', () => { }); }); + it('should automatically add product-icon-theme tag', () => { + const manifest = { + name: 'test', + publisher: 'mocha', + version: '0.0.1', + engines: Object.create(null), + contributes: { + productIconThemes: [{ id: 'fakeicons', label: 'fakeicons', path: 'fake.icons' }], + }, + }; + + return _toVsixManifest(manifest, []) + .then(parseXmlManifest) + .then(result => { + const tags = result.PackageManifest.Metadata[0].Tags[0].split(',') as string[]; + assert(tags.some(tag => tag === 'product-icon-theme')); + }); + }); + it('should automatically add language tag with activationEvent', () => { const manifest = { name: 'test',