File tree 2 files changed +29
-0
lines changed
2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,7 @@ export interface VSIX {
193
193
extensionPack : string ;
194
194
extensionKind : string ;
195
195
localizedLanguages : string ;
196
+ enabledApiProposals : string ;
196
197
preRelease : boolean ;
197
198
sponsorLink : string ;
198
199
pricing : string ;
@@ -541,6 +542,7 @@ export class ManifestProcessor extends BaseProcessor {
541
542
. map ( loc => loc . localizedLanguageName ?? loc . languageName ?? loc . languageId )
542
543
. join ( ',' )
543
544
: '' ,
545
+ enabledApiProposals : manifest . enabledApiProposals ? manifest . enabledApiProposals . join ( ',' ) : '' ,
544
546
preRelease : ! ! this . options . preRelease ,
545
547
sponsorLink : manifest . sponsor ?. url || '' ,
546
548
} ;
@@ -1461,6 +1463,7 @@ export async function toVsixManifest(vsix: VSIX): Promise<string> {
1461
1463
<Property Id="Microsoft.VisualStudio.Code.ExtensionPack" Value="${ escape ( vsix . extensionPack ) } " />
1462
1464
<Property Id="Microsoft.VisualStudio.Code.ExtensionKind" Value="${ escape ( vsix . extensionKind ) } " />
1463
1465
<Property Id="Microsoft.VisualStudio.Code.LocalizedLanguages" Value="${ escape ( vsix . localizedLanguages ) } " />
1466
+ <Property Id="Microsoft.VisualStudio.Code.EnabledApiProposals" Value="${ escape ( vsix . enabledApiProposals ) } " />
1464
1467
${ vsix . preRelease ? `<Property Id="Microsoft.VisualStudio.Code.PreRelease" Value="${ escape ( vsix . preRelease ) } " />` : '' }
1465
1468
${ vsix . sponsorLink
1466
1469
? `<Property Id="Microsoft.VisualStudio.Code.SponsorLink" Value="${ escape ( vsix . sponsorLink ) } " />`
Original file line number Diff line number Diff line change @@ -1912,6 +1912,32 @@ describe('toVsixManifest', () => {
1912
1912
const xmlManifest = await parseXmlManifest ( raw ) ;
1913
1913
assertProperty ( xmlManifest , 'Microsoft.VisualStudio.Services.Content.Pricing' , 'Trial' ) ;
1914
1914
} ) ;
1915
+
1916
+ it ( 'should expose enabledApiProposals as properties' , ( ) => {
1917
+ const manifest = {
1918
+ name : 'test' ,
1919
+ publisher : 'mocha' ,
1920
+ version : '0.0.1' ,
1921
+ engines : Object . create ( null ) ,
1922
+ enabledApiProposals : [
1923
+ 'foo' ,
1924
+ 'bar@2'
1925
+ ] ,
1926
+ } ;
1927
+
1928
+ return _toVsixManifest ( manifest , [ ] )
1929
+ . then ( parseXmlManifest )
1930
+ . then ( result => {
1931
+ const properties = result . PackageManifest . Metadata [ 0 ] . Properties [ 0 ] . Property ;
1932
+ const enabledApiProposalsProp = properties . filter ( p => p . $ . Id === 'Microsoft.VisualStudio.Code.EnabledApiProposals' ) ;
1933
+ assert . strictEqual ( enabledApiProposalsProp . length , 1 ) ;
1934
+
1935
+ const enabledApiProposals = enabledApiProposalsProp [ 0 ] . $ . Value . split ( ',' ) ;
1936
+ assert . strictEqual ( enabledApiProposals . length , 2 ) ;
1937
+ assert . strictEqual ( enabledApiProposals [ 0 ] , 'foo' ) ;
1938
+ assert . strictEqual ( enabledApiProposals [ 1 ] , 'bar@2' ) ;
1939
+ } ) ;
1940
+ } ) ;
1915
1941
} ) ;
1916
1942
1917
1943
describe ( 'qna' , ( ) => {
You can’t perform that action at this time.
0 commit comments