Skip to content

Commit

Permalink
Merge from vscode e558dc6 (microsoft#6864)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Dresser authored Aug 22, 2019
1 parent d2ae0f0 commit 985bfae
Show file tree
Hide file tree
Showing 107 changed files with 2,262 additions and 816 deletions.
37 changes: 37 additions & 0 deletions build/azure-pipelines/exploration-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
trigger:
branches:
include: ['master']
pr:
branches:
include: ['master']

steps:
- task: NodeTool@0
inputs:
versionSpec: "10.15.1"

- task: AzureKeyVault@1
displayName: 'Azure Key Vault: Get Secrets'
inputs:
azureSubscription: 'vscode-builds-subscription'
KeyVaultName: vscode

- script: |
set -e
cat << EOF > ~/.netrc
machine github.com
login vscode
password $(github-distro-mixin-password)
EOF
git config user.email "vscode@microsoft.com"
git config user.name "VSCode"
git checkout origin/ben/electron-test
git merge origin/master
# Push master branch into exploration branch
git push origin HEAD:ben/electron-test
displayName: Sync & Merge Exploration
23 changes: 14 additions & 9 deletions build/lib/tslint/abstractGlobalsRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,23 @@ class AbstractGlobalsRuleWalker extends Lint.RuleWalker {
const checker = this.program.getTypeChecker();
const symbol = checker.getSymbolAtLocation(node);
if (symbol) {
const valueDeclaration = symbol.valueDeclaration;
if (valueDeclaration) {
const parent = valueDeclaration.parent;
if (parent) {
const sourceFile = parent.getSourceFile();
if (sourceFile) {
const fileName = sourceFile.fileName;
if (fileName && fileName.indexOf(this.getDefinitionPattern()) >= 0) {
this.addFailureAtNode(node, `Cannot use global '${node.text}' in '${this._config.target}'`);
const declarations = symbol.declarations;
if (Array.isArray(declarations) && symbol.declarations.some(declaration => {
if (declaration) {
const parent = declaration.parent;
if (parent) {
const sourceFile = parent.getSourceFile();
if (sourceFile) {
const fileName = sourceFile.fileName;
if (fileName && fileName.indexOf(this.getDefinitionPattern()) >= 0) {
return true;
}
}
}
}
return false;
})) {
this.addFailureAtNode(node, `Cannot use global '${node.text}' in '${this._config.target}'`);
}
}
}
Expand Down
24 changes: 15 additions & 9 deletions build/lib/tslint/abstractGlobalsRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,24 @@ export abstract class AbstractGlobalsRuleWalker extends Lint.RuleWalker {
const checker = this.program.getTypeChecker();
const symbol = checker.getSymbolAtLocation(node);
if (symbol) {
const valueDeclaration = symbol.valueDeclaration;
if (valueDeclaration) {
const parent = valueDeclaration.parent;
if (parent) {
const sourceFile = parent.getSourceFile();
if (sourceFile) {
const fileName = sourceFile.fileName;
if (fileName && fileName.indexOf(this.getDefinitionPattern()) >= 0) {
this.addFailureAtNode(node, `Cannot use global '${node.text}' in '${this._config.target}'`);
const declarations = symbol.declarations;
if (Array.isArray(declarations) && symbol.declarations.some(declaration => {
if (declaration) {
const parent = declaration.parent;
if (parent) {
const sourceFile = parent.getSourceFile();
if (sourceFile) {
const fileName = sourceFile.fileName;
if (fileName && fileName.indexOf(this.getDefinitionPattern()) >= 0) {
return true;
}
}
}
}

return false;
})) {
this.addFailureAtNode(node, `Cannot use global '${node.text}' in '${this._config.target}'`);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/configuration-editing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"watch": "gulp watch-extension:configuration-editing"
},
"dependencies": {
"jsonc-parser": "2.0.2",
"jsonc-parser": "^2.1.1",
"vscode-nls": "^4.0.0"
},
"contributes": {
Expand Down
8 changes: 4 additions & 4 deletions extensions/configuration-editing/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.8.tgz#fe444203ecef1162348cd6deb76c62477b2cc6e9"
integrity sha512-I4+DbJEhLEg4/vIy/2gkWDvXBOOtPKV9EnLhYjMoqxcRW+TTZtUftkHktz/a8suoD5mUL7m6ReLrkPvSsCQQmw==

jsonc-parser@2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.0.2.tgz#42fcf56d70852a043fadafde51ddb4a85649978d"
integrity sha512-TSU435K5tEKh3g7bam1AFf+uZrISheoDsLlpmAo6wWZYqjsnd09lHYK1Qo+moK4Ikifev1Gdpa69g4NELKnCrQ==
jsonc-parser@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.1.1.tgz#83dc3d7a6e7186346b889b1280eefa04446c6d3e"
integrity sha512-VC0CjnWJylKB1iov4u76/W/5Ef0ydDkjtYWxoZ9t3HdWlSnZQwZL5MgFikaB/EtQ4RmMEw3tmQzuYnZA2/Ja1g==

vscode-nls@^4.0.0:
version "4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion extensions/extension-editing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"watch": "gulp watch-extension:extension-editing"
},
"dependencies": {
"jsonc-parser": "^2.0.2",
"jsonc-parser": "^2.1.1",
"markdown-it": "^8.3.1",
"parse5": "^3.0.2",
"vscode-nls": "^4.0.0"
Expand Down
8 changes: 4 additions & 4 deletions extensions/extension-editing/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ entities@~1.1.1:
resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0"
integrity sha1-blwtClYhtdra7O+AuQ7ftc13cvA=

jsonc-parser@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.0.2.tgz#42fcf56d70852a043fadafde51ddb4a85649978d"
integrity sha512-TSU435K5tEKh3g7bam1AFf+uZrISheoDsLlpmAo6wWZYqjsnd09lHYK1Qo+moK4Ikifev1Gdpa69g4NELKnCrQ==
jsonc-parser@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.1.1.tgz#83dc3d7a6e7186346b889b1280eefa04446c6d3e"
integrity sha512-VC0CjnWJylKB1iov4u76/W/5Ef0ydDkjtYWxoZ9t3HdWlSnZQwZL5MgFikaB/EtQ4RmMEw3tmQzuYnZA2/Ja1g==

linkify-it@^2.0.0:
version "2.0.3"
Expand Down
20 changes: 14 additions & 6 deletions extensions/json-language-features/client/src/jsonMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,14 @@ export function activate(context: ExtensionContext) {
}
});

const schemaDocuments: { [uri: string]: boolean } = {};

// handle content request
client.onRequest(VSCodeContentRequest.type, (uriPath: string) => {
let uri = Uri.parse(uriPath);
if (uri.scheme !== 'http' && uri.scheme !== 'https') {
return workspace.openTextDocument(uri).then(doc => {
schemaDocuments[uri.toString()] = true;
return doc.getText();
}, error => {
return Promise.reject(error);
Expand All @@ -164,10 +167,12 @@ export function activate(context: ExtensionContext) {
}
});

let handleContentChange = (uri: Uri) => {
if (uri.scheme === 'vscode' && uri.authority === 'schemas') {
client.sendNotification(SchemaContentChangeNotification.type, uri.toString());
let handleContentChange = (uriString: string) => {
if (schemaDocuments[uriString]) {
client.sendNotification(SchemaContentChangeNotification.type, uriString);
return true;
}
return false;
};

let handleActiveEditorChange = (activeEditor?: TextEditor) => {
Expand All @@ -184,10 +189,13 @@ export function activate(context: ExtensionContext) {
}
};

toDispose.push(workspace.onDidChangeTextDocument(e => handleContentChange(e.document.uri)));
toDispose.push(workspace.onDidChangeTextDocument(e => handleContentChange(e.document.uri.toString())));
toDispose.push(workspace.onDidCloseTextDocument(d => {
handleContentChange(d.uri);
fileSchemaErrors.delete(d.uri.toString());
const uriString = d.uri.toString();
if (handleContentChange(uriString)) {
delete schemaDocuments[uriString];
}
fileSchemaErrors.delete(uriString);
}));
toDispose.push(window.onDidChangeActiveTextEditor(handleActiveEditorChange));

Expand Down
2 changes: 1 addition & 1 deletion extensions/json-language-features/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"main": "./out/jsonServerMain",
"dependencies": {
"jsonc-parser": "^2.1.0",
"jsonc-parser": "^2.1.1",
"request-light": "^0.2.4",
"vscode-json-languageservice": "^3.3.1",
"vscode-languageserver": "^5.3.0-next.8",
Expand Down
5 changes: 5 additions & 0 deletions extensions/json-language-features/server/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ jsonc-parser@^2.1.0:
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.1.0.tgz#eb0d0c7a3c33048524ce3574c57c7278fb2f1bf3"
integrity sha512-n9GrT8rrr2fhvBbANa1g+xFmgGK5X91KFeDwlKQ3+SJfmH5+tKv/M/kahx/TXOMflfWHKGKqKyfHQaLKTNzJ6w==

jsonc-parser@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.1.1.tgz#83dc3d7a6e7186346b889b1280eefa04446c6d3e"
integrity sha512-VC0CjnWJylKB1iov4u76/W/5Ef0ydDkjtYWxoZ9t3HdWlSnZQwZL5MgFikaB/EtQ4RmMEw3tmQzuYnZA2/Ja1g==

ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
Expand Down
2 changes: 1 addition & 1 deletion extensions/markdown-language-features/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
},
"dependencies": {
"highlight.js": "9.15.8",
"markdown-it": "^8.4.2",
"markdown-it": "^9.1.0",
"markdown-it-front-matter": "^0.1.2",
"vscode-extension-telemetry": "0.1.1",
"vscode-nls": "^4.0.0"
Expand Down
8 changes: 4 additions & 4 deletions extensions/markdown-language-features/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3900,10 +3900,10 @@ markdown-it-front-matter@^0.1.2:
resolved "https://registry.yarnpkg.com/markdown-it-front-matter/-/markdown-it-front-matter-0.1.2.tgz#e50bf56e77e6a4f5ac4ffa894d4d45ccd9896b20"
integrity sha1-5Qv1bnfmpPWsT/qJTU1FzNmJayA=

markdown-it@^8.4.2:
version "8.4.2"
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-8.4.2.tgz#386f98998dc15a37722aa7722084f4020bdd9b54"
integrity sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==
markdown-it@^9.1.0:
version "9.1.0"
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-9.1.0.tgz#df9601c168568704d554b1fff9af0c5b561168d9"
integrity sha512-xHKG4C8iPriyfu/jc2hsCC045fKrMQ0VexX2F1FGYiRxDxqMB2aAhF8WauJ3fltn2kb90moGBkiiEdooGIg55w==
dependencies:
argparse "^1.0.7"
entities "~1.1.1"
Expand Down
1 change: 1 addition & 0 deletions scripts/code.bat
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ set VSCODE_CLI=1
set ELECTRON_DEFAULT_ERROR_MODE=1
set ELECTRON_ENABLE_LOGGING=1
set ELECTRON_ENABLE_STACK_DUMPING=1
set VSCODE_LOGS=

:: Launch Code

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ import { IConfigurationResolverService } from 'vs/workbench/services/configurati
import { IFileService } from 'vs/platform/files/common/files';
import * as pfs from 'vs/base/node/pfs';
import { getRandomTestPath } from 'vs/base/test/node/testUtils';
import { IWorkbenchConstructionOptions } from 'vs/workbench/workbench.web.api';

class TestEnvironmentService implements IWorkbenchEnvironmentService {
logFile: URI;
options?: IWorkbenchConstructionOptions;
galleryMachineIdResource?: URI;
webviewCspSource: string;
webviewCspRule: string;
localeResource: URI;
Expand Down
12 changes: 2 additions & 10 deletions src/vs/base/browser/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1186,22 +1186,14 @@ export function animate(fn: () => void): IDisposable {
return toDisposable(() => stepDisposable.dispose());
}



const _location = URI.parse(window.location.href);
RemoteAuthorities.setPreferredWebSchema(/^https:/.test(window.location.href) ? 'https' : 'http');

export function asDomUri(uri: URI): URI {
if (!uri) {
return uri;
}
if (Schemas.vscodeRemote === uri.scheme) {
if (platform.isWeb) {
// rewrite vscode-remote-uris to uris of the window location
// so that they can be intercepted by the service worker
return _location.with({ path: '/vscode-remote', query: JSON.stringify(uri) });
} else {
return RemoteAuthorities.rewrite(uri.authority, uri.path);
}
return RemoteAuthorities.rewrite(uri.authority, uri.path);
}
return uri;
}
Expand Down
4 changes: 3 additions & 1 deletion src/vs/base/browser/markdownRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,11 @@ export function renderMarkdown(markdown: IMarkdownString, options: MarkdownRende
allowedAttributes: {
'a': ['href', 'name', 'target', 'data-href'],
'iframe': ['allowfullscreen', 'frameborder', 'src'],
'img': ['src', 'title', 'alt', 'width', 'height']
'img': ['src', 'title', 'alt', 'width', 'height'],
'div': ['class', 'data-code']
}
});

signalInnerHTML!();

return element;
Expand Down
14 changes: 8 additions & 6 deletions src/vs/base/browser/ui/findinput/findInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export interface IFindInputOptions extends IFindInputStyles {
readonly validation?: IInputValidator;
readonly label: string;
readonly flexibleHeight?: boolean;
readonly flexibleWidth?: boolean;
readonly flexibleMaxHeight?: number;

readonly appendCaseSensitiveLabel?: string;
readonly appendWholeWordsLabel?: string;
Expand Down Expand Up @@ -119,6 +121,8 @@ export class FindInput extends Widget {
const appendRegexLabel = options.appendRegexLabel || '';
const history = options.history || [];
const flexibleHeight = !!options.flexibleHeight;
const flexibleWidth = !!options.flexibleWidth;
const flexibleMaxHeight = options.flexibleMaxHeight;

this.domNode = document.createElement('div');
dom.addClass(this.domNode, 'monaco-findInput');
Expand All @@ -142,7 +146,9 @@ export class FindInput extends Widget {
inputValidationErrorForeground: this.inputValidationErrorForeground,
inputValidationErrorBorder: this.inputValidationErrorBorder,
history,
flexibleHeight
flexibleHeight,
flexibleWidth,
flexibleMaxHeight
}));

this.regex = this._register(new RegexCheckbox({
Expand Down Expand Up @@ -194,11 +200,7 @@ export class FindInput extends Widget {
}));

if (this._showOptionButtons) {
const paddingRight = (this.caseSensitive.width() + this.wholeWords.width() + this.regex.width()) + 'px';
this.inputBox.inputElement.style.paddingRight = paddingRight;
if (this.inputBox.mirrorElement) {
this.inputBox.mirrorElement.style.paddingRight = paddingRight;
}
this.inputBox.paddingRight = this.caseSensitive.width() + this.wholeWords.width() + this.regex.width();
}

// Arrow-Key support to navigate between options
Expand Down
Loading

0 comments on commit 985bfae

Please sign in to comment.