Skip to content

Commit

Permalink
Merge branch 'main' into joh/vscode-dts
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Nov 10, 2021
2 parents 68e8190 + bef4dba commit d90dd13
Show file tree
Hide file tree
Showing 124 changed files with 1,744 additions and 1,379 deletions.
2 changes: 1 addition & 1 deletion .yarnrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
disturl "https://electronjs.org/headers"
target "13.5.1"
target "13.5.2"
runtime "electron"
build_from_source "true"
2 changes: 1 addition & 1 deletion build/azure-pipelines/darwin/product-build-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ steps:
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH)
APP_NAME="`ls $APP_ROOT | head -n 1`"
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin" \
yarn smoketest-no-compile --build "$APP_ROOT/$APP_NAME" --remote --screenshots $(Build.SourcesDirectory)/.build/logs/smoke-tests
yarn smoketest-no-compile --build "$APP_ROOT/$APP_NAME" --remote --screenshots $(Build.SourcesDirectory)/.build/logs/smoke-tests-remote
timeoutInMinutes: 5
displayName: Run smoke tests (Remote)
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/linux/product-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ steps:
set -e
APP_PATH=$(agent.builddirectory)/VSCode-linux-$(VSCODE_ARCH)
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-linux-$(VSCODE_ARCH)" \
yarn smoketest-no-compile --build "$APP_PATH" --remote --electronArgs="--disable-dev-shm-usage --use-gl=swiftshader" --screenshots $(Build.SourcesDirectory)/.build/logs/smoke-tests
yarn smoketest-no-compile --build "$APP_PATH" --remote --electronArgs="--disable-dev-shm-usage --use-gl=swiftshader" --screenshots $(Build.SourcesDirectory)/.build/logs/smoke-tests-remote
timeoutInMinutes: 5
displayName: Run smoke tests (Remote)
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/win32/product-build-win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ steps:
$ErrorActionPreference = "Stop"
$AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
$env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"
exec { yarn smoketest-no-compile --build "$AppRoot" --remote }
exec { yarn smoketest-no-compile --build "$AppRoot" --remote --screenshots $(Build.SourcesDirectory)\.build\logs\smoke-tests-remote }
displayName: Run smoke tests (Remote)
timeoutInMinutes: 5
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
Expand Down
8 changes: 4 additions & 4 deletions build/lib/eslint/vscode-dts-region-comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ module.exports = new class ApiEventNaming {
constructor() {
this.meta = {
messages: {
comment: 'region comments should start with the GH issue link, e.g #region https://github.com/microsoft/vscode/issues/<number>',
comment: 'region comments should start with a camel case identifier, `:`, then either a GH issue link or owner, e.g #region myProposalName: https://github.com/microsoft/vscode/issues/<number>',
}
};
}
create(context) {
const sourceCode = context.getSourceCode();
return {
['Program']: (_node) => {
for (let comment of sourceCode.getAllComments()) {
for (const comment of sourceCode.getAllComments()) {
if (comment.type !== 'Line') {
continue;
}
if (!comment.value.match(/^\s*#region /)) {
if (!/^\s*#region /.test(comment.value)) {
continue;
}
if (!comment.value.match(/https:\/\/github.com\/microsoft\/vscode\/issues\/\d+/i)) {
if (!/^\s*#region ([a-z]+): (@[a-z]+|https:\/\/github.com\/microsoft\/vscode\/issues\/\d+)/i.test(comment.value)) {
context.report({
node: comment,
messageId: 'comment',
Expand Down
10 changes: 4 additions & 6 deletions build/lib/eslint/vscode-dts-region-comments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,24 @@ export = new class ApiEventNaming implements eslint.Rule.RuleModule {

readonly meta: eslint.Rule.RuleMetaData = {
messages: {
comment: 'region comments should start with the GH issue link, e.g #region https://github.com/microsoft/vscode/issues/<number>',
comment: 'region comments should start with a camel case identifier, `:`, then either a GH issue link or owner, e.g #region myProposalName: https://github.com/microsoft/vscode/issues/<number>',
}
};

create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {

const sourceCode = context.getSourceCode();


return {
['Program']: (_node: any) => {

for (let comment of sourceCode.getAllComments()) {
for (const comment of sourceCode.getAllComments()) {
if (comment.type !== 'Line') {
continue;
}
if (!comment.value.match(/^\s*#region /)) {
if (!/^\s*#region /.test(comment.value)) {
continue;
}
if (!comment.value.match(/https:\/\/github.com\/microsoft\/vscode\/issues\/\d+/i)) {
if (!/^\s*#region ([a-z]+): (@[a-z]+|https:\/\/github.com\/microsoft\/vscode\/issues\/\d+)/i.test(comment.value)) {
context.report({
node: <any>comment,
messageId: 'comment',
Expand Down
2 changes: 1 addition & 1 deletion build/monaco/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "monaco-editor-core",
"private": true,
"version": "0.29.2",
"version": "0.30.0",
"description": "A browser based code editor",
"author": "Microsoft Corporation",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion extensions/git/src/askpass.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
VSCODE_GIT_ASKPASS_PIPE=`mktemp`
ELECTRON_RUN_AS_NODE="1" VSCODE_GIT_ASKPASS_PIPE="$VSCODE_GIT_ASKPASS_PIPE" "$VSCODE_GIT_ASKPASS_NODE" "$VSCODE_GIT_ASKPASS_MAIN" $*
ELECTRON_RUN_AS_NODE="1" VSCODE_GIT_ASKPASS_PIPE="$VSCODE_GIT_ASKPASS_PIPE" "$VSCODE_GIT_ASKPASS_NODE" "$VSCODE_GIT_ASKPASS_EXTRA_ARGS" "$VSCODE_GIT_ASKPASS_MAIN" $*
cat $VSCODE_GIT_ASKPASS_PIPE
rm $VSCODE_GIT_ASKPASS_PIPE
1 change: 1 addition & 0 deletions extensions/git/src/askpass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export class Askpass implements IIPCHandler {
...this.ipc.getEnv(),
GIT_ASKPASS: path.join(__dirname, 'askpass.sh'),
VSCODE_GIT_ASKPASS_NODE: process.execPath,
VSCODE_GIT_ASKPASS_EXTRA_ARGS: (process.versions['electron'] && process.versions['microsoft-build']) ? '--ms-enable-electron-run-as-node' : '',
VSCODE_GIT_ASKPASS_MAIN: path.join(__dirname, 'askpass-main.js')
};
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/git/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export class Model implements IRemoteSourceProviderRegistry, IPushErrorHandlerRe
const repository = new Repository(this.git.open(repositoryRoot, dotGit), this, this, this.globalState, this.outputChannel);

this.open(repository);
await repository.status();
repository.status(); // do not await this, we want SCM to know about the repo asap
} catch (ex) {
// noop
this.outputChannel.appendLine(`Opening repository for path='${repoPath}' failed; ex=${ex}`);
Expand Down
5 changes: 0 additions & 5 deletions extensions/markdown-language-features/notebook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ export const activate: ActivationFunction<void> = (ctx) => {

const style = document.createElement('style');
style.textContent = `
#preview {
font-size: 1.1em;
}
.emptyMarkdownCell::before {
content: "${document.documentElement.style.getPropertyValue('--notebook-cell-markup-empty-content')}";
font-style: italic;
Expand Down Expand Up @@ -165,7 +161,6 @@ export const activate: ActivationFunction<void> = (ctx) => {
pre code {
font-family: var(--vscode-editor-font-family);
font-size: var(--vscode-editor-font-size);
line-height: 1.357em;
white-space: pre-wrap;
Expand Down
9 changes: 5 additions & 4 deletions extensions/markdown-language-features/src/features/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider {
private imageInfo: { readonly id: string, readonly width: number, readonly height: number; }[] = [];

private readonly _fileWatchersBySrc = new Map</* src: */ string, vscode.FileSystemWatcher>();

private readonly _onScrollEmitter = this._register(new vscode.EventEmitter<LastScrollLocation>());
public readonly onScroll = this._onScrollEmitter.event;

Expand Down Expand Up @@ -262,13 +263,13 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider {
* The first call immediately refreshes the preview,
* calls happening shortly thereafter are debounced.
*/
public refresh() {
public refresh(forceUpdate: boolean = false) {
// Schedule update if none is pending
if (!this.throttleTimer) {
if (this.firstUpdate) {
this.updatePreview(true);
} else {
this.throttleTimer = setTimeout(() => this.updatePreview(true), this.delay);
this.throttleTimer = setTimeout(() => this.updatePreview(forceUpdate), this.delay);
}
}

Expand Down Expand Up @@ -333,7 +334,7 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider {
return;
}

const shouldReloadPage = !this.currentVersion || this.currentVersion.resource.toString() !== pendingVersion.resource.toString();
const shouldReloadPage = forceUpdate || !this.currentVersion || this.currentVersion.resource.toString() !== pendingVersion.resource.toString();
this.currentVersion = pendingVersion;

const content = await (shouldReloadPage
Expand Down Expand Up @@ -429,7 +430,7 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider {
if (uri && uri.scheme === 'file' && !this._fileWatchersBySrc.has(src)) {
const watcher = vscode.workspace.createFileSystemWatcher(uri.fsPath);
watcher.onDidChange(() => {
this.refresh();
this.refresh(true);
});
this._fileWatchersBySrc.set(src, watcher);
}
Expand Down
11 changes: 7 additions & 4 deletions extensions/microsoft-authentication/src/AADHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ export class AzureActiveDirectoryService {
}

if (added.length || removed.length) {
Logger.info(`Sending change event with ${added.length} added and ${removed.length} removed`);
onDidChangeSessions.fire({ added: added, removed: removed, changed: [] });
}
}
Expand Down Expand Up @@ -380,7 +381,7 @@ export class AzureActiveDirectoryService {
throw codeRes.err;
}
token = await this.exchangeCodeForToken(codeRes.code, codeVerifier, scope);
this.setToken(token, scope);
await this.setToken(token, scope);
Logger.info(`Login successful for scopes: ${scope}`);
res.writeHead(302, { Location: '/' });
const session = await this.convertToSession(token);
Expand Down Expand Up @@ -491,7 +492,7 @@ export class AzureActiveDirectoryService {
}

const token = await this.exchangeCodeForToken(code, verifier, scope);
this.setToken(token, scope);
await this.setToken(token, scope);

const session = await this.convertToSession(token);
resolve(session);
Expand All @@ -509,6 +510,7 @@ export class AzureActiveDirectoryService {
}

private async setToken(token: IToken, scope: string): Promise<void> {
Logger.info(`Setting token for scopes: ${scope}`);
const existingTokenIndex = this._tokens.findIndex(t => t.sessionId === token.sessionId);
if (existingTokenIndex > -1) {
this._tokens.splice(existingTokenIndex, 1, token);
Expand All @@ -522,6 +524,7 @@ export class AzureActiveDirectoryService {
this._refreshTimeouts.set(token.sessionId, setTimeout(async () => {
try {
const refreshedToken = await this.refreshToken(token.refreshToken, scope, token.sessionId);
Logger.info('Triggering change session event...');
onDidChangeSessions.fire({ added: [], removed: [], changed: [this.convertToSessionSync(refreshedToken)] });
} catch (e) {
if (e.message === REFRESH_NETWORK_FAILURE) {
Expand All @@ -537,7 +540,7 @@ export class AzureActiveDirectoryService {
}, 1000 * (token.expiresIn - 30)));
}

this.storeTokenData();
await this.storeTokenData();
}

private getTokenFromResponse(json: ITokenResponse, scope: string, existingId?: string): IToken {
Expand Down Expand Up @@ -649,7 +652,7 @@ export class AzureActiveDirectoryService {
if (result.ok) {
const json = await result.json();
const token = this.getTokenFromResponse(json, scope, sessionId);
this.setToken(token, scope);
await this.setToken(token, scope);
Logger.info(`Token refresh success for scopes: ${token.scope}`);
return token;
} else {
Expand Down
4 changes: 4 additions & 0 deletions extensions/vscode-test-resolver/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ export function activate(context: vscode.ExtensionContext) {
const commandArgs = ['--port=0', '--disable-telemetry'];
const env = getNewEnv();
const remoteDataDir = process.env['TESTRESOLVER_DATA_FOLDER'] || path.join(os.homedir(), serverDataFolderName || `${dataFolderName}-testresolver`);
const logsDir = process.env['TESTRESOLVER_LOGS_FOLDER'];
if (logsDir) {
commandArgs.push('--logsPath', logsDir);
}

env['VSCODE_AGENT_FOLDER'] = remoteDataDir;
outputChannel.appendLine(`Using data folder at ${remoteDataDir}`);
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.63.0",
"distro": "f4a21145f5ec390f681f48c7140bf4f60d2987ac",
"distro": "cc8976e5470edb06e4b3abd29841ffe7bf5042d2",
"author": {
"name": "Microsoft Corporation"
},
Expand Down Expand Up @@ -59,7 +59,7 @@
},
"dependencies": {
"@microsoft/applicationinsights-web": "^2.6.4",
"@parcel/watcher": "2.0.0",
"@parcel/watcher": "2.0.1",
"@vscode/sqlite3": "4.0.12",
"@vscode/vscode-languagedetection": "1.0.21",
"applicationinsights": "1.0.8",
Expand All @@ -84,12 +84,12 @@
"vscode-regexpp": "^3.1.0",
"vscode-ripgrep": "^1.12.1",
"vscode-textmate": "5.4.1",
"xterm": "4.15.0-beta.10",
"xterm-addon-search": "0.9.0-beta.5",
"xterm-addon-serialize": "0.7.0-beta.2",
"xterm-addon-unicode11": "0.3.0",
"xterm-addon-webgl": "0.12.0-beta.15",
"xterm-headless": "4.15.0-beta.10",
"xterm": "4.16.0-beta.2",
"xterm-addon-search": "0.9.0-beta.6",
"xterm-addon-serialize": "0.7.0-beta.3",
"xterm-addon-unicode11": "0.4.0-beta.1",
"xterm-addon-webgl": "0.12.0-beta.16",
"xterm-headless": "4.16.0-beta.2",
"yauzl": "^2.9.2",
"yazl": "^2.4.3"
},
Expand Down
14 changes: 7 additions & 7 deletions remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"@microsoft/applicationinsights-web": "^2.6.4",
"@parcel/watcher": "2.0.0",
"@parcel/watcher": "2.0.1",
"@vscode/vscode-languagedetection": "1.0.21",
"applicationinsights": "1.0.8",
"cookie": "^0.4.0",
Expand All @@ -24,12 +24,12 @@
"vscode-regexpp": "^3.1.0",
"vscode-ripgrep": "^1.12.1",
"vscode-textmate": "5.4.1",
"xterm": "4.15.0-beta.10",
"xterm-addon-search": "0.9.0-beta.5",
"xterm-addon-serialize": "0.7.0-beta.2",
"xterm-addon-unicode11": "0.3.0",
"xterm-addon-webgl": "0.12.0-beta.15",
"xterm-headless": "4.15.0-beta.10",
"xterm": "4.16.0-beta.2",
"xterm-addon-search": "0.9.0-beta.6",
"xterm-addon-serialize": "0.7.0-beta.3",
"xterm-addon-unicode11": "0.4.0-beta.1",
"xterm-addon-webgl": "0.12.0-beta.16",
"xterm-headless": "4.16.0-beta.2",
"yauzl": "^2.9.2",
"yazl": "^2.4.3"
},
Expand Down
8 changes: 4 additions & 4 deletions remote/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"tas-client-umd": "0.1.4",
"vscode-oniguruma": "1.5.1",
"vscode-textmate": "5.4.1",
"xterm": "4.15.0-beta.10",
"xterm-addon-search": "0.9.0-beta.5",
"xterm-addon-unicode11": "0.3.0",
"xterm-addon-webgl": "0.12.0-beta.15"
"xterm": "4.16.0-beta.2",
"xterm-addon-search": "0.9.0-beta.6",
"xterm-addon-unicode11": "0.4.0-beta.1",
"xterm-addon-webgl": "0.12.0-beta.16"
}
}
38 changes: 19 additions & 19 deletions remote/web/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -113,22 +113,22 @@ vscode-textmate@5.4.1:
resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-5.4.1.tgz#09d566724fc76b60b3ad9791eebf1f0b50f29e5a"
integrity sha512-4CvPHmfuZQaXrcCpathdh6jo7myuR+MU8BvscgQADuponpbqfmu2rwTOtCXhGwwEgStvJF8V4s9FwMKRVLNmKQ==

xterm-addon-search@0.9.0-beta.5:
version "0.9.0-beta.5"
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.5.tgz#e0e60a203d1c9d6c8af933648a46865dba299302"
integrity sha512-ylfqim0ISBvuuX83LQwgu/06p5GC545QsAo9SssXw03TPpIrcd0zwaVMEnhOftSIzM9EKRRsyx3GbBjgUdiF5w==

xterm-addon-unicode11@0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.3.0.tgz#e4435c3c91a5294a7eb8b79c380acbb28a659463"
integrity sha512-x5fHDZT2j9tlTlHnzPHt++9uKZ2kJ/lYQOj3L6xJA22xoJsS8UQRw/5YIFg2FUHqEAbV77Z1fZij/9NycMSH/A==

xterm-addon-webgl@0.12.0-beta.15:
version "0.12.0-beta.15"
resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.12.0-beta.15.tgz#9ae82127f2a39b3cb7f5ae45a6af223810c933d4"
integrity sha512-LWZ3iLspQOCc26OoT8qa+SuyuIcn2cAMRbBkinOuQCk4aW5kjovIrGovj9yVAcXNvOBnPm3sUqmnwGlN579kDA==

xterm@4.15.0-beta.10:
version "4.15.0-beta.10"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.15.0-beta.10.tgz#8cda3d7885e8345f2fc6cf9275a43f3833d29acf"
integrity sha512-valoh5ZcY/y7Pe+ffgcSAEFeuZfjzVeUUXcthdxTTsrGEiU1s4QR2EOg4U5jn5wye/Nc6mSfLW3s79R6Ac186w==
xterm-addon-search@0.9.0-beta.6:
version "0.9.0-beta.6"
resolved "https://registry.yarnpkg.com/xterm-addon-search/-/xterm-addon-search-0.9.0-beta.6.tgz#8b016baac5580dc0ba93bb52610bc4f5776d3b17"
integrity sha512-UAEzas4O+NrF7BSGf0C9N5ngAkmbtr/hSTFvLAM/Rw7EfLUatf8aLMqAWZTggRGMwDjuqR0GXJI4+e5QrJhQfw==

xterm-addon-unicode11@0.4.0-beta.1:
version "0.4.0-beta.1"
resolved "https://registry.yarnpkg.com/xterm-addon-unicode11/-/xterm-addon-unicode11-0.4.0-beta.1.tgz#aeefd26e87bad15d8dfd8a1e0b804fe408c9b882"
integrity sha512-pG8mpxnqpYDry0e20vuEFKhd4kKIcLLNwdNftNvfo+R/EjYRnTYnF+H8L+7eQHq6hqDH61xCEP4H4qR2CyT4pg==

xterm-addon-webgl@0.12.0-beta.16:
version "0.12.0-beta.16"
resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.12.0-beta.16.tgz#63a0f1f5be9e66286e035448e2011e3065769ad5"
integrity sha512-g6v3RegOhSsD9Zt8ArWBMNT30QyPUlIWEIvP/xLHAluUZ1S5sDjFyZDB0nJAyn9MwQozJpwb0ylYO1nznN/TzA==

xterm@4.16.0-beta.2:
version "4.16.0-beta.2"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-4.16.0-beta.2.tgz#251beef21a232143f272da74c7005bc4d832ca79"
integrity sha512-PD0agueJ7qvbn1/QhZriAQXf+ykaoPKgQN9qiIGf88VMxHs8T47MYHW/+qPsrXagTmbrENtncughTIzOzv8Q5Q==

0 comments on commit d90dd13

Please sign in to comment.