mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-25 04:36:23 +00:00
extensions: allow built-in extensions on different qualities (#89199)
Adds a new optional `forQualities` property to built-in extensions, and filters that as appropriate for different builds.
This commit is contained in:
@@ -10,6 +10,7 @@ const os = require('os');
|
||||
const { remote } = require('electron');
|
||||
const dialog = remote.dialog;
|
||||
|
||||
const productJsonPath = path.join(__dirname, '..', '..', 'product.json');
|
||||
const builtInExtensionsPath = path.join(__dirname, '..', 'builtInExtensions.json');
|
||||
const controlFilePath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions', 'control.json');
|
||||
|
||||
@@ -51,6 +52,7 @@ function render(el, state) {
|
||||
}
|
||||
|
||||
const ul = document.createElement('ul');
|
||||
const { quality } = readJson(productJsonPath);
|
||||
const { builtin, control } = state;
|
||||
|
||||
for (const ext of builtin) {
|
||||
@@ -61,6 +63,10 @@ function render(el, state) {
|
||||
|
||||
const name = document.createElement('code');
|
||||
name.textContent = ext.name;
|
||||
if (quality && ext.forQualities && !ext.forQualities.includes(quality)) {
|
||||
name.textContent += ` (only on ${ext.forQualities.join(', ')})`;
|
||||
}
|
||||
|
||||
li.appendChild(name);
|
||||
|
||||
const form = document.createElement('form');
|
||||
@@ -123,4 +129,4 @@ function main() {
|
||||
render(el, { builtin, control });
|
||||
}
|
||||
|
||||
window.onload = main;
|
||||
window.onload = main;
|
||||
|
||||
Reference in New Issue
Block a user