File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -264,20 +264,20 @@ function packageMarketplaceExtensionsStream(forWeb) {
264264 . pipe ( util2 . setExecutableBit ( [ '**/*.sh' ] ) ) ) ;
265265}
266266exports . packageMarketplaceExtensionsStream = packageMarketplaceExtensionsStream ;
267- function scanBuiltinExtensions ( extensionsRoot , forWeb ) {
267+ function scanBuiltinExtensions ( extensionsRoot , exclude = [ ] ) {
268268 const scannedExtensions = [ ] ;
269269 try {
270270 const extensionsFolders = fs . readdirSync ( extensionsRoot ) ;
271271 for ( const extensionFolder of extensionsFolders ) {
272- if ( extensionFolder === 'vscode-web-playground' ) {
273- // never inline vscode-web-playground (even if it was packaged)
272+ if ( exclude . indexOf ( extensionFolder ) >= 0 ) {
273+ continue ;
274274 }
275275 const packageJSONPath = path . join ( extensionsRoot , extensionFolder , 'package.json' ) ;
276276 if ( ! fs . existsSync ( packageJSONPath ) ) {
277277 continue ;
278278 }
279279 let packageJSON = JSON . parse ( fs . readFileSync ( packageJSONPath ) . toString ( 'utf8' ) ) ;
280- if ( forWeb && ! isWebExtension ( packageJSON ) ) {
280+ if ( ! isWebExtension ( packageJSON ) ) {
281281 continue ;
282282 }
283283 const children = fs . readdirSync ( path . join ( extensionsRoot , extensionFolder ) ) ;
Original file line number Diff line number Diff line change @@ -338,21 +338,21 @@ export interface IScannedBuiltinExtension {
338338 changelogPath ?: string ;
339339}
340340
341- export function scanBuiltinExtensions ( extensionsRoot : string , forWeb : boolean ) : IScannedBuiltinExtension [ ] {
341+ export function scanBuiltinExtensions ( extensionsRoot : string , exclude : string [ ] = [ ] ) : IScannedBuiltinExtension [ ] {
342342 const scannedExtensions : IScannedBuiltinExtension [ ] = [ ] ;
343343
344344 try {
345345 const extensionsFolders = fs . readdirSync ( extensionsRoot ) ;
346346 for ( const extensionFolder of extensionsFolders ) {
347- if ( extensionFolder === 'vscode-web-playground' ) {
348- // never inline vscode-web-playground (even if it was packaged)
347+ if ( exclude . indexOf ( extensionFolder ) >= 0 ) {
348+ continue ;
349349 }
350350 const packageJSONPath = path . join ( extensionsRoot , extensionFolder , 'package.json' ) ;
351351 if ( ! fs . existsSync ( packageJSONPath ) ) {
352352 continue ;
353353 }
354354 let packageJSON = JSON . parse ( fs . readFileSync ( packageJSONPath ) . toString ( 'utf8' ) ) ;
355- if ( forWeb && ! isWebExtension ( packageJSON ) ) {
355+ if ( ! isWebExtension ( packageJSON ) ) {
356356 continue ;
357357 }
358358 const children = fs . readdirSync ( path . join ( extensionsRoot , extensionFolder ) ) ;
Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ async function getBuiltInExtensionInfos() {
7171 const locations = { } ;
7272
7373 const [ localExtensions , marketplaceExtensions ] = await Promise . all ( [
74- extensions . scanBuiltinExtensions ( BUILTIN_EXTENSIONS_ROOT , true ) ,
75- extensions . scanBuiltinExtensions ( BUILTIN_MARKETPLACE_EXTENSIONS_ROOT , true ) ,
74+ extensions . scanBuiltinExtensions ( BUILTIN_EXTENSIONS_ROOT ) ,
75+ extensions . scanBuiltinExtensions ( BUILTIN_MARKETPLACE_EXTENSIONS_ROOT ) ,
7676 ] ) ;
7777 for ( const ext of localExtensions ) {
7878 allExtensions . push ( ext ) ;
You can’t perform that action at this time.
0 commit comments