diff --git a/build/gulpfile.editor.ts b/build/gulpfile.editor.ts index 394a2cf2b6d..e0ca982a569 100644 --- a/build/gulpfile.editor.ts +++ b/build/gulpfile.editor.ts @@ -279,7 +279,12 @@ export const monacoTypecheckWatchTask = task.define('monaco-typecheck-watch', cr export const monacoTypecheckTask = task.define('monaco-typecheck', createTscCompileTask(false)); //#endregion - +/** + * Sets a field on an object only if it's not already set, otherwise throws an error + * @param obj The object to modify + * @param field The field name to set + * @param value The value to set + */ function setUnsetField(obj: Record, field: string, value: unknown) { if (obj[field] !== undefined) { throw new Error(`Field "${field}" is already set (but was expected to not be).`); diff --git a/build/gulpfile.reh.ts b/build/gulpfile.reh.ts index 92427baf51c..cb1a0a5fd69 100644 --- a/build/gulpfile.reh.ts +++ b/build/gulpfile.reh.ts @@ -289,10 +289,11 @@ function packageTask(type: string, platform: string, arch: string, sourceFolderN return !isUIExtension(manifest); }).map((extensionPath) => path.basename(path.dirname(extensionPath))) .filter(name => name !== 'vscode-api-tests' && name !== 'vscode-test-resolver'); // Do not ship the test extensions - const marketplaceExtensions = JSON.parse(fs.readFileSync(path.join(REPO_ROOT, 'product.json'), 'utf8')).builtInExtensions - .filter((entry: { platforms?: string[]; clientOnly?: boolean }) => !entry.platforms || new Set(entry.platforms).has(platform)) - .filter((entry: { clientOnly?: boolean }) => !entry.clientOnly) - .map((entry: { name: string }) => entry.name); + const builtInExtensions: Array<{ name: string; platforms?: string[]; clientOnly?: boolean }> = JSON.parse(fs.readFileSync(path.join(REPO_ROOT, 'product.json'), 'utf8')).builtInExtensions; + const marketplaceExtensions = builtInExtensions + .filter(entry => !entry.platforms || new Set(entry.platforms).has(platform)) + .filter(entry => !entry.clientOnly) + .map(entry => entry.name); const extensionPaths = [...localWorkspaceExtensions, ...marketplaceExtensions] .map(name => `.build/extensions/${name}/**`); diff --git a/build/lib/typings/@vscode/gulp-electron.d.ts b/build/lib/typings/@vscode/gulp-electron.d.ts index ef47934eb98..aaf1b861a87 100644 --- a/build/lib/typings/@vscode/gulp-electron.d.ts +++ b/build/lib/typings/@vscode/gulp-electron.d.ts @@ -1,8 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + declare module '@vscode/gulp-electron' { interface MainFunction { (options: any): NodeJS.ReadWriteStream; - dest(destination: string, options: any): NodeJS.ReadWriteStream; } diff --git a/build/lib/typings/gulp-untar.d.ts b/build/lib/typings/gulp-untar.d.ts index 7b43fd52a01..b4007983cac 100644 --- a/build/lib/typings/gulp-untar.d.ts +++ b/build/lib/typings/gulp-untar.d.ts @@ -6,9 +6,6 @@ declare module 'gulp-untar' { import type { Transform } from 'stream'; - /** - * Extract TAR files - */ function untar(): Transform; export = untar; diff --git a/build/lib/typings/rcedit.d.ts b/build/lib/typings/rcedit.d.ts index 50a6ba7fb8f..e18d3f93584 100644 --- a/build/lib/typings/rcedit.d.ts +++ b/build/lib/typings/rcedit.d.ts @@ -1,5 +1,8 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ declare module 'rcedit' { - export default function rcedit(exePath, options, cb): Promise; }