mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
fixes #43973
This commit is contained in:
@@ -14,8 +14,7 @@ const builtInExtensionsPath = path.join(__dirname, '..', 'builtInExtensions.json
|
|||||||
const controlFilePath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions', 'control.json');
|
const controlFilePath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions', 'control.json');
|
||||||
|
|
||||||
function readJson(filePath) {
|
function readJson(filePath) {
|
||||||
//@ts-ignore review
|
return JSON.parse(fs.readFileSync(filePath, { encoding: 'utf8' }));
|
||||||
return JSON.parse(fs.readFileSync(filePath));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function writeJson(filePath, obj) {
|
function writeJson(filePath, obj) {
|
||||||
|
|||||||
@@ -94,11 +94,8 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||||||
sourceRoot: '../src'
|
sourceRoot: '../src'
|
||||||
}))
|
}))
|
||||||
.pipe(tsFilter.restore)
|
.pipe(tsFilter.restore)
|
||||||
// @ts-ignore review
|
|
||||||
.pipe(build ? nlsDev.createAdditionalLanguageFiles(languages, i18nPath, out) : es.through())
|
.pipe(build ? nlsDev.createAdditionalLanguageFiles(languages, i18nPath, out) : es.through())
|
||||||
// @ts-ignore review
|
|
||||||
.pipe(build ? nlsDev.bundleMetaDataFiles(headerId, headerOut) : es.through())
|
.pipe(build ? nlsDev.bundleMetaDataFiles(headerId, headerOut) : es.through())
|
||||||
// @ts-ignore review
|
|
||||||
.pipe(build ? nlsDev.bundleLanguageFiles() : es.through())
|
.pipe(build ? nlsDev.bundleLanguageFiles() : es.through())
|
||||||
.pipe(reporter.end(emitError));
|
.pipe(reporter.end(emitError));
|
||||||
|
|
||||||
@@ -146,8 +143,7 @@ const tasks = compilations.map(function (tsconfigFile) {
|
|||||||
const watchInput = watcher(src, srcOpts);
|
const watchInput = watcher(src, srcOpts);
|
||||||
|
|
||||||
return watchInput
|
return watchInput
|
||||||
// @ts-ignore review
|
.pipe(util.incremental(() => pipeline(), input))
|
||||||
.pipe(util.incremental(() => pipeline(true), input))
|
|
||||||
.pipe(gulp.dest(out));
|
.pipe(gulp.dest(out));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ const getElectronVersion = require('./lib/electron').getElectronVersion;
|
|||||||
const createAsar = require('./lib/asar').createAsar;
|
const createAsar = require('./lib/asar').createAsar;
|
||||||
|
|
||||||
const productionDependencies = deps.getProductionDependencies(path.dirname(__dirname));
|
const productionDependencies = deps.getProductionDependencies(path.dirname(__dirname));
|
||||||
//@ts-ignore review
|
// @ts-ignore
|
||||||
const baseModules = Object.keys(process.binding('natives')).filter(n => !/^_|\//.test(n));
|
const baseModules = Object.keys(process.binding('natives')).filter(n => !/^_|\//.test(n));
|
||||||
const nodeModules = ['electron', 'original-fs']
|
const nodeModules = ['electron', 'original-fs']
|
||||||
.concat(Object.keys(product.dependencies || {}))
|
.concat(Object.keys(product.dependencies || {}))
|
||||||
@@ -107,7 +107,6 @@ gulp.task('optimize-vscode', ['clean-optimized-vscode', 'compile-build', 'compil
|
|||||||
header: BUNDLED_FILE_HEADER,
|
header: BUNDLED_FILE_HEADER,
|
||||||
out: 'out-vscode',
|
out: 'out-vscode',
|
||||||
languages: languages,
|
languages: languages,
|
||||||
// @ts-ignore review
|
|
||||||
bundleInfo: undefined
|
bundleInfo: undefined
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@@ -250,7 +249,6 @@ function packageTask(platform, arch, opts) {
|
|||||||
// // TODO@Dirk: this filter / buffer is here to make sure the nls.json files are buffered
|
// // TODO@Dirk: this filter / buffer is here to make sure the nls.json files are buffered
|
||||||
.pipe(nlsFilter)
|
.pipe(nlsFilter)
|
||||||
.pipe(buffer())
|
.pipe(buffer())
|
||||||
//@ts-ignore review
|
|
||||||
.pipe(nlsDev.createAdditionalLanguageFiles(languages, path.join(__dirname, '..', 'i18n')))
|
.pipe(nlsDev.createAdditionalLanguageFiles(languages, path.join(__dirname, '..', 'i18n')))
|
||||||
.pipe(nlsFilter.restore);
|
.pipe(nlsFilter.restore);
|
||||||
}));
|
}));
|
||||||
@@ -303,7 +301,6 @@ function packageTask(platform, arch, opts) {
|
|||||||
.pipe(util.cleanNodeModule('native-is-elevated', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node']))
|
.pipe(util.cleanNodeModule('native-is-elevated', ['binding.gyp', 'build/**', 'src/**', 'deps/**'], ['**/*.node']))
|
||||||
.pipe(util.cleanNodeModule('native-watchdog', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node']))
|
.pipe(util.cleanNodeModule('native-watchdog', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node']))
|
||||||
.pipe(util.cleanNodeModule('spdlog', ['binding.gyp', 'build/**', 'deps/**', 'src/**', 'test/**'], ['**/*.node']))
|
.pipe(util.cleanNodeModule('spdlog', ['binding.gyp', 'build/**', 'deps/**', 'src/**', 'test/**'], ['**/*.node']))
|
||||||
//@ts-ignore review
|
|
||||||
.pipe(util.cleanNodeModule('jschardet', ['dist/**']))
|
.pipe(util.cleanNodeModule('jschardet', ['dist/**']))
|
||||||
.pipe(util.cleanNodeModule('windows-foreground-love', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node']))
|
.pipe(util.cleanNodeModule('windows-foreground-love', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node']))
|
||||||
.pipe(util.cleanNodeModule('windows-process-tree', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node']))
|
.pipe(util.cleanNodeModule('windows-process-tree', ['binding.gyp', 'build/**', 'src/**'], ['**/*.node']))
|
||||||
@@ -446,8 +443,7 @@ gulp.task('vscode-translations-pull', function () {
|
|||||||
gulp.task('vscode-translations-import', function () {
|
gulp.task('vscode-translations-import', function () {
|
||||||
[...i18n.defaultLanguages, ...i18n.extraLanguages].forEach(language => {
|
[...i18n.defaultLanguages, ...i18n.extraLanguages].forEach(language => {
|
||||||
gulp.src(`../vscode-localization/${language.id}/build/*/*.xlf`)
|
gulp.src(`../vscode-localization/${language.id}/build/*/*.xlf`)
|
||||||
//@ts-ignore review
|
.pipe(i18n.prepareI18nFiles())
|
||||||
.pipe(i18n.prepareI18nFiles(language))
|
|
||||||
.pipe(vfs.dest(`./i18n/${language.folderName}`));
|
.pipe(vfs.dest(`./i18n/${language.folderName}`));
|
||||||
gulp.src(`../vscode-localization/${language.id}/setup/*/*.xlf`)
|
gulp.src(`../vscode-localization/${language.id}/setup/*/*.xlf`)
|
||||||
.pipe(i18n.prepareIslFiles(language, innoSetupConfig[language.id]))
|
.pipe(i18n.prepareIslFiles(language, innoSetupConfig[language.id]))
|
||||||
@@ -478,8 +474,8 @@ gulp.task('upload-vscode-sourcemaps', ['minify-vscode'], () => {
|
|||||||
const allConfigDetailsPath = path.join(os.tmpdir(), 'configuration.json');
|
const allConfigDetailsPath = path.join(os.tmpdir(), 'configuration.json');
|
||||||
gulp.task('upload-vscode-configuration', ['generate-vscode-configuration'], () => {
|
gulp.task('upload-vscode-configuration', ['generate-vscode-configuration'], () => {
|
||||||
const branch = process.env.BUILD_SOURCEBRANCH;
|
const branch = process.env.BUILD_SOURCEBRANCH;
|
||||||
//@ts-ignore review
|
|
||||||
if (!branch.endsWith('/master') && branch.indexOf('/release/') < 0) {
|
if (!/\/master$/.test(branch) && branch.indexOf('/release/') < 0) {
|
||||||
console.log(`Only runs on master and release branches, not ${branch}`);
|
console.log(`Only runs on master and release branches, not ${branch}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,10 +32,9 @@ function isUpToDate(extension) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const packageContents = fs.readFileSync(packagePath);
|
const packageContents = fs.readFileSync(packagePath, { encoding: 'utf8' });
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//@ts-ignore review
|
|
||||||
const diskVersion = JSON.parse(packageContents).version;
|
const diskVersion = JSON.parse(packageContents).version;
|
||||||
return (diskVersion === extension.version);
|
return (diskVersion === extension.version);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
+1
-1
@@ -129,7 +129,7 @@ export function skipDirectories(): NodeJS.ReadWriteStream {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function cleanNodeModule(name: string, excludes: string[], includes: string[]): NodeJS.ReadWriteStream {
|
export function cleanNodeModule(name: string, excludes: string[], includes?: string[]): NodeJS.ReadWriteStream {
|
||||||
const toGlob = (path: string) => '**/node_modules/' + name + (path ? '/' + path : '');
|
const toGlob = (path: string) => '**/node_modules/' + name + (path ? '/' + path : '');
|
||||||
const negate = (str: string) => '!' + str;
|
const negate = (str: string) => '!' + str;
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ function watch(root) {
|
|||||||
path: path,
|
path: path,
|
||||||
base: root
|
base: root
|
||||||
});
|
});
|
||||||
//@ts-ignore review
|
//@ts-ignore
|
||||||
file.event = type;
|
file.event = type;
|
||||||
result.emit('data', file);
|
result.emit('data', file);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ function watch(root) {
|
|||||||
var child = cp.spawn(watcherPath, [root]);
|
var child = cp.spawn(watcherPath, [root]);
|
||||||
|
|
||||||
child.stdout.on('data', function (data) {
|
child.stdout.on('data', function (data) {
|
||||||
//@ts-ignore review
|
// @ts-ignore
|
||||||
var lines = data.toString('utf8').split('\n');
|
var lines = data.toString('utf8').split('\n');
|
||||||
for (var i = 0; i < lines.length; i++) {
|
for (var i = 0; i < lines.length; i++) {
|
||||||
var line = lines[i].trim();
|
var line = lines[i].trim();
|
||||||
@@ -47,7 +47,7 @@ function watch(root) {
|
|||||||
path: changePathFull,
|
path: changePathFull,
|
||||||
base: root
|
base: root
|
||||||
});
|
});
|
||||||
//@ts-ignore review
|
//@ts-ignore
|
||||||
file.event = toChangeType(changeType);
|
file.event = toChangeType(changeType);
|
||||||
result.emit('data', file);
|
result.emit('data', file);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ extensions.forEach(extension => yarnInstall(`extensions/${extension}`));
|
|||||||
function yarnInstallBuildDependencies() {
|
function yarnInstallBuildDependencies() {
|
||||||
// make sure we install the deps of build/lib/watch for the system installed
|
// make sure we install the deps of build/lib/watch for the system installed
|
||||||
// node, since that is the driver of gulp
|
// node, since that is the driver of gulp
|
||||||
//@ts-ignore review
|
//@ts-ignore
|
||||||
const env = Object.assign({}, process.env);
|
const env = Object.assign({}, process.env);
|
||||||
const watchPath = path.join(path.dirname(__dirname), 'lib', 'watch');
|
const watchPath = path.join(path.dirname(__dirname), 'lib', 'watch');
|
||||||
const yarnrcPath = path.join(watchPath, '.yarnrc');
|
const yarnrcPath = path.join(watchPath, '.yarnrc');
|
||||||
|
|||||||
Reference in New Issue
Block a user