diff --git a/.github/workflows/author-verified.yml b/.github/workflows/author-verified.yml index 33b4b607615..2a24e793ac6 100644 --- a/.github/workflows/author-verified.yml +++ b/.github/workflows/author-verified.yml @@ -1,9 +1,5 @@ name: Author Verified on: - repository_dispatch: - types: [trigger-author-verified] - schedule: - - cron: 20 14 * * * # 4:20pm Zurich issues: types: [closed] @@ -13,28 +9,22 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Actions - if: github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'author-verification-requested') + if: contains(github.event.issue.labels.*.name, 'author-verification-requested') && contains(github.event.issue.labels.*.name, 'insiders-released') uses: actions/checkout@v2 with: repository: "microsoft/vscode-github-triage-actions" - ref: v42 + ref: stable path: ./actions - name: Install Actions - if: github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'author-verification-requested') + if: contains(github.event.issue.labels.*.name, 'author-verification-requested') && contains(github.event.issue.labels.*.name, 'insiders-released') run: npm install --production --prefix ./actions - - name: Checkout Repo - if: github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'author-verification-requested') - uses: actions/checkout@v2 - with: - path: ./repo - fetch-depth: 0 - name: Run Author Verified - if: github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'author-verification-requested') + if: contains(github.event.issue.labels.*.name, 'author-verification-requested') && contains(github.event.issue.labels.*.name, 'insiders-released') uses: ./actions/author-verified with: appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}} token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}} - requestVerificationComment: "This bug has been fixed in to the latest release of [VS Code Insiders](https://code.visualstudio.com/insiders/)!\n\n@${author}, you can help us out by commenting `/verified` if things are now working as expected.\n\nIf things still don't seem right, please ensure you're on version ${commit} of Insiders (today's or later - you can use `Help: About` in the command palette to check), and leave a comment letting us know what isn't working as expected.\n\nHappy Coding!" - pendingReleaseLabel: awaiting-insiders-release + requestVerificationComment: "This bug has been fixed in the latest release of [VS Code Insiders](https://code.visualstudio.com/insiders/)!\n\n@${author}, you can help us out by commenting `/verified` if things are now working as expected.\n\nIf things still don't seem right, please ensure you're on version ${commit} of Insiders (today's or later - you can use `Help: About` in the command palette to check), and leave a comment letting us know what isn't working as expected.\n\nHappy Coding!" + releasedLabel: insiders-released verifiedLabel: verified authorVerificationRequestedLabel: author-verification-requested diff --git a/.github/workflows/deep-classifier-monitor.yml b/.github/workflows/deep-classifier-monitor.yml index e8ad08aab97..106266d0cff 100644 --- a/.github/workflows/deep-classifier-monitor.yml +++ b/.github/workflows/deep-classifier-monitor.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 with: repository: "microsoft/vscode-github-triage-actions" - ref: v42 + ref: stable path: ./actions - name: Install Actions run: npm install --production --prefix ./actions diff --git a/.github/workflows/deep-classifier-runner.yml b/.github/workflows/deep-classifier-runner.yml index af42751b6fe..674b35d0b78 100644 --- a/.github/workflows/deep-classifier-runner.yml +++ b/.github/workflows/deep-classifier-runner.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v2 with: repository: "microsoft/vscode-github-triage-actions" - ref: v42 + ref: stable path: ./actions - name: Install Actions run: npm install --production --prefix ./actions diff --git a/.github/workflows/deep-classifier-scraper.yml b/.github/workflows/deep-classifier-scraper.yml index 837e569689e..78a9b7f9f17 100644 --- a/.github/workflows/deep-classifier-scraper.yml +++ b/.github/workflows/deep-classifier-scraper.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 with: repository: "microsoft/vscode-github-triage-actions" - ref: v42 + ref: stable path: ./actions - name: Install Actions run: npm install --production --prefix ./actions diff --git a/.github/workflows/english-please.yml b/.github/workflows/english-please.yml index 70ae98f4002..a11a9a357c6 100644 --- a/.github/workflows/english-please.yml +++ b/.github/workflows/english-please.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v2 with: repository: "microsoft/vscode-github-triage-actions" - ref: v42 + ref: stable path: ./actions - name: Install Actions if: contains(github.event.issue.labels.*.name, '*english-please') diff --git a/.github/workflows/feature-request.yml b/.github/workflows/feature-request.yml index 22307714747..bce7976b0c6 100644 --- a/.github/workflows/feature-request.yml +++ b/.github/workflows/feature-request.yml @@ -18,7 +18,7 @@ jobs: with: repository: "microsoft/vscode-github-triage-actions" path: ./actions - ref: v42 + ref: stable - name: Install Actions if: github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'feature-request') run: npm install --production --prefix ./actions diff --git a/.github/workflows/latest-release-monitor.yml b/.github/workflows/latest-release-monitor.yml index bc4b6b55799..34148088b94 100644 --- a/.github/workflows/latest-release-monitor.yml +++ b/.github/workflows/latest-release-monitor.yml @@ -14,7 +14,7 @@ jobs: with: repository: "microsoft/vscode-github-triage-actions" path: ./actions - ref: v42 + ref: stable - name: Install Actions run: npm install --production --prefix ./actions - name: Install Storage Module diff --git a/.github/workflows/locker.yml b/.github/workflows/locker.yml index 3cdf09ba68c..d0840daf02b 100644 --- a/.github/workflows/locker.yml +++ b/.github/workflows/locker.yml @@ -14,7 +14,7 @@ jobs: with: repository: "microsoft/vscode-github-triage-actions" path: ./actions - ref: v42 + ref: stable - name: Install Actions run: npm install --production --prefix ./actions - name: Run Locker diff --git a/.github/workflows/needs-more-info-closer.yml b/.github/workflows/needs-more-info-closer.yml index d1f9a824dcd..bff4ce82697 100644 --- a/.github/workflows/needs-more-info-closer.yml +++ b/.github/workflows/needs-more-info-closer.yml @@ -14,7 +14,7 @@ jobs: with: repository: "microsoft/vscode-github-triage-actions" path: ./actions - ref: v42 + ref: stable - name: Install Actions run: npm install --production --prefix ./actions - name: Run Needs More Info Closer diff --git a/.github/workflows/commands.yml b/.github/workflows/on-comment.yml similarity index 63% rename from .github/workflows/commands.yml rename to .github/workflows/on-comment.yml index f189a10a2cd..8d661336a89 100644 --- a/.github/workflows/commands.yml +++ b/.github/workflows/on-comment.yml @@ -1,4 +1,4 @@ -name: Commands +name: On Comment on: issue_comment: types: [created] @@ -13,7 +13,7 @@ jobs: with: repository: "microsoft/vscode-github-triage-actions" path: ./actions - ref: v42 + ref: stable - name: Install Actions run: npm install --production --prefix ./actions - name: Run Commands @@ -22,3 +22,10 @@ jobs: appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}} token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}} config-path: commands + - name: "Run Release Pipeline Labeler" + uses: ./actions/release-pipeline + with: + token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}} + appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}} + notYetReleasedLabel: unreleased + insidersReleasedLabel: insiders-released diff --git a/.github/workflows/on-label.yml b/.github/workflows/on-label.yml index 86bbecb6884..9d62de8e57c 100644 --- a/.github/workflows/on-label.yml +++ b/.github/workflows/on-label.yml @@ -11,29 +11,25 @@ jobs: uses: actions/checkout@v2 with: repository: "microsoft/vscode-github-triage-actions" - ref: v42 + ref: stable path: ./actions - name: Install Actions run: npm install --production --prefix ./actions # source of truth in ./author-verified.yml - - name: Checkout Repo - if: contains(github.event.issue.labels.*.name, 'author-verification-requested') - uses: actions/checkout@v2 - with: - path: ./repo - fetch-depth: 0 - name: Run Author Verified - if: contains(github.event.issue.labels.*.name, 'author-verification-requested') + if: contains(github.event.issue.labels.*.name, 'author-verification-requested') && contains(github.event.issue.labels.*.name, 'insiders-released') uses: ./actions/author-verified with: appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}} - requestVerificationComment: "This bug has been fixed in to the latest release of [VS Code Insiders](https://code.visualstudio.com/insiders/)!\n\n@${author}, you can help us out by confirming things are working as expected in the latest Insiders release. If things look good, please leave a comment with the text `/verified` to let us know. If not, please ensure you're on version ${commit} of Insiders (today's or later - you can use `Help: About` in the command palette to check), and leave a comment letting us know what isn't working as expected.\n\nHappy Coding!" - pendingReleaseLabel: awaiting-insiders-release + token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}} + requestVerificationComment: "This bug has been fixed in the latest release of [VS Code Insiders](https://code.visualstudio.com/insiders/)!\n\n@${author}, you can help us out by commenting `/verified` if things are now working as expected.\n\nIf things still don't seem right, please ensure you're on version ${commit} of Insiders (today's or later - you can use `Help: About` in the command palette to check), and leave a comment letting us know what isn't working as expected.\n\nHappy Coding!" + releasedLabel: insiders-released verifiedLabel: verified authorVerificationRequestedLabel: author-verification-requested - # source of truth in ./commands.yml + + # also make changes in ./on-comment.yml - name: Run Commands uses: ./actions/commands with: diff --git a/.github/workflows/on-open.yml b/.github/workflows/on-open.yml index c500a0e2b76..e5dc42ac44a 100644 --- a/.github/workflows/on-open.yml +++ b/.github/workflows/on-open.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 with: repository: "microsoft/vscode-github-triage-actions" - ref: v42 + ref: stable path: ./actions - name: Install Actions run: npm install --production --prefix ./actions diff --git a/.github/workflows/release-pipeline-labeler.yml b/.github/workflows/release-pipeline-labeler.yml index edb01fa5278..0124667d4a8 100644 --- a/.github/workflows/release-pipeline-labeler.yml +++ b/.github/workflows/release-pipeline-labeler.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v2 with: repository: "microsoft/vscode-github-triage-actions" - ref: v42 + ref: stable path: ./actions - name: Checkout Repo if: github.event_name != 'issues' diff --git a/.github/workflows/test-plan-item-validator.yml b/.github/workflows/test-plan-item-validator.yml index 72c21346370..3d381236e09 100644 --- a/.github/workflows/test-plan-item-validator.yml +++ b/.github/workflows/test-plan-item-validator.yml @@ -14,7 +14,7 @@ jobs: with: repository: "microsoft/vscode-github-triage-actions" path: ./actions - ref: v42 + ref: stable - name: Install Actions if: contains(github.event.issue.labels.*.name, 'testplan-item') || contains(github.event.issue.labels.*.name, 'invalid-testplan-item') run: npm install --production --prefix ./actions diff --git a/.mailmap b/.mailmap index d54a71fdf1f..bd9e4941e50 100644 --- a/.mailmap +++ b/.mailmap @@ -1,2 +1,5 @@ Eric Amodio Eric Amodio Daniel Imms Daniel Imms +Tanha Kabir Tanha Kabir +Raymond Zhao +Tyler Leonhardt Tyler Leonhardt diff --git a/.yarnrc b/.yarnrc index 9738cd535ab..c157931dce7 100644 --- a/.yarnrc +++ b/.yarnrc @@ -1,3 +1,3 @@ disturl "https://electronjs.org/headers" -target "11.2.2" +target "11.2.3" runtime "electron" diff --git a/build/lib/i18n.resources.json b/build/lib/i18n.resources.json index bb2ed8a7e41..9dc574614ff 100644 --- a/build/lib/i18n.resources.json +++ b/build/lib/i18n.resources.json @@ -218,6 +218,10 @@ "name": "vs/workbench/contrib/webviewPanel", "project": "vscode-workbench" }, + { + "name": "vs/workbench/contrib/workspace", + "project": "vscode-workbench" + }, { "name": "vs/workbench/contrib/workspaces", "project": "vscode-workbench" diff --git a/cgmanifest.json b/cgmanifest.json index f9aa3cd5fb0..0459d39bfe7 100644 --- a/cgmanifest.json +++ b/cgmanifest.json @@ -60,12 +60,12 @@ "git": { "name": "electron", "repositoryUrl": "https://github.com/electron/electron", - "commitHash": "805e442ff873e10735a1ea18021f491597afa885" + "commitHash": "137f45750f7319442c511183c0ad0f3c4fe7e07a" } }, "isOnlyProductionDependency": true, "license": "MIT", - "version": "11.2.2" + "version": "11.2.3" }, { "component": { diff --git a/extensions/bat/package.json b/extensions/bat/package.json index 5d36ae73ab3..f01e5d35ab2 100644 --- a/extensions/bat/package.json +++ b/extensions/bat/package.json @@ -9,7 +9,7 @@ "vscode": "^1.52.0" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater mmims/language-batchfile grammars/batchfile.cson ./syntaxes/batchfile.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin mmims/language-batchfile grammars/batchfile.cson ./syntaxes/batchfile.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/clojure/package.json b/extensions/clojure/package.json index b2c5cf3a577..4ea659b3b91 100644 --- a/extensions/clojure/package.json +++ b/extensions/clojure/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater atom/language-clojure grammars/clojure.cson ./syntaxes/clojure.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin atom/language-clojure grammars/clojure.cson ./syntaxes/clojure.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/coffeescript/package.json b/extensions/coffeescript/package.json index 5cfd96f4b86..e8fda02d0a3 100644 --- a/extensions/coffeescript/package.json +++ b/extensions/coffeescript/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater atom/language-coffee-script grammars/coffeescript.cson ./syntaxes/coffeescript.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin atom/language-coffee-script grammars/coffeescript.cson ./syntaxes/coffeescript.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/csharp/package.json b/extensions/csharp/package.json index 3d79e1ab112..df77c14cdf9 100644 --- a/extensions/csharp/package.json +++ b/extensions/csharp/package.json @@ -9,7 +9,7 @@ "vscode": "0.10.x" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater dotnet/csharp-tmLanguage grammars/csharp.tmLanguage ./syntaxes/csharp.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin dotnet/csharp-tmLanguage grammars/csharp.tmLanguage ./syntaxes/csharp.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/css/package.json b/extensions/css/package.json index 4e7e307e65b..6b3d8aebc8c 100644 --- a/extensions/css/package.json +++ b/extensions/css/package.json @@ -9,7 +9,7 @@ "vscode": "0.10.x" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater octref/language-css grammars/css.cson ./syntaxes/css.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin octref/language-css grammars/css.cson ./syntaxes/css.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/docker/package.json b/extensions/docker/package.json index 9d36db0825e..cdda622a22f 100644 --- a/extensions/docker/package.json +++ b/extensions/docker/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater moby/moby contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage ./syntaxes/docker.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin moby/moby contrib/syntax/textmate/Docker.tmbundle/Syntaxes/Dockerfile.tmLanguage ./syntaxes/docker.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/emmet/package.json b/extensions/emmet/package.json index 4fe4b5f4bac..c786c715cde 100644 --- a/extensions/emmet/package.json +++ b/extensions/emmet/package.json @@ -439,7 +439,7 @@ "@emmetio/html-matcher": "^0.3.3", "@emmetio/math-expression": "^1.0.4", "image-size": "^0.5.2", - "vscode-emmet-helper": "2.2.4-3", + "vscode-emmet-helper": "2.2.4", "vscode-languageserver-textdocument": "^1.0.1" } } diff --git a/extensions/emmet/yarn.lock b/extensions/emmet/yarn.lock index b2b572223e9..bebce02cf48 100644 --- a/extensions/emmet/yarn.lock +++ b/extensions/emmet/yarn.lock @@ -75,10 +75,10 @@ jsonc-parser@^2.3.0: resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.3.1.tgz#59549150b133f2efacca48fe9ce1ec0659af2342" integrity sha512-H8jvkz1O50L3dMZCsLqiuB2tA7muqbSg1AtGEkN0leAqGjsUzDJir3Zwr02BhqdcITPg3ei3mZ+HjMocAknhhg== -vscode-emmet-helper@2.2.4-3: - version "2.2.4-3" - resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-2.2.4-3.tgz#b1aed7eaaf0ecc2480c65c819f6e9d42d2d3cf5a" - integrity sha512-M+pAiAro8nRiHb0/9lRoRzBod6DPlSwhOX26ZfM8n9a7/zr9ZJojxohDyGmnsApU5xVPhcrsNVI/fEagSeeO0Q== +vscode-emmet-helper@2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-2.2.4.tgz#8ab86d2b7fe9e6270b4c77c9fd8d1eb8f3f4c401" + integrity sha512-1N6bMzP1ZzkDGzamvsKxQ/lOmBc4+OQdj0dA2C9A5PSeYV9gh5xbJ061sm+VyFHOGZE+VyUQq5m/WFmFsLbKnA== dependencies: emmet "https://github.com/rzhao271/emmet.git#1b2df677d8925ef5ea6da9df8845968403979a0a" jsonc-parser "^2.3.0" diff --git a/extensions/fsharp/package.json b/extensions/fsharp/package.json index 3222205ce42..b6c07d40b1b 100644 --- a/extensions/fsharp/package.json +++ b/extensions/fsharp/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater ionide/ionide-fsgrammar grammars/fsharp.json ./syntaxes/fsharp.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin ionide/ionide-fsgrammar grammars/fsharp.json ./syntaxes/fsharp.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/git/src/commands.ts b/extensions/git/src/commands.ts index e8b45122de4..aabea31a725 100644 --- a/extensions/git/src/commands.ts +++ b/extensions/git/src/commands.ts @@ -5,7 +5,7 @@ import * as os from 'os'; import * as path from 'path'; -import { commands, Disposable, LineChange, MessageOptions, OutputChannel, Position, ProgressLocation, QuickPickItem, Range, SourceControlResourceState, TextDocumentShowOptions, TextEditor, Uri, ViewColumn, window, workspace, WorkspaceEdit, WorkspaceFolder, TimelineItem, env, Selection, TextDocumentContentProvider } from 'vscode'; +import { Command, commands, Disposable, LineChange, MessageOptions, OutputChannel, Position, ProgressLocation, QuickPickItem, Range, SourceControlResourceState, TextDocumentShowOptions, TextEditor, Uri, ViewColumn, window, workspace, WorkspaceEdit, WorkspaceFolder, TimelineItem, env, Selection, TextDocumentContentProvider } from 'vscode'; import TelemetryReporter from 'vscode-extension-telemetry'; import * as nls from 'vscode-nls'; import { Branch, ForcePushMode, GitErrorCodes, Ref, RefType, Status, CommitOptions, RemoteSourceProvider } from './api/git'; @@ -153,21 +153,21 @@ class AddRemoteItem implements QuickPickItem { } } -interface CommandOptions { +interface ScmCommandOptions { repository?: boolean; diff?: boolean; } -interface Command { +interface ScmCommand { commandId: string; key: string; method: Function; - options: CommandOptions; + options: ScmCommandOptions; } -const Commands: Command[] = []; +const Commands: ScmCommand[] = []; -function command(commandId: string, options: CommandOptions = {}): Function { +function command(commandId: string, options: ScmCommandOptions = {}): Function { return (_target: any, key: string, descriptor: any) => { if (!(typeof descriptor.value === 'function')) { throw new Error('not supported'); @@ -2612,6 +2612,22 @@ export class CommandCenter { @command('git.timeline.openDiff', { repository: false }) async timelineOpenDiff(item: TimelineItem, uri: Uri | undefined, _source: string) { + const cmd = this.resolveTimelineOpenDiffCommand( + item, uri, + { + preserveFocus: true, + preview: true, + viewColumn: ViewColumn.Active + }, + ); + if (cmd === undefined) { + return undefined; + } + + return commands.executeCommand(cmd.command, ...(cmd.arguments ?? [])); + } + + resolveTimelineOpenDiffCommand(item: TimelineItem, uri: Uri | undefined, options?: TextDocumentShowOptions): Command | undefined { if (uri === undefined || uri === null || !GitTimelineItem.is(item)) { return undefined; } @@ -2628,13 +2644,11 @@ export class CommandCenter { title = localize('git.title.diffRefs', '{0} ({1}) ⟷ {0} ({2})', basename, item.shortPreviousRef, item.shortRef); } - const options: TextDocumentShowOptions = { - preserveFocus: true, - preview: true, - viewColumn: ViewColumn.Active + return { + command: 'vscode.diff', + title: 'Open Comparison', + arguments: [toGitUri(uri, item.previousRef), item.ref === '' ? uri : toGitUri(uri, item.ref), title, options] }; - - return commands.executeCommand('vscode.diff', toGitUri(uri, item.previousRef), item.ref === '' ? uri : toGitUri(uri, item.ref), title, options); } @command('git.timeline.copyCommitId', { repository: false }) @@ -2664,7 +2678,7 @@ export class CommandCenter { } } - private createCommand(id: string, key: string, method: Function, options: CommandOptions): (...args: any[]) => any { + private createCommand(id: string, key: string, method: Function, options: ScmCommandOptions): (...args: any[]) => any { const result = (...args: any[]) => { let result: Promise; diff --git a/extensions/git/src/main.ts b/extensions/git/src/main.ts index d5c81c8891f..f391996c968 100644 --- a/extensions/git/src/main.ts +++ b/extensions/git/src/main.ts @@ -73,12 +73,13 @@ async function createModel(context: ExtensionContext, outputChannel: OutputChann git.onOutput.addListener('log', onOutput); disposables.push(toDisposable(() => git.onOutput.removeListener('log', onOutput))); + const cc = new CommandCenter(git, model, outputChannel, telemetryReporter); disposables.push( - new CommandCenter(git, model, outputChannel, telemetryReporter), + cc, new GitFileSystemProvider(model), new GitDecorations(model), new GitProtocolHandler(), - new GitTimelineProvider(model) + new GitTimelineProvider(model, cc) ); checkGitVersion(info); diff --git a/extensions/git/src/timelineProvider.ts b/extensions/git/src/timelineProvider.ts index f00302f61ad..5a9a1390bf1 100644 --- a/extensions/git/src/timelineProvider.ts +++ b/extensions/git/src/timelineProvider.ts @@ -9,6 +9,7 @@ import { Model } from './model'; import { Repository, Resource } from './repository'; import { debounce } from './decorators'; import { emojify, ensureEmojis } from './emoji'; +import { CommandCenter } from './commands'; const localize = nls.loadMessageBundle(); @@ -73,7 +74,7 @@ export class GitTimelineProvider implements TimelineProvider { private repoDisposable: Disposable | undefined; private repoStatusDate: Date | undefined; - constructor(private readonly model: Model) { + constructor(private readonly model: Model, private commands: CommandCenter) { this.disposable = Disposable.from( model.onDidOpenRepository(this.onRepositoriesChanged, this), workspace.onDidChangeConfiguration(this.onConfigurationChanged, this) @@ -161,16 +162,20 @@ export class GitTimelineProvider implements TimelineProvider { const message = emojify(c.message); const item = new GitTimelineItem(c.hash, commits[i + 1]?.hash ?? `${c.hash}^`, message, date?.getTime() ?? 0, c.hash, 'git:file:commit'); - item.iconPath = new (ThemeIcon as any)('git-commit'); + item.iconPath = new ThemeIcon('git-commit'); if (showAuthor) { item.description = c.authorName; } item.detail = `${c.authorName} (${c.authorEmail}) — ${c.hash.substr(0, 8)}\n${dateFormatter.format(date)}\n\n${message}`; - item.command = { - title: 'Open Comparison', - command: 'git.timeline.openDiff', - arguments: [item, uri, this.id] - }; + + const cmd = this.commands.resolveTimelineOpenDiffCommand(item, uri); + if (cmd) { + item.command = { + title: 'Open Comparison', + command: cmd.command, + arguments: cmd.arguments, + }; + } return item; }); @@ -184,14 +189,18 @@ export class GitTimelineProvider implements TimelineProvider { const item = new GitTimelineItem('~', 'HEAD', localize('git.timeline.stagedChanges', 'Staged Changes'), date.getTime(), 'index', 'git:file:index'); // TODO@eamodio: Replace with a better icon -- reflecting its status maybe? - item.iconPath = new (ThemeIcon as any)('git-commit'); + item.iconPath = new ThemeIcon('git-commit'); item.description = ''; item.detail = localize('git.timeline.detail', '{0} — {1}\n{2}\n\n{3}', you, localize('git.index', 'Index'), dateFormatter.format(date), Resource.getStatusText(index.type)); - item.command = { - title: 'Open Comparison', - command: 'git.timeline.openDiff', - arguments: [item, uri, this.id] - }; + + const cmd = this.commands.resolveTimelineOpenDiffCommand(item, uri); + if (cmd) { + item.command = { + title: 'Open Comparison', + command: cmd.command, + arguments: cmd.arguments, + }; + } items.splice(0, 0, item); } @@ -202,14 +211,18 @@ export class GitTimelineProvider implements TimelineProvider { const item = new GitTimelineItem('', index ? '~' : 'HEAD', localize('git.timeline.uncommitedChanges', 'Uncommitted Changes'), date.getTime(), 'working', 'git:file:working'); // TODO@eamodio: Replace with a better icon -- reflecting its status maybe? - item.iconPath = new (ThemeIcon as any)('git-commit'); + item.iconPath = new ThemeIcon('git-commit'); item.description = ''; item.detail = localize('git.timeline.detail', '{0} — {1}\n{2}\n\n{3}', you, localize('git.workingTree', 'Working Tree'), dateFormatter.format(date), Resource.getStatusText(working.type)); - item.command = { - title: 'Open Comparison', - command: 'git.timeline.openDiff', - arguments: [item, uri, this.id] - }; + + const cmd = this.commands.resolveTimelineOpenDiffCommand(item, uri); + if (cmd) { + item.command = { + title: 'Open Comparison', + command: cmd.command, + arguments: cmd.arguments, + }; + } items.splice(0, 0, item); } diff --git a/extensions/go/package.json b/extensions/go/package.json index 520e13715aa..7b3bc14971a 100644 --- a/extensions/go/package.json +++ b/extensions/go/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater jeff-hykin/better-go-syntax export/generated.tmLanguage.json ./syntaxes/go.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin jeff-hykin/better-go-syntax export/generated.tmLanguage.json ./syntaxes/go.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/groovy/package.json b/extensions/groovy/package.json index ce5ca27ad9d..a7000f89e20 100644 --- a/extensions/groovy/package.json +++ b/extensions/groovy/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater textmate/groovy.tmbundle Syntaxes/Groovy.tmLanguage ./syntaxes/groovy.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin textmate/groovy.tmbundle Syntaxes/Groovy.tmLanguage ./syntaxes/groovy.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/handlebars/package.json b/extensions/handlebars/package.json index 9d6d6481146..0eb6cb2eb2b 100644 --- a/extensions/handlebars/package.json +++ b/extensions/handlebars/package.json @@ -9,7 +9,7 @@ "vscode": "0.10.x" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater daaain/Handlebars grammars/Handlebars.json ./syntaxes/Handlebars.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin daaain/Handlebars grammars/Handlebars.json ./syntaxes/Handlebars.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/hlsl/package.json b/extensions/hlsl/package.json index 5c8017addbd..046ff9b31c8 100644 --- a/extensions/hlsl/package.json +++ b/extensions/hlsl/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater tgjones/shaders-tmLanguage grammars/hlsl.json ./syntaxes/hlsl.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin tgjones/shaders-tmLanguage grammars/hlsl.json ./syntaxes/hlsl.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/ini/package.json b/extensions/ini/package.json index acc07eff465..324e4c87f6e 100644 --- a/extensions/ini/package.json +++ b/extensions/ini/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater textmate/ini.tmbundle Syntaxes/Ini.plist ./syntaxes/ini.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin textmate/ini.tmbundle Syntaxes/Ini.plist ./syntaxes/ini.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/java/package.json b/extensions/java/package.json index 01383db29e9..d71aa1c146c 100644 --- a/extensions/java/package.json +++ b/extensions/java/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater atom/language-java grammars/java.cson ./syntaxes/java.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin atom/language-java grammars/java.cson ./syntaxes/java.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/julia/.vscodeignore b/extensions/julia/.vscodeignore new file mode 100644 index 00000000000..d9011becfb6 --- /dev/null +++ b/extensions/julia/.vscodeignore @@ -0,0 +1,2 @@ +build/** +cgmanifest.json diff --git a/extensions/julia/cgmanifest.json b/extensions/julia/cgmanifest.json new file mode 100644 index 00000000000..9d03ce0d90c --- /dev/null +++ b/extensions/julia/cgmanifest.json @@ -0,0 +1,17 @@ +{ + "registrations": [ + { + "component": { + "type": "git", + "git": { + "name": " JuliaEditorSupport/atom-language-julia", + "repositoryUrl": "https://github.com/JuliaEditorSupport/atom-language-julia", + "commitHash": "8ae8d9cac742c65ae0bef1a5e2d068e2cae871bc" + } + }, + "license": "MIT", + "version": "0.21.0" + } + ], + "version": 1 +} \ No newline at end of file diff --git a/extensions/julia/language-configuration.json b/extensions/julia/language-configuration.json new file mode 100644 index 00000000000..ea2f5011739 --- /dev/null +++ b/extensions/julia/language-configuration.json @@ -0,0 +1,31 @@ +{ + "comments": { + "lineComment": "#", + "blockComment": [ "#=", "=#" ] + }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "autoClosingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["`", "`"], + { "open": "\"", "close": "\"", "notIn": ["string", "comment"] } + ], + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""], + ["`", "`"] + ], + "folding": { + "markers": { + "start": "^\\s*#region", + "end": "^\\s*#endregion" + } + } +} diff --git a/extensions/julia/package.json b/extensions/julia/package.json new file mode 100644 index 00000000000..971ad4fe96e --- /dev/null +++ b/extensions/julia/package.json @@ -0,0 +1,54 @@ +{ + "name": "julia", + "displayName": "%displayName%", + "description": "%description%", + "version": "1.0.0", + "publisher": "vscode", + "license": "MIT", + "engines": { + "vscode": "0.10.x" + }, + "scripts": { + "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater JuliaEditorSupport/atom-language-julia grammars/julia_vscode.json ./syntaxes/julia.tmLanguage.json" + }, + "contributes": { + "languages": [ + { + "id": "julia", + "aliases": [ + "Julia", + "julia" + ], + "extensions": [ + ".jl" + ], + "firstLine": "^#!\\s*/.*\\bjulia[0-9.-]*\\b", + "configuration": "./language-configuration.json" + }, + { + "id": "juliamarkdown", + "aliases": [ + "Julia Markdown", + "juliamarkdown" + ], + "extensions": [ + ".jmd" + ] + } + ], + "grammars": [ + { + "language": "julia", + "scopeName": "source.julia", + "path": "./syntaxes/julia.tmLanguage.json", + "embeddedLanguages": { + "meta.embedded.inline.cpp": "cpp", + "meta.embedded.inline.javascript": "javascript", + "meta.embedded.inline.python": "python", + "meta.embedded.inline.r": "r", + "meta.embedded.inline.sql": "sql" + } + } + ] + } +} diff --git a/extensions/julia/package.nls.json b/extensions/julia/package.nls.json new file mode 100644 index 00000000000..0da344107c1 --- /dev/null +++ b/extensions/julia/package.nls.json @@ -0,0 +1,4 @@ +{ + "displayName": "Julia Language Basics", + "description": "Provides syntax highlighting & bracket matching in Julia files." +} diff --git a/extensions/julia/syntaxes/julia.tmLanguage.json b/extensions/julia/syntaxes/julia.tmLanguage.json new file mode 100644 index 00000000000..c18a377c8b9 --- /dev/null +++ b/extensions/julia/syntaxes/julia.tmLanguage.json @@ -0,0 +1,1113 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/JuliaEditorSupport/atom-language-julia/blob/master/grammars/julia_vscode.json", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/JuliaEditorSupport/atom-language-julia/commit/8ae8d9cac742c65ae0bef1a5e2d068e2cae871bc", + "name": "Julia", + "scopeName": "source.julia", + "comment": "This grammar is used by Atom (Oniguruma), GitHub (PCRE), and VSCode (Oniguruma),\nso all regexps must be compatible with both engines.\n\nSpecs:\n- https://github.com/kkos/oniguruma/blob/master/doc/RE\n- https://www.pcre.org/current/doc/html/", + "patterns": [ + { + "include": "#operator" + }, + { + "include": "#array" + }, + { + "include": "#string" + }, + { + "include": "#bracket" + }, + { + "include": "#function_decl" + }, + { + "include": "#function_call" + }, + { + "include": "#keyword" + }, + { + "include": "#number" + }, + { + "include": "#comment" + }, + { + "include": "#type_decl" + }, + { + "include": "#symbol" + } + ], + "repository": { + "array": { + "patterns": [ + { + "begin": "\\[", + "beginCaptures": { + "0": { + "name": "meta.bracket.julia" + } + }, + "end": "(?:\\])(?:(\\.)?'*)", + "endCaptures": { + "0": { + "name": "meta.bracket.julia" + }, + "1": { + "name": "keyword.operator.transpose.julia" + } + }, + "name": "meta.array.julia", + "patterns": [ + { + "match": "\\bbegin\\b", + "name": "constant.numeric.julia" + }, + { + "match": "\\bend\\b", + "name": "constant.numeric.julia" + }, + { + "match": "\\bfor\\b", + "name": "keyword.control.julia" + }, + { + "include": "$self" + } + ] + } + ] + }, + "bracket": { + "patterns": [ + { + "match": "(?:\\(|\\)|\\[|\\]|\\{|\\}|,|;)(?!('|(?:\\.'))*\\.?')", + "name": "meta.bracket.julia" + } + ] + }, + "comment": { + "patterns": [ + { + "include": "#comment_block" + }, + { + "begin": "#", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.julia" + } + }, + "end": "\\n", + "name": "comment.line.number-sign.julia" + } + ] + }, + "comment_block": { + "patterns": [ + { + "begin": "#=", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.begin.julia" + } + }, + "end": "=#", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.end.julia" + } + }, + "name": "comment.block.number-sign-equals.julia", + "patterns": [ + { + "include": "#comment_block" + } + ] + } + ] + }, + "function_call": { + "patterns": [ + { + "begin": "((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*)({(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})?\\.?(?=\\()", + "beginCaptures": { + "1": { + "name": "support.function.julia" + }, + "2": { + "name": "support.type.julia" + } + }, + "end": "\\)(('|(\\.'))*\\.?')?", + "endCaptures": { + "0": { + "name": "meta.bracket.julia" + }, + "1": { + "name": "keyword.operator.transposed-func.julia" + } + }, + "patterns": [ + { + "match": "\\bfor\\b", + "name": "keyword.control.julia" + }, + { + "include": "$self" + } + ] + } + ] + }, + "function_decl": { + "patterns": [ + { + "captures": { + "1": { + "name": "entity.name.function.julia" + }, + "2": { + "name": "support.type.julia" + } + }, + "match": "((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*)({(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})?(?=\\(.*\\)(::[^\\s]+)?(\\s*\\bwhere\\b\\s+.+?)?\\s*?=(?![=>]))", + "comment": "first group is function name\nSecond group is type parameters (e.g. {T<:Number, S})\nThen open parens\nThen a lookahead ensures that we are followed by:\n - anything (function argumnets)\n - 0 or more spaces\n - Finally an equal sign\nNegative lookahead ensures we don't have another equal sign (not `==`)" + }, + { + "captures": { + "1": { + "name": "keyword.other.julia" + }, + "2": { + "name": "keyword.operator.dots.julia" + }, + "3": { + "name": "entity.name.function.julia" + }, + "4": { + "name": "support.type.julia" + } + }, + "match": "\\b(function|macro)(?:\\s+(?:(?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*(\\.))?((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*)({(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})?|\\s*)(?=\\()", + "comment": "similar regex to previous, but with keyword not 1-line syntax" + } + ] + }, + "keyword": { + "patterns": [ + { + "match": "\\b(?|<-|-->|=>)", + "name": "keyword.operator.arrow.julia" + }, + { + "match": "(?::=|\\+=|-=|\\*=|//=|/=|\\.//=|\\./=|\\.\\*=|\\\\=|\\.\\\\=|\\^=|\\.\\^=|%=|\\.%=|÷=|\\.÷=|\\|=|&=|\\.&=|⊻=|\\.⊻=|\\$=|<<=|>>=|>>>=|=(?!=))", + "name": "keyword.operator.update.julia" + }, + { + "match": "(?:<<|>>>|>>|\\.>>>|\\.>>|\\.<<)", + "name": "keyword.operator.shift.julia" + }, + { + "match": "(?:\\s*(::|>:|<:)\\s*((?:(?:Union)?\\([^)]*\\)|[[:alpha:]_$∇][[:word:]⁺-ₜ!′\\.]*(?:(?:{(?:[^{}]|{(?:[^{}]|{[^{}]*})*})*})|(?:\".+?(?=|\\.>|\\.<=|\\.<|\\.≤|\\.≥|==|\\.!=|\\.=|\\.!|<:|>:|:>|(?)>=|(?|<|≥|≤)", + "name": "keyword.operator.relation.julia" + }, + { + "match": "(?<=\\s)(?:\\?)(?=\\s)", + "name": "keyword.operator.ternary.julia" + }, + { + "match": "(?<=\\s)(?:\\:)(?=\\s)", + "name": "keyword.operator.ternary.julia" + }, + { + "match": "(?:\\|\\||&&|(?)", + "name": "keyword.operator.applies.julia" + }, + { + "match": "(?:\\||\\.\\||\\&|\\.\\&|~|\\.~|⊻|\\.⊻)", + "name": "keyword.operator.bitwise.julia" + }, + { + "match": "(?:\\+\\+|--|\\+|\\.\\+|-|\\.\\-|\\*|\\.\\*|//(?!=)|\\.//(?!=)|/|\\./|%|\\.%|\\\\|\\.\\\\|\\^|\\.\\^|÷|\\.÷|⋅|\\.⋅|∩|\\.∩|∪|\\.∪|×|√|∛)", + "name": "keyword.operator.arithmetic.julia" + }, + { + "match": "(?:∘)", + "name": "keyword.operator.compose.julia" + }, + { + "match": "(?:::|(?<=\\s)isa(?=\\s))", + "name": "keyword.operator.isa.julia" + }, + { + "match": "(?:(?<=\\s)in(?=\\s))", + "name": "keyword.operator.relation.in.julia" + }, + { + "match": "(?:\\.(?=(?:@|_|\\p{L}))|\\.\\.+)", + "name": "keyword.operator.dots.julia" + }, + { + "match": "(?:\\$(?=.+))", + "name": "keyword.operator.interpolation.julia" + }, + { + "captures": { + "2": { + "name": "keyword.operator.transposed-variable.julia" + } + }, + "match": "((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*)(('|(\\.'))*\\.?')" + }, + { + "captures": { + "1": { + "name": "bracket.end.julia" + }, + "2": { + "name": "keyword.operator.transposed-matrix.julia" + } + }, + "match": "(\\])((?:'|(?:\\.'))*\\.?')" + }, + { + "captures": { + "1": { + "name": "bracket.end.julia" + }, + "2": { + "name": "keyword.operator.transposed-parens.julia" + } + }, + "match": "(\\))((?:'|(?:\\.'))*\\.?')" + } + ] + }, + "string": { + "patterns": [ + { + "begin": "(?:(@doc)\\s((?:doc)?\"\"\")|(doc\"\"\"))", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "(\"\"\") ?(->)?", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.julia" + }, + "2": { + "name": "keyword.operator.arrow.julia" + } + }, + "name": "string.docstring.julia", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(i?cxx)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.cxx.julia", + "contentName": "meta.embedded.inline.cpp", + "patterns": [ + { + "include": "source.cpp#root_context" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "((i?cxxt?)|([rpv]cpp))(\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "4": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"", + "name": "embed.cxx.julia", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "contentName": "meta.embedded.inline.cpp", + "patterns": [ + { + "include": "source.cpp#root_context" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(py)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "([\\s\\w]*)(\"\"\")", + "endCaptures": { + "2": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.python.julia", + "contentName": "meta.embedded.inline.python", + "patterns": [ + { + "include": "source.python" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(py)(\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "(\\w*)(\")", + "name": "embed.python.julia", + "endCaptures": { + "2": { + "name": "punctuation.definition.string.end.julia" + } + }, + "contentName": "meta.embedded.inline.python", + "patterns": [ + { + "include": "source.python" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(js)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.js.julia", + "contentName": "meta.embedded.inline.javascript", + "patterns": [ + { + "include": "source.js" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(js)(\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"", + "name": "embed.js.julia", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "contentName": "meta.embedded.inline.javascript", + "patterns": [ + { + "include": "source.js" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(R)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.R.julia", + "contentName": "meta.embedded.inline.r", + "patterns": [ + { + "include": "source.r" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(R)(\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"", + "name": "embed.R.julia", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "contentName": "meta.embedded.inline.r", + "patterns": [ + { + "include": "source.r" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(raw)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"\"\"", + "name": "string.quoted.other.julia", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + } + }, + { + "begin": "(raw)(\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"", + "name": "string.quoted.other.julia", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + } + }, + { + "begin": "(sql)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.sql.julia", + "contentName": "meta.embedded.inline.sql", + "patterns": [ + { + "include": "source.sql" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(sql)(\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.sql.julia", + "contentName": "meta.embedded.inline.sql", + "patterns": [ + { + "include": "source.sql" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "var\"\"\"", + "end": "\"\"\"", + "name": "constant.other.symbol.julia" + }, + { + "begin": "var\"", + "end": "\"", + "name": "constant.other.symbol.julia" + }, + { + "begin": "(md)(\"\"\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"\"\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "embed.markdown.julia", + "contentName": "meta.embedded.inline.markdown", + "patterns": [ + { + "include": "text.md" + }, + { + "include": "text.html.markdown.julia" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "(md)(\")", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "\"", + "name": "embed.markdown.julia", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "contentName": "meta.embedded.inline.markdown", + "patterns": [ + { + "include": "text.md" + }, + { + "include": "text.html.markdown.julia" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "^\\s?(doc)?(\"\"\")\\s?$", + "beginCaptures": { + "1": { + "name": "support.function.macro.julia" + }, + "2": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "(\"\"\")", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "string.docstring.julia", + "comment": "This only matches docstrings that start and end with triple quotes on\ntheir own line in the void", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_dollar_sign_interpolate" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.julia" + } + }, + "end": "'(?!')", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.julia" + } + }, + "name": "string.quoted.single.julia", + "patterns": [ + { + "include": "#string_escaped_char" + } + ] + }, + { + "begin": "(?!:_)(?:struct|mutable\\s+struct|abstract\\s+type|primitive\\s+type)\\s+((?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*)(\\s*(<:)\\s*(?:[[:alpha:]_\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{So}←-⇿])(?:[[:word:]_!\\p{Lu}\\p{Ll}\\p{Lt}\\p{Lm}\\p{Lo}\\p{Nl}\\p{Sc}⅀-⅄∿⊾⊿⊤⊥∂∅-∇∎∏∐∑∞∟∫-∳⋀-⋃◸-◿♯⟘⟙⟀⟁⦰-⦴⨀-⨆⨉-⨖⨛⨜𝛁𝛛𝛻𝜕𝜵𝝏𝝯𝞉𝞩𝟃ⁱ-⁾₁-₎∠-∢⦛-⦯℘℮゛-゜𝟎-𝟡]|[^\\P{Mn}\u0001-¡]|[^\\P{Mc}\u0001-¡]|[^\\P{Nd}\u0001-¡]|[^\\P{Pc}\u0001-¡]|[^\\P{Sk}\u0001-¡]|[^\\P{Me}\u0001-¡]|[^\\P{No}\u0001-¡]|[′-‷⁗]|[^\\P{So}←-⇿])*(?:{.*})?)?", + "name": "meta.type.julia" + } + ] + } + } +} \ No newline at end of file diff --git a/extensions/less/package.json b/extensions/less/package.json index 577307a75e1..5974be71933 100644 --- a/extensions/less/package.json +++ b/extensions/less/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater atom/language-less grammars/less.cson ./syntaxes/less.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin atom/language-less grammars/less.cson ./syntaxes/less.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/log/package.json b/extensions/log/package.json index 27b58c51eef..73093e1179a 100644 --- a/extensions/log/package.json +++ b/extensions/log/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater emilast/vscode-logfile-highlighter syntaxes/log.tmLanguage ./syntaxes/log.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin emilast/vscode-logfile-highlighter syntaxes/log.tmLanguage ./syntaxes/log.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/lua/package.json b/extensions/lua/package.json index cb4dfe97fbc..8161da9f705 100644 --- a/extensions/lua/package.json +++ b/extensions/lua/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater textmate/lua.tmbundle Syntaxes/Lua.plist ./syntaxes/lua.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin textmate/lua.tmbundle Syntaxes/Lua.plist ./syntaxes/lua.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/make/package.json b/extensions/make/package.json index f5fc2bb9bbc..ef8209df01c 100644 --- a/extensions/make/package.json +++ b/extensions/make/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater fadeevab/make.tmbundle Syntaxes/Makefile.plist ./syntaxes/make.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin fadeevab/make.tmbundle Syntaxes/Makefile.plist ./syntaxes/make.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/markdown-basics/package.json b/extensions/markdown-basics/package.json index 8ea3bff2e3c..e40265339c3 100644 --- a/extensions/markdown-basics/package.json +++ b/extensions/markdown-basics/package.json @@ -90,7 +90,7 @@ ] }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater microsoft/vscode-markdown-tm-grammar syntaxes/markdown.tmLanguage ./syntaxes/markdown.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin microsoft/vscode-markdown-tm-grammar syntaxes/markdown.tmLanguage ./syntaxes/markdown.tmLanguage.json" }, "repository": { "type": "git", diff --git a/extensions/merge-conflict/src/mergeConflictParser.ts b/extensions/merge-conflict/src/mergeConflictParser.ts index 84a4607ac14..06e4237fea7 100644 --- a/extensions/merge-conflict/src/mergeConflictParser.ts +++ b/extensions/merge-conflict/src/mergeConflictParser.ts @@ -58,7 +58,7 @@ export class MergeConflictParser { currentConflict.commonAncestors.push(line); } // Are we within a conflict block and is this a splitter? ======= - else if (currentConflict && !currentConflict.splitter && line.text.startsWith(splitterMarker)) { + else if (currentConflict && !currentConflict.splitter && line.text === splitterMarker) { currentConflict.splitter = line; } // Are we within a conflict block and is this a footer? >>>>>>> diff --git a/extensions/package.json b/extensions/package.json index 5222855bf93..69f8501b208 100644 --- a/extensions/package.json +++ b/extensions/package.json @@ -10,6 +10,6 @@ "postinstall": "node ./postinstall" }, "devDependencies": { - "vscode-grammar-updater": "^1.0.2" + "vscode-grammar-updater": "^1.0.3" } } diff --git a/extensions/perl/package.json b/extensions/perl/package.json index 6baa327ab35..e195e517e50 100644 --- a/extensions/perl/package.json +++ b/extensions/perl/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater textmate/perl.tmbundle Syntaxes/Perl.plist ./syntaxes/perl.tmLanguage.json Syntaxes/Perl%206.tmLanguage ./syntaxes/perl6.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin textmate/perl.tmbundle Syntaxes/Perl.plist ./syntaxes/perl.tmLanguage.json Syntaxes/Perl%206.tmLanguage ./syntaxes/perl6.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/powershell/package.json b/extensions/powershell/package.json index e176f7f412c..f9715a8b21f 100644 --- a/extensions/powershell/package.json +++ b/extensions/powershell/package.json @@ -44,7 +44,7 @@ ] }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater PowerShell/EditorSyntax PowerShellSyntax.tmLanguage ./syntaxes/powershell.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin PowerShell/EditorSyntax PowerShellSyntax.tmLanguage ./syntaxes/powershell.tmLanguage.json" }, "repository": { "type": "git", diff --git a/extensions/pug/package.json b/extensions/pug/package.json index 5dd19cfa3e1..fd74f5b915c 100644 --- a/extensions/pug/package.json +++ b/extensions/pug/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater davidrios/pug-tmbundle Syntaxes/Pug.JSON-tmLanguage ./syntaxes/pug.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin davidrios/pug-tmbundle Syntaxes/Pug.JSON-tmLanguage ./syntaxes/pug.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/python/package.json b/extensions/python/package.json index 7413ef788b1..d99a1cefbf7 100644 --- a/extensions/python/package.json +++ b/extensions/python/package.json @@ -53,7 +53,7 @@ ] }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater MagicStack/MagicPython grammars/MagicPython.tmLanguage ./syntaxes/MagicPython.tmLanguage.json grammars/MagicRegExp.tmLanguage ./syntaxes/MagicRegExp.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin MagicStack/MagicPython grammars/MagicPython.tmLanguage ./syntaxes/MagicPython.tmLanguage.json grammars/MagicRegExp.tmLanguage ./syntaxes/MagicRegExp.tmLanguage.json" }, "repository": { "type": "git", diff --git a/extensions/r/package.json b/extensions/r/package.json index 114c2122cec..44884cf3336 100644 --- a/extensions/r/package.json +++ b/extensions/r/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater Ikuyadeu/vscode-R syntax/r.json ./syntaxes/r.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin Ikuyadeu/vscode-R syntax/r.json ./syntaxes/r.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/razor/package.json b/extensions/razor/package.json index ddcbd6e415e..fcae342cfde 100644 --- a/extensions/razor/package.json +++ b/extensions/razor/package.json @@ -9,7 +9,7 @@ "vscode": "0.10.x" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater demyte/language-cshtml grammars/cshtml.json ./syntaxes/cshtml.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin demyte/language-cshtml grammars/cshtml.json ./syntaxes/cshtml.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/ruby/package.json b/extensions/ruby/package.json index 6b5bd195a9a..1ce625ef7c8 100644 --- a/extensions/ruby/package.json +++ b/extensions/ruby/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater textmate/ruby.tmbundle Syntaxes/Ruby.plist ./syntaxes/ruby.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin textmate/ruby.tmbundle Syntaxes/Ruby.plist ./syntaxes/ruby.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/rust/package.json b/extensions/rust/package.json index ffa36bdabf0..7584298368e 100644 --- a/extensions/rust/package.json +++ b/extensions/rust/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater dustypomerleau/rust-syntax syntaxes/rust.tmLanguage.json ./syntaxes/rust.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin dustypomerleau/rust-syntax syntaxes/rust.tmLanguage.json ./syntaxes/rust.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/scss/package.json b/extensions/scss/package.json index 4eaedeff263..967b790d9e5 100644 --- a/extensions/scss/package.json +++ b/extensions/scss/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater atom/language-sass grammars/scss.cson ./syntaxes/scss.tmLanguage.json grammars/sassdoc.cson ./syntaxes/sassdoc.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin atom/language-sass grammars/scss.cson ./syntaxes/scss.tmLanguage.json grammars/sassdoc.cson ./syntaxes/sassdoc.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/search-result/syntaxes/generateTMLanguage.js b/extensions/search-result/syntaxes/generateTMLanguage.js index c0170e514f9..f42955f9fb1 100644 --- a/extensions/search-result/syntaxes/generateTMLanguage.js +++ b/extensions/search-result/syntaxes/generateTMLanguage.js @@ -22,6 +22,7 @@ const mappings = [ ['html', 'text.html.basic'], ['ini', 'source.ini'], ['java', 'source.java'], + ['jl', 'source.julia'], ['js', 'source.js'], ['json', 'source.json.comments'], ['jsx', 'source.js.jsx'], diff --git a/extensions/search-result/syntaxes/searchResult.tmLanguage.json b/extensions/search-result/syntaxes/searchResult.tmLanguage.json index e319191c41f..68f00cfb2a0 100644 --- a/extensions/search-result/syntaxes/searchResult.tmLanguage.json +++ b/extensions/search-result/syntaxes/searchResult.tmLanguage.json @@ -141,6 +141,9 @@ { "include": "#java" }, + { + "include": "#jl" + }, { "include": "#js" }, @@ -2076,6 +2079,92 @@ } ] }, + "jl": { + "name": "meta.resultBlock.search", + "begin": "^(?!\\s)(.*?)([^\\\\\\/\\n]*\\.jl)(:)$", + "end": "^(?!\\s)", + "beginCaptures": { + "0": { + "name": "string meta.path.search" + }, + "1": { + "name": "meta.path.dirname.search" + }, + "2": { + "name": "meta.path.basename.search" + }, + "3": { + "name": "punctuation.separator" + } + }, + "patterns": [ + { + "name": "meta.resultLine.search meta.resultLine.multiLine.search", + "begin": "^ (?:\\s*)((\\d+) )", + "while": "^ (?:\\s*)(?:((\\d+)(:))|((\\d+) ))", + "beginCaptures": { + "0": { + "name": "constant.numeric.integer meta.resultLinePrefix.search" + }, + "1": { + "name": "meta.resultLinePrefix.contextLinePrefix.search" + }, + "2": { + "name": "meta.resultLinePrefix.lineNumber.search" + } + }, + "whileCaptures": { + "0": { + "name": "constant.numeric.integer meta.resultLinePrefix.search" + }, + "1": { + "name": "meta.resultLinePrefix.matchLinePrefix.search" + }, + "2": { + "name": "meta.resultLinePrefix.lineNumber.search" + }, + "3": { + "name": "punctuation.separator" + }, + "4": { + "name": "meta.resultLinePrefix.contextLinePrefix.search" + }, + "5": { + "name": "meta.resultLinePrefix.lineNumber.search" + } + }, + "patterns": [ + { + "include": "source.julia" + } + ] + }, + { + "begin": "^ (?:\\s*)((\\d+)(:))", + "while": "(?=not)possible", + "name": "meta.resultLine.search meta.resultLine.singleLine.search", + "beginCaptures": { + "0": { + "name": "constant.numeric.integer meta.resultLinePrefix.search" + }, + "1": { + "name": "meta.resultLinePrefix.matchLinePrefix.search" + }, + "2": { + "name": "meta.resultLinePrefix.lineNumber.search" + }, + "3": { + "name": "punctuation.separator" + } + }, + "patterns": [ + { + "include": "source.julia" + } + ] + } + ] + }, "js": { "name": "meta.resultBlock.search", "begin": "^(?!\\s)(.*?)([^\\\\\\/\\n]*\\.js)(:)$", diff --git a/extensions/shaderlab/package.json b/extensions/shaderlab/package.json index 905a059db44..7ffb311bea1 100644 --- a/extensions/shaderlab/package.json +++ b/extensions/shaderlab/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater tgjones/shaders-tmLanguage grammars/shaderlab.json ./syntaxes/shaderlab.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin tgjones/shaders-tmLanguage grammars/shaderlab.json ./syntaxes/shaderlab.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/shellscript/package.json b/extensions/shellscript/package.json index 087d6bbe812..3826f2dd934 100644 --- a/extensions/shellscript/package.json +++ b/extensions/shellscript/package.json @@ -9,7 +9,7 @@ "vscode": "*" }, "scripts": { - "update-grammar": "node ../node_modules/.bin/vscode-grammar-updater atom/language-shellscript grammars/shell-unix-bash.cson ./syntaxes/shell-unix-bash.tmLanguage.json" + "update-grammar": "node ../node_modules/vscode-grammar-updater/bin atom/language-shellscript grammars/shell-unix-bash.cson ./syntaxes/shell-unix-bash.tmLanguage.json" }, "contributes": { "languages": [ diff --git a/extensions/simple-browser/build/copy.js b/extensions/simple-browser/build/copy.js new file mode 100644 index 00000000000..d48747399a8 --- /dev/null +++ b/extensions/simple-browser/build/copy.js @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +const fs = require('fs'); +const path = require('path'); + +fs.copyFileSync( + path.join('node_modules', 'vscode-codicons', 'dist', 'codicon.css'), + path.join('media', 'codicon.css')); + +fs.copyFileSync( + path.join('node_modules', 'vscode-codicons', 'dist', 'codicon.ttf'), + path.join('media', 'codicon.ttf')); diff --git a/extensions/simple-browser/media/codicon.css b/extensions/simple-browser/media/codicon.css new file mode 100644 index 00000000000..209c4e8f730 --- /dev/null +++ b/extensions/simple-browser/media/codicon.css @@ -0,0 +1,449 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +@font-face { + font-family: "codicon"; + src: url("./codicon.ttf?756fa482df4f1610f1e0548d031e8c29") format("truetype"); +} + +.codicon[class*='codicon-'] { + font: normal normal normal 16px/1 codicon; + display: inline-block; + text-decoration: none; + text-rendering: auto; + text-align: center; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + user-select: none; + -webkit-user-select: none; + -ms-user-select: none; +} + + +.codicon-add:before { content: "\ea60" } +.codicon-plus:before { content: "\ea60" } +.codicon-gist-new:before { content: "\ea60" } +.codicon-repo-create:before { content: "\ea60" } +.codicon-lightbulb:before { content: "\ea61" } +.codicon-light-bulb:before { content: "\ea61" } +.codicon-repo:before { content: "\ea62" } +.codicon-repo-delete:before { content: "\ea62" } +.codicon-gist-fork:before { content: "\ea63" } +.codicon-repo-forked:before { content: "\ea63" } +.codicon-git-pull-request:before { content: "\ea64" } +.codicon-git-pull-request-abandoned:before { content: "\ea64" } +.codicon-record-keys:before { content: "\ea65" } +.codicon-keyboard:before { content: "\ea65" } +.codicon-tag:before { content: "\ea66" } +.codicon-tag-add:before { content: "\ea66" } +.codicon-tag-remove:before { content: "\ea66" } +.codicon-person:before { content: "\ea67" } +.codicon-person-add:before { content: "\ea67" } +.codicon-person-follow:before { content: "\ea67" } +.codicon-person-outline:before { content: "\ea67" } +.codicon-person-filled:before { content: "\ea67" } +.codicon-git-branch:before { content: "\ea68" } +.codicon-git-branch-create:before { content: "\ea68" } +.codicon-git-branch-delete:before { content: "\ea68" } +.codicon-source-control:before { content: "\ea68" } +.codicon-mirror:before { content: "\ea69" } +.codicon-mirror-public:before { content: "\ea69" } +.codicon-star:before { content: "\ea6a" } +.codicon-star-add:before { content: "\ea6a" } +.codicon-star-delete:before { content: "\ea6a" } +.codicon-star-empty:before { content: "\ea6a" } +.codicon-comment:before { content: "\ea6b" } +.codicon-comment-add:before { content: "\ea6b" } +.codicon-alert:before { content: "\ea6c" } +.codicon-warning:before { content: "\ea6c" } +.codicon-search:before { content: "\ea6d" } +.codicon-search-save:before { content: "\ea6d" } +.codicon-log-out:before { content: "\ea6e" } +.codicon-sign-out:before { content: "\ea6e" } +.codicon-log-in:before { content: "\ea6f" } +.codicon-sign-in:before { content: "\ea6f" } +.codicon-eye:before { content: "\ea70" } +.codicon-eye-unwatch:before { content: "\ea70" } +.codicon-eye-watch:before { content: "\ea70" } +.codicon-circle-filled:before { content: "\ea71" } +.codicon-primitive-dot:before { content: "\ea71" } +.codicon-close-dirty:before { content: "\ea71" } +.codicon-debug-breakpoint:before { content: "\ea71" } +.codicon-debug-breakpoint-disabled:before { content: "\ea71" } +.codicon-debug-hint:before { content: "\ea71" } +.codicon-primitive-square:before { content: "\ea72" } +.codicon-edit:before { content: "\ea73" } +.codicon-pencil:before { content: "\ea73" } +.codicon-info:before { content: "\ea74" } +.codicon-issue-opened:before { content: "\ea74" } +.codicon-gist-private:before { content: "\ea75" } +.codicon-git-fork-private:before { content: "\ea75" } +.codicon-lock:before { content: "\ea75" } +.codicon-mirror-private:before { content: "\ea75" } +.codicon-close:before { content: "\ea76" } +.codicon-remove-close:before { content: "\ea76" } +.codicon-x:before { content: "\ea76" } +.codicon-repo-sync:before { content: "\ea77" } +.codicon-sync:before { content: "\ea77" } +.codicon-clone:before { content: "\ea78" } +.codicon-desktop-download:before { content: "\ea78" } +.codicon-beaker:before { content: "\ea79" } +.codicon-microscope:before { content: "\ea79" } +.codicon-vm:before { content: "\ea7a" } +.codicon-device-desktop:before { content: "\ea7a" } +.codicon-file:before { content: "\ea7b" } +.codicon-file-text:before { content: "\ea7b" } +.codicon-more:before { content: "\ea7c" } +.codicon-ellipsis:before { content: "\ea7c" } +.codicon-kebab-horizontal:before { content: "\ea7c" } +.codicon-mail-reply:before { content: "\ea7d" } +.codicon-reply:before { content: "\ea7d" } +.codicon-organization:before { content: "\ea7e" } +.codicon-organization-filled:before { content: "\ea7e" } +.codicon-organization-outline:before { content: "\ea7e" } +.codicon-new-file:before { content: "\ea7f" } +.codicon-file-add:before { content: "\ea7f" } +.codicon-new-folder:before { content: "\ea80" } +.codicon-file-directory-create:before { content: "\ea80" } +.codicon-trash:before { content: "\ea81" } +.codicon-trashcan:before { content: "\ea81" } +.codicon-history:before { content: "\ea82" } +.codicon-clock:before { content: "\ea82" } +.codicon-folder:before { content: "\ea83" } +.codicon-file-directory:before { content: "\ea83" } +.codicon-symbol-folder:before { content: "\ea83" } +.codicon-logo-github:before { content: "\ea84" } +.codicon-mark-github:before { content: "\ea84" } +.codicon-github:before { content: "\ea84" } +.codicon-terminal:before { content: "\ea85" } +.codicon-console:before { content: "\ea85" } +.codicon-repl:before { content: "\ea85" } +.codicon-zap:before { content: "\ea86" } +.codicon-symbol-event:before { content: "\ea86" } +.codicon-error:before { content: "\ea87" } +.codicon-stop:before { content: "\ea87" } +.codicon-variable:before { content: "\ea88" } +.codicon-symbol-variable:before { content: "\ea88" } +.codicon-array:before { content: "\ea8a" } +.codicon-symbol-array:before { content: "\ea8a" } +.codicon-symbol-module:before { content: "\ea8b" } +.codicon-symbol-package:before { content: "\ea8b" } +.codicon-symbol-namespace:before { content: "\ea8b" } +.codicon-symbol-object:before { content: "\ea8b" } +.codicon-symbol-method:before { content: "\ea8c" } +.codicon-symbol-function:before { content: "\ea8c" } +.codicon-symbol-constructor:before { content: "\ea8c" } +.codicon-symbol-boolean:before { content: "\ea8f" } +.codicon-symbol-null:before { content: "\ea8f" } +.codicon-symbol-numeric:before { content: "\ea90" } +.codicon-symbol-number:before { content: "\ea90" } +.codicon-symbol-structure:before { content: "\ea91" } +.codicon-symbol-struct:before { content: "\ea91" } +.codicon-symbol-parameter:before { content: "\ea92" } +.codicon-symbol-type-parameter:before { content: "\ea92" } +.codicon-symbol-key:before { content: "\ea93" } +.codicon-symbol-text:before { content: "\ea93" } +.codicon-symbol-reference:before { content: "\ea94" } +.codicon-go-to-file:before { content: "\ea94" } +.codicon-symbol-enum:before { content: "\ea95" } +.codicon-symbol-value:before { content: "\ea95" } +.codicon-symbol-ruler:before { content: "\ea96" } +.codicon-symbol-unit:before { content: "\ea96" } +.codicon-activate-breakpoints:before { content: "\ea97" } +.codicon-archive:before { content: "\ea98" } +.codicon-arrow-both:before { content: "\ea99" } +.codicon-arrow-down:before { content: "\ea9a" } +.codicon-arrow-left:before { content: "\ea9b" } +.codicon-arrow-right:before { content: "\ea9c" } +.codicon-arrow-small-down:before { content: "\ea9d" } +.codicon-arrow-small-left:before { content: "\ea9e" } +.codicon-arrow-small-right:before { content: "\ea9f" } +.codicon-arrow-small-up:before { content: "\eaa0" } +.codicon-arrow-up:before { content: "\eaa1" } +.codicon-bell:before { content: "\eaa2" } +.codicon-bold:before { content: "\eaa3" } +.codicon-book:before { content: "\eaa4" } +.codicon-bookmark:before { content: "\eaa5" } +.codicon-debug-breakpoint-conditional-unverified:before { content: "\eaa6" } +.codicon-debug-breakpoint-conditional:before { content: "\eaa7" } +.codicon-debug-breakpoint-conditional-disabled:before { content: "\eaa7" } +.codicon-debug-breakpoint-data-unverified:before { content: "\eaa8" } +.codicon-debug-breakpoint-data:before { content: "\eaa9" } +.codicon-debug-breakpoint-data-disabled:before { content: "\eaa9" } +.codicon-debug-breakpoint-log-unverified:before { content: "\eaaa" } +.codicon-debug-breakpoint-log:before { content: "\eaab" } +.codicon-debug-breakpoint-log-disabled:before { content: "\eaab" } +.codicon-briefcase:before { content: "\eaac" } +.codicon-broadcast:before { content: "\eaad" } +.codicon-browser:before { content: "\eaae" } +.codicon-bug:before { content: "\eaaf" } +.codicon-calendar:before { content: "\eab0" } +.codicon-case-sensitive:before { content: "\eab1" } +.codicon-check:before { content: "\eab2" } +.codicon-checklist:before { content: "\eab3" } +.codicon-chevron-down:before { content: "\eab4" } +.codicon-chevron-left:before { content: "\eab5" } +.codicon-chevron-right:before { content: "\eab6" } +.codicon-chevron-up:before { content: "\eab7" } +.codicon-chrome-close:before { content: "\eab8" } +.codicon-chrome-maximize:before { content: "\eab9" } +.codicon-chrome-minimize:before { content: "\eaba" } +.codicon-chrome-restore:before { content: "\eabb" } +.codicon-circle-outline:before { content: "\eabc" } +.codicon-debug-breakpoint-unverified:before { content: "\eabc" } +.codicon-circle-slash:before { content: "\eabd" } +.codicon-circuit-board:before { content: "\eabe" } +.codicon-clear-all:before { content: "\eabf" } +.codicon-clippy:before { content: "\eac0" } +.codicon-close-all:before { content: "\eac1" } +.codicon-cloud-download:before { content: "\eac2" } +.codicon-cloud-upload:before { content: "\eac3" } +.codicon-code:before { content: "\eac4" } +.codicon-collapse-all:before { content: "\eac5" } +.codicon-color-mode:before { content: "\eac6" } +.codicon-comment-discussion:before { content: "\eac7" } +.codicon-credit-card:before { content: "\eac9" } +.codicon-dash:before { content: "\eacc" } +.codicon-dashboard:before { content: "\eacd" } +.codicon-database:before { content: "\eace" } +.codicon-debug-continue:before { content: "\eacf" } +.codicon-debug-disconnect:before { content: "\ead0" } +.codicon-debug-pause:before { content: "\ead1" } +.codicon-debug-restart:before { content: "\ead2" } +.codicon-debug-start:before { content: "\ead3" } +.codicon-debug-step-into:before { content: "\ead4" } +.codicon-debug-step-out:before { content: "\ead5" } +.codicon-debug-step-over:before { content: "\ead6" } +.codicon-debug-stop:before { content: "\ead7" } +.codicon-debug:before { content: "\ead8" } +.codicon-device-camera-video:before { content: "\ead9" } +.codicon-device-camera:before { content: "\eada" } +.codicon-device-mobile:before { content: "\eadb" } +.codicon-diff-added:before { content: "\eadc" } +.codicon-diff-ignored:before { content: "\eadd" } +.codicon-diff-modified:before { content: "\eade" } +.codicon-diff-removed:before { content: "\eadf" } +.codicon-diff-renamed:before { content: "\eae0" } +.codicon-diff:before { content: "\eae1" } +.codicon-discard:before { content: "\eae2" } +.codicon-editor-layout:before { content: "\eae3" } +.codicon-empty-window:before { content: "\eae4" } +.codicon-exclude:before { content: "\eae5" } +.codicon-extensions:before { content: "\eae6" } +.codicon-eye-closed:before { content: "\eae7" } +.codicon-file-binary:before { content: "\eae8" } +.codicon-file-code:before { content: "\eae9" } +.codicon-file-media:before { content: "\eaea" } +.codicon-file-pdf:before { content: "\eaeb" } +.codicon-file-submodule:before { content: "\eaec" } +.codicon-file-symlink-directory:before { content: "\eaed" } +.codicon-file-symlink-file:before { content: "\eaee" } +.codicon-file-zip:before { content: "\eaef" } +.codicon-files:before { content: "\eaf0" } +.codicon-filter:before { content: "\eaf1" } +.codicon-flame:before { content: "\eaf2" } +.codicon-fold-down:before { content: "\eaf3" } +.codicon-fold-up:before { content: "\eaf4" } +.codicon-fold:before { content: "\eaf5" } +.codicon-folder-active:before { content: "\eaf6" } +.codicon-folder-opened:before { content: "\eaf7" } +.codicon-gear:before { content: "\eaf8" } +.codicon-gift:before { content: "\eaf9" } +.codicon-gist-secret:before { content: "\eafa" } +.codicon-gist:before { content: "\eafb" } +.codicon-git-commit:before { content: "\eafc" } +.codicon-git-compare:before { content: "\eafd" } +.codicon-compare-changes:before { content: "\eafd" } +.codicon-git-merge:before { content: "\eafe" } +.codicon-github-action:before { content: "\eaff" } +.codicon-github-alt:before { content: "\eb00" } +.codicon-globe:before { content: "\eb01" } +.codicon-grabber:before { content: "\eb02" } +.codicon-graph:before { content: "\eb03" } +.codicon-gripper:before { content: "\eb04" } +.codicon-heart:before { content: "\eb05" } +.codicon-home:before { content: "\eb06" } +.codicon-horizontal-rule:before { content: "\eb07" } +.codicon-hubot:before { content: "\eb08" } +.codicon-inbox:before { content: "\eb09" } +.codicon-issue-closed:before { content: "\eb0a" } +.codicon-issue-reopened:before { content: "\eb0b" } +.codicon-issues:before { content: "\eb0c" } +.codicon-italic:before { content: "\eb0d" } +.codicon-jersey:before { content: "\eb0e" } +.codicon-json:before { content: "\eb0f" } +.codicon-kebab-vertical:before { content: "\eb10" } +.codicon-key:before { content: "\eb11" } +.codicon-law:before { content: "\eb12" } +.codicon-lightbulb-autofix:before { content: "\eb13" } +.codicon-link-external:before { content: "\eb14" } +.codicon-link:before { content: "\eb15" } +.codicon-list-ordered:before { content: "\eb16" } +.codicon-list-unordered:before { content: "\eb17" } +.codicon-live-share:before { content: "\eb18" } +.codicon-loading:before { content: "\eb19" } +.codicon-location:before { content: "\eb1a" } +.codicon-mail-read:before { content: "\eb1b" } +.codicon-mail:before { content: "\eb1c" } +.codicon-markdown:before { content: "\eb1d" } +.codicon-megaphone:before { content: "\eb1e" } +.codicon-mention:before { content: "\eb1f" } +.codicon-milestone:before { content: "\eb20" } +.codicon-mortar-board:before { content: "\eb21" } +.codicon-move:before { content: "\eb22" } +.codicon-multiple-windows:before { content: "\eb23" } +.codicon-mute:before { content: "\eb24" } +.codicon-no-newline:before { content: "\eb25" } +.codicon-note:before { content: "\eb26" } +.codicon-octoface:before { content: "\eb27" } +.codicon-open-preview:before { content: "\eb28" } +.codicon-package:before { content: "\eb29" } +.codicon-paintcan:before { content: "\eb2a" } +.codicon-pin:before { content: "\eb2b" } +.codicon-play:before { content: "\eb2c" } +.codicon-run:before { content: "\eb2c" } +.codicon-plug:before { content: "\eb2d" } +.codicon-preserve-case:before { content: "\eb2e" } +.codicon-preview:before { content: "\eb2f" } +.codicon-project:before { content: "\eb30" } +.codicon-pulse:before { content: "\eb31" } +.codicon-question:before { content: "\eb32" } +.codicon-quote:before { content: "\eb33" } +.codicon-radio-tower:before { content: "\eb34" } +.codicon-reactions:before { content: "\eb35" } +.codicon-references:before { content: "\eb36" } +.codicon-refresh:before { content: "\eb37" } +.codicon-regex:before { content: "\eb38" } +.codicon-remote-explorer:before { content: "\eb39" } +.codicon-remote:before { content: "\eb3a" } +.codicon-remove:before { content: "\eb3b" } +.codicon-replace-all:before { content: "\eb3c" } +.codicon-replace:before { content: "\eb3d" } +.codicon-repo-clone:before { content: "\eb3e" } +.codicon-repo-force-push:before { content: "\eb3f" } +.codicon-repo-pull:before { content: "\eb40" } +.codicon-repo-push:before { content: "\eb41" } +.codicon-report:before { content: "\eb42" } +.codicon-request-changes:before { content: "\eb43" } +.codicon-rocket:before { content: "\eb44" } +.codicon-root-folder-opened:before { content: "\eb45" } +.codicon-root-folder:before { content: "\eb46" } +.codicon-rss:before { content: "\eb47" } +.codicon-ruby:before { content: "\eb48" } +.codicon-save-all:before { content: "\eb49" } +.codicon-save-as:before { content: "\eb4a" } +.codicon-save:before { content: "\eb4b" } +.codicon-screen-full:before { content: "\eb4c" } +.codicon-screen-normal:before { content: "\eb4d" } +.codicon-search-stop:before { content: "\eb4e" } +.codicon-server:before { content: "\eb50" } +.codicon-settings-gear:before { content: "\eb51" } +.codicon-settings:before { content: "\eb52" } +.codicon-shield:before { content: "\eb53" } +.codicon-smiley:before { content: "\eb54" } +.codicon-sort-precedence:before { content: "\eb55" } +.codicon-split-horizontal:before { content: "\eb56" } +.codicon-split-vertical:before { content: "\eb57" } +.codicon-squirrel:before { content: "\eb58" } +.codicon-star-full:before { content: "\eb59" } +.codicon-star-half:before { content: "\eb5a" } +.codicon-symbol-class:before { content: "\eb5b" } +.codicon-symbol-color:before { content: "\eb5c" } +.codicon-symbol-constant:before { content: "\eb5d" } +.codicon-symbol-enum-member:before { content: "\eb5e" } +.codicon-symbol-field:before { content: "\eb5f" } +.codicon-symbol-file:before { content: "\eb60" } +.codicon-symbol-interface:before { content: "\eb61" } +.codicon-symbol-keyword:before { content: "\eb62" } +.codicon-symbol-misc:before { content: "\eb63" } +.codicon-symbol-operator:before { content: "\eb64" } +.codicon-symbol-property:before { content: "\eb65" } +.codicon-wrench:before { content: "\eb65" } +.codicon-wrench-subaction:before { content: "\eb65" } +.codicon-symbol-snippet:before { content: "\eb66" } +.codicon-tasklist:before { content: "\eb67" } +.codicon-telescope:before { content: "\eb68" } +.codicon-text-size:before { content: "\eb69" } +.codicon-three-bars:before { content: "\eb6a" } +.codicon-thumbsdown:before { content: "\eb6b" } +.codicon-thumbsup:before { content: "\eb6c" } +.codicon-tools:before { content: "\eb6d" } +.codicon-triangle-down:before { content: "\eb6e" } +.codicon-triangle-left:before { content: "\eb6f" } +.codicon-triangle-right:before { content: "\eb70" } +.codicon-triangle-up:before { content: "\eb71" } +.codicon-twitter:before { content: "\eb72" } +.codicon-unfold:before { content: "\eb73" } +.codicon-unlock:before { content: "\eb74" } +.codicon-unmute:before { content: "\eb75" } +.codicon-unverified:before { content: "\eb76" } +.codicon-verified:before { content: "\eb77" } +.codicon-versions:before { content: "\eb78" } +.codicon-vm-active:before { content: "\eb79" } +.codicon-vm-outline:before { content: "\eb7a" } +.codicon-vm-running:before { content: "\eb7b" } +.codicon-watch:before { content: "\eb7c" } +.codicon-whitespace:before { content: "\eb7d" } +.codicon-whole-word:before { content: "\eb7e" } +.codicon-window:before { content: "\eb7f" } +.codicon-word-wrap:before { content: "\eb80" } +.codicon-zoom-in:before { content: "\eb81" } +.codicon-zoom-out:before { content: "\eb82" } +.codicon-list-filter:before { content: "\eb83" } +.codicon-list-flat:before { content: "\eb84" } +.codicon-list-selection:before { content: "\eb85" } +.codicon-selection:before { content: "\eb85" } +.codicon-list-tree:before { content: "\eb86" } +.codicon-debug-breakpoint-function-unverified:before { content: "\eb87" } +.codicon-debug-breakpoint-function:before { content: "\eb88" } +.codicon-debug-breakpoint-function-disabled:before { content: "\eb88" } +.codicon-debug-stackframe-active:before { content: "\eb89" } +.codicon-debug-stackframe-dot:before { content: "\eb8a" } +.codicon-debug-stackframe:before { content: "\eb8b" } +.codicon-debug-stackframe-focused:before { content: "\eb8b" } +.codicon-debug-breakpoint-unsupported:before { content: "\eb8c" } +.codicon-symbol-string:before { content: "\eb8d" } +.codicon-debug-reverse-continue:before { content: "\eb8e" } +.codicon-debug-step-back:before { content: "\eb8f" } +.codicon-debug-restart-frame:before { content: "\eb90" } +.codicon-debug-alt:before { content: "\eb91" } +.codicon-call-incoming:before { content: "\eb92" } +.codicon-call-outgoing:before { content: "\eb93" } +.codicon-menu:before { content: "\eb94" } +.codicon-expand-all:before { content: "\eb95" } +.codicon-feedback:before { content: "\eb96" } +.codicon-group-by-ref-type:before { content: "\eb97" } +.codicon-ungroup-by-ref-type:before { content: "\eb98" } +.codicon-account:before { content: "\eb99" } +.codicon-bell-dot:before { content: "\eb9a" } +.codicon-debug-console:before { content: "\eb9b" } +.codicon-library:before { content: "\eb9c" } +.codicon-output:before { content: "\eb9d" } +.codicon-run-all:before { content: "\eb9e" } +.codicon-sync-ignored:before { content: "\eb9f" } +.codicon-pinned:before { content: "\eba0" } +.codicon-github-inverted:before { content: "\eba1" } +.codicon-server-process:before { content: "\eba2" } +.codicon-server-environment:before { content: "\eba3" } +.codicon-pass:before { content: "\eba4" } +.codicon-stop-circle:before { content: "\eba5" } +.codicon-play-circle:before { content: "\eba6" } +.codicon-record:before { content: "\eba7" } +.codicon-debug-alt-small:before { content: "\eba8" } +.codicon-vm-connect:before { content: "\eba9" } +.codicon-cloud:before { content: "\ebaa" } +.codicon-merge:before { content: "\ebab" } +.codicon-export:before { content: "\ebac" } +.codicon-graph-left:before { content: "\ebad" } +.codicon-magnet:before { content: "\ebae" } +.codicon-notebook:before { content: "\ebaf" } +.codicon-redo:before { content: "\ebb0" } +.codicon-check-all:before { content: "\ebb1" } +.codicon-pinned-dirty:before { content: "\ebb2" } +.codicon-pass-filled:before { content: "\ebb3" } +.codicon-circle-large-filled:before { content: "\ebb4" } +.codicon-circle-large-outline:before { content: "\ebb5" } +.codicon-combine:before { content: "\ebb6" } +.codicon-gather:before { content: "\ebb6" } diff --git a/extensions/simple-browser/media/codicon.ttf b/extensions/simple-browser/media/codicon.ttf new file mode 100644 index 00000000000..39ca0a60807 Binary files /dev/null and b/extensions/simple-browser/media/codicon.ttf differ diff --git a/extensions/simple-browser/media/index.js b/extensions/simple-browser/media/index.js index 5a7763a93de..ca44111a2ea 100644 --- a/extensions/simple-browser/media/index.js +++ b/extensions/simple-browser/media/index.js @@ -194,9 +194,19 @@ events_1.onceDocumentLoaded(() => { iframe.src = input.value; }); navigateTo(settings.url); + input.value = settings.url; toggleFocusLockIndicatorEnabled(settings.focusLockIndicatorEnabled); - function navigateTo(url) { - iframe.src = url; + function navigateTo(rawUrl) { + try { + const url = new URL(rawUrl); + // Try to bust the cache for the iframe + // There does not appear to be any way to reliably do this except modifying the url + url.searchParams.append('vscodeBrowserReqId', Date.now().toString()); + iframe.src = url.toString(); + } + catch (_a) { + iframe.src = rawUrl; + } } }); function toggleFocusLockIndicatorEnabled(enabled) { diff --git a/extensions/simple-browser/media/index.js.map b/extensions/simple-browser/media/index.js.map index d6128aae7e3..d4e76529981 100644 --- a/extensions/simple-browser/media/index.js.map +++ b/extensions/simple-browser/media/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./preview-src/events.ts","webpack:///./preview-src/index.ts"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;AACb;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACfa;AACb;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,iBAAiB,mBAAO,CAAC,yCAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./preview-src/index.ts\");\n","\"use strict\";\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onceDocumentLoaded = void 0;\nfunction onceDocumentLoaded(f) {\n if (document.readyState === 'loading' || document.readyState === 'uninitialized') {\n document.addEventListener('DOMContentLoaded', f);\n }\n else {\n f();\n }\n}\nexports.onceDocumentLoaded = onceDocumentLoaded;\n","\"use strict\";\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst events_1 = require(\"./events\");\nconst vscode = acquireVsCodeApi();\nfunction getSettings() {\n const element = document.getElementById('simple-browser-settings');\n if (element) {\n const data = element.getAttribute('data-settings');\n if (data) {\n return JSON.parse(data);\n }\n }\n throw new Error(`Could not load settings`);\n}\nconst settings = getSettings();\nconst iframe = document.querySelector('iframe');\nconst header = document.querySelector('.header');\nconst input = header.querySelector('.url-input');\nconst forwardButton = header.querySelector('.forward-button');\nconst backButton = header.querySelector('.back-button');\nconst reloadButton = header.querySelector('.reload-button');\nconst openExternalButton = header.querySelector('.open-external-button');\nwindow.addEventListener('message', e => {\n switch (e.data.type) {\n case 'focus':\n {\n iframe.focus();\n break;\n }\n case 'didChangeFocusLockIndicatorEnabled':\n {\n toggleFocusLockIndicatorEnabled(e.data.enabled);\n break;\n }\n }\n});\nevents_1.onceDocumentLoaded(() => {\n setInterval(() => {\n var _a;\n const iframeFocused = ((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.tagName) === 'IFRAME';\n document.body.classList.toggle('iframe-focused', iframeFocused);\n }, 50);\n iframe.addEventListener('load', () => {\n // Noop\n });\n input.addEventListener('change', e => {\n const url = e.target.value;\n navigateTo(url);\n });\n forwardButton.addEventListener('click', () => {\n history.forward();\n });\n backButton.addEventListener('click', () => {\n history.back();\n });\n openExternalButton.addEventListener('click', () => {\n vscode.postMessage({\n type: 'openExternal',\n url: input.value\n });\n });\n reloadButton.addEventListener('click', () => {\n // This does not seem to trigger what we want\n // history.go(0);\n // This incorrectly adds entries to the history but does reload\n iframe.src = input.value;\n });\n navigateTo(settings.url);\n toggleFocusLockIndicatorEnabled(settings.focusLockIndicatorEnabled);\n function navigateTo(url) {\n iframe.src = url;\n }\n});\nfunction toggleFocusLockIndicatorEnabled(enabled) {\n document.body.classList.toggle('enable-focus-lock-indicator', enabled);\n}\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./preview-src/events.ts","webpack:///./preview-src/index.ts"],"names":[],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFa;AACb;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACfa;AACb;AACA;AACA;AACA;AACA,8CAA8C,cAAc;AAC5D,iBAAiB,mBAAO,CAAC,yCAAU;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./preview-src/index.ts\");\n","\"use strict\";\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onceDocumentLoaded = void 0;\nfunction onceDocumentLoaded(f) {\n if (document.readyState === 'loading' || document.readyState === 'uninitialized') {\n document.addEventListener('DOMContentLoaded', f);\n }\n else {\n f();\n }\n}\nexports.onceDocumentLoaded = onceDocumentLoaded;\n","\"use strict\";\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst events_1 = require(\"./events\");\nconst vscode = acquireVsCodeApi();\nfunction getSettings() {\n const element = document.getElementById('simple-browser-settings');\n if (element) {\n const data = element.getAttribute('data-settings');\n if (data) {\n return JSON.parse(data);\n }\n }\n throw new Error(`Could not load settings`);\n}\nconst settings = getSettings();\nconst iframe = document.querySelector('iframe');\nconst header = document.querySelector('.header');\nconst input = header.querySelector('.url-input');\nconst forwardButton = header.querySelector('.forward-button');\nconst backButton = header.querySelector('.back-button');\nconst reloadButton = header.querySelector('.reload-button');\nconst openExternalButton = header.querySelector('.open-external-button');\nwindow.addEventListener('message', e => {\n switch (e.data.type) {\n case 'focus':\n {\n iframe.focus();\n break;\n }\n case 'didChangeFocusLockIndicatorEnabled':\n {\n toggleFocusLockIndicatorEnabled(e.data.enabled);\n break;\n }\n }\n});\nevents_1.onceDocumentLoaded(() => {\n setInterval(() => {\n var _a;\n const iframeFocused = ((_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.tagName) === 'IFRAME';\n document.body.classList.toggle('iframe-focused', iframeFocused);\n }, 50);\n iframe.addEventListener('load', () => {\n // Noop\n });\n input.addEventListener('change', e => {\n const url = e.target.value;\n navigateTo(url);\n });\n forwardButton.addEventListener('click', () => {\n history.forward();\n });\n backButton.addEventListener('click', () => {\n history.back();\n });\n openExternalButton.addEventListener('click', () => {\n vscode.postMessage({\n type: 'openExternal',\n url: input.value\n });\n });\n reloadButton.addEventListener('click', () => {\n // This does not seem to trigger what we want\n // history.go(0);\n // This incorrectly adds entries to the history but does reload\n iframe.src = input.value;\n });\n navigateTo(settings.url);\n input.value = settings.url;\n toggleFocusLockIndicatorEnabled(settings.focusLockIndicatorEnabled);\n function navigateTo(rawUrl) {\n try {\n const url = new URL(rawUrl);\n // Try to bust the cache for the iframe\n // There does not appear to be any way to reliably do this except modifying the url\n url.searchParams.append('vscodeBrowserReqId', Date.now().toString());\n iframe.src = url.toString();\n }\n catch (_a) {\n iframe.src = rawUrl;\n }\n }\n});\nfunction toggleFocusLockIndicatorEnabled(enabled) {\n document.body.classList.toggle('enable-focus-lock-indicator', enabled);\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/simple-browser/media/main.css b/extensions/simple-browser/media/main.css index 9192d4b6b63..4775dc4a795 100644 --- a/extensions/simple-browser/media/main.css +++ b/extensions/simple-browser/media/main.css @@ -93,6 +93,7 @@ iframe { width: 100%; height: 100%; border: none; + background: white; /* Browsers default to a white background */ } .iframe-focused-alert { diff --git a/extensions/simple-browser/package.json b/extensions/simple-browser/package.json index a9489bc24c4..d5c6da0a701 100644 --- a/extensions/simple-browser/package.json +++ b/extensions/simple-browser/package.json @@ -16,6 +16,11 @@ "categories": [ "Other" ], + "extensionKind": [ + "ui", + "workspace", + "web" + ], "activationEvents": [ "onCommand:simpleBrowser.show", "onCommand:simpleBrowser.api.open", @@ -52,14 +57,15 @@ "build-preview": "webpack --mode development", "build-preview-production": "webpack --mode production", "compile-web": "npx webpack-cli --config extension-browser.webpack.config --mode none", - "watch-web": "npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose" + "watch-web": "npx webpack-cli --config extension-browser.webpack.config --mode none --watch --info-verbosity verbose", + "postinstall": "node ./build/copy" }, "dependencies": { - "vscode-codicons": "^0.0.12", "vscode-extension-telemetry": "0.1.1", "vscode-nls": "^4.0.0" }, "devDependencies": { + "vscode-codicons": "^0.0.14", "@types/node": "^12.11.7", "ts-loader": "^6.2.1", "typescript": "^3.7.3", diff --git a/extensions/simple-browser/preview-src/index.ts b/extensions/simple-browser/preview-src/index.ts index 564224fd3bf..83cb3dedb16 100644 --- a/extensions/simple-browser/preview-src/index.ts +++ b/extensions/simple-browser/preview-src/index.ts @@ -84,10 +84,22 @@ onceDocumentLoaded(() => { }); navigateTo(settings.url); + input.value = settings.url; + toggleFocusLockIndicatorEnabled(settings.focusLockIndicatorEnabled); - function navigateTo(url: string): void { - iframe.src = url; + function navigateTo(rawUrl: string): void { + try { + const url = new URL(rawUrl); + + // Try to bust the cache for the iframe + // There does not appear to be any way to reliably do this except modifying the url + url.searchParams.append('vscodeBrowserReqId', Date.now().toString()); + + iframe.src = url.toString(); + } catch { + iframe.src = rawUrl; + } } }); diff --git a/extensions/simple-browser/src/simpleBrowserView.ts b/extensions/simple-browser/src/simpleBrowserView.ts index 104acfe9559..ef491d60eff 100644 --- a/extensions/simple-browser/src/simpleBrowserView.ts +++ b/extensions/simple-browser/src/simpleBrowserView.ts @@ -37,6 +37,9 @@ export class SimpleBrowserView extends Disposable { }, { enableScripts: true, retainContextWhenHidden: true, + localResourceRoots: [ + vscode.Uri.joinPath(extensionUri, 'media') + ] })); this._register(this._webviewPanel.webview.onDidReceiveMessage(e => { @@ -86,8 +89,8 @@ export class SimpleBrowserView extends Disposable { const mainJs = this.extensionResourceUrl('media', 'index.js'); const mainCss = this.extensionResourceUrl('media', 'main.css'); - const codiconsUri = this.extensionResourceUrl('node_modules', 'vscode-codicons', 'dist', 'codicon.css'); - const codiconsFontUri = this.extensionResourceUrl('node_modules', 'vscode-codicons', 'dist', 'codicon.ttf'); + const codiconsUri = this.extensionResourceUrl('media', 'codicon.css'); + const codiconsFontUri = this.extensionResourceUrl('media', 'codicon.ttf'); return /* html */ ` @@ -126,7 +129,7 @@ export class SimpleBrowserView extends Disposable { class="reload-button icon"> - +