feat(vscode): update to version 1.56.0 (#3269)

This commit is contained in:
Akash Satheesan 2021-05-07 07:22:08 +05:30 committed by GitHub
commit 2dcf098e7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1754 changed files with 89758 additions and 44882 deletions

View File

@ -1010,6 +1010,7 @@
"edit", "edit",
"end", "end",
"expand", "expand",
"grant",
"hide", "hide",
"invalidate", "invalidate",
"open", "open",

View File

@ -20,4 +20,4 @@ Steps to Reproduce:
Does this issue occur when all extensions are disabled?: Yes/No Does this issue occur when all extensions are disabled?: Yes/No
<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --> <!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported direct to the extension publisher. The 'Help > Report Issue' dialog can assist with this. --> <!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->

View File

@ -20,8 +20,8 @@
"context-keys": {"assign": []}, "context-keys": {"assign": []},
"css-less-scss": {"assign": ["aeschli"]}, "css-less-scss": {"assign": ["aeschli"]},
"custom-editors": {"assign": ["mjbvz"]}, "custom-editors": {"assign": ["mjbvz"]},
"debug": {"assign": ["weinand"]}, "debug": {"assign": ["isidorn"]},
"debug-console": {"assign": ["weinand"]}, "debug-console": {"assign": ["isidorn"]},
"dialogs": {"assign": ["sbatten"]}, "dialogs": {"assign": ["sbatten"]},
"diff-editor": {"assign": []}, "diff-editor": {"assign": []},
"dropdown": {"assign": []}, "dropdown": {"assign": []},

View File

@ -109,8 +109,8 @@ jobs:
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: "**/node_modules" path: "**/node_modules"
key: ${{ runner.os }}-cacheNodeModules11-${{ steps.nodeModulesCacheKey.outputs.value }} key: ${{ runner.os }}-cacheNodeModules13-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules11- restore-keys: ${{ runner.os }}-cacheNodeModules13-
- name: Get yarn cache directory path - name: Get yarn cache directory path
id: yarnCacheDirPath id: yarnCacheDirPath
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
@ -165,8 +165,8 @@ jobs:
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: "**/node_modules" path: "**/node_modules"
key: ${{ runner.os }}-cacheNodeModules11-${{ steps.nodeModulesCacheKey.outputs.value }} key: ${{ runner.os }}-cacheNodeModules13-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules11- restore-keys: ${{ runner.os }}-cacheNodeModules13-
- name: Get yarn cache directory path - name: Get yarn cache directory path
id: yarnCacheDirPath id: yarnCacheDirPath
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
@ -218,8 +218,8 @@ jobs:
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: "**/node_modules" path: "**/node_modules"
key: ${{ runner.os }}-cacheNodeModules11-${{ steps.nodeModulesCacheKey.outputs.value }} key: ${{ runner.os }}-cacheNodeModules13-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules11- restore-keys: ${{ runner.os }}-cacheNodeModules13-
- name: Get yarn cache directory path - name: Get yarn cache directory path
id: yarnCacheDirPath id: yarnCacheDirPath
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }} if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}

View File

@ -6,9 +6,25 @@ jobs:
name: Prevent yarn.lock changes in PRs name: Prevent yarn.lock changes in PRs
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- id: file_changes - uses: octokit/request-action@v2.x
uses: trilom/file-changes-action@ce38c8ce2459ca3c303415eec8cb0409857b4272 id: get_permissions
- name: Check for yarn.lock changes with:
route: GET /repos/microsoft/vscode/collaborators/{username}/permission
username: ${{ github.event.pull_request.user.login }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set control output variable
id: control
run: | run: |
cat $HOME/files.json | jq -e '.[] | test("yarn\\.lock$") | not' \ echo "user: ${{ github.event.pull_request.user.login }}"
echo "role: ${{ fromJson(steps.get_permissions.outputs.data).permission }}"
echo "should_run: ${{ !contains(fromJson('["admin", "write"]'), fromJson(steps.get_permissions.outputs.data).permission) }}"
echo "::set-output name=should_run::${{ !contains(fromJson('["admin", "write"]'), fromJson(steps.get_permissions.outputs.data).permission) }}"
- name: Get file changes
uses: trilom/file-changes-action@ce38c8ce2459ca3c303415eec8cb0409857b4272
if: ${{ steps.control.outputs.should_run == 'true' }}
- name: Check for yarn.lock changes
if: ${{ steps.control.outputs.should_run == 'true' }}
run: |
cat $HOME/files.json | jq -e 'any(test("yarn\\.lock$")) | not' \
|| (echo "Changes to yarn.lock files aren't allowed in PRs." && exit 1) || (echo "Changes to yarn.lock files aren't allowed in PRs." && exit 1)

View File

@ -33,4 +33,5 @@ jobs:
with: with:
languages: typescript languages: typescript
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
typescriptVersion: 0.6.0-next.8
continue-on-error: true continue-on-error: true

View File

@ -199,6 +199,13 @@
"name": "Attach to VS Code", "name": "Attach to VS Code",
"browserAttachLocation": "workspace", "browserAttachLocation": "workspace",
"port": 9222, "port": 9222,
"trace": true,
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"resolveSourceMapLocations": [
"${workspaceFolder}/out/**/*.js"
],
"perScriptSourcemaps": "yes" "perScriptSourcemaps": "yes"
}, },
{ {

File diff suppressed because one or more lines are too long

View File

@ -2,127 +2,106 @@
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "#### Macros", "value": "#### Macros"
"editable": true
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-js-debug repo:microsoft/vscode-remote-release repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-emmet-helper\n\n$MILESTONE=milestone:\"March 2021\"", "value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-js-debug repo:microsoft/vscode-remote-release repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-remotehub\n\n$MILESTONE=milestone:\"April 2021\""
"editable": true
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "# Preparation", "value": "# Preparation"
"editable": true
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Open Pull Requests on the Milestone", "value": "## Open Pull Requests on the Milestone"
"editable": true
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE is:pr is:open", "value": "$REPOS $MILESTONE is:pr is:open"
"editable": true
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Open Issues on the Milestone", "value": "## Open Issues on the Milestone"
"editable": true
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE is:issue is:open -label:iteration-plan -label:endgame-plan -label:testplan-item", "value": "$REPOS $MILESTONE is:issue is:open -label:iteration-plan -label:endgame-plan -label:testplan-item"
"editable": true
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Feature Requests Missing Labels", "value": "## Feature Requests Missing Labels"
"editable": true
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE is:issue is:closed label:feature-request -label:verification-needed -label:on-testplan -label:verified -label:*duplicate", "value": "$REPOS $MILESTONE is:issue is:closed label:feature-request -label:verification-needed -label:on-testplan -label:verified -label:*duplicate"
"editable": true
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "# Testing", "value": "# Testing"
"editable": true
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Test Plan Items", "value": "## Test Plan Items"
"editable": true
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE is:issue is:open label:testplan-item", "value": "$REPOS $MILESTONE is:issue is:open label:testplan-item"
"editable": true
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Verification Needed", "value": "## Verification Needed"
"editable": true
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE is:issue is:closed label:feature-request label:verification-needed -label:verified", "value": "$REPOS $MILESTONE is:issue is:closed label:feature-request label:verification-needed -label:verified"
"editable": true
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "# Verification", "value": "# Verification"
"editable": true
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Verifiable Fixes", "value": "## Verifiable Fixes"
"editable": true
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE is:issue is:closed sort:updated-asc label:bug -label:verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found -label:z-author-verified -label:unreleased", "value": "$REPOS $MILESTONE is:issue is:closed sort:updated-asc label:bug -label:verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found -label:z-author-verified -label:unreleased"
"editable": true
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Unreleased Fixes", "value": "## Unreleased Fixes"
"editable": true
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE is:issue is:closed sort:updated-asc label:bug -label:verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found -label:z-author-verified label:unreleased", "value": "$REPOS $MILESTONE is:issue is:closed sort:updated-asc label:bug -label:verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found -label:z-author-verified label:unreleased"
"editable": true
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "# Candidates", "value": "# Candidates"
"editable": true
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE is:open label:candidate", "value": "$REPOS $MILESTONE is:open label:candidate"
"editable": true
} }
] ]

View File

@ -3,56 +3,48 @@
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## tl;dr: Triage Inbox\n\nAll inbox issues but not those that need more information. These issues need to be triaged, e.g assigned to a user or ask for more information", "value": "## tl;dr: Triage Inbox\n\nAll inbox issues but not those that need more information. These issues need to be triaged, e.g assigned to a user or ask for more information",
"editable": true, "editable": true
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$inbox -label:\"needs more info\"", "value": "$inbox -label:\"needs more info\"",
"editable": true, "editable": true
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "##### `Config`: defines the inbox query", "value": "##### `Config`: defines the inbox query",
"editable": true, "editable": true
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$inbox=repo:microsoft/vscode is:open no:assignee -label:feature-request -label:testplan-item -label:plan-item ", "value": "$inbox=repo:microsoft/vscode is:open no:assignee -label:feature-request -label:testplan-item -label:plan-item ",
"editable": true, "editable": true
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Inbox tracking and Issue triage", "value": "## Inbox tracking and Issue triage",
"editable": true, "editable": true
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "New issues or pull requests submitted by the community are initially triaged by an [automatic classification bot](https://github.com/microsoft/vscode-github-triage-actions/tree/master/classifier-deep). Issues that the bot does not correctly triage are then triaged by a team member. The team rotates the inbox tracker on a weekly basis.\n\nA [mirror](https://github.com/JacksonKearl/testissues/issues) of the VS Code issue stream is available with details about how the bot classifies issues, including feature-area classifications and confidence ratings. Per-category confidence thresholds and feature-area ownership data is maintained in [.github/classifier.json](https://github.com/microsoft/vscode/blob/main/.github/classifier.json). \n\n💡 The bot is being run through a GitHub action that runs every 30 minutes. Give the bot the opportunity to classify an issue before doing it manually.\n\n### Inbox Tracking\n\nThe inbox tracker is responsible for the [global inbox](https://github.com/microsoft/vscode/issues?utf8=%E2%9C%93&q=is%3Aopen+no%3Aassignee+-label%3Afeature-request+-label%3Atestplan-item+-label%3Aplan-item) containing all **open issues and pull requests** that\n- are neither **feature requests** nor **test plan items** nor **plan items** and\n- have **no owner assignment**.\n\nThe **inbox tracker** may perform any step described in our [issue triaging documentation](https://github.com/microsoft/vscode/wiki/Issues-Triaging) but its main responsibility is to route issues to the actual feature area owner.\n\nFeature area owners track the **feature area inbox** containing all **open issues and pull requests** that\n- are personally assigned to them and are not assigned to any milestone\n- are labeled with their feature area label and are not assigned to any milestone.\nThis secondary triage may involve any of the steps described in our [issue triaging documentation](https://github.com/microsoft/vscode/wiki/Issues-Triaging) and results in a fully triaged or closed issue.\n\nThe [github triage extension](https://github.com/microsoft/vscode-github-triage-extension) can be used to assist with triaging — it provides a \"Command Palette\"-style list of triaging actions like assignment, labeling, and triggers for various bot actions.", "value": "New issues or pull requests submitted by the community are initially triaged by an [automatic classification bot](https://github.com/microsoft/vscode-github-triage-actions/tree/master/classifier-deep). Issues that the bot does not correctly triage are then triaged by a team member. The team rotates the inbox tracker on a weekly basis.\n\nA [mirror](https://github.com/JacksonKearl/testissues/issues) of the VS Code issue stream is available with details about how the bot classifies issues, including feature-area classifications and confidence ratings. Per-category confidence thresholds and feature-area ownership data is maintained in [.github/classifier.json](https://github.com/microsoft/vscode/blob/main/.github/classifier.json). \n\n💡 The bot is being run through a GitHub action that runs every 30 minutes. Give the bot the opportunity to classify an issue before doing it manually.\n\n### Inbox Tracking\n\nThe inbox tracker is responsible for the [global inbox](https://github.com/microsoft/vscode/issues?utf8=%E2%9C%93&q=is%3Aopen+no%3Aassignee+-label%3Afeature-request+-label%3Atestplan-item+-label%3Aplan-item) containing all **open issues and pull requests** that\n- are neither **feature requests** nor **test plan items** nor **plan items** and\n- have **no owner assignment**.\n\nThe **inbox tracker** may perform any step described in our [issue triaging documentation](https://github.com/microsoft/vscode/wiki/Issues-Triaging) but its main responsibility is to route issues to the actual feature area owner.\n\nFeature area owners track the **feature area inbox** containing all **open issues and pull requests** that\n- are personally assigned to them and are not assigned to any milestone\n- are labeled with their feature area label and are not assigned to any milestone.\nThis secondary triage may involve any of the steps described in our [issue triaging documentation](https://github.com/microsoft/vscode/wiki/Issues-Triaging) and results in a fully triaged or closed issue.\n\nThe [github triage extension](https://github.com/microsoft/vscode-github-triage-extension) can be used to assist with triaging — it provides a \"Command Palette\"-style list of triaging actions like assignment, labeling, and triggers for various bot actions.",
"editable": true, "editable": true
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## All Inbox Items\n\nAll issues that have no assignee and that have neither **feature requests** nor **test plan items** nor **plan items**.", "value": "## All Inbox Items\n\nAll issues that have no assignee and that have neither **feature requests** nor **test plan items** nor **plan items**.",
"editable": true, "editable": true
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$inbox", "value": "$inbox",
"editable": true, "editable": true
"outputs": []
} }
] ]

View File

@ -2,253 +2,181 @@
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "#### Macros", "value": "#### Macros"
"editable": true,
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-js-debug repo:microsoft/vscode-remote-release repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-settings-sync-server\n\n$MILESTONE=milestone:\"March 2021\"\n\n$MINE=assignee:@me", "value": "$REPOS=repo:microsoft/vscode repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-js-debug repo:microsoft/vscode-remote-release repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-remotehub\n\n$MILESTONE=milestone:\"April 2021\"\n\n$MINE=assignee:@me"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "# Preparation", "value": "# Preparation"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Open Pull Requests on the Milestone", "value": "## Open Pull Requests on the Milestone"
"editable": true,
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE $MINE is:pr is:open", "value": "$REPOS $MILESTONE $MINE is:pr is:open"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Open Issues on the Milestone", "value": "## Open Issues on the Milestone"
"editable": true,
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE $MINE is:issue is:open -label:iteration-plan -label:endgame-plan -label:testplan-item", "value": "$REPOS $MILESTONE $MINE is:issue is:open -label:iteration-plan -label:endgame-plan -label:testplan-item"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Feature Requests Missing Labels", "value": "## Feature Requests Missing Labels"
"editable": true,
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE $MINE is:issue is:closed label:feature-request -label:verification-needed -label:on-testplan -label:verified -label:*duplicate", "value": "$REPOS $MILESTONE $MINE is:issue is:closed label:feature-request -label:verification-needed -label:on-testplan -label:verified -label:*duplicate"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Test Plan Items", "value": "## Test Plan Items"
"editable": true,
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE is:issue is:open author:@me label:testplan-item", "value": "$REPOS $MILESTONE is:issue is:open author:@me label:testplan-item"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Verification Needed", "value": "## Verification Needed"
"editable": true,
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE $MINE is:issue is:closed label:feature-request label:verification-needed", "value": "$REPOS $MILESTONE $MINE is:issue is:closed label:feature-request label:verification-needed"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "# Testing", "value": "# Testing"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Test Plan Items", "value": "## Test Plan Items"
"editable": true,
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE $MINE is:issue is:open label:testplan-item", "value": "$REPOS $MILESTONE $MINE is:issue is:open label:testplan-item"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Verification Needed", "value": "## Verification Needed"
"editable": true,
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE -$MINE is:issue is:closed -assignee:@me -label:verified -label:z-author-verified label:feature-request label:verification-needed", "value": "$REPOS $MILESTONE -$MINE is:issue is:closed -assignee:@me -label:verified -label:z-author-verified label:feature-request label:verification-needed"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "# Fixing", "value": "# Fixing"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Open Issues", "value": "## Open Issues"
"editable": true,
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE $MINE is:issue is:open -label:endgame-plan -label:testplan-item -label:iteration-plan", "value": "$REPOS $MILESTONE $MINE is:issue is:open -label:endgame-plan -label:testplan-item -label:iteration-plan"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Open Bugs", "value": "## Open Bugs"
"editable": true,
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE $MINE is:issue is:open label:bug", "value": "$REPOS $MILESTONE $MINE is:issue is:open label:bug"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "# Verification", "value": "# Verification"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## My Issues (verification-steps-needed)", "value": "## My Issues (verification-steps-needed)"
"editable": true,
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE $MINE is:issue label:bug label:verification-steps-needed", "value": "$REPOS $MILESTONE $MINE is:issue label:bug label:verification-steps-needed"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## My Issues (verification-found)", "value": "## My Issues (verification-found)"
"editable": true,
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE $MINE is:issue label:bug label:verification-found", "value": "$REPOS $MILESTONE $MINE is:issue label:bug label:verification-found"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Issues filed by me", "value": "## Issues filed by me"
"editable": true,
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE -$MINE is:issue is:closed author:@me sort:updated-asc label:bug -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found", "value": "$REPOS $MILESTONE -$MINE is:issue is:closed author:@me sort:updated-asc label:bug -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Issues filed from outside team", "value": "## Issues filed from outside team"
"editable": true,
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE -$MINE is:issue is:closed sort:updated-asc label:bug -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found -author:aeschli -author:alexdima -author:alexr00 -author:AmandaSilver -author:bamurtaugh -author:bpasero -author:btholt -author:chrisdias -author:chrmarti -author:Chuxel -author:connor4312 -author:dbaeumer -author:deepak1556 -author:devinvalenciano -author:digitarald -author:eamodio -author:egamma -author:fiveisprime -author:gregvanl -author:isidorn -author:ItalyPaleAle -author:JacksonKearl -author:joaomoreno -author:jrieken -author:kieferrm -author:lszomoru -author:meganrogge -author:misolori -author:mjbvz -author:ornellaalt -author:orta -author:rebornix -author:RMacfarlane -author:roblourens -author:rzhao271 -author:sana-ajani -author:sandy081 -author:sbatten -author:stevencl -author:Tyriar -author:weinand -author:TylerLeonhardt -author:lramos15", "value": "$REPOS $MILESTONE -$MINE is:issue is:closed sort:updated-asc label:bug -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found -author:aeschli -author:alexdima -author:alexr00 -author:AmandaSilver -author:bamurtaugh -author:bpasero -author:btholt -author:chrisdias -author:chrmarti -author:Chuxel -author:connor4312 -author:dbaeumer -author:deepak1556 -author:devinvalenciano -author:digitarald -author:eamodio -author:egamma -author:fiveisprime -author:gregvanl -author:isidorn -author:ItalyPaleAle -author:JacksonKearl -author:joaomoreno -author:jrieken -author:kieferrm -author:lszomoru -author:meganrogge -author:misolori -author:mjbvz -author:ornellaalt -author:orta -author:rebornix -author:RMacfarlane -author:roblourens -author:rzhao271 -author:sana-ajani -author:sandy081 -author:sbatten -author:stevencl -author:Tyriar -author:weinand -author:TylerLeonhardt -author:lramos15"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Issues filed by others", "value": "## Issues filed by others"
"editable": true,
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "$REPOS $MILESTONE -$MINE is:issue is:closed -author:@me sort:updated-asc label:bug -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found", "value": "$REPOS $MILESTONE -$MINE is:issue is:closed -author:@me sort:updated-asc label:bug -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:error-telemetry -label:verification-steps-needed -label:verification-found"
"editable": true,
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "# Release Notes", "value": "# Release Notes"
"editable": true,
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "repo:microsoft/vscode $MILESTONE $MINE is:issue is:closed label:feature-request -label:on-release-notes", "value": "repo:microsoft/vscode $MILESTONE $MINE is:issue is:closed label:feature-request -label:on-release-notes"
"editable": true,
"outputs": []
} }
] ]

View File

@ -8,7 +8,7 @@
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "// list of repos we work in\n$repos=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog\n\n// current milestone name\n$milestone=milestone:\"March 2021\"", "value": "// list of repos we work in\n$repos=repo:microsoft/vscode repo:microsoft/vscode-remote-release repo:microsoft/vscode-js-debug repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-internalbacklog\n\n// current milestone name\n$milestone=milestone:\"April 2021\"",
"editable": true "editable": true
}, },
{ {

View File

@ -3,49 +3,42 @@
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Papercuts\n\nThis notebook serves as an ongoing collection of papercut issues that we encounter while dogfooding. With that in mind only promote issues that really turn you off, e.g. issues that make you want to stop using VS Code or its extensions. To mark an issue (bug, feature-request, etc.) as papercut add the labels: `papercut :drop_of_blood:`", "value": "## Papercuts\n\nThis notebook serves as an ongoing collection of papercut issues that we encounter while dogfooding. With that in mind only promote issues that really turn you off, e.g. issues that make you want to stop using VS Code or its extensions. To mark an issue (bug, feature-request, etc.) as papercut add the labels: `papercut :drop_of_blood:`",
"editable": true, "editable": true
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## All Papercuts\n\nThese are all papercut issues that we encounter while dogfooding vscode or extensions that we author.", "value": "## All Papercuts\n\nThese are all papercut issues that we encounter while dogfooding vscode or extensions that we author.",
"editable": true, "editable": true
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "repo:microsoft/vscode is:open -label:notebook label:\"papercut :drop_of_blood:\"", "value": "repo:microsoft/vscode is:open -label:notebook label:\"papercut :drop_of_blood:\"",
"editable": true, "editable": true
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "## Native Notebook", "value": "## Native Notebook",
"editable": true, "editable": true
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "repo:microsoft/vscode is:open label:notebook label:\"papercut :drop_of_blood:\"", "value": "repo:microsoft/vscode is:open label:notebook label:\"papercut :drop_of_blood:\"",
"editable": true, "editable": true
"outputs": []
}, },
{ {
"kind": 1, "kind": 1,
"language": "markdown", "language": "markdown",
"value": "### My Papercuts", "value": "### My Papercuts",
"editable": true, "editable": true
"outputs": []
}, },
{ {
"kind": 2, "kind": 2,
"language": "github-issues", "language": "github-issues",
"value": "repo:microsoft/vscode is:open assignee:@me label:\"papercut :drop_of_blood:\"", "value": "repo:microsoft/vscode is:open assignee:@me label:\"papercut :drop_of_blood:\"",
"editable": true, "editable": true
"outputs": []
} }
] ]

View File

@ -85,6 +85,6 @@
"editor.formatOnSave": true, "editor.formatOnSave": true,
}, },
"typescript.tsc.autoDetect": "off", "typescript.tsc.autoDetect": "off",
// "notebook.experimental.useMarkdownRenderer": true, "notebook.experimental.useMarkdownRenderer": true,
"testing.autoRun.mode": "onlyPreviouslyRun", "testing.autoRun.mode": "rerun",
} }

View File

@ -4,10 +4,11 @@
{ {
"type": "npm", "type": "npm",
"script": "watch-clientd", "script": "watch-clientd",
"label": "Build VS Code Core", "label": "Core - Build",
"isBackground": true, "isBackground": true,
"presentation": { "presentation": {
"reveal": "never" "reveal": "never",
"group": "buildWatchers"
}, },
"problemMatcher": { "problemMatcher": {
"owner": "typescript", "owner": "typescript",
@ -30,10 +31,11 @@
{ {
"type": "npm", "type": "npm",
"script": "watch-extensionsd", "script": "watch-extensionsd",
"label": "Build VS Code Extensions", "label": "Ext - Build",
"isBackground": true, "isBackground": true,
"presentation": { "presentation": {
"reveal": "never" "reveal": "never",
"group": "buildWatchers"
}, },
"problemMatcher": { "problemMatcher": {
"owner": "typescript", "owner": "typescript",
@ -54,10 +56,38 @@
} }
}, },
{ {
"label": "Build VS Code", "type": "npm",
"script": "watch-extension-mediad",
"label": "Ext Media - Build",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "buildWatchers"
},
"problemMatcher": {
"owner": "typescript",
"applyTo": "closedDocuments",
"fileLocation": [
"absolute"
],
"pattern": {
"regexp": "Error: ([^(]+)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\): (.*)$",
"file": 1,
"location": 2,
"message": 3
},
"background": {
"beginsPattern": "Starting compilation",
"endsPattern": "Finished compilation"
}
}
},
{
"label": "VS Code - Build",
"dependsOn": [ "dependsOn": [
"Build VS Code Core", "Core - Build",
"Build VS Code Extensions" "Ext - Build",
"Ext Media - Build",
], ],
"group": { "group": {
"kind": "build", "kind": "build",
@ -68,28 +98,42 @@
{ {
"type": "npm", "type": "npm",
"script": "kill-watch-clientd", "script": "kill-watch-clientd",
"label": "Kill Build VS Code Core", "label": "Kill Core - Build",
"group": "build", "group": "build",
"presentation": { "presentation": {
"reveal": "never" "reveal": "never",
"group": "buildKillers"
}, },
"problemMatcher": "$tsc" "problemMatcher": "$tsc"
}, },
{ {
"type": "npm", "type": "npm",
"script": "kill-watch-extensionsd", "script": "kill-watch-extensionsd",
"label": "Kill Build VS Code Extensions", "label": "Kill Ext - Build",
"group": "build", "group": "build",
"presentation": { "presentation": {
"reveal": "never" "reveal": "never",
"group": "buildKillers"
}, },
"problemMatcher": "$tsc" "problemMatcher": "$tsc"
}, },
{ {
"label": "Kill Build VS Code", "type": "npm",
"script": "kill-watch-extension-mediad",
"label": "Kill Ext Media - Build",
"group": "build",
"presentation": {
"reveal": "never",
"group": "buildKillers"
},
"problemMatcher": "$tsc"
},
{
"label": "Kill VS Code - Build",
"dependsOn": [ "dependsOn": [
"Kill Build VS Code Core", "Kill Core - Build",
"Kill Build VS Code Extensions" "Kill Ext - Build",
"Kill Ext Media - Build",
], ],
"group": "build", "group": "build",
"problemMatcher": [] "problemMatcher": []
@ -97,7 +141,7 @@
{ {
"type": "npm", "type": "npm",
"script": "watch-webd", "script": "watch-webd",
"label": "Build Web Extensions", "label": "Web Ext - Build",
"group": "build", "group": "build",
"isBackground": true, "isBackground": true,
"presentation": { "presentation": {
@ -124,7 +168,7 @@
{ {
"type": "npm", "type": "npm",
"script": "kill-watch-webd", "script": "kill-watch-webd",
"label": "Kill Build Web Extensions", "label": "Kill Web Ext - Build",
"group": "build", "group": "build",
"presentation": { "presentation": {
"reveal": "never" "reveal": "never"

View File

@ -1,3 +1,3 @@
disturl "https://electronjs.org/headers" disturl "https://electronjs.org/headers"
target "11.3.0" target "12.0.4"
runtime "electron" runtime "electron"

View File

@ -10,7 +10,7 @@ This project incorporates components from the projects listed below. The origina
3. atom/language-coffee-script version 0.49.3 (https://github.com/atom/language-coffee-script) 3. atom/language-coffee-script version 0.49.3 (https://github.com/atom/language-coffee-script)
4. atom/language-css version 0.44.4 (https://github.com/atom/language-css) 4. atom/language-css version 0.44.4 (https://github.com/atom/language-css)
5. atom/language-java version 0.32.1 (https://github.com/atom/language-java) 5. atom/language-java version 0.32.1 (https://github.com/atom/language-java)
6. atom/language-sass version 0.62.1 (https://github.com/atom/language-sass) 6. atom/language-sass version 0.61.4 (https://github.com/atom/language-sass)
7. atom/language-shellscript version 0.26.0 (https://github.com/atom/language-shellscript) 7. atom/language-shellscript version 0.26.0 (https://github.com/atom/language-shellscript)
8. atom/language-xml version 0.35.2 (https://github.com/atom/language-xml) 8. atom/language-xml version 0.35.2 (https://github.com/atom/language-xml)
9. better-go-syntax version 1.0.0 (https://github.com/jeff-hykin/better-go-syntax/ ) 9. better-go-syntax version 1.0.0 (https://github.com/jeff-hykin/better-go-syntax/ )
@ -44,30 +44,31 @@ This project incorporates components from the projects listed below. The origina
37. microsoft/vscode-markdown-tm-grammar version 1.0.0 (https://github.com/microsoft/vscode-markdown-tm-grammar) 37. microsoft/vscode-markdown-tm-grammar version 1.0.0 (https://github.com/microsoft/vscode-markdown-tm-grammar)
38. microsoft/vscode-mssql version 1.9.0 (https://github.com/microsoft/vscode-mssql) 38. microsoft/vscode-mssql version 1.9.0 (https://github.com/microsoft/vscode-mssql)
39. mmims/language-batchfile version 0.7.5 (https://github.com/mmims/language-batchfile) 39. mmims/language-batchfile version 0.7.5 (https://github.com/mmims/language-batchfile)
40. PowerShell/EditorSyntax version 1.0.0 (https://github.com/PowerShell/EditorSyntax) 40. NVIDIA/cuda-cpp-grammar (https://github.com/NVIDIA/cuda-cpp-grammar)
41. rust-syntax version 0.4.3 (https://github.com/dustypomerleau/rust-syntax) 41. PowerShell/EditorSyntax version 1.0.0 (https://github.com/PowerShell/EditorSyntax)
42. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui) 42. rust-syntax version 0.4.3 (https://github.com/dustypomerleau/rust-syntax)
43. shaders-tmLanguage version 0.1.0 (https://github.com/tgjones/shaders-tmLanguage) 43. seti-ui version 0.1.0 (https://github.com/jesseweed/seti-ui)
44. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle) 44. shaders-tmLanguage version 0.1.0 (https://github.com/tgjones/shaders-tmLanguage)
45. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle) 45. textmate/asp.vb.net.tmbundle (https://github.com/textmate/asp.vb.net.tmbundle)
46. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle) 46. textmate/c.tmbundle (https://github.com/textmate/c.tmbundle)
47. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle) 47. textmate/diff.tmbundle (https://github.com/textmate/diff.tmbundle)
48. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle) 48. textmate/git.tmbundle (https://github.com/textmate/git.tmbundle)
49. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle) 49. textmate/groovy.tmbundle (https://github.com/textmate/groovy.tmbundle)
50. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle) 50. textmate/html.tmbundle (https://github.com/textmate/html.tmbundle)
51. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle) 51. textmate/ini.tmbundle (https://github.com/textmate/ini.tmbundle)
52. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle) 52. textmate/javascript.tmbundle (https://github.com/textmate/javascript.tmbundle)
53. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle) 53. textmate/lua.tmbundle (https://github.com/textmate/lua.tmbundle)
54. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle) 54. textmate/markdown.tmbundle (https://github.com/textmate/markdown.tmbundle)
55. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle) 55. textmate/perl.tmbundle (https://github.com/textmate/perl.tmbundle)
56. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle) 56. textmate/ruby.tmbundle (https://github.com/textmate/ruby.tmbundle)
57. TypeScript-TmLanguage version 0.1.8 (https://github.com/microsoft/TypeScript-TmLanguage) 57. textmate/yaml.tmbundle (https://github.com/textmate/yaml.tmbundle)
58. TypeScript-TmLanguage version 1.0.0 (https://github.com/microsoft/TypeScript-TmLanguage) 58. TypeScript-TmLanguage version 0.1.8 (https://github.com/microsoft/TypeScript-TmLanguage)
59. Unicode version 12.0.0 (https://home.unicode.org/) 59. TypeScript-TmLanguage version 1.0.0 (https://github.com/microsoft/TypeScript-TmLanguage)
60. vscode-codicons version 0.0.14 (https://github.com/microsoft/vscode-codicons) 60. Unicode version 12.0.0 (https://home.unicode.org/)
61. vscode-logfile-highlighter version 2.11.0 (https://github.com/emilast/vscode-logfile-highlighter) 61. vscode-codicons version 0.0.14 (https://github.com/microsoft/vscode-codicons)
62. vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift) 62. vscode-logfile-highlighter version 2.11.0 (https://github.com/emilast/vscode-logfile-highlighter)
63. Web Background Synchronization (https://github.com/WICG/background-sync) 63. vscode-swift version 0.0.1 (https://github.com/owensd/vscode-swift)
64. Web Background Synchronization (https://github.com/WICG/background-sync)
%% JuliaEditorSupport/atom-language-julia NOTICES AND INFORMATION BEGIN HERE %% JuliaEditorSupport/atom-language-julia NOTICES AND INFORMATION BEGIN HERE
@ -1718,7 +1719,7 @@ END OF microsoft/vscode-mssql NOTICES AND INFORMATION
========================================= =========================================
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2017 Michael Mims Copyright (c) 2021 Michael Mims
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
@ -1740,6 +1741,20 @@ THE SOFTWARE.
========================================= =========================================
END OF mmims/language-batchfile NOTICES AND INFORMATION END OF mmims/language-batchfile NOTICES AND INFORMATION
%% NVIDIA/cuda-cpp-grammar NOTICES AND INFORMATION BEGIN HERE
=========================================
The MIT License (MIT)
Copyright 2021 NVIDIA Corporation
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
=========================================
END OF NVIDIA/cuda-cpp-grammar NOTICES AND INFORMATION
%% PowerShell/EditorSyntax NOTICES AND INFORMATION BEGIN HERE %% PowerShell/EditorSyntax NOTICES AND INFORMATION BEGIN HERE
========================================= =========================================
Copyright (c) Microsoft Corporation Copyright (c) Microsoft Corporation

View File

@ -1 +1 @@
2021-01-28T11:52:11.376Z 2021-04-07T03:52:18.011Z

View File

@ -8,5 +8,11 @@
<true/> <true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key> <key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/> <true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.automation.apple-events</key>
<true/>
</dict> </dict>
</plist> </plist>

View File

@ -1,7 +1,7 @@
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "12.18.3" versionSpec: "14.x"
- task: AzureKeyVault@1 - task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets" displayName: "Azure Key Vault: Get Secrets"

View File

@ -1,7 +1,7 @@
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "12.18.3" versionSpec: "14.x"
- task: AzureKeyVault@1 - task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets" displayName: "Azure Key Vault: Get Secrets"
@ -83,6 +83,7 @@ steps:
set -e set -e
export npm_config_arch=$(VSCODE_ARCH) export npm_config_arch=$(VSCODE_ARCH)
export npm_config_node_gyp=$(which node-gyp) export npm_config_node_gyp=$(which node-gyp)
export npm_config_build_from_source=true
export SDKROOT=/Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk export SDKROOT=/Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk
for i in {1..3}; do # try 3 times, for Terrapin for i in {1..3}; do # try 3 times, for Terrapin
@ -107,20 +108,6 @@ steps:
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true')) condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Create node_modules archive displayName: Create node_modules archive
- script: |
set -e
export npm_config_arch=$(VSCODE_ARCH)
export npm_config_node_gyp=$(which node-gyp)
export npm_config_build_from_source=true
export SDKROOT=/Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk
ls /Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
yarn electron-rebuild
# remove once https://github.com/prebuild/prebuild-install/pull/140 is merged and found in keytar
cd ./node_modules/keytar
node-gyp rebuild
displayName: Rebuild native modules for ARM64
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'arm64'))
# This script brings in the right resources (images, icons, etc) based on the quality (insiders, stable, exploration) # This script brings in the right resources (images, icons, etc) based on the quality (insiders, stable, exploration)
- script: | - script: |
set -e set -e
@ -223,7 +210,7 @@ steps:
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin" \ VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin" \
./resources/server/test/test-web-integration.sh --browser webkit ./resources/server/test/test-web-integration.sh --browser webkit
displayName: Run integration tests (Browser) displayName: Run integration tests (Browser)
timeoutInMinutes: 7 timeoutInMinutes: 10
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false')) condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
- script: | - script: |

View File

@ -8,7 +8,7 @@ pr:
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "12.18.3" versionSpec: "14.x"
- task: AzureKeyVault@1 - task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets" displayName: "Azure Key Vault: Get Secrets"

View File

@ -7,7 +7,7 @@ pr: none
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "12.18.3" versionSpec: "14.x"
- task: AzureKeyVault@1 - task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets" displayName: "Azure Key Vault: Get Secrets"
@ -27,10 +27,10 @@ steps:
git config user.email "vscode@microsoft.com" git config user.email "vscode@microsoft.com"
git config user.name "VSCode" git config user.name "VSCode"
git checkout origin/electron-11.x.y git checkout origin/electron-12.x.y
git merge origin/main git merge origin/main
# Push main branch into exploration branch # Push main branch into exploration branch
git push origin HEAD:electron-11.x.y git push origin HEAD:electron-12.x.y
displayName: Sync & Merge Exploration displayName: Sync & Merge Exploration

View File

@ -1,7 +1,7 @@
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "12.18.3" versionSpec: "14.x"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:

View File

@ -1,7 +1,7 @@
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "12.18.3" versionSpec: "14.x"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:
@ -59,13 +59,6 @@ steps:
condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true')) condition: and(succeeded(), eq(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Extract node_modules cache displayName: Extract node_modules cache
- script: |
set -e
npm install -g node-gyp@latest
node-gyp --version
displayName: Update node-gyp
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), eq(variables['VSCODE_ARCH'], 'x64'))
- script: | - script: |
set -e set -e
npx https://aka.ms/enablesecurefeed standAlone npx https://aka.ms/enablesecurefeed standAlone
@ -86,7 +79,6 @@ steps:
if [ "$VSCODE_ARCH" == "x64" ]; then if [ "$VSCODE_ARCH" == "x64" ]; then
export VSCODE_REMOTE_CC=$(which gcc-4.8) export VSCODE_REMOTE_CC=$(which gcc-4.8)
export VSCODE_REMOTE_CXX=$(which g++-4.8) export VSCODE_REMOTE_CXX=$(which g++-4.8)
export VSCODE_REMOTE_NODE_GYP=$(which node-gyp)
fi fi
for i in {1..3}; do # try 3 times, for Terrapin for i in {1..3}; do # try 3 times, for Terrapin
@ -177,7 +169,7 @@ steps:
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-linux-$(VSCODE_ARCH)" \ VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-linux-$(VSCODE_ARCH)" \
DISPLAY=:10 ./resources/server/test/test-web-integration.sh --browser chromium DISPLAY=:10 ./resources/server/test/test-web-integration.sh --browser chromium
displayName: Run integration tests (Browser) displayName: Run integration tests (Browser)
timeoutInMinutes: 7 timeoutInMinutes: 10
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false')) condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
- script: | - script: |

View File

@ -1,7 +1,7 @@
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "12.18.3" versionSpec: "14.x"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:

View File

@ -271,7 +271,7 @@ stages:
VSCODE_ARCH: arm64 VSCODE_ARCH: arm64
steps: steps:
- template: darwin/product-build-darwin.yml - template: darwin/product-build-darwin.yml
- ${{ if ne(variables['VSCODE_PUBLISH'], 'false') }}: - ${{ if ne(variables['VSCODE_PUBLISH'], 'false') }}:
- job: macOSARM64Sign - job: macOSARM64Sign
dependsOn: dependsOn:
- macOSARM64 - macOSARM64

View File

@ -1,7 +1,7 @@
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "12.x" versionSpec: "14.x"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:

View File

@ -9,7 +9,7 @@ pr: none
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "12.18.3" versionSpec: "14.x"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:

View File

@ -1,7 +1,7 @@
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "10.x" versionSpec: "14.x"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:

View File

@ -1,7 +1,7 @@
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "12.18.3" versionSpec: "14.x"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:

View File

@ -1,7 +1,7 @@
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "12.18.3" versionSpec: "14.x"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:

View File

@ -1,7 +1,7 @@
steps: steps:
- task: NodeTool@0 - task: NodeTool@0
inputs: inputs:
versionSpec: "12.18.3" versionSpec: "14.x"
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 - task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
inputs: inputs:
@ -78,6 +78,7 @@ steps:
. build/azure-pipelines/win32/retry.ps1 . build/azure-pipelines/win32/retry.ps1
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
$env:npm_config_arch="$(VSCODE_ARCH)" $env:npm_config_arch="$(VSCODE_ARCH)"
$env:npm_config_build_from_source="true"
$env:CHILD_CONCURRENCY="1" $env:CHILD_CONCURRENCY="1"
retry { exec { yarn --frozen-lockfile } } retry { exec { yarn --frozen-lockfile } }
env: env:
@ -179,7 +180,7 @@ steps:
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
exec { $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-web-win32-$(VSCODE_ARCH)"; .\resources\server\test\test-web-integration.bat --browser firefox } exec { $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-web-win32-$(VSCODE_ARCH)"; .\resources\server\test\test-web-integration.bat --browser firefox }
displayName: Run integration tests (Browser) displayName: Run integration tests (Browser)
timeoutInMinutes: 7 timeoutInMinutes: 10
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64')) condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'), ne(variables['VSCODE_ARCH'], 'arm64'))
- powershell: | - powershell: |

View File

@ -23,7 +23,17 @@ ipcMain.handle('pickdir', async () => {
}); });
app.once('ready', () => { app.once('ready', () => {
window = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, webviewTag: true, enableWebSQL: false, nativeWindowOpen: true } }); window = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
webviewTag: true,
enableWebSQL: false,
nativeWindowOpen: true
}
});
window.setMenuBarVisibility(false); window.setMenuBarVisibility(false);
window.loadURL(url.format({ pathname: path.join(__dirname, 'index.html'), protocol: 'file:', slashes: true })); window.loadURL(url.format({ pathname: path.join(__dirname, 'index.html'), protocol: 'file:', slashes: true }));
// window.webContents.openDevTools(); // window.webContents.openDevTools();

View File

@ -33,6 +33,7 @@ async function main() {
'Credits.rtf', 'Credits.rtf',
'CodeResources', 'CodeResources',
'fsevents.node', 'fsevents.node',
'Info.plist', // TODO@deepak1556: regressed with 11.4.2 internal builds
'.npmrc' '.npmrc'
], ],
outAppPath, outAppPath,

View File

@ -38,6 +38,7 @@ async function main() {
'Credits.rtf', 'Credits.rtf',
'CodeResources', 'CodeResources',
'fsevents.node', 'fsevents.node',
'Info.plist', // TODO@deepak1556: regressed with 11.4.2 internal builds
'.npmrc' '.npmrc'
], ],
outAppPath, outAppPath,

View File

@ -5,7 +5,9 @@
'use strict'; 'use strict';
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const codesign = require("electron-osx-sign"); const codesign = require("electron-osx-sign");
const fs = require("fs-extra");
const path = require("path"); const path = require("path");
const plist = require("plist");
const util = require("../lib/util"); const util = require("../lib/util");
const product = require("../../product.json"); const product = require("../../product.json");
async function main() { async function main() {
@ -25,6 +27,7 @@ async function main() {
const helperAppBaseName = product.nameShort; const helperAppBaseName = product.nameShort;
const gpuHelperAppName = helperAppBaseName + ' Helper (GPU).app'; const gpuHelperAppName = helperAppBaseName + ' Helper (GPU).app';
const rendererHelperAppName = helperAppBaseName + ' Helper (Renderer).app'; const rendererHelperAppName = helperAppBaseName + ' Helper (Renderer).app';
const infoPlistPath = path.resolve(appRoot, appName, 'Contents', 'Info.plist');
const defaultOpts = { const defaultOpts = {
app: path.join(appRoot, appName), app: path.join(appRoot, appName),
platform: 'darwin', platform: 'darwin',
@ -46,6 +49,14 @@ async function main() {
} }); } });
const gpuHelperOpts = Object.assign(Object.assign({}, defaultOpts), { app: path.join(appFrameworkPath, gpuHelperAppName), entitlements: path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-gpu-entitlements.plist'), 'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-gpu-entitlements.plist') }); const gpuHelperOpts = Object.assign(Object.assign({}, defaultOpts), { app: path.join(appFrameworkPath, gpuHelperAppName), entitlements: path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-gpu-entitlements.plist'), 'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-gpu-entitlements.plist') });
const rendererHelperOpts = Object.assign(Object.assign({}, defaultOpts), { app: path.join(appFrameworkPath, rendererHelperAppName), entitlements: path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-renderer-entitlements.plist'), 'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-renderer-entitlements.plist') }); const rendererHelperOpts = Object.assign(Object.assign({}, defaultOpts), { app: path.join(appFrameworkPath, rendererHelperAppName), entitlements: path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-renderer-entitlements.plist'), 'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-renderer-entitlements.plist') });
let infoPlistString = await fs.readFile(infoPlistPath, 'utf8');
let infoPlistJson = plist.parse(infoPlistString);
Object.assign(infoPlistJson, {
NSAppleEventsUsageDescription: 'An application in Visual Studio Code wants to use AppleScript.',
NSMicrophoneUsageDescription: 'An application in Visual Studio Code wants to use the Microphone.',
NSCameraUsageDescription: 'An application in Visual Studio Code wants to use the Camera.'
});
await fs.writeFile(infoPlistPath, plist.build(infoPlistJson), 'utf8');
await codesign.signAsync(gpuHelperOpts); await codesign.signAsync(gpuHelperOpts);
await codesign.signAsync(rendererHelperOpts); await codesign.signAsync(rendererHelperOpts);
await codesign.signAsync(appOpts); await codesign.signAsync(appOpts);

View File

@ -6,7 +6,9 @@
'use strict'; 'use strict';
import * as codesign from 'electron-osx-sign'; import * as codesign from 'electron-osx-sign';
import * as fs from 'fs-extra';
import * as path from 'path'; import * as path from 'path';
import * as plist from 'plist';
import * as util from '../lib/util'; import * as util from '../lib/util';
import * as product from '../../product.json'; import * as product from '../../product.json';
@ -30,6 +32,7 @@ async function main(): Promise<void> {
const helperAppBaseName = product.nameShort; const helperAppBaseName = product.nameShort;
const gpuHelperAppName = helperAppBaseName + ' Helper (GPU).app'; const gpuHelperAppName = helperAppBaseName + ' Helper (GPU).app';
const rendererHelperAppName = helperAppBaseName + ' Helper (Renderer).app'; const rendererHelperAppName = helperAppBaseName + ' Helper (Renderer).app';
const infoPlistPath = path.resolve(appRoot, appName, 'Contents', 'Info.plist');
const defaultOpts: codesign.SignOptions = { const defaultOpts: codesign.SignOptions = {
app: path.join(appRoot, appName), app: path.join(appRoot, appName),
@ -68,6 +71,15 @@ async function main(): Promise<void> {
'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-renderer-entitlements.plist'), 'entitlements-inherit': path.join(baseDir, 'azure-pipelines', 'darwin', 'helper-renderer-entitlements.plist'),
}; };
let infoPlistString = await fs.readFile(infoPlistPath, 'utf8');
let infoPlistJson = plist.parse(infoPlistString);
Object.assign(infoPlistJson, {
NSAppleEventsUsageDescription: 'An application in Visual Studio Code wants to use AppleScript.',
NSMicrophoneUsageDescription: 'An application in Visual Studio Code wants to use the Microphone.',
NSCameraUsageDescription: 'An application in Visual Studio Code wants to use the Camera.'
});
await fs.writeFile(infoPlistPath, plist.build(infoPlistJson), 'utf8');
await codesign.signAsync(gpuHelperOpts); await codesign.signAsync(gpuHelperOpts);
await codesign.signAsync(rendererHelperOpts); await codesign.signAsync(rendererHelperOpts);
await codesign.signAsync(appOpts as any); await codesign.signAsync(appOpts as any);

View File

@ -8,6 +8,7 @@ require('events').EventEmitter.defaultMaxListeners = 100;
const gulp = require('gulp'); const gulp = require('gulp');
const path = require('path'); const path = require('path');
const child_process = require('child_process');
const nodeUtil = require('util'); const nodeUtil = require('util');
const es = require('event-stream'); const es = require('event-stream');
const filter = require('gulp-filter'); const filter = require('gulp-filter');
@ -39,7 +40,6 @@ const compilations = [
'debug-server-ready/tsconfig.json', 'debug-server-ready/tsconfig.json',
'emmet/tsconfig.json', 'emmet/tsconfig.json',
'extension-editing/tsconfig.json', 'extension-editing/tsconfig.json',
'git-ui/tsconfig.json',
'git/tsconfig.json', 'git/tsconfig.json',
'github-authentication/tsconfig.json', 'github-authentication/tsconfig.json',
'github/tsconfig.json', 'github/tsconfig.json',
@ -202,13 +202,17 @@ gulp.task(compileExtensionsBuildLegacyTask);
//#region Extension media //#region Extension media
// Additional projects to webpack. These typically build code for webviews // Additional projects to webpack. These typically build code for webviews
const mediaCompilations = [ const webpackMediaConfigFiles = [
'markdown-language-features/webpack.config.js', 'markdown-language-features/webpack.config.js',
'markdown-language-features/webpack.notebook.js',
'notebook-markdown-extensions/webpack.notebook.js',
'simple-browser/webpack.config.js', 'simple-browser/webpack.config.js',
]; ];
// Additional projects to run esbuild on. These typically build code for webviews
const esbuildMediaScripts = [
'markdown-language-features/esbuild.js',
'notebook-markdown-extensions/esbuild.js',
];
const compileExtensionMediaTask = task.define('compile-extension-media', () => buildExtensionMedia(false)); const compileExtensionMediaTask = task.define('compile-extension-media', () => buildExtensionMedia(false));
gulp.task(compileExtensionMediaTask); gulp.task(compileExtensionMediaTask);
exports.compileExtensionMediaTask = compileExtensionMediaTask; exports.compileExtensionMediaTask = compileExtensionMediaTask;
@ -217,17 +221,24 @@ const watchExtensionMedia = task.define('watch-extension-media', () => buildExte
gulp.task(watchExtensionMedia); gulp.task(watchExtensionMedia);
exports.watchExtensionMedia = watchExtensionMedia; exports.watchExtensionMedia = watchExtensionMedia;
function buildExtensionMedia(isWatch, outputRoot) { const compileExtensionMediaBuildTask = task.define('compile-extension-media-build', () => buildExtensionMedia(false, '.build/extensions'));
const webpackConfigLocations = mediaCompilations.map(p => { gulp.task(compileExtensionMediaBuildTask);
async function buildExtensionMedia(isWatch, outputRoot) {
const webpackConfigLocations = webpackMediaConfigFiles.map(p => {
return { return {
configPath: path.join(extensionsPath, p), configPath: path.join(extensionsPath, p),
outputRoot: outputRoot ? path.join(root, outputRoot, path.dirname(p)) : undefined outputRoot: outputRoot ? path.join(root, outputRoot, path.dirname(p)) : undefined
}; };
}); });
return webpackExtensions('packaging extension media', isWatch, webpackConfigLocations); return Promise.all([
webpackExtensions('webpacking extension media', isWatch, webpackConfigLocations),
esbuildExtensions('esbuilding extension media', isWatch, esbuildMediaScripts.map(p => ({
script: path.join(extensionsPath, p),
outputRoot: outputRoot ? path.join(root, outputRoot, path.dirname(p)) : undefined
}))),
]);
} }
const compileExtensionMediaBuildTask = task.define('compile-extension-media-build', () => buildExtensionMedia(false, '.build/extensions'));
gulp.task(compileExtensionMediaBuildTask);
//#endregion //#endregion
@ -337,4 +348,44 @@ async function webpackExtensions(taskName, isWatch, webpackConfigLocations) {
}); });
} }
/**
* @param {string} taskName
* @param {boolean} isWatch
* @param {{ script: string, outputRoot?: string }}} scripts
*/
async function esbuildExtensions(taskName, isWatch, scripts) {
function reporter(/** @type {string} */ stdError, /** @type {string} */script) {
const matches = (stdError || '').match(/\> (.+): error: (.+)?/g);
fancyLog(`Finished ${ansiColors.green(taskName)} ${script} with ${matches ? matches.length : 0} errors.`);
for (const match of matches || []) {
fancyLog.error(match);
}
}
const tasks = scripts.map(({ script, outputRoot }) => {
return new Promise((resolve, reject) => {
const args = [script];
if (isWatch) {
args.push('--watch');
}
if (outputRoot) {
args.push('--outputRoot', outputRoot);
}
const proc = child_process.execFile(process.argv[0], args, {}, (error, _stdout, stderr) => {
if (error) {
return reject(error);
}
reporter(stderr, script);
if (stderr) {
return reject();
}
return resolve();
});
proc.stdout.on('data', (data) => {
fancyLog(`${ansiColors.green(taskName)}: ${data.toString('utf8')}`);
});
});
});
return Promise.all(tasks);
}

View File

@ -223,7 +223,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
const dependenciesSrc = _.flatten(productionDependencies.map(d => path.relative(root, d.path)).map(d => [`${d}/**`, `!${d}/**/{test,tests}/**`])); const dependenciesSrc = _.flatten(productionDependencies.map(d => path.relative(root, d.path)).map(d => [`${d}/**`, `!${d}/**/{test,tests}/**`]));
const deps = gulp.src(dependenciesSrc, { base: '.', dot: true }) const deps = gulp.src(dependenciesSrc, { base: '.', dot: true })
.pipe(filter(['**', `!**/${config.version}/**`, '!**/bin/darwin-arm64-85/**', '!**/package-lock.json', '!**/yarn.lock', '!**/*.js.map'])) .pipe(filter(['**', `!**/${config.version}/**`, '!**/bin/darwin-arm64-87/**', '!**/package-lock.json', '!**/yarn.lock', '!**/*.js.map']))
.pipe(util.cleanNodeModules(path.join(__dirname, '.moduleignore'))) .pipe(util.cleanNodeModules(path.join(__dirname, '.moduleignore')))
.pipe(jsFilter) .pipe(jsFilter)
.pipe(util.rewriteSourceMappingURL(sourceMappingURLBase)) .pipe(util.rewriteSourceMappingURL(sourceMappingURLBase))

View File

@ -30,10 +30,6 @@
"name": "vs/workbench/api/common", "name": "vs/workbench/api/common",
"project": "vscode-workbench" "project": "vscode-workbench"
}, },
{
"name": "vs/workbench/contrib/backup",
"project": "vscode-workbench"
},
{ {
"name": "vs/workbench/contrib/bulkEdit", "name": "vs/workbench/contrib/bulkEdit",
"project": "vscode-workbench" "project": "vscode-workbench"
@ -258,6 +254,10 @@
"name": "vs/workbench/services/authToken", "name": "vs/workbench/services/authToken",
"project": "vscode-workbench" "project": "vscode-workbench"
}, },
{
"name": "vs/workbench/services/backup",
"project": "vscode-workbench"
},
{ {
"name": "vs/workbench/services/bulkEdit", "name": "vs/workbench/services/bulkEdit",
"project": "vscode-workbench" "project": "vscode-workbench"
@ -397,6 +397,10 @@
{ {
"name": "vs/workbench/services/gettingStarted", "name": "vs/workbench/services/gettingStarted",
"project": "vscode-workbench" "project": "vscode-workbench"
},
{
"name": "vs/workbench/services/host",
"project": "vscode-workbench"
} }
] ]
} }

View File

@ -21,20 +21,20 @@ suite('XLF Parser Tests', () => {
}); });
test('XLF to keys & messages conversion', () => { test('XLF to keys & messages conversion', () => {
i18n.XLF.parse(sampleTranslatedXlf).then(function (resolvedFiles) { i18n.XLF.parse(sampleTranslatedXlf).then(function (resolvedFiles) {
assert.deepEqual(resolvedFiles[0].messages, translatedMessages); assert.deepStrictEqual(resolvedFiles[0].messages, translatedMessages);
assert.strictEqual(resolvedFiles[0].originalFilePath, originalFilePath); assert.strictEqual(resolvedFiles[0].originalFilePath, originalFilePath);
}); });
}); });
test('JSON file source path to Transifex resource match', () => { test('JSON file source path to Transifex resource match', () => {
const editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench'; const editorProject = 'vscode-editor', workbenchProject = 'vscode-workbench';
const platform = { name: 'vs/platform', project: editorProject }, editorContrib = { name: 'vs/editor/contrib', project: editorProject }, editor = { name: 'vs/editor', project: editorProject }, base = { name: 'vs/base', project: editorProject }, code = { name: 'vs/code', project: workbenchProject }, workbenchParts = { name: 'vs/workbench/contrib/html', project: workbenchProject }, workbenchServices = { name: 'vs/workbench/services/textfile', project: workbenchProject }, workbench = { name: 'vs/workbench', project: workbenchProject }; const platform = { name: 'vs/platform', project: editorProject }, editorContrib = { name: 'vs/editor/contrib', project: editorProject }, editor = { name: 'vs/editor', project: editorProject }, base = { name: 'vs/base', project: editorProject }, code = { name: 'vs/code', project: workbenchProject }, workbenchParts = { name: 'vs/workbench/contrib/html', project: workbenchProject }, workbenchServices = { name: 'vs/workbench/services/textfile', project: workbenchProject }, workbench = { name: 'vs/workbench', project: workbenchProject };
assert.deepEqual(i18n.getResource('vs/platform/actions/browser/menusExtensionPoint'), platform); assert.deepStrictEqual(i18n.getResource('vs/platform/actions/browser/menusExtensionPoint'), platform);
assert.deepEqual(i18n.getResource('vs/editor/contrib/clipboard/browser/clipboard'), editorContrib); assert.deepStrictEqual(i18n.getResource('vs/editor/contrib/clipboard/browser/clipboard'), editorContrib);
assert.deepEqual(i18n.getResource('vs/editor/common/modes/modesRegistry'), editor); assert.deepStrictEqual(i18n.getResource('vs/editor/common/modes/modesRegistry'), editor);
assert.deepEqual(i18n.getResource('vs/base/common/errorMessage'), base); assert.deepStrictEqual(i18n.getResource('vs/base/common/errorMessage'), base);
assert.deepEqual(i18n.getResource('vs/code/electron-main/window'), code); assert.deepStrictEqual(i18n.getResource('vs/code/electron-main/window'), code);
assert.deepEqual(i18n.getResource('vs/workbench/contrib/html/browser/webview'), workbenchParts); assert.deepStrictEqual(i18n.getResource('vs/workbench/contrib/html/browser/webview'), workbenchParts);
assert.deepEqual(i18n.getResource('vs/workbench/services/textfile/node/testFileService'), workbenchServices); assert.deepStrictEqual(i18n.getResource('vs/workbench/services/textfile/node/testFileService'), workbenchServices);
assert.deepEqual(i18n.getResource('vs/workbench/browser/parts/panel/panelActions'), workbench); assert.deepStrictEqual(i18n.getResource('vs/workbench/browser/parts/panel/panelActions'), workbench);
}); });
}); });

View File

@ -23,8 +23,8 @@ suite('XLF Parser Tests', () => {
}); });
test('XLF to keys & messages conversion', () => { test('XLF to keys & messages conversion', () => {
i18n.XLF.parse(sampleTranslatedXlf).then(function(resolvedFiles) { i18n.XLF.parse(sampleTranslatedXlf).then(function (resolvedFiles) {
assert.deepEqual(resolvedFiles[0].messages, translatedMessages); assert.deepStrictEqual(resolvedFiles[0].messages, translatedMessages);
assert.strictEqual(resolvedFiles[0].originalFilePath, originalFilePath); assert.strictEqual(resolvedFiles[0].originalFilePath, originalFilePath);
}); });
}); });
@ -40,15 +40,15 @@ suite('XLF Parser Tests', () => {
code = { name: 'vs/code', project: workbenchProject }, code = { name: 'vs/code', project: workbenchProject },
workbenchParts = { name: 'vs/workbench/contrib/html', project: workbenchProject }, workbenchParts = { name: 'vs/workbench/contrib/html', project: workbenchProject },
workbenchServices = { name: 'vs/workbench/services/textfile', project: workbenchProject }, workbenchServices = { name: 'vs/workbench/services/textfile', project: workbenchProject },
workbench = { name: 'vs/workbench', project: workbenchProject}; workbench = { name: 'vs/workbench', project: workbenchProject };
assert.deepEqual(i18n.getResource('vs/platform/actions/browser/menusExtensionPoint'), platform); assert.deepStrictEqual(i18n.getResource('vs/platform/actions/browser/menusExtensionPoint'), platform);
assert.deepEqual(i18n.getResource('vs/editor/contrib/clipboard/browser/clipboard'), editorContrib); assert.deepStrictEqual(i18n.getResource('vs/editor/contrib/clipboard/browser/clipboard'), editorContrib);
assert.deepEqual(i18n.getResource('vs/editor/common/modes/modesRegistry'), editor); assert.deepStrictEqual(i18n.getResource('vs/editor/common/modes/modesRegistry'), editor);
assert.deepEqual(i18n.getResource('vs/base/common/errorMessage'), base); assert.deepStrictEqual(i18n.getResource('vs/base/common/errorMessage'), base);
assert.deepEqual(i18n.getResource('vs/code/electron-main/window'), code); assert.deepStrictEqual(i18n.getResource('vs/code/electron-main/window'), code);
assert.deepEqual(i18n.getResource('vs/workbench/contrib/html/browser/webview'), workbenchParts); assert.deepStrictEqual(i18n.getResource('vs/workbench/contrib/html/browser/webview'), workbenchParts);
assert.deepEqual(i18n.getResource('vs/workbench/services/textfile/node/testFileService'), workbenchServices); assert.deepStrictEqual(i18n.getResource('vs/workbench/services/textfile/node/testFileService'), workbenchServices);
assert.deepEqual(i18n.getResource('vs/workbench/browser/parts/panel/panelActions'), workbench); assert.deepStrictEqual(i18n.getResource('vs/workbench/browser/parts/panel/panelActions'), workbench);
}); });
}); });

View File

@ -311,7 +311,7 @@ function markNodes(ts, languageService, options) {
setColor(node, 0 /* White */); setColor(node, 0 /* White */);
// add to black queue // add to black queue
enqueue_black(node); enqueue_black(node);
// // move from one queue to the other // move from one queue to the other
// black_queue.push(node); // black_queue.push(node);
// setColor(node, NodeColor.Black); // setColor(node, NodeColor.Black);
return; return;

View File

@ -410,7 +410,7 @@ function markNodes(ts: typeof import('typescript'), languageService: ts.Language
// add to black queue // add to black queue
enqueue_black(node); enqueue_black(node);
// // move from one queue to the other // move from one queue to the other
// black_queue.push(node); // black_queue.push(node);
// setColor(node, NodeColor.Black); // setColor(node, NodeColor.Black);
return; return;

View File

@ -91,6 +91,7 @@ declare namespace monaco.languages {
declare namespace monaco.worker { declare namespace monaco.worker {
#include(vs/editor/common/model/mirrorTextModel): IMirrorTextModel
#includeAll(vs/editor/common/services/editorSimpleWorker;): #includeAll(vs/editor/common/services/editorSimpleWorker;):
} }

View File

@ -17,7 +17,6 @@ exports.dirs = [
'extensions/emmet', 'extensions/emmet',
'extensions/extension-editing', 'extensions/extension-editing',
'extensions/git', 'extensions/git',
'extensions/git-ui',
'extensions/github', 'extensions/github',
'extensions/github-authentication', 'extensions/github-authentication',
'extensions/grunt', 'extensions/grunt',

View File

@ -7,8 +7,8 @@ let err = false;
const majorNodeVersion = parseInt(/^(\d+)\./.exec(process.versions.node)[1]); const majorNodeVersion = parseInt(/^(\d+)\./.exec(process.versions.node)[1]);
if (majorNodeVersion < 10 || majorNodeVersion >= 16) { if (majorNodeVersion < 10 || majorNodeVersion >= 17) {
console.error('\033[1;31m*** Please use node >=10 and <=16.\033[0;0m'); console.error('\033[1;31m*** Please use node.js versions >=10 and <=17.\033[0;0m');
err = true; err = true;
} }

View File

@ -24,7 +24,7 @@
"@types/minimist": "^1.2.1", "@types/minimist": "^1.2.1",
"@types/mkdirp": "^1.0.1", "@types/mkdirp": "^1.0.1",
"@types/mocha": "^8.2.0", "@types/mocha": "^8.2.0",
"@types/node": "^12.19.9", "@types/node": "^14.14.37",
"@types/p-limit": "^2.2.0", "@types/p-limit": "^2.2.0",
"@types/plist": "^3.0.2", "@types/plist": "^3.0.2",
"@types/pump": "^1.0.1", "@types/pump": "^1.0.1",
@ -52,7 +52,7 @@
"p-limit": "^3.1.0", "p-limit": "^3.1.0",
"plist": "^3.0.1", "plist": "^3.0.1",
"source-map": "0.6.1", "source-map": "0.6.1",
"typescript": "^4.3.0-dev.20210305", "typescript": "^4.3.0-dev.20210426",
"vsce": "1.48.0", "vsce": "1.48.0",
"vscode-universal": "deepak1556/universal#61454d96223b774c53cda10f72c2098c0ce02d58" "vscode-universal": "deepak1556/universal#61454d96223b774c53cda10f72c2098c0ce02d58"
}, },

View File

@ -366,15 +366,20 @@
"@types/node" "*" "@types/node" "*"
form-data "^3.0.0" form-data "^3.0.0"
"@types/node@*", "@types/node@^14.14.21": "@types/node@*":
version "8.0.51"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.51.tgz#b31d716fb8d58eeb95c068a039b9b6292817d5fb"
integrity sha512-El3+WJk2D/ppWNd2X05aiP5l2k4EwF7KwheknQZls+I26eSICoWRhRIJ56jGgw2dqNGQ5LtNajmBU2ajS28EvQ==
"@types/node@^14.14.21":
version "14.14.22" version "14.14.22"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18"
integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw== integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==
"@types/node@^12.19.9": "@types/node@^14.14.37":
version "12.19.9" version "14.14.37"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.37.tgz#a3dd8da4eb84a996c36e331df98d82abd76b516e"
integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== integrity sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw==
"@types/p-limit@^2.2.0": "@types/p-limit@^2.2.0":
version "2.2.0" version "2.2.0"
@ -651,10 +656,10 @@ balanced-match@^1.0.0:
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
base64-js@^1.5.1: base64-js@^1.2.3:
version "1.5.1" version "1.3.1"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1"
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==
bcrypt-pbkdf@^1.0.0: bcrypt-pbkdf@^1.0.0:
version "1.0.2" version "1.0.2"
@ -917,7 +922,12 @@ dom-serializer@0, dom-serializer@~0.1.0:
domelementtype "~1.1.1" domelementtype "~1.1.1"
entities "~1.1.1" entities "~1.1.1"
domelementtype@1, domelementtype@^1.3.0: domelementtype@1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.2.1.tgz#578558ef23befac043a1abb0db07635509393479"
integrity sha512-SQVCLFS2E7G5CRCMdn6K9bIhRj1bS6QBWZfF0TUPh4V/BbqrQ619IdSS3/izn0FZ+9l+uODzaZjb08fjOfablA==
domelementtype@^1.3.0:
version "1.3.0" version "1.3.0"
resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2" resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2"
integrity sha1-sXrtguirWeUt2cGbF1bg/BhyBMI= integrity sha1-sXrtguirWeUt2cGbF1bg/BhyBMI=
@ -959,9 +969,9 @@ ecc-jsbn@~0.1.1:
safer-buffer "^2.1.0" safer-buffer "^2.1.0"
electron-osx-sign@^0.4.16: electron-osx-sign@^0.4.16:
version "0.4.17" version "0.4.16"
resolved "https://registry.yarnpkg.com/electron-osx-sign/-/electron-osx-sign-0.4.17.tgz#2727ca0c79e1e4e5ccd3861fb3da9c3c913b006c" resolved "https://registry.yarnpkg.com/electron-osx-sign/-/electron-osx-sign-0.4.16.tgz#0be8e579b2d9fa4c12d2a21f063898294b3434aa"
integrity sha512-wUJPmZJQCs1zgdlQgeIpRcvrf7M5/COQaOV68Va1J/SgmWx5KL2otgg+fAae7luw6qz9R8Gvu/Qpe9tAOu/3xQ== integrity sha512-ziMWfc3NmQlwnWLW6EaZq8nH2BWVng/atX5GWsGwhexJYpdW6hsg//MkAfRTRx1kR3Veiqkeiog1ibkbA4x0rg==
dependencies: dependencies:
bluebird "^3.5.0" bluebird "^3.5.0"
compare-version "^0.1.2" compare-version "^0.1.2"
@ -1108,7 +1118,19 @@ getpass@^0.1.1:
dependencies: dependencies:
assert-plus "^1.0.0" assert-plus "^1.0.0"
glob@^7.0.6, glob@^7.1.6: glob@^7.0.6:
version "7.1.3"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^3.0.4"
once "^1.3.0"
path-is-absolute "^1.0.0"
glob@^7.1.6:
version "7.1.6" version "7.1.6"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
@ -1216,11 +1238,16 @@ inflight@^1.0.4:
once "^1.3.0" once "^1.3.0"
wrappy "1" wrappy "1"
inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1: inherits@2, inherits@^2.0.1, inherits@^2.0.4, inherits@~2.0.1:
version "2.0.4" version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
inherits@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
is-extglob@^2.1.1: is-extglob@^2.1.1:
version "2.1.1" version "2.1.1"
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
@ -1345,7 +1372,12 @@ lodash.unescape@4.0.1:
resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c"
integrity sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw= integrity sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=
lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.15: lodash@^4.15.0, lodash@^4.17.10:
version "4.17.19"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b"
integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==
lodash@^4.17.15:
version "4.17.20" version "4.17.20"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
@ -1398,7 +1430,12 @@ mime-types@^2.1.12, mime-types@~2.1.19:
dependencies: dependencies:
mime-db "1.45.0" mime-db "1.45.0"
mime@^1.3.4, mime@^1.4.1: mime@^1.3.4:
version "1.4.1"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"
integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==
mime@^1.4.1:
version "1.6.0" version "1.6.0"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==
@ -1421,9 +1458,9 @@ minimatch@3.0.4, minimatch@^3.0.3, minimatch@^3.0.4:
brace-expansion "^1.1.7" brace-expansion "^1.1.7"
minimist@^1.2.0: minimist@^1.2.0:
version "1.2.5" version "1.2.3"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.3.tgz#3db5c0765545ab8637be71f333a104a965a9ca3f"
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== integrity sha512-+bMdgqjMN/Z77a6NlY/I3U5LlRDbnmaAk6lDveAPKwSpcPM4tKAuYsvYF8xjhOPXhOYGe/73vVLVez5PW+jqhw==
mkdirp@^1.0.4: mkdirp@^1.0.4:
version "1.0.4" version "1.0.4"
@ -1544,13 +1581,13 @@ performance-now@^2.1.0:
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
plist@^3.0.1: plist@^3.0.1:
version "3.0.2" version "3.0.1"
resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.2.tgz#74bbf011124b90421c22d15779cee60060ba95bc" resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.1.tgz#a9b931d17c304e8912ef0ba3bdd6182baf2e1f8c"
integrity sha512-MSrkwZBdQ6YapHy87/8hDU8MnIcyxBKjeF+McXnr5A9MtffPewTs7G3hlpodT5TacyfIyFTaJEhh3GGcmasTgQ== integrity sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==
dependencies: dependencies:
base64-js "^1.5.1" base64-js "^1.2.3"
xmlbuilder "^9.0.7" xmlbuilder "^9.0.7"
xmldom "^0.5.0" xmldom "0.1.x"
priorityqueuejs@^1.0.0: priorityqueuejs@^1.0.0:
version "1.0.0" version "1.0.0"
@ -1607,7 +1644,16 @@ read@^1.0.7:
dependencies: dependencies:
mute-stream "~0.0.4" mute-stream "~0.0.4"
readable-stream@^3.0.6, readable-stream@^3.6.0: readable-stream@^3.0.6:
version "3.0.6"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.0.6.tgz#351302e4c68b5abd6a2ed55376a7f9a25be3057a"
integrity sha512-9E1oLoOWfhSXHGv6QlwXJim7uNzd9EVlWK+21tCU9Ju/kR0/p2AZYPz4qSchgO8PlLIH4FpZYfzwS+rEksZjIg==
dependencies:
inherits "^2.0.3"
string_decoder "^1.1.1"
util-deprecate "^1.0.1"
readable-stream@^3.6.0:
version "3.6.0" version "3.6.0"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198"
integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==
@ -1838,10 +1884,10 @@ typescript@^4.1.3:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7"
integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg== integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==
typescript@^4.3.0-dev.20210305: typescript@^4.3.0-dev.20210426:
version "4.3.0-dev.20210305" version "4.3.0-dev.20210426"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.0-dev.20210305.tgz#5e354b303c435f84a25fa82f45e9c412bfd5bd8f" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.0-dev.20210426.tgz#00198cb8828f6a04b4e0ae32554a486bf7137a53"
integrity sha512-OTALeeen7kl6FU1tcXRk3h+WY1NnE5lwyTGAZUCt9hw6tdaifgLXqEkfw9NHJc0xKV6PnU8GgnYFFVVyHLPSHg== integrity sha512-8YTqlzf3w8O8XwnnRlwRV2rswu7V7WEPUnAnH1BPPMrr06thNByMjIadA5SDW3tUJc1MG8Uj3NgZYocU5fWTVg==
uc.micro@^1.0.1, uc.micro@^1.0.5: uc.micro@^1.0.1, uc.micro@^1.0.5:
version "1.0.5" version "1.0.5"
@ -2003,10 +2049,10 @@ xmlbuilder@~11.0.0:
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3"
integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==
xmldom@^0.5.0: xmldom@0.1.x:
version "0.5.0" version "0.1.31"
resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.5.0.tgz#193cb96b84aa3486127ea6272c4596354cb4962e" resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.31.tgz#b76c9a1bd9f0a9737e5a72dc37231cf38375e2ff"
integrity sha512-Foaj5FXVzgn7xFzsKeNIde9g6aFBxTPi37iwsno8QvApmtg7KYrr+OPyRHcJF7dud2a5nGRBXK3n0dL62Gf7PA== integrity sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==
yallist@^4.0.0: yallist@^4.0.0:
version "4.0.0" version "4.0.0"

View File

@ -46,42 +46,6 @@
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
] ]
}, },
{
// Reason: The license at https://git.coolaj86.com/coolaj86/atob.js/src/branch/master/LICENSE
// cannot be found by the OSS tool automatically.
"name": "atob",
"fullLicenseText": [
"The MIT License (MIT)",
"",
"Copyright (c) 2015 AJ ONeal",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and associated documentation files (the \"Software\"), to deal",
"in the Software without restriction, including without limitation the rights",
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
"copies of the Software, and to permit persons to whom the Software is",
"furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in all",
"copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE",
"SOFTWARE."
]
},
{
// Reason: The license at https://github.com/microsoft/tslib/blob/master/LICENSE.txt
// does not include a clear Copyright statement.
"name": "tslib",
"prependLicenseText": [
"Copyright (c) Microsoft Corporation. All rights reserved."
]
},
{ {
// Reason: The license at https://github.com/rbuckton/reflect-metadata/blob/master/LICENSE // Reason: The license at https://github.com/rbuckton/reflect-metadata/blob/master/LICENSE
// does not include a clear Copyright statement (it's in https://github.com/rbuckton/reflect-metadata/blob/master/CopyrightNotice.txt). // does not include a clear Copyright statement (it's in https://github.com/rbuckton/reflect-metadata/blob/master/CopyrightNotice.txt).
@ -91,87 +55,8 @@
] ]
}, },
{ {
// Reason: The license at https://github.com/reem/rust-unreachable/blob/master/LICENSE-MIT // Reason: The npm package lacks a repoURL field
// cannot be found by the OSS tool automatically. // So the license at https://github.com/floatdrop/pinkie/blob/master/license
"name": "reem/rust-unreachable",
"fullLicenseText": [
"Copyright (c) 2015 The rust-unreachable Developers",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and associated documentation files (the \"Software\"), to deal",
"in the Software without restriction, including without limitation the rights",
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
"copies of the Software, and to permit persons to whom the Software is",
"furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in all",
"copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE",
"SOFTWARE."
]
},
{
// Reason: The license at https://github.com/reem/rust-void/blob/master/LICENSE-MIT
// cannot be found by the OSS tool automatically.
"name": "reem/rust-void",
"fullLicenseText": [
"Copyright (c) 2015 The rust-void Developers",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and associated documentation files (the \"Software\"), to deal",
"in the Software without restriction, including without limitation the rights",
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
"copies of the Software, and to permit persons to whom the Software is",
"furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in all",
"copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE",
"SOFTWARE."
]
},
{
// Reason: The license at https://github.com/mrhooray/crc-rs/blob/master/LICENSE-MIT
// cannot be found by the OSS tool automatically.
"name": "mrhooray/crc-rs",
"fullLicenseText": [
"MIT License",
"",
"Copyright (c) 2017 crc-rs Developers",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and associated documentation files (the \"Software\"), to deal",
"in the Software without restriction, including without limitation the rights",
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
"copies of the Software, and to permit persons to whom the Software is",
"furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in all",
"copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE",
"SOFTWARE."
]
},
{
// Reason: The license at https://github.com/floatdrop/pinkie/blob/master/license
// cannot be found by the OSS tool automatically. // cannot be found by the OSS tool automatically.
"name": "pinkie", "name": "pinkie",
"fullLicenseText": [ "fullLicenseText": [
@ -205,139 +90,25 @@
] ]
}, },
{ {
// Reason: The license at https://github.com/justmoon/node-extend/blob/main/LICENSE // Reason: The license cannot be found by the tool due to access controls on the repository
// cannot be found by the OSS tool automatically. "name": "vscode-tas-client",
"name": "extend",
"fullLicenseText": [ "fullLicenseText": [
"The MIT License (MIT)", "MIT License",
"Copyright (c) 2020 - present Microsoft Corporation",
"", "",
"Copyright (c) 2014 Stefan Thomas", "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
"",
"Permission is hereby granted, free of charge, to any person obtaining",
"a copy of this software and associated documentation files (the",
"\"Software\"), to deal in the Software without restriction, including",
"without limitation the rights to use, copy, modify, merge, publish,",
"distribute, sublicense, and/or sell copies of the Software, and to",
"permit persons to whom the Software is furnished to do so, subject to",
"the following conditions:",
"",
"The above copyright notice and this permission notice shall be",
"included in all copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,",
"EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF",
"MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND",
"NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE",
"LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION",
"OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION",
"WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
]
},
{
// Reason: The license at https://github.com/retep998/winapi-rs/blob/0.3/LICENSE-MIT
// cannot be found by the OSS tool automatically.
"name": "retep998/winapi-rs",
"fullLicenseText": [
"Copyright (c) 2015-2018 The winapi-rs Developers",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and associated documentation files (the \"Software\"), to deal",
"in the Software without restriction, including without limitation the rights",
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
"copies of the Software, and to permit persons to whom the Software is",
"furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in all",
"copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE",
"SOFTWARE."
]
},
{
// Reason: The license at https://github.com/digitaldesignlabs/es6-promisify/blob/main/LICENSE
// cannot be found by the OSS tool automatically.
"name": "es6-promisify",
"fullLicenseText": [
"Copyright (c) 2014 Mike Hall / Digital Design Labs",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and associated documentation files (the \"Software\"), to deal",
"in the Software without restriction, including without limitation the rights",
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
"copies of the Software, and to permit persons to whom the Software is",
"furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in all",
"copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE",
"SOFTWARE."
]
},
{
// Reason: The license at https://github.com/zkat/json-parse-better-errors/blob/latest/LICENSE.md
// cannot be found by the OSS tool automatically.
"name": "json-parse-better-errors",
"fullLicenseText": [
"Copyright 2017 Kat Marchán",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the",
"\"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute,",
"sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following",
"conditions:",
"", "",
"The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.", "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
"", "",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE", "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
"WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS",
"OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR",
"OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
] ]
}, },
{ {
// Reason: The license at https://github.com/time-rs/time/blob/main/LICENSE-MIT // Reason: The license cannot be found by the tool due to access controls on the repository
// cannot be found by the OSS tool automatically. "name": "tas-client",
"name": "time-rs/time",
"fullLicenseText": [ "fullLicenseText": [
"Copyright (c) 2019 Jacob Pratt", "MIT License",
"", "Copyright (c) 2020 - present Microsoft Corporation",
"Permission is hereby granted, free of charge, to any person obtaining a copy",
"of this software and associated documentation files (the \"Software\"), to deal",
"in the Software without restriction, including without limitation the rights",
"to use, copy, modify, merge, publish, distribute, sublicense, and/or sell",
"copies of the Software, and to permit persons to whom the Software is",
"furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in all",
"copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR",
"IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,",
"FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE",
"AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER",
"LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,",
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE",
"SOFTWARE."
]
},
{
// Reason: The license at https://github.com/colorjs/color-name/blob/master/LICENSE
// cannot be found by the OSS tool automatically.
"name": "color-name",
"fullLicenseText": [
"The MIT License (MIT)",
"Copyright (c) 2015 Dmitry Ivanov",
"", "",
"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:", "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
"", "",
@ -361,53 +132,8 @@
] ]
}, },
{ {
// Reason: The license at https://github.com/acornjs/acorn/blob/master/acorn/LICENSE // Reason: Repository lacks license text.
// cannot be found by the OSS tool automatically. // https://github.com/LinusU/load-yaml-file/blob/master/package.json declares MIT.
"name": "acorn",
"fullLicenseText": [
"MIT License",
"Copyright (C) 2012-2018 by various contributors (see AUTHORS)",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
]
},
{
// Reason: The license at https://github.com/acornjs/acorn/blob/master/acorn-loose/LICENSE
// cannot be found by the OSS tool automatically.
"name": "acorn-loose",
"fullLicenseText": [
"MIT License",
"Copyright (C) 2012-2018 by various contributors (see AUTHORS)",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
]
},
{
// Reason: The license at https://github.com/jquery/esprima/blob/master/LICENSE.BSD
// cannot be found by the OSS tool automatically.
"name": "esprima",
"fullLicenseText": [
"BSD 2-Clause \"Simplified\" License",
"Copyright JS Foundation and other contributors, https://js.foundation/",
"",
"Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:",
" * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.",
" * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.",
"",
"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
]
},
{
// Reason: The license at https://github.com/LinusU/load-yaml-file/blob/master/readme.md
// cannot be found by the OSS tool automatically.
"name": "load-yaml-file", "name": "load-yaml-file",
"fullLicenseText": [ "fullLicenseText": [
"MIT License", "MIT License",
@ -419,5 +145,48 @@
"", "",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
] ]
},
{
// Reason: Repository lacks license text.
// https://github.com/othiym23/emitter-listener/blob/master/package.json declares BSD-2-Clause.
"name": "emitter-listener",
"fullLicenseText": [
"BSD 2-Clause \"Simplified\" License",
"Copyright (c) 2018, Forrest L Norvell <ogd@aoaioxxysz.net>",
"",
"Redistribution and use in source and binary forms, with or without",
"modification, are permitted provided that the following conditions are met:",
"",
"1. Redistributions of source code must retain the above copyright notice, this",
" list of conditions and the following disclaimer.",
"2. Redistributions in binary form must reproduce the above copyright notice,",
" this list of conditions and the following disclaimer in the documentation",
" and/or other materials provided with the distribution.",
"",
"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND",
"ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED",
"WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE",
"DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR",
"ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES",
"(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;",
"LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND",
"ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT",
"(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS",
"SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
]
},
{
// Reason: Repository has been deleted (package.json declares MIT).
"name": "vscode-js-debug-cdp-proxy-api",
"fullLicenseText": [
"MIT License",
"Copyright (c) Manuel Alabor",
"",
"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
"",
"The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
"",
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
]
} }
] ]

View File

@ -6,7 +6,7 @@
"git": { "git": {
"name": "chromium", "name": "chromium",
"repositoryUrl": "https://chromium.googlesource.com/chromium/src", "repositoryUrl": "https://chromium.googlesource.com/chromium/src",
"commitHash": "c0dfcf99c0bbc9c4763c70e5034eb1a970a9ff3b" "commitHash": "5342041f85833c038dcbc5632d62fc10f7592323"
} }
}, },
"licenseDetail": [ "licenseDetail": [
@ -40,7 +40,7 @@
"SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." "SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
], ],
"isOnlyProductionDependency": true, "isOnlyProductionDependency": true,
"version": "87.0.4280.141" "version": "89.0.4389.114"
}, },
{ {
"component": { "component": {
@ -48,11 +48,11 @@
"git": { "git": {
"name": "nodejs", "name": "nodejs",
"repositoryUrl": "https://github.com/nodejs/node", "repositoryUrl": "https://github.com/nodejs/node",
"commitHash": "e3e0927bb93ed92bcdfe81e7ad9af3d78ccc74fb" "commitHash": "bd60e93357a118204ea238d94e7a9e4209d93062"
} }
}, },
"isOnlyProductionDependency": true, "isOnlyProductionDependency": true,
"version": "12.18.3" "version": "14.16.0"
}, },
{ {
"component": { "component": {
@ -60,12 +60,12 @@
"git": { "git": {
"name": "electron", "name": "electron",
"repositoryUrl": "https://github.com/electron/electron", "repositoryUrl": "https://github.com/electron/electron",
"commitHash": "1631fc9b0c0d84283105a669c98bbeb8bab39109" "commitHash": "9ce7c512475aa6aa91417a3b08e19f85a8587a30"
} }
}, },
"isOnlyProductionDependency": true, "isOnlyProductionDependency": true,
"license": "MIT", "license": "MIT",
"version": "11.3.0" "version": "12.0.4"
}, },
{ {
"component": { "component": {

View File

@ -1,5 +1,5 @@
{ {
"extends": "../../shared.tsconfig.json", "extends": "../../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"resolveJsonModule": true, "resolveJsonModule": true,
"outDir": "./out" "outDir": "./out"

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -8,6 +8,7 @@
"engines": { "engines": {
"vscode": "^1.0.0" "vscode": "^1.0.0"
}, },
"icon": "images/icon.png",
"activationEvents": [ "activationEvents": [
"onLanguage:json", "onLanguage:json",
"onLanguage:jsonc" "onLanguage:jsonc"
@ -22,6 +23,12 @@
"jsonc-parser": "^2.2.1", "jsonc-parser": "^2.2.1",
"vscode-nls": "^4.1.1" "vscode-nls": "^4.1.1"
}, },
"capabilities": {
"virtualWorkspaces": true,
"untrustedWorkspaces": {
"supported": true
}
},
"contributes": { "contributes": {
"languages": [ "languages": [
{ {

View File

@ -33,3 +33,28 @@ export function provideInstalledExtensionProposals(existing: string[], additiona
return undefined; return undefined;
} }
export function provideWorkspaceTrustExtensionProposals(existing: string[], range: vscode.Range): vscode.ProviderResult<vscode.CompletionItem[] | vscode.CompletionList> {
if (Array.isArray(existing)) {
const extensions = vscode.extensions.all.filter(e => e.packageJSON.main);
const extensionProposals = extensions.filter(e => existing.indexOf(e.id) === -1);
if (extensionProposals.length) {
return extensionProposals.map(e => {
const item = new vscode.CompletionItem(e.id);
const insertText = `"${e.id}": {\n\t"supported": false,\n\t"version": "${e.packageJSON.version}"\n}`;
item.kind = vscode.CompletionItemKind.Value;
item.insertText = insertText;
item.range = range;
item.filterText = insertText;
return item;
});
} else {
const example = new vscode.CompletionItem(localize('exampleExtension', "Example"));
example.insertText = '"vscode.csharp: {\n\t"supported": false,\n\t"version": "0.0.0"\n}`;"';
example.kind = vscode.CompletionItemKind.Value;
example.range = range;
return [example];
}
}
return undefined;
}

View File

@ -6,7 +6,7 @@
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import { getLocation, Location, parse } from 'jsonc-parser'; import { getLocation, Location, parse } from 'jsonc-parser';
import * as nls from 'vscode-nls'; import * as nls from 'vscode-nls';
import { provideInstalledExtensionProposals } from './extensionsProposals'; import { provideInstalledExtensionProposals, provideWorkspaceTrustExtensionProposals } from './extensionsProposals';
const localize = nls.loadMessageBundle(); const localize = nls.loadMessageBundle();
@ -60,6 +60,15 @@ export class SettingsDocument {
return provideInstalledExtensionProposals(alreadyConfigured, `: [\n\t"ui"\n]`, range, true); return provideInstalledExtensionProposals(alreadyConfigured, `: [\n\t"ui"\n]`, range, true);
} }
// extensions.supportUntrustedWorkspaces
if (location.path[0] === 'extensions.supportUntrustedWorkspaces' && location.path.length === 2 && location.isAtPropertyKey) {
let alreadyConfigured: string[] = [];
try {
alreadyConfigured = Object.keys(parse(this.document.getText())['extensions.supportUntrustedWorkspaces']);
} catch (e) {/* ignore error */ }
return provideWorkspaceTrustExtensionProposals(alreadyConfigured, range);
}
return this.provideLanguageOverridesCompletionItems(location, position); return this.provideLanguageOverridesCompletionItems(location, position);
} }

View File

@ -1,9 +1,9 @@
{ {
"extends": "../shared.tsconfig.json", "extends": "../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"outDir": "./out" "outDir": "./out"
}, },
"include": [ "include": [
"src/**/*" "src/**/*"
] ]
} }

View File

@ -10,6 +10,8 @@ updateGrammar.update('jeff-hykin/cpp-textmate-grammar', 'syntaxes/c.tmLanguage.j
updateGrammar.update('jeff-hykin/cpp-textmate-grammar', 'syntaxes/cpp.tmLanguage.json', './syntaxes/cpp.tmLanguage.json', undefined, 'master', 'source/languages/cpp/'); updateGrammar.update('jeff-hykin/cpp-textmate-grammar', 'syntaxes/cpp.tmLanguage.json', './syntaxes/cpp.tmLanguage.json', undefined, 'master', 'source/languages/cpp/');
updateGrammar.update('jeff-hykin/cpp-textmate-grammar', 'syntaxes/cpp.embedded.macro.tmLanguage.json', './syntaxes/cpp.embedded.macro.tmLanguage.json', undefined, 'master', 'source/languages/cpp/'); updateGrammar.update('jeff-hykin/cpp-textmate-grammar', 'syntaxes/cpp.embedded.macro.tmLanguage.json', './syntaxes/cpp.embedded.macro.tmLanguage.json', undefined, 'master', 'source/languages/cpp/');
updateGrammar.update('NVIDIA/cuda-cpp-grammar', 'syntaxes/cuda-cpp.tmLanguage.json', './syntaxes/cuda-cpp.tmLanguage.json', undefined, 'master');
// `source.c.platform` which is still included by other grammars // `source.c.platform` which is still included by other grammars
updateGrammar.update('textmate/c.tmbundle', 'Syntaxes/Platform.tmLanguage', './syntaxes/platform.tmLanguage.json'); updateGrammar.update('textmate/c.tmbundle', 'Syntaxes/Platform.tmLanguage', './syntaxes/platform.tmLanguage.json');

View File

@ -39,6 +39,19 @@
], ],
"license": "TextMate Bundle License", "license": "TextMate Bundle License",
"version": "0.0.0" "version": "0.0.0"
},
{
"component": {
"type": "git",
"git": {
"name": "NVIDIA/cuda-cpp-grammar",
"repositoryUrl": "https://github.com/NVIDIA/cuda-cpp-grammar",
"commitHash": "81e88eaec5170aa8585736c63627c73e3589998c"
}
},
"license": "MIT",
"version": "0.0.0",
"description": "The file syntaxes/cuda-cpp.tmLanguage.json was derived from https://github.com/jeff-hykin/cpp-textmate-grammar, which was derived from https://github.com/atom/language-c, which was originally converted from the C TextMate bundle https://github.com/textmate/c.tmbundle."
} }
], ],
"version": 1 "version": 1

View File

@ -23,6 +23,7 @@
["'", "'"], ["'", "'"],
["<", ">"] ["<", ">"]
], ],
"wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\@\\#\\%\\^\\&\\*\\(\\)\\-\\=\\+\\[\\{\\]\\}\\\\\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\?\\s]+)",
"folding": { "folding": {
"markers": { "markers": {
"start": "^\\s*#pragma\\s+region\\b", "start": "^\\s*#pragma\\s+region\\b",

View File

@ -50,6 +50,17 @@
"cpp" "cpp"
], ],
"configuration": "./language-configuration.json" "configuration": "./language-configuration.json"
},
{
"id": "cuda-cpp",
"extensions": [
".cu",
".cuh"
],
"aliases": [
"CUDA C++"
],
"configuration": "./language-configuration.json"
} }
], ],
"grammars": [ "grammars": [
@ -71,8 +82,35 @@
{ {
"scopeName": "source.c.platform", "scopeName": "source.c.platform",
"path": "./syntaxes/platform.tmLanguage.json" "path": "./syntaxes/platform.tmLanguage.json"
},
{
"language": "cuda-cpp",
"scopeName": "source.cuda-cpp",
"path": "./syntaxes/cuda-cpp.tmLanguage.json"
} }
], ],
"problemPatterns": [
{
"name": "nvcc-location",
"regexp": "^(.*)\\((\\d+)\\):\\s+(warning|error):\\s+(.*)",
"kind": "location",
"file": 1,
"location": 2,
"severity": 3,
"message": 4
}
],
"problemMatchers": [
{
"name": "nvcc",
"owner": "cuda-cpp",
"fileLocation": [
"relative",
"${workspaceFolder}"
],
"pattern": "$nvcc-location"
}
],
"snippets": [ "snippets": [
{ {
"language": "c", "language": "c",

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@
"git": { "git": {
"name": "dotnet/csharp-tmLanguage", "name": "dotnet/csharp-tmLanguage",
"repositoryUrl": "https://github.com/dotnet/csharp-tmLanguage", "repositoryUrl": "https://github.com/dotnet/csharp-tmLanguage",
"commitHash": "572697a2c2267430010b3534281f73337144e94f" "commitHash": "4d14854c9bfc9d84cce625d2bfebaac9741b9db8"
} }
}, },
"license": "MIT", "license": "MIT",

View File

@ -4,7 +4,7 @@
"If you want to provide a fix or improvement, please create a pull request against the original repository.", "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." "Once accepted there, we are happy to receive an update request."
], ],
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/572697a2c2267430010b3534281f73337144e94f", "version": "https://github.com/dotnet/csharp-tmLanguage/commit/4d14854c9bfc9d84cce625d2bfebaac9741b9db8",
"name": "C#", "name": "C#",
"scopeName": "source.cs", "scopeName": "source.cs",
"patterns": [ "patterns": [
@ -286,6 +286,9 @@
{ {
"include": "#this-or-base-expression" "include": "#this-or-base-expression"
}, },
{
"include": "#switch-expression"
},
{ {
"include": "#conditional-operator" "include": "#conditional-operator"
}, },
@ -616,7 +619,7 @@
] ]
}, },
"delegate-declaration": { "delegate-declaration": {
"begin": "(?x)\n(?:\\b(delegate)\\b)\\s+\n(?<type-name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g<identifier>)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", "begin": "(?x)\n(?:\\b(delegate)\\b)\\s+\n(?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g<identifier>)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"name": "keyword.other.delegate.cs" "name": "keyword.other.delegate.cs"
@ -967,7 +970,7 @@
] ]
}, },
"field-declaration": { "field-declaration": {
"begin": "(?x)\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g<identifier>)\\s* # first field name\n(?!=>|==)(?=,|;|=|$)", "begin": "(?x)\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g<identifier>)\\s* # first field name\n(?!=>|==)(?=,|;|=|$)",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"patterns": [ "patterns": [
@ -1001,7 +1004,7 @@
] ]
}, },
"property-declaration": { "property-declaration": {
"begin": "(?x)\n\n# The negative lookahead below ensures that we don't match nested types\n# or other declarations as properties.\n(?![[:word:][:space:]]*\\b(?:class|interface|struct|enum|event)\\b)\n\n(?<return-type>\n (?<type-name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?<interface-name>\\g<type-name>\\s*\\.\\s*)?\n(?<property-name>\\g<identifier>)\\s*\n(?=\\{|=>|$)", "begin": "(?x)\n\n# The negative lookahead below ensures that we don't match nested types\n# or other declarations as properties.\n(?![[:word:][:space:]]*\\b(?:class|interface|struct|enum|event)\\b)\n\n(?<return_type>\n (?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?<interface_name>\\g<type_name>\\s*\\.\\s*)?\n(?<property_name>\\g<identifier>)\\s*\n(?=\\{|=>|$)",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"patterns": [ "patterns": [
@ -1044,7 +1047,7 @@
] ]
}, },
"indexer-declaration": { "indexer-declaration": {
"begin": "(?x)\n(?<return-type>\n (?<type-name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?<interface-name>\\g<type-name>\\s*\\.\\s*)?\n(?<indexer-name>this)\\s*\n(?=\\[)", "begin": "(?x)\n(?<return_type>\n (?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?<interface_name>\\g<type_name>\\s*\\.\\s*)?\n(?<indexer_name>this)\\s*\n(?=\\[)",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"patterns": [ "patterns": [
@ -1087,7 +1090,7 @@
] ]
}, },
"event-declaration": { "event-declaration": {
"begin": "(?x)\n\\b(event)\\b\\s*\n(?<return-type>\n (?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?<interface-name>\\g<type-name>\\s*\\.\\s*)?\n(?<event-names>\\g<identifier>(?:\\s*,\\s*\\g<identifier>)*)\\s*\n(?=\\{|;|$)", "begin": "(?x)\n\\b(event)\\b\\s*\n(?<return_type>\n (?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?<interface_name>\\g<type_name>\\s*\\.\\s*)?\n(?<event_names>\\g<identifier>(?:\\s*,\\s*\\g<identifier>)*)\\s*\n(?=\\{|;|$)",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"name": "keyword.other.event.cs" "name": "keyword.other.event.cs"
@ -1217,7 +1220,7 @@
] ]
}, },
"method-declaration": { "method-declaration": {
"begin": "(?x)\n(?<return-type>\n (?<type-name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\\s+\n)\n(?<interface-name>\\g<type-name>\\s*\\.\\s*)?\n(\\g<identifier>)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()", "begin": "(?x)\n(?<return_type>\n (?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?<interface_name>\\g<type_name>\\s*\\.\\s*)?\n(\\g<identifier>)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"patterns": [ "patterns": [
@ -1353,7 +1356,7 @@
] ]
}, },
"operator-declaration": { "operator-declaration": {
"begin": "(?x)\n(?<type-name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?<operator-keyword>(?:\\b(?:operator)))\\s*\n(?<operator>(?:\\+|-|\\*|/|%|&|\\||\\^|\\<\\<|\\>\\>|==|!=|\\>|\\<|\\>=|\\<=|!|~|\\+\\+|--|true|false))\\s*\n(?=\\()", "begin": "(?x)\n(?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?<operator_keyword>(?:\\b(?:operator)))\\s*\n(?<operator>(?:\\+|-|\\*|/|%|&|\\||\\^|\\<\\<|\\>\\>|==|!=|\\>|\\<|\\>=|\\<=|!|~|\\+\\+|--|true|false))\\s*\n(?=\\()",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"patterns": [ "patterns": [
@ -1386,7 +1389,7 @@
] ]
}, },
"conversion-operator-declaration": { "conversion-operator-declaration": {
"begin": "(?x)\n(?<explicit-or-implicit-keyword>(?:\\b(?:explicit|implicit)))\\s*\n(?<operator-keyword>(?:\\b(?:operator)))\\s*\n(?<type-name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\()", "begin": "(?x)\n(?<explicit_or_implicit_keyword>(?:\\b(?:explicit|implicit)))\\s*\n(?<operator_keyword>(?:\\b(?:operator)))\\s*\n(?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?=\\()",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"patterns": [ "patterns": [
@ -1615,7 +1618,7 @@
"end": "(?=;)", "end": "(?=;)",
"patterns": [ "patterns": [
{ {
"include": "#expression" "include": "#statement"
} }
] ]
}, },
@ -1718,6 +1721,178 @@
} }
] ]
}, },
"switch-expression": {
"begin": "(?x) (?<!\\.)\\b(switch)",
"beginCaptures": {
"1": {
"name": "keyword.control.switch.cs"
}
},
"end": "(?<=\\})",
"endCaptures": {
"0": {
"name": "punctuation.curlybrace.close.cs"
}
},
"patterns": [
{
"begin": "\\{",
"beginCaptures": {
"0": {
"name": "punctuation.curlybrace.open.cs"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.curlybrace.close.cs"
}
},
"patterns": [
{
"include": "#comment"
},
{
"include": "#literal"
},
{
"include": "#switch-var-pattern"
},
{
"include": "#switch-property-expression"
},
{
"include": "#member-access-expression"
},
{
"include": "#switch-pattern"
},
{
"include": "#expression-body"
},
{
"include": "#punctuation-comma"
}
]
}
]
},
"switch-pattern": {
"begin": "(?x) # e.g. int x OR var x\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g<identifier>)\\b\\s*",
"beginCaptures": {
"1": {
"patterns": [
{
"include": "#type"
}
]
},
"2": {
"name": "entity.name.variable.local.cs"
}
},
"end": "(?==>)",
"patterns": [
{
"include": "#comment"
},
{
"include": "#switch-when-clause"
}
]
},
"switch-property-expression": {
"begin": "(?x) # e.g. int x OR var x\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\\s*\n(\\{)",
"beginCaptures": {
"1": {
"patterns": [
{
"include": "#type"
}
]
},
"6": {
"name": "punctuation.curlybrace.open.cs"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.curlybrace.close.cs"
}
},
"patterns": [
{
"include": "#expression"
},
{
"include": "#punctuation-comma"
}
]
},
"switch-var-pattern": {
"begin": "(?x) # match foreach (var (x, y) in ...)\n(?:\\b(var)\\b\\s*)\n(?<tuple>\\((?:[^\\(\\)]|\\g<tuple>)+\\))\\s*",
"beginCaptures": {
"1": {
"name": "keyword.other.var.cs"
},
"2": {
"patterns": [
{
"include": "#tuple-declaration-deconstruction-element-list"
}
]
}
},
"end": "(?==>)",
"patterns": [
{
"include": "#comment"
},
{
"include": "#switch-when-clause"
}
]
},
"switch-when-clause": {
"begin": "(?<!\\.)\\b(when)\\b\\s*(\\()?",
"beginCaptures": {
"1": {
"name": "keyword.control.try.when.cs"
},
"2": {
"name": "punctuation.parenthesis.open.cs"
}
},
"end": "(?==>)",
"patterns": [
{
"include": "#comment"
},
{
"include": "#expression"
},
{
"include": "#punctuation-comma"
},
{
"match": "\\(",
"captures": {
"0": {
"name": "punctuation.parenthesis.open.cs"
}
}
},
{
"match": "\\)",
"captures": {
"0": {
"name": "punctuation.parenthesis.close.cs"
}
}
}
]
},
"switch-label": { "switch-label": {
"patterns": [ "patterns": [
{ {
@ -1865,7 +2040,7 @@
}, },
"patterns": [ "patterns": [
{ {
"match": "(?x)\n(?:\n (\\bvar\\b)|\n (?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g<identifier>)\\s+\n\\b(in)\\b", "match": "(?x)\n(?:\n (\\bvar\\b)|\n (?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g<identifier>)\\s+\n\\b(in)\\b",
"captures": { "captures": {
"1": { "1": {
"name": "keyword.other.var.cs" "name": "keyword.other.var.cs"
@ -1984,7 +2159,7 @@
}, },
"patterns": [ "patterns": [
{ {
"match": "(?x)\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?:(\\g<identifier>)\\b)?", "match": "(?x)\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?:(\\g<identifier>)\\b)?",
"captures": { "captures": {
"1": { "1": {
"patterns": [ "patterns": [
@ -2144,31 +2319,37 @@
{ {
"include": "#local-variable-declaration" "include": "#local-variable-declaration"
}, },
{
"include": "#local-function-declaration"
},
{ {
"include": "#local-tuple-var-deconstruction" "include": "#local-tuple-var-deconstruction"
} }
] ]
}, },
"local-variable-declaration": { "local-variable-declaration": {
"begin": "(?x)\n(?:\n (?:(\\bref)\\s+(?:(\\breadonly)\\s+)?)?(\\bvar\\b)| # ref local\n (?<type-name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref local\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g<identifier>)\\s*\n(?!=>)\n(?=,|;|=|\\))", "begin": "(?x)\n(?:\n (?:(\\busing)\\s+)?\n (?:(\\bref)\\s+(?:(\\breadonly)\\s+)?)?(\\bvar\\b)| # ref local\n (?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref local\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g<identifier>)\\s*\n(?!=>)\n(?=,|;|=|\\))",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"name": "storage.modifier.cs" "name": "keyword.other.using.cs"
}, },
"2": { "2": {
"name": "storage.modifier.cs" "name": "storage.modifier.cs"
}, },
"3": { "3": {
"name": "keyword.other.var.cs" "name": "storage.modifier.cs"
}, },
"4": { "4": {
"name": "keyword.other.var.cs"
},
"5": {
"patterns": [ "patterns": [
{ {
"include": "#type" "include": "#type"
} }
] ]
}, },
"9": { "10": {
"name": "entity.name.variable.local.cs" "name": "entity.name.variable.local.cs"
} }
}, },
@ -2190,7 +2371,7 @@
] ]
}, },
"local-constant-declaration": { "local-constant-declaration": {
"begin": "(?x)\n(?<const-keyword>\\b(?:const)\\b)\\s*\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g<identifier>)\\s*\n(?=,|;|=)", "begin": "(?x)\n(?<const_keyword>\\b(?:const)\\b)\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g<identifier>)\\s*\n(?=,|;|=)",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"name": "storage.modifier.cs" "name": "storage.modifier.cs"
@ -2223,6 +2404,13 @@
} }
] ]
}, },
"local-function-declaration": {
"patterns": [
{
"include": "#method-declaration"
}
]
},
"local-tuple-var-deconstruction": { "local-tuple-var-deconstruction": {
"begin": "(?x) # e.g. var (x, y) = GetPoint();\n(?:\\b(var)\\b\\s*)\n(?<tuple>\\((?:[^\\(\\)]|\\g<tuple>)+\\))\\s*\n(?=;|=|\\))", "begin": "(?x) # e.g. var (x, y) = GetPoint();\n(?:\\b(var)\\b\\s*)\n(?<tuple>\\((?:[^\\(\\)]|\\g<tuple>)+\\))\\s*\n(?=;|=|\\))",
"beginCaptures": { "beginCaptures": {
@ -2332,7 +2520,7 @@
] ]
}, },
"declaration-expression-local": { "declaration-expression-local": {
"match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g<identifier>)\\b\\s*\n(?=[,)\\]])", "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g<identifier>)\\b\\s*\n(?=[,)\\]])",
"captures": { "captures": {
"1": { "1": {
"name": "keyword.other.var.cs" "name": "keyword.other.var.cs"
@ -2350,7 +2538,7 @@
} }
}, },
"declaration-expression-tuple": { "declaration-expression-tuple": {
"match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n )\n)\\s+\n(\\g<identifier>)\\b\\s*\n(?=[,)])", "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g<identifier>)\\b\\s*\n(?=[,)])",
"captures": { "captures": {
"1": { "1": {
"name": "keyword.other.var.cs" "name": "keyword.other.var.cs"
@ -2475,7 +2663,7 @@
}, },
"verbatim-interpolated-string": { "verbatim-interpolated-string": {
"name": "string.quoted.double.cs", "name": "string.quoted.double.cs",
"begin": "\\$@\"", "begin": "(?:\\$@|@\\$)\"",
"beginCaptures": { "beginCaptures": {
"0": { "0": {
"name": "punctuation.definition.string.begin.cs" "name": "punctuation.definition.string.begin.cs"
@ -2712,7 +2900,7 @@
"patterns": [ "patterns": [
{ {
"name": "keyword.operator.assignment.compound.cs", "name": "keyword.operator.assignment.compound.cs",
"match": "\\*=|/=|%=|\\+=|-=" "match": "\\*=|/=|%=|\\+=|-=|\\?\\?="
}, },
{ {
"name": "keyword.operator.assignment.compound.bitwise.cs", "name": "keyword.operator.assignment.compound.bitwise.cs",
@ -2760,6 +2948,26 @@
} }
] ]
}, },
"switch-literal": {
"name": "constant.language.null.cs",
"match": "(?<!\\.)\\bnull\\b",
"beginCaptures": {
"1": {
"name": "constant.language.null.cs"
}
},
"patterns": [
{
"include": "#comment"
},
{
"include": "#punctuation-comma"
},
{
"include": "#expression-body"
}
]
},
"conditional-operator": { "conditional-operator": {
"begin": "(?<!\\?)\\?(?!\\?|\\.|\\[)", "begin": "(?<!\\?)\\?(?!\\?|\\.|\\[)",
"beginCaptures": { "beginCaptures": {
@ -2829,7 +3037,7 @@
"match": "@?[_[:alpha:]][_[:alnum:]]*" "match": "@?[_[:alpha:]][_[:alnum:]]*"
}, },
"cast-expression": { "cast-expression": {
"match": "(?x)\n(\\()\\s*\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(\\))(?=\\s*@?[_[:alnum:]\\(])", "match": "(?x)\n(\\()\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(\\))(?=\\s*@?[_[:alnum:]\\(])",
"captures": { "captures": {
"1": { "1": {
"name": "punctuation.parenthesis.open.cs" "name": "punctuation.parenthesis.open.cs"
@ -2847,7 +3055,7 @@
} }
}, },
"as-expression": { "as-expression": {
"match": "(?x)\n(?<!\\.)\\b(as)\\b\\s*\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?", "match": "(?x)\n(?<!\\.)\\b(as)\\b\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?",
"captures": { "captures": {
"1": { "1": {
"name": "keyword.other.as.cs" "name": "keyword.other.as.cs"
@ -2862,7 +3070,7 @@
} }
}, },
"is-expression": { "is-expression": {
"match": "(?x)\n(?<!\\.)\\b(is)\\b\\s*\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?", "match": "(?x)\n(?<!\\.)\\b(is)\\b\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?",
"captures": { "captures": {
"1": { "1": {
"name": "keyword.other.is.cs" "name": "keyword.other.is.cs"
@ -2888,7 +3096,7 @@
} }
}, },
"invocation-expression": { "invocation-expression": {
"begin": "(?x)\n(?:(\\?)\\s*)? # preceding null-conditional operator?\n(?:(\\.)\\s*)? # preceding dot?\n(@?[_[:alpha:]][_[:alnum:]]*)\\s* # method name\n(?<type-args>\\s*<([^<>]|\\g<type-args>)+>\\s*)?\\s* # type arguments\n(?=\\() # open paren of argument list", "begin": "(?x)\n(?:(\\?)\\s*)? # preceding null-conditional operator?\n(?:(\\.)\\s*)? # preceding dot?\n(@?[_[:alpha:]][_[:alnum:]]*)\\s* # method name\n(?<type_args>\\s*<([^<>]|\\g<type_args>)+>\\s*)?\\s* # type arguments\n(?=\\() # open paren of argument list",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"name": "keyword.operator.null-conditional.cs" "name": "keyword.operator.null-conditional.cs"
@ -2954,7 +3162,7 @@
} }
}, },
{ {
"match": "(?x)\n(\\.)?\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\n(?<type-params>\\s*<([^<>]|\\g<type-params>)+>\\s*)\n(?=\n (\\s*\\?)?\n \\s*\\.\\s*@?[_[:alpha:]][_[:alnum:]]*\n)", "match": "(?x)\n(\\.)?\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\n(?<type_params>\\s*<([^<>]|\\g<type_params>)+>\\s*)\n(?=\n (\\s*\\?)?\n \\s*\\.\\s*@?[_[:alpha:]][_[:alnum:]]*\n)",
"captures": { "captures": {
"1": { "1": {
"name": "punctuation.accessor.cs" "name": "punctuation.accessor.cs"
@ -2992,7 +3200,7 @@
] ]
}, },
"object-creation-expression-with-parameters": { "object-creation-expression-with-parameters": {
"begin": "(?x)\n(new)\\s+\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\()", "begin": "(?x)\n(new)\\s+\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?=\\()",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"name": "keyword.other.new.cs" "name": "keyword.other.new.cs"
@ -3013,7 +3221,7 @@
] ]
}, },
"object-creation-expression-with-no-parameters": { "object-creation-expression-with-no-parameters": {
"match": "(?x)\n(new)\\s+\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s*\n(?=\\{|$)", "match": "(?x)\n(new)\\s+\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?=\\{|$)",
"captures": { "captures": {
"1": { "1": {
"name": "keyword.other.new.cs" "name": "keyword.other.new.cs"
@ -3028,7 +3236,7 @@
} }
}, },
"array-creation-expression": { "array-creation-expression": {
"begin": "(?x)\n\\b(new|stackalloc)\\b\\s*\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\\s*\n(?=\\[)", "begin": "(?x)\n\\b(new|stackalloc)\\b\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\\s*\n(?=\\[)",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"name": "keyword.other.new.cs" "name": "keyword.other.new.cs"
@ -3131,7 +3339,7 @@
] ]
}, },
"parameter": { "parameter": {
"match": "(?x)\n(?:(?:\\b(ref|params|out|in|this)\\b)\\s+)?\n(?<type-name>\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+\n(\\g<identifier>)", "match": "(?x)\n(?:(?:\\b(ref|params|out|in|this)\\b)\\s+)?\n(?<type_name>\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g<identifier>)",
"captures": { "captures": {
"1": { "1": {
"name": "storage.modifier.cs" "name": "storage.modifier.cs"
@ -3230,7 +3438,7 @@
] ]
}, },
"query-expression": { "query-expression": {
"begin": "(?x)\n\\b(from)\\b\\s*\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\n\\s+(\\g<identifier>)\\b\\s*\n\\b(in)\\b\\s*", "begin": "(?x)\n\\b(from)\\b\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\n\\s+(\\g<identifier>)\\b\\s*\n\\b(in)\\b\\s*",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"name": "keyword.query.from.cs" "name": "keyword.query.from.cs"
@ -3322,7 +3530,7 @@
] ]
}, },
"join-clause": { "join-clause": {
"begin": "(?x)\n\\b(join)\\b\\s*\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)?\n\\s+(\\g<identifier>)\\b\\s*\n\\b(in)\\b\\s*", "begin": "(?x)\n\\b(join)\\b\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\n\\s+(\\g<identifier>)\\b\\s*\n\\b(in)\\b\\s*",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"name": "keyword.query.join.cs" "name": "keyword.query.join.cs"
@ -3592,7 +3800,7 @@
] ]
}, },
"lambda-parameter": { "lambda-parameter": {
"match": "(?x)\n(?:\\b(ref|out|in)\\b)?\\s*\n(?:(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\\s+)?\n(\\g<identifier>)\\b\\s*\n(?=[,)])", "match": "(?x)\n(?:\\b(ref|out|in)\\b)?\\s*\n(?:(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+)?\n(\\g<identifier>)\\b\\s*\n(?=[,)])",
"captures": { "captures": {
"1": { "1": {
"name": "storage.modifier.cs" "name": "storage.modifier.cs"
@ -3672,7 +3880,7 @@
] ]
}, },
"tuple-element": { "tuple-element": {
"match": "(?x)\n(?<type-name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name-and-type-args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type-args>\\s*<(?:[^<>]|\\g<type-args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name-and-type-args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s*\\[(?:\\s*,\\s*)*\\]\\s*)* # array suffix?\n )\n)\n(?:(?<tuple-name>\\g<identifier>)\\b)?", "match": "(?x)\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\n(?:(?<tuple_name>\\g<identifier>)\\b)?",
"captures": { "captures": {
"1": { "1": {
"patterns": [ "patterns": [

View File

@ -1,9 +1,9 @@
{ {
"extends": "../../shared.tsconfig.json", "extends": "../../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"outDir": "./out" "outDir": "./out"
}, },
"include": [ "include": [
"src/**/*" "src/**/*"
] ]
} }

View File

@ -18,6 +18,12 @@
"main": "./client/out/node/cssClientMain", "main": "./client/out/node/cssClientMain",
"browser": "./client/dist/browser/cssClientMain", "browser": "./client/dist/browser/cssClientMain",
"enableProposedApi": true, "enableProposedApi": true,
"capabilities": {
"virtualWorkspaces": true,
"untrustedWorkspaces": {
"supported": true
}
},
"scripts": { "scripts": {
"compile": "gulp compile-extension:css-language-features-client compile-extension:css-language-features-server", "compile": "gulp compile-extension:css-language-features-client compile-extension:css-language-features-server",
"watch": "gulp watch-extension:css-language-features-client watch-extension:css-language-features-server", "watch": "gulp watch-extension:css-language-features-client watch-extension:css-language-features-server",

View File

@ -10,7 +10,7 @@
"main": "./out/node/cssServerMain", "main": "./out/node/cssServerMain",
"browser": "./dist/browser/cssServerMain", "browser": "./dist/browser/cssServerMain",
"dependencies": { "dependencies": {
"vscode-css-languageservice": "^5.1.0", "vscode-css-languageservice": "^5.1.1",
"vscode-languageserver": "^7.0.0", "vscode-languageserver": "^7.0.0",
"vscode-uri": "^3.0.2" "vscode-uri": "^3.0.2"
}, },

View File

@ -11,7 +11,7 @@ const suite = 'Integration CSS Extension Tests';
const options = { const options = {
ui: 'tdd', ui: 'tdd',
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'), color: true,
timeout: 60000 timeout: 60000
}; };

View File

@ -1,9 +1,9 @@
{ {
"extends": "../../shared.tsconfig.json", "extends": "../../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"outDir": "./out" "outDir": "./out"
}, },
"include": [ "include": [
"src/**/*" "src/**/*"
] ]
} }

View File

@ -12,10 +12,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679" resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.9.tgz#990ad687ad8b26ef6dcc34a4f69c33d40c95b679"
integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q== integrity sha512-yj0DOaQeUrk3nJ0bd3Y5PeDRJ6W0r+kilosLA+dzF3dola/o9hxhMSg2sFvVcA2UHS5JSOsZp4S0c1OEXc4m1Q==
vscode-css-languageservice@^5.1.0: vscode-css-languageservice@^5.1.1:
version "5.1.0" version "5.1.1"
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-5.1.0.tgz#cd172d13e9e7ae23ba567c73778aee10475ff716" resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-5.1.1.tgz#d68a22ea0b34a8356c169cafc7d32564c2ff6e87"
integrity sha512-iLHd/WjRKgaZBXMNeUooHG+r0qlhJBkXa+3MpQQR6Rpm928cis/3OV2Mp1R80yAQevIMeDL32RIJfHoJCT/RRg== integrity sha512-QW0oe/g2y5E2AbVqY7FJNr2Q8uHiAHNSFpptI6xB8Y0KgzVKppOcIVrgmBNzXhFp9IswAwptkdqr8ExSJbqPkQ==
dependencies: dependencies:
vscode-languageserver-textdocument "^1.0.1" vscode-languageserver-textdocument "^1.0.1"
vscode-languageserver-types "^3.16.0" vscode-languageserver-types "^3.16.0"

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -8,6 +8,13 @@
"engines": { "engines": {
"vscode": "^1.5.0" "vscode": "^1.5.0"
}, },
"icon": "media/icon.png",
"capabilities": {
"virtualWorkspaces": false,
"untrustedWorkspaces": {
"supported": true
}
},
"activationEvents": [ "activationEvents": [
"*" "*"
], ],

View File

@ -1,5 +1,5 @@
{ {
"extends": "../shared.tsconfig.json", "extends": "../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"outDir": "./out", "outDir": "./out",
"downlevelIteration": true "downlevelIteration": true
@ -7,4 +7,4 @@
"include": [ "include": [
"src/**/*" "src/**/*"
] ]
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -8,9 +8,16 @@
"engines": { "engines": {
"vscode": "^1.32.0" "vscode": "^1.32.0"
}, },
"icon": "media/icon.png",
"activationEvents": [ "activationEvents": [
"onDebugResolve" "onDebugResolve"
], ],
"capabilities": {
"virtualWorkspaces": false,
"untrustedWorkspaces": {
"supported": true
}
},
"enableProposedApi": true, "enableProposedApi": true,
"main": "./out/extension", "main": "./out/extension",
"scripts": { "scripts": {

View File

@ -1,5 +1,5 @@
{ {
"extends": "../shared.tsconfig.json", "extends": "../tsconfig.base.json",
"compilerOptions": { "compilerOptions": {
"outDir": "./out", "outDir": "./out",
"downlevelIteration": true "downlevelIteration": true
@ -7,4 +7,4 @@
"include": [ "include": [
"src/**/*" "src/**/*"
] ]
} }

View File

@ -69,97 +69,98 @@
} }
}, },
"default": {}, "default": {},
"description": "%emmetVariables%" "markdownDescription": "%emmetVariables%"
}, },
"emmet.syntaxProfiles": { "emmet.syntaxProfiles": {
"type": "object", "type": "object",
"default": {}, "default": {},
"description": "%emmetSyntaxProfiles%" "markdownDescription": "%emmetSyntaxProfiles%"
}, },
"emmet.excludeLanguages": { "emmet.excludeLanguages": {
"type": "array", "type": "array",
"default": [ "default": [
"markdown" "markdown"
], ],
"description": "%emmetExclude%" "markdownDescription": "%emmetExclude%"
}, },
"emmet.extensionsPath": { "emmet.extensionsPath": {
"type": "array", "type": "array",
"items": { "items": {
"type": "string" "type": "string",
"markdownDescription": "%emmetExtensionsPathItem%"
}, },
"default": [], "default": [],
"description": "%emmetExtensionsPath%" "markdownDescription": "%emmetExtensionsPath%"
}, },
"emmet.triggerExpansionOnTab": { "emmet.triggerExpansionOnTab": {
"type": "boolean", "type": "boolean",
"default": false, "default": false,
"description": "%emmetTriggerExpansionOnTab%" "markdownDescription": "%emmetTriggerExpansionOnTab%"
}, },
"emmet.preferences": { "emmet.preferences": {
"type": "object", "type": "object",
"default": {}, "default": {},
"description": "%emmetPreferences%", "markdownDescription": "%emmetPreferences%",
"properties": { "properties": {
"css.intUnit": { "css.intUnit": {
"type": "string", "type": "string",
"default": "px", "default": "px",
"description": "%emmetPreferencesIntUnit%" "markdownDescription": "%emmetPreferencesIntUnit%"
}, },
"css.floatUnit": { "css.floatUnit": {
"type": "string", "type": "string",
"default": "em", "default": "em",
"description": "%emmetPreferencesFloatUnit%" "markdownDescription": "%emmetPreferencesFloatUnit%"
}, },
"css.propertyEnd": { "css.propertyEnd": {
"type": "string", "type": "string",
"default": ";", "default": ";",
"description": "%emmetPreferencesCssAfter%" "markdownDescription": "%emmetPreferencesCssAfter%"
}, },
"sass.propertyEnd": { "sass.propertyEnd": {
"type": "string", "type": "string",
"default": "", "default": "",
"description": "%emmetPreferencesSassAfter%" "markdownDescription": "%emmetPreferencesSassAfter%"
}, },
"stylus.propertyEnd": { "stylus.propertyEnd": {
"type": "string", "type": "string",
"default": "", "default": "",
"description": "%emmetPreferencesStylusAfter%" "markdownDescription": "%emmetPreferencesStylusAfter%"
}, },
"css.valueSeparator": { "css.valueSeparator": {
"type": "string", "type": "string",
"default": ": ", "default": ": ",
"description": "%emmetPreferencesCssBetween%" "markdownDescription": "%emmetPreferencesCssBetween%"
}, },
"sass.valueSeparator": { "sass.valueSeparator": {
"type": "string", "type": "string",
"default": ": ", "default": ": ",
"description": "%emmetPreferencesSassBetween%" "markdownDescription": "%emmetPreferencesSassBetween%"
}, },
"stylus.valueSeparator": { "stylus.valueSeparator": {
"type": "string", "type": "string",
"default": " ", "default": " ",
"description": "%emmetPreferencesStylusBetween%" "markdownDescription": "%emmetPreferencesStylusBetween%"
}, },
"bem.elementSeparator": { "bem.elementSeparator": {
"type": "string", "type": "string",
"default": "__", "default": "__",
"description": "%emmetPreferencesBemElementSeparator%" "markdownDescription": "%emmetPreferencesBemElementSeparator%"
}, },
"bem.modifierSeparator": { "bem.modifierSeparator": {
"type": "string", "type": "string",
"default": "_", "default": "_",
"description": "%emmetPreferencesBemModifierSeparator%" "markdownDescription": "%emmetPreferencesBemModifierSeparator%"
}, },
"filter.commentBefore": { "filter.commentBefore": {
"type": "string", "type": "string",
"default": "", "default": "",
"description": "%emmetPreferencesFilterCommentBefore%" "markdownDescription": "%emmetPreferencesFilterCommentBefore%"
}, },
"filter.commentAfter": { "filter.commentAfter": {
"type": "string", "type": "string",
"default": "\n<!-- /[#ID][.CLASS] -->", "default": "\n<!-- /[#ID][.CLASS] -->",
"description": "%emmetPreferencesFilterCommentAfter%" "markdownDescription": "%emmetPreferencesFilterCommentAfter%"
}, },
"filter.commentTrigger": { "filter.commentTrigger": {
"type": "array", "type": "array",
@ -167,26 +168,26 @@
"id", "id",
"class" "class"
], ],
"description": "%emmetPreferencesFilterCommentTrigger%" "markdownDescription": "%emmetPreferencesFilterCommentTrigger%"
}, },
"format.noIndentTags": { "format.noIndentTags": {
"type": "array", "type": "array",
"default": [ "default": [
"html" "html"
], ],
"description": "%emmetPreferencesFormatNoIndentTags%" "markdownDescription": "%emmetPreferencesFormatNoIndentTags%"
}, },
"format.forceIndentationForTags": { "format.forceIndentationForTags": {
"type": "array", "type": "array",
"default": [ "default": [
"body" "body"
], ],
"description": "%emmetPreferencesFormatForceIndentTags%" "markdownDescription": "%emmetPreferencesFormatForceIndentTags%"
}, },
"profile.allowCompactBoolean": { "profile.allowCompactBoolean": {
"type": "boolean", "type": "boolean",
"default": false, "default": false,
"description": "%emmetPreferencesAllowCompactBoolean%" "markdownDescription": "%emmetPreferencesAllowCompactBoolean%"
}, },
"css.webkitProperties": { "css.webkitProperties": {
"type": "string", "type": "string",
@ -211,17 +212,28 @@
"css.fuzzySearchMinScore": { "css.fuzzySearchMinScore": {
"type": "number", "type": "number",
"default": 0.3, "default": 0.3,
"description": "%emmetPreferencesCssFuzzySearchMinScore%" "markdownDescription": "%emmetPreferencesCssFuzzySearchMinScore%"
},
"output.inlineBreak": {
"type": "number",
"default": 0,
"markdownDescription": "%emmetPreferencesOutputInlineBreak%"
}, },
"output.reverseAttributes": { "output.reverseAttributes": {
"type": "boolean", "type": "boolean",
"default": false, "default": false,
"description": "%emmetPreferencesOutputReverseAttributes%" "markdownDescription": "%emmetPreferencesOutputReverseAttributes%"
},
"output.selfClosingStyle": {
"type": "string",
"enum": ["html", "xhtml", "xml"],
"default": "html",
"markdownDescription": "%emmetPreferencesOutputSelfClosingStyle%"
}, },
"css.color.short": { "css.color.short": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"description": "%emmetPreferencesCssColorShort%" "markdownDescription": "%emmetPreferencesCssColorShort%"
} }
} }
}, },
@ -442,5 +454,11 @@
"image-size": "^0.5.2", "image-size": "^0.5.2",
"vscode-emmet-helper": "^2.3.0", "vscode-emmet-helper": "^2.3.0",
"vscode-languageserver-textdocument": "^1.0.1" "vscode-languageserver-textdocument": "^1.0.1"
},
"capabilities": {
"virtualWorkspaces": true,
"untrustedWorkspaces": {
"supported": true
}
} }
} }

View File

@ -25,36 +25,39 @@
"command.showEmmetCommands": "Show Emmet Commands", "command.showEmmetCommands": "Show Emmet Commands",
"emmetSyntaxProfiles": "Define profile for specified syntax or use your own profile with specific rules.", "emmetSyntaxProfiles": "Define profile for specified syntax or use your own profile with specific rules.",
"emmetExclude": "An array of languages where Emmet abbreviations should not be expanded.", "emmetExclude": "An array of languages where Emmet abbreviations should not be expanded.",
"emmetExtensionsPath": "Path to a folder containing Emmet profiles and snippets.", "emmetExtensionsPath": "An array of paths, where each path can contain Emmet syntaxProfiles and/or snippet files.\nIn case of conflicts, the profiles/snippets of later paths will override those of earlier paths.\nSee https://code.visualstudio.com/docs/editor/emmet for more information and an example snippet file.",
"emmetExtensionsPathItem": "A path containing Emmet syntaxProfiles and/or snippets.",
"emmetShowExpandedAbbreviation": "Shows expanded Emmet abbreviations as suggestions.\nThe option `\"inMarkupAndStylesheetFilesOnly\"` applies to html, haml, jade, slim, xml, xsl, css, scss, sass, less and stylus.\nThe option `\"always\"` applies to all parts of the file regardless of markup/css.", "emmetShowExpandedAbbreviation": "Shows expanded Emmet abbreviations as suggestions.\nThe option `\"inMarkupAndStylesheetFilesOnly\"` applies to html, haml, jade, slim, xml, xsl, css, scss, sass, less and stylus.\nThe option `\"always\"` applies to all parts of the file regardless of markup/css.",
"emmetShowAbbreviationSuggestions": "Shows possible Emmet abbreviations as suggestions. Not applicable in stylesheets or when emmet.showExpandedAbbreviation is set to `\"never\"`.", "emmetShowAbbreviationSuggestions": "Shows possible Emmet abbreviations as suggestions. Not applicable in stylesheets or when emmet.showExpandedAbbreviation is set to `\"never\"`.",
"emmetIncludeLanguages": "Enable Emmet abbreviations in languages that are not supported by default. Add a mapping here between the language and Emmet supported language.\n For example: `{\"vue-html\": \"html\", \"javascript\": \"javascriptreact\"}`", "emmetIncludeLanguages": "Enable Emmet abbreviations in languages that are not supported by default. Add a mapping here between the language and Emmet supported language.\n For example: `{\"vue-html\": \"html\", \"javascript\": \"javascriptreact\"}`",
"emmetVariables": "Variables to be used in Emmet snippets", "emmetVariables": "Variables to be used in Emmet snippets.",
"emmetTriggerExpansionOnTab": "When enabled, Emmet abbreviations are expanded when pressing TAB.", "emmetTriggerExpansionOnTab": "When enabled, Emmet abbreviations are expanded when pressing TAB.",
"emmetPreferences": "Preferences used to modify behavior of some actions and resolvers of Emmet.", "emmetPreferences": "Preferences used to modify behavior of some actions and resolvers of Emmet.",
"emmetPreferencesIntUnit": "Default unit for integer values", "emmetPreferencesIntUnit": "Default unit for integer values.",
"emmetPreferencesFloatUnit": "Default unit for float values", "emmetPreferencesFloatUnit": "Default unit for float values.",
"emmetPreferencesCssAfter": "Symbol to be placed at the end of CSS property when expanding CSS abbreviations", "emmetPreferencesCssAfter": "Symbol to be placed at the end of CSS property when expanding CSS abbreviations.",
"emmetPreferencesSassAfter": "Symbol to be placed at the end of CSS property when expanding CSS abbreviations in Sass files", "emmetPreferencesSassAfter": "Symbol to be placed at the end of CSS property when expanding CSS abbreviations in Sass files.",
"emmetPreferencesStylusAfter": "Symbol to be placed at the end of CSS property when expanding CSS abbreviations in Stylus files", "emmetPreferencesStylusAfter": "Symbol to be placed at the end of CSS property when expanding CSS abbreviations in Stylus files.",
"emmetPreferencesCssBetween": "Symbol to be placed at the between CSS property and value when expanding CSS abbreviations", "emmetPreferencesCssBetween": "Symbol to be placed at the between CSS property and value when expanding CSS abbreviations.",
"emmetPreferencesSassBetween": "Symbol to be placed at the between CSS property and value when expanding CSS abbreviations in Sass files", "emmetPreferencesSassBetween": "Symbol to be placed at the between CSS property and value when expanding CSS abbreviations in Sass files.",
"emmetPreferencesStylusBetween": "Symbol to be placed at the between CSS property and value when expanding CSS abbreviations in Stylus files", "emmetPreferencesStylusBetween": "Symbol to be placed at the between CSS property and value when expanding CSS abbreviations in Stylus files.",
"emmetShowSuggestionsAsSnippets": "If `true`, then Emmet suggestions will show up as snippets allowing you to order them as per `#editor.snippetSuggestions#` setting.", "emmetShowSuggestionsAsSnippets": "If `true`, then Emmet suggestions will show up as snippets allowing you to order them as per `#editor.snippetSuggestions#` setting.",
"emmetPreferencesBemElementSeparator": "Element separator used for classes when using the BEM filter", "emmetPreferencesBemElementSeparator": "Element separator used for classes when using the BEM filter.",
"emmetPreferencesBemModifierSeparator": "Modifier separator used for classes when using the BEM filter", "emmetPreferencesBemModifierSeparator": "Modifier separator used for classes when using the BEM filter.",
"emmetPreferencesFilterCommentBefore": "A definition of comment that should be placed before matched element when comment filter is applied.", "emmetPreferencesFilterCommentBefore": "A definition of comment that should be placed before matched element when comment filter is applied.",
"emmetPreferencesFilterCommentAfter": "A definition of comment that should be placed after matched element when comment filter is applied.", "emmetPreferencesFilterCommentAfter": "A definition of comment that should be placed after matched element when comment filter is applied.",
"emmetPreferencesFilterCommentTrigger": "A comma-separated list of attribute names that should exist in abbreviation for the comment filter to be applied", "emmetPreferencesFilterCommentTrigger": "A comma-separated list of attribute names that should exist in the abbreviation for the comment filter to be applied.",
"emmetPreferencesFormatNoIndentTags": "An array of tag names that should not get inner indentation", "emmetPreferencesFormatNoIndentTags": "An array of tag names that should never get inner indentation.",
"emmetPreferencesFormatForceIndentTags": "An array of tag names that should always get inner indentation", "emmetPreferencesFormatForceIndentTags": "An array of tag names that should always get inner indentation.",
"emmetPreferencesAllowCompactBoolean": "If true, compact notation of boolean attributes are produced", "emmetPreferencesAllowCompactBoolean": "If `true`, compact notation of boolean attributes are produced.",
"emmetPreferencesCssWebkitProperties": "Comma separated CSS properties that get the 'webkit' vendor prefix when used in Emmet abbreviation that starts with `-`. Set to empty string to always avoid the 'webkit' prefix.", "emmetPreferencesCssWebkitProperties": "Comma separated CSS properties that get the 'webkit' vendor prefix when used in Emmet abbreviation that starts with `-`. Set to empty string to always avoid the 'webkit' prefix.",
"emmetPreferencesCssMozProperties": "Comma separated CSS properties that get the 'moz' vendor prefix when used in Emmet abbreviation that starts with `-`. Set to empty string to always avoid the 'moz' prefix.", "emmetPreferencesCssMozProperties": "Comma separated CSS properties that get the 'moz' vendor prefix when used in Emmet abbreviation that starts with `-`. Set to empty string to always avoid the 'moz' prefix.",
"emmetPreferencesCssOProperties": "Comma separated CSS properties that get the 'o' vendor prefix when used in Emmet abbreviation that starts with `-`. Set to empty string to always avoid the 'o' prefix.", "emmetPreferencesCssOProperties": "Comma separated CSS properties that get the 'o' vendor prefix when used in Emmet abbreviation that starts with `-`. Set to empty string to always avoid the 'o' prefix.",
"emmetPreferencesCssMsProperties": "Comma separated CSS properties that get the 'ms' vendor prefix when used in Emmet abbreviation that starts with `-`. Set to empty string to always avoid the 'ms' prefix.", "emmetPreferencesCssMsProperties": "Comma separated CSS properties that get the 'ms' vendor prefix when used in Emmet abbreviation that starts with `-`. Set to empty string to always avoid the 'ms' prefix.",
"emmetPreferencesCssFuzzySearchMinScore": "The minimum score (from 0 to 1) that fuzzy-matched abbreviation should achieve. Lower values may produce many false-positive matches, higher values may reduce possible matches.", "emmetPreferencesCssFuzzySearchMinScore": "The minimum score (from 0 to 1) that fuzzy-matched abbreviation should achieve. Lower values may produce many false-positive matches, higher values may reduce possible matches.",
"emmetOptimizeStylesheetParsing": "When set to `false`, the whole file is parsed to determine if current position is valid for expanding Emmet abbreviations. When set to `true`, only the content around the current position in CSS/SCSS/Less files is parsed.", "emmetOptimizeStylesheetParsing": "When set to `false`, the whole file is parsed to determine if current position is valid for expanding Emmet abbreviations. When set to `true`, only the content around the current position in CSS/SCSS/Less files is parsed.",
"emmetPreferencesOutputInlineBreak": "The number of sibling inline elements needed for line breaks to be placed between those elements. If `0`, inline elements are always expanded onto a single line.",
"emmetPreferencesOutputReverseAttributes": "If `true`, reverses attribute merging directions when resolving snippets.", "emmetPreferencesOutputReverseAttributes": "If `true`, reverses attribute merging directions when resolving snippets.",
"emmetPreferencesCssColorShort": "If `true`, color values like #f will be expanded to #fff instead of #ffffff." "emmetPreferencesOutputSelfClosingStyle": "Style of self-closing tags: html (`<br>`), xml (`<br/>`) or xhtml (`<br />`).",
"emmetPreferencesCssColorShort": "If `true`, color values like `#f` will be expanded to `#fff` instead of `#ffffff`."
} }

View File

@ -205,7 +205,7 @@ export async function wrapWithAbbreviation(args: any): Promise<boolean> {
let inPreviewMode = false; let inPreviewMode = false;
async function makeChanges(inputAbbreviation: string | undefined, previewChanges: boolean): Promise<boolean> { async function makeChanges(inputAbbreviation: string | undefined, previewChanges: boolean): Promise<boolean> {
const isAbbreviationValid = !!inputAbbreviation && !!inputAbbreviation.trim() && helper.isAbbreviationValid(syntax, inputAbbreviation); const isAbbreviationValid = !!inputAbbreviation && !!inputAbbreviation.trim() && helper.isAbbreviationValid(syntax, inputAbbreviation);
const extractedResults = isAbbreviationValid ? helper.extractAbbreviationFromText(inputAbbreviation!) : undefined; const extractedResults = isAbbreviationValid ? helper.extractAbbreviationFromText(inputAbbreviation!, syntax) : undefined;
if (!extractedResults) { if (!extractedResults) {
if (inPreviewMode) { if (inPreviewMode) {
inPreviewMode = false; inPreviewMode = false;
@ -311,12 +311,12 @@ export function expandEmmetAbbreviation(args: any): Thenable<boolean | undefined
let allAbbreviationsSame: boolean = true; let allAbbreviationsSame: boolean = true;
const helper = getEmmetHelper(); const helper = getEmmetHelper();
const getAbbreviation = (document: vscode.TextDocument, selection: vscode.Selection, position: vscode.Position, syntax: string): [vscode.Range | null, string, string] => { const getAbbreviation = (document: vscode.TextDocument, selection: vscode.Selection, position: vscode.Position, syntax: string): [vscode.Range | null, string, string | undefined] => {
position = document.validatePosition(position); position = document.validatePosition(position);
let rangeToReplace: vscode.Range = selection; let rangeToReplace: vscode.Range = selection;
let abbr = document.getText(rangeToReplace); let abbr = document.getText(rangeToReplace);
if (!rangeToReplace.isEmpty) { if (!rangeToReplace.isEmpty) {
const extractedResults = helper.extractAbbreviationFromText(abbr); const extractedResults = helper.extractAbbreviationFromText(abbr, syntax);
if (extractedResults) { if (extractedResults) {
return [rangeToReplace, extractedResults.abbreviation, extractedResults.filter]; return [rangeToReplace, extractedResults.abbreviation, extractedResults.filter];
} }

View File

@ -176,7 +176,8 @@ export class DefaultCompletionItemProvider implements vscode.CompletionItemProvi
return; return;
} }
let result = helper.doComplete(toLSTextDocument(document), position, syntax, getEmmetConfiguration(syntax!)); const config = getEmmetConfiguration(syntax!);
const result = helper.doComplete(toLSTextDocument(document), position, syntax, config);
// https://github.com/microsoft/vscode/issues/86941 // https://github.com/microsoft/vscode/issues/86941
if (result && result.items && result.items.length === 1) { if (result && result.items && result.items.length === 1) {

View File

@ -19,7 +19,7 @@ import { evaluateMathExpression } from './evaluateMathExpression';
import { incrementDecrement } from './incrementDecrement'; import { incrementDecrement } from './incrementDecrement';
import { LANGUAGE_MODES, getMappingForIncludedLanguages, updateEmmetExtensionsPath, migrateEmmetExtensionsPath, getPathBaseName, getSyntaxes, getEmmetMode } from './util'; import { LANGUAGE_MODES, getMappingForIncludedLanguages, updateEmmetExtensionsPath, migrateEmmetExtensionsPath, getPathBaseName, getSyntaxes, getEmmetMode } from './util';
import { reflectCssValue } from './reflectCssValue'; import { reflectCssValue } from './reflectCssValue';
import { addFileToParseCache, removeFileFromParseCache } from './parseDocument'; import { addFileToParseCache, clearParseCache, removeFileFromParseCache } from './parseDocument';
export function activateEmmetExtension(context: vscode.ExtensionContext) { export function activateEmmetExtension(context: vscode.ExtensionContext) {
migrateEmmetExtensionsPath(); migrateEmmetExtensionsPath();
@ -203,4 +203,6 @@ function registerCompletionProviders(context: vscode.ExtensionContext) {
} }
export function deactivate() { export function deactivate() {
completionProvidersMapping.clear();
clearParseCache();
} }

View File

@ -44,3 +44,7 @@ export function removeFileFromParseCache(document: TextDocument) {
const filename = document.uri.toString(); const filename = document.uri.toString();
_parseCache.delete(filename); _parseCache.delete(filename);
} }
export function clearParseCache() {
_parseCache.clear();
}

View File

@ -19,7 +19,7 @@ export function nextItemHTML(document: vscode.TextDocument, selectionStart: vsco
if (currentNode.type !== 'comment') { if (currentNode.type !== 'comment') {
// If cursor is in the tag name, select tag // If cursor is in the tag name, select tag
if (currentNode.open && if (currentNode.open &&
selectionEndOffset < currentNode.open.start + currentNode.name.length) { selectionEndOffset <= currentNode.open.start + currentNode.name.length) {
return getSelectionFromNode(document, currentNode); return getSelectionFromNode(document, currentNode);
} }

View File

@ -44,10 +44,7 @@ const htmlContents = `
suite('Tests for Expand Abbreviations (HTML)', () => { suite('Tests for Expand Abbreviations (HTML)', () => {
const oldValueForExcludeLanguages = workspace.getConfiguration('emmet').inspect('excludeLanguages'); const oldValueForExcludeLanguages = workspace.getConfiguration('emmet').inspect('excludeLanguages');
const oldValueForInlcudeLanguages = workspace.getConfiguration('emmet').inspect('includeLanguages'); const oldValueForInlcudeLanguages = workspace.getConfiguration('emmet').inspect('includeLanguages');
teardown(() => { teardown(closeAllEditors);
// close all editors
return closeAllEditors;
});
test('Expand snippets (HTML)', () => { test('Expand snippets (HTML)', () => {
return testExpandAbbreviation('html', new Selection(3, 23, 3, 23), 'img', '<img src=\"\" alt=\"\">'); return testExpandAbbreviation('html', new Selection(3, 23, 3, 23), 'img', '<img src=\"\" alt=\"\">');
@ -442,7 +439,7 @@ suite('Tests for jsx, xml and xsl', () => {
return withRandomFileEditor('img', 'javascriptreact', async (editor, _doc) => { return withRandomFileEditor('img', 'javascriptreact', async (editor, _doc) => {
editor.selection = new Selection(0, 6, 0, 6); editor.selection = new Selection(0, 6, 0, 6);
await expandEmmetAbbreviation({ language: 'javascriptreact' }); await expandEmmetAbbreviation({ language: 'javascriptreact' });
assert.strictEqual(editor.document.getText(), '<img src="" alt=""/>'); assert.strictEqual(editor.document.getText(), '<img src="" alt="" />');
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -452,7 +449,7 @@ suite('Tests for jsx, xml and xsl', () => {
return withRandomFileEditor('img', 'javascriptreact', async (editor, _doc) => { return withRandomFileEditor('img', 'javascriptreact', async (editor, _doc) => {
editor.selection = new Selection(0, 6, 0, 6); editor.selection = new Selection(0, 6, 0, 6);
await expandEmmetAbbreviation({ language: 'javascriptreact' }); await expandEmmetAbbreviation({ language: 'javascriptreact' });
assert.strictEqual(editor.document.getText(), '<img src=\'\' alt=\'\'/>'); assert.strictEqual(editor.document.getText(), '<img src=\'\' alt=\'\' />');
return workspace.getConfiguration('emmet').update('syntaxProfiles', oldValueForSyntaxProfiles ? oldValueForSyntaxProfiles.globalValue : undefined, ConfigurationTarget.Global); return workspace.getConfiguration('emmet').update('syntaxProfiles', oldValueForSyntaxProfiles ? oldValueForSyntaxProfiles.globalValue : undefined, ConfigurationTarget.Global);
}); });
}); });

View File

@ -12,10 +12,7 @@ import { closeAllEditors, withRandomFileEditor } from './testUtils';
const completionProvider = new DefaultCompletionItemProvider(); const completionProvider = new DefaultCompletionItemProvider();
suite('Tests for completion in CSS embedded in HTML', () => { suite('Tests for completion in CSS embedded in HTML', () => {
teardown(() => { teardown(closeAllEditors);
// close all editors
return closeAllEditors;
});
test('style attribute & attribute value in html', async () => { test('style attribute & attribute value in html', async () => {
await testHtmlCompletionProvider('<div style="|"', [{ label: 'padding: ;' }]); await testHtmlCompletionProvider('<div style="|"', [{ label: 'padding: ;' }]);
@ -81,10 +78,10 @@ function testHtmlCompletionProvider(contents: string, expectedItems: TestComplet
assert.ok(match, `Didn't find completion item with label ${eItem.label}`); assert.ok(match, `Didn't find completion item with label ${eItem.label}`);
if (match) { if (match) {
assert.equal(match.detail, 'Emmet Abbreviation', `Match needs to come from Emmet`); assert.strictEqual(match.detail, 'Emmet Abbreviation', `Match needs to come from Emmet`);
if (eItem.documentation) { if (eItem.documentation) {
assert.equal(match.documentation, eItem.documentation, `Emmet completion Documentation doesn't match`); assert.strictEqual(match.documentation, eItem.documentation, `Emmet completion Documentation doesn't match`);
} }
} }
}); });
@ -122,10 +119,10 @@ function testCssCompletionProvider(contents: string, expectedItems: TestCompleti
assert.ok(match, `Didn't find completion item with label ${eItem.label}`); assert.ok(match, `Didn't find completion item with label ${eItem.label}`);
if (match) { if (match) {
assert.equal(match.detail, 'Emmet Abbreviation', `Match needs to come from Emmet`); assert.strictEqual(match.detail, 'Emmet Abbreviation', `Match needs to come from Emmet`);
if (eItem.documentation) { if (eItem.documentation) {
assert.equal(match.documentation, eItem.documentation, `Emmet completion Documentation doesn't match`); assert.strictEqual(match.documentation, eItem.documentation, `Emmet completion Documentation doesn't match`);
} }
} }
}); });

View File

@ -59,7 +59,7 @@ suite('Tests for Expand Abbreviations (CSS)', () => {
return withRandomFileEditor(cssContents, 'css', (editor, _) => { return withRandomFileEditor(cssContents, 'css', (editor, _) => {
editor.selections = [new Selection(3, 1, 3, 6), new Selection(5, 1, 5, 6)]; editor.selections = [new Selection(3, 1, 3, 6), new Selection(5, 1, 5, 6)];
return expandEmmetAbbreviation(null).then(() => { return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), cssContents.replace(/pos:f/g, 'position: fixed;')); assert.strictEqual(editor.document.getText(), cssContents.replace(/pos:f/g, 'position: fixed;'));
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -78,11 +78,11 @@ suite('Tests for Expand Abbreviations (CSS)', () => {
return withRandomFileEditor(testContent, 'css', (editor, _) => { return withRandomFileEditor(testContent, 'css', (editor, _) => {
editor.selection = new Selection(3, 4, 3, 4); editor.selection = new Selection(3, 4, 3, 4);
return expandEmmetAbbreviation(null).then(() => { return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent); assert.strictEqual(editor.document.getText(), testContent);
const cancelSrc = new CancellationTokenSource(); const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke }); const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) { if (completionPromise) {
assert.equal(1, 2, `Invalid completion at property value`); assert.strictEqual(1, 2, `Invalid completion at property value`);
} }
return Promise.resolve(); return Promise.resolve();
}); });
@ -101,11 +101,11 @@ nav#
return withRandomFileEditor(testContent, 'css', (editor, _) => { return withRandomFileEditor(testContent, 'css', (editor, _) => {
editor.selection = new Selection(5, 4, 5, 4); editor.selection = new Selection(5, 4, 5, 4);
return expandEmmetAbbreviation(null).then(() => { return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent); assert.strictEqual(editor.document.getText(), testContent);
const cancelSrc = new CancellationTokenSource(); const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke }); const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) { if (completionPromise) {
assert.equal(1, 2, `Invalid completion at property value`); assert.strictEqual(1, 2, `Invalid completion at property value`);
} }
return Promise.resolve(); return Promise.resolve();
}); });
@ -123,11 +123,11 @@ nav#
return withRandomFileEditor(testContent, 'css', (editor, _) => { return withRandomFileEditor(testContent, 'css', (editor, _) => {
editor.selection = new Selection(2, 10, 2, 10); editor.selection = new Selection(2, 10, 2, 10);
return expandEmmetAbbreviation(null).then(() => { return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent); assert.strictEqual(editor.document.getText(), testContent);
const cancelSrc = new CancellationTokenSource(); const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke }); const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) { if (completionPromise) {
assert.equal(1, 2, `Invalid completion at property value`); assert.strictEqual(1, 2, `Invalid completion at property value`);
} }
return Promise.resolve(); return Promise.resolve();
}); });
@ -140,11 +140,11 @@ nav#
return withRandomFileEditor(testContent, 'css', (editor, _) => { return withRandomFileEditor(testContent, 'css', (editor, _) => {
editor.selection = new Selection(0, 30, 0, 30); editor.selection = new Selection(0, 30, 0, 30);
return expandEmmetAbbreviation(null).then(() => { return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent); assert.strictEqual(editor.document.getText(), testContent);
const cancelSrc = new CancellationTokenSource(); const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(0, 30), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke }); const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(0, 30), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) { if (completionPromise) {
assert.equal(1, 2, `Invalid completion at property value`); assert.strictEqual(1, 2, `Invalid completion at property value`);
} }
return Promise.resolve(); return Promise.resolve();
}); });
@ -165,18 +165,18 @@ nav#
const completionPromise2 = completionProvider.provideCompletionItems(editor.document, new Position(2, 14), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke }); const completionPromise2 = completionProvider.provideCompletionItems(editor.document, new Position(2, 14), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (!completionPromise1 || !completionPromise2) { if (!completionPromise1 || !completionPromise2) {
assert.equal(1, 2, `Completion promise wasnt returned`); assert.strictEqual(1, 2, `Completion promise wasnt returned`);
return Promise.resolve(); return Promise.resolve();
} }
const callBack = (completionList: CompletionList, expandedText: string) => { const callBack = (completionList: CompletionList, expandedText: string) => {
if (!completionList.items || !completionList.items.length) { if (!completionList.items || !completionList.items.length) {
assert.equal(1, 2, `Empty Completions`); assert.strictEqual(1, 2, `Empty Completions`);
return; return;
} }
const emmetCompletionItem = completionList.items[0]; const emmetCompletionItem = completionList.items[0];
assert.equal(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`); assert.strictEqual(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`);
assert.equal((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`); assert.strictEqual((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`);
}; };
return Promise.all<CompletionList>([completionPromise1, completionPromise2]).then(([result1, result2]) => { return Promise.all<CompletionList>([completionPromise1, completionPromise2]).then(([result1, result2]) => {
@ -184,7 +184,7 @@ nav#
callBack(result2, '!important'); callBack(result2, '!important');
editor.selections = [new Selection(2, 12, 2, 12), new Selection(2, 14, 2, 14)]; editor.selections = [new Selection(2, 12, 2, 12), new Selection(2, 14, 2, 14)];
return expandEmmetAbbreviation(null).then(() => { return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent.replace('#12', '#121212').replace('!', '!important')); assert.strictEqual(editor.document.getText(), testContent.replace('#12', '#121212').replace('!', '!important'));
}); });
}); });
}); });
@ -201,11 +201,11 @@ nav#
return withRandomFileEditor(testContent, 'css', (editor, _) => { return withRandomFileEditor(testContent, 'css', (editor, _) => {
editor.selection = new Selection(3, 10, 3, 10); editor.selection = new Selection(3, 10, 3, 10);
return expandEmmetAbbreviation(null).then(() => { return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent); assert.strictEqual(editor.document.getText(), testContent);
const cancelSrc = new CancellationTokenSource(); const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(3, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke }); const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(3, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) { if (completionPromise) {
assert.equal(1, 2, `Invalid completion at property value`); assert.strictEqual(1, 2, `Invalid completion at property value`);
} }
return Promise.resolve(); return Promise.resolve();
}); });
@ -226,18 +226,18 @@ nav#
const completionPromise2 = completionProvider.provideCompletionItems(editor.document, new Position(3, 14), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke }); const completionPromise2 = completionProvider.provideCompletionItems(editor.document, new Position(3, 14), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (!completionPromise1 || !completionPromise2) { if (!completionPromise1 || !completionPromise2) {
assert.equal(1, 2, `Completion promise wasnt returned`); assert.strictEqual(1, 2, `Completion promise wasnt returned`);
return Promise.resolve(); return Promise.resolve();
} }
const callBack = (completionList: CompletionList, expandedText: string) => { const callBack = (completionList: CompletionList, expandedText: string) => {
if (!completionList.items || !completionList.items.length) { if (!completionList.items || !completionList.items.length) {
assert.equal(1, 2, `Empty Completions`); assert.strictEqual(1, 2, `Empty Completions`);
return; return;
} }
const emmetCompletionItem = completionList.items[0]; const emmetCompletionItem = completionList.items[0];
assert.equal(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`); assert.strictEqual(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`);
assert.equal((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`); assert.strictEqual((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`);
}; };
return Promise.all<CompletionList>([completionPromise1, completionPromise2]).then(([result1, result2]) => { return Promise.all<CompletionList>([completionPromise1, completionPromise2]).then(([result1, result2]) => {
@ -245,7 +245,7 @@ nav#
callBack(result2, '!important'); callBack(result2, '!important');
editor.selections = [new Selection(3, 12, 3, 12), new Selection(3, 14, 3, 14)]; editor.selections = [new Selection(3, 12, 3, 12), new Selection(3, 14, 3, 14)];
return expandEmmetAbbreviation(null).then(() => { return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent.replace('#12', '#121212').replace('!', '!important')); assert.strictEqual(editor.document.getText(), testContent.replace('#12', '#121212').replace('!', '!important'));
}); });
}); });
}); });
@ -261,11 +261,11 @@ nav#
return withRandomFileEditor(testContent, 'css', (editor, _) => { return withRandomFileEditor(testContent, 'css', (editor, _) => {
editor.selection = new Selection(2, 10, 2, 10); editor.selection = new Selection(2, 10, 2, 10);
return expandEmmetAbbreviation(null).then(() => { return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent); assert.strictEqual(editor.document.getText(), testContent);
const cancelSrc = new CancellationTokenSource(); const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke }); const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) { if (completionPromise) {
assert.equal(1, 2, `Invalid completion at property value`); assert.strictEqual(1, 2, `Invalid completion at property value`);
} }
return Promise.resolve(); return Promise.resolve();
}); });
@ -285,18 +285,18 @@ nav#
const completionPromise2 = completionProvider.provideCompletionItems(editor.document, new Position(2, 14), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke }); const completionPromise2 = completionProvider.provideCompletionItems(editor.document, new Position(2, 14), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (!completionPromise1 || !completionPromise2) { if (!completionPromise1 || !completionPromise2) {
assert.equal(1, 2, `Completion promise wasnt returned`); assert.strictEqual(1, 2, `Completion promise wasnt returned`);
return Promise.resolve(); return Promise.resolve();
} }
const callBack = (completionList: CompletionList, expandedText: string) => { const callBack = (completionList: CompletionList, expandedText: string) => {
if (!completionList.items || !completionList.items.length) { if (!completionList.items || !completionList.items.length) {
assert.equal(1, 2, `Empty Completions`); assert.strictEqual(1, 2, `Empty Completions`);
return; return;
} }
const emmetCompletionItem = completionList.items[0]; const emmetCompletionItem = completionList.items[0];
assert.equal(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`); assert.strictEqual(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`);
assert.equal((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`); assert.strictEqual((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`);
}; };
return Promise.all<CompletionList>([completionPromise1, completionPromise2]).then(([result1, result2]) => { return Promise.all<CompletionList>([completionPromise1, completionPromise2]).then(([result1, result2]) => {
@ -304,7 +304,7 @@ nav#
callBack(result2, '!important'); callBack(result2, '!important');
editor.selections = [new Selection(2, 12, 2, 12), new Selection(2, 14, 2, 14)]; editor.selections = [new Selection(2, 12, 2, 12), new Selection(2, 14, 2, 14)];
return expandEmmetAbbreviation(null).then(() => { return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent.replace('#12', '#121212').replace('!', '!important')); assert.strictEqual(editor.document.getText(), testContent.replace('#12', '#121212').replace('!', '!important'));
}); });
}); });
}); });
@ -320,11 +320,11 @@ nav#
return withRandomFileEditor(testContent, 'css', (editor, _) => { return withRandomFileEditor(testContent, 'css', (editor, _) => {
editor.selection = new Selection(2, 2, 2, 2); editor.selection = new Selection(2, 2, 2, 2);
return expandEmmetAbbreviation(null).then(() => { return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), testContent); assert.strictEqual(editor.document.getText(), testContent);
const cancelSrc = new CancellationTokenSource(); const cancelSrc = new CancellationTokenSource();
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 2), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke }); const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(2, 2), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) { if (completionPromise) {
assert.equal(1, 2, `Invalid completion of hex color at property name`); assert.strictEqual(1, 2, `Invalid completion of hex color at property name`);
} }
return Promise.resolve(); return Promise.resolve();
}); });
@ -342,19 +342,19 @@ nav#
const completionPromise1 = completionProvider.provideCompletionItems(editor.document, new Position(3, 6), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke }); const completionPromise1 = completionProvider.provideCompletionItems(editor.document, new Position(3, 6), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
const completionPromise2 = completionProvider.provideCompletionItems(editor.document, new Position(5, 6), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke }); const completionPromise2 = completionProvider.provideCompletionItems(editor.document, new Position(5, 6), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (!completionPromise1 || !completionPromise2) { if (!completionPromise1 || !completionPromise2) {
assert.equal(1, 2, `Problem with expanding pos:f`); assert.strictEqual(1, 2, `Problem with expanding pos:f`);
return Promise.resolve(); return Promise.resolve();
} }
const callBack = (completionList: CompletionList) => { const callBack = (completionList: CompletionList) => {
if (!completionList.items || !completionList.items.length) { if (!completionList.items || !completionList.items.length) {
assert.equal(1, 2, `Problem with expanding pos:f`); assert.strictEqual(1, 2, `Problem with expanding pos:f`);
return; return;
} }
const emmetCompletionItem = completionList.items[0]; const emmetCompletionItem = completionList.items[0];
assert.equal(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`); assert.strictEqual(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`);
assert.equal((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`); assert.strictEqual((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`);
assert.equal(emmetCompletionItem.filterText, abbreviation, `FilterText of completion item doesnt match.`); assert.strictEqual(emmetCompletionItem.filterText, abbreviation, `FilterText of completion item doesnt match.`);
}; };
return Promise.all<CompletionList>([completionPromise1, completionPromise2]).then(([result1, result2]) => { return Promise.all<CompletionList>([completionPromise1, completionPromise2]).then(([result1, result2]) => {
@ -374,7 +374,7 @@ nav#
new Selection(14, 5, 14, 5) new Selection(14, 5, 14, 5)
]; ];
return expandEmmetAbbreviation(null).then(() => { return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), scssContents.replace(/p(\d\d)/g, 'padding: $1px;')); assert.strictEqual(editor.document.getText(), scssContents.replace(/p(\d\d)/g, 'padding: $1px;'));
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -390,16 +390,16 @@ nav#
const completionPromise3 = completionProvider.provideCompletionItems(editor.document, new Position(11, 4), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke }); const completionPromise3 = completionProvider.provideCompletionItems(editor.document, new Position(11, 4), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
const completionPromise4 = completionProvider.provideCompletionItems(editor.document, new Position(14, 5), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke }); const completionPromise4 = completionProvider.provideCompletionItems(editor.document, new Position(14, 5), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (!completionPromise1) { if (!completionPromise1) {
assert.equal(1, 2, `Problem with expanding padding abbreviations at line 3 col 4`); assert.strictEqual(1, 2, `Problem with expanding padding abbreviations at line 3 col 4`);
} }
if (!completionPromise2) { if (!completionPromise2) {
assert.equal(1, 2, `Problem with expanding padding abbreviations at line 5 col 5`); assert.strictEqual(1, 2, `Problem with expanding padding abbreviations at line 5 col 5`);
} }
if (!completionPromise3) { if (!completionPromise3) {
assert.equal(1, 2, `Problem with expanding padding abbreviations at line 11 col 4`); assert.strictEqual(1, 2, `Problem with expanding padding abbreviations at line 11 col 4`);
} }
if (!completionPromise4) { if (!completionPromise4) {
assert.equal(1, 2, `Problem with expanding padding abbreviations at line 14 col 5`); assert.strictEqual(1, 2, `Problem with expanding padding abbreviations at line 14 col 5`);
} }
if (!completionPromise1 || !completionPromise2 || !completionPromise3 || !completionPromise4) { if (!completionPromise1 || !completionPromise2 || !completionPromise3 || !completionPromise4) {
@ -408,13 +408,13 @@ nav#
const callBack = (completionList: CompletionList, abbreviation: string, expandedText: string) => { const callBack = (completionList: CompletionList, abbreviation: string, expandedText: string) => {
if (!completionList.items || !completionList.items.length) { if (!completionList.items || !completionList.items.length) {
assert.equal(1, 2, `Problem with expanding m10`); assert.strictEqual(1, 2, `Problem with expanding m10`);
return; return;
} }
const emmetCompletionItem = completionList.items[0]; const emmetCompletionItem = completionList.items[0];
assert.equal(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`); assert.strictEqual(emmetCompletionItem.label, expandedText, `Label of completion item doesnt match.`);
assert.equal((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`); assert.strictEqual((<string>emmetCompletionItem.documentation || '').replace(/\|/g, ''), expandedText, `Docs of completion item doesnt match.`);
assert.equal(emmetCompletionItem.filterText, abbreviation, `FilterText of completion item doesnt match.`); assert.strictEqual(emmetCompletionItem.filterText, abbreviation, `FilterText of completion item doesnt match.`);
}; };
return Promise.all<CompletionList>([completionPromise1, completionPromise2, completionPromise3, completionPromise4]).then(([result1, result2, result3, result4]) => { return Promise.all<CompletionList>([completionPromise1, completionPromise2, completionPromise3, completionPromise4]).then(([result1, result2, result3, result4]) => {
@ -445,7 +445,7 @@ m10
new Selection(5, 15, 5, 15) // in the value part of property value new Selection(5, 15, 5, 15) // in the value part of property value
]; ];
return expandEmmetAbbreviation(null).then(() => { return expandEmmetAbbreviation(null).then(() => {
assert.equal(editor.document.getText(), scssContentsNoExpand); assert.strictEqual(editor.document.getText(), scssContentsNoExpand);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -467,7 +467,7 @@ m10
const cancelSrc = new CancellationTokenSource(); const cancelSrc = new CancellationTokenSource();
let completionPromise = completionProvider.provideCompletionItems(editor.document, editor.selection.active, cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke }); let completionPromise = completionProvider.provideCompletionItems(editor.document, editor.selection.active, cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
if (completionPromise) { if (completionPromise) {
assert.equal(1, 2, `m10 gets expanded in invalid location (outside rule)`); assert.strictEqual(1, 2, `m10 gets expanded in invalid location (outside rule)`);
} }
editor.selection = new Selection(5, 15, 5, 15); // in the value part of property value editor.selection = new Selection(5, 15, 5, 15); // in the value part of property value
@ -475,7 +475,7 @@ m10
if (completionPromise) { if (completionPromise) {
return completionPromise.then((completionList: CompletionList | undefined) => { return completionPromise.then((completionList: CompletionList | undefined) => {
if (completionList && completionList.items && completionList.items.length > 0) { if (completionList && completionList.items && completionList.items.length > 0) {
assert.equal(1, 2, `m10 gets expanded in invalid location (n the value part of property value)`); assert.strictEqual(1, 2, `m10 gets expanded in invalid location (n the value part of property value)`);
} }
return Promise.resolve(); return Promise.resolve();
}); });
@ -484,19 +484,18 @@ m10
}); });
}); });
}); test('Skip when typing property values when there is a nested rule in the next line (SCSS)', () => {
return withRandomFileEditor(scssContents, 'scss', (editor, _) => {
test('Skip when typing property values when there is a nested rule in the next line (SCSS)', () => { editor.selection = new Selection(19, 10, 19, 10);
return withRandomFileEditor(scssContents, 'scss', (editor, _) => { return expandEmmetAbbreviation(null).then(() => {
editor.selection = new Selection(19, 10, 19, 10); assert.strictEqual(editor.document.getText(), scssContents);
return expandEmmetAbbreviation(null).then(() => { const cancelSrc = new CancellationTokenSource();
assert.equal(editor.document.getText(), scssContents); const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(19, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke });
const cancelSrc = new CancellationTokenSource(); if (completionPromise) {
const completionPromise = completionProvider.provideCompletionItems(editor.document, new Position(19, 10), cancelSrc.token, { triggerKind: CompletionTriggerKind.Invoke }); assert.strictEqual(1, 2, `Invalid completion at property value`);
if (completionPromise) { }
assert.equal(1, 2, `Invalid completion at property value`); return Promise.resolve();
} });
return Promise.resolve();
}); });
}); });
}); });

View File

@ -352,17 +352,16 @@ suite('Tests for Next/Previous Select/Edit point and Balance actions', () => {
}); });
function testSelection(selection: Selection, startChar: number, startline: number, endChar?: number, endLine?: number) { function testSelection(selection: Selection, startChar: number, startline: number, endChar?: number, endLine?: number) {
assert.strictEqual(selection.anchor.line, startline);
assert.equal(selection.anchor.line, startline); assert.strictEqual(selection.anchor.character, startChar);
assert.equal(selection.anchor.character, startChar);
if (!endLine && endLine !== 0) { if (!endLine && endLine !== 0) {
assert.equal(selection.isSingleLine, true); assert.strictEqual(selection.isSingleLine, true);
} else { } else {
assert.equal(selection.active.line, endLine); assert.strictEqual(selection.active.line, endLine);
} }
if (!endChar && endChar !== 0) { if (!endChar && endChar !== 0) {
assert.equal(selection.isEmpty, true); assert.strictEqual(selection.isEmpty, true);
} else { } else {
assert.equal(selection.active.character, endChar); assert.strictEqual(selection.active.character, endChar);
} }
} }

View File

@ -28,7 +28,7 @@ suite('Tests for Increment/Decrement Emmet Commands', () => {
return withRandomFileEditor(contents, 'txt', async (editor, doc) => { return withRandomFileEditor(contents, 'txt', async (editor, doc) => {
editor.selections = [new Selection(1, 7, 1, 10), new Selection(2, 7, 2, 10)]; editor.selections = [new Selection(1, 7, 1, 10), new Selection(2, 7, 2, 10)];
await incrementDecrement(1); await incrementDecrement(1);
assert.equal(doc.getText(), contents.replace('123', '124').replace('999', '1000')); assert.strictEqual(doc.getText(), contents.replace('123', '124').replace('999', '1000'));
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -37,7 +37,7 @@ suite('Tests for Increment/Decrement Emmet Commands', () => {
return withRandomFileEditor(contents, 'txt', async (editor, doc) => { return withRandomFileEditor(contents, 'txt', async (editor, doc) => {
editor.selections = [new Selection(1, 7, 1, 10), new Selection(2, 7, 2, 10)]; editor.selections = [new Selection(1, 7, 1, 10), new Selection(2, 7, 2, 10)];
await incrementDecrement(10); await incrementDecrement(10);
assert.equal(doc.getText(), contents.replace('123', '133').replace('999', '1009')); assert.strictEqual(doc.getText(), contents.replace('123', '133').replace('999', '1009'));
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -46,7 +46,7 @@ suite('Tests for Increment/Decrement Emmet Commands', () => {
return withRandomFileEditor(contents, 'txt', async (editor, doc) => { return withRandomFileEditor(contents, 'txt', async (editor, doc) => {
editor.selections = [new Selection(1, 7, 1, 13), new Selection(2, 7, 2, 12)]; editor.selections = [new Selection(1, 7, 1, 13), new Selection(2, 7, 2, 12)];
await incrementDecrement(0.1); await incrementDecrement(0.1);
assert.equal(doc.getText(), contents.replace('123.43', '123.53').replace('999.9', '1000')); assert.strictEqual(doc.getText(), contents.replace('123.43', '123.53').replace('999.9', '1000'));
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -55,7 +55,7 @@ suite('Tests for Increment/Decrement Emmet Commands', () => {
return withRandomFileEditor(contents, 'txt', async (editor, doc) => { return withRandomFileEditor(contents, 'txt', async (editor, doc) => {
editor.selections = [new Selection(1, 7, 1, 10), new Selection(3, 7, 3, 10)]; editor.selections = [new Selection(1, 7, 1, 10), new Selection(3, 7, 3, 10)];
await incrementDecrement(-1); await incrementDecrement(-1);
assert.equal(doc.getText(), contents.replace('123', '122').replace('100', '99')); assert.strictEqual(doc.getText(), contents.replace('123', '122').replace('100', '99'));
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -64,7 +64,7 @@ suite('Tests for Increment/Decrement Emmet Commands', () => {
return withRandomFileEditor(contents, 'txt', async (editor, doc) => { return withRandomFileEditor(contents, 'txt', async (editor, doc) => {
editor.selections = [new Selection(1, 7, 1, 10), new Selection(3, 7, 3, 10)]; editor.selections = [new Selection(1, 7, 1, 10), new Selection(3, 7, 3, 10)];
await incrementDecrement(-10); await incrementDecrement(-10);
assert.equal(doc.getText(), contents.replace('123', '113').replace('100', '90')); assert.strictEqual(doc.getText(), contents.replace('123', '113').replace('100', '90'));
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -73,8 +73,8 @@ suite('Tests for Increment/Decrement Emmet Commands', () => {
return withRandomFileEditor(contents, 'txt', async (editor, doc) => { return withRandomFileEditor(contents, 'txt', async (editor, doc) => {
editor.selections = [new Selection(1, 7, 1, 13), new Selection(3, 7, 3, 10)]; editor.selections = [new Selection(1, 7, 1, 13), new Selection(3, 7, 3, 10)];
await incrementDecrement(-0.1); await incrementDecrement(-0.1);
assert.equal(doc.getText(), contents.replace('123.43', '123.33').replace('100', '99.9')); assert.strictEqual(doc.getText(), contents.replace('123.43', '123.33').replace('100', '99.9'));
return Promise.resolve(); return Promise.resolve();
}); });
}); });
}); });

View File

@ -8,7 +8,7 @@ const testRunner = require('../../../../test/integration/electron/testrunner');
const options: any = { const options: any = {
ui: 'tdd', ui: 'tdd',
color: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'), color: true,
timeout: 60000 timeout: 60000
}; };

View File

@ -5,12 +5,13 @@
import 'mocha'; import 'mocha';
import * as assert from 'assert'; import * as assert from 'assert';
import { withRandomFileEditor } from './testUtils'; import { closeAllEditors, withRandomFileEditor } from './testUtils';
import * as vscode from 'vscode'; import * as vscode from 'vscode';
import { parsePartialStylesheet, getFlatNode } from '../util'; import { parsePartialStylesheet, getFlatNode } from '../util';
import { isValidLocationForEmmetAbbreviation } from '../abbreviationActions'; import { isValidLocationForEmmetAbbreviation } from '../abbreviationActions';
suite('Tests for partial parse of Stylesheets', () => { suite('Tests for partial parse of Stylesheets', () => {
teardown(closeAllEditors);
function isValid(doc: vscode.TextDocument, range: vscode.Range, syntax: string): boolean { function isValid(doc: vscode.TextDocument, range: vscode.Range, syntax: string): boolean {
const rootNode = parsePartialStylesheet(doc, range.end); const rootNode = parsePartialStylesheet(doc, range.end);
@ -43,10 +44,10 @@ p {
]; ];
rangesForEmmet.forEach(range => { rangesForEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'css'), true); assert.strictEqual(isValid(doc, range, 'css'), true);
}); });
rangesNotEmmet.forEach(range => { rangesNotEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'css'), false); assert.strictEqual(isValid(doc, range, 'css'), false);
}); });
return Promise.resolve(); return Promise.resolve();
@ -73,7 +74,7 @@ dn {
new vscode.Range(7, 2, 7, 4) // bg after ending of badly constructed block new vscode.Range(7, 2, 7, 4) // bg after ending of badly constructed block
]; ];
rangesNotEmmet.forEach(range => { rangesNotEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), false); assert.strictEqual(isValid(doc, range, 'scss'), false);
}); });
return Promise.resolve(); return Promise.resolve();
}); });
@ -108,10 +109,10 @@ comment */
new vscode.Range(10, 2, 10, 3) // p after ending of block new vscode.Range(10, 2, 10, 3) // p after ending of block
]; ];
rangesForEmmet.forEach(range => { rangesForEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'css'), true); assert.strictEqual(isValid(doc, range, 'css'), true);
}); });
rangesNotEmmet.forEach(range => { rangesNotEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'css'), false); assert.strictEqual(isValid(doc, range, 'css'), false);
}); });
return Promise.resolve(); return Promise.resolve();
}); });
@ -143,10 +144,10 @@ comment */
new vscode.Range(6, 3, 6, 4) // In selector new vscode.Range(6, 3, 6, 4) // In selector
]; ];
rangesForEmmet.forEach(range => { rangesForEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), true); assert.strictEqual(isValid(doc, range, 'scss'), true);
}); });
rangesNotEmmet.forEach(range => { rangesNotEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), false); assert.strictEqual(isValid(doc, range, 'scss'), false);
}); });
return Promise.resolve(); return Promise.resolve();
}); });
@ -175,10 +176,10 @@ comment */
new vscode.Range(1, 66, 1, 68) // Outside any ruleset new vscode.Range(1, 66, 1, 68) // Outside any ruleset
]; ];
rangesForEmmet.forEach(range => { rangesForEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), true); assert.strictEqual(isValid(doc, range, 'scss'), true);
}); });
rangesNotEmmet.forEach(range => { rangesNotEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), false); assert.strictEqual(isValid(doc, range, 'scss'), false);
}); });
return Promise.resolve(); return Promise.resolve();
}); });
@ -210,10 +211,10 @@ p.#{dn} {
new vscode.Range(3, 1, 3, 2), // # inside ruleset new vscode.Range(3, 1, 3, 2), // # inside ruleset
]; ];
rangesForEmmet.forEach(range => { rangesForEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), true); assert.strictEqual(isValid(doc, range, 'scss'), true);
}); });
rangesNotEmmet.forEach(range => { rangesNotEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), false); assert.strictEqual(isValid(doc, range, 'scss'), false);
}); });
return Promise.resolve(); return Promise.resolve();
}); });
@ -248,10 +249,10 @@ ment */{
new vscode.Range(6, 3, 6, 4) // In c inside block comment new vscode.Range(6, 3, 6, 4) // In c inside block comment
]; ];
rangesForEmmet.forEach(range => { rangesForEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), true); assert.strictEqual(isValid(doc, range, 'scss'), true);
}); });
rangesNotEmmet.forEach(range => { rangesNotEmmet.forEach(range => {
assert.equal(isValid(doc, range, 'scss'), false); assert.strictEqual(isValid(doc, range, 'scss'), false);
}); });
return Promise.resolve(); return Promise.resolve();
}); });

View File

@ -50,7 +50,7 @@ suite('Tests for Emmet: Reflect CSS Value command', () => {
return withRandomFileEditor(cssContents, '.css', (editor, doc) => { return withRandomFileEditor(cssContents, '.css', (editor, doc) => {
editor.selections = [new Selection(5, 10, 5, 10)]; editor.selections = [new Selection(5, 10, 5, 10)];
return reflectCssValue().then(() => { return reflectCssValue().then(() => {
assert.equal(doc.getText(), cssContents.replace(/\(50deg\)/g, '(20deg)')); assert.strictEqual(doc.getText(), cssContents.replace(/\(50deg\)/g, '(20deg)'));
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -60,7 +60,7 @@ suite('Tests for Emmet: Reflect CSS Value command', () => {
return withRandomFileEditor(cssContents, '.css', (editor, doc) => { return withRandomFileEditor(cssContents, '.css', (editor, doc) => {
editor.selections = [new Selection(5, 2, 5, 32)]; editor.selections = [new Selection(5, 2, 5, 32)];
return reflectCssValue().then(() => { return reflectCssValue().then(() => {
assert.equal(doc.getText(), cssContents.replace(/\(50deg\)/g, '(20deg)')); assert.strictEqual(doc.getText(), cssContents.replace(/\(50deg\)/g, '(20deg)'));
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -70,7 +70,7 @@ suite('Tests for Emmet: Reflect CSS Value command', () => {
return withRandomFileEditor(htmlContents, '.html', (editor, doc) => { return withRandomFileEditor(htmlContents, '.html', (editor, doc) => {
editor.selections = [new Selection(7, 20, 7, 20)]; editor.selections = [new Selection(7, 20, 7, 20)];
return reflectCssValue().then(() => { return reflectCssValue().then(() => {
assert.equal(doc.getText(), htmlContents.replace(/\(50deg\)/g, '(20deg)')); assert.strictEqual(doc.getText(), htmlContents.replace(/\(50deg\)/g, '(20deg)'));
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -80,10 +80,10 @@ suite('Tests for Emmet: Reflect CSS Value command', () => {
return withRandomFileEditor(htmlContents, '.html', (editor, doc) => { return withRandomFileEditor(htmlContents, '.html', (editor, doc) => {
editor.selections = [new Selection(7, 4, 7, 34)]; editor.selections = [new Selection(7, 4, 7, 34)];
return reflectCssValue().then(() => { return reflectCssValue().then(() => {
assert.equal(doc.getText(), htmlContents.replace(/\(50deg\)/g, '(20deg)')); assert.strictEqual(doc.getText(), htmlContents.replace(/\(50deg\)/g, '(20deg)'));
return Promise.resolve(); return Promise.resolve();
}); });
}); });
}); });
}); });

View File

@ -14,10 +14,7 @@ import { splitJoinTag } from '../splitJoinTag';
import { mergeLines } from '../mergeLines'; import { mergeLines } from '../mergeLines';
suite('Tests for Emmet actions on html tags', () => { suite('Tests for Emmet actions on html tags', () => {
teardown(() => { teardown(closeAllEditors);
// close all editors
return closeAllEditors;
});
const contents = ` const contents = `
<div class="hello"> <div class="hello">
@ -60,7 +57,7 @@ suite('Tests for Emmet actions on html tags', () => {
]; ];
return updateTag('section')!.then(() => { return updateTag('section')!.then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -85,7 +82,7 @@ suite('Tests for Emmet actions on html tags', () => {
]; ];
return updateTag('section')!.then(() => { return updateTag('section')!.then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -109,7 +106,7 @@ suite('Tests for Emmet actions on html tags', () => {
]; ];
return updateTag('section')!.then(() => { return updateTag('section')!.then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -136,7 +133,7 @@ suite('Tests for Emmet actions on html tags', () => {
]; ];
return removeTag()!.then(() => { return removeTag()!.then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -161,7 +158,7 @@ suite('Tests for Emmet actions on html tags', () => {
]; ];
return removeTag()!.then(() => { return removeTag()!.then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -185,7 +182,7 @@ suite('Tests for Emmet actions on html tags', () => {
]; ];
return removeTag()!.then(() => { return removeTag()!.then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -211,7 +208,7 @@ suite('Tests for Emmet actions on html tags', () => {
]; ];
return splitJoinTag()!.then(() => { return splitJoinTag()!.then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -235,7 +232,7 @@ suite('Tests for Emmet actions on html tags', () => {
]; ];
return splitJoinTag()!.then(() => { return splitJoinTag()!.then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -259,7 +256,7 @@ suite('Tests for Emmet actions on html tags', () => {
]; ];
return splitJoinTag()!.then(() => { return splitJoinTag()!.then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -285,7 +282,7 @@ suite('Tests for Emmet actions on html tags', () => {
]; ];
return splitJoinTag()!.then(() => { return splitJoinTag()!.then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return workspace.getConfiguration('emmet').update('syntaxProfiles', oldValueForSyntaxProfiles ? oldValueForSyntaxProfiles.globalValue : undefined, ConfigurationTarget.Global); return workspace.getConfiguration('emmet').update('syntaxProfiles', oldValueForSyntaxProfiles ? oldValueForSyntaxProfiles.globalValue : undefined, ConfigurationTarget.Global);
}); });
}); });
@ -308,10 +305,10 @@ suite('Tests for Emmet actions on html tags', () => {
matchTag(); matchTag();
editor.selections.forEach(selection => { editor.selections.forEach(selection => {
assert.equal(selection.active.line, 8); assert.strictEqual(selection.active.line, 8);
assert.equal(selection.active.character, 3); assert.strictEqual(selection.active.character, 3);
assert.equal(selection.anchor.line, 8); assert.strictEqual(selection.anchor.line, 8);
assert.equal(selection.anchor.character, 3); assert.strictEqual(selection.anchor.character, 3);
}); });
return Promise.resolve(); return Promise.resolve();
@ -334,10 +331,10 @@ suite('Tests for Emmet actions on html tags', () => {
matchTag(); matchTag();
editor.selections.forEach(selection => { editor.selections.forEach(selection => {
assert.equal(selection.active.line, 4); assert.strictEqual(selection.active.line, 4);
assert.equal(selection.active.character, 4); assert.strictEqual(selection.active.character, 4);
assert.equal(selection.anchor.line, 4); assert.strictEqual(selection.anchor.line, 4);
assert.equal(selection.anchor.character, 4); assert.strictEqual(selection.anchor.character, 4);
}); });
return Promise.resolve(); return Promise.resolve();
@ -360,7 +357,7 @@ suite('Tests for Emmet actions on html tags', () => {
]; ];
return mergeLines()!.then(() => { return mergeLines()!.then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -379,7 +376,7 @@ suite('Tests for Emmet actions on html tags', () => {
]; ];
return mergeLines()!.then(() => { return mergeLines()!.then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -394,7 +391,7 @@ suite('Tests for Emmet actions on html tags', () => {
]; ];
return mergeLines()!.then(() => { return mergeLines()!.then(() => {
assert.equal(doc.getText(), contents); assert.strictEqual(doc.getText(), contents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });

View File

@ -1 +0,0 @@
DO NOT DELETE, USED BY INTEGRATION TESTS

View File

@ -48,7 +48,6 @@ export function deleteFile(file: vscode.Uri): Thenable<boolean> {
export function closeAllEditors(): Thenable<any> { export function closeAllEditors(): Thenable<any> {
return vscode.commands.executeCommand('workbench.action.closeAllEditors'); return vscode.commands.executeCommand('workbench.action.closeAllEditors');
} }
export function withRandomFileEditor(initialContents: string, fileExtension: string = 'txt', run: (editor: vscode.TextEditor, doc: vscode.TextDocument) => Thenable<void>): Thenable<boolean> { export function withRandomFileEditor(initialContents: string, fileExtension: string = 'txt', run: (editor: vscode.TextEditor, doc: vscode.TextDocument) => Thenable<void>): Thenable<boolean> {
@ -67,4 +66,4 @@ export function withRandomFileEditor(initialContents: string, fileExtension: str
}); });
}); });
}); });
} }

View File

@ -79,7 +79,7 @@ suite('Tests for Toggle Comment action from Emmet (HTML)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -120,7 +120,7 @@ suite('Tests for Toggle Comment action from Emmet (HTML)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -158,7 +158,7 @@ suite('Tests for Toggle Comment action from Emmet (HTML)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -196,7 +196,7 @@ suite('Tests for Toggle Comment action from Emmet (HTML)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -241,7 +241,7 @@ suite('Tests for Toggle Comment action from Emmet (HTML)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
@ -272,7 +272,7 @@ suite('Tests for Toggle Comment action from Emmet (HTML)', () => {
new Selection(4, 18, 4, 18), // cursor inside the noncommented span new Selection(4, 18, 4, 18), // cursor inside the noncommented span
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -315,9 +315,9 @@ suite('Tests for Toggle Comment action from Emmet (CSS)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), contents); assert.strictEqual(doc.getText(), contents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -345,9 +345,9 @@ suite('Tests for Toggle Comment action from Emmet (CSS)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
//return toggleComment().then(() => { //return toggleComment().then(() => {
//assert.equal(doc.getText(), contents); //assert.strictEqual(doc.getText(), contents);
return Promise.resolve(); return Promise.resolve();
//}); //});
}); });
@ -376,9 +376,9 @@ suite('Tests for Toggle Comment action from Emmet (CSS)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), contents); assert.strictEqual(doc.getText(), contents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -404,9 +404,9 @@ suite('Tests for Toggle Comment action from Emmet (CSS)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), contents); assert.strictEqual(doc.getText(), contents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -432,9 +432,9 @@ suite('Tests for Toggle Comment action from Emmet (CSS)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), contents); assert.strictEqual(doc.getText(), contents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -460,9 +460,9 @@ suite('Tests for Toggle Comment action from Emmet (CSS)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), contents); assert.strictEqual(doc.getText(), contents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -488,9 +488,9 @@ suite('Tests for Toggle Comment action from Emmet (CSS)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), contents); assert.strictEqual(doc.getText(), contents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -517,9 +517,9 @@ suite('Tests for Toggle Comment action from Emmet (CSS)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), contents); assert.strictEqual(doc.getText(), contents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -568,9 +568,9 @@ suite('Tests for Toggle Comment action from Emmet in nested css (SCSS)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), contents); assert.strictEqual(doc.getText(), contents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -599,9 +599,9 @@ suite('Tests for Toggle Comment action from Emmet in nested css (SCSS)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), contents); assert.strictEqual(doc.getText(), contents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -629,9 +629,9 @@ suite('Tests for Toggle Comment action from Emmet in nested css (SCSS)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
//return toggleComment().then(() => { //return toggleComment().then(() => {
// assert.equal(doc.getText(), contents); // assert.strictEqual(doc.getText(), contents);
return Promise.resolve(); return Promise.resolve();
//}); //});
}); });
@ -659,9 +659,9 @@ suite('Tests for Toggle Comment action from Emmet in nested css (SCSS)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), contents); assert.strictEqual(doc.getText(), contents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -689,9 +689,9 @@ suite('Tests for Toggle Comment action from Emmet in nested css (SCSS)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), contents); assert.strictEqual(doc.getText(), contents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -717,9 +717,9 @@ suite('Tests for Toggle Comment action from Emmet in nested css (SCSS)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), contents); assert.strictEqual(doc.getText(), contents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -743,9 +743,9 @@ suite('Tests for Toggle Comment action from Emmet in nested css (SCSS)', () => {
]; ];
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return toggleComment().then(() => { return toggleComment().then(() => {
assert.equal(doc.getText(), contents); assert.strictEqual(doc.getText(), contents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });

View File

@ -55,7 +55,7 @@ suite('Tests for Emmet actions on html tags', () => {
]; ];
return updateImageSize()!.then(() => { return updateImageSize()!.then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -112,7 +112,7 @@ suite('Tests for Emmet actions on html tags', () => {
]; ];
return updateImageSize()!.then(() => { return updateImageSize()!.then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -141,7 +141,7 @@ suite('Tests for Emmet actions on html tags', () => {
]; ];
return updateImageSize()!.then(() => { return updateImageSize()!.then(() => {
assert.equal(doc.getText(), expectedContents); assert.strictEqual(doc.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });

View File

@ -398,12 +398,12 @@ function testWrapWithAbbreviation(selections: Selection[], abbreviation: string,
editor.selections = selections; editor.selections = selections;
const promise = wrapWithAbbreviation({ abbreviation }); const promise = wrapWithAbbreviation({ abbreviation });
if (!promise) { if (!promise) {
assert.equal(1, 2, 'Wrap with Abbreviation returned undefined.'); assert.strictEqual(1, 2, 'Wrap with Abbreviation returned undefined.');
return Promise.resolve(); return Promise.resolve();
} }
return promise.then(() => { return promise.then(() => {
assert.equal(editor.document.getText(), expectedContents); assert.strictEqual(editor.document.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });
@ -414,12 +414,12 @@ function testWrapIndividualLinesWithAbbreviation(selections: Selection[], abbrev
editor.selections = selections; editor.selections = selections;
const promise = wrapWithAbbreviation({ abbreviation }); const promise = wrapWithAbbreviation({ abbreviation });
if (!promise) { if (!promise) {
assert.equal(1, 2, 'Wrap individual lines with Abbreviation returned undefined.'); assert.strictEqual(1, 2, 'Wrap individual lines with Abbreviation returned undefined.');
return Promise.resolve(); return Promise.resolve();
} }
return promise.then(() => { return promise.then(() => {
assert.equal(editor.document.getText(), expectedContents); assert.strictEqual(editor.document.getText(), expectedContents);
return Promise.resolve(); return Promise.resolve();
}); });
}); });

View File

@ -42,17 +42,13 @@ export function updateEmmetExtensionsPath(forceRefresh: boolean = false) {
} }
if (forceRefresh || _currentExtensionsPath !== extensionsPath) { if (forceRefresh || _currentExtensionsPath !== extensionsPath) {
_currentExtensionsPath = extensionsPath; _currentExtensionsPath = extensionsPath;
if (!vscode.workspace.workspaceFolders || vscode.workspace.workspaceFolders.length === 0) { const rootPath = vscode.workspace.workspaceFolders?.length ? vscode.workspace.workspaceFolders[0].uri : undefined;
return; const fileSystem = vscode.workspace.fs;
} else { helper.updateExtensionsPath(extensionsPath, fileSystem, rootPath, _homeDir).catch(err => {
const rootPath = vscode.workspace.workspaceFolders[0].uri; if (Array.isArray(extensionsPath) && extensionsPath.length) {
const fileSystem = vscode.workspace.fs; vscode.window.showErrorMessage(err.message);
helper.updateExtensionsPath(extensionsPath, fileSystem, rootPath, _homeDir).catch(err => { }
if (Array.isArray(extensionsPath) && extensionsPath.length) { });
vscode.window.showErrorMessage(err.message);
}
});
}
} }
} }
@ -88,19 +84,19 @@ export function migrateEmmetExtensionsPath() {
* Mapping between languages that support Emmet and completion trigger characters * Mapping between languages that support Emmet and completion trigger characters
*/ */
export const LANGUAGE_MODES: { [id: string]: string[] } = { export const LANGUAGE_MODES: { [id: string]: string[] } = {
'html': ['!', '.', '}', ':', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 'html': ['!', '.', '}', ':', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'jade': ['!', '.', '}', ':', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 'jade': ['!', '.', '}', ':', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'slim': ['!', '.', '}', ':', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 'slim': ['!', '.', '}', ':', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'haml': ['!', '.', '}', ':', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 'haml': ['!', '.', '}', ':', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'xml': ['.', '}', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 'xml': ['.', '}', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'xsl': ['!', '.', '}', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 'xsl': ['!', '.', '}', '*', '$', '/', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'css': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 'css': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'scss': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 'scss': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'sass': [':', '!', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 'sass': [':', '!', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'less': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 'less': [':', '!', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'stylus': [':', '!', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 'stylus': [':', '!', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'javascriptreact': ['!', '.', '}', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], 'javascriptreact': ['!', '.', '}', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'],
'typescriptreact': ['!', '.', '}', '*', '$', ']', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] 'typescriptreact': ['!', '.', '}', '*', '$', ']', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
}; };
export function isStyleSheet(syntax: string): boolean { export function isStyleSheet(syntax: string): boolean {
@ -380,32 +376,36 @@ export const allowedMimeTypesInScriptTag = ['text/html', 'text/plain', 'text/x-t
* If position is inside a script tag of type template, then it will be parsed to find the inner HTML node as well * If position is inside a script tag of type template, then it will be parsed to find the inner HTML node as well
*/ */
export function getHtmlFlatNode(documentText: string, root: FlatNode | undefined, offset: number, includeNodeBoundary: boolean): HtmlFlatNode | undefined { export function getHtmlFlatNode(documentText: string, root: FlatNode | undefined, offset: number, includeNodeBoundary: boolean): HtmlFlatNode | undefined {
const currentNode: HtmlFlatNode | undefined = <HtmlFlatNode | undefined>getFlatNode(root, offset, includeNodeBoundary); let currentNode: HtmlFlatNode | undefined = <HtmlFlatNode | undefined>getFlatNode(root, offset, includeNodeBoundary);
if (!currentNode) { return; } if (!currentNode) { return; }
const isTemplateScript = currentNode.name === 'script' && // If the currentNode is a script one, first set up its subtree and then find HTML node.
(currentNode.attributes && if (currentNode.name === 'script' && currentNode.children.length === 0) {
currentNode.attributes.some(x => x.name.toString() === 'type' setUpScriptNodeSubtree(documentText, currentNode);
&& allowedMimeTypesInScriptTag.includes(x.value.toString()))); currentNode = <HtmlFlatNode | undefined>getFlatNode(currentNode, offset, includeNodeBoundary) ?? currentNode;
if (isTemplateScript
&& currentNode.open
&& offset > currentNode.open.end
&& (!currentNode.close || offset < currentNode.close.start)) {
// blank out the rest of the document and search for the node within
const beforePadding = ' '.repeat(currentNode.open.end);
const endToUse = currentNode.close ? currentNode.close.start : currentNode.end;
const scriptBodyText = beforePadding + documentText.substring(currentNode.open.end, endToUse);
const innerRoot: HtmlFlatNode = parse(scriptBodyText);
const scriptBodyNode = getHtmlFlatNode(scriptBodyText, innerRoot, offset, includeNodeBoundary);
if (scriptBodyNode) {
scriptBodyNode.parent = currentNode;
currentNode.children.push(scriptBodyNode);
return scriptBodyNode;
}
} }
return currentNode; return currentNode;
} }
export function setUpScriptNodeSubtree(documentText: string, scriptNode: HtmlFlatNode): void {
const isTemplateScript = scriptNode.name === 'script' &&
(scriptNode.attributes &&
scriptNode.attributes.some(x => x.name.toString() === 'type'
&& allowedMimeTypesInScriptTag.includes(x.value.toString())));
if (isTemplateScript
&& scriptNode.open) {
// blank out the rest of the document and generate the subtree.
const beforePadding = ' '.repeat(scriptNode.open.end);
const endToUse = scriptNode.close ? scriptNode.close.start : scriptNode.end;
const scriptBodyText = beforePadding + documentText.substring(scriptNode.open.end, endToUse);
const innerRoot: HtmlFlatNode = parse(scriptBodyText);
innerRoot.children.forEach(child => {
scriptNode.children.push(child);
child.parent = scriptNode;
});
}
}
export function isOffsetInsideOpenOrCloseTag(node: FlatNode, offset: number): boolean { export function isOffsetInsideOpenOrCloseTag(node: FlatNode, offset: number): boolean {
const htmlNode = node as HtmlFlatNode; const htmlNode = node as HtmlFlatNode;
if ((htmlNode.open && offset > htmlNode.open.start && offset < htmlNode.open.end) if ((htmlNode.open && offset > htmlNode.open.start && offset < htmlNode.open.end)
@ -583,7 +583,7 @@ export function getEmmetConfiguration(syntax: string) {
) { ) {
syntaxProfiles[syntax] = { syntaxProfiles[syntax] = {
...syntaxProfiles[syntax], ...syntaxProfiles[syntax],
selfClosingStyle: 'xml' selfClosingStyle: syntax === 'jsx' ? 'xhtml' : 'xml'
}; };
} }
} }
@ -657,10 +657,8 @@ export function getEmbeddedCssNodeIfAny(document: vscode.TextDocument, currentNo
const currentHtmlNode = <HtmlFlatNode>currentNode; const currentHtmlNode = <HtmlFlatNode>currentNode;
if (currentHtmlNode && currentHtmlNode.open && currentHtmlNode.close) { if (currentHtmlNode && currentHtmlNode.open && currentHtmlNode.close) {
const offset = document.offsetAt(position); const offset = document.offsetAt(position);
if (currentHtmlNode.open.end <= offset && offset <= currentHtmlNode.close.start) { if (currentHtmlNode.open.end < offset && offset <= currentHtmlNode.close.start) {
if (currentHtmlNode.name === 'style' if (currentHtmlNode.name === 'style') {
&& currentHtmlNode.open.end < offset
&& currentHtmlNode.close.start > offset) {
const buffer = ' '.repeat(currentHtmlNode.open.end) + document.getText().substring(currentHtmlNode.open.end, currentHtmlNode.close.start); const buffer = ' '.repeat(currentHtmlNode.open.end) + document.getText().substring(currentHtmlNode.open.end, currentHtmlNode.close.start);
return parseStylesheet(buffer); return parseStylesheet(buffer);
} }

Some files were not shown because too many files have changed in this diff Show More