Skip to content

Commit

Permalink
bring titlebarplus up to date
Browse files Browse the repository at this point in the history
* Merge NPM Scripts: Added configuration option to change default click action microsoft#49282

* fix microsoft#50560

* Fix getmac test (microsoft#48804)

* Cleaning up some typos in vscode.d.ts and vscode.proposed.d.ts (microsoft#50533)

* yarn.lock changes

* grid - log serialized state if restoring failed

* Fixes microsoft#50382: Align .mtku with .detected-link

* debug issues back to isidorn

* Hide interactive playground commands from command palette (fixes microsoft#49706)

* grid - drop outline as focus indication and rely on dimmed state

* grid - allow to close empty group when closing all editors of a group

* grid - get preferredSize from grid

* Fixes microsoft#43003: Cannot specify a global problemMatcher in tasks.json

* cleanup integrated terminal support for debugging

* grid - action wording tweaks

* microsoft#45663 Use core translations asset

* grid - allow to close dirty diff editor if master is still opened in same group

* Support to run npm install from a package node

* grid - log previous UI state upon error

* grid - stronger border top color

otherwise when a tab is showing in a vertical split, the border collides with the sash border

* remove todo

* do not append logLevel

microsoft#47774

* Implement Go To Next/Previous Breakpoint editor actions

* Include enabledOnly in debug model interface

* remove from schema

microsoft#47774

* microsoft#45663 fix compilations

* change openBreakpointSource to use IBreakpoint

* return passed context if resourceOrContext is not useful

* fix off by one issue

* Simplify implementation

* return context if it has a groupId

* polish

* Fixes microsoft/monaco-editor#891: Focus editor when returning from context menu

* go to next / previosu breakpoint minor polish

* Add Endgame for 1.24

* fix index computing for editor close case

* Fix microsoft#49145

- Enable/Disable viewlets by views when context
- Move viewlet enablement/disablement to views service
- Fix - adopt if a viewlet extension is disabled/removed

* Avoid command palette entry (microsoft#49340)

* [handlebars] code-folding algorithm is less useful than Indentation-based one. Fixes microsoft#48457

* use upper lang id

* Fixes microsoft#49378

* microsoft#49145 Store placeholder states for all viewlets

* Add `logicalLine` argument to `mutlicursor.insertBelow` and `mutlicursor.insertAbove`

* Removed duplicate loop

* eliminate code duplication; use resolveWorkspaceFolder()

* microsoft#45663 Get all asset types

* [css] update service

* [html] update services

* grid - fix compile

* add User-Id to marketplace build requests

* Improve rendererType description

Fixes microsoft#50617

* fix microsoft#50672

* Fixes microsoft#49173

* fix microsoft#50321

* fix microsoft#50670

* Install option not needed when we have Install and Restart Fixes microsoft#50669

* Fixes microsoft#50616, Showing/hiding details in Issue Reporter resets scroll position

* Fix microsoft#50642, fix microsoft#50673

* Issue reporter and process explorer windows should close when the parent window closes, fixes microsoft#50716

* Issue Reporter should clear the error state when selecting an extension, fixes microsoft#50702

* Extracting methods

* Make sure we update the webview's state on setState

* Avoid prompting for same file type in the same session microsoft#50537

* Use language name instead of locale in the prompt microsoft#50738

* Use correct failed error code for webview resource load error

* Mark unused parameter

* Restore restart

* Try serializing webviews even if they have not called setState

Fixes microsoft#50752

* Change parameter name to match interface name

Fixes microsoft#50745

* Fix non-serializable webviews being revived if they called setState

* Include recommended extensions in telemetry events to determine success

* Fix microsoft#49777 - Emmet balance In after balance out should go back to initial selection and not first child (microsoft#49996)

* Update Emmet - balance.ts

* Cover all cases

* Update prompt msg Fixes microsoft#50738

* Fix microsoft#50632

* search-rg has no icon

* EH search - replace search.enableSearchProviders with a search-rg specific setting

* fix microsoft#50742

* fix microsoft#50691

* part of microsoft#50760

* smoke: uncomment debug suite

* smoketest: use yarn

* grid - allow to close empty groups via middle click (microsoft#50733)

* careful with path comparisons on windows

related to microsoft#50760

* smoke: run yarn verbose

* fix microsoft#50710

* Improve description (microsoft#43208)

* fix microsoft#50722

* Fix microsoft#50663

* Fix microsoft#47586

* fixes microsoft#50609

* fixes microsoft#50026

* 💄

* fix  microsoft#50773

* improve perf of findId and getElementById, microsoft#50575

* don't show outline when there are more then 7500 symbols, microsoft#50575

* fix typos

* polish for microsoft#50667

* fix microsoft#50700

* grid keep sizing after branch node demotion

fixes microsoft#50564

* grid - for now remove editorGroup.activeEmptyBackground

* fix microsoft#50726

* grid: resize views when branch is demoted

fixes microsoft#50675

* fix microsoft#50727

* fix microsoft#50734

* remove preview rant from search.location

* splitview: dont propagate white-sapce property

fixes microsoft#50720

* fix microsoft#50774

* Fixes microsoft#50296

* fix  microsoft#50207

* Fixes microsoft#24670: Add API to determine if the task service supports parallel task execution.

* fix microsoft#50741

* Fixes  microsoft#49400: Cannot read property 'then' of undefined

* Fix microsoft#50717

* Fix microsoft#48901

* polish debug.toolBarLocation

fixes microsoft#50786

* Fix microsoft#50717

* missing compilation

* Fix microsoft#48225

* fix microsoft#50711

* Fix errors installing extension from Welcome page (fixes microsoft#50753)

* fixes microsoft#50794

* fixes microsoft#50787

* continuous build: use vsts npm feed

* Fix for microsoft#50792: empty pre post scripts not rendered properly

* Fix microsoft#50728

* continuous build: use vsts feed

* Fix for microsoft#50792 npm exclude doesn´t work for folder names

* Move previewOptions, microsoft#50788

* build: remove npm auth

* better fix for microsoft#50710

* Revert "Merge pull request microsoft#49790 from usernamehw/raw_settings"

This reverts commit f92a162, reversing
changes made to fc710af.

* Remove unused variable

* Fix regression in C# TextMate grammar related to lambda parameters

This tweak fixes a regression recently introduced in the C# TextMate grammar around
implicitly-typed lambda parameters.

* dotnet/csharp-tmLanguage#119
* dotnet/csharp-tmLanguage#120

* Fix parameter not being escaped

Fixes microsoft#49057

* wip: grid.getNeighborViews

* Make sure we use normalized path for compare

Fixes microsoft#50760

(the path should already have been normalized at this point so I don't think there is any user impact)

* Clean up importModuleSpecifier wording

Fixes microsoft#50817

* Remove duplicate strings and small cleanup

* Spelling fix Ouoting -> Quoting

* Restore default settings editor keybinding

* Dont trigger emmet for # in selectors Fixes microsoft#49269

* Hide settings editor feedback button in stable

* Use better colors for markdown code blocks

* Moving webview api back to proposed for more polishing

microsoft#49022

* Shorten showUnused setting name

Fixes microsoft#50648

* fix microsoft#50678

* Don't include imports in js/ts document symbol results

Fixes microsoft#50829

* smoketest: remove verbose from yarn

* smoketest: clear state from failing search tests

* minor rename

* Fix markdown preview not setting context properly on first creation

Fixes microsoft#50558

* smoketest: update to package-lock.json

fixes microsoft#50857

* smoketest: bring back search tests

* microsoft#48901 Expand by default only in custom viewlets

* fixes microsoft#50812

* open editors: clear focus when group without editors is active

fixes microsoft#50563

* Fix MaxNumber incrementFileName bug

* Fixes microsoft#48758: Do not import standalone editor modules

* fixes microsoft#50864

* Use `MAX_SAFE_SMALL_INTEGER`

* Fixes microsoft#50858: Task api is still marked as proposed

* fixes microsoft#50737

* fix microsoft#50867

* Fix: showQuickPick keeps showing infinite progress (fixes microsoft#50863)

* Clarify for translation (fixes microsoft#50634)

* fixes microsoft#50870

* fix microsoft#50479

* grid - todo@grid => todo@ben

* grid - adopt new getNeighborViews() method

* grid - add workbench.action.closeEditorsAndGroup

* open editors: close group action

fixes microsoft#50625

* open editors: use actionRunner for contexts

fixes microsoft#50621

* [css][html] update service

* grid: getNeighborViews

* grid - adopt wrapping

* Some menu action clients (ActionBar) handle alternative actions on their own so the alternative actions should be ignored

fixes microsoft#50581

* fillInActionBarActions and fillInContextMenuActions for clarity

* Remove inconsistent use of active in terminal API

Related microsoft#48434

* Try using fixAllDescription for js/ts quick fixes

Fixes microsoft#42549

* Fixes microsoft#50828, code-insiders --status triggered exception in main process

* Pick up ts 2.9.1 final

* Fix for microsoft#50868 and microsoft#50884

* Still gray out vars even if user has disabled suggestions

Fixes microsoft#50890

* grid: fix neighbor npe issue

* grid: more getNeighborViews tests

* grid: use boundaries for neighbor finding

* grid: getNeighborViews perf

* grid: add todo

* 2018-05-31. Merged in translations from Transifex.

* Update GDPR annotation

* update message

* Add specific `refactor.move` scope for js/ts move to new file action

* Use localized language name when available

* Add proper contribution schema for ts server pluguins

microsoft#50682

* Fix extra word

* Fix microsoft#50909 - add link to new settings editor from old one

* Left-align settings editor preview prompt

* grid - fix issues with touchbar updating

* grid - use viewColumnToEditorGroup in more places

* grid - close all groups should preserve first group

* Reapply fix for microsoft#50790

* grid - assign some default keybindings for focus group

* Fixes microsoft#50763: All running Visual Studio code instances shutdown all at once

* grid - 💄

* fixes microsoft#50926

* show alternative actions when alt is pressed, not only on mouse over

* open editors: click on groups should activate them

* update description (for microsoft#50677)

* Fix microsoft#50835

* grid - tweak some groups access order

* one more time, fix microsoft#50321

* beware of keybinding command null arguments

fixes microsoft#50821

* grid - prevent multiple confirmation dialogs for the same editor to show up (for  microsoft#50539)

* smoketest: go-to-definition is flaky

fixes microsoft#50944
fixes microsoft#49107

* Fixes microsoft#50943: TSC version 2.9.x in watch mode prints different end compile message

* grid - fix bad === for editors

* 💄 grid, cleanup getViews()

* Update distro commit and third party notices

* Use localizedLanguageName instead of languageNameLocalized which doesnt exist

* Remove now unneeded any

* Make sure unused diags are still updated when suggestions are disabled

Fixes microsoft#50890

* Fix unused var

* Update version

* Update issue templates, microsoft#49380

* Fix microsoft#50893 - escape regex chars when copy search string from editor

* Fix microsoft#50985 - don't take editor text when toggling search details
  • Loading branch information
bpasero authored and sbatten committed Jun 4, 2018
1 parent fc07fa2 commit 06df957
Show file tree
Hide file tree
Showing 1,447 changed files with 30,817 additions and 21,331 deletions.
@@ -1,8 +1,10 @@
<!--
Do you have a question? Please ask it on https://stackoverflow.com/questions/tagged/vscode.
---
name: Bug report
about: Create a report to help us improve

For bug reports, please fill in the details below. For feature requests, please describe the desired feature.
-->
---

<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version:
Expand Down
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,9 @@
---
name: Feature request
about: Suggest an idea for this project

---

<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
@@ -0,0 +1,9 @@
---
name: Question
about: The issue tracker is not for questions. Please ask questions on https://stackoverflow.com/questions/tagged/vscode.

---

🚨 The issue tracker is not for questions 🚨

If you have a question, please ask it on https://stackoverflow.com/questions/tagged/vscode.
1 change: 1 addition & 0 deletions .github/calendar.yml
Expand Up @@ -19,4 +19,5 @@
'2018-05-08 12:00, US/Pacific': 'development',
'2018-05-10 12:00, US/Pacific': 'release', # 1.23.1
'2018-05-15 12:00, US/Pacific': 'development',
'2018-05-28 18:00, US/Pacific': 'endgame',
}
2 changes: 1 addition & 1 deletion .github/classifier.yml
Expand Up @@ -47,7 +47,7 @@
assignLabel: false
},
file-explorer: {
assignees: [ isidorn ],
assignees: [ weinand ],
assignLabel: false
},
format: [],
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Expand Up @@ -18,7 +18,7 @@
"name": "Attach to Extension Host",
"protocol": "inspector",
"port": 5870,
// "restart": true,
"restart": true,
"outFiles": [
"${workspaceFolder}/out/**/*.js"
]
Expand Down
4 changes: 1 addition & 3 deletions .vscode/settings.json
Expand Up @@ -41,8 +41,6 @@
"npm.exclude": "**/extensions/**",
"emmet.excludeLanguages": [],
"typescript.preferences.importModuleSpecifier": "non-relative",
"typescript.preferences.quoteStyle": "single",
"typescript.preferences.quoteStyle": "single"

// Self-host search in EH
"search.enableSearchProviders": true
}
171 changes: 171 additions & 0 deletions OSSREADME.json

Large diffs are not rendered by default.

31 changes: 18 additions & 13 deletions ThirdPartyNotices.txt
Expand Up @@ -18,7 +18,7 @@ This project incorporates components from the projects listed below. The origina
11. chriskempson/tomorrow-theme (https://github.com/chriskempson/tomorrow-theme)
12. Colorsublime-Themes version 0.1.0 (https://github.com/Colorsublime/Colorsublime-Themes)
13. daaain/Handlebars (https://github.com/daaain/Handlebars)
14. davidrios/jade-tmbundle (https://github.com/davidrios/jade-tmbundle)
14. davidrios/pug-tmbundle (https://github.com/davidrios/pug-tmbundle)
15. definitelytyped (https://github.com/DefinitelyTyped/DefinitelyTyped)
16. demyte/language-cshtml (https://github.com/demyte/language-cshtml)
17. dotnet/csharp-tmLanguage version 0.1.0 (https://github.com/dotnet/csharp-tmLanguage)
Expand Down Expand Up @@ -535,25 +535,30 @@ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
=========================================
END OF daaain/Handlebars NOTICES AND INFORMATION

%% davidrios/jade-tmbundle NOTICES AND INFORMATION BEGIN HERE
%% davidrios/pug-tmbundle NOTICES AND INFORMATION BEGIN HERE
=========================================
The MIT License (MIT)

Copyright (c) 2014 David Rios
Copyright (c) 2016 David Rios

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to
whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
=========================================
END OF davidrios/jade-tmbundle NOTICES AND INFORMATION
END OF davidrios/pug-tmbundle NOTICES AND INFORMATION

%% definitelytyped NOTICES AND INFORMATION BEGIN HERE
=========================================
Expand Down
4 changes: 2 additions & 2 deletions build/builtInExtensions.json
@@ -1,12 +1,12 @@
[
{
"name": "ms-vscode.node-debug",
"version": "1.23.3",
"version": "1.24.0",
"repo": "https://github.com/Microsoft/vscode-node-debug"
},
{
"name": "ms-vscode.node-debug2",
"version": "1.24.1",
"version": "1.24.2",
"repo": "https://github.com/Microsoft/vscode-node-debug2"
}
]
2 changes: 1 addition & 1 deletion build/gulpfile.hygiene.js
Expand Up @@ -104,7 +104,7 @@ const copyrightFilter = [
'!build/**/*.init',
'!resources/linux/snap/snapcraft.yaml',
'!resources/win32/bin/code.js',
'!extensions/markdown-language-features/media/tomorrow.css',
'!extensions/markdown-language-features/media/highlight.css',
'!extensions/html-language-features/server/src/modes/typescript/*',
'!extensions/*/server/bin/*'
];
Expand Down
2 changes: 1 addition & 1 deletion build/gulpfile.vscode.js
Expand Up @@ -141,7 +141,7 @@ const config = {
name: product.nameLong + ' document',
role: 'Editor',
ostypes: ["TEXT", "utxt", "TUTX", "****"],
extensions: ["ascx", "asp", "aspx", "bash", "bash_login", "bash_logout", "bash_profile", "bashrc", "bat", "bowerrc", "c", "cc", "clj", "cljs", "cljx", "clojure", "cmd", "code-workspace", "coffee", "config", "cpp", "cs", "cshtml", "csproj", "css", "csx", "ctp", "cxx", "dockerfile", "dot", "dtd", "editorconfig", "edn", "eyaml", "eyml", "fs", "fsi", "fsscript", "fsx", "gemspec", "gitattributes", "gitconfig", "gitignore", "go", "h", "handlebars", "hbs", "hh", "hpp", "htm", "html", "hxx", "ini", "jade", "jav", "java", "js", "jscsrc", "jshintrc", "jshtm", "json", "jsp", "less", "lua", "m", "makefile", "markdown", "md", "mdoc", "mdown", "mdtext", "mdtxt", "mdwn", "mkd", "mkdn", "ml", "mli", "php", "phtml", "pl", "pl6", "pm", "pm6", "pod", "pp", "profile", "properties", "ps1", "psd1", "psgi", "psm1", "py", "r", "rb", "rhistory", "rprofile", "rs", "rt", "scss", "sh", "shtml", "sql", "svg", "svgz", "t", "ts", "txt", "vb", "wxi", "wxl", "wxs", "xaml", "xcodeproj", "xcworkspace", "xml", "yaml", "yml", "zlogin", "zlogout", "zprofile", "zsh", "zshenv", "zshrc"],
extensions: ["ascx", "asp", "aspx", "bash", "bash_login", "bash_logout", "bash_profile", "bashrc", "bat", "bowerrc", "c", "cc", "clj", "cljs", "cljx", "clojure", "cmd", "code-workspace", "coffee", "config", "cpp", "cs", "cshtml", "csproj", "css", "csx", "ctp", "cxx", "dockerfile", "dot", "dtd", "editorconfig", "edn", "eyaml", "eyml", "fs", "fsi", "fsscript", "fsx", "gemspec", "gitattributes", "gitconfig", "gitignore", "go", "h", "handlebars", "hbs", "hh", "hpp", "htm", "html", "hxx", "ini", "jade", "jav", "java", "js", "jscsrc", "jshintrc", "jshtm", "json", "jsp", "less", "lua", "m", "makefile", "markdown", "md", "mdoc", "mdown", "mdtext", "mdtxt", "mdwn", "mkd", "mkdn", "ml", "mli", "php", "phtml", "pl", "pl6", "pm", "pm6", "pod", "pp", "profile", "properties", "ps1", "psd1", "psgi", "psm1", "pug", "py", "r", "rb", "rhistory", "rprofile", "rs", "rt", "scss", "sh", "shtml", "sql", "svg", "svgz", "t", "ts", "txt", "vb", "wxi", "wxl", "wxs", "xaml", "xcodeproj", "xcworkspace", "xml", "yaml", "yml", "zlogin", "zlogout", "zprofile", "zsh", "zshenv", "zshrc"],
iconFile: 'resources/darwin/code_file.icns'
}],
darwinBundleURLTypes: [{
Expand Down
1 change: 1 addition & 0 deletions build/lib/extensions.js
Expand Up @@ -44,6 +44,7 @@ function error(err) {
var baseHeaders = {
'X-Market-Client-Id': 'VSCode Build',
'User-Agent': 'VSCode Build',
'X-Market-User-Id': '291C1CD0-051A-4123-9B4B-30D60EF52EE2',
};
function fromMarketplace(extensionName, version) {
var filterType = 7;
Expand Down
1 change: 1 addition & 0 deletions build/lib/extensions.ts
Expand Up @@ -49,6 +49,7 @@ function error(err: any): Stream {
const baseHeaders = {
'X-Market-Client-Id': 'VSCode Build',
'User-Agent': 'VSCode Build',
'X-Market-User-Id': '291C1CD0-051A-4123-9B4B-30D60EF52EE2',
};

export function fromMarketplace(extensionName: string, version: string): Stream {
Expand Down
72 changes: 72 additions & 0 deletions build/lib/tslint/noStandaloneEditorRule.js
@@ -0,0 +1,72 @@
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ts = require("typescript");
var Lint = require("tslint");
var path_1 = require("path");
var Rule = /** @class */ (function (_super) {
__extends(Rule, _super);
function Rule() {
return _super !== null && _super.apply(this, arguments) || this;
}
Rule.prototype.apply = function (sourceFile) {
if (/vs(\/|\\)editor/.test(sourceFile.fileName)) {
// the vs/editor folder is allowed to use the standalone editor
return [];
}
return this.applyWithWalker(new NoStandaloneEditorRuleWalker(sourceFile, this.getOptions()));
};
return Rule;
}(Lint.Rules.AbstractRule));
exports.Rule = Rule;
var NoStandaloneEditorRuleWalker = /** @class */ (function (_super) {
__extends(NoStandaloneEditorRuleWalker, _super);
function NoStandaloneEditorRuleWalker(file, opts) {
return _super.call(this, file, opts) || this;
}
NoStandaloneEditorRuleWalker.prototype.visitImportEqualsDeclaration = function (node) {
if (node.moduleReference.kind === ts.SyntaxKind.ExternalModuleReference) {
this._validateImport(node.moduleReference.expression.getText(), node);
}
};
NoStandaloneEditorRuleWalker.prototype.visitImportDeclaration = function (node) {
this._validateImport(node.moduleSpecifier.getText(), node);
};
NoStandaloneEditorRuleWalker.prototype.visitCallExpression = function (node) {
_super.prototype.visitCallExpression.call(this, node);
// import('foo') statements inside the code
if (node.expression.kind === ts.SyntaxKind.ImportKeyword) {
var path = node.arguments[0];
this._validateImport(path.getText(), node);
}
};
NoStandaloneEditorRuleWalker.prototype._validateImport = function (path, node) {
// remove quotes
path = path.slice(1, -1);
// resolve relative paths
if (path[0] === '.') {
path = path_1.join(this.getSourceFile().fileName, path);
}
if (/vs(\/|\\)editor(\/|\\)standalone/.test(path)
|| /vs(\/|\\)editor(\/|\\)common(\/|\\)standalone/.test(path)
|| /vs(\/|\\)editor(\/|\\)editor.api/.test(path)
|| /vs(\/|\\)editor(\/|\\)editor.main/.test(path)
|| /vs(\/|\\)editor(\/|\\)editor.worker/.test(path)) {
this.addFailure(this.createFailure(node.getStart(), node.getWidth(), "Not allowed to import standalone editor modules. See https://github.com/Microsoft/vscode/wiki/Code-Organization"));
}
};
return NoStandaloneEditorRuleWalker;
}(Lint.RuleWalker));
65 changes: 65 additions & 0 deletions build/lib/tslint/noStandaloneEditorRule.ts
@@ -0,0 +1,65 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import * as ts from 'typescript';
import * as Lint from 'tslint';
import { join } from 'path';

export class Rule extends Lint.Rules.AbstractRule {
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
if (/vs(\/|\\)editor/.test(sourceFile.fileName)) {
// the vs/editor folder is allowed to use the standalone editor
return [];
}
return this.applyWithWalker(new NoStandaloneEditorRuleWalker(sourceFile, this.getOptions()));
}
}

class NoStandaloneEditorRuleWalker extends Lint.RuleWalker {

constructor(file: ts.SourceFile, opts: Lint.IOptions) {
super(file, opts);
}

protected visitImportEqualsDeclaration(node: ts.ImportEqualsDeclaration): void {
if (node.moduleReference.kind === ts.SyntaxKind.ExternalModuleReference) {
this._validateImport(node.moduleReference.expression.getText(), node);
}
}

protected visitImportDeclaration(node: ts.ImportDeclaration): void {
this._validateImport(node.moduleSpecifier.getText(), node);
}

protected visitCallExpression(node: ts.CallExpression): void {
super.visitCallExpression(node);

// import('foo') statements inside the code
if (node.expression.kind === ts.SyntaxKind.ImportKeyword) {
const [path] = node.arguments;
this._validateImport(path.getText(), node);
}
}

private _validateImport(path: string, node: ts.Node): void {
// remove quotes
path = path.slice(1, -1);

// resolve relative paths
if (path[0] === '.') {
path = join(this.getSourceFile().fileName, path);
}

if (
/vs(\/|\\)editor(\/|\\)standalone/.test(path)
|| /vs(\/|\\)editor(\/|\\)common(\/|\\)standalone/.test(path)
|| /vs(\/|\\)editor(\/|\\)editor.api/.test(path)
|| /vs(\/|\\)editor(\/|\\)editor.main/.test(path)
|| /vs(\/|\\)editor(\/|\\)editor.worker/.test(path)
) {
this.addFailure(this.createFailure(node.getStart(), node.getWidth(), `Not allowed to import standalone editor modules. See https://github.com/Microsoft/vscode/wiki/Code-Organization`));
}
}
}
4 changes: 4 additions & 0 deletions build/monaco/monaco.d.ts.recipe
Expand Up @@ -32,6 +32,10 @@ declare namespace monaco {
Error = 3,
}

export enum MarkerTag {
Unnecessary = 1,
}

export enum MarkerSeverity {
Hint = 1,
Info = 2,
Expand Down
2 changes: 1 addition & 1 deletion build/npm/update-grammar.js
Expand Up @@ -83,7 +83,7 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar, version = 'mas
grammar = plist.parse(content);
} else if (ext === '.cson') {
grammar = cson.parse(content);
} else if (ext === '.json') {
} else if (ext === '.json' || ext === '.JSON-tmLanguage') {
grammar = JSON.parse(content);
} else {
return Promise.reject(new Error('Unknown file extension: ' + ext));
Expand Down
30 changes: 21 additions & 9 deletions build/tfs/continuous-build.yml
Expand Up @@ -8,9 +8,13 @@ phases:
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs:
versionSpec: "1.3.2"
- powershell: |
yarn
displayName: Install Dependencies
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-task.Yarn@2
displayName: Yarn
inputs:
customRegistry: useFeed
customFeed: 'd28dd4e6-8e53-406e-8887-22f7c4dffd0c'
# - task: npmAuthenticate@0
# displayName: NPM Authenticate
- powershell: |
yarn gulp electron
displayName: Download Electron
Expand Down Expand Up @@ -61,9 +65,13 @@ phases:
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs:
versionSpec: "1.3.2"
- script: |
yarn
displayName: Install Dependencies
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-task.Yarn@2
displayName: Yarn
inputs:
customRegistry: useFeed
customFeed: 'd28dd4e6-8e53-406e-8887-22f7c4dffd0c'
# - task: npmAuthenticate@0
# displayName: NPM Authenticate
- script: |
yarn gulp electron-x64
displayName: Download Electron
Expand Down Expand Up @@ -92,9 +100,13 @@ phases:
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs:
versionSpec: "1.3.2"
- script: |
yarn
displayName: Install Dependencies
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-task.Yarn@2
displayName: Yarn
inputs:
customRegistry: useFeed
customFeed: 'd28dd4e6-8e53-406e-8887-22f7c4dffd0c'
# - task: npmAuthenticate@0
# displayName: NPM Authenticate
- script: |
yarn gulp electron-x64
displayName: Download Electron
Expand Down
5 changes: 4 additions & 1 deletion extensions/configuration-editing/src/extension.ts
Expand Up @@ -119,13 +119,16 @@ function registerVariableCompletions(pattern: string): vscode.Disposable {
provideCompletionItems(document, position, token) {
const location = getLocation(document.getText(), document.offsetAt(position));
if (!location.isAtPropertyKey && location.previousNode && location.previousNode.type === 'string') {
const indexOf$ = document.lineAt(position.line).text.indexOf('$');
const startPosition = indexOf$ >= 0 ? new vscode.Position(position.line, indexOf$) : position;

return [{ label: 'workspaceFolder', detail: localize('workspaceFolder', "The path of the folder opened in VS Code") }, { label: 'workspaceFolderBasename', detail: localize('workspaceFolderBasename', "The name of the folder opened in VS Code without any slashes (/)") },
{ label: 'relativeFile', detail: localize('relativeFile', "The current opened file relative to ${workspaceFolder}") }, { label: 'file', detail: localize('file', "The current opened file") }, { label: 'cwd', detail: localize('cwd', "The task runner's current working directory on startup") },
{ label: 'lineNumber', detail: localize('lineNumber', "The current selected line number in the active file") }, { label: 'selectedText', detail: localize('selectedText', "The current selected text in the active file") },
{ label: 'fileDirname', detail: localize('fileDirname', "The current opened file's dirname") }, { label: 'fileExtname', detail: localize('fileExtname', "The current opened file's extension") }, { label: 'fileBasename', detail: localize('fileBasename', "The current opened file's basename") },
{ label: 'fileBasenameNoExtension', detail: localize('fileBasenameNoExtension', "The current opened file's basename with no file extension") }].map(variable => ({
label: '${' + variable.label + '}',
range: new vscode.Range(position, position),
range: new vscode.Range(startPosition, position),
detail: variable.detail
}));
}
Expand Down

0 comments on commit 06df957

Please sign in to comment.