mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
Do not inline vscode-web-playground (even if it is packaged)
This commit is contained in:
@@ -191,7 +191,7 @@ function fromMarketplace(extensionName, version, metadata) {
|
||||
.pipe(packageJsonFilter.restore);
|
||||
}
|
||||
exports.fromMarketplace = fromMarketplace;
|
||||
const excludedCommonExtensions = [
|
||||
const excludedExtensions = [
|
||||
'vscode-api-tests',
|
||||
'vscode-colorize-tests',
|
||||
'vscode-test-resolver',
|
||||
@@ -200,10 +200,6 @@ const excludedCommonExtensions = [
|
||||
'vscode-notebook-tests',
|
||||
'vscode-custom-editor-tests',
|
||||
];
|
||||
const excludedDesktopExtensions = excludedCommonExtensions.concat([
|
||||
'vscode-web-playground',
|
||||
]);
|
||||
const excludedWebExtensions = excludedCommonExtensions.concat([]);
|
||||
const marketplaceWebExtensions = [
|
||||
'ms-vscode.references-view'
|
||||
];
|
||||
@@ -221,7 +217,6 @@ function isWebExtension(manifest) {
|
||||
return (!Boolean(manifest.main) || Boolean(manifest.browser));
|
||||
}
|
||||
function packageLocalExtensionsStream(forWeb) {
|
||||
const excludedLocalExtensions = (forWeb ? excludedWebExtensions : excludedDesktopExtensions);
|
||||
const localExtensionsDescriptions = (glob.sync('extensions/*/package.json')
|
||||
.map(manifestPath => {
|
||||
const absoluteManifestPath = path.join(root, manifestPath);
|
||||
@@ -229,7 +224,8 @@ function packageLocalExtensionsStream(forWeb) {
|
||||
const extensionName = path.basename(extensionPath);
|
||||
return { name: extensionName, path: extensionPath, manifestPath: absoluteManifestPath };
|
||||
})
|
||||
.filter(({ name }) => excludedLocalExtensions.indexOf(name) === -1)
|
||||
.filter(({ name }) => (name === 'vscode-web-playground' ? forWeb : true)) // package vscode-web-playground only for web
|
||||
.filter(({ name }) => excludedExtensions.indexOf(name) === -1)
|
||||
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
||||
.filter(({ manifestPath }) => (forWeb ? isWebExtension(require(manifestPath)) : true)));
|
||||
const localExtensionsStream = minifyExtensionResources(es.merge(...localExtensionsDescriptions.map(extension => {
|
||||
@@ -273,6 +269,9 @@ function scanBuiltinExtensions(extensionsRoot, forWeb) {
|
||||
try {
|
||||
const extensionsFolders = fs.readdirSync(extensionsRoot);
|
||||
for (const extensionFolder of extensionsFolders) {
|
||||
if (extensionFolder === 'vscode-web-playground') {
|
||||
// never inline vscode-web-playground (even if it was packaged)
|
||||
}
|
||||
const packageJSONPath = path.join(extensionsRoot, extensionFolder, 'package.json');
|
||||
if (!fs.existsSync(packageJSONPath)) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user