Skip to content

Commit

Permalink
Merge VS Code 1.31.1 (microsoft#4283)
Browse files Browse the repository at this point in the history
  • Loading branch information
MattIrv authored Mar 15, 2019
1 parent 7d31575 commit 86bac90
Show file tree
Hide file tree
Showing 1,716 changed files with 53,077 additions and 48,144 deletions.
3 changes: 1 addition & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# EditorConfig is awesome: http://EditorConfig.org
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Tab indentation
[*]
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true

# The indent size used in the `package.json` file cannot be changed
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.9.2
8
23 changes: 17 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,34 @@
"request": "launch",
"name": "Launch azuredatastudio",
"windows": {
"runtimeExecutable": "${workspaceFolder}/scripts/sql.bat"
"runtimeExecutable": "${workspaceFolder}/scripts/sql.bat",
"timeout": 20000
},
"osx": {
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh"
},
"linux": {
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh"
},
"breakOnLoad": false,
"urlFilter": "*workbench.html*",
"runtimeArgs": [
"--inspect=5875", "--no-cached-data"
"--inspect=5875",
"--no-cached-data"
],
"skipFiles": [
"**/winjs*.js"
"webRoot": "${workspaceFolder}"
},
{
"type": "node",
"request": "launch",
"name": "Launch ADS (Main Process)",
"runtimeExecutable": "${workspaceFolder}/scripts/sql.sh",
"runtimeArgs": [
"--no-cached-data"
],
"webRoot": "${workspaceFolder}",
"timeout": 45000
"outFiles": [
"${workspaceFolder}/out/**/*.js"
]
},
{
"type": "chrome",
Expand Down
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,7 @@
}, {
"fileMatch": [ "cglicenses.json" ],
"url": "./.vscode/cglicenses.schema.json"
}]
}
],
"git.ignoreLimitWarning": true
}
2 changes: 2 additions & 0 deletions .vscode/shared.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@
"description": "Insert Copyright Statement"
},
"TS -> Inject Service": {
"scope": "typescript",
"description": "Constructor Injection Pattern",
"prefix": "@inject",
"body": "@$1 private readonly _$2: ${1},$0"
},
"TS -> Event & Emitter": {
"scope": "typescript",
"prefix": "emitter",
"description": "Add emitter and event properties",
"body": [
Expand Down
2 changes: 1 addition & 1 deletion .yarnrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
disturl "https://atom.io/download/electron"
target "2.0.12"
target "3.1.2"
runtime "electron"
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ The built-in tool for reporting an issue, which you can access by using `Report

Please include the following with each issue.

* Version of Azure Data Studio (formerly SQL Operations Studio).
* Version of Azure Data Studio (formerly SQL Operations Studio)

* Your operating system

> **Tip:** You can easily create an issue using `Report Issues` from Azure Data Studio Help menu.
Expand Down
1 change: 0 additions & 1 deletion ThirdPartyNotices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2440,7 +2440,6 @@ General Public License.

-------------------------------START OF THIRD-PARTY NOTICES-------------------------------------------

===================================ExcelDataReader (BEGIN)
The MIT License (MIT)

Copyright (c) 2014 ExcelDataReader
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/linux/continuous-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ steps:
- script: |
set -e
sudo apt-get update
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 libgconf-2-4 dbus xvfb libgtk-3-0
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
sudo chmod +x /etc/init.d/xvfb
sudo update-rc.d xvfb defaults
Expand Down
2 changes: 1 addition & 1 deletion build/gulpfile.editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ gulp.task('extract-editor-src', ['clean-editor-src'], function () {
'vs/base/browser/ui/octiconLabel/octiconLabel': 'vs/base/browser/ui/octiconLabel/octiconLabel.mock',
},
shakeLevel: 2, // 0-Files, 1-InnerFile, 2-ClassMembers
importIgnorePattern: /^vs\/css!/,
importIgnorePattern: /(^vs\/css!)|(promise-polyfill\/polyfill)/,
destRoot: path.join(root, 'out-editor-src')
});
});
Expand Down
4 changes: 2 additions & 2 deletions build/gulpfile.hygiene.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const indentationFilter = [
'!src/vs/css.build.js',
'!src/vs/loader.js',
'!src/vs/base/common/marked/marked.js',
'!src/vs/base/common/winjs.base.js',
'!src/vs/base/node/terminateProcess.sh',
'!src/vs/base/node/cpuUsage.sh',
'!test/assert.js',
Expand Down Expand Up @@ -110,10 +109,12 @@ const copyrightFilter = [
'!**/*.opts',
'!**/*.disabled',
'!**/*.code-workspace',
'!**/promise-polyfill/polyfill.js',
'!build/**/*.init',
'!resources/linux/snap/snapcraft.yaml',
'!resources/linux/snap/electron-launch',
'!resources/win32/bin/code.js',
'!resources/completions/**',
'!extensions/markdown-language-features/media/highlight.css',
'!extensions/html-language-features/server/src/modes/typescript/*',
'!extensions/*/server/bin/*'
Expand All @@ -127,7 +128,6 @@ const eslintFilter = [
'!src/vs/nls.js',
'!src/vs/css.build.js',
'!src/vs/nls.build.js',
'!src/**/winjs.base.js',
'!src/**/marked.js',
'!**/test/**'
];
Expand Down
12 changes: 7 additions & 5 deletions build/gulpfile.vscode.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ gulp.task('optimize-vscode', ['clean-optimized-vscode', 'compile-build', 'compil


gulp.task('optimize-index-js', ['optimize-vscode'], () => {
const fullpath = path.join(process.cwd(), 'out-vscode/vs/code/electron-browser/workbench/workbench.js');
const fullpath = path.join(process.cwd(), 'out-vscode/bootstrap-window.js');
const contents = fs.readFileSync(fullpath).toString();
const newContents = contents.replace('[/*BUILD->INSERT_NODE_MODULES*/]', JSON.stringify(nodeModules));
fs.writeFileSync(fullpath, newContents);
Expand Down Expand Up @@ -164,7 +164,7 @@ const config = {
version: getElectronVersion(),
productAppName: product.nameLong,
companyName: 'Microsoft Corporation',
copyright: 'Copyright (C) 2018 Microsoft. All rights reserved',
copyright: 'Copyright (C) 2019 Microsoft. All rights reserved',
darwinIcon: 'resources/darwin/code.icns',
darwinBundleIdentifier: product.darwinBundleIdentifier,
darwinApplicationCategoryType: 'public.app-category.developer-tools',
Expand All @@ -180,13 +180,13 @@ const config = {
urlSchemes: [product.urlProtocol]
}],
darwinForceDarkModeSupport: true,
darwinCredits: darwinCreditsTemplate ? Buffer.from(darwinCreditsTemplate({ commit: commit, date: new Date().toISOString() })) : void 0,
darwinCredits: darwinCreditsTemplate ? Buffer.from(darwinCreditsTemplate({ commit: commit, date: new Date().toISOString() })) : undefined,
linuxExecutableName: product.applicationName,
winIcon: 'resources/win32/code.ico',
token: process.env['VSCODE_MIXIN_PASSWORD'] || process.env['GITHUB_TOKEN'] || void 0,
token: process.env['VSCODE_MIXIN_PASSWORD'] || process.env['GITHUB_TOKEN'] || undefined,

// @ts-ignore JSON checking: electronRepository is optional
repo: product.electronRepository || void 0
repo: product.electronRepository || undefined
};

function getElectron(arch) {
Expand Down Expand Up @@ -423,6 +423,8 @@ function packageTask(platform, arch, opts) {
.pipe(electron(_.extend({}, config, { platform, arch, ffmpegChromium: true })))
.pipe(filter(['**', '!LICENSE', '!LICENSES.chromium.html', '!version']));

// result = es.merge(result, gulp.src('resources/completions/**', { base: '.' }));

if (platform === 'win32') {
result = es.merge(result, gulp.src('resources/win32/bin/code.js', { base: 'resources/win32' }));

Expand Down
27 changes: 19 additions & 8 deletions build/gulpfile.vscode.linux.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ const util = require('./lib/util');
const packageJson = require('../package.json');
const product = require('../product.json');
const rpmDependencies = require('../resources/linux/rpm/dependencies.json');
const path = require('path');
const root = path.dirname(__dirname);
const commit = util.getVersion(root);

const linuxPackageRevision = Math.floor(new Date().getTime() / 1000);

Expand Down Expand Up @@ -51,6 +54,12 @@ function prepareDebPackage(arch) {
const icon = gulp.src('resources/linux/code.png', { base: '.' })
.pipe(rename('usr/share/pixmaps/' + product.applicationName + '.png'));

// const bash_completion = gulp.src('resources/completions/bash/code')
// .pipe(rename('usr/share/bash-completion/completions/code'));

// const zsh_completion = gulp.src('resources/completions/zsh/_code')
// .pipe(rename('usr/share/zsh/vendor-completions/_code'));

const code = gulp.src(binaryDir + '/**/*', { base: binaryDir })
.pipe(rename(function (p) { p.dirname = 'usr/share/' + product.applicationName + '/' + p.dirname; }));

Expand Down Expand Up @@ -85,7 +94,7 @@ function prepareDebPackage(arch) {
.pipe(replace('@@UPDATEURL@@', product.updateUrl || '@@UPDATEURL@@'))
.pipe(rename('DEBIAN/postinst'));

const all = es.merge(control, postinst, postrm, prerm, desktops, appdata, icon, code);
const all = es.merge(control, postinst, postrm, prerm, desktops, appdata, icon, /* bash_completion, zsh_completion, */ code);

return all.pipe(vfs.dest(destination));
};
Expand Down Expand Up @@ -136,6 +145,12 @@ function prepareRpmPackage(arch) {
const icon = gulp.src('resources/linux/code.png', { base: '.' })
.pipe(rename('BUILD/usr/share/pixmaps/' + product.applicationName + '.png'));

// const bash_completion = gulp.src('resources/completions/bash/code')
// .pipe(rename('BUILD/usr/share/bash-completion/completions/code'));

// const zsh_completion = gulp.src('resources/completions/zsh/_code')
// .pipe(rename('BUILD/usr/share/zsh/site-functions/_code'));

const code = gulp.src(binaryDir + '/**/*', { base: binaryDir })
.pipe(rename(function (p) { p.dirname = 'BUILD/usr/share/' + product.applicationName + '/' + p.dirname; }));

Expand All @@ -156,7 +171,7 @@ function prepareRpmPackage(arch) {
const specIcon = gulp.src('resources/linux/rpm/code.xpm', { base: '.' })
.pipe(rename('SOURCES/' + product.applicationName + '.xpm'));

const all = es.merge(code, desktops, appdata, icon, spec, specIcon);
const all = es.merge(code, desktops, appdata, icon, /* bash_completion, zsh_completion, */ spec, specIcon);

return all.pipe(vfs.dest(getRpmBuildPath(rpmArch)));
};
Expand Down Expand Up @@ -199,17 +214,13 @@ function prepareSnapPackage(arch) {

const snapcraft = gulp.src('resources/linux/snap/snapcraft.yaml', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(replace('@@VERSION@@', `${packageJson.version}-${linuxPackageRevision}`))
.pipe(replace('@@VERSION@@', commit.substr(0, 8)))
.pipe(rename('snap/snapcraft.yaml'));

const snapUpdate = gulp.src('resources/linux/snap/snapUpdate.sh', { base: '.' })
.pipe(replace('@@NAME@@', product.applicationName))
.pipe(rename(`usr/share/${product.applicationName}/snapUpdate.sh`));

const electronLaunch = gulp.src('resources/linux/snap/electron-launch', { base: '.' })
.pipe(rename('electron-launch'));

const all = es.merge(desktop, icon, code, snapcraft, electronLaunch, snapUpdate);
const all = es.merge(desktop, icon, code, snapcraft, electronLaunch);

return all.pipe(vfs.dest(destination));
};
Expand Down
14 changes: 14 additions & 0 deletions build/lib/compilation.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,20 @@ class MonacoGenerator {
this._declarationResolver.invalidateCache(moduleId);
this._executeSoon();
});
watcher.addListener('error', (err) => {
console.error(`Encountered error while watching ${filePath}.`);
console.log(err);
delete this._watchedFiles[filePath];
for (let i = 0; i < this._watchers.length; i++) {
if (this._watchers[i] === watcher) {
this._watchers.splice(i, 1);
break;
}
}
watcher.close();
this._declarationResolver.invalidateCache(moduleId);
this._executeSoon();
});
this._watchers.push(watcher);
};
this._fsProvider = new class extends monacodts.FSProvider {
Expand Down
14 changes: 14 additions & 0 deletions build/lib/compilation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,20 @@ class MonacoGenerator {
this._declarationResolver.invalidateCache(moduleId);
this._executeSoon();
});
watcher.addListener('error', (err) => {
console.error(`Encountered error while watching ${filePath}.`);
console.log(err);
delete this._watchedFiles[filePath];
for (let i = 0; i < this._watchers.length; i++) {
if (this._watchers[i] === watcher) {
this._watchers.splice(i, 1);
break;
}
}
watcher.close();
this._declarationResolver.invalidateCache(moduleId);
this._executeSoon();
});
this._watchers.push(watcher);
};
this._fsProvider = new class extends monacodts.FSProvider {
Expand Down
6 changes: 3 additions & 3 deletions build/lib/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ function getVersion(repo) {
head = fs.readFileSync(headPath, 'utf8').trim();
}
catch (e) {
return void 0;
return undefined;
}
if (/^[0-9a-f]{40}$/i.test(head)) {
return head;
}
const refMatch = /^ref: (.*)$/.exec(head);
if (!refMatch) {
return void 0;
return undefined;
}
const ref = refMatch[1];
const refPath = path.join(git, ref);
Expand All @@ -40,7 +40,7 @@ function getVersion(repo) {
refsRaw = fs.readFileSync(packedRefsPath, 'utf8').trim();
}
catch (e) {
return void 0;
return undefined;
}
const refsRegex = /^([0-9a-f]{40})\s+(.+)$/gm;
let refsMatch;
Expand Down
6 changes: 3 additions & 3 deletions build/lib/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function getVersion(repo: string): string | undefined {
try {
head = fs.readFileSync(headPath, 'utf8').trim();
} catch (e) {
return void 0;
return undefined;
}

if (/^[0-9a-f]{40}$/i.test(head)) {
Expand All @@ -28,7 +28,7 @@ export function getVersion(repo: string): string | undefined {
const refMatch = /^ref: (.*)$/.exec(head);

if (!refMatch) {
return void 0;
return undefined;
}

const ref = refMatch[1];
Expand All @@ -46,7 +46,7 @@ export function getVersion(repo: string): string | undefined {
try {
refsRaw = fs.readFileSync(packedRefsPath, 'utf8').trim();
} catch (e) {
return void 0;
return undefined;
}

const refsRegex = /^([0-9a-f]{40})\s+(.+)$/gm;
Expand Down
4 changes: 4 additions & 0 deletions build/lib/i18n.resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@
"name": "vs/workbench/services/decorations",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/services/label",
"project": "vscode-workbench"
},
{
"name": "vs/workbench/services/preferences",
"project": "vscode-preferences"
Expand Down
3 changes: 1 addition & 2 deletions build/lib/standalone.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ function createESMSourcesAndResources2(options) {
return path.join(OUT_RESOURCES_FOLDER, dest);
};
const allFiles = walkDirRecursive(SRC_FOLDER);
for (let i = 0; i < allFiles.length; i++) {
const file = allFiles[i];
for (const file of allFiles) {
if (options.ignores.indexOf(file.replace(/\\/g, '/')) >= 0) {
continue;
}
Expand Down
Loading

0 comments on commit 86bac90

Please sign in to comment.