introduce product.overrides.json

This commit is contained in:
Sandeep Somavarapu 2023-04-05 16:32:01 +02:00
parent 899cdd5ace
commit d8fccd8a92
No known key found for this signature in database
GPG Key ID: DD41CAAC8081CC7D
3 changed files with 11 additions and 2 deletions

1
.gitignore vendored
View File

@ -16,3 +16,4 @@ vscode.lsif
vscode.db
/.profile-oss
/cli/target
product.overrides.json

View File

@ -15,7 +15,11 @@ const nodeRequire = require;
globalThis._VSCODE_NODE_MODULES = new Proxy(Object.create(null), { get: (_target, mod) => nodeRequire(String(mod)) });
// VSCODE_GLOBALS: package/product.json
if (process.env['VSCODE_DEV']) {
globalThis._VSCODE_PRODUCT_JSON = Object.assign(require('../product.json'), require('../product.overrides.json'));
} else {
globalThis._VSCODE_PRODUCT_JSON = require('../product.json');
}
globalThis._VSCODE_PACKAGE_JSON = require('../package.json');
// @ts-ignore

View File

@ -117,7 +117,11 @@
if (!safeProcess.sandboxed) {
// VSCODE_GLOBALS: package/product.json
if (process.env['VSCODE_DEV']) {
globalThis._VSCODE_PRODUCT_JSON = Object.assign((require.__$__nodeRequire ?? require)(configuration.appRoot + '/product.json'), (require.__$__nodeRequire ?? require)(configuration.appRoot + '/product.overrides.json'));
} else {
globalThis._VSCODE_PRODUCT_JSON = (require.__$__nodeRequire ?? require)(configuration.appRoot + '/product.json');
}
globalThis._VSCODE_PACKAGE_JSON = (require.__$__nodeRequire ?? require)(configuration.appRoot + '/package.json');
}