mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 13:29:44 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
1cf826c7f6
|
@ -653,6 +653,20 @@
|
||||||
"**/vs/workbench/services/**/{common,browser}/**"
|
"**/vs/workbench/services/**/{common,browser}/**"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"target": "**/vs/workbench/contrib/notebook/common/**",
|
||||||
|
"restrictions": [
|
||||||
|
"vs/nls",
|
||||||
|
"vs/css!./**/*",
|
||||||
|
"**/vs/base/**/{common,worker}/**",
|
||||||
|
"**/vs/platform/**/common/**",
|
||||||
|
"**/vs/editor/**",
|
||||||
|
"**/vs/workbench/common/**",
|
||||||
|
"**/vs/workbench/api/common/**",
|
||||||
|
"**/vs/workbench/services/**/common/**",
|
||||||
|
"**/vs/workbench/contrib/**/common/**"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"target": "**/vs/workbench/contrib/**/common/**",
|
"target": "**/vs/workbench/contrib/**/common/**",
|
||||||
"restrictions": [
|
"restrictions": [
|
||||||
|
|
3
.github/classifier.json
vendored
3
.github/classifier.json
vendored
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://raw.githubusercontent.com/microsoft/vscode-github-triage-actions/master/classifier-deep/apply/apply-labels/deep-classifier-config.schema.json",
|
"$schema": "https://raw.githubusercontent.com/microsoft/vscode-github-triage-actions/master/classifier-deep/apply/apply-labels/deep-classifier-config.schema.json",
|
||||||
|
"vacation": ["joaomoreno"],
|
||||||
"assignees": {
|
"assignees": {
|
||||||
"JacksonKearl": {"accuracy": 0.5}
|
"JacksonKearl": {"accuracy": 0.5}
|
||||||
},
|
},
|
||||||
|
@ -133,7 +134,7 @@
|
||||||
"snippets": {"assign": ["jrieken"]},
|
"snippets": {"assign": ["jrieken"]},
|
||||||
"splitview": {"assign": ["joaomoreno"]},
|
"splitview": {"assign": ["joaomoreno"]},
|
||||||
"suggest": {"assign": ["jrieken"]},
|
"suggest": {"assign": ["jrieken"]},
|
||||||
"tasks": {"assign": ["alexr00"]},
|
"tasks": {"assign": ["alexr00"], "accuracy": 0.85},
|
||||||
"telemetry": {"assign": []},
|
"telemetry": {"assign": []},
|
||||||
"themes": {"assign": ["aeschli"]},
|
"themes": {"assign": ["aeschli"]},
|
||||||
"timeline": {"assign": ["eamodio"]},
|
"timeline": {"assign": ["eamodio"]},
|
||||||
|
|
2
.github/workflows/author-verified.yml
vendored
2
.github/workflows/author-verified.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/vscode-github-triage-actions'
|
repository: 'microsoft/vscode-github-triage-actions'
|
||||||
ref: v31
|
ref: v34
|
||||||
path: ./actions
|
path: ./actions
|
||||||
- name: Install Actions
|
- name: Install Actions
|
||||||
if: github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'author-verification-requested')
|
if: github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'author-verification-requested')
|
||||||
|
|
4
.github/workflows/codeql.yml
vendored
4
.github/workflows/codeql.yml
vendored
|
@ -1,6 +1,8 @@
|
||||||
name: "Code Scanning"
|
name: "Code Scanning"
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * 2'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
CodeQL-Build:
|
CodeQL-Build:
|
||||||
|
|
2
.github/workflows/commands.yml
vendored
2
.github/workflows/commands.yml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/vscode-github-triage-actions'
|
repository: 'microsoft/vscode-github-triage-actions'
|
||||||
path: ./actions
|
path: ./actions
|
||||||
ref: v31
|
ref: v34
|
||||||
- name: Install Actions
|
- name: Install Actions
|
||||||
run: npm install --production --prefix ./actions
|
run: npm install --production --prefix ./actions
|
||||||
- name: Run Commands
|
- name: Run Commands
|
||||||
|
|
|
@ -11,7 +11,7 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/vscode-github-triage-actions'
|
repository: 'microsoft/vscode-github-triage-actions'
|
||||||
ref: v31
|
ref: v34
|
||||||
path: ./actions
|
path: ./actions
|
||||||
- name: Install Actions
|
- name: Install Actions
|
||||||
run: npm install --production --prefix ./actions
|
run: npm install --production --prefix ./actions
|
||||||
|
|
6
.github/workflows/deep-classifier-runner.yml
vendored
6
.github/workflows/deep-classifier-runner.yml
vendored
|
@ -1,7 +1,7 @@
|
||||||
name: "Deep Classifier: Runner"
|
name: "Deep Classifier: Runner"
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: 0/30 * * * *
|
- cron: 0 * * * *
|
||||||
repository_dispatch:
|
repository_dispatch:
|
||||||
types: [trigger-deep-classifier-runner]
|
types: [trigger-deep-classifier-runner]
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/vscode-github-triage-actions'
|
repository: 'microsoft/vscode-github-triage-actions'
|
||||||
ref: v31
|
ref: v34
|
||||||
path: ./actions
|
path: ./actions
|
||||||
- name: Install Actions
|
- name: Install Actions
|
||||||
run: npm install --production --prefix ./actions
|
run: npm install --production --prefix ./actions
|
||||||
|
@ -24,7 +24,7 @@ jobs:
|
||||||
uses: ./actions/classifier-deep/apply/fetch-sources
|
uses: ./actions/classifier-deep/apply/fetch-sources
|
||||||
with:
|
with:
|
||||||
# slightly overlapping to protect against issues slipping through the cracks if a run is delayed
|
# slightly overlapping to protect against issues slipping through the cracks if a run is delayed
|
||||||
from: 40
|
from: 80
|
||||||
until: 5
|
until: 5
|
||||||
configPath: classifier
|
configPath: classifier
|
||||||
blobContainerName: vscode-issue-classifier
|
blobContainerName: vscode-issue-classifier
|
||||||
|
|
|
@ -11,7 +11,7 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/vscode-github-triage-actions'
|
repository: 'microsoft/vscode-github-triage-actions'
|
||||||
ref: v31
|
ref: v34
|
||||||
path: ./actions
|
path: ./actions
|
||||||
- name: Install Actions
|
- name: Install Actions
|
||||||
run: npm install --production --prefix ./actions
|
run: npm install --production --prefix ./actions
|
||||||
|
|
2
.github/workflows/english-please.yml
vendored
2
.github/workflows/english-please.yml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/vscode-github-triage-actions'
|
repository: 'microsoft/vscode-github-triage-actions'
|
||||||
ref: v31
|
ref: v34
|
||||||
path: ./actions
|
path: ./actions
|
||||||
- name: Install Actions
|
- name: Install Actions
|
||||||
if: contains(github.event.issue.labels.*.name, '*english-please')
|
if: contains(github.event.issue.labels.*.name, '*english-please')
|
||||||
|
|
2
.github/workflows/feature-request.yml
vendored
2
.github/workflows/feature-request.yml
vendored
|
@ -18,7 +18,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/vscode-github-triage-actions'
|
repository: 'microsoft/vscode-github-triage-actions'
|
||||||
path: ./actions
|
path: ./actions
|
||||||
ref: v31
|
ref: v34
|
||||||
- name: Install Actions
|
- name: Install Actions
|
||||||
if: github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'feature-request')
|
if: github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'feature-request')
|
||||||
run: npm install --production --prefix ./actions
|
run: npm install --production --prefix ./actions
|
||||||
|
|
2
.github/workflows/latest-release-monitor.yml
vendored
2
.github/workflows/latest-release-monitor.yml
vendored
|
@ -14,7 +14,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/vscode-github-triage-actions'
|
repository: 'microsoft/vscode-github-triage-actions'
|
||||||
path: ./actions
|
path: ./actions
|
||||||
ref: v31
|
ref: v34
|
||||||
- name: Install Actions
|
- name: Install Actions
|
||||||
run: npm install --production --prefix ./actions
|
run: npm install --production --prefix ./actions
|
||||||
- name: Install Storage Module
|
- name: Install Storage Module
|
||||||
|
|
2
.github/workflows/locker.yml
vendored
2
.github/workflows/locker.yml
vendored
|
@ -14,7 +14,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/vscode-github-triage-actions'
|
repository: 'microsoft/vscode-github-triage-actions'
|
||||||
path: ./actions
|
path: ./actions
|
||||||
ref: v31
|
ref: v34
|
||||||
- name: Install Actions
|
- name: Install Actions
|
||||||
run: npm install --production --prefix ./actions
|
run: npm install --production --prefix ./actions
|
||||||
- name: Run Locker
|
- name: Run Locker
|
||||||
|
|
5
.github/workflows/needs-more-info-closer.yml
vendored
5
.github/workflows/needs-more-info-closer.yml
vendored
|
@ -14,16 +14,17 @@ jobs:
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/vscode-github-triage-actions'
|
repository: 'microsoft/vscode-github-triage-actions'
|
||||||
path: ./actions
|
path: ./actions
|
||||||
ref: v31
|
ref: v34
|
||||||
- name: Install Actions
|
- name: Install Actions
|
||||||
run: npm install --production --prefix ./actions
|
run: npm install --production --prefix ./actions
|
||||||
- name: Run Needs More Info Closer
|
- name: Run Needs More Info Closer
|
||||||
uses: ./actions/needs-more-info-closer
|
uses: ./actions/needs-more-info-closer
|
||||||
with:
|
with:
|
||||||
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
|
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
|
||||||
|
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
|
||||||
label: needs more info
|
label: needs more info
|
||||||
closeDays: 7
|
closeDays: 7
|
||||||
additionalTeam: "cleidigh|usernamehw|gjsjohnmurray|IllusionMH"
|
additionalTeam: "cleidigh|usernamehw|gjsjohnmurray|IllusionMH"
|
||||||
closeComment: "This issue has been closed automatically because it needs more information and has not had recent activity. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!"
|
closeComment: "This issue has been closed automatically because it needs more information and has not had recent activity. See also our [issue reporting](https://aka.ms/vscodeissuereporting) guidelines.\n\nHappy Coding!"
|
||||||
pingDays: 100
|
pingDays: 80
|
||||||
pingComment: "Hey @${assignee}, this issue might need further attention.\n\n@${author}, you can help us out by closing this issue if the problem no longer exists, or adding more information."
|
pingComment: "Hey @${assignee}, this issue might need further attention.\n\n@${author}, you can help us out by closing this issue if the problem no longer exists, or adding more information."
|
||||||
|
|
2
.github/workflows/on-label.yml
vendored
2
.github/workflows/on-label.yml
vendored
|
@ -11,7 +11,7 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/vscode-github-triage-actions'
|
repository: 'microsoft/vscode-github-triage-actions'
|
||||||
ref: v31
|
ref: v34
|
||||||
path: ./actions
|
path: ./actions
|
||||||
- name: Install Actions
|
- name: Install Actions
|
||||||
run: npm install --production --prefix ./actions
|
run: npm install --production --prefix ./actions
|
||||||
|
|
2
.github/workflows/on-open.yml
vendored
2
.github/workflows/on-open.yml
vendored
|
@ -11,7 +11,7 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/vscode-github-triage-actions'
|
repository: 'microsoft/vscode-github-triage-actions'
|
||||||
ref: v31
|
ref: v34
|
||||||
path: ./actions
|
path: ./actions
|
||||||
- name: Install Actions
|
- name: Install Actions
|
||||||
run: npm install --production --prefix ./actions
|
run: npm install --production --prefix ./actions
|
||||||
|
|
|
@ -13,7 +13,7 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/vscode-github-triage-actions'
|
repository: 'microsoft/vscode-github-triage-actions'
|
||||||
ref: v31
|
ref: v34
|
||||||
path: ./actions
|
path: ./actions
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
if: github.event_name != 'issues'
|
if: github.event_name != 'issues'
|
||||||
|
|
6
.github/workflows/rich-navigation.yml
vendored
6
.github/workflows/rich-navigation.yml
vendored
|
@ -10,16 +10,10 @@ jobs:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Use Node.js
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn --frozen-lockfile
|
run: yarn --frozen-lockfile
|
||||||
env:
|
env:
|
||||||
CHILD_CONCURRENCY: 1
|
CHILD_CONCURRENCY: 1
|
||||||
- name: Install .NET Core 2.2
|
|
||||||
uses: actions/setup-dotnet@v1.5.0
|
|
||||||
with:
|
|
||||||
dotnet-version: 2.2
|
|
||||||
- uses: microsoft/RichCodeNavIndexer@v0.1
|
- uses: microsoft/RichCodeNavIndexer@v0.1
|
||||||
with:
|
with:
|
||||||
languages: typescript
|
languages: typescript
|
||||||
|
|
|
@ -14,7 +14,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
repository: 'microsoft/vscode-github-triage-actions'
|
repository: 'microsoft/vscode-github-triage-actions'
|
||||||
path: ./actions
|
path: ./actions
|
||||||
ref: v31
|
ref: v34
|
||||||
- name: Install Actions
|
- name: Install Actions
|
||||||
if: contains(github.event.issue.labels.*.name, 'testplan-item') || contains(github.event.issue.labels.*.name, 'invalid-testplan-item')
|
if: contains(github.event.issue.labels.*.name, 'testplan-item') || contains(github.event.issue.labels.*.name, 'invalid-testplan-item')
|
||||||
run: npm install --production --prefix ./actions
|
run: npm install --production --prefix ./actions
|
||||||
|
|
7
.vscode/launch.json
vendored
7
.vscode/launch.json
vendored
|
@ -226,7 +226,9 @@
|
||||||
"--no-cached-data",
|
"--no-cached-data",
|
||||||
],
|
],
|
||||||
"webRoot": "${workspaceFolder}",
|
"webRoot": "${workspaceFolder}",
|
||||||
// Settings for js-debug:
|
"cascadeTerminateToConfigurations": [
|
||||||
|
"Attach to Extension Host"
|
||||||
|
],
|
||||||
"userDataDir": false,
|
"userDataDir": false,
|
||||||
"pauseForSourceMap": false,
|
"pauseForSourceMap": false,
|
||||||
"outFiles": [
|
"outFiles": [
|
||||||
|
@ -239,7 +241,7 @@
|
||||||
"type": "node",
|
"type": "node",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"name": "VS Code (Web)",
|
"name": "VS Code (Web)",
|
||||||
"program": "${workspaceFolder}/resources/serverless/code-web.js",
|
"program": "${workspaceFolder}/resources/web/code-web.js",
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"group": "0_vscode",
|
"group": "0_vscode",
|
||||||
"order": 2
|
"order": 2
|
||||||
|
@ -436,6 +438,7 @@
|
||||||
"Attach to Extension Host",
|
"Attach to Extension Host",
|
||||||
"Attach to Shared Process",
|
"Attach to Shared Process",
|
||||||
],
|
],
|
||||||
|
"preLaunchTask": "Ensure Prelaunch Dependencies",
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"group": "0_vscode",
|
"group": "0_vscode",
|
||||||
"order": 1
|
"order": 1
|
||||||
|
|
2
.vscode/notebooks/api.github-issues
vendored
2
.vscode/notebooks/api.github-issues
vendored
|
@ -8,7 +8,7 @@
|
||||||
{
|
{
|
||||||
"kind": 2,
|
"kind": 2,
|
||||||
"language": "github-issues",
|
"language": "github-issues",
|
||||||
"value": "$repo=repo:microsoft/vscode\n$milestone=milestone:\"July 2020\"",
|
"value": "$repo=repo:microsoft/vscode\n$milestone=milestone:\"August 2020\"",
|
||||||
"editable": true
|
"editable": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
9
.vscode/notebooks/inbox.github-issues
vendored
9
.vscode/notebooks/inbox.github-issues
vendored
|
@ -8,17 +8,20 @@
|
||||||
{
|
{
|
||||||
"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
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": 1,
|
"kind": 1,
|
||||||
"language": "markdown",
|
"language": "markdown",
|
||||||
"value": "## Inbox tracking and Issue triage"
|
"value": "## Inbox tracking and Issue triage",
|
||||||
|
"editable": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"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/master/.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/master/.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
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"kind": 1,
|
"kind": 1,
|
||||||
|
|
2
.vscode/notebooks/my-work.github-issues
vendored
2
.vscode/notebooks/my-work.github-issues
vendored
|
@ -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\n\n// current milestone name\n$milestone=milestone:\"June 2020\"",
|
"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\n\n// current milestone name\n$milestone=milestone:\"August 2020\"",
|
||||||
"editable": true
|
"editable": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
10
.vscode/searches/es6.code-search
vendored
10
.vscode/searches/es6.code-search
vendored
|
@ -34,11 +34,11 @@ src/vs/base/common/arrays.ts:
|
||||||
420 */
|
420 */
|
||||||
421 export function first<T>(array: ReadonlyArray<T>, fn: (item: T) => boolean, notFoundValue: T): T;
|
421 export function first<T>(array: ReadonlyArray<T>, fn: (item: T) => boolean, notFoundValue: T): T;
|
||||||
|
|
||||||
569
|
568
|
||||||
570 /**
|
569 /**
|
||||||
571: * @deprecated ES6: use `Array.find`
|
570: * @deprecated ES6: use `Array.find`
|
||||||
572 */
|
571 */
|
||||||
573 export function find<T>(arr: ArrayLike<T>, predicate: (value: T, index: number, arr: ArrayLike<T>) => any): T | undefined {
|
572 export function find<T>(arr: ArrayLike<T>, predicate: (value: T, index: number, arr: ArrayLike<T>) => any): T | undefined {
|
||||||
|
|
||||||
src/vs/base/common/objects.ts:
|
src/vs/base/common/objects.ts:
|
||||||
115
|
115
|
||||||
|
|
2
.yarnrc
2
.yarnrc
|
@ -1,3 +1,3 @@
|
||||||
disturl "https://atom.io/download/electron"
|
disturl "https://atom.io/download/electron"
|
||||||
target "7.3.2"
|
target "9.2.1"
|
||||||
runtime "electron"
|
runtime "electron"
|
||||||
|
|
|
@ -33,7 +33,7 @@ This project incorporates components from the projects listed below. The origina
|
||||||
26. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert)
|
26. Jxck/assert version 1.0.0 (https://github.com/Jxck/assert)
|
||||||
27. language-docker (https://github.com/moby/moby)
|
27. language-docker (https://github.com/moby/moby)
|
||||||
28. language-less version 0.34.2 (https://github.com/atom/language-less)
|
28. language-less version 0.34.2 (https://github.com/atom/language-less)
|
||||||
29. language-php version 0.44.4 (https://github.com/atom/language-php)
|
29. language-php version 0.44.5 (https://github.com/atom/language-php)
|
||||||
30. language-rust version 0.4.12 (https://github.com/zargony/atom-language-rust)
|
30. language-rust version 0.4.12 (https://github.com/zargony/atom-language-rust)
|
||||||
31. MagicStack/MagicPython version 1.1.1 (https://github.com/MagicStack/MagicPython)
|
31. MagicStack/MagicPython version 1.1.1 (https://github.com/MagicStack/MagicPython)
|
||||||
32. marked version 0.6.2 (https://github.com/markedjs/marked)
|
32. marked version 0.6.2 (https://github.com/markedjs/marked)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "12.14.1"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -50,7 +50,7 @@ steps:
|
||||||
displayName: Run Unit Tests (Electron)
|
displayName: Run Unit Tests (Electron)
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
yarn test-browser --browser chromium --browser webkit --browser firefox
|
yarn test-browser --browser chromium --browser webkit --browser firefox --tfs "Browser Unit Tests"
|
||||||
displayName: Run Unit Tests (Browser)
|
displayName: Run Unit Tests (Browser)
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
|
|
|
@ -21,7 +21,7 @@ steps:
|
||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "12.14.1"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -101,7 +101,7 @@ steps:
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
yarn test-browser --build --browser chromium --browser webkit --browser firefox
|
yarn test-browser --build --browser chromium --browser webkit --browser firefox --tfs "Browser Unit Tests"
|
||||||
displayName: Run unit tests (Browser)
|
displayName: Run unit tests (Browser)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
|
@ -118,6 +118,13 @@ steps:
|
||||||
displayName: Run integration tests (Electron)
|
displayName: Run integration tests (Electron)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set -e
|
||||||
|
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin" \
|
||||||
|
./resources/server/test/test-web-integration.sh --browser webkit
|
||||||
|
displayName: Run integration tests (Browser)
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin
|
APP_ROOT=$(agent.builddirectory)/VSCode-darwin
|
||||||
|
@ -128,13 +135,6 @@ steps:
|
||||||
displayName: Run remote integration tests (Electron)
|
displayName: Run remote integration tests (Electron)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin" \
|
|
||||||
./resources/server/test/test-web-integration.sh --browser webkit
|
|
||||||
displayName: Run integration tests (Browser)
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin
|
APP_ROOT=$(agent.builddirectory)/VSCode-darwin
|
||||||
|
@ -160,6 +160,13 @@ steps:
|
||||||
continueOnError: true
|
continueOnError: true
|
||||||
condition: failed()
|
condition: failed()
|
||||||
|
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
displayName: Publish Tests Results
|
||||||
|
inputs:
|
||||||
|
testResultsFiles: '*-results.xml'
|
||||||
|
searchFolder: '$(Build.ArtifactStagingDirectory)/test-results'
|
||||||
|
condition: succeededOrFailed()
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
security create-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain
|
security create-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain
|
||||||
|
|
|
@ -8,7 +8,7 @@ pr:
|
||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "12.14.1"
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
- task: AzureKeyVault@1
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
displayName: 'Azure Key Vault: Get Secrets'
|
||||||
|
|
|
@ -11,7 +11,7 @@ pr:
|
||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "12.14.1"
|
||||||
|
|
||||||
- task: AzureKeyVault@1
|
- task: AzureKeyVault@1
|
||||||
displayName: 'Azure Key Vault: Get Secrets'
|
displayName: 'Azure Key Vault: Get Secrets'
|
||||||
|
|
|
@ -10,7 +10,7 @@ steps:
|
||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "12.14.1"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -63,7 +63,7 @@ steps:
|
||||||
displayName: Run Unit Tests (Electron)
|
displayName: Run Unit Tests (Electron)
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
DISPLAY=:10 yarn test-browser --browser chromium
|
DISPLAY=:10 yarn test-browser --browser chromium --tfs "Browser Unit Tests"
|
||||||
displayName: Run Unit Tests (Browser)
|
displayName: Run Unit Tests (Browser)
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
|
|
|
@ -21,7 +21,7 @@ steps:
|
||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "12.14.1"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
|
|
|
@ -21,7 +21,7 @@ steps:
|
||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "12.14.1"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -106,7 +106,7 @@ steps:
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
DISPLAY=:10 yarn test-browser --build --browser chromium
|
DISPLAY=:10 yarn test-browser --build --browser chromium --tfs "Browser Unit Tests"
|
||||||
displayName: Run unit tests (Browser)
|
displayName: Run unit tests (Browser)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
|
@ -123,6 +123,13 @@ steps:
|
||||||
displayName: Run integration tests (Electron)
|
displayName: Run integration tests (Electron)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
set -e
|
||||||
|
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-linux-x64" \
|
||||||
|
DISPLAY=:10 ./resources/server/test/test-web-integration.sh --browser chromium
|
||||||
|
displayName: Run integration tests (Browser)
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
APP_ROOT=$(agent.builddirectory)/VSCode-linux-x64
|
APP_ROOT=$(agent.builddirectory)/VSCode-linux-x64
|
||||||
|
@ -133,13 +140,6 @@ steps:
|
||||||
displayName: Run remote integration tests (Electron)
|
displayName: Run remote integration tests (Electron)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-linux-x64" \
|
|
||||||
DISPLAY=:10 ./resources/server/test/test-web-integration.sh --browser chromium
|
|
||||||
displayName: Run integration tests (Browser)
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@0
|
- task: PublishPipelineArtifact@0
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: crash-dump-linux
|
artifactName: crash-dump-linux
|
||||||
|
@ -148,6 +148,13 @@ steps:
|
||||||
continueOnError: true
|
continueOnError: true
|
||||||
condition: failed()
|
condition: failed()
|
||||||
|
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
displayName: Publish Tests Results
|
||||||
|
inputs:
|
||||||
|
testResultsFiles: '*-results.xml'
|
||||||
|
searchFolder: '$(Build.ArtifactStagingDirectory)/test-results'
|
||||||
|
condition: succeededOrFailed()
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set -e
|
set -e
|
||||||
yarn gulp "vscode-linux-x64-build-deb"
|
yarn gulp "vscode-linux-x64-build-deb"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "12.14.1"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
|
|
|
@ -1,157 +1,3 @@
|
||||||
resources:
|
|
||||||
containers:
|
|
||||||
- container: vscode-x64
|
|
||||||
image: vscodehub.azurecr.io/vscode-linux-build-agent:x64
|
|
||||||
endpoint: VSCodeHub
|
|
||||||
- container: snapcraft
|
|
||||||
image: snapcore/snapcraft:stable
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
- job: Compile
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
container: vscode-x64
|
|
||||||
steps:
|
|
||||||
- template: product-compile.yml
|
|
||||||
|
|
||||||
- job: Windows
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_WIN32'], 'true'))
|
|
||||||
pool:
|
|
||||||
vmImage: VS2017-Win2016
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: x64
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
|
||||||
- template: win32/product-build-win32.yml
|
|
||||||
|
|
||||||
- job: Windows32
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_WIN32_32BIT'], 'true'))
|
|
||||||
pool:
|
|
||||||
vmImage: VS2017-Win2016
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: ia32
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
|
||||||
- template: win32/product-build-win32.yml
|
|
||||||
|
|
||||||
- job: WindowsARM64
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_WIN32_ARM64'], 'true'))
|
|
||||||
pool:
|
|
||||||
vmImage: VS2017-Win2016
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: arm64
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
|
||||||
- template: win32/product-build-win32-arm64.yml
|
|
||||||
|
|
||||||
- job: Linux
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX'], 'true'))
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
container: vscode-x64
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
|
||||||
- template: linux/product-build-linux.yml
|
|
||||||
|
|
||||||
- job: LinuxSnap
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX'], 'true'))
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
container: snapcraft
|
|
||||||
dependsOn: Linux
|
|
||||||
steps:
|
|
||||||
- template: linux/snap-build-linux.yml
|
|
||||||
|
|
||||||
- job: LinuxArmhf
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX_ARMHF'], 'true'))
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: armhf
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
|
||||||
- template: linux/product-build-linux-multiarch.yml
|
|
||||||
|
|
||||||
- job: LinuxArm64
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX_ARM64'], 'true'))
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: arm64
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
|
||||||
- template: linux/product-build-linux-multiarch.yml
|
|
||||||
|
|
||||||
- job: LinuxAlpine
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_LINUX_ALPINE'], 'true'))
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: alpine
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
|
||||||
- template: linux/product-build-linux-multiarch.yml
|
|
||||||
|
|
||||||
- job: LinuxWeb
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_WEB'], 'true'))
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
variables:
|
|
||||||
VSCODE_ARCH: x64
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
|
||||||
- template: web/product-build-web.yml
|
|
||||||
|
|
||||||
- job: macOS
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), eq(variables['VSCODE_BUILD_MACOS'], 'true'))
|
|
||||||
pool:
|
|
||||||
vmImage: macOS-latest
|
|
||||||
dependsOn:
|
|
||||||
- Compile
|
|
||||||
steps:
|
|
||||||
- template: darwin/product-build-darwin.yml
|
|
||||||
|
|
||||||
- job: Release
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), or(eq(variables['VSCODE_RELEASE'], 'true'), and(or(eq(variables['VSCODE_QUALITY'], 'insider'), eq(variables['VSCODE_QUALITY'], 'exploration')), eq(variables['Build.Reason'], 'Schedule'))))
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
dependsOn:
|
|
||||||
- Windows
|
|
||||||
- Windows32
|
|
||||||
- Linux
|
|
||||||
- LinuxSnap
|
|
||||||
- LinuxArmhf
|
|
||||||
- LinuxArm64
|
|
||||||
- LinuxAlpine
|
|
||||||
- macOS
|
|
||||||
steps:
|
|
||||||
- template: release.yml
|
|
||||||
|
|
||||||
- job: Mooncake
|
|
||||||
pool:
|
|
||||||
vmImage: 'Ubuntu-16.04'
|
|
||||||
condition: and(succeededOrFailed(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
|
||||||
dependsOn:
|
|
||||||
- Windows
|
|
||||||
- Windows32
|
|
||||||
- Linux
|
|
||||||
- LinuxSnap
|
|
||||||
- LinuxArmhf
|
|
||||||
- LinuxArm64
|
|
||||||
- LinuxAlpine
|
|
||||||
- LinuxWeb
|
|
||||||
- macOS
|
|
||||||
steps:
|
|
||||||
- template: sync-mooncake.yml
|
|
||||||
|
|
||||||
trigger: none
|
trigger: none
|
||||||
pr: none
|
pr: none
|
||||||
|
|
||||||
|
@ -161,3 +7,138 @@ schedules:
|
||||||
branches:
|
branches:
|
||||||
include:
|
include:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
resources:
|
||||||
|
containers:
|
||||||
|
- container: vscode-x64
|
||||||
|
image: vscodehub.azurecr.io/vscode-linux-build-agent:x64
|
||||||
|
endpoint: VSCodeHub
|
||||||
|
- container: snapcraft
|
||||||
|
image: snapcore/snapcraft:stable
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- stage: Compile
|
||||||
|
jobs:
|
||||||
|
- job: Compile
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
container: vscode-x64
|
||||||
|
steps:
|
||||||
|
- template: product-compile.yml
|
||||||
|
|
||||||
|
- stage: Windows
|
||||||
|
dependsOn:
|
||||||
|
- Compile
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
||||||
|
pool:
|
||||||
|
vmImage: VS2017-Win2016
|
||||||
|
jobs:
|
||||||
|
- job: Windows
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32'], 'true'))
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: x64
|
||||||
|
steps:
|
||||||
|
- template: win32/product-build-win32.yml
|
||||||
|
|
||||||
|
- job: Windows32
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32_32BIT'], 'true'))
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: ia32
|
||||||
|
steps:
|
||||||
|
- template: win32/product-build-win32.yml
|
||||||
|
|
||||||
|
- job: WindowsARM64
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WIN32_ARM64'], 'true'))
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: arm64
|
||||||
|
steps:
|
||||||
|
- template: win32/product-build-win32-arm64.yml
|
||||||
|
|
||||||
|
- stage: Linux
|
||||||
|
dependsOn:
|
||||||
|
- Compile
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
jobs:
|
||||||
|
- job: Linux
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX'], 'true'))
|
||||||
|
container: vscode-x64
|
||||||
|
steps:
|
||||||
|
- template: linux/product-build-linux.yml
|
||||||
|
|
||||||
|
- job: LinuxSnap
|
||||||
|
dependsOn:
|
||||||
|
- Linux
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX'], 'true'))
|
||||||
|
container: snapcraft
|
||||||
|
steps:
|
||||||
|
- template: linux/snap-build-linux.yml
|
||||||
|
|
||||||
|
- job: LinuxArmhf
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX_ARMHF'], 'true'))
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: armhf
|
||||||
|
steps:
|
||||||
|
- template: linux/product-build-linux-multiarch.yml
|
||||||
|
|
||||||
|
- job: LinuxArm64
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX_ARM64'], 'true'))
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: arm64
|
||||||
|
steps:
|
||||||
|
- template: linux/product-build-linux-multiarch.yml
|
||||||
|
|
||||||
|
- job: LinuxAlpine
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_LINUX_ALPINE'], 'true'))
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: alpine
|
||||||
|
steps:
|
||||||
|
- template: linux/product-build-linux-multiarch.yml
|
||||||
|
|
||||||
|
- job: LinuxWeb
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_WEB'], 'true'))
|
||||||
|
variables:
|
||||||
|
VSCODE_ARCH: x64
|
||||||
|
steps:
|
||||||
|
- template: web/product-build-web.yml
|
||||||
|
|
||||||
|
- stage: macOS
|
||||||
|
dependsOn:
|
||||||
|
- Compile
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
||||||
|
pool:
|
||||||
|
vmImage: macOS-latest
|
||||||
|
jobs:
|
||||||
|
- job: macOS
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_BUILD_MACOS'], 'true'))
|
||||||
|
steps:
|
||||||
|
- template: darwin/product-build-darwin.yml
|
||||||
|
|
||||||
|
- stage: Mooncake
|
||||||
|
dependsOn:
|
||||||
|
- Windows
|
||||||
|
- Linux
|
||||||
|
- macOS
|
||||||
|
condition: and(succeededOrFailed(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'))
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
jobs:
|
||||||
|
- job: SyncMooncake
|
||||||
|
displayName: Sync Mooncake
|
||||||
|
steps:
|
||||||
|
- template: sync-mooncake.yml
|
||||||
|
|
||||||
|
- stage: Publish
|
||||||
|
dependsOn:
|
||||||
|
- Windows
|
||||||
|
- Linux
|
||||||
|
- macOS
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_COMPILE_ONLY'], 'false'), or(eq(variables['VSCODE_RELEASE'], 'true'), and(or(eq(variables['VSCODE_QUALITY'], 'insider'), eq(variables['VSCODE_QUALITY'], 'exploration')), eq(variables['Build.Reason'], 'Schedule'))))
|
||||||
|
pool:
|
||||||
|
vmImage: 'Ubuntu-16.04'
|
||||||
|
jobs:
|
||||||
|
- job: BuildService
|
||||||
|
displayName: Build Service
|
||||||
|
steps:
|
||||||
|
- template: release.yml
|
||||||
|
|
|
@ -16,7 +16,7 @@ steps:
|
||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "12.14.1"
|
||||||
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
condition: and(succeeded(), ne(variables['CacheExists-Compilation'], 'true'))
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
|
|
|
@ -9,7 +9,7 @@ pr: none
|
||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "12.14.1"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
|
|
|
@ -45,7 +45,7 @@ function repeat(str: string, times: number): string {
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertTabsToSpaces(str: string): string {
|
function convertTabsToSpaces(str: string): string {
|
||||||
return str.replace(/^\t+/gm, value => repeat(' ', value.length));
|
return str.replace(/\t/gm, value => repeat(' ', value.length));
|
||||||
}
|
}
|
||||||
|
|
||||||
function getNewFileContent(content: string, tag: string) {
|
function getNewFileContent(content: string, tag: string) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "12.14.1"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
|
|
|
@ -21,7 +21,7 @@ steps:
|
||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "12.14.1"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
steps:
|
steps:
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "12.14.1"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -57,7 +57,7 @@ steps:
|
||||||
displayName: Run Unit Tests (Electron)
|
displayName: Run Unit Tests (Electron)
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
yarn test-browser --browser chromium --browser firefox
|
yarn test-browser --browser chromium --browser firefox --tfs "Browser Unit Tests"
|
||||||
displayName: Run Unit Tests (Browser)
|
displayName: Run Unit Tests (Browser)
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
|
|
|
@ -21,7 +21,7 @@ steps:
|
||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "12.14.1"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
|
|
|
@ -21,7 +21,7 @@ steps:
|
||||||
|
|
||||||
- task: NodeTool@0
|
- task: NodeTool@0
|
||||||
inputs:
|
inputs:
|
||||||
versionSpec: "12.13.0"
|
versionSpec: "12.14.1"
|
||||||
|
|
||||||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -115,7 +115,7 @@ steps:
|
||||||
- powershell: |
|
- powershell: |
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
exec { yarn test-browser --build --browser chromium --browser firefox }
|
exec { yarn test-browser --build --browser chromium --browser firefox --tfs "Browser Unit Tests" }
|
||||||
displayName: Run unit tests (Browser)
|
displayName: Run unit tests (Browser)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
|
@ -135,18 +135,18 @@ steps:
|
||||||
- powershell: |
|
- powershell: |
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
$AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
|
exec { $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-web-win32-$(VSCODE_ARCH)"; .\resources\server\test\test-web-integration.bat --browser firefox }
|
||||||
$AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
|
displayName: Run integration tests (Browser)
|
||||||
$AppNameShort = $AppProductJson.nameShort
|
|
||||||
exec { $env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"; $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"; .\resources\server\test\test-remote-integration.bat }
|
|
||||||
displayName: Run remote integration tests (Electron)
|
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- powershell: |
|
- powershell: |
|
||||||
. build/azure-pipelines/win32/exec.ps1
|
. build/azure-pipelines/win32/exec.ps1
|
||||||
$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 }
|
$AppRoot = "$(agent.builddirectory)\VSCode-win32-$(VSCODE_ARCH)"
|
||||||
displayName: Run integration tests (Browser)
|
$AppProductJson = Get-Content -Raw -Path "$AppRoot\resources\app\product.json" | ConvertFrom-Json
|
||||||
|
$AppNameShort = $AppProductJson.nameShort
|
||||||
|
exec { $env:INTEGRATION_TEST_ELECTRON_PATH = "$AppRoot\$AppNameShort.exe"; $env:VSCODE_REMOTE_SERVER_PATH = "$(agent.builddirectory)\vscode-reh-win32-$(VSCODE_ARCH)"; .\resources\server\test\test-remote-integration.bat }
|
||||||
|
displayName: Run remote integration tests (Electron)
|
||||||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))
|
||||||
|
|
||||||
- task: PublishPipelineArtifact@0
|
- task: PublishPipelineArtifact@0
|
||||||
|
@ -157,6 +157,13 @@ steps:
|
||||||
continueOnError: true
|
continueOnError: true
|
||||||
condition: failed()
|
condition: failed()
|
||||||
|
|
||||||
|
- task: PublishTestResults@2
|
||||||
|
displayName: Publish Tests Results
|
||||||
|
inputs:
|
||||||
|
testResultsFiles: '*-results.xml'
|
||||||
|
searchFolder: '$(Build.ArtifactStagingDirectory)/test-results'
|
||||||
|
condition: succeededOrFailed()
|
||||||
|
|
||||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
||||||
inputs:
|
inputs:
|
||||||
ConnectedServiceName: 'ESRP CodeSign'
|
ConnectedServiceName: 'ESRP CodeSign'
|
||||||
|
|
|
@ -119,12 +119,12 @@ const copyrightFilter = [
|
||||||
'!resources/linux/snap/snapcraft.yaml',
|
'!resources/linux/snap/snapcraft.yaml',
|
||||||
'!resources/linux/snap/electron-launch',
|
'!resources/linux/snap/electron-launch',
|
||||||
'!resources/win32/bin/code.js',
|
'!resources/win32/bin/code.js',
|
||||||
|
'!resources/web/code-web.js',
|
||||||
'!resources/completions/**',
|
'!resources/completions/**',
|
||||||
'!extensions/markdown-language-features/media/highlight.css',
|
'!extensions/markdown-language-features/media/highlight.css',
|
||||||
'!extensions/html-language-features/server/src/modes/typescript/*',
|
'!extensions/html-language-features/server/src/modes/typescript/*',
|
||||||
'!extensions/*/server/bin/*',
|
'!extensions/*/server/bin/*',
|
||||||
'!src/vs/editor/test/node/classification/typescript-test.ts',
|
'!src/vs/editor/test/node/classification/typescript-test.ts'
|
||||||
'!resources/serverless/code-web.js'
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const jsHygieneFilter = [
|
const jsHygieneFilter = [
|
||||||
|
|
|
@ -43,6 +43,7 @@ const vscodeEntryPoints = _.flatten([
|
||||||
buildfile.entrypoint('vs/workbench/workbench.desktop.main'),
|
buildfile.entrypoint('vs/workbench/workbench.desktop.main'),
|
||||||
buildfile.base,
|
buildfile.base,
|
||||||
buildfile.workerExtensionHost,
|
buildfile.workerExtensionHost,
|
||||||
|
buildfile.workerNotebook,
|
||||||
buildfile.workbenchDesktop,
|
buildfile.workbenchDesktop,
|
||||||
buildfile.code
|
buildfile.code
|
||||||
]);
|
]);
|
||||||
|
@ -79,7 +80,7 @@ const vscodeResources = [
|
||||||
'out-build/vs/code/electron-browser/sharedProcess/sharedProcess.js',
|
'out-build/vs/code/electron-browser/sharedProcess/sharedProcess.js',
|
||||||
'out-build/vs/code/electron-sandbox/issue/issueReporter.js',
|
'out-build/vs/code/electron-sandbox/issue/issueReporter.js',
|
||||||
'out-build/vs/code/electron-sandbox/processExplorer/processExplorer.js',
|
'out-build/vs/code/electron-sandbox/processExplorer/processExplorer.js',
|
||||||
'out-build/vs/platform/auth/common/auth.css',
|
'out-build/vs/code/electron-sandbox/proxy/auth.js',
|
||||||
'!**/test/**'
|
'!**/test/**'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -224,7 +224,6 @@ function packageLocalExtensionsStream(forWeb) {
|
||||||
const extensionName = path.basename(extensionPath);
|
const extensionName = path.basename(extensionPath);
|
||||||
return { name: extensionName, path: extensionPath, manifestPath: absoluteManifestPath };
|
return { name: extensionName, path: extensionPath, manifestPath: absoluteManifestPath };
|
||||||
})
|
})
|
||||||
.filter(({ name }) => (name === 'vscode-web-playground' ? forWeb : true)) // package vscode-web-playground only for web
|
|
||||||
.filter(({ name }) => excludedExtensions.indexOf(name) === -1)
|
.filter(({ name }) => excludedExtensions.indexOf(name) === -1)
|
||||||
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
||||||
.filter(({ manifestPath }) => (forWeb ? isWebExtension(require(manifestPath)) : true)));
|
.filter(({ manifestPath }) => (forWeb ? isWebExtension(require(manifestPath)) : true)));
|
||||||
|
|
|
@ -275,7 +275,6 @@ export function packageLocalExtensionsStream(forWeb: boolean): Stream {
|
||||||
const extensionName = path.basename(extensionPath);
|
const extensionName = path.basename(extensionPath);
|
||||||
return { name: extensionName, path: extensionPath, manifestPath: absoluteManifestPath };
|
return { name: extensionName, path: extensionPath, manifestPath: absoluteManifestPath };
|
||||||
})
|
})
|
||||||
.filter(({ name }) => (name === 'vscode-web-playground' ? forWeb : true)) // package vscode-web-playground only for web
|
|
||||||
.filter(({ name }) => excludedExtensions.indexOf(name) === -1)
|
.filter(({ name }) => excludedExtensions.indexOf(name) === -1)
|
||||||
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
.filter(({ name }) => builtInExtensions.every(b => b.name !== name))
|
||||||
.filter(({ manifestPath }) => (forWeb ? isWebExtension(require(manifestPath)) : true))
|
.filter(({ manifestPath }) => (forWeb ? isWebExtension(require(manifestPath)) : true))
|
||||||
|
|
|
@ -246,10 +246,6 @@
|
||||||
"name": "vs/workbench/services/configurationResolver",
|
"name": "vs/workbench/services/configurationResolver",
|
||||||
"project": "vscode-workbench"
|
"project": "vscode-workbench"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "vs/workbench/services/crashReporter",
|
|
||||||
"project": "vscode-workbench"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "vs/workbench/services/dialogs",
|
"name": "vs/workbench/services/dialogs",
|
||||||
"project": "vscode-workbench"
|
"project": "vscode-workbench"
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
"minimist": "^1.2.3",
|
"minimist": "^1.2.3",
|
||||||
"request": "^2.85.0",
|
"request": "^2.85.0",
|
||||||
"terser": "4.3.8",
|
"terser": "4.3.8",
|
||||||
"typescript": "^4.0.0-dev.20200803",
|
"typescript": "^4.1.0-dev.20200824",
|
||||||
"vsce": "1.48.0",
|
"vsce": "1.48.0",
|
||||||
"vscode-telemetry-extractor": "^1.6.0",
|
"vscode-telemetry-extractor": "^1.6.0",
|
||||||
"xml2js": "^0.4.17"
|
"xml2js": "^0.4.17"
|
||||||
|
|
|
@ -89,7 +89,7 @@ Source: "{#ProductJsonPath}"; DestDir: "{code:GetDestDir}\resources\app"; Flags:
|
||||||
|
|
||||||
[Icons]
|
[Icons]
|
||||||
Name: "{group}\{#NameLong}"; Filename: "{app}\{#ExeBasename}.exe"; AppUserModelID: "{#AppUserId}"
|
Name: "{group}\{#NameLong}"; Filename: "{app}\{#ExeBasename}.exe"; AppUserModelID: "{#AppUserId}"
|
||||||
Name: "{commondesktop}\{#NameLong}"; Filename: "{app}\{#ExeBasename}.exe"; Tasks: desktopicon; AppUserModelID: "{#AppUserId}"
|
Name: "{autodesktop}\{#NameLong}"; Filename: "{app}\{#ExeBasename}.exe"; Tasks: desktopicon; AppUserModelID: "{#AppUserId}"
|
||||||
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#NameLong}"; Filename: "{app}\{#ExeBasename}.exe"; Tasks: quicklaunchicon; AppUserModelID: "{#AppUserId}"
|
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#NameLong}"; Filename: "{app}\{#ExeBasename}.exe"; Tasks: quicklaunchicon; AppUserModelID: "{#AppUserId}"
|
||||||
|
|
||||||
[Run]
|
[Run]
|
||||||
|
|
|
@ -2535,10 +2535,10 @@ typescript@^3.0.1:
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.3.tgz#c830f657f93f1ea846819e929092f5fe5983e977"
|
||||||
integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==
|
integrity sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==
|
||||||
|
|
||||||
typescript@^4.0.0-dev.20200803:
|
typescript@^4.1.0-dev.20200824:
|
||||||
version "4.0.0-dev.20200803"
|
version "4.1.0-dev.20200824"
|
||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.0-dev.20200803.tgz#ea8b0e9fb2ee3085598ff200c8568f04f4cbb2ba"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.0-dev.20200824.tgz#34c92d9b6e5124600658c0d4e9b8c125beaf577d"
|
||||||
integrity sha512-f/jDkFqCs0gbUd5MCUijO9u3AOMx1x1HdRDDHSidlc6uPVEkRduxjeTFhIXbGutO7ivzv+aC2sxH+1FQwsyBcg==
|
integrity sha512-hTJfocmebnMKoqRw/xs3bL61z87XXtvOUwYtM7zaCX9mAvnfdo1x1bzQlLZAsvdzRIgAHPJQYbqYHKygWkDw6g==
|
||||||
|
|
||||||
typical@^4.0.0:
|
typical@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
|
|
|
@ -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": "e4745133a1d3745f066e068b8033c6a269b59caf"
|
"commitHash": "894fb9eb56c6cbda65e3c3ae9ada6d4cb5850cc9"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"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": "78.0.3904.130"
|
"version": "83.0.4103.122"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"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": "787378879acfb212ed4ff824bf9f767a24a5cb43a"
|
"commitHash": "9622fed3fb2cffcea9efff6c8cb4cc2def99d75d"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"isOnlyProductionDependency": true,
|
"isOnlyProductionDependency": true,
|
||||||
"version": "12.8.1"
|
"version": "12.14.1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"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": "5f93e889020d279d5a9cd1ecab080ab467312447"
|
"commitHash": "03c7a54dc534ce1867d4393b9b1a6989d4a7e005"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"isOnlyProductionDependency": true,
|
"isOnlyProductionDependency": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "7.3.2"
|
"version": "9.2.1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"component": {
|
"component": {
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
"url": "vscode://schemas/keybindings"
|
"url": "vscode://schemas/keybindings"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fileMatch": "vscode://defaultsettings/defaultSettings.json",
|
"fileMatch": "vscode://defaultsettings/*/*.json",
|
||||||
"url": "vscode://schemas/settings/default"
|
"url": "vscode://schemas/settings/default"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { ExtensionContext } from 'vscode';
|
import { ExtensionContext, Uri } from 'vscode';
|
||||||
import { LanguageClientOptions } from 'vscode-languageclient';
|
import { LanguageClientOptions } from 'vscode-languageclient';
|
||||||
import { startClient, LanguageClientConstructor } from '../cssClient';
|
import { startClient, LanguageClientConstructor } from '../cssClient';
|
||||||
import { LanguageClient } from 'vscode-languageclient/browser';
|
import { LanguageClient } from 'vscode-languageclient/browser';
|
||||||
|
@ -17,9 +17,9 @@ declare const TextDecoder: {
|
||||||
|
|
||||||
// this method is called when vs code is activated
|
// this method is called when vs code is activated
|
||||||
export function activate(context: ExtensionContext) {
|
export function activate(context: ExtensionContext) {
|
||||||
const serverMain = context.asAbsolutePath('server/dist/browser/cssServerMain.js');
|
const serverMain = Uri.joinPath(context.extensionUri, 'server/dist/browser/cssServerMain.js');
|
||||||
try {
|
try {
|
||||||
const worker = new Worker(serverMain);
|
const worker = new Worker(serverMain.toString());
|
||||||
const newLanguageClient: LanguageClientConstructor = (id: string, name: string, clientOptions: LanguageClientOptions) => {
|
const newLanguageClient: LanguageClientConstructor = (id: string, name: string, clientOptions: LanguageClientOptions) => {
|
||||||
return new LanguageClient(id, name, clientOptions, worker);
|
return new LanguageClient(id, name, clientOptions, worker);
|
||||||
};
|
};
|
||||||
|
|
|
@ -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": "^4.3.1",
|
"vscode-css-languageservice": "^4.3.3",
|
||||||
"vscode-languageserver": "7.0.0-next.3",
|
"vscode-languageserver": "7.0.0-next.3",
|
||||||
"vscode-uri": "^2.1.2"
|
"vscode-uri": "^2.1.2"
|
||||||
},
|
},
|
||||||
|
|
|
@ -21,7 +21,7 @@ if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||||
reporterEnabled: 'spec, mocha-junit-reporter',
|
reporterEnabled: 'spec, mocha-junit-reporter',
|
||||||
mochaJunitReporterReporterOptions: {
|
mochaJunitReporterReporterOptions: {
|
||||||
testsuitesTitle: `${suite} ${process.platform}`,
|
testsuitesTitle: `${suite} ${process.platform}`,
|
||||||
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
|
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${process.arch}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -696,10 +696,10 @@ to-regex-range@^5.0.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
is-number "^7.0.0"
|
is-number "^7.0.0"
|
||||||
|
|
||||||
vscode-css-languageservice@^4.3.1:
|
vscode-css-languageservice@^4.3.3:
|
||||||
version "4.3.1"
|
version "4.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.3.1.tgz#a78755b28b8a0cbb1681121f0fa372860f34ef6b"
|
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.3.3.tgz#fcb8c7442ae7bb8fbe6ff1d3a514be8248bfb52f"
|
||||||
integrity sha512-Vdz2cyoTP2tLWikhFdouK8dAQ3gVhLPxsFkIscM30Quh6rd/YejTeZEYC/W+b0iKumHYebDeo1GUFbf0ptySRw==
|
integrity sha512-b2b+0oHvPmBHygDtOXX3xBvpQCa6eIQSvXnGDNSDmIC1894ZTJ2yX10vjplOO/PvV7mwhyvGPwHyY4X2HGxtKw==
|
||||||
dependencies:
|
dependencies:
|
||||||
vscode-languageserver-textdocument "^1.0.1"
|
vscode-languageserver-textdocument "^1.0.1"
|
||||||
vscode-languageserver-types "3.16.0-next.2"
|
vscode-languageserver-types "3.16.0-next.2"
|
||||||
|
|
20
extensions/debug-auto-launch/.vscode/launch.json
vendored
Normal file
20
extensions/debug-auto-launch/.vscode/launch.json
vendored
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Extension",
|
||||||
|
"type": "extensionHost",
|
||||||
|
"request": "launch",
|
||||||
|
"skipFiles": ["<node_internals>/**"],
|
||||||
|
"args": [
|
||||||
|
"--extensionDevelopmentPath=${workspaceFolder}",
|
||||||
|
],
|
||||||
|
"outFiles": [
|
||||||
|
"${workspaceFolder}/out/**/*.js",
|
||||||
|
],
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -35,6 +35,12 @@
|
||||||
],
|
],
|
||||||
"description": "%debug.node.autoAttach.description%",
|
"description": "%debug.node.autoAttach.description%",
|
||||||
"default": "disabled"
|
"default": "disabled"
|
||||||
|
},
|
||||||
|
"debug.javascript.usePreviewAutoAttach": {
|
||||||
|
"scope": "window",
|
||||||
|
"type": "boolean",
|
||||||
|
"default": true,
|
||||||
|
"description": "%debug.javascript.usePreviewAutoAttach%"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
"description": "Helper for auto-attach feature when node-debug extensions are not active.",
|
"description": "Helper for auto-attach feature when node-debug extensions are not active.",
|
||||||
|
|
||||||
"debug.node.autoAttach.description": "Automatically attach node debugger when node.js was launched in debug mode from integrated terminal.",
|
"debug.node.autoAttach.description": "Automatically attach node debugger when node.js was launched in debug mode from integrated terminal.",
|
||||||
|
"debug.javascript.usePreviewAutoAttach": "Whether to use the preview debugger's version of auto attach.",
|
||||||
"debug.node.autoAttach.disabled.description": "Auto attach is disabled and not shown in status bar.",
|
"debug.node.autoAttach.disabled.description": "Auto attach is disabled and not shown in status bar.",
|
||||||
"debug.node.autoAttach.on.description": "Auto attach is active.",
|
"debug.node.autoAttach.on.description": "Auto attach is active.",
|
||||||
"debug.node.autoAttach.off.description": "Auto attach is inactive.",
|
"debug.node.autoAttach.off.description": "Auto attach is inactive.",
|
||||||
|
|
||||||
"toggle.auto.attach": "Toggle Auto Attach"
|
"toggle.auto.attach": "Toggle Auto Attach"
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,11 +13,11 @@ const OFF_TEXT = localize('status.text.auto.attach.off', 'Auto Attach: Off');
|
||||||
|
|
||||||
const TOGGLE_COMMAND = 'extension.node-debug.toggleAutoAttach';
|
const TOGGLE_COMMAND = 'extension.node-debug.toggleAutoAttach';
|
||||||
const JS_DEBUG_SETTINGS = 'debug.javascript';
|
const JS_DEBUG_SETTINGS = 'debug.javascript';
|
||||||
const JS_DEBUG_USEPREVIEW = 'usePreview';
|
const JS_DEBUG_USEPREVIEWAA = 'usePreviewAutoAttach';
|
||||||
const JS_DEBUG_IPC_KEY = 'jsDebugIpcState';
|
const JS_DEBUG_IPC_KEY = 'jsDebugIpcState';
|
||||||
const NODE_DEBUG_SETTINGS = 'debug.node';
|
const NODE_DEBUG_SETTINGS = 'debug.node';
|
||||||
const NODE_DEBUG_USEV3 = 'useV3';
|
|
||||||
const AUTO_ATTACH_SETTING = 'autoAttach';
|
const AUTO_ATTACH_SETTING = 'autoAttach';
|
||||||
|
const LAST_STATE_STORAGE_KEY = 'lastState';
|
||||||
|
|
||||||
type AUTO_ATTACH_VALUES = 'disabled' | 'on' | 'off';
|
type AUTO_ATTACH_VALUES = 'disabled' | 'on' | 'off';
|
||||||
|
|
||||||
|
@ -29,33 +29,36 @@ const enum State {
|
||||||
}
|
}
|
||||||
|
|
||||||
// on activation this feature is always disabled...
|
// on activation this feature is always disabled...
|
||||||
let currentState = Promise.resolve({ state: State.Disabled, transitionData: null as unknown });
|
let currentState: Promise<{ context: vscode.ExtensionContext, state: State; transitionData: unknown }>;
|
||||||
let statusItem: vscode.StatusBarItem | undefined; // and there is no status bar item
|
let statusItem: vscode.StatusBarItem | undefined; // and there is no status bar item
|
||||||
|
|
||||||
export function activate(context: vscode.ExtensionContext): void {
|
export function activate(context: vscode.ExtensionContext): void {
|
||||||
|
const previousState = context.workspaceState.get<State>(LAST_STATE_STORAGE_KEY, State.Disabled);
|
||||||
|
currentState = Promise.resolve(transitions[previousState].onActivate?.(context, readCurrentState()))
|
||||||
|
.then(() => ({ context, state: State.Disabled, transitionData: null }));
|
||||||
|
|
||||||
context.subscriptions.push(vscode.commands.registerCommand(TOGGLE_COMMAND, toggleAutoAttachSetting));
|
context.subscriptions.push(vscode.commands.registerCommand(TOGGLE_COMMAND, toggleAutoAttachSetting));
|
||||||
|
|
||||||
// settings that can result in the "state" being changed--on/off/disable or useV3 toggles
|
// settings that can result in the "state" being changed--on/off/disable or useV3 toggles
|
||||||
const effectualConfigurationSettings = [
|
const effectualConfigurationSettings = [
|
||||||
`${NODE_DEBUG_SETTINGS}.${AUTO_ATTACH_SETTING}`,
|
`${NODE_DEBUG_SETTINGS}.${AUTO_ATTACH_SETTING}`,
|
||||||
`${NODE_DEBUG_SETTINGS}.${NODE_DEBUG_USEV3}`,
|
`${JS_DEBUG_SETTINGS}.${JS_DEBUG_USEPREVIEWAA}`,
|
||||||
`${JS_DEBUG_SETTINGS}.${JS_DEBUG_USEPREVIEW}`,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
context.subscriptions.push(
|
context.subscriptions.push(
|
||||||
vscode.workspace.onDidChangeConfiguration((e) => {
|
vscode.workspace.onDidChangeConfiguration((e) => {
|
||||||
if (effectualConfigurationSettings.some(setting => e.affectsConfiguration(setting))) {
|
if (effectualConfigurationSettings.some(setting => e.affectsConfiguration(setting))) {
|
||||||
updateAutoAttach(context);
|
updateAutoAttach();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
updateAutoAttach(context);
|
updateAutoAttach();
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deactivate(): Promise<void> {
|
export async function deactivate(): Promise<void> {
|
||||||
const { state, transitionData } = await currentState;
|
const { context, state, transitionData } = await currentState;
|
||||||
await transitions[state].exit?.(transitionData);
|
await transitions[state].exit?.(context, transitionData);
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleAutoAttachSetting() {
|
function toggleAutoAttachSetting() {
|
||||||
|
@ -88,6 +91,11 @@ function toggleAutoAttachSetting() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function autoAttachWithJsDebug() {
|
||||||
|
const jsDebugConfig = vscode.workspace.getConfiguration(JS_DEBUG_SETTINGS);
|
||||||
|
return jsDebugConfig.get(JS_DEBUG_USEPREVIEWAA, true);
|
||||||
|
}
|
||||||
|
|
||||||
function readCurrentState(): State {
|
function readCurrentState(): State {
|
||||||
const nodeConfig = vscode.workspace.getConfiguration(NODE_DEBUG_SETTINGS);
|
const nodeConfig = vscode.workspace.getConfiguration(NODE_DEBUG_SETTINGS);
|
||||||
const autoAttachState = <AUTO_ATTACH_VALUES>nodeConfig.get(AUTO_ATTACH_SETTING);
|
const autoAttachState = <AUTO_ATTACH_VALUES>nodeConfig.get(AUTO_ATTACH_SETTING);
|
||||||
|
@ -95,11 +103,7 @@ function readCurrentState(): State {
|
||||||
case 'off':
|
case 'off':
|
||||||
return State.Off;
|
return State.Off;
|
||||||
case 'on':
|
case 'on':
|
||||||
// todo: reenable after resolving https://github.com/microsoft/vscode/issues/102057
|
return autoAttachWithJsDebug() ? State.OnWithJsDebug : State.OnWithNodeDebug;
|
||||||
// const jsDebugConfig = vscode.workspace.getConfiguration(JS_DEBUG_SETTINGS);
|
|
||||||
// const useV3 = nodeConfig.get(NODE_DEBUG_USEV3) || jsDebugConfig.get(JS_DEBUG_USEPREVIEW);
|
|
||||||
// return useV3 ? State.OnWithJsDebug : State.OnWithNodeDebug;
|
|
||||||
return State.OnWithNodeDebug;
|
|
||||||
case 'disabled':
|
case 'disabled':
|
||||||
default:
|
default:
|
||||||
return State.Disabled;
|
return State.Disabled;
|
||||||
|
@ -126,37 +130,44 @@ function ensureStatusBarExists(context: vscode.ExtensionContext) {
|
||||||
return statusItem;
|
return statusItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function clearJsDebugAttachState(context: vscode.ExtensionContext) {
|
||||||
|
await context.workspaceState.update(JS_DEBUG_IPC_KEY, undefined);
|
||||||
|
await vscode.commands.executeCommand('extension.js-debug.clearAutoAttachVariables');
|
||||||
|
}
|
||||||
|
|
||||||
interface CachedIpcState {
|
interface CachedIpcState {
|
||||||
ipcAddress: string;
|
ipcAddress: string;
|
||||||
jsDebugPath: string;
|
jsDebugPath: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface StateTransition<StateData> {
|
interface StateTransition<StateData> {
|
||||||
exit?(stateData: StateData): Promise<void> | void;
|
onActivate?(context: vscode.ExtensionContext, currentState: State): Promise<void>;
|
||||||
|
exit?(context: vscode.ExtensionContext, stateData: StateData): Promise<void> | void;
|
||||||
enter?(context: vscode.ExtensionContext): Promise<StateData> | StateData;
|
enter?(context: vscode.ExtensionContext): Promise<StateData> | StateData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const makeTransition = <T>(tsn: StateTransition<T>) => tsn; // helper to apply generic type
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Map of logic that happens when auto attach states are entered and exited.
|
* Map of logic that happens when auto attach states are entered and exited.
|
||||||
* All state transitions are queued and run in order; promises are awaited.
|
* All state transitions are queued and run in order; promises are awaited.
|
||||||
*/
|
*/
|
||||||
const transitions: { [S in State]: StateTransition<unknown> } = {
|
const transitions: { [S in State]: StateTransition<unknown> } = {
|
||||||
[State.Disabled]: {
|
[State.Disabled]: makeTransition({
|
||||||
async enter(context) {
|
async enter(context) {
|
||||||
statusItem?.hide();
|
statusItem?.hide();
|
||||||
await context.workspaceState.update(JS_DEBUG_IPC_KEY, undefined);
|
await clearJsDebugAttachState(context);
|
||||||
await vscode.commands.executeCommand('extension.js-debug.clearAutoAttachVariables');
|
|
||||||
},
|
},
|
||||||
},
|
}),
|
||||||
|
|
||||||
[State.Off]: {
|
[State.Off]: makeTransition({
|
||||||
enter(context) {
|
enter(context) {
|
||||||
const statusItem = ensureStatusBarExists(context);
|
const statusItem = ensureStatusBarExists(context);
|
||||||
statusItem.text = OFF_TEXT;
|
statusItem.text = OFF_TEXT;
|
||||||
},
|
},
|
||||||
},
|
}),
|
||||||
|
|
||||||
[State.OnWithNodeDebug]: {
|
[State.OnWithNodeDebug]: makeTransition({
|
||||||
async enter(context) {
|
async enter(context) {
|
||||||
const statusItem = ensureStatusBarExists(context);
|
const statusItem = ensureStatusBarExists(context);
|
||||||
const vscode_pid = process.env['VSCODE_PID'];
|
const vscode_pid = process.env['VSCODE_PID'];
|
||||||
|
@ -168,21 +179,37 @@ const transitions: { [S in State]: StateTransition<unknown> } = {
|
||||||
async exit() {
|
async exit() {
|
||||||
await vscode.commands.executeCommand('extension.node-debug.stopAutoAttach');
|
await vscode.commands.executeCommand('extension.node-debug.stopAutoAttach');
|
||||||
},
|
},
|
||||||
},
|
}),
|
||||||
|
|
||||||
[State.OnWithJsDebug]: {
|
[State.OnWithJsDebug]: makeTransition<Server | null>({
|
||||||
async enter(context) {
|
async enter(context) {
|
||||||
const ipcAddress = await getIpcAddress(context);
|
const ipcAddress = await getIpcAddress(context);
|
||||||
const server = await new Promise((resolve, reject) => {
|
if (!ipcAddress) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const server = await new Promise<Server>((resolve, reject) => {
|
||||||
const s = createServer((socket) => {
|
const s = createServer((socket) => {
|
||||||
let data: Buffer[] = [];
|
let data: Buffer[] = [];
|
||||||
socket.on('data', (chunk) => data.push(chunk));
|
socket.on('data', async (chunk) => {
|
||||||
socket.on('end', () =>
|
if (chunk[chunk.length - 1] !== 0) { // terminated with NUL byte
|
||||||
vscode.commands.executeCommand(
|
data.push(chunk);
|
||||||
'extension.js-debug.autoAttachToProcess',
|
return;
|
||||||
JSON.parse(Buffer.concat(data).toString())
|
}
|
||||||
)
|
|
||||||
);
|
data.push(chunk.slice(0, -1));
|
||||||
|
|
||||||
|
try {
|
||||||
|
await vscode.commands.executeCommand(
|
||||||
|
'extension.js-debug.autoAttachToProcess',
|
||||||
|
JSON.parse(Buffer.concat(data).toString())
|
||||||
|
);
|
||||||
|
socket.write(Buffer.from([0]));
|
||||||
|
} catch (err) {
|
||||||
|
socket.write(Buffer.from([1]));
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
|
});
|
||||||
})
|
})
|
||||||
.on('error', reject)
|
.on('error', reject)
|
||||||
.listen(ipcAddress, () => resolve(s));
|
.listen(ipcAddress, () => resolve(s));
|
||||||
|
@ -190,33 +217,47 @@ const transitions: { [S in State]: StateTransition<unknown> } = {
|
||||||
|
|
||||||
const statusItem = ensureStatusBarExists(context);
|
const statusItem = ensureStatusBarExists(context);
|
||||||
statusItem.text = ON_TEXT;
|
statusItem.text = ON_TEXT;
|
||||||
return server;
|
return server || null;
|
||||||
},
|
},
|
||||||
|
|
||||||
async exit(server: Server) {
|
async exit(context, server) {
|
||||||
// we don't need to clear the environment variables--the bootloader will
|
// we don't need to clear the environment variables--the bootloader will
|
||||||
// no-op if the debug server is closed. This prevents having to reload
|
// no-op if the debug server is closed. This prevents having to reload
|
||||||
// terminals if users want to turn it back on.
|
// terminals if users want to turn it back on.
|
||||||
await new Promise((resolve) => server.close(resolve));
|
if (server) {
|
||||||
|
await new Promise((resolve) => server.close(resolve));
|
||||||
|
}
|
||||||
|
|
||||||
|
// but if they toggled auto attach use js-debug off, go ahead and do so
|
||||||
|
if (!autoAttachWithJsDebug()) {
|
||||||
|
await clearJsDebugAttachState(context);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
|
||||||
|
async onActivate(context, currentState) {
|
||||||
|
if (currentState === State.OnWithNodeDebug || currentState === State.Disabled) {
|
||||||
|
await clearJsDebugAttachState(context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the auto attach feature based on the user or workspace setting
|
* Updates the auto attach feature based on the user or workspace setting
|
||||||
*/
|
*/
|
||||||
function updateAutoAttach(context: vscode.ExtensionContext) {
|
function updateAutoAttach() {
|
||||||
const newState = readCurrentState();
|
const newState = readCurrentState();
|
||||||
|
|
||||||
currentState = currentState.then(async ({ state: oldState, transitionData }) => {
|
currentState = currentState.then(async ({ context, state: oldState, transitionData }) => {
|
||||||
if (newState === oldState) {
|
if (newState === oldState) {
|
||||||
return { state: oldState, transitionData };
|
return { context, state: oldState, transitionData };
|
||||||
}
|
}
|
||||||
|
|
||||||
await transitions[oldState].exit?.(transitionData);
|
await transitions[oldState].exit?.(context, transitionData);
|
||||||
const newData = await transitions[newState].enter?.(context);
|
const newData = await transitions[newState].enter?.(context);
|
||||||
|
await context.workspaceState.update(LAST_STATE_STORAGE_KEY, newState);
|
||||||
|
|
||||||
return { state: newState, transitionData: newData };
|
return { context, state: newState, transitionData: newData };
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,8 +285,11 @@ async function getIpcAddress(context: vscode.ExtensionContext) {
|
||||||
const result = await vscode.commands.executeCommand<{ ipcAddress: string; }>(
|
const result = await vscode.commands.executeCommand<{ ipcAddress: string; }>(
|
||||||
'extension.js-debug.setAutoAttachVariables'
|
'extension.js-debug.setAutoAttachVariables'
|
||||||
);
|
);
|
||||||
|
if (!result) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const ipcAddress = result!.ipcAddress;
|
const ipcAddress = result.ipcAddress;
|
||||||
await context.workspaceState.update(JS_DEBUG_IPC_KEY, { ipcAddress, jsDebugPath });
|
await context.workspaceState.update(JS_DEBUG_IPC_KEY, { ipcAddress, jsDebugPath });
|
||||||
return ipcAddress;
|
return ipcAddress;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
"extensions": [ ".dockerfile", ".containerfile" ],
|
"extensions": [ ".dockerfile", ".containerfile" ],
|
||||||
"filenames": [ "Dockerfile", "Containerfile" ],
|
"filenames": [ "Dockerfile", "Containerfile" ],
|
||||||
"filenamePatterns": [ "Dockerfile.*", "Containerfile.*" ],
|
"filenamePatterns": [ "Dockerfile.*", "Containerfile.*" ],
|
||||||
"aliases": [ "Dockerfile", "Containerfile" ],
|
"aliases": [ "Docker", "Dockerfile", "Containerfile" ],
|
||||||
"configuration": "./language-configuration.json"
|
"configuration": "./language-configuration.json"
|
||||||
}],
|
}],
|
||||||
"grammars": [{
|
"grammars": [{
|
||||||
|
|
|
@ -21,6 +21,6 @@ module.exports = withDefaults({
|
||||||
filename: 'emmetNodeMain.js'
|
filename: 'emmetNodeMain.js'
|
||||||
},
|
},
|
||||||
externals: {
|
externals: {
|
||||||
'vscode-emmet-helper2': 'commonjs vscode-emmet-helper2',
|
'vscode-emmet-helper': 'commonjs vscode-emmet-helper',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -422,7 +422,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"watch": "gulp watch-extension:emmet",
|
"watch": "gulp watch-extension:emmet",
|
||||||
"compile": "gulp compile-extension:emmet",
|
"compile": "gulp compile-extension:emmet",
|
||||||
"deps": "yarn add vscode-emmet-helper2"
|
"deps": "yarn add vscode-emmet-helper"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^12.11.7",
|
"@types/node": "^12.11.7",
|
||||||
|
@ -435,7 +435,7 @@
|
||||||
"@emmetio/html-matcher": "^0.3.3",
|
"@emmetio/html-matcher": "^0.3.3",
|
||||||
"@emmetio/math-expression": "^0.1.1",
|
"@emmetio/math-expression": "^0.1.1",
|
||||||
"image-size": "^0.5.2",
|
"image-size": "^0.5.2",
|
||||||
"vscode-emmet-helper2": "^2.0.0-next.0",
|
"vscode-emmet-helper": "^2.0.0",
|
||||||
"vscode-html-languageservice": "^3.0.3"
|
"vscode-html-languageservice": "^3.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -606,6 +606,25 @@ function expandAbbreviationInRange(editor: vscode.TextEditor, expandAbbrList: Ex
|
||||||
return Promise.resolve(false);
|
return Promise.resolve(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Walks the tree rooted at root and apply function fn on each node.
|
||||||
|
* if fn return false at any node, the further processing of tree is stopped.
|
||||||
|
*/
|
||||||
|
function walk(root: any, fn: ((node: any) => boolean)): boolean {
|
||||||
|
let ctx = root;
|
||||||
|
while (ctx) {
|
||||||
|
|
||||||
|
let next = ctx.next;
|
||||||
|
if (fn(ctx) === false || walk(ctx.firstChild, fn) === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx = next;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expands abbreviation as detailed in given input.
|
* Expands abbreviation as detailed in given input.
|
||||||
*/
|
*/
|
||||||
|
@ -648,6 +667,18 @@ function expandAbbr(input: ExpandAbbreviationInput): string | undefined {
|
||||||
wrappingNode.value = '\n\t' + wrappingNode.value + '\n';
|
wrappingNode.value = '\n\t' + wrappingNode.value + '\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Below fixes https://github.com/microsoft/vscode/issues/78219
|
||||||
|
// walk the tree and remove tags for empty values
|
||||||
|
walk(parsedAbbr, node => {
|
||||||
|
if (node.name !== null && node.value === '' && !node.isSelfClosing && node.children.length === 0) {
|
||||||
|
node.name = '';
|
||||||
|
node.value = '\n';
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
expandedText = helper.expandAbbreviation(parsedAbbr, expandOptions);
|
expandedText = helper.expandAbbreviation(parsedAbbr, expandOptions);
|
||||||
// All $anyword would have been escaped by the emmet helper.
|
// All $anyword would have been escaped by the emmet helper.
|
||||||
// Remove the escaping backslash from $TM_SELECTED_TEXT so that VS Code Snippet controller can treat it as a variable
|
// Remove the escaping backslash from $TM_SELECTED_TEXT so that VS Code Snippet controller can treat it as a variable
|
||||||
|
|
|
@ -6,21 +6,31 @@
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const testRunner = require('vscode/lib/testrunner');
|
const testRunner = require('vscode/lib/testrunner');
|
||||||
|
|
||||||
const suite = 'Integration Emmet Tests';
|
|
||||||
|
|
||||||
const options: any = {
|
const options: any = {
|
||||||
ui: 'tdd',
|
ui: 'tdd',
|
||||||
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
|
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
|
||||||
timeout: 60000
|
timeout: 60000
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// These integration tests is being run in multiple environments (electron, web, remote)
|
||||||
|
// so we need to set the suite name based on the environment as the suite name is used
|
||||||
|
// for the test results file name
|
||||||
|
let suite = '';
|
||||||
|
if (process.env.VSCODE_BROWSER) {
|
||||||
|
suite = `${process.env.VSCODE_BROWSER} Browser Integration Emmet Tests`;
|
||||||
|
} else if (process.env.REMOTE_VSCODE) {
|
||||||
|
suite = 'Remote Integration Emmet Tests';
|
||||||
|
} else {
|
||||||
|
suite = 'Integration Emmet Tests';
|
||||||
|
}
|
||||||
|
|
||||||
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||||
options.reporter = 'mocha-multi-reporters';
|
options.reporter = 'mocha-multi-reporters';
|
||||||
options.reporterOptions = {
|
options.reporterOptions = {
|
||||||
reporterEnabled: 'spec, mocha-junit-reporter',
|
reporterEnabled: 'spec, mocha-junit-reporter',
|
||||||
mochaJunitReporterReporterOptions: {
|
mochaJunitReporterReporterOptions: {
|
||||||
testsuitesTitle: `${suite} ${process.platform}`,
|
testsuitesTitle: `${suite} ${process.platform}`,
|
||||||
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
|
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${process.arch}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ import parse from '@emmetio/html-matcher';
|
||||||
import parseStylesheet from '@emmetio/css-parser';
|
import parseStylesheet from '@emmetio/css-parser';
|
||||||
import { Node, HtmlNode, CssToken, Property, Rule, Stylesheet } from 'EmmetNode';
|
import { Node, HtmlNode, CssToken, Property, Rule, Stylesheet } from 'EmmetNode';
|
||||||
import { DocumentStreamReader } from './bufferStream';
|
import { DocumentStreamReader } from './bufferStream';
|
||||||
import * as EmmetHelper from 'vscode-emmet-helper2';
|
import * as EmmetHelper from 'vscode-emmet-helper';
|
||||||
import { TextDocument as LSTextDocument } from 'vscode-html-languageservice';
|
import { TextDocument as LSTextDocument } from 'vscode-html-languageservice';
|
||||||
|
|
||||||
let _emmetHelper: typeof EmmetHelper;
|
let _emmetHelper: typeof EmmetHelper;
|
||||||
|
@ -26,7 +26,7 @@ export function getEmmetHelper() {
|
||||||
// Lazy load vscode-emmet-helper instead of importing it
|
// Lazy load vscode-emmet-helper instead of importing it
|
||||||
// directly to reduce the start-up time of the extension
|
// directly to reduce the start-up time of the extension
|
||||||
if (!_emmetHelper) {
|
if (!_emmetHelper) {
|
||||||
_emmetHelper = require('vscode-emmet-helper2');
|
_emmetHelper = require('vscode-emmet-helper');
|
||||||
}
|
}
|
||||||
updateEmmetExtensionsPath();
|
updateEmmetExtensionsPath();
|
||||||
return _emmetHelper;
|
return _emmetHelper;
|
||||||
|
|
|
@ -2469,10 +2469,10 @@ vinyl@~2.0.1:
|
||||||
remove-trailing-separator "^1.0.1"
|
remove-trailing-separator "^1.0.1"
|
||||||
replace-ext "^1.0.0"
|
replace-ext "^1.0.0"
|
||||||
|
|
||||||
vscode-emmet-helper2@^2.0.0-next.0:
|
vscode-emmet-helper@^2.0.0:
|
||||||
version "2.0.0-next.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-emmet-helper2/-/vscode-emmet-helper2-2.0.0-next.0.tgz#86eb4c2e581a577e7eb56a51f662e72fb1c63b47"
|
resolved "https://registry.yarnpkg.com/vscode-emmet-helper/-/vscode-emmet-helper-2.0.0.tgz#0057ec2d4af8ac83b1f7937383714ffdc56fcc07"
|
||||||
integrity sha512-ccm6Fb5dkbdEDNLIAebWwVcb8X3AXZDsACLi4KYdCxyFSMV+pOoNokBf4rsu+rSYWNe+fMqxjXZs9z0G2CxPGg==
|
integrity sha512-ytR+Ajxs6zeYI0b4bPsl+nPU8xm852piJUtIwO1ajp1Pw7lwn3VeR+f4ynmxOl9IjfOdF2kW9T/qIkeFbKLwYw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@emmetio/extract-abbreviation" "^0.2.0"
|
"@emmetio/extract-abbreviation" "^0.2.0"
|
||||||
jsonc-parser "^2.3.0"
|
jsonc-parser "^2.3.0"
|
||||||
|
|
|
@ -754,13 +754,23 @@
|
||||||
"when": "scmProvider == git"
|
"when": "scmProvider == git"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "git.checkout",
|
"command": "git.pull",
|
||||||
"group": "1_header",
|
"group": "1_header@1",
|
||||||
|
"when": "scmProvider == git"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "git.push",
|
||||||
|
"group": "1_header@2",
|
||||||
"when": "scmProvider == git"
|
"when": "scmProvider == git"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "git.clone",
|
"command": "git.clone",
|
||||||
"group": "1_header",
|
"group": "1_header@3",
|
||||||
|
"when": "scmProvider == git"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "git.checkout",
|
||||||
|
"group": "1_header@4",
|
||||||
"when": "scmProvider == git"
|
"when": "scmProvider == git"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -1915,7 +1925,11 @@
|
||||||
"[git-commit]": {
|
"[git-commit]": {
|
||||||
"editor.rulers": [
|
"editor.rulers": [
|
||||||
72
|
72
|
||||||
]
|
],
|
||||||
|
"workbench.editor.restoreViewState": false
|
||||||
|
},
|
||||||
|
"[git-rebase]": {
|
||||||
|
"workbench.editor.restoreViewState": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"viewsWelcome": [
|
"viewsWelcome": [
|
||||||
|
|
|
@ -107,7 +107,7 @@
|
||||||
"config.smartCommitChanges.all": "Automatically stage all changes.",
|
"config.smartCommitChanges.all": "Automatically stage all changes.",
|
||||||
"config.smartCommitChanges.tracked": "Automatically stage tracked changes only.",
|
"config.smartCommitChanges.tracked": "Automatically stage tracked changes only.",
|
||||||
"config.suggestSmartCommit": "Suggests to enable smart commit (commit all changes when there are no staged changes).",
|
"config.suggestSmartCommit": "Suggests to enable smart commit (commit all changes when there are no staged changes).",
|
||||||
"config.enableCommitSigning": "Enables commit signing with GPG.",
|
"config.enableCommitSigning": "Enables commit signing with GPG or X.509.",
|
||||||
"config.discardAllScope": "Controls what changes are discarded by the `Discard all changes` command. `all` discards all changes. `tracked` discards only tracked files. `prompt` shows a prompt dialog every time the action is run.",
|
"config.discardAllScope": "Controls what changes are discarded by the `Discard all changes` command. `all` discards all changes. `tracked` discards only tracked files. `prompt` shows a prompt dialog every time the action is run.",
|
||||||
"config.decorations.enabled": "Controls whether Git contributes colors and badges to the explorer and the open editors view.",
|
"config.decorations.enabled": "Controls whether Git contributes colors and badges to the explorer and the open editors view.",
|
||||||
"config.enableStatusBarSync": "Controls whether the Git Sync command appears in the status bar.",
|
"config.enableStatusBarSync": "Controls whether the Git Sync command appears in the status bar.",
|
||||||
|
|
|
@ -6,21 +6,31 @@
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const testRunner = require('vscode/lib/testrunner');
|
const testRunner = require('vscode/lib/testrunner');
|
||||||
|
|
||||||
const suite = 'Integration Git Tests';
|
|
||||||
|
|
||||||
const options: any = {
|
const options: any = {
|
||||||
ui: 'tdd',
|
ui: 'tdd',
|
||||||
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
|
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
|
||||||
timeout: 60000
|
timeout: 60000
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// These integration tests is being run in multiple environments (electron, web, remote)
|
||||||
|
// so we need to set the suite name based on the environment as the suite name is used
|
||||||
|
// for the test results file name
|
||||||
|
let suite = '';
|
||||||
|
if (process.env.VSCODE_BROWSER) {
|
||||||
|
suite = `${process.env.VSCODE_BROWSER} Browser Integration Git Tests`;
|
||||||
|
} else if (process.env.REMOTE_VSCODE) {
|
||||||
|
suite = 'Remote Integration Git Tests';
|
||||||
|
} else {
|
||||||
|
suite = 'Integration Git Tests';
|
||||||
|
}
|
||||||
|
|
||||||
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||||
options.reporter = 'mocha-multi-reporters';
|
options.reporter = 'mocha-multi-reporters';
|
||||||
options.reporterOptions = {
|
options.reporterOptions = {
|
||||||
reporterEnabled: 'spec, mocha-junit-reporter',
|
reporterEnabled: 'spec, mocha-junit-reporter',
|
||||||
mochaJunitReporterReporterOptions: {
|
mochaJunitReporterReporterOptions: {
|
||||||
testsuitesTitle: `${suite} ${process.platform}`,
|
testsuitesTitle: `${suite} ${process.platform}`,
|
||||||
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
|
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${process.arch}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -232,7 +232,7 @@ export class GitTimelineProvider implements TimelineProvider {
|
||||||
private onRepositoryStatusChanged(_repo: Repository) {
|
private onRepositoryStatusChanged(_repo: Repository) {
|
||||||
// console.log(`GitTimelineProvider.onRepositoryStatusChanged`);
|
// console.log(`GitTimelineProvider.onRepositoryStatusChanged`);
|
||||||
|
|
||||||
// This is crappy, but for now just save the last time a status was run and use that as the timestamp for staged items
|
// This is less than ideal, but for now just save the last time a status was run and use that as the timestamp for staged items
|
||||||
this.repoStatusDate = new Date();
|
this.repoStatusDate = new Date();
|
||||||
|
|
||||||
this.fireChanged();
|
this.fireChanged();
|
||||||
|
|
|
@ -11,8 +11,12 @@
|
||||||
"categories": [
|
"categories": [
|
||||||
"Other"
|
"Other"
|
||||||
],
|
],
|
||||||
|
"extensionKind": [
|
||||||
|
"ui",
|
||||||
|
"workspace",
|
||||||
|
"web"
|
||||||
|
],
|
||||||
"activationEvents": [
|
"activationEvents": [
|
||||||
"*",
|
|
||||||
"onAuthenticationRequest:github"
|
"onAuthenticationRequest:github"
|
||||||
],
|
],
|
||||||
"contributes": {
|
"contributes": {
|
||||||
|
@ -29,7 +33,13 @@
|
||||||
"when": "false"
|
"when": "false"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"authentication": [
|
||||||
|
{
|
||||||
|
"label": "GitHub",
|
||||||
|
"id": "github"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
|
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
|
||||||
"main": "./out/extension.js",
|
"main": "./out/extension.js",
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
"languages": [{
|
"languages": [{
|
||||||
"id": "groovy",
|
"id": "groovy",
|
||||||
"aliases": ["Groovy", "groovy"],
|
"aliases": ["Groovy", "groovy"],
|
||||||
"extensions": [".groovy", ".gvy", ".gradle"],
|
"extensions": [".groovy", ".gvy", ".gradle", ".jenkinsfile"],
|
||||||
"filenames": [ "Jenkinsfile" ],
|
"filenamePatterns": ["Jenkinsfile.*"],
|
||||||
"firstLine": "^#!.*\\bgroovy\\b",
|
"firstLine": "^#!.*\\bgroovy\\b",
|
||||||
"configuration": "./language-configuration.json"
|
"configuration": "./language-configuration.json"
|
||||||
}],
|
}],
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { ExtensionContext } from 'vscode';
|
import { ExtensionContext, Uri } from 'vscode';
|
||||||
import { LanguageClientOptions } from 'vscode-languageclient';
|
import { LanguageClientOptions } from 'vscode-languageclient';
|
||||||
import { startClient, LanguageClientConstructor } from '../htmlClient';
|
import { startClient, LanguageClientConstructor } from '../htmlClient';
|
||||||
import { LanguageClient } from 'vscode-languageclient/browser';
|
import { LanguageClient } from 'vscode-languageclient/browser';
|
||||||
|
@ -17,9 +17,9 @@ declare const TextDecoder: {
|
||||||
|
|
||||||
// this method is called when vs code is activated
|
// this method is called when vs code is activated
|
||||||
export function activate(context: ExtensionContext) {
|
export function activate(context: ExtensionContext) {
|
||||||
const serverMain = context.asAbsolutePath('server/dist/browser/htmlServerMain.js');
|
const serverMain = Uri.joinPath(context.extensionUri, 'server/dist/browser/htmlServerMain.js');
|
||||||
try {
|
try {
|
||||||
const worker = new Worker(serverMain);
|
const worker = new Worker(serverMain.toString());
|
||||||
const newLanguageClient: LanguageClientConstructor = (id: string, name: string, clientOptions: LanguageClientOptions) => {
|
const newLanguageClient: LanguageClientConstructor = (id: string, name: string, clientOptions: LanguageClientOptions) => {
|
||||||
return new LanguageClient(id, name, clientOptions, worker);
|
return new LanguageClient(id, name, clientOptions, worker);
|
||||||
};
|
};
|
||||||
|
|
|
@ -28,7 +28,7 @@ namespace TagCloseRequest {
|
||||||
export const type: RequestType<TextDocumentPositionParams, string, any, any> = new RequestType('html/tag');
|
export const type: RequestType<TextDocumentPositionParams, string, any, any> = new RequestType('html/tag');
|
||||||
}
|
}
|
||||||
namespace OnTypeRenameRequest {
|
namespace OnTypeRenameRequest {
|
||||||
export const type: RequestType<TextDocumentPositionParams, Range[] | null, any, any> = new RequestType('html/onTypeRename');
|
export const type: RequestType<TextDocumentPositionParams, LspRange[] | null, any, any> = new RequestType('html/onTypeRename');
|
||||||
}
|
}
|
||||||
|
|
||||||
// experimental: semantic tokens
|
// experimental: semantic tokens
|
||||||
|
@ -172,9 +172,14 @@ export function startClient(context: ExtensionContext, newLanguageClient: Langua
|
||||||
disposable = languages.registerOnTypeRenameProvider(documentSelector, {
|
disposable = languages.registerOnTypeRenameProvider(documentSelector, {
|
||||||
async provideOnTypeRenameRanges(document, position) {
|
async provideOnTypeRenameRanges(document, position) {
|
||||||
const param = client.code2ProtocolConverter.asTextDocumentPositionParams(document, position);
|
const param = client.code2ProtocolConverter.asTextDocumentPositionParams(document, position);
|
||||||
const response = await client.sendRequest(OnTypeRenameRequest.type, param);
|
return client.sendRequest(OnTypeRenameRequest.type, param).then(response => {
|
||||||
|
if (response) {
|
||||||
return response || [];
|
return {
|
||||||
|
ranges: response.map(r => client.protocol2CodeConverter.asRange(r))
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
toDispose.push(disposable);
|
toDispose.push(disposable);
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
},
|
},
|
||||||
"main": "./out/node/htmlServerMain",
|
"main": "./out/node/htmlServerMain",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"vscode-css-languageservice": "^4.3.1",
|
"vscode-css-languageservice": "^4.3.3",
|
||||||
"vscode-html-languageservice": "^3.1.0",
|
"vscode-html-languageservice": "^3.1.1",
|
||||||
"vscode-languageserver": "7.0.0-next.3",
|
"vscode-languageserver": "7.0.0-next.3",
|
||||||
"vscode-nls": "^4.1.2",
|
"vscode-nls": "^4.1.2",
|
||||||
"vscode-uri": "^2.1.2"
|
"vscode-uri": "^2.1.2"
|
||||||
|
|
|
@ -71,7 +71,7 @@ suite('HTML Folding', async () => {
|
||||||
/*13*/'</head>',
|
/*13*/'</head>',
|
||||||
/*14*/'</html>',
|
/*14*/'</html>',
|
||||||
];
|
];
|
||||||
await assertRanges(input, [r(0, 13), r(1, 12), r(2, 6), r(3, 6), r(8, 11), r(9, 11)]);
|
await assertRanges(input, [r(0, 13), r(1, 12), r(2, 6), r(3, 6), r(8, 11), r(9, 11), r(9, 11)]);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Embedded JavaScript - incomplete', async () => {
|
test('Embedded JavaScript - incomplete', async () => {
|
||||||
|
|
|
@ -21,7 +21,7 @@ if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||||
reporterEnabled: 'spec, mocha-junit-reporter',
|
reporterEnabled: 'spec, mocha-junit-reporter',
|
||||||
mochaJunitReporterReporterOptions: {
|
mochaJunitReporterReporterOptions: {
|
||||||
testsuitesTitle: `${suite} ${process.platform}`,
|
testsuitesTitle: `${suite} ${process.platform}`,
|
||||||
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
|
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${process.arch}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -721,20 +721,20 @@ to-regex-range@^5.0.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
is-number "^7.0.0"
|
is-number "^7.0.0"
|
||||||
|
|
||||||
vscode-css-languageservice@^4.3.1:
|
vscode-css-languageservice@^4.3.3:
|
||||||
version "4.3.1"
|
version "4.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.3.1.tgz#a78755b28b8a0cbb1681121f0fa372860f34ef6b"
|
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-4.3.3.tgz#fcb8c7442ae7bb8fbe6ff1d3a514be8248bfb52f"
|
||||||
integrity sha512-Vdz2cyoTP2tLWikhFdouK8dAQ3gVhLPxsFkIscM30Quh6rd/YejTeZEYC/W+b0iKumHYebDeo1GUFbf0ptySRw==
|
integrity sha512-b2b+0oHvPmBHygDtOXX3xBvpQCa6eIQSvXnGDNSDmIC1894ZTJ2yX10vjplOO/PvV7mwhyvGPwHyY4X2HGxtKw==
|
||||||
dependencies:
|
dependencies:
|
||||||
vscode-languageserver-textdocument "^1.0.1"
|
vscode-languageserver-textdocument "^1.0.1"
|
||||||
vscode-languageserver-types "3.16.0-next.2"
|
vscode-languageserver-types "3.16.0-next.2"
|
||||||
vscode-nls "^4.1.2"
|
vscode-nls "^4.1.2"
|
||||||
vscode-uri "^2.1.2"
|
vscode-uri "^2.1.2"
|
||||||
|
|
||||||
vscode-html-languageservice@^3.1.0:
|
vscode-html-languageservice@^3.1.1:
|
||||||
version "3.1.0"
|
version "3.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-3.1.0.tgz#265b53bda595e6947b16b0fb8c604e1e58685393"
|
resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-3.1.1.tgz#ae9fa52b5415f332d73c65c46d4e2ed87ef81c8c"
|
||||||
integrity sha512-QAyRHI98bbEIBCqTzZVA0VblGU40na0txggongw5ZgTj9UVsVk5XbLT16O9OTcbqBGSqn0oWmFDNjK/XGIDcqg==
|
integrity sha512-SKrMnoZtI0q+NJEjNJRgzvQeLih0obRvGLh1r5ysd5YGxhNSZbQgqeEgK4jsGjAp3nr4QWIzop3WjP/30BLsPw==
|
||||||
dependencies:
|
dependencies:
|
||||||
vscode-languageserver-textdocument "^1.0.1"
|
vscode-languageserver-textdocument "^1.0.1"
|
||||||
vscode-languageserver-types "3.16.0-next.2"
|
vscode-languageserver-types "3.16.0-next.2"
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
".htm",
|
".htm",
|
||||||
".shtml",
|
".shtml",
|
||||||
".xhtml",
|
".xhtml",
|
||||||
|
".xht",
|
||||||
".mdoc",
|
".mdoc",
|
||||||
".jsp",
|
".jsp",
|
||||||
".asp",
|
".asp",
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
|
import { BinarySizeStatusBarEntry } from './binarySizeStatusBarEntry';
|
||||||
import { PreviewManager } from './preview';
|
import { PreviewManager } from './preview';
|
||||||
import { SizeStatusBarEntry } from './sizeStatusBarEntry';
|
import { SizeStatusBarEntry } from './sizeStatusBarEntry';
|
||||||
import { BinarySizeStatusBarEntry } from './binarySizeStatusBarEntry';
|
|
||||||
import { ZoomStatusBarEntry } from './zoomStatusBarEntry';
|
import { ZoomStatusBarEntry } from './zoomStatusBarEntry';
|
||||||
|
|
||||||
export function activate(context: vscode.ExtensionContext) {
|
export function activate(context: vscode.ExtensionContext) {
|
||||||
|
|
|
@ -5737,4 +5737,4 @@
|
||||||
"match": "\\S+"
|
"match": "\\S+"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -3,7 +3,7 @@
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { ExtensionContext } from 'vscode';
|
import { ExtensionContext, Uri } from 'vscode';
|
||||||
import { LanguageClientOptions } from 'vscode-languageclient';
|
import { LanguageClientOptions } from 'vscode-languageclient';
|
||||||
import { startClient, LanguageClientConstructor } from '../jsonClient';
|
import { startClient, LanguageClientConstructor } from '../jsonClient';
|
||||||
import { LanguageClient } from 'vscode-languageclient/browser';
|
import { LanguageClient } from 'vscode-languageclient/browser';
|
||||||
|
@ -17,9 +17,9 @@ declare function fetch(uri: string, options: any): any;
|
||||||
|
|
||||||
// this method is called when vs code is activated
|
// this method is called when vs code is activated
|
||||||
export function activate(context: ExtensionContext) {
|
export function activate(context: ExtensionContext) {
|
||||||
const serverMain = context.asAbsolutePath('server/dist/browser/jsonServerMain.js');
|
const serverMain = Uri.joinPath(context.extensionUri, 'server/dist/browser/jsonServerMain.js');
|
||||||
try {
|
try {
|
||||||
const worker = new Worker(serverMain);
|
const worker = new Worker(serverMain.toString());
|
||||||
const newLanguageClient: LanguageClientConstructor = (id: string, name: string, clientOptions: LanguageClientOptions) => {
|
const newLanguageClient: LanguageClientConstructor = (id: string, name: string, clientOptions: LanguageClientOptions) => {
|
||||||
return new LanguageClient(id, name, clientOptions, worker);
|
return new LanguageClient(id, name, clientOptions, worker);
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jsonc-parser": "^2.2.1",
|
"jsonc-parser": "^2.2.1",
|
||||||
"request-light": "^0.3.0",
|
"request-light": "^0.3.0",
|
||||||
"vscode-json-languageservice": "^3.8.0",
|
"vscode-json-languageservice": "^3.8.3",
|
||||||
"vscode-languageserver": "7.0.0-next.3",
|
"vscode-languageserver": "7.0.0-next.3",
|
||||||
"vscode-uri": "^2.1.2"
|
"vscode-uri": "^2.1.2"
|
||||||
},
|
},
|
||||||
|
|
|
@ -80,10 +80,10 @@ request-light@^0.3.0:
|
||||||
https-proxy-agent "^2.2.4"
|
https-proxy-agent "^2.2.4"
|
||||||
vscode-nls "^4.1.1"
|
vscode-nls "^4.1.1"
|
||||||
|
|
||||||
vscode-json-languageservice@^3.8.0:
|
vscode-json-languageservice@^3.8.3:
|
||||||
version "3.8.0"
|
version "3.8.3"
|
||||||
resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-3.8.0.tgz#c7e7283f993e3db39fa5501407b023ada6fd3ae3"
|
resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-3.8.3.tgz#fae5e7bdda2b6ec4f64588c571df40b6bfcb09b5"
|
||||||
integrity sha512-sYz5JElJMIlPoqhrRfG3VKnDjnPinLdblIiEVsJgTz1kj2hWD2q5BSbo+evH/5/jKDXDLfA8kb0lHC4vd5g5zg==
|
integrity sha512-8yPag/NQHCuTthahyaTtzK0DHT0FKM/xBU0mFBQ8nMo8C1i2P+FCyIVqICoNoHkRI2BTGlXKomPUpsqjSz0TnQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
jsonc-parser "^2.2.1"
|
jsonc-parser "^2.2.1"
|
||||||
vscode-languageserver-textdocument "^1.0.1"
|
vscode-languageserver-textdocument "^1.0.1"
|
||||||
|
|
|
@ -14,43 +14,54 @@
|
||||||
"body": "> ${1:${TM_SELECTED_TEXT}}",
|
"body": "> ${1:${TM_SELECTED_TEXT}}",
|
||||||
"description": "Insert quoted text"
|
"description": "Insert quoted text"
|
||||||
},
|
},
|
||||||
"Insert code": {
|
"Insert inline code": {
|
||||||
"prefix": "code",
|
"prefix": "code",
|
||||||
"body": "`${1:${TM_SELECTED_TEXT}}`$0",
|
"body": "`${1:${TM_SELECTED_TEXT}}`$0",
|
||||||
"description": "Insert code"
|
"description": "Insert inline code"
|
||||||
},
|
},
|
||||||
"Insert fenced code block": {
|
"Insert fenced code block": {
|
||||||
"prefix": "fenced codeblock",
|
"prefix": "fenced codeblock",
|
||||||
"body": [
|
"body": ["```${1:language}", "${TM_SELECTED_TEXT}$0", "```"],
|
||||||
"```${1:language}",
|
|
||||||
"${TM_SELECTED_TEXT}$0",
|
|
||||||
"```"
|
|
||||||
],
|
|
||||||
"description": "Insert fenced code block"
|
"description": "Insert fenced code block"
|
||||||
},
|
},
|
||||||
"Insert heading": {
|
"Insert heading level 1": {
|
||||||
"prefix": "heading",
|
"prefix": "heading1",
|
||||||
"body": "# ${1:${TM_SELECTED_TEXT}}",
|
"body": "# ${1:${TM_SELECTED_TEXT}}",
|
||||||
"description": "Insert heading"
|
"description": "Insert heading level 1"
|
||||||
|
},
|
||||||
|
"Insert heading level 2": {
|
||||||
|
"prefix": "heading2",
|
||||||
|
"body": "## ${1:${TM_SELECTED_TEXT}}",
|
||||||
|
"description": "Insert heading level 2"
|
||||||
|
},
|
||||||
|
"Insert heading level 3": {
|
||||||
|
"prefix": "heading3",
|
||||||
|
"body": "### ${1:${TM_SELECTED_TEXT}}",
|
||||||
|
"description": "Insert heading level 3"
|
||||||
|
},
|
||||||
|
"Insert heading level 4": {
|
||||||
|
"prefix": "heading4",
|
||||||
|
"body": "#### ${1:${TM_SELECTED_TEXT}}",
|
||||||
|
"description": "Insert heading level 4"
|
||||||
|
},
|
||||||
|
"Insert heading level 5": {
|
||||||
|
"prefix": "heading5",
|
||||||
|
"body": "##### ${1:${TM_SELECTED_TEXT}}",
|
||||||
|
"description": "Insert heading level 5"
|
||||||
|
},
|
||||||
|
"Insert heading level 6": {
|
||||||
|
"prefix": "heading6",
|
||||||
|
"body": "###### ${1:${TM_SELECTED_TEXT}}",
|
||||||
|
"description": "Insert heading level 6"
|
||||||
},
|
},
|
||||||
"Insert unordered list": {
|
"Insert unordered list": {
|
||||||
"prefix": "unordered list",
|
"prefix": "unordered list",
|
||||||
"body": [
|
"body": ["- ${1:first}", "- ${2:second}", "- ${3:third}", "$0"],
|
||||||
"- ${1:first}",
|
|
||||||
"- ${2:second}",
|
|
||||||
"- ${3:third}",
|
|
||||||
"$0"
|
|
||||||
],
|
|
||||||
"description": "Insert unordered list"
|
"description": "Insert unordered list"
|
||||||
},
|
},
|
||||||
"Insert ordered list": {
|
"Insert ordered list": {
|
||||||
"prefix": "ordered list",
|
"prefix": "ordered list",
|
||||||
"body": [
|
"body": ["1. ${1:first}", "2. ${2:second}", "3. ${3:third}", "$0"],
|
||||||
"1. ${1:first}",
|
|
||||||
"2. ${2:second}",
|
|
||||||
"3. ${3:third}",
|
|
||||||
"$0"
|
|
||||||
],
|
|
||||||
"description": "Insert ordered list"
|
"description": "Insert ordered list"
|
||||||
},
|
},
|
||||||
"Insert horizontal rule": {
|
"Insert horizontal rule": {
|
||||||
|
@ -67,5 +78,10 @@
|
||||||
"prefix": "image",
|
"prefix": "image",
|
||||||
"body": "![${TM_SELECTED_TEXT:${1:alt}}](https://${2:link})$0",
|
"body": "![${TM_SELECTED_TEXT:${1:alt}}](https://${2:link})$0",
|
||||||
"description": "Insert image"
|
"description": "Insert image"
|
||||||
|
},
|
||||||
|
"Insert strikethrough": {
|
||||||
|
"prefix": "strikethrough",
|
||||||
|
"body": "~~${1:${TM_SELECTED_TEXT}}~~",
|
||||||
|
"description": "Insert strikethrough"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ export class InMemoryDocument implements vscode.TextDocument {
|
||||||
isDirty: boolean = false;
|
isDirty: boolean = false;
|
||||||
isClosed: boolean = false;
|
isClosed: boolean = false;
|
||||||
eol: vscode.EndOfLine = vscode.EndOfLine.LF;
|
eol: vscode.EndOfLine = vscode.EndOfLine.LF;
|
||||||
|
notebook: undefined;
|
||||||
|
|
||||||
get fileName(): string {
|
get fileName(): string {
|
||||||
return this.uri.fsPath;
|
return this.uri.fsPath;
|
||||||
|
@ -66,4 +67,4 @@ export class InMemoryDocument implements vscode.TextDocument {
|
||||||
save(): never {
|
save(): never {
|
||||||
throw new Error('Method not implemented.');
|
throw new Error('Method not implemented.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,21 +6,31 @@
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const testRunner = require('vscode/lib/testrunner');
|
const testRunner = require('vscode/lib/testrunner');
|
||||||
|
|
||||||
const suite = 'Integration Markdown Tests';
|
|
||||||
|
|
||||||
const options: any = {
|
const options: any = {
|
||||||
ui: 'tdd',
|
ui: 'tdd',
|
||||||
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
|
useColors: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
|
||||||
timeout: 60000
|
timeout: 60000
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// These integration tests is being run in multiple environments (electron, web, remote)
|
||||||
|
// so we need to set the suite name based on the environment as the suite name is used
|
||||||
|
// for the test results file name
|
||||||
|
let suite = '';
|
||||||
|
if (process.env.VSCODE_BROWSER) {
|
||||||
|
suite = `${process.env.VSCODE_BROWSER} Browser Integration Markdown Tests`;
|
||||||
|
} else if (process.env.REMOTE_VSCODE) {
|
||||||
|
suite = 'Remote Integration Markdown Tests';
|
||||||
|
} else {
|
||||||
|
suite = 'Integration Markdown Tests';
|
||||||
|
}
|
||||||
|
|
||||||
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
||||||
options.reporter = 'mocha-multi-reporters';
|
options.reporter = 'mocha-multi-reporters';
|
||||||
options.reporterOptions = {
|
options.reporterOptions = {
|
||||||
reporterEnabled: 'spec, mocha-junit-reporter',
|
reporterEnabled: 'spec, mocha-junit-reporter',
|
||||||
mochaJunitReporterReporterOptions: {
|
mochaJunitReporterReporterOptions: {
|
||||||
testsuitesTitle: `${suite} ${process.platform}`,
|
testsuitesTitle: `${suite} ${process.platform}`,
|
||||||
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
|
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${process.arch}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
],
|
],
|
||||||
"enableProposedApi": true,
|
"enableProposedApi": true,
|
||||||
"activationEvents": [
|
"activationEvents": [
|
||||||
"*",
|
|
||||||
"onAuthenticationRequest:microsoft"
|
"onAuthenticationRequest:microsoft"
|
||||||
],
|
],
|
||||||
"extensionKind": [
|
"extensionKind": [
|
||||||
|
@ -20,6 +19,14 @@
|
||||||
"workspace",
|
"workspace",
|
||||||
"web"
|
"web"
|
||||||
],
|
],
|
||||||
|
"contributes": {
|
||||||
|
"authentication": [
|
||||||
|
{
|
||||||
|
"label": "Microsoft",
|
||||||
|
"id": "microsoft"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
|
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
|
||||||
"main": "./out/extension.js",
|
"main": "./out/extension.js",
|
||||||
"browser": "./dist/browser/extension.js",
|
"browser": "./dist/browser/extension.js",
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
import * as randomBytes from 'randombytes';
|
import * as randomBytes from 'randombytes';
|
||||||
import * as querystring from 'querystring';
|
import * as querystring from 'querystring';
|
||||||
|
import { Buffer } from 'buffer';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import { createServer, startServer } from './authServer';
|
import { createServer, startServer } from './authServer';
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,6 @@
|
||||||
{
|
{
|
||||||
"id": "npm",
|
"id": "npm",
|
||||||
"name": "%view.name%",
|
"name": "%view.name%",
|
||||||
"when": "npm:showScriptExplorer",
|
|
||||||
"icon": "images/code.svg",
|
"icon": "images/code.svg",
|
||||||
"visibility": "hidden"
|
"visibility": "hidden"
|
||||||
}
|
}
|
||||||
|
@ -166,14 +165,9 @@
|
||||||
"when": "view == npm && viewItem == script",
|
"when": "view == npm && viewItem == script",
|
||||||
"group": "inline"
|
"group": "inline"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"command": "npm.runScript",
|
|
||||||
"when": "view == npm && viewItem == debugScript",
|
|
||||||
"group": "inline"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"command": "npm.debugScript",
|
"command": "npm.debugScript",
|
||||||
"when": "view == npm && viewItem == debugScript",
|
"when": "view == npm && viewItem == script",
|
||||||
"group": "inline"
|
"group": "inline"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -237,6 +231,7 @@
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false,
|
"default": false,
|
||||||
"scope": "resource",
|
"scope": "resource",
|
||||||
|
"deprecationMessage": "The NPM Script Explorer is now available in 'Views' menu in the Explorer in all folders.",
|
||||||
"description": "%config.npm.enableScriptExplorer%"
|
"description": "%config.npm.enableScriptExplorer%"
|
||||||
},
|
},
|
||||||
"npm.enableRunFromFolder": {
|
"npm.enableRunFromFolder": {
|
||||||
|
|
|
@ -33,7 +33,7 @@ export class BowerJSONContribution implements IJSONContribution {
|
||||||
return [{ language: 'json', scheme: '*', pattern: '**/bower.json' }, { language: 'json', scheme: '*', pattern: '**/.bower.json' }];
|
return [{ language: 'json', scheme: '*', pattern: '**/bower.json' }, { language: 'json', scheme: '*', pattern: '**/.bower.json' }];
|
||||||
}
|
}
|
||||||
|
|
||||||
private onlineEnabled() {
|
private isEnabled() {
|
||||||
return !!workspace.getConfiguration('npm').get('fetchOnlinePackageInfo');
|
return !!workspace.getConfiguration('npm').get('fetchOnlinePackageInfo');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,8 +54,11 @@ export class BowerJSONContribution implements IJSONContribution {
|
||||||
}
|
}
|
||||||
|
|
||||||
public collectPropertySuggestions(_resource: string, location: Location, currentWord: string, addValue: boolean, isLast: boolean, collector: ISuggestionsCollector): Thenable<any> | null {
|
public collectPropertySuggestions(_resource: string, location: Location, currentWord: string, addValue: boolean, isLast: boolean, collector: ISuggestionsCollector): Thenable<any> | null {
|
||||||
|
if (!this.isEnabled()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if ((location.matches(['dependencies']) || location.matches(['devDependencies']))) {
|
if ((location.matches(['dependencies']) || location.matches(['devDependencies']))) {
|
||||||
if (currentWord.length > 0 && this.onlineEnabled()) {
|
if (currentWord.length > 0) {
|
||||||
const queryUrl = 'https://registry.bower.io/packages/search/' + encodeURIComponent(currentWord);
|
const queryUrl = 'https://registry.bower.io/packages/search/' + encodeURIComponent(currentWord);
|
||||||
|
|
||||||
return this.xhr({
|
return this.xhr({
|
||||||
|
@ -122,7 +125,10 @@ export class BowerJSONContribution implements IJSONContribution {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public collectValueSuggestions(_resource: string, location: Location, collector: ISuggestionsCollector): Thenable<any> {
|
public collectValueSuggestions(_resource: string, location: Location, collector: ISuggestionsCollector): Promise<any> | null {
|
||||||
|
if (!this.isEnabled()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if ((location.matches(['dependencies', '*']) || location.matches(['devDependencies', '*']))) {
|
if ((location.matches(['dependencies', '*']) || location.matches(['devDependencies', '*']))) {
|
||||||
// not implemented. Could be do done calling the bower command. Waiting for web API: https://github.com/bower/registry/issues/26
|
// not implemented. Could be do done calling the bower command. Waiting for web API: https://github.com/bower/registry/issues/26
|
||||||
const proposal = new CompletionItem(localize('json.bower.latest.version', 'latest'));
|
const proposal = new CompletionItem(localize('json.bower.latest.version', 'latest'));
|
||||||
|
@ -132,7 +138,7 @@ export class BowerJSONContribution implements IJSONContribution {
|
||||||
proposal.documentation = 'The latest version of the package';
|
proposal.documentation = 'The latest version of the package';
|
||||||
collector.add(proposal);
|
collector.add(proposal);
|
||||||
}
|
}
|
||||||
return Promise.resolve(null);
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public resolveSuggestion(item: CompletionItem): Thenable<CompletionItem | null> | null {
|
public resolveSuggestion(item: CompletionItem): Thenable<CompletionItem | null> | null {
|
||||||
|
@ -149,10 +155,6 @@ export class BowerJSONContribution implements IJSONContribution {
|
||||||
}
|
}
|
||||||
|
|
||||||
private getInfo(pack: string): Thenable<string | undefined> {
|
private getInfo(pack: string): Thenable<string | undefined> {
|
||||||
if (!this.onlineEnabled()) {
|
|
||||||
return Promise.resolve(undefined);
|
|
||||||
}
|
|
||||||
|
|
||||||
const queryUrl = 'https://registry.bower.io/packages/' + encodeURIComponent(pack);
|
const queryUrl = 'https://registry.bower.io/packages/' + encodeURIComponent(pack);
|
||||||
|
|
||||||
return this.xhr({
|
return this.xhr({
|
||||||
|
@ -181,6 +183,9 @@ export class BowerJSONContribution implements IJSONContribution {
|
||||||
}
|
}
|
||||||
|
|
||||||
public getInfoContribution(_resource: string, location: Location): Thenable<MarkdownString[] | null> | null {
|
public getInfoContribution(_resource: string, location: Location): Thenable<MarkdownString[] | null> | null {
|
||||||
|
if (!this.isEnabled()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if ((location.matches(['dependencies', '*']) || location.matches(['devDependencies', '*']))) {
|
if ((location.matches(['dependencies', '*']) || location.matches(['devDependencies', '*']))) {
|
||||||
const pack = location.path[location.path.length - 1];
|
const pack = location.path[location.path.length - 1];
|
||||||
if (typeof pack === 'string') {
|
if (typeof pack === 'string') {
|
||||||
|
|
|
@ -25,7 +25,7 @@ export interface IJSONContribution {
|
||||||
getDocumentSelector(): DocumentSelector;
|
getDocumentSelector(): DocumentSelector;
|
||||||
getInfoContribution(fileName: string, location: Location): Thenable<MarkedString[] | null> | null;
|
getInfoContribution(fileName: string, location: Location): Thenable<MarkedString[] | null> | null;
|
||||||
collectPropertySuggestions(fileName: string, location: Location, currentWord: string, addValue: boolean, isLast: boolean, result: ISuggestionsCollector): Thenable<any> | null;
|
collectPropertySuggestions(fileName: string, location: Location, currentWord: string, addValue: boolean, isLast: boolean, result: ISuggestionsCollector): Thenable<any> | null;
|
||||||
collectValueSuggestions(fileName: string, location: Location, result: ISuggestionsCollector): Thenable<any>;
|
collectValueSuggestions(fileName: string, location: Location, result: ISuggestionsCollector): Thenable<any> | null;
|
||||||
collectDefaultSuggestions(fileName: string, result: ISuggestionsCollector): Thenable<any>;
|
collectDefaultSuggestions(fileName: string, result: ISuggestionsCollector): Thenable<any>;
|
||||||
resolveSuggestion?(item: CompletionItem): Thenable<CompletionItem | null> | null;
|
resolveSuggestion?(item: CompletionItem): Thenable<CompletionItem | null> | null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,10 @@ export class PackageJSONContribution implements IJSONContribution {
|
||||||
return Promise.resolve(null);
|
return Promise.resolve(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private isEnabled() {
|
||||||
|
return this.canRunNPM || this.onlineEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
private onlineEnabled() {
|
private onlineEnabled() {
|
||||||
return !!workspace.getConfiguration('npm').get('fetchOnlinePackageInfo');
|
return !!workspace.getConfiguration('npm').get('fetchOnlinePackageInfo');
|
||||||
}
|
}
|
||||||
|
@ -63,7 +67,7 @@ export class PackageJSONContribution implements IJSONContribution {
|
||||||
isLast: boolean,
|
isLast: boolean,
|
||||||
collector: ISuggestionsCollector
|
collector: ISuggestionsCollector
|
||||||
): Thenable<any> | null {
|
): Thenable<any> | null {
|
||||||
if (!this.onlineEnabled()) {
|
if (!this.isEnabled()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,7 +184,7 @@ export class PackageJSONContribution implements IJSONContribution {
|
||||||
}
|
}
|
||||||
|
|
||||||
public async collectValueSuggestions(_fileName: string, location: Location, result: ISuggestionsCollector): Promise<any> {
|
public async collectValueSuggestions(_fileName: string, location: Location, result: ISuggestionsCollector): Promise<any> {
|
||||||
if (!this.onlineEnabled()) {
|
if (!this.isEnabled()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,18 +249,37 @@ export class PackageJSONContribution implements IJSONContribution {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private isValidNPMName(name: string): boolean {
|
||||||
|
// following rules from https://github.com/npm/validate-npm-package-name
|
||||||
|
if (!name || name.length > 214 || name.match(/^[_.]/)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const match = name.match(/^(?:@([^/]+?)[/])?([^/]+?)$/);
|
||||||
|
if (match) {
|
||||||
|
const scope = match[1];
|
||||||
|
if (scope && encodeURIComponent(scope) !== scope) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const name = match[2];
|
||||||
|
return encodeURIComponent(name) === name;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
private async fetchPackageInfo(pack: string): Promise<ViewPackageInfo | undefined> {
|
private async fetchPackageInfo(pack: string): Promise<ViewPackageInfo | undefined> {
|
||||||
|
if (!this.isValidNPMName(pack)) {
|
||||||
|
return undefined; // avoid unnecessary lookups
|
||||||
|
}
|
||||||
let info: ViewPackageInfo | undefined;
|
let info: ViewPackageInfo | undefined;
|
||||||
if (this.canRunNPM) {
|
if (this.canRunNPM) {
|
||||||
info = await this.npmView(pack);
|
info = await this.npmView(pack);
|
||||||
}
|
}
|
||||||
if (!info) {
|
if (!info && this.onlineEnabled()) {
|
||||||
info = await this.npmjsView(pack);
|
info = await this.npmjsView(pack);
|
||||||
}
|
}
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private npmView(pack: string): Promise<ViewPackageInfo | undefined> {
|
private npmView(pack: string): Promise<ViewPackageInfo | undefined> {
|
||||||
return new Promise((resolve, _reject) => {
|
return new Promise((resolve, _reject) => {
|
||||||
const command = 'npm view --json ' + pack + ' description dist-tags.latest homepage version';
|
const command = 'npm view --json ' + pack + ' description dist-tags.latest homepage version';
|
||||||
|
@ -303,6 +326,9 @@ export class PackageJSONContribution implements IJSONContribution {
|
||||||
}
|
}
|
||||||
|
|
||||||
public getInfoContribution(_fileName: string, location: Location): Thenable<MarkedString[] | null> | null {
|
public getInfoContribution(_fileName: string, location: Location): Thenable<MarkedString[] | null> | null {
|
||||||
|
if (!this.isEnabled()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if ((location.matches(['dependencies', '*']) || location.matches(['devDependencies', '*']) || location.matches(['optionalDependencies', '*']) || location.matches(['peerDependencies', '*']))) {
|
if ((location.matches(['dependencies', '*']) || location.matches(['devDependencies', '*']) || location.matches(['optionalDependencies', '*']) || location.matches(['peerDependencies', '*']))) {
|
||||||
const pack = location.path[location.path.length - 1];
|
const pack = location.path[location.path.length - 1];
|
||||||
if (typeof pack === 'string') {
|
if (typeof pack === 'string') {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import * as vscode from 'vscode';
|
||||||
import { addJSONProviders } from './features/jsonContributions';
|
import { addJSONProviders } from './features/jsonContributions';
|
||||||
import { runSelectedScript, selectAndRunScriptFromFolder } from './commands';
|
import { runSelectedScript, selectAndRunScriptFromFolder } from './commands';
|
||||||
import { NpmScriptsTreeDataProvider } from './npmView';
|
import { NpmScriptsTreeDataProvider } from './npmView';
|
||||||
import { invalidateTasksCache, NpmTaskProvider, hasPackageJson } from './tasks';
|
import { invalidateTasksCache, NpmTaskProvider } from './tasks';
|
||||||
import { invalidateHoverScriptsCache, NpmScriptHoverProvider } from './scriptHover';
|
import { invalidateHoverScriptsCache, NpmScriptHoverProvider } from './scriptHover';
|
||||||
|
|
||||||
let treeDataProvider: NpmScriptsTreeDataProvider | undefined;
|
let treeDataProvider: NpmScriptsTreeDataProvider | undefined;
|
||||||
|
@ -44,11 +44,6 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
|
||||||
registerHoverProvider(context);
|
registerHoverProvider(context);
|
||||||
|
|
||||||
context.subscriptions.push(vscode.commands.registerCommand('npm.runSelectedScript', runSelectedScript));
|
context.subscriptions.push(vscode.commands.registerCommand('npm.runSelectedScript', runSelectedScript));
|
||||||
|
|
||||||
if (await hasPackageJson()) {
|
|
||||||
vscode.commands.executeCommand('setContext', 'npm:showScriptExplorer', true);
|
|
||||||
}
|
|
||||||
|
|
||||||
context.subscriptions.push(vscode.commands.registerCommand('npm.runScriptFromFolder', selectAndRunScriptFromFolder));
|
context.subscriptions.push(vscode.commands.registerCommand('npm.runScriptFromFolder', selectAndRunScriptFromFolder));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,18 +3,19 @@
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
import { JSONVisitor, visit } from 'jsonc-parser';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import {
|
import {
|
||||||
Event, EventEmitter, ExtensionContext, Task2 as Task,
|
commands, Event, EventEmitter, ExtensionContext,
|
||||||
TextDocument, ThemeIcon, TreeDataProvider, TreeItem, TreeItemCollapsibleState, Uri,
|
Selection, Task,
|
||||||
WorkspaceFolder, commands, window, workspace, tasks, Selection, TaskGroup
|
TaskGroup, tasks, TextDocument, ThemeIcon, TreeDataProvider, TreeItem, TreeItemCollapsibleState, Uri,
|
||||||
|
window, workspace, WorkspaceFolder
|
||||||
} from 'vscode';
|
} from 'vscode';
|
||||||
import { visit, JSONVisitor } from 'jsonc-parser';
|
|
||||||
import {
|
|
||||||
NpmTaskDefinition, getPackageJsonUriFromTask, getScripts,
|
|
||||||
isWorkspaceFolder, getTaskName, createTask, extractDebugArgFromScript, startDebugging, isAutoDetectionEnabled
|
|
||||||
} from './tasks';
|
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
|
import {
|
||||||
|
createTask, getTaskName, isAutoDetectionEnabled, isWorkspaceFolder, NpmTaskDefinition,
|
||||||
|
startDebugging
|
||||||
|
} from './tasks';
|
||||||
|
|
||||||
const localize = nls.loadMessageBundle();
|
const localize = nls.loadMessageBundle();
|
||||||
|
|
||||||
|
@ -90,9 +91,6 @@ class NpmScript extends TreeItem {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.contextValue = 'script';
|
this.contextValue = 'script';
|
||||||
if (task.group && task.group === TaskGroup.Rebuild) {
|
|
||||||
this.contextValue = 'debugScript';
|
|
||||||
}
|
|
||||||
this.package = packageJson;
|
this.package = packageJson;
|
||||||
this.task = task;
|
this.task = task;
|
||||||
this.command = commandList[command];
|
this.command = commandList[command];
|
||||||
|
@ -139,27 +137,8 @@ export class NpmScriptsTreeDataProvider implements TreeDataProvider<TreeItem> {
|
||||||
tasks.executeTask(script.task);
|
tasks.executeTask(script.task);
|
||||||
}
|
}
|
||||||
|
|
||||||
private extractDebugArg(scripts: any, task: Task): [string, number] | undefined {
|
|
||||||
return extractDebugArgFromScript(scripts[task.name]);
|
|
||||||
}
|
|
||||||
|
|
||||||
private async debugScript(script: NpmScript) {
|
private async debugScript(script: NpmScript) {
|
||||||
let task = script.task;
|
startDebugging(script.task.name, script.getFolder());
|
||||||
let uri = getPackageJsonUriFromTask(task);
|
|
||||||
let scripts = await getScripts(uri!);
|
|
||||||
|
|
||||||
let debugArg = this.extractDebugArg(scripts, task);
|
|
||||||
if (!debugArg) {
|
|
||||||
let message = localize('noDebugOptions', 'Could not launch "{0}" for debugging because the scripts lacks a node debug option, e.g. "--inspect-brk".', task.name);
|
|
||||||
let learnMore = localize('learnMore', 'Learn More');
|
|
||||||
let ok = localize('ok', 'OK');
|
|
||||||
let result = await window.showErrorMessage(message, { modal: true }, ok, learnMore);
|
|
||||||
if (result === learnMore) {
|
|
||||||
commands.executeCommand('vscode.open', Uri.parse('https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_launch-configuration-support-for-npm-and-other-tools'));
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
startDebugging(task.name, debugArg[0], debugArg[1], script.getFolder());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private findScript(document: TextDocument, script?: NpmScript): number {
|
private findScript(document: TextDocument, script?: NpmScript): number {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import {
|
||||||
workspace, tasks, Range, HoverProvider, Hover, Position, MarkdownString, Uri
|
workspace, tasks, Range, HoverProvider, Hover, Position, MarkdownString, Uri
|
||||||
} from 'vscode';
|
} from 'vscode';
|
||||||
import {
|
import {
|
||||||
createTask, startDebugging, findAllScriptRanges, extractDebugArgFromScript
|
createTask, startDebugging, findAllScriptRanges
|
||||||
} from './tasks';
|
} from './tasks';
|
||||||
import * as nls from 'vscode-nls';
|
import * as nls from 'vscode-nls';
|
||||||
|
|
||||||
|
@ -54,11 +54,7 @@ export class NpmScriptHoverProvider implements HoverProvider {
|
||||||
let contents: MarkdownString = new MarkdownString();
|
let contents: MarkdownString = new MarkdownString();
|
||||||
contents.isTrusted = true;
|
contents.isTrusted = true;
|
||||||
contents.appendMarkdown(this.createRunScriptMarkdown(key, document.uri));
|
contents.appendMarkdown(this.createRunScriptMarkdown(key, document.uri));
|
||||||
|
contents.appendMarkdown(this.createDebugScriptMarkdown(key, document.uri));
|
||||||
let debugArgs = extractDebugArgFromScript(value[2]);
|
|
||||||
if (debugArgs) {
|
|
||||||
contents.appendMarkdown(this.createDebugScriptMarkdown(key, document.uri, debugArgs[0], debugArgs[1]));
|
|
||||||
}
|
|
||||||
hover = new Hover(contents);
|
hover = new Hover(contents);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -78,12 +74,10 @@ export class NpmScriptHoverProvider implements HoverProvider {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private createDebugScriptMarkdown(script: string, documentUri: Uri, protocol: string, port: number): string {
|
private createDebugScriptMarkdown(script: string, documentUri: Uri): string {
|
||||||
let args = {
|
const args = {
|
||||||
documentUri: documentUri,
|
documentUri: documentUri,
|
||||||
script: script,
|
script: script,
|
||||||
protocol: protocol,
|
|
||||||
port: port
|
|
||||||
};
|
};
|
||||||
return this.createMarkdownLink(
|
return this.createMarkdownLink(
|
||||||
localize('debugScript', 'Debug Script'),
|
localize('debugScript', 'Debug Script'),
|
||||||
|
@ -116,11 +110,9 @@ export class NpmScriptHoverProvider implements HoverProvider {
|
||||||
public debugScriptFromHover(args: any) {
|
public debugScriptFromHover(args: any) {
|
||||||
let script = args.script;
|
let script = args.script;
|
||||||
let documentUri = args.documentUri;
|
let documentUri = args.documentUri;
|
||||||
let protocol = args.protocol;
|
|
||||||
let port = args.port;
|
|
||||||
let folder = workspace.getWorkspaceFolder(documentUri);
|
let folder = workspace.getWorkspaceFolder(documentUri);
|
||||||
if (folder) {
|
if (folder) {
|
||||||
startDebugging(script, protocol, port, folder);
|
startDebugging(script, folder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import {
|
import {
|
||||||
TaskDefinition, Task2 as Task, TaskGroup, WorkspaceFolder, RelativePattern, ShellExecution, Uri, workspace,
|
TaskDefinition, Task, TaskGroup, WorkspaceFolder, RelativePattern, ShellExecution, Uri, workspace,
|
||||||
DebugConfiguration, debug, TaskProvider, TextDocument, tasks, TaskScope, QuickPickItem
|
DebugConfiguration, debug, TaskProvider, TextDocument, tasks, TaskScope, QuickPickItem
|
||||||
} from 'vscode';
|
} from 'vscode';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
@ -249,6 +249,8 @@ async function provideNpmScriptsForFolder(packageJsonUri: Uri): Promise<Task[]>
|
||||||
if (prePostScripts.has(each)) {
|
if (prePostScripts.has(each)) {
|
||||||
task.group = TaskGroup.Clean; // hack: use Clean group to tag pre/post scripts
|
task.group = TaskGroup.Clean; // hack: use Clean group to tag pre/post scripts
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// todo@connor4312: all scripts are now debuggable, what is a 'debug script'?
|
||||||
if (isDebugScript(scripts![each])) {
|
if (isDebugScript(scripts![each])) {
|
||||||
task.group = TaskGroup.Rebuild; // hack: use Rebuild group to tag debug scripts
|
task.group = TaskGroup.Rebuild; // hack: use Rebuild group to tag debug scripts
|
||||||
}
|
}
|
||||||
|
@ -355,44 +357,16 @@ export function runScript(script: string, document: TextDocument) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function extractDebugArgFromScript(scriptValue: string): [string, number] | undefined {
|
export function startDebugging(scriptName: string, folder: WorkspaceFolder) {
|
||||||
// matches --debug, --debug=1234, --debug-brk, debug-brk=1234, --inspect,
|
|
||||||
// --inspect=1234, --inspect-brk, --inspect-brk=1234,
|
|
||||||
// --inspect=localhost:1245, --inspect=127.0.0.1:1234, --inspect=[aa:1:0:0:0]:1234, --inspect=:1234
|
|
||||||
let match = scriptValue.match(/--(inspect|debug)(-brk)?(=((\[[0-9a-fA-F:]*\]|[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|[a-zA-Z0-9\.]*):)?(\d+))?/);
|
|
||||||
|
|
||||||
if (match) {
|
|
||||||
if (match[6]) {
|
|
||||||
return [match[1], parseInt(match[6])];
|
|
||||||
}
|
|
||||||
if (match[1] === 'inspect') {
|
|
||||||
return [match[1], 9229];
|
|
||||||
}
|
|
||||||
if (match[1] === 'debug') {
|
|
||||||
return [match[1], 5858];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function startDebugging(scriptName: string, protocol: string, port: number, folder: WorkspaceFolder) {
|
|
||||||
let p = 'inspector';
|
|
||||||
if (protocol === 'debug') {
|
|
||||||
p = 'legacy';
|
|
||||||
}
|
|
||||||
|
|
||||||
let packageManager = getPackageManager(folder);
|
|
||||||
const config: DebugConfiguration = {
|
const config: DebugConfiguration = {
|
||||||
type: 'node',
|
type: 'pwa-node',
|
||||||
request: 'launch',
|
request: 'launch',
|
||||||
name: `Debug ${scriptName}`,
|
name: `Debug ${scriptName}`,
|
||||||
runtimeExecutable: packageManager,
|
runtimeExecutable: getPackageManager(folder),
|
||||||
runtimeArgs: [
|
runtimeArgs: [
|
||||||
'run',
|
'run',
|
||||||
scriptName,
|
scriptName,
|
||||||
],
|
],
|
||||||
port: port,
|
|
||||||
protocol: p
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (folder) {
|
if (folder) {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "Dependencies shared by all extensions",
|
"description": "Dependencies shared by all extensions",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"typescript": "3.9.7"
|
"typescript": "4.0.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"postinstall": "node ./postinstall"
|
"postinstall": "node ./postinstall"
|
||||||
|
|
|
@ -6,11 +6,11 @@
|
||||||
"git": {
|
"git": {
|
||||||
"name": "language-php",
|
"name": "language-php",
|
||||||
"repositoryUrl": "https://github.com/atom/language-php",
|
"repositoryUrl": "https://github.com/atom/language-php",
|
||||||
"commitHash": "882f6c0e19f0ebf9dafa443bf4c3fc5626f76aed"
|
"commitHash": "11cdaf62a9d949d3aca550f1a58c9754de6b5ab0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "0.44.4"
|
"version": "0.44.5"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"version": 1
|
"version": 1
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue