Skip to content

Commit 59391f4

Browse files
authored
Merge branch 'master' into patch-1
2 parents e7f9230 + 8b0f436 commit 59391f4

358 files changed

Lines changed: 8144 additions & 3447 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/tasks.json

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,6 @@
3131
}
3232
}
3333
},
34-
{
35-
"type": "npm",
36-
"script": "strict-function-types-watch",
37-
"label": "TS - Strict Function Types",
38-
"isBackground": true,
39-
"presentation": {
40-
"reveal": "never"
41-
},
42-
"problemMatcher": {
43-
"base": "$tsc-watch",
44-
"owner": "typescript-function-types",
45-
"applyTo": "allDocuments"
46-
}
47-
},
4834
{
4935
"label": "Run tests",
5036
"type": "shell",

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ please see the document [How to Contribute](https://github.com/Microsoft/vscode/
4444

4545
* Ask a question on [Stack Overflow](https://stackoverflow.com/questions/tagged/vscode)
4646
* [Request a new feature](CONTRIBUTING.md)
47-
* Up vote [popular feature requests](https://github.com/Microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request+sort%3Areactions-%2B1-desc)
47+
* Upvote [popular feature requests](https://github.com/Microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-request+sort%3Areactions-%2B1-desc)
4848
* [File an issue](https://github.com/Microsoft/vscode/issues)
4949
* Follow [@code](https://twitter.com/code) and let us know what you think!
5050

build/azure-pipelines/darwin/product-build-darwin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ steps:
207207
"toolVersion": "1.0"
208208
}
209209
]
210-
SessionTimeout: 120
210+
SessionTimeout: 60
211211
displayName: Notarization
212212

213213
- script: |

build/azure-pipelines/product-compile.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ steps:
116116
yarn gulp minify-vscode-reh-web
117117
displayName: Compile
118118
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
119+
env:
120+
OSS_GITHUB_ID: "a5d3c261b032765a78de"
121+
OSS_GITHUB_SECRET: $(oss-github-client-secret)
122+
INSIDERS_GITHUB_ID: "31f02627809389d9f111"
123+
INSIDERS_GITHUB_SECRET: $(insiders-github-client-secret)
119124

120125
- script: |
121126
set -e

build/builtInExtensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
},
4747
{
4848
"name": "ms-vscode.js-debug-nightly",
49-
"version": "2020.2.1317",
49+
"version": "2020.2.1417",
5050
"forQualities": [
5151
"insider"
5252
],

build/lib/compilation.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ function compileTask(src, out, build) {
7474
if (src === 'src') {
7575
generator.execute();
7676
}
77+
generateGitHubAuthConfig();
7778
return srcPipe
7879
.pipe(generator.stream)
7980
.pipe(compile())
@@ -96,6 +97,17 @@ function watchTask(out, build) {
9697
}
9798
exports.watchTask = watchTask;
9899
const REPO_SRC_FOLDER = path.join(__dirname, '../../src');
100+
function generateGitHubAuthConfig() {
101+
const schemes = ['OSS', 'INSIDERS'];
102+
let content = {};
103+
schemes.forEach(scheme => {
104+
content[scheme] = {
105+
id: process.env[`${scheme}_GITHUB_ID`],
106+
secret: process.env[`${scheme}_GITHUB_SECRET`]
107+
};
108+
});
109+
fs.writeFileSync(path.join(__dirname, '../../extensions/github-authentication/src/common/config.json'), JSON.stringify(content));
110+
}
99111
class MonacoGenerator {
100112
constructor(isWatch) {
101113
this._executeSoonTimer = null;

build/lib/compilation.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ export function compileTask(src: string, out: string, build: boolean): () => Nod
8888
generator.execute();
8989
}
9090

91+
generateGitHubAuthConfig();
92+
9193
return srcPipe
9294
.pipe(generator.stream)
9395
.pipe(compile())
@@ -115,6 +117,19 @@ export function watchTask(out: string, build: boolean): () => NodeJS.ReadWriteSt
115117

116118
const REPO_SRC_FOLDER = path.join(__dirname, '../../src');
117119

120+
function generateGitHubAuthConfig() {
121+
const schemes = ['OSS', 'INSIDERS'];
122+
let content: { [key: string]: { id?: string, secret?: string }} = {};
123+
schemes.forEach(scheme => {
124+
content[scheme] = {
125+
id: process.env[`${scheme}_GITHUB_ID`],
126+
secret: process.env[`${scheme}_GITHUB_SECRET`]
127+
};
128+
});
129+
130+
fs.writeFileSync(path.join(__dirname, '../../extensions/github-authentication/src/common/config.json'), JSON.stringify(content));
131+
}
132+
118133
class MonacoGenerator {
119134
private readonly _isWatch: boolean;
120135
public readonly stream: NodeJS.ReadWriteStream;

build/lib/i18n.resources.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@
302302
"name": "vs/workbench/services/textMate",
303303
"project": "vscode-workbench"
304304
},
305+
{
306+
"name": "vs/workbench/services/workingCopy",
307+
"project": "vscode-workbench"
308+
},
305309
{
306310
"name": "vs/workbench/services/workspaces",
307311
"project": "vscode-workbench"

extensions/configuration-editing/src/extension.ts

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { getLocation, parse, visit } from 'jsonc-parser';
77
import * as vscode from 'vscode';
88
import * as nls from 'vscode-nls';
99
import { SettingsDocument } from './settingsDocumentHelper';
10+
import { provideInstalledExtensionProposals } from './extensionsProposals';
1011
const localize = nls.loadMessageBundle();
1112

1213
export function activate(context: vscode.ExtensionContext): void {
@@ -80,7 +81,7 @@ function registerExtensionsCompletionsInExtensionsDocument(): vscode.Disposable
8081
const range = document.getWordRangeAtPosition(position) || new vscode.Range(position, position);
8182
if (location.path[0] === 'recommendations') {
8283
const extensionsContent = <IExtensionsContent>parse(document.getText());
83-
return provideInstalledExtensionProposals(extensionsContent, range);
84+
return provideInstalledExtensionProposals(extensionsContent && extensionsContent.recommendations || [], range, false);
8485
}
8586
return [];
8687
}
@@ -94,41 +95,13 @@ function registerExtensionsCompletionsInWorkspaceConfigurationDocument(): vscode
9495
const range = document.getWordRangeAtPosition(position) || new vscode.Range(position, position);
9596
if (location.path[0] === 'extensions' && location.path[1] === 'recommendations') {
9697
const extensionsContent = <IExtensionsContent>parse(document.getText())['extensions'];
97-
return provideInstalledExtensionProposals(extensionsContent, range);
98+
return provideInstalledExtensionProposals(extensionsContent && extensionsContent.recommendations || [], range, false);
9899
}
99100
return [];
100101
}
101102
});
102103
}
103104

104-
function provideInstalledExtensionProposals(extensionsContent: IExtensionsContent, range: vscode.Range): vscode.ProviderResult<vscode.CompletionItem[] | vscode.CompletionList> {
105-
const alreadyEnteredExtensions = extensionsContent && extensionsContent.recommendations || [];
106-
if (Array.isArray(alreadyEnteredExtensions)) {
107-
const knownExtensionProposals = vscode.extensions.all.filter(e =>
108-
!(e.id.startsWith('vscode.')
109-
|| e.id === 'Microsoft.vscode-markdown'
110-
|| alreadyEnteredExtensions.indexOf(e.id) > -1));
111-
if (knownExtensionProposals.length) {
112-
return knownExtensionProposals.map(e => {
113-
const item = new vscode.CompletionItem(e.id);
114-
const insertText = `"${e.id}"`;
115-
item.kind = vscode.CompletionItemKind.Value;
116-
item.insertText = insertText;
117-
item.range = range;
118-
item.filterText = insertText;
119-
return item;
120-
});
121-
} else {
122-
const example = new vscode.CompletionItem(localize('exampleExtension', "Example"));
123-
example.insertText = '"vscode.csharp"';
124-
example.kind = vscode.CompletionItemKind.Value;
125-
example.range = range;
126-
return [example];
127-
}
128-
}
129-
return undefined;
130-
}
131-
132105
vscode.languages.registerDocumentSymbolProvider({ pattern: '**/launch.json', language: 'jsonc' }, {
133106
provideDocumentSymbols(document: vscode.TextDocument, _token: vscode.CancellationToken): vscode.ProviderResult<vscode.SymbolInformation[]> {
134107
const result: vscode.SymbolInformation[] = [];
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
import * as vscode from 'vscode';
7+
import * as nls from 'vscode-nls';
8+
const localize = nls.loadMessageBundle();
9+
10+
11+
export function provideInstalledExtensionProposals(existing: string[], range: vscode.Range, includeBuiltinExtensions: boolean): vscode.ProviderResult<vscode.CompletionItem[] | vscode.CompletionList> {
12+
if (Array.isArray(existing)) {
13+
const extensions = includeBuiltinExtensions ? vscode.extensions.all : vscode.extensions.all.filter(e => !(e.id.startsWith('vscode.') || e.id === 'Microsoft.vscode-markdown'));
14+
const knownExtensionProposals = extensions.filter(e => existing.indexOf(e.id) === -1);
15+
if (knownExtensionProposals.length) {
16+
return knownExtensionProposals.map(e => {
17+
const item = new vscode.CompletionItem(e.id);
18+
const insertText = `"${e.id}"`;
19+
item.kind = vscode.CompletionItemKind.Value;
20+
item.insertText = insertText;
21+
item.range = range;
22+
item.filterText = insertText;
23+
return item;
24+
});
25+
} else {
26+
const example = new vscode.CompletionItem(localize('exampleExtension', "Example"));
27+
example.insertText = '"vscode.csharp"';
28+
example.kind = vscode.CompletionItemKind.Value;
29+
example.range = range;
30+
return [example];
31+
}
32+
}
33+
return undefined;
34+
}
35+

0 commit comments

Comments
 (0)