Skip to content

Commit

Permalink
Merge branch 'master' into pr/90952
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Aug 9, 2020
2 parents 43d5d68 + 6d913c4 commit c466365
Show file tree
Hide file tree
Showing 124 changed files with 1,862 additions and 853 deletions.
5 changes: 3 additions & 2 deletions .vscode/notebooks/verification.github-issues
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{
"kind": 2,
"language": "github-issues",
"value": "$repos=repo:microsoft/vscode repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-remote-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks \n$milestone=milestone:\"June 2020\"",
"value": "$repos=repo:microsoft/vscode repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-remote-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks \n$milestone=milestone:\"July 2020\"",
"editable": true
},
{
Expand Down Expand Up @@ -44,7 +44,8 @@
{
"kind": 1,
"language": "markdown",
"value": "### All"
"value": "### All",
"editable": true
},
{
"kind": 2,
Expand Down
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
},
{
"type": "shell",
"command": "node build/lib/prelaunch.js",
"command": "node build/lib/preLaunch.js",
"label": "Ensure Prelaunch Dependencies",
"presentation": {
"reveal": "silent"
Expand Down
14 changes: 13 additions & 1 deletion build/azure-pipelines/publish-types/update-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ function updateDTSFile(outPath: string, tag: string) {
fs.writeFileSync(outPath, newContent);
}

function repeat(str: string, times: number): string {
const result = new Array(times);
for (let i = 0; i < times; i++) {
result[i] = str;
}
return result.join('');
}

function convertTabsToSpaces(str: string): string {
return str.replace(/^\t+/gm, value => repeat(' ', value.length));
}

function getNewFileContent(content: string, tag: string) {
const oldheader = [
`/*---------------------------------------------------------------------------------------------`,
Expand All @@ -44,7 +56,7 @@ function getNewFileContent(content: string, tag: string) {
` *--------------------------------------------------------------------------------------------*/`
].join('\n');

return getNewFileHeader(tag) + content.slice(oldheader.length);
return convertTabsToSpaces(getNewFileHeader(tag) + content.slice(oldheader.length));
}

function getNewFileHeader(tag: string) {
Expand Down
6 changes: 4 additions & 2 deletions build/lib/builtInExtensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ const fancyLog = require('fancy-log');
const ansiColors = require('ansi-colors');

const root = path.dirname(path.dirname(__dirname));
const builtInExtensions = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8')).builtInExtensions;
const productjson = JSON.parse(fs.readFileSync(path.join(__dirname, '../../product.json'), 'utf8'));
const builtInExtensions = productjson.builtInExtensions;
const webBuiltInExtensions = productjson.webBuiltInExtensions;
const controlFilePath = path.join(os.homedir(), '.vscode-oss-dev', 'extensions', 'control.json');
const ENABLE_LOGGING = !process.env['VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE'];

Expand Down Expand Up @@ -107,7 +109,7 @@ exports.getBuiltInExtensions = function getBuiltInExtensions() {
const control = readControlFile();
const streams = [];

for (const extension of builtInExtensions) {
for (const extension of [...builtInExtensions, ...webBuiltInExtensions]) {
let controlState = control[extension.name] || 'marketplace';
control[extension.name] = controlState;

Expand Down
2 changes: 1 addition & 1 deletion build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"minimist": "^1.2.3",
"request": "^2.85.0",
"terser": "4.3.8",
"typescript": "^4.0.0-dev.20200729",
"typescript": "^4.0.0-dev.20200803",
"vsce": "1.48.0",
"vscode-telemetry-extractor": "^1.6.0",
"xml2js": "^0.4.17"
Expand Down
8 changes: 4 additions & 4 deletions build/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2535,10 +2535,10 @@ typescript@^3.0.1:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977"
integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==

typescript@^4.0.0-dev.20200729:
version "4.0.0-dev.20200729"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.0-dev.20200729.tgz#3e335af3ed54513bbfd9485799837b95bdfd15a0"
integrity sha512-jzPalday93NlFVuRkY7Vixd7I9dLKoefoB2dvIhoqWaAGc5WPbOQmCHOilEGPSXNd9gb+uy97RH6+EwM/cf1gQ==
typescript@^4.0.0-dev.20200803:
version "4.0.0-dev.20200803"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.0-dev.20200803.tgz#ea8b0e9fb2ee3085598ff200c8568f04f4cbb2ba"
integrity sha512-f/jDkFqCs0gbUd5MCUijO9u3AOMx1x1HdRDDHSidlc6uPVEkRduxjeTFhIXbGutO7ivzv+aC2sxH+1FQwsyBcg==

typical@^4.0.0:
version "4.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ export class SettingsDocument {
});
}

// sync.ignoredExtensions
if (location.path[0] === 'sync.ignoredExtensions') {
// settingsSync.ignoredExtensions
if (location.path[0] === 'settingsSync.ignoredExtensions') {
let ignoredExtensions = [];
try {
ignoredExtensions = parse(this.document.getText())['sync.ignoredExtensions'];
ignoredExtensions = parse(this.document.getText())['settingsSync.ignoredExtensions'];
} catch (e) {/* ignore error */ }
return provideInstalledExtensionProposals(ignoredExtensions, range, true);
}
Expand Down
5 changes: 5 additions & 0 deletions extensions/git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1501,6 +1501,11 @@
"description": "%config.ignoreMissingGitWarning%",
"default": false
},
"git.ignoreWindowsGit27Warning": {
"type": "boolean",
"description": "%config.ignoreWindowsGit27Warning%",
"default": false
},
"git.ignoreLimitWarning": {
"type": "boolean",
"description": "%config.ignoreLimitWarning%",
Expand Down
1 change: 1 addition & 0 deletions extensions/git/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"config.branchWhitespaceChar": "The character to replace whitespace in new branch names.",
"config.ignoreLegacyWarning": "Ignores the legacy Git warning.",
"config.ignoreMissingGitWarning": "Ignores the warning when Git is missing.",
"config.ignoreWindowsGit27Warning": "Ignores the warning when Git 2.25 - 2.26 is installed on Windows.",
"config.ignoreLimitWarning": "Ignores the warning when there are too many changes in a repository.",
"config.defaultCloneDirectory": "The default location to clone a git repository.",
"config.enableSmartCommit": "Commit all changes when there are no staged changes.",
Expand Down
13 changes: 12 additions & 1 deletion extensions/git/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,25 @@ async function checkGitWindows(info: IGit): Promise<void> {
return;
}

const config = workspace.getConfiguration('git');
const shouldIgnore = config.get<boolean>('ignoreWindowsGit27Warning') === true;

if (shouldIgnore) {
return;
}

const update = localize('updateGit', "Update Git");
const neverShowAgain = localize('neverShowAgain', "Don't Show Again");
const choice = await window.showWarningMessage(
localize('git2526', "There are known issues with the installed Git {0}. Please update to Git >= 2.27 for the git features to work correctly.", info.version),
update
update,
neverShowAgain
);

if (choice === update) {
commands.executeCommand('vscode.open', Uri.parse('https://git-scm.com/'));
} else if (choice === neverShowAgain) {
await config.update('ignoreWindowsGit27Warning', true, true);
}
}

Expand Down
18 changes: 9 additions & 9 deletions extensions/git/src/statusbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ class SyncStatusBar {
}

constructor(private repository: Repository, private remoteSourceProviderRegistry: IRemoteSourceProviderRegistry) {
this._state = {
enabled: true,
isSyncRunning: false,
hasRemotes: false,
HEAD: undefined,
remoteSourceProviders: this.remoteSourceProviderRegistry.getRemoteProviders()
.filter(p => !!p.publishRepository)
};

repository.onDidRunGitStatus(this.onDidRunGitStatus, this, this.disposables);
repository.onDidChangeOperations(this.onDidChangeOperations, this, this.disposables);

Expand All @@ -70,15 +79,6 @@ class SyncStatusBar {
const onEnablementChange = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git.enableStatusBarSync'));
onEnablementChange(this.updateEnablement, this, this.disposables);
this.updateEnablement();

this._state = {
enabled: true,
isSyncRunning: false,
hasRemotes: false,
HEAD: undefined,
remoteSourceProviders: this.remoteSourceProviderRegistry.getRemoteProviders()
.filter(p => !!p.publishRepository)
};
}

private updateEnablement(): void {
Expand Down
2 changes: 1 addition & 1 deletion extensions/github-authentication/src/githubServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class GitHubServer {
const callbackUri = await vscode.env.asExternalUri(vscode.Uri.parse(`${vscode.env.uriScheme}://vscode.github-authentication/did-authenticate`));

if (this.isTestEnvironment(callbackUri)) {
const token = await vscode.window.showInputBox({ prompt: 'Token', ignoreFocusOut: true });
const token = await vscode.window.showInputBox({ prompt: 'GitHub Personal Access Token', ignoreFocusOut: true });
if (!token) { throw new Error('Sign in failed: No token provided'); }
this.updateStatusBarItem(false);
return token;
Expand Down
8 changes: 5 additions & 3 deletions extensions/github/src/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,11 @@ export async function publishRepository(gitAPI: GitAPI, repository?: Repository)
const ignored = new Set(children);
result.forEach(c => ignored.delete(c.label));

const raw = [...ignored].map(i => `/${i}`).join('\n');
const encoder = new TextEncoder();
await vscode.workspace.fs.writeFile(gitignore, encoder.encode(raw));
if (ignored.size > 0) {
const raw = [...ignored].map(i => `/${i}`).join('\n');
const encoder = new TextEncoder();
await vscode.workspace.fs.writeFile(gitignore, encoder.encode(raw));
}
} finally {
quickpick.dispose();
}
Expand Down
4 changes: 2 additions & 2 deletions extensions/javascript/snippets/javascript.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,14 @@
"Log warning to console": {
"prefix": "warn",
"body": [
"console.warn($1);",
"console.warn($1);"
],
"description": "Log warning to the console"
},
"Log error to console": {
"prefix": "error",
"body": [
"console.error($1);",
"console.error($1);"
],
"description": "Log error to the console"
}
Expand Down
4 changes: 2 additions & 2 deletions extensions/typescript-language-features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1030,10 +1030,10 @@
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "^\\s*(?:message TS6032:|\\[?\\D*\\d{1,2}[:.]\\d{1,2}[:.]\\d{1,2}\\D*(?:\\]| -)) File change detected\\. Starting incremental compilation\\.\\.\\."
"regexp": "^\\s*(?:message TS6032:|\\[?\\D*\\d{1,2}[:.]\\d{1,2}[:.]\\d{1,2}\\D*(\\D*\\d{1,2}\\D+┤)?(?:\\]| -)) File change detected\\. Starting incremental compilation\\.\\.\\."
},
"endsPattern": {
"regexp": "^\\s*(?:message TS6042:|\\[?\\D*\\d{1,2}[:.]\\d{1,2}[:.]\\d{1,2}\\D*(?:\\]| -)) (?:Compilation complete\\.|Found \\d+ errors?\\.) Watching for file changes\\."
"regexp": "^\\s*(?:message TS6042:|\\[?\\D*\\d{1,2}[:.]\\d{1,2}[:.]\\d{1,2}\\D*(\\D*\\d{1,2}\\D+┤)?(?:\\]| -)) (?:Compilation complete\\.|Found \\d+ errors?\\.) Watching for file changes\\."
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider<
"type" : { "classification": "SystemMetadata", "purpose": "FeatureInsight" },
"count" : { "classification": "SystemMetadata", "purpose": "FeatureInsight" },
"updateGraphDurationMs" : { "classification": "SystemMetadata", "purpose": "FeatureInsight" },
"createAutoImportProviderProgramDurationMs" : { "classification": "SystemMetadata", "purpose": "FeatureInsight" },
"includesPackageJsonImport" : { "classification": "SystemMetadata", "purpose": "FeatureInsight" },
"${include}": [
"${TypeScriptCommonProperties}"
Expand All @@ -572,6 +573,7 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider<
type: response?.type ?? 'unknown',
count: response?.type === 'response' && response.body ? response.body.entries.length : 0,
updateGraphDurationMs: response?.type === 'response' ? response.performanceData?.updateGraphDurationMs : undefined,
createAutoImportProviderProgramDurationMs: response?.type === 'response' ? (response.performanceData as Proto.PerformanceData & { createAutoImportProviderProgramDurationMs?: number })?.createAutoImportProviderProgramDurationMs : undefined,
includesPackageJsonImport: includesPackageJsonImport ? 'true' : undefined,
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { ILogDirectoryProvider } from './logDirectoryProvider';
import { GetErrRoutingTsServer, ITypeScriptServer, ProcessBasedTsServer, SyntaxRoutingTsServer, TsServerDelegate, TsServerProcessFactory, TsServerProcessKind } from './server';
import { TypeScriptVersionManager } from './versionManager';
import { ITypeScriptVersionProvider, TypeScriptVersion } from './versionProvider';
import * as semver from 'semver';

const enum CompositeServerType {
/** Run a single server that handles all commands */
Expand Down Expand Up @@ -163,7 +164,13 @@ export class TypeScriptServerSpawner {
let tsServerLogFile: string | undefined;

if (kind === TsServerProcessKind.Syntax) {
args.push('--syntaxOnly');
if (semver.gte(API.v400rc.fullVersionString, apiVersion.fullVersionString)) {
args.push('--serverMode');
args.push('partialSemantic');
}
else {
args.push('--syntaxOnly');
}
}

if (apiVersion.gte(API.v250)) {
Expand Down
1 change: 1 addition & 0 deletions extensions/typescript-language-features/src/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default class API {
public static readonly v380 = API.fromSimpleString('3.8.0');
public static readonly v381 = API.fromSimpleString('3.8.1');
public static readonly v390 = API.fromSimpleString('3.9.0');
public static readonly v400rc = API.fromSimpleString('4.0.0-rc');
public static readonly v400 = API.fromSimpleString('4.0.0');

public static fromVersionString(versionString: string): API {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.48.0",
"distro": "aab483217aa0c9ab8fa10a1ccdbe6ae904b4d501",
"version": "1.49.0",
"distro": "db6c4e7925a5077a6e61690a057fa6cf139e0e49",
"author": {
"name": "Microsoft Corporation"
},
Expand Down Expand Up @@ -164,7 +164,7 @@
"source-map": "^0.4.4",
"style-loader": "^1.0.0",
"ts-loader": "^4.4.2",
"typescript": "^4.0.0-dev.20200729",
"typescript": "^4.0.0-dev.20200803",
"typescript-formatter": "7.1.0",
"underscore": "^1.8.2",
"vinyl": "^2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions product.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"builtInExtensions": [
{
"name": "ms-vscode.node-debug",
"version": "1.44.7",
"version": "1.44.8",
"repo": "https://github.com/Microsoft/vscode-node-debug",
"metadata": {
"id": "b6ded8fb-a0a0-4c1c-acbd-ab2a3bc995a6",
Expand Down Expand Up @@ -123,7 +123,7 @@
"webBuiltInExtensions": [
{
"name": "ms-vscode.github-browser",
"version": "0.0.1",
"version": "0.0.2",
"repo": "https://github.com/Microsoft/vscode-github-browser",
"metadata": {
"id": "c1bcff4b-4ecb-466e-b8f6-b02788b5fb5a",
Expand Down

0 comments on commit c466365

Please sign in to comment.