mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-28 23:58:23 +01:00
Merge branch 'main' into rebornix/successful-xerinae
This commit is contained in:
@@ -10,7 +10,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
if: contains(github.event.issue.labels.*.name, 'author-verification-requested') && contains(github.event.issue.labels.*.name, 'insiders-released')
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "microsoft/vscode-github-triage-actions"
|
||||
ref: stable
|
||||
|
||||
@@ -8,7 +8,7 @@ jobs:
|
||||
if: github.event.ref == '1.999.0'
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "microsoft/vscode-github-triage-actions"
|
||||
ref: stable
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# TODO: rename azure-pipelines/linux/xvfb.init to github-actions
|
||||
- name: Setup Build Environment
|
||||
@@ -79,7 +79,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
@@ -141,7 +141,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
CHILD_CONCURRENCY: "1"
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
@@ -101,7 +101,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# TODO: rename azure-pipelines/linux/xvfb.init to github-actions
|
||||
- name: Setup Build Environment
|
||||
@@ -182,7 +182,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
@@ -254,7 +254,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
|
||||
@@ -9,7 +9,7 @@ jobs:
|
||||
if: ${{ contains(github.event.issue.labels.*.name, 'triage-needed') }}
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "microsoft/vscode-github-triage-actions"
|
||||
ref: stable
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "microsoft/vscode-github-triage-actions"
|
||||
ref: stable
|
||||
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "microsoft/vscode-github-triage-actions"
|
||||
ref: stable
|
||||
|
||||
@@ -9,7 +9,7 @@ jobs:
|
||||
if: ${{ ! contains(github.event.issue.labels.*.name, 'triage-needed') }}
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "microsoft/vscode-github-triage-actions"
|
||||
ref: stable
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
id: checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Azure CLI login
|
||||
id: az_login
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
if: contains(github.event.issue.labels.*.name, '*english-please')
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "microsoft/vscode-github-triage-actions"
|
||||
ref: stable
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
if: github.event_name != 'issues' || contains(github.event.issue.labels.*.name, 'feature-request')
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "microsoft/vscode-github-triage-actions"
|
||||
path: ./actions
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "microsoft/vscode-github-triage-actions"
|
||||
path: ./actions
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "microsoft/vscode-github-triage-actions"
|
||||
path: ./actions
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "microsoft/vscode-github-triage-actions"
|
||||
path: ./actions
|
||||
|
||||
@@ -9,7 +9,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "microsoft/vscode-github-triage-actions"
|
||||
path: ./actions
|
||||
|
||||
@@ -8,7 +8,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "microsoft/vscode-github-triage-actions"
|
||||
ref: stable
|
||||
|
||||
@@ -8,7 +8,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "microsoft/vscode-github-triage-actions"
|
||||
ref: stable
|
||||
|
||||
@@ -10,14 +10,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "microsoft/vscode-github-triage-actions"
|
||||
ref: stable
|
||||
path: ./actions
|
||||
- name: Checkout Repo
|
||||
if: github.event_name != 'issues'
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: ./repo
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -7,7 +7,7 @@ jobs:
|
||||
runs-on: 'ubuntu-latest'
|
||||
|
||||
steps:
|
||||
- uses: 'actions/checkout@v3'
|
||||
- uses: 'actions/checkout@v4'
|
||||
|
||||
- uses: 'actions/setup-node@v3'
|
||||
with:
|
||||
|
||||
@@ -10,7 +10,7 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
if: contains(github.event.issue.labels.*.name, 'testplan-item') || contains(github.event.issue.labels.*.name, 'invalid-testplan-item')
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "microsoft/vscode-github-triage-actions"
|
||||
path: ./actions
|
||||
|
||||
@@ -34,7 +34,7 @@ steps:
|
||||
displayName: Download openssl prebuilt
|
||||
inputs:
|
||||
command: custom
|
||||
customCommand: pack @vscode-internal/openssl-prebuilt@0.0.8
|
||||
customCommand: pack @vscode-internal/openssl-prebuilt@0.0.10
|
||||
customRegistry: useFeed
|
||||
customFeed: "Monaco/openssl-prebuilt"
|
||||
workingDir: $(Build.ArtifactStagingDirectory)
|
||||
@@ -42,7 +42,7 @@ steps:
|
||||
- script: |
|
||||
set -e
|
||||
mkdir $(Build.ArtifactStagingDirectory)/openssl
|
||||
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.8.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
|
||||
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.10.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
|
||||
displayName: Extract openssl prebuilt
|
||||
|
||||
# inspired by: https://github.com/emk/rust-musl-builder/blob/main/Dockerfile
|
||||
|
||||
@@ -23,7 +23,7 @@ steps:
|
||||
displayName: Download openssl prebuilt
|
||||
inputs:
|
||||
command: custom
|
||||
customCommand: pack @vscode-internal/openssl-prebuilt@0.0.8
|
||||
customCommand: pack @vscode-internal/openssl-prebuilt@0.0.10
|
||||
customRegistry: useFeed
|
||||
customFeed: "Monaco/openssl-prebuilt"
|
||||
workingDir: $(Build.ArtifactStagingDirectory)
|
||||
@@ -31,7 +31,7 @@ steps:
|
||||
- script: |
|
||||
set -e
|
||||
mkdir $(Build.ArtifactStagingDirectory)/openssl
|
||||
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.8.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
|
||||
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.10.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
|
||||
displayName: Extract openssl prebuilt
|
||||
|
||||
- template: ../cli/install-rust-posix.yml
|
||||
|
||||
@@ -26,7 +26,7 @@ steps:
|
||||
displayName: Download openssl prebuilt
|
||||
inputs:
|
||||
command: custom
|
||||
customCommand: pack @vscode-internal/openssl-prebuilt@0.0.8
|
||||
customCommand: pack @vscode-internal/openssl-prebuilt@0.0.10
|
||||
customRegistry: useFeed
|
||||
customFeed: "Monaco/openssl-prebuilt"
|
||||
workingDir: $(Build.ArtifactStagingDirectory)
|
||||
@@ -34,7 +34,7 @@ steps:
|
||||
- script: |
|
||||
set -e
|
||||
mkdir $(Build.ArtifactStagingDirectory)/openssl
|
||||
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.8.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
|
||||
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.10.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
|
||||
displayName: Extract openssl prebuilt
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true) }}:
|
||||
|
||||
@@ -26,14 +26,14 @@ steps:
|
||||
displayName: Download openssl prebuilt
|
||||
inputs:
|
||||
command: custom
|
||||
customCommand: pack @vscode-internal/openssl-prebuilt@0.0.8
|
||||
customCommand: pack @vscode-internal/openssl-prebuilt@0.0.10
|
||||
customRegistry: useFeed
|
||||
customFeed: "Monaco/openssl-prebuilt"
|
||||
workingDir: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- powershell: |
|
||||
mkdir $(Build.ArtifactStagingDirectory)/openssl
|
||||
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.8.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
|
||||
tar -xvzf $(Build.ArtifactStagingDirectory)/vscode-internal-openssl-prebuilt-0.0.10.tgz --strip-components=1 --directory=$(Build.ArtifactStagingDirectory)/openssl
|
||||
displayName: Extract openssl prebuilt
|
||||
|
||||
- template: ../cli/install-rust-win32.yml
|
||||
@@ -54,8 +54,8 @@ steps:
|
||||
VSCODE_CLI_ARTIFACT: unsigned_vscode_cli_win32_x64_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
VSCODE_CLI_ENV:
|
||||
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-windows-static-md/lib
|
||||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-windows-static-md/include
|
||||
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-windows-static/lib
|
||||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x64-windows-static/include
|
||||
RUSTFLAGS: "-C target-feature=+crt-static"
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_WIN32_ARM64, true) }}:
|
||||
@@ -66,8 +66,8 @@ steps:
|
||||
VSCODE_CLI_ARTIFACT: unsigned_vscode_cli_win32_arm64_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
VSCODE_CLI_ENV:
|
||||
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-windows-static-md/lib
|
||||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-windows-static-md/include
|
||||
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-windows-static/lib
|
||||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/arm64-windows-static/include
|
||||
RUSTFLAGS: "-C target-feature=+crt-static"
|
||||
|
||||
- ${{ if eq(parameters.VSCODE_BUILD_WIN32_32BIT, true) }}:
|
||||
@@ -78,6 +78,6 @@ steps:
|
||||
VSCODE_CLI_ARTIFACT: unsigned_vscode_cli_win32_ia32_cli
|
||||
VSCODE_CHECK_ONLY: ${{ parameters.VSCODE_CHECK_ONLY }}
|
||||
VSCODE_CLI_ENV:
|
||||
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/x86-windows-static-md/lib
|
||||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x86-windows-static-md/include
|
||||
OPENSSL_LIB_DIR: $(Build.ArtifactStagingDirectory)/openssl/x86-windows-static/lib
|
||||
OPENSSL_INCLUDE_DIR: $(Build.ArtifactStagingDirectory)/openssl/x86-windows-static/include
|
||||
RUSTFLAGS: "-C target-feature=+crt-static"
|
||||
|
||||
@@ -16,6 +16,7 @@ use serde::{Deserialize, Serialize};
|
||||
#[allow(non_camel_case_types)]
|
||||
pub enum ClientRequestMethod<'a> {
|
||||
servermsg(RefServerMessageParams<'a>),
|
||||
serverclose(ServerClosedParams),
|
||||
serverlog(ServerLog<'a>),
|
||||
makehttpreq(HttpRequestParams<'a>),
|
||||
version(VersionResponse),
|
||||
@@ -89,6 +90,11 @@ pub struct ServerMessageParams {
|
||||
pub body: Vec<u8>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Debug)]
|
||||
pub struct ServerClosedParams {
|
||||
pub i: u16,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Debug)]
|
||||
pub struct RefServerMessageParams<'a> {
|
||||
pub i: u16,
|
||||
|
||||
@@ -32,6 +32,7 @@ impl ServerBridge {
|
||||
match read.read(&mut read_buf).await {
|
||||
Err(_) => return,
|
||||
Ok(0) => {
|
||||
let _ = target.server_closed().await;
|
||||
return; // EOF
|
||||
}
|
||||
Ok(s) => {
|
||||
|
||||
@@ -9,7 +9,7 @@ use tokio::sync::mpsc;
|
||||
use crate::msgpack_rpc::MsgPackCaller;
|
||||
|
||||
use super::{
|
||||
protocol::{ClientRequestMethod, RefServerMessageParams, ToClientRequest},
|
||||
protocol::{ClientRequestMethod, RefServerMessageParams, ServerClosedParams, ToClientRequest},
|
||||
server_multiplexer::ServerMultiplexer,
|
||||
};
|
||||
|
||||
@@ -81,25 +81,43 @@ impl ServerMessageSink {
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn server_closed(&mut self) -> Result<(), mpsc::error::SendError<SocketSignal>> {
|
||||
self.server_message_or_closed(None).await
|
||||
}
|
||||
|
||||
pub async fn server_message(
|
||||
&mut self,
|
||||
body: &[u8],
|
||||
) -> Result<(), mpsc::error::SendError<SocketSignal>> {
|
||||
let id = self.id;
|
||||
self.server_message_or_closed(Some(body)).await
|
||||
}
|
||||
|
||||
async fn server_message_or_closed(
|
||||
&mut self,
|
||||
body: Option<&[u8]>,
|
||||
) -> Result<(), mpsc::error::SendError<SocketSignal>> {
|
||||
let i = self.id;
|
||||
let mut tx = self.tx.take().unwrap();
|
||||
let body = self.get_server_msg_content(body);
|
||||
let msg = RefServerMessageParams { i: id, body };
|
||||
let msg = body
|
||||
.map(|b| self.get_server_msg_content(b))
|
||||
.map(|body| RefServerMessageParams { i, body });
|
||||
|
||||
let r = match &mut tx {
|
||||
ServerMessageDestination::Channel(tx) => {
|
||||
tx.send(SocketSignal::from_message(&ToClientRequest {
|
||||
id: None,
|
||||
params: ClientRequestMethod::servermsg(msg),
|
||||
params: match msg {
|
||||
Some(msg) => ClientRequestMethod::servermsg(msg),
|
||||
None => ClientRequestMethod::serverclose(ServerClosedParams { i }),
|
||||
},
|
||||
}))
|
||||
.await
|
||||
}
|
||||
ServerMessageDestination::Rpc(caller) => {
|
||||
caller.notify("servermsg", msg);
|
||||
match msg {
|
||||
Some(msg) => caller.notify("servermsg", msg),
|
||||
None => caller.notify("serverclose", ServerClosedParams { i }),
|
||||
};
|
||||
Ok(())
|
||||
}
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"watch": "gulp watch-extension:configuration-editing"
|
||||
},
|
||||
"dependencies": {
|
||||
"jsonc-parser": "^2.2.1",
|
||||
"jsonc-parser": "^3.2.0",
|
||||
"@octokit/rest": "19.0.4",
|
||||
"tunnel": "^0.0.6"
|
||||
},
|
||||
|
||||
@@ -3,41 +3,39 @@
|
||||
|
||||
|
||||
"@octokit/auth-token@^3.0.0":
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-3.0.2.tgz#a0fc8de149fd15876e1ac78f6525c1c5ab48435f"
|
||||
integrity sha512-pq7CwIMV1kmzkFTimdwjAINCXKTajZErLB4wMLYapR2nuB/Jpr66+05wOTZMSCBXP6n4DdDWT2W19Bm17vU69Q==
|
||||
dependencies:
|
||||
"@octokit/types" "^8.0.0"
|
||||
version "3.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-3.0.4.tgz#70e941ba742bdd2b49bdb7393e821dea8520a3db"
|
||||
integrity sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ==
|
||||
|
||||
"@octokit/core@^4.0.0":
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/core/-/core-4.1.0.tgz#b6b03a478f1716de92b3f4ec4fd64d05ba5a9251"
|
||||
integrity sha512-Czz/59VefU+kKDy+ZfDwtOIYIkFjExOKf+HA92aiTZJ6EfWpFzYQWw0l54ji8bVmyhc+mGaLUbSUmXazG7z5OQ==
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/core/-/core-4.2.4.tgz#d8769ec2b43ff37cc3ea89ec4681a20ba58ef907"
|
||||
integrity sha512-rYKilwgzQ7/imScn3M9/pFfUf4I1AZEH3KhyJmtPdE2zfaXAn2mFfUy4FbKewzc2We5y/LlKLj36fWJLKC2SIQ==
|
||||
dependencies:
|
||||
"@octokit/auth-token" "^3.0.0"
|
||||
"@octokit/graphql" "^5.0.0"
|
||||
"@octokit/request" "^6.0.0"
|
||||
"@octokit/request-error" "^3.0.0"
|
||||
"@octokit/types" "^8.0.0"
|
||||
"@octokit/types" "^9.0.0"
|
||||
before-after-hook "^2.2.0"
|
||||
universal-user-agent "^6.0.0"
|
||||
|
||||
"@octokit/endpoint@^7.0.0":
|
||||
version "7.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-7.0.3.tgz#0b96035673a9e3bedf8bab8f7335de424a2147ed"
|
||||
integrity sha512-57gRlb28bwTsdNXq+O3JTQ7ERmBTuik9+LelgcLIVfYwf235VHbN9QNo4kXExtp/h8T423cR5iJThKtFYxC7Lw==
|
||||
version "7.0.6"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-7.0.6.tgz#791f65d3937555141fb6c08f91d618a7d645f1e2"
|
||||
integrity sha512-5L4fseVRUsDFGR00tMWD/Trdeeihn999rTMGRMC1G/Ldi1uWlWJzI98H4Iak5DB/RVvQuyMYKqSK/R6mbSOQyg==
|
||||
dependencies:
|
||||
"@octokit/types" "^8.0.0"
|
||||
"@octokit/types" "^9.0.0"
|
||||
is-plain-object "^5.0.0"
|
||||
universal-user-agent "^6.0.0"
|
||||
|
||||
"@octokit/graphql@^5.0.0":
|
||||
version "5.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-5.0.4.tgz#519dd5c05123868276f3ae4e50ad565ed7dff8c8"
|
||||
integrity sha512-amO1M5QUQgYQo09aStR/XO7KAl13xpigcy/kI8/N1PnZYSS69fgte+xA4+c2DISKqUZfsh0wwjc2FaCt99L41A==
|
||||
version "5.0.6"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-5.0.6.tgz#9eac411ac4353ccc5d3fca7d76736e6888c5d248"
|
||||
integrity sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw==
|
||||
dependencies:
|
||||
"@octokit/request" "^6.0.0"
|
||||
"@octokit/types" "^8.0.0"
|
||||
"@octokit/types" "^9.0.0"
|
||||
universal-user-agent "^6.0.0"
|
||||
|
||||
"@octokit/openapi-types@^13.11.0":
|
||||
@@ -50,6 +48,11 @@
|
||||
resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-14.0.0.tgz#949c5019028c93f189abbc2fb42f333290f7134a"
|
||||
integrity sha512-HNWisMYlR8VCnNurDU6os2ikx0s0VyEjDYHNS/h4cgb8DeOxQ0n72HyinUtdDVxJhFy3FWLGl0DJhfEWk3P5Iw==
|
||||
|
||||
"@octokit/openapi-types@^18.0.0":
|
||||
version "18.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-18.0.0.tgz#f43d765b3c7533fd6fb88f3f25df079c24fccf69"
|
||||
integrity sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw==
|
||||
|
||||
"@octokit/plugin-paginate-rest@^4.0.0":
|
||||
version "4.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-4.3.1.tgz#553e653ee0318605acd23bf3a799c8bfafdedae3"
|
||||
@@ -63,30 +66,30 @@
|
||||
integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA==
|
||||
|
||||
"@octokit/plugin-rest-endpoint-methods@^6.0.0":
|
||||
version "6.7.0"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.7.0.tgz#2f6f17f25b6babbc8b41d2bb0a95a8839672ce7c"
|
||||
integrity sha512-orxQ0fAHA7IpYhG2flD2AygztPlGYNAdlzYz8yrD8NDgelPfOYoRPROfEyIe035PlxvbYrgkfUZIhSBKju/Cvw==
|
||||
version "6.8.1"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.8.1.tgz#97391fda88949eb15f68dc291957ccbe1d3e8ad1"
|
||||
integrity sha512-QrlaTm8Lyc/TbU7BL/8bO49vp+RZ6W3McxxmmQTgYxf2sWkO8ZKuj4dLhPNJD6VCUW1hetCmeIM0m6FTVpDiEg==
|
||||
dependencies:
|
||||
"@octokit/types" "^8.0.0"
|
||||
"@octokit/types" "^8.1.1"
|
||||
deprecation "^2.3.1"
|
||||
|
||||
"@octokit/request-error@^3.0.0":
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-3.0.2.tgz#f74c0f163d19463b87528efe877216c41d6deb0a"
|
||||
integrity sha512-WMNOFYrSaX8zXWoJg9u/pKgWPo94JXilMLb2VManNOby9EZxrQaBe/QSC4a1TzpAlpxofg2X/jMnCyZgL6y7eg==
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-3.0.3.tgz#ef3dd08b8e964e53e55d471acfe00baa892b9c69"
|
||||
integrity sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==
|
||||
dependencies:
|
||||
"@octokit/types" "^8.0.0"
|
||||
"@octokit/types" "^9.0.0"
|
||||
deprecation "^2.0.0"
|
||||
once "^1.4.0"
|
||||
|
||||
"@octokit/request@^6.0.0":
|
||||
version "6.2.2"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/request/-/request-6.2.2.tgz#a2ba5ac22bddd5dcb3f539b618faa05115c5a255"
|
||||
integrity sha512-6VDqgj0HMc2FUX2awIs+sM6OwLgwHvAi4KCK3mT2H2IKRt6oH9d0fej5LluF5mck1lRR/rFWN0YIDSYXYSylbw==
|
||||
version "6.2.8"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/request/-/request-6.2.8.tgz#aaf480b32ab2b210e9dadd8271d187c93171d8eb"
|
||||
integrity sha512-ow4+pkVQ+6XVVsekSYBzJC0VTVvh/FCTUUgTsboGq+DTeWdyIFV8WSCdo0RIxk6wSkBTHqIK1mYuY7nOBXOchw==
|
||||
dependencies:
|
||||
"@octokit/endpoint" "^7.0.0"
|
||||
"@octokit/request-error" "^3.0.0"
|
||||
"@octokit/types" "^8.0.0"
|
||||
"@octokit/types" "^9.0.0"
|
||||
is-plain-object "^5.0.0"
|
||||
node-fetch "^2.6.7"
|
||||
universal-user-agent "^6.0.0"
|
||||
@@ -108,13 +111,20 @@
|
||||
dependencies:
|
||||
"@octokit/openapi-types" "^13.11.0"
|
||||
|
||||
"@octokit/types@^8.0.0":
|
||||
version "8.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/types/-/types-8.1.1.tgz#92e304e0f00d563667dfdbe0ae6b52e70d5149bb"
|
||||
integrity sha512-7tjk+6DyhYAmei8FOEwPfGKc0VE1x56CKPJ+eE44zhDbOyMT+9yan8apfQFxo8oEFsy+0O7PiBtH8w0Yo0Y9Kw==
|
||||
"@octokit/types@^8.1.1":
|
||||
version "8.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/types/-/types-8.2.1.tgz#a6de091ae68b5541f8d4fcf9a12e32836d4648aa"
|
||||
integrity sha512-8oWMUji8be66q2B9PmEIUyQm00VPDPun07umUWSaCwxmeaquFBro4Hcc3ruVoDo3zkQyZBlRvhIMEYS3pBhanw==
|
||||
dependencies:
|
||||
"@octokit/openapi-types" "^14.0.0"
|
||||
|
||||
"@octokit/types@^9.0.0":
|
||||
version "9.3.2"
|
||||
resolved "https://registry.yarnpkg.com/@octokit/types/-/types-9.3.2.tgz#3f5f89903b69f6a2d196d78ec35f888c0013cac5"
|
||||
integrity sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==
|
||||
dependencies:
|
||||
"@octokit/openapi-types" "^18.0.0"
|
||||
|
||||
"@types/node@18.x":
|
||||
version "18.15.13"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.13.tgz#f64277c341150c979e42b00e4ac289290c9df469"
|
||||
@@ -135,15 +145,15 @@ is-plain-object@^5.0.0:
|
||||
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344"
|
||||
integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==
|
||||
|
||||
jsonc-parser@^2.2.1:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.1.tgz#db73cd59d78cce28723199466b2a03d1be1df2bc"
|
||||
integrity sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w==
|
||||
jsonc-parser@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76"
|
||||
integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==
|
||||
|
||||
node-fetch@^2.6.7:
|
||||
version "2.6.8"
|
||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.8.tgz#a68d30b162bc1d8fd71a367e81b997e1f4d4937e"
|
||||
integrity sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==
|
||||
version "2.7.0"
|
||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d"
|
||||
integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==
|
||||
dependencies:
|
||||
whatwg-url "^5.0.0"
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
"watch": "gulp watch-extension:extension-editing"
|
||||
},
|
||||
"dependencies": {
|
||||
"jsonc-parser": "^2.2.1",
|
||||
"jsonc-parser": "^3.2.0",
|
||||
"markdown-it": "^12.3.2",
|
||||
"parse5": "^3.0.2"
|
||||
},
|
||||
|
||||
@@ -127,7 +127,7 @@ export class ExtensionLinter {
|
||||
|
||||
const tree = parseTree(document.getText());
|
||||
const info = this.readPackageJsonInfo(this.getUriFolder(document.uri), tree);
|
||||
if (info.isExtension) {
|
||||
if (tree && info.isExtension) {
|
||||
|
||||
const icon = findNodeAtLocation(tree, ['icon']);
|
||||
if (icon && icon.type === 'string') {
|
||||
|
||||
@@ -27,15 +27,15 @@ entities@~2.1.0:
|
||||
resolved "https://registry.yarnpkg.com/entities/-/entities-2.1.0.tgz#992d3129cf7df6870b96c57858c249a120f8b8b5"
|
||||
integrity sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==
|
||||
|
||||
jsonc-parser@^2.2.1:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.1.tgz#db73cd59d78cce28723199466b2a03d1be1df2bc"
|
||||
integrity sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w==
|
||||
jsonc-parser@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76"
|
||||
integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==
|
||||
|
||||
linkify-it@^3.0.1:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.2.tgz#f55eeb8bc1d3ae754049e124ab3bb56d97797fb8"
|
||||
integrity sha512-gDBO4aHNZS6coiZCKVhSNh43F9ioIL4JwRjLZPkoLIY4yZFwg264Y5lu2x6rb1Js42Gh6Yqm2f6L2AJcnkzinQ==
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.3.tgz#a98baf44ce45a550efb4d49c769d07524cc2fa2e"
|
||||
integrity sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==
|
||||
dependencies:
|
||||
uc.micro "^1.0.1"
|
||||
|
||||
|
||||
@@ -260,6 +260,7 @@ export class AzureActiveDirectoryService {
|
||||
this._logger.trace(`[${scopeData.scopeStr}] '${token.sessionId}' Found a matching token with a different scopes '${token.scope}'. Attempting to get a new session using the existing session.`);
|
||||
try {
|
||||
const itoken = await this.doRefreshToken(token.refreshToken, scopeData);
|
||||
this._sessionChangeEmitter.fire({ added: [this.convertToSessionSync(itoken)], removed: [], changed: [] });
|
||||
matchingTokens.push(itoken);
|
||||
} catch (err) {
|
||||
this._logger.error(`[${scopeData.scopeStr}] Attempted to get a new session using the existing session with scopes '${token.scope}' but it failed due to: ${err.message ?? err}`);
|
||||
|
||||
@@ -31,18 +31,23 @@
|
||||
"configuration": "./perl.language-configuration.json"
|
||||
},
|
||||
{
|
||||
"id": "perl6",
|
||||
"id": "raku",
|
||||
"aliases": [
|
||||
"Perl 6",
|
||||
"Raku",
|
||||
"Perl6",
|
||||
"perl6"
|
||||
],
|
||||
"extensions": [
|
||||
".raku",
|
||||
".rakumod",
|
||||
".rakutest",
|
||||
".rakudoc",
|
||||
".nqp",
|
||||
".p6",
|
||||
".pl6",
|
||||
".pm6",
|
||||
".nqp"
|
||||
".pm6"
|
||||
],
|
||||
"firstLine": "(^#!.*\\bperl6\\b)|use\\s+v6",
|
||||
"firstLine": "(^#!.*\\bperl6\\b)|use\\s+v6|raku|=begin\\spod|my\\sclass",
|
||||
"configuration": "./perl6.language-configuration.json"
|
||||
}
|
||||
],
|
||||
@@ -56,7 +61,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"language": "perl6",
|
||||
"language": "raku",
|
||||
"scopeName": "source.perl.6",
|
||||
"path": "./syntaxes/perl6.tmLanguage.json"
|
||||
}
|
||||
|
||||
@@ -278,18 +278,14 @@
|
||||
}
|
||||
],
|
||||
"colors": {
|
||||
|
||||
"editor.background": "#000c18",
|
||||
"editor.foreground": "#6688cc",
|
||||
|
||||
// Base
|
||||
// "foreground": "",
|
||||
"focusBorder": "#596F99",
|
||||
// "contrastActiveBorder": "",
|
||||
// "contrastBorder": "",
|
||||
|
||||
// "widget.shadow": "",
|
||||
|
||||
"input.background": "#181f2f",
|
||||
// "input.border": "",
|
||||
// "input.foreground": "",
|
||||
@@ -300,17 +296,13 @@
|
||||
"inputValidation.warningBorder": "#5B7E7A",
|
||||
"inputValidation.errorBackground": "#A22D44",
|
||||
"inputValidation.errorBorder": "#AB395B",
|
||||
|
||||
"badge.background": "#0063a5",
|
||||
"progressBar.background": "#0063a5",
|
||||
|
||||
"dropdown.background": "#181f2f",
|
||||
// "dropdown.foreground": "",
|
||||
// "dropdown.border": "",
|
||||
|
||||
"button.background": "#2B3C5D",
|
||||
// "button.foreground": "",
|
||||
|
||||
"list.activeSelectionBackground": "#08286b",
|
||||
// "list.activeSelectionForeground": "",
|
||||
"quickInputList.focusBackground": "#08286b",
|
||||
@@ -318,12 +310,10 @@
|
||||
"list.inactiveSelectionBackground": "#152037",
|
||||
"list.dropBackground": "#041D52",
|
||||
"list.highlightForeground": "#0063a5",
|
||||
|
||||
"scrollbar.shadow": "#515E91AA",
|
||||
"scrollbarSlider.activeBackground": "#3B3F5188",
|
||||
"scrollbarSlider.background": "#1F2230AA",
|
||||
"scrollbarSlider.hoverBackground": "#3B3F5188",
|
||||
|
||||
// Editor
|
||||
"editorWidget.background": "#262641",
|
||||
"editorCursor.foreground": "#ddbb88",
|
||||
@@ -350,14 +340,12 @@
|
||||
// "editor.selectionHighlightBackground": "",
|
||||
// "editor.wordHighlightBackground": "",
|
||||
// "editor.wordHighlightStrongBackground": "",
|
||||
|
||||
// Editor: Suggest Widget
|
||||
// "editorSuggestWidget.background": "",
|
||||
// "editorSuggestWidget.border": "",
|
||||
// "editorSuggestWidget.foreground": "",
|
||||
// "editorSuggestWidget.highlightForeground": "",
|
||||
// "editorSuggestWidget.selectedBackground": "",
|
||||
|
||||
// Editor: Peek View
|
||||
"peekViewResult.background": "#060621",
|
||||
// "peekViewResult.lineForeground": "",
|
||||
@@ -371,7 +359,6 @@
|
||||
"peekViewResult.matchHighlightBackground": "#eeeeee44",
|
||||
// "peekViewTitleLabel.foreground": "",
|
||||
// "peekViewTitleDescription.foreground": "",
|
||||
|
||||
// Ports
|
||||
"ports.iconRunningProcessForeground": "#80a2c2",
|
||||
// Editor: Diff
|
||||
@@ -379,23 +366,18 @@
|
||||
// "diffEditor.insertedTextBorder": "",
|
||||
"diffEditor.removedTextBackground": "#892F4688",
|
||||
// "diffEditor.removedTextBorder": "",
|
||||
|
||||
|
||||
// Editor: Minimap
|
||||
"minimap.selectionHighlight": "#750000",
|
||||
|
||||
// Workbench: Title
|
||||
"titleBar.activeBackground": "#10192c",
|
||||
// "titleBar.activeForeground": "",
|
||||
// "titleBar.inactiveBackground": "",
|
||||
// "titleBar.inactiveForeground": "",
|
||||
|
||||
// Workbench: Editors
|
||||
// "editorGroupHeader.noTabsBackground": "",
|
||||
"editorGroup.border": "#2b2b4a",
|
||||
"editorGroup.dropBackground": "#25375daa",
|
||||
"editorGroupHeader.tabsBackground": "#1c1c2a",
|
||||
|
||||
// Workbench: Tabs
|
||||
"tab.border": "#2b2b4a",
|
||||
// "tab.activeBackground": "",
|
||||
@@ -403,26 +385,21 @@
|
||||
// "tab.activeForeground": "",
|
||||
// "tab.inactiveForeground": "",
|
||||
"tab.lastPinnedBorder": "#2b3c5d",
|
||||
|
||||
// Workbench: Activity Bar
|
||||
"activityBar.background": "#051336",
|
||||
// "activityBar.foreground": "",
|
||||
// "activityBarBadge.background": "",
|
||||
// "activityBarBadge.foreground": "",
|
||||
"activityBarItem.profilesBackground": "#082877",
|
||||
|
||||
// Workbench: Panel
|
||||
// "panel.background": "",
|
||||
"panel.border": "#2b2b4a",
|
||||
// "panelTitle.activeBorder": "",
|
||||
// "panelTitle.activeForeground": "",
|
||||
// "panelTitle.inactiveForeground": "",
|
||||
|
||||
// Workbench: Side Bar
|
||||
"sideBar.background": "#060621",
|
||||
// "sideBarTitle.foreground": "",
|
||||
"sideBarSectionHeader.background": "#10192c",
|
||||
|
||||
// Workbench: Status Bar
|
||||
"statusBar.background": "#10192c",
|
||||
"statusBar.noFolderBackground": "#10192c",
|
||||
@@ -433,20 +410,16 @@
|
||||
"statusBarItem.prominentHoverBackground": "#0063a5dd",
|
||||
// "statusBarItem.activeBackground": "",
|
||||
// "statusBarItem.hoverBackground": "",
|
||||
|
||||
// Workbench: Debug
|
||||
"debugToolBar.background": "#051336",
|
||||
"debugExceptionWidget.background": "#051336",
|
||||
"debugExceptionWidget.border": "#AB395B",
|
||||
|
||||
// Workbench: Quick Open
|
||||
"pickerGroup.border": "#596F99",
|
||||
"pickerGroup.foreground": "#596F99",
|
||||
|
||||
// Workbench: Extensions
|
||||
"extensionButton.prominentBackground": "#5f8b3b",
|
||||
"extensionButton.prominentHoverBackground": "#5f8b3bbb",
|
||||
|
||||
// Workbench: Terminal
|
||||
"terminal.ansiBlack": "#111111",
|
||||
"terminal.ansiRed": "#ff9da4",
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
"source.cpp keyword.operator.new",
|
||||
"keyword.operator.delete",
|
||||
"keyword.other.using",
|
||||
"keyword.other.directive.using",
|
||||
"keyword.other.operator",
|
||||
"entity.name.operator"
|
||||
],
|
||||
|
||||
@@ -406,6 +406,7 @@
|
||||
"source.cpp keyword.operator.new",
|
||||
"source.cpp keyword.operator.delete",
|
||||
"keyword.other.using",
|
||||
"keyword.other.directive.using",
|
||||
"keyword.other.operator"
|
||||
],
|
||||
"settings": {
|
||||
|
||||
@@ -442,6 +442,7 @@
|
||||
"source.cpp keyword.operator.new",
|
||||
"source.cpp keyword.operator.delete",
|
||||
"keyword.other.using",
|
||||
"keyword.other.directive.using",
|
||||
"keyword.other.operator",
|
||||
"entity.name.operator"
|
||||
],
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
"source.cpp keyword.operator.new",
|
||||
"source.cpp keyword.operator.delete",
|
||||
"keyword.other.using",
|
||||
"keyword.other.directive.using",
|
||||
"keyword.other.operator",
|
||||
"entity.name.operator"
|
||||
],
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
"ports.iconRunningProcessForeground": "#369432",
|
||||
"activityBar.background": "#221a0f",
|
||||
"activityBar.foreground": "#d3af86",
|
||||
"activityBarItem.profilesBackground": "#47351d",
|
||||
"sideBar.background": "#362712",
|
||||
"menu.background": "#362712",
|
||||
"menu.foreground": "#CCCCCC",
|
||||
@@ -124,6 +123,7 @@
|
||||
"keyword.operator.new.cpp",
|
||||
"keyword.operator.delete.cpp",
|
||||
"keyword.other.using",
|
||||
"keyword.other.directive.using",
|
||||
"keyword.other.operator"
|
||||
],
|
||||
"settings": {
|
||||
|
||||
@@ -269,6 +269,7 @@
|
||||
"keyword.operator.new.cpp",
|
||||
"keyword.operator.delete.cpp",
|
||||
"keyword.other.using",
|
||||
"keyword.other.directive.using",
|
||||
"keyword.other.operator"
|
||||
],
|
||||
"settings": {
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
"statusBar.noFolderBackground": "#001126",
|
||||
"statusBar.debuggingBackground": "#001126",
|
||||
"activityBar.background": "#001733",
|
||||
"activityBarItem.profilesBackground": "#003271",
|
||||
"progressBar.background": "#bbdaffcc",
|
||||
"badge.background": "#bbdaffcc",
|
||||
"badge.foreground": "#001733",
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
"textSearchProvider",
|
||||
"timeline",
|
||||
"tokenInformation",
|
||||
"treeViewActiveItem",
|
||||
"treeViewActiveItem",
|
||||
"treeViewReveal",
|
||||
"workspaceTrust",
|
||||
"telemetry",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:vscode-colorize-tests ./tsconfig.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"jsonc-parser": "2.2.1"
|
||||
"jsonc-parser": "^3.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "18.x"
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# Example taken from https://en.wikipedia.org/wiki/Raku_(programming_language)
|
||||
class Point is rw {
|
||||
has $.x;
|
||||
has $.y;
|
||||
|
||||
method distance( Point $p ) {
|
||||
sqrt(($!x - $p.x) ** 2 + ($!y - $p.y) ** 2)
|
||||
}
|
||||
|
||||
method distance-to-center {
|
||||
self.distance: Point.new(x => 0, y => 0)
|
||||
}
|
||||
}
|
||||
|
||||
my $point = Point.new( x => 1.2, y => -3.7 );
|
||||
say "Point's location: (", $point.x, ', ', $point.y, ')';
|
||||
# OUTPUT: Point's location: (1.2, -3.7)
|
||||
|
||||
# Changing x and y (note methods "x" and "y" used as lvalues):
|
||||
$point.x = 3;
|
||||
$point.y = 4;
|
||||
say "Point's location: (", $point.x, ', ', $point.y, ')';
|
||||
# OUTPUT: Point's location: (3, 4)
|
||||
|
||||
my $other-point = Point.new(x => -5, y => 10);
|
||||
$point.distance($other-point); #=> 10
|
||||
$point.distance-to-center; #=> 5
|
||||
@@ -3,14 +3,14 @@
|
||||
"c": "using",
|
||||
"t": "source.cs keyword.other.directive.using.cs",
|
||||
"r": {
|
||||
"dark_plus": "keyword: #569CD6",
|
||||
"light_plus": "keyword: #0000FF",
|
||||
"dark_plus": "keyword.other.directive.using: #C586C0",
|
||||
"light_plus": "keyword.other.directive.using: #AF00DB",
|
||||
"dark_vs": "keyword: #569CD6",
|
||||
"light_vs": "keyword: #0000FF",
|
||||
"hc_black": "keyword: #569CD6",
|
||||
"dark_modern": "keyword: #569CD6",
|
||||
"hc_light": "keyword: #0F4A85",
|
||||
"light_modern": "keyword: #0000FF"
|
||||
"hc_black": "keyword.other.directive.using: #C586C0",
|
||||
"dark_modern": "keyword.other.directive.using: #C586C0",
|
||||
"hc_light": "keyword.other.directive.using: #B5200D",
|
||||
"light_modern": "keyword.other.directive.using: #AF00DB"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.13.tgz#f64277c341150c979e42b00e4ac289290c9df469"
|
||||
integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==
|
||||
|
||||
jsonc-parser@2.2.1:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-2.2.1.tgz#db73cd59d78cce28723199466b2a03d1be1df2bc"
|
||||
integrity sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w==
|
||||
jsonc-parser@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76"
|
||||
integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==
|
||||
|
||||
+1
-1
@@ -210,7 +210,7 @@
|
||||
"ts-loader": "^9.4.2",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsec": "0.2.7",
|
||||
"typescript": "^5.3.0-dev.20230905",
|
||||
"typescript": "^5.3.0-dev.20230911",
|
||||
"typescript-formatter": "7.1.0",
|
||||
"underscore": "^1.12.1",
|
||||
"util": "^0.12.4",
|
||||
|
||||
@@ -27,6 +27,7 @@ export class ToggleCollapseUnchangedRegions extends Action2 {
|
||||
toggled: ContextKeyExpr.has('config.diffEditor.hideUnchangedRegions.enabled'),
|
||||
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
||||
menu: {
|
||||
when: ContextKeyExpr.has('isInDiffEditor'),
|
||||
id: MenuId.EditorTitle,
|
||||
order: 22,
|
||||
group: 'navigation',
|
||||
@@ -84,6 +85,7 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
|
||||
id: new ToggleUseInlineViewWhenSpaceIsLimited().desc.id,
|
||||
title: localize('useInlineViewWhenSpaceIsLimited', "Use Inline View When Space Is Limited"),
|
||||
toggled: ContextKeyExpr.has('config.diffEditor.useInlineViewWhenSpaceIsLimited'),
|
||||
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
||||
},
|
||||
order: 11,
|
||||
group: '1_diff',
|
||||
@@ -99,6 +101,7 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
|
||||
title: localize('showMoves', "Show Moved Code Blocks"),
|
||||
icon: Codicon.move,
|
||||
toggled: ContextKeyEqualsExpr.create('config.diffEditor.experimental.showMoves', true),
|
||||
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
||||
},
|
||||
order: 10,
|
||||
group: '1_diff',
|
||||
@@ -239,6 +242,7 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
|
||||
command: {
|
||||
id: AccessibleDiffViewerNext.id,
|
||||
title: localize('Open Accessible Diff Viewer', "Open Accessible Diff Viewer"),
|
||||
precondition: ContextKeyExpr.has('isInDiffEditor'),
|
||||
},
|
||||
order: 10,
|
||||
group: '2_diff',
|
||||
|
||||
@@ -2038,6 +2038,11 @@ export interface IEditorHoverOptions {
|
||||
* Defaults to true.
|
||||
*/
|
||||
sticky?: boolean;
|
||||
/**
|
||||
* Controls how long the hover is visible after you hovered out of it.
|
||||
* Require sticky setting to be true.
|
||||
*/
|
||||
hidingDelay?: number;
|
||||
/**
|
||||
* Should the hover be shown above the line if possible?
|
||||
* Defaults to false.
|
||||
@@ -2056,6 +2061,7 @@ class EditorHover extends BaseEditorOption<EditorOption.hover, IEditorHoverOptio
|
||||
const defaults: EditorHoverOptions = {
|
||||
enabled: true,
|
||||
delay: 300,
|
||||
hidingDelay: 300,
|
||||
sticky: true,
|
||||
above: true,
|
||||
};
|
||||
@@ -2079,6 +2085,12 @@ class EditorHover extends BaseEditorOption<EditorOption.hover, IEditorHoverOptio
|
||||
default: defaults.sticky,
|
||||
description: nls.localize('hover.sticky', "Controls whether the hover should remain visible when mouse is moved over it.")
|
||||
},
|
||||
'editor.hover.hidingDelay': {
|
||||
type: 'integer',
|
||||
minimum: 0,
|
||||
default: defaults.hidingDelay,
|
||||
description: nls.localize('hover.hidingDelay', "Controls the delay in milliseconds after thich the hover is hidden. Requires `editor.hover.sticky` to be enabled.")
|
||||
},
|
||||
'editor.hover.above': {
|
||||
type: 'boolean',
|
||||
default: defaults.above,
|
||||
@@ -2097,6 +2109,7 @@ class EditorHover extends BaseEditorOption<EditorOption.hover, IEditorHoverOptio
|
||||
enabled: boolean(input.enabled, this.defaultValue.enabled),
|
||||
delay: EditorIntOption.clampedInt(input.delay, this.defaultValue.delay, 0, 10000),
|
||||
sticky: boolean(input.sticky, this.defaultValue.sticky),
|
||||
hidingDelay: EditorIntOption.clampedInt(input.hidingDelay, this.defaultValue.hidingDelay, 0, 600000),
|
||||
above: boolean(input.above, this.defaultValue.above),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { KeyChord, KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
||||
import { DisposableStore, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { Disposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { ICodeEditor, IEditorMouseEvent, IPartialEditorMouseEvent, MouseTargetType } from 'vs/editor/browser/editorBrowser';
|
||||
import { EditorAction, EditorContributionInstantiation, registerEditorAction, registerEditorContribution, ServicesAccessor } from 'vs/editor/browser/editorExtensions';
|
||||
import { ConfigurationChangedEvent, EditorOption } from 'vs/editor/common/config/editorOptions';
|
||||
@@ -31,18 +31,18 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { ResultKind } from 'vs/platform/keybinding/common/keybindingResolver';
|
||||
import * as nls from 'vs/nls';
|
||||
import 'vs/css!./hover';
|
||||
import { RunOnceScheduler } from 'vs/base/common/async';
|
||||
|
||||
// sticky hover widget which doesn't disappear on focus out and such
|
||||
const _sticky = false
|
||||
// || Boolean("true") // done "weirdly" so that a lint warning prevents you from pushing this
|
||||
;
|
||||
|
||||
export class ModesHoverController implements IEditorContribution {
|
||||
export class ModesHoverController extends Disposable implements IEditorContribution {
|
||||
|
||||
public static readonly ID = 'editor.contrib.hover';
|
||||
|
||||
private readonly _toUnhook = new DisposableStore();
|
||||
private readonly _didChangeConfigurationHandler: IDisposable;
|
||||
|
||||
private _contentWidget: ContentHoverController | null;
|
||||
|
||||
@@ -54,7 +54,10 @@ export class ModesHoverController implements IEditorContribution {
|
||||
private _hoverClicked: boolean;
|
||||
private _isHoverEnabled!: boolean;
|
||||
private _isHoverSticky!: boolean;
|
||||
private _hidingDelay!: number;
|
||||
private _hoverActivatedByColorDecoratorClick: boolean = false;
|
||||
private _reactToEditorMouseMoveRunner: RunOnceScheduler;
|
||||
private _mouseMoveEvent: IEditorMouseEvent | undefined;
|
||||
|
||||
static get(editor: ICodeEditor): ModesHoverController | null {
|
||||
return editor.getContribution<ModesHoverController>(ModesHoverController.ID);
|
||||
@@ -66,19 +69,24 @@ export class ModesHoverController implements IEditorContribution {
|
||||
@ILanguageService private readonly _languageService: ILanguageService,
|
||||
@IKeybindingService private readonly _keybindingService: IKeybindingService
|
||||
) {
|
||||
super();
|
||||
this._isMouseDown = false;
|
||||
this._hoverClicked = false;
|
||||
this._contentWidget = null;
|
||||
this._glyphWidget = null;
|
||||
this._reactToEditorMouseMoveRunner = this._register(new RunOnceScheduler(() => this._reactToEditorMouseMove(this._mouseMoveEvent), 0));
|
||||
|
||||
this._hookEvents();
|
||||
|
||||
this._didChangeConfigurationHandler = this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => {
|
||||
this._register(this._editor.onDidChangeConfiguration((e: ConfigurationChangedEvent) => {
|
||||
if (e.hasChanged(EditorOption.hover)) {
|
||||
this._unhookEvents();
|
||||
this._hookEvents();
|
||||
}
|
||||
});
|
||||
}));
|
||||
this._register(this._editor.onMouseLeave(() => {
|
||||
this._mouseMoveEvent = undefined;
|
||||
this._reactToEditorMouseMoveRunner.cancel();
|
||||
}));
|
||||
}
|
||||
|
||||
private _hookEvents(): void {
|
||||
@@ -87,6 +95,7 @@ export class ModesHoverController implements IEditorContribution {
|
||||
const hoverOpts = this._editor.getOption(EditorOption.hover);
|
||||
this._isHoverEnabled = hoverOpts.enabled;
|
||||
this._isHoverSticky = hoverOpts.sticky;
|
||||
this._hidingDelay = hoverOpts.hidingDelay;
|
||||
if (this._isHoverEnabled) {
|
||||
this._toUnhook.add(this._editor.onMouseDown((e: IEditorMouseEvent) => this._onEditorMouseDown(e)));
|
||||
this._toUnhook.add(this._editor.onMouseUp((e: IEditorMouseEvent) => this._onEditorMouseUp(e)));
|
||||
@@ -152,46 +161,83 @@ export class ModesHoverController implements IEditorContribution {
|
||||
}
|
||||
}
|
||||
|
||||
private _onEditorMouseMove(mouseEvent: IEditorMouseEvent): void {
|
||||
private _isMouseOverWidget(mouseEvent: IEditorMouseEvent): boolean {
|
||||
const target = mouseEvent.target;
|
||||
|
||||
if (this._contentWidget?.isFocused || this._contentWidget?.isResizing) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._isMouseDown && this._hoverClicked) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._isHoverSticky && target.type === MouseTargetType.CONTENT_WIDGET && target.detail === ContentHoverWidget.ID) {
|
||||
// mouse moved on top of content hover widget
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._isHoverSticky && this._contentWidget?.containsNode(mouseEvent.event.browserEvent.view?.document.activeElement) && !mouseEvent.event.browserEvent.view?.getSelection()?.isCollapsed) {
|
||||
// selected text within content hover widget
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
!this._isHoverSticky && target.type === MouseTargetType.CONTENT_WIDGET && target.detail === ContentHoverWidget.ID
|
||||
this._isHoverSticky
|
||||
&& target.type === MouseTargetType.CONTENT_WIDGET
|
||||
&& target.detail === ContentHoverWidget.ID
|
||||
) {
|
||||
// mouse moved on top of content hover widget
|
||||
return true;
|
||||
}
|
||||
if (
|
||||
this._isHoverSticky
|
||||
&& this._contentWidget?.containsNode(mouseEvent.event.browserEvent.view?.document.activeElement)
|
||||
&& !mouseEvent.event.browserEvent.view?.getSelection()?.isCollapsed
|
||||
) {
|
||||
// selected text within content hover widget
|
||||
return true;
|
||||
}
|
||||
if (
|
||||
!this._isHoverSticky
|
||||
&& target.type === MouseTargetType.CONTENT_WIDGET
|
||||
&& target.detail === ContentHoverWidget.ID
|
||||
&& this._contentWidget?.isColorPickerVisible
|
||||
) {
|
||||
// though the hover is not sticky, the color picker needs to.
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this._isHoverSticky && target.type === MouseTargetType.OVERLAY_WIDGET && target.detail === MarginHoverWidget.ID) {
|
||||
if (
|
||||
this._isHoverSticky
|
||||
&& target.type === MouseTargetType.OVERLAY_WIDGET
|
||||
&& target.detail === MarginHoverWidget.ID
|
||||
) {
|
||||
// mouse moved on top of overlay hover widget
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private _onEditorMouseMove(mouseEvent: IEditorMouseEvent): void {
|
||||
this._mouseMoveEvent = mouseEvent;
|
||||
if (this._contentWidget?.isFocused || this._contentWidget?.isResizing) {
|
||||
return;
|
||||
}
|
||||
if (this._isMouseDown && this._hoverClicked) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._isHoverSticky && this._contentWidget?.isVisibleFromKeyboard) {
|
||||
// Sticky mode is on and the hover has been shown via keyboard
|
||||
// so moving the mouse has no effect
|
||||
return;
|
||||
}
|
||||
|
||||
const mouseIsOverWidget = this._isMouseOverWidget(mouseEvent);
|
||||
// If the mouse is over the widget and the hiding timeout is defined, then cancel it
|
||||
if (mouseIsOverWidget) {
|
||||
this._reactToEditorMouseMoveRunner.cancel();
|
||||
return;
|
||||
}
|
||||
|
||||
// If the mouse is not over the widget, and if sticky is on,
|
||||
// then give it a grace period before reacting to the mouse event
|
||||
if (this._contentWidget?.isVisible && this._isHoverSticky && this._hidingDelay > 0) {
|
||||
if (!this._reactToEditorMouseMoveRunner.isScheduled()) {
|
||||
this._reactToEditorMouseMoveRunner.schedule(this._hidingDelay);
|
||||
}
|
||||
return;
|
||||
}
|
||||
this._reactToEditorMouseMove(mouseEvent);
|
||||
}
|
||||
|
||||
private _reactToEditorMouseMove(mouseEvent: IEditorMouseEvent | undefined): void {
|
||||
if (!mouseEvent) {
|
||||
return;
|
||||
}
|
||||
|
||||
const target = mouseEvent.target;
|
||||
|
||||
const mouseOnDecorator = target.element?.classList.contains('colorpicker-color-decoration');
|
||||
const decoratorActivatedOn = this._editor.getOption(EditorOption.colorDecoratorsActivatedOn);
|
||||
|
||||
@@ -311,10 +357,10 @@ export class ModesHoverController implements IEditorContribution {
|
||||
return this._contentWidget?.isVisible;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
public override dispose(): void {
|
||||
super.dispose();
|
||||
this._unhookEvents();
|
||||
this._toUnhook.dispose();
|
||||
this._didChangeConfigurationHandler.dispose();
|
||||
this._glyphWidget?.dispose();
|
||||
this._contentWidget?.dispose();
|
||||
}
|
||||
|
||||
@@ -254,6 +254,15 @@ suite('EditorSimpleWorker', () => {
|
||||
);
|
||||
});
|
||||
|
||||
test.skip('[Bug] Getting Message "Overlapping ranges are not allowed" and nothing happens with Inline-Chat ', async function () {
|
||||
await testEdits(("const API = require('../src/api');\n\ndescribe('API', () => {\n let api;\n let database;\n\n beforeAll(() => {\n database = {\n getAllBooks: jest.fn(),\n getBooksByAuthor: jest.fn(),\n getBooksByTitle: jest.fn(),\n };\n api = new API(database);\n });\n\n describe('GET /books', () => {\n it('should return all books', async () => {\n const mockBooks = [{ title: 'Book 1' }, { title: 'Book 2' }];\n database.getAllBooks.mockResolvedValue(mockBooks);\n\n const req = {};\n const res = {\n json: jest.fn(),\n };\n\n await api.register({\n get: (path, handler) => {\n if (path === '/books') {\n handler(req, res);\n }\n },\n });\n\n expect(database.getAllBooks).toHaveBeenCalled();\n expect(res.json).toHaveBeenCalledWith(mockBooks);\n });\n });\n\n describe('GET /books/author/:author', () => {\n it('should return books by author', async () => {\n const mockAuthor = 'John Doe';\n const mockBooks = [{ title: 'Book 1', author: mockAuthor }, { title: 'Book 2', author: mockAuthor }];\n database.getBooksByAuthor.mockResolvedValue(mockBooks);\n\n const req = {\n params: {\n author: mockAuthor,\n },\n };\n const res = {\n json: jest.fn(),\n };\n\n await api.register({\n get: (path, handler) => {\n if (path === `/books/author/${mockAuthor}`) {\n handler(req, res);\n }\n },\n });\n\n expect(database.getBooksByAuthor).toHaveBeenCalledWith(mockAuthor);\n expect(res.json).toHaveBeenCalledWith(mockBooks);\n });\n });\n\n describe('GET /books/title/:title', () => {\n it('should return books by title', async () => {\n const mockTitle = 'Book 1';\n const mockBooks = [{ title: mockTitle, author: 'John Doe' }];\n database.getBooksByTitle.mockResolvedValue(mockBooks);\n\n const req = {\n params: {\n title: mockTitle,\n },\n };\n const res = {\n json: jest.fn(),\n };\n\n await api.register({\n get: (path, handler) => {\n if (path === `/books/title/${mockTitle}`) {\n handler(req, res);\n }\n },\n });\n\n expect(database.getBooksByTitle).toHaveBeenCalledWith(mockTitle);\n expect(res.json).toHaveBeenCalledWith(mockBooks);\n });\n });\n});\n").split('\n'),
|
||||
[{
|
||||
range: { startLineNumber: 1, startColumn: 1, endLineNumber: 96, endColumn: 1 },
|
||||
text: `const request = require('supertest');\nconst API = require('../src/api');\n\ndescribe('API', () => {\n let api;\n let database;\n\n beforeAll(() => {\n database = {\n getAllBooks: jest.fn(),\n getBooksByAuthor: jest.fn(),\n getBooksByTitle: jest.fn(),\n };\n api = new API(database);\n });\n\n describe('GET /books', () => {\n it('should return all books', async () => {\n const mockBooks = [{ title: 'Book 1' }, { title: 'Book 2' }];\n database.getAllBooks.mockResolvedValue(mockBooks);\n\n const response = await request(api.app).get('/books');\n\n expect(database.getAllBooks).toHaveBeenCalled();\n expect(response.status).toBe(200);\n expect(response.body).toEqual(mockBooks);\n });\n });\n\n describe('GET /books/author/:author', () => {\n it('should return books by author', async () => {\n const mockAuthor = 'John Doe';\n const mockBooks = [{ title: 'Book 1', author: mockAuthor }, { title: 'Book 2', author: mockAuthor }];\n database.getBooksByAuthor.mockResolvedValue(mockBooks);\n\n const response = await request(api.app).get(\`/books/author/\${mockAuthor}\`);\n\n expect(database.getBooksByAuthor).toHaveBeenCalledWith(mockAuthor);\n expect(response.status).toBe(200);\n expect(response.body).toEqual(mockBooks);\n });\n });\n\n describe('GET /books/title/:title', () => {\n it('should return books by title', async () => {\n const mockTitle = 'Book 1';\n const mockBooks = [{ title: mockTitle, author: 'John Doe' }];\n database.getBooksByTitle.mockResolvedValue(mockBooks);\n\n const response = await request(api.app).get(\`/books/title/\${mockTitle}\`);\n\n expect(database.getBooksByTitle).toHaveBeenCalledWith(mockTitle);\n expect(response.status).toBe(200);\n expect(response.body).toEqual(mockBooks);\n });\n });\n});\n`,
|
||||
}]
|
||||
);
|
||||
});
|
||||
|
||||
test('ICommonModel#getValueInRange, issue #17424', function () {
|
||||
|
||||
const model = worker.addModel([
|
||||
|
||||
Vendored
+5
@@ -3980,6 +3980,11 @@ declare namespace monaco.editor {
|
||||
* Defaults to true.
|
||||
*/
|
||||
sticky?: boolean;
|
||||
/**
|
||||
* Controls how long the hover is visible after you hovered out of it.
|
||||
* Require sticky setting to be true.
|
||||
*/
|
||||
hidingDelay?: number;
|
||||
/**
|
||||
* Should the hover be shown above the line if possible?
|
||||
* Defaults to false.
|
||||
|
||||
@@ -8,7 +8,7 @@ import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { toErrorMessage } from 'vs/base/common/errorMessage';
|
||||
import { canceled } from 'vs/base/common/errors';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { Disposable, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { Disposable, DisposableStore, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { newWriteableStream, ReadableStreamEventPayload, ReadableStreamEvents } from 'vs/base/common/stream';
|
||||
import { URI, UriComponents } from 'vs/base/common/uri';
|
||||
import { generateUuid } from 'vs/base/common/uuid';
|
||||
@@ -93,9 +93,10 @@ export class DiskFileSystemProviderClient extends Disposable implements
|
||||
|
||||
readFileStream(resource: URI, opts: IFileReadStreamOptions, token: CancellationToken): ReadableStreamEvents<Uint8Array> {
|
||||
const stream = newWriteableStream<Uint8Array>(data => VSBuffer.concat(data.map(data => VSBuffer.wrap(data))).buffer);
|
||||
const disposables = new DisposableStore();
|
||||
|
||||
// Reading as file stream goes through an event to the remote side
|
||||
const listener = this.channel.listen<ReadableStreamEventPayload<VSBuffer>>('readFileStream', [resource, opts])(dataOrErrorOrEnd => {
|
||||
disposables.add(this.channel.listen<ReadableStreamEventPayload<VSBuffer>>('readFileStream', [resource, opts])(dataOrErrorOrEnd => {
|
||||
|
||||
// data
|
||||
if (dataOrErrorOrEnd instanceof VSBuffer) {
|
||||
@@ -128,12 +129,12 @@ export class DiskFileSystemProviderClient extends Disposable implements
|
||||
}
|
||||
|
||||
// Signal to the remote side that we no longer listen
|
||||
listener.dispose();
|
||||
disposables.dispose();
|
||||
}
|
||||
});
|
||||
}));
|
||||
|
||||
// Support cancellation
|
||||
token.onCancellationRequested(() => {
|
||||
disposables.add(token.onCancellationRequested(() => {
|
||||
|
||||
// Ensure to end the stream properly with an error
|
||||
// to indicate the cancellation.
|
||||
@@ -143,8 +144,8 @@ export class DiskFileSystemProviderClient extends Disposable implements
|
||||
// Ensure to dispose the listener upon cancellation. This will
|
||||
// bubble through the remote side as event and allows to stop
|
||||
// reading the file.
|
||||
listener.dispose();
|
||||
});
|
||||
disposables.dispose();
|
||||
}));
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
@@ -170,6 +170,8 @@ flakySuite('StateService', () => {
|
||||
assert.strictEqual(service.getItem('some.setItems.key3'), undefined);
|
||||
assert.strictEqual(service.getItem('some.setItems.key4'), undefined);
|
||||
assert.strictEqual(service.getItem('some.setItems.key5'), undefined);
|
||||
|
||||
return service.close();
|
||||
});
|
||||
|
||||
test('Multiple ops are buffered and applied', async function () {
|
||||
@@ -199,6 +201,8 @@ flakySuite('StateService', () => {
|
||||
assert.strictEqual(service.getItem('some.key2'), 'some.value2');
|
||||
assert.strictEqual(service.getItem('some.key3'), 'some.value3');
|
||||
assert.strictEqual(service.getItem('some.key4'), undefined);
|
||||
|
||||
return service.close();
|
||||
});
|
||||
|
||||
test('Multiple ops (Immediate Strategy)', async function () {
|
||||
@@ -228,6 +232,8 @@ flakySuite('StateService', () => {
|
||||
assert.strictEqual(service.getItem('some.key2'), 'some.value2');
|
||||
assert.strictEqual(service.getItem('some.key3'), 'some.value3');
|
||||
assert.strictEqual(service.getItem('some.key4'), undefined);
|
||||
|
||||
return service.close();
|
||||
});
|
||||
|
||||
test('Used before init', async function () {
|
||||
@@ -253,6 +259,8 @@ flakySuite('StateService', () => {
|
||||
assert.strictEqual(service.getItem('some.key2'), 'some.value2');
|
||||
assert.strictEqual(service.getItem('some.key3'), 'some.value3');
|
||||
assert.strictEqual(service.getItem('some.key4'), undefined);
|
||||
|
||||
return service.close();
|
||||
});
|
||||
|
||||
test('Used after close', async function () {
|
||||
@@ -276,7 +284,7 @@ flakySuite('StateService', () => {
|
||||
assert.ok(contents.includes('some.value1'));
|
||||
assert.ok(!contents.includes('some.marker'));
|
||||
|
||||
await service.close();
|
||||
return service.close();
|
||||
});
|
||||
|
||||
test('Closed before init', async function () {
|
||||
|
||||
@@ -343,7 +343,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
return extHostTerminalService.getDefaultShell(false);
|
||||
},
|
||||
get onDidChangeShell() {
|
||||
checkProposedApiEnabled(extension, 'envShellEvent');
|
||||
return extHostTerminalService.onDidChangeShell;
|
||||
},
|
||||
get isTelemetryEnabled() {
|
||||
@@ -1298,9 +1297,9 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
||||
// this needs to be updated whenever the API proposal changes
|
||||
_version: 1,
|
||||
|
||||
registerInteractiveEditorSessionProvider(provider: vscode.InteractiveEditorSessionProvider) {
|
||||
registerInteractiveEditorSessionProvider(provider: vscode.InteractiveEditorSessionProvider, metadata?: vscode.InteractiveEditorSessionProviderMetadata) {
|
||||
checkProposedApiEnabled(extension, 'interactive');
|
||||
return extHostInteractiveEditor.registerProvider(extension, provider);
|
||||
return extHostInteractiveEditor.registerProvider(extension, provider, metadata = { label: provider.label ?? extension.displayName ?? extension.name });
|
||||
},
|
||||
registerInteractiveSessionProvider(id: string, provider: vscode.InteractiveSessionProvider) {
|
||||
checkProposedApiEnabled(extension, 'interactive');
|
||||
|
||||
@@ -92,10 +92,10 @@ export class ExtHostInteractiveEditor implements ExtHostInlineChatShape {
|
||||
));
|
||||
}
|
||||
|
||||
registerProvider(extension: Readonly<IRelaxedExtensionDescription>, provider: vscode.InteractiveEditorSessionProvider): vscode.Disposable {
|
||||
registerProvider(extension: Readonly<IRelaxedExtensionDescription>, provider: vscode.InteractiveEditorSessionProvider, metadata: vscode.InteractiveEditorSessionProviderMetadata): vscode.Disposable {
|
||||
const wrapper = new ProviderWrapper(extension, provider);
|
||||
this._inputProvider.set(wrapper.handle, wrapper);
|
||||
this._proxy.$registerInteractiveEditorProvider(wrapper.handle, provider.label, extension.identifier.value, typeof provider.handleInteractiveEditorResponseFeedback === 'function');
|
||||
this._proxy.$registerInteractiveEditorProvider(wrapper.handle, metadata.label, extension.identifier.value, typeof provider.handleInteractiveEditorResponseFeedback === 'function');
|
||||
return toDisposable(() => {
|
||||
this._proxy.$unregisterInteractiveEditorProvider(wrapper.handle);
|
||||
this._inputProvider.delete(wrapper.handle);
|
||||
@@ -173,7 +173,7 @@ export class ExtHostInteractiveEditor implements ExtHostInlineChatShape {
|
||||
|
||||
const task = typeof entry.provider.provideInteractiveEditorResponse2 === 'function'
|
||||
? entry.provider.provideInteractiveEditorResponse2(apiRequest, progress, token)
|
||||
: entry.provider.provideInteractiveEditorResponse(apiRequest, token);
|
||||
: entry.provider.provideInteractiveEditorResponse(apiRequest.session, apiRequest, progress, token);
|
||||
|
||||
Promise.resolve(task).finally(() => done = true);
|
||||
|
||||
|
||||
+1
-1
@@ -361,7 +361,7 @@ export class ExtensionRecommendationNotificationService extends Disposable imple
|
||||
this.visibleNotification = { recommendationsNotification, source, from: Date.now() };
|
||||
recommendationsNotification.show();
|
||||
}
|
||||
await raceCancellation(Event.toPromise(recommendationsNotification.onDidClose), token);
|
||||
await raceCancellation(new Promise(c => disposables.add(Event.once(recommendationsNotification.onDidClose)(c))), token);
|
||||
return !recommendationsNotification.isCancelled();
|
||||
} finally {
|
||||
disposables.dispose();
|
||||
|
||||
+11
-3
@@ -61,7 +61,9 @@ import { VSBuffer } from 'vs/base/common/buffer';
|
||||
import { platform } from 'vs/base/common/platform';
|
||||
import { arch } from 'vs/base/common/process';
|
||||
import { runWithFakedTimers } from 'vs/base/test/common/timeTravelScheduler';
|
||||
import { ensureNoDisposablesAreLeakedInTestSuite } from 'vs/base/test/common/utils';
|
||||
import { DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { timeout } from 'vs/base/common/async';
|
||||
|
||||
const mockExtensionGallery: IGalleryExtension[] = [
|
||||
aGalleryExtension('MockExtension1', {
|
||||
@@ -181,7 +183,7 @@ function aGalleryExtension(name: string, properties: any = {}, galleryExtensionP
|
||||
}
|
||||
|
||||
suite('ExtensionRecommendationsService Test', () => {
|
||||
const disposableStore = new DisposableStore();
|
||||
let disposableStore: DisposableStore;
|
||||
let workspaceService: IWorkspaceContextService;
|
||||
let instantiationService: TestInstantiationService;
|
||||
let testConfigurationService: TestConfigurationService;
|
||||
@@ -194,7 +196,15 @@ suite('ExtensionRecommendationsService Test', () => {
|
||||
let promptedEmitter: Emitter<void>;
|
||||
let onModelAddedEvent: Emitter<ITextModel>;
|
||||
|
||||
teardown(async () => {
|
||||
disposableStore.dispose();
|
||||
await timeout(0); // allow for async disposables to complete
|
||||
});
|
||||
|
||||
ensureNoDisposablesAreLeakedInTestSuite();
|
||||
|
||||
setup(() => {
|
||||
disposableStore = new DisposableStore();
|
||||
instantiationService = disposableStore.add(new TestInstantiationService());
|
||||
promptedEmitter = disposableStore.add(new Emitter<void>());
|
||||
installEvent = disposableStore.add(new Emitter<InstallExtensionEvent>());
|
||||
@@ -308,8 +318,6 @@ suite('ExtensionRecommendationsService Test', () => {
|
||||
});
|
||||
});
|
||||
|
||||
teardown(() => disposableStore.clear());
|
||||
|
||||
function setUpFolderWorkspace(folderName: string, recommendedExtensions: string[], ignoredRecommendations: string[] = []): Promise<void> {
|
||||
return setUpFolder(folderName, recommendedExtensions, ignoredRecommendations);
|
||||
}
|
||||
|
||||
@@ -151,7 +151,9 @@ export class InlineChatController implements IEditorContribution {
|
||||
dispose(): void {
|
||||
this._strategy?.dispose();
|
||||
this._stashedSession.clear();
|
||||
this.finishExistingSession();
|
||||
if (this._activeSession) {
|
||||
this._inlineChatSessionService.releaseSession(this._activeSession);
|
||||
}
|
||||
this._store.dispose();
|
||||
this._log('controller disposed');
|
||||
}
|
||||
|
||||
@@ -170,9 +170,15 @@ export class InlineChatLivePreviewWidget extends ZoneWidget {
|
||||
return;
|
||||
}
|
||||
|
||||
// complex changes
|
||||
this._logService.debug('[IE] livePreview-mode: full diff');
|
||||
this._renderChangesWithFullDiff(changes, range);
|
||||
if (changes.length === 0 || this._session.textModel0.getValueLength() === 0) {
|
||||
// no change or changes to an empty file
|
||||
this._logService.debug('[IE] livePreview-mode: no diff');
|
||||
this._cleanupFullDiff();
|
||||
} else {
|
||||
// complex changes
|
||||
this._logService.debug('[IE] livePreview-mode: full diff');
|
||||
this._renderChangesWithFullDiff(changes, range);
|
||||
}
|
||||
}
|
||||
|
||||
// --- full diff
|
||||
|
||||
@@ -409,7 +409,7 @@ export class LivePreviewStrategy extends LiveStrategy {
|
||||
}
|
||||
|
||||
if (response.singleCreateFileEdit) {
|
||||
this._previewZone.value.showCreation(this._session.wholeRange.value, response.singleCreateFileEdit.uri, await Promise.all(response.singleCreateFileEdit.edits));
|
||||
this._previewZone.value.showCreation(this._session.wholeRange.value.collapseToEnd(), response.singleCreateFileEdit.uri, await Promise.all(response.singleCreateFileEdit.edits));
|
||||
} else {
|
||||
this._previewZone.value.hide();
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import { equals } from 'vs/base/common/arrays';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { mock } from 'vs/base/test/common/mock';
|
||||
import { ensureNoDisposablesAreLeakedInTestSuite } from 'vs/base/test/common/utils';
|
||||
import { TestDiffProviderFactoryService } from 'vs/editor/browser/diff/testDiffProviderFactoryService';
|
||||
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
import { IDiffProviderFactoryService } from 'vs/editor/browser/widget/diffEditor/diffProviderFactoryService';
|
||||
@@ -147,8 +148,7 @@ suite('InteractiveChatController', function () {
|
||||
ctrl?.dispose();
|
||||
});
|
||||
|
||||
// todo: re-enable this when earlier tests are fixed
|
||||
// ensureNoDisposablesAreLeakedInTestSuite();
|
||||
ensureNoDisposablesAreLeakedInTestSuite();
|
||||
|
||||
test('creation, not showing anything', function () {
|
||||
ctrl = instaService.createInstance(TestController, editor);
|
||||
|
||||
+2
-1
@@ -18,7 +18,7 @@ import type { Terminal } from 'xterm';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
|
||||
export class TerminalAccessibleBufferProvider extends DisposableStore implements IAccessibleContentProvider {
|
||||
options: IAccessibleViewOptions = { type: AccessibleViewType.View };
|
||||
options: IAccessibleViewOptions = { type: AccessibleViewType.View, language: 'terminal' };
|
||||
verbositySettingKey = AccessibilityVerbositySettingId.Terminal;
|
||||
private _xterm: IXtermTerminal & { raw: Terminal } | undefined;
|
||||
constructor(
|
||||
@@ -52,6 +52,7 @@ export class TerminalAccessibleBufferProvider extends DisposableStore implements
|
||||
}
|
||||
this._xterm.raw.onWriteParsed(async () => {
|
||||
if (this._xterm!.raw.buffer.active.baseY === 0) {
|
||||
this._bufferTracker.update();
|
||||
this._accessibleViewService.show(this);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -25,6 +25,7 @@ import { Action2, IAction2Options, MenuId } from 'vs/platform/actions/common/act
|
||||
import { Categories } from 'vs/platform/action/common/actionCommonCategories';
|
||||
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
||||
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
import { isMacintosh } from 'vs/base/common/platform';
|
||||
|
||||
export class CloseWindowAction extends Action2 {
|
||||
|
||||
@@ -276,26 +277,59 @@ export class QuickSwitchWindowAction extends BaseSwitchWindow {
|
||||
}
|
||||
}
|
||||
|
||||
function canRunNativeTabsHandler(accessor: ServicesAccessor): boolean {
|
||||
if (!isMacintosh) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const configurationService = accessor.get(IConfigurationService);
|
||||
return configurationService.getValue<unknown>('window.nativeTabs') === true;
|
||||
}
|
||||
|
||||
export const NewWindowTabHandler: ICommandHandler = function (accessor: ServicesAccessor) {
|
||||
if (!canRunNativeTabsHandler(accessor)) {
|
||||
return;
|
||||
}
|
||||
|
||||
return accessor.get(INativeHostService).newWindowTab();
|
||||
};
|
||||
|
||||
export const ShowPreviousWindowTabHandler: ICommandHandler = function (accessor: ServicesAccessor) {
|
||||
if (!canRunNativeTabsHandler(accessor)) {
|
||||
return;
|
||||
}
|
||||
|
||||
return accessor.get(INativeHostService).showPreviousWindowTab();
|
||||
};
|
||||
|
||||
export const ShowNextWindowTabHandler: ICommandHandler = function (accessor: ServicesAccessor) {
|
||||
if (!canRunNativeTabsHandler(accessor)) {
|
||||
return;
|
||||
}
|
||||
|
||||
return accessor.get(INativeHostService).showNextWindowTab();
|
||||
};
|
||||
|
||||
export const MoveWindowTabToNewWindowHandler: ICommandHandler = function (accessor: ServicesAccessor) {
|
||||
if (!canRunNativeTabsHandler(accessor)) {
|
||||
return;
|
||||
}
|
||||
|
||||
return accessor.get(INativeHostService).moveWindowTabToNewWindow();
|
||||
};
|
||||
|
||||
export const MergeWindowTabsHandlerHandler: ICommandHandler = function (accessor: ServicesAccessor) {
|
||||
if (!canRunNativeTabsHandler(accessor)) {
|
||||
return;
|
||||
}
|
||||
|
||||
return accessor.get(INativeHostService).mergeAllWindowTabs();
|
||||
};
|
||||
|
||||
export const ToggleWindowTabsBarHandler: ICommandHandler = function (accessor: ServicesAccessor) {
|
||||
if (!canRunNativeTabsHandler(accessor)) {
|
||||
return;
|
||||
}
|
||||
|
||||
return accessor.get(INativeHostService).toggleWindowTabsBar();
|
||||
};
|
||||
|
||||
@@ -222,12 +222,6 @@ import { applicationConfigurationNodeBase } from 'vs/workbench/common/configurat
|
||||
'scope': ConfigurationScope.APPLICATION,
|
||||
'description': localize('titleBarStyle', "Adjust the appearance of the window title bar. On Linux and Windows, this setting also affects the application and context menu appearances. Changes require a full restart to apply.")
|
||||
},
|
||||
'window.experimental.nativeContextMenuLocation': { // TODO@bpasero remove me eventually
|
||||
'type': 'boolean',
|
||||
'default': true,
|
||||
'scope': ConfigurationScope.APPLICATION,
|
||||
'description': localize('nativeContextMenuLocation', "Let the OS handle positioning of the context menu in cases where it should appear under the mouse.")
|
||||
},
|
||||
'window.dialogStyle': {
|
||||
'type': 'string',
|
||||
'enum': ['native', 'custom'],
|
||||
|
||||
@@ -54,7 +54,7 @@ export class ContextMenuService implements IContextMenuService {
|
||||
|
||||
// Native context menu: otherwise
|
||||
else {
|
||||
this.impl = new NativeContextMenuService(notificationService, telemetryService, keybindingService, menuService, contextKeyService, configurationService);
|
||||
this.impl = new NativeContextMenuService(notificationService, telemetryService, keybindingService, menuService, contextKeyService);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,28 +77,14 @@ class NativeContextMenuService extends Disposable implements IContextMenuService
|
||||
private readonly _onDidHideContextMenu = this._store.add(new Emitter<void>());
|
||||
readonly onDidHideContextMenu = this._onDidHideContextMenu.event;
|
||||
|
||||
private useNativeContextMenuLocation = false;
|
||||
|
||||
constructor(
|
||||
@INotificationService private readonly notificationService: INotificationService,
|
||||
@ITelemetryService private readonly telemetryService: ITelemetryService,
|
||||
@IKeybindingService private readonly keybindingService: IKeybindingService,
|
||||
@IMenuService private readonly menuService: IMenuService,
|
||||
@IContextKeyService private readonly contextKeyService: IContextKeyService,
|
||||
@IConfigurationService private readonly configurationService: IConfigurationService
|
||||
@IContextKeyService private readonly contextKeyService: IContextKeyService
|
||||
) {
|
||||
super();
|
||||
|
||||
this.updateUseNativeContextMenuLocation();
|
||||
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
||||
if (e.affectsConfiguration('window.experimental.nativeContextMenuLocation')) {
|
||||
this.updateUseNativeContextMenuLocation();
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
private updateUseNativeContextMenuLocation(): void {
|
||||
this.useNativeContextMenuLocation = this.configurationService.getValue<boolean>('window.experimental.nativeContextMenuLocation') === true;
|
||||
}
|
||||
|
||||
showContextMenu(delegate: IContextMenuDelegate | IContextMenuMenuDelegate): void {
|
||||
@@ -173,13 +159,8 @@ class NativeContextMenuService extends Disposable implements IContextMenuService
|
||||
x = anchor.x;
|
||||
y = anchor.y;
|
||||
} else {
|
||||
if (this.useNativeContextMenuLocation) {
|
||||
// We leave x/y undefined in this case which will result in
|
||||
// Electron taking care of opening the menu at the cursor position.
|
||||
} else {
|
||||
x = anchor.posx + 1; // prevent first item from being selected automatically under mouse
|
||||
y = anchor.posy;
|
||||
}
|
||||
// We leave x/y undefined in this case which will result in
|
||||
// Electron taking care of opening the menu at the cursor position.
|
||||
}
|
||||
|
||||
if (typeof x === 'number') {
|
||||
|
||||
@@ -40,7 +40,6 @@ export const allApiProposals = Object.freeze({
|
||||
dropMetadata: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.dropMetadata.d.ts',
|
||||
editSessionIdentityProvider: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts',
|
||||
editorInsets: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editorInsets.d.ts',
|
||||
envShellEvent: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.envShellEvent.d.ts',
|
||||
extensionRuntime: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionRuntime.d.ts',
|
||||
extensionsAny: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionsAny.d.ts',
|
||||
externalUriOpener: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.externalUriOpener.d.ts',
|
||||
|
||||
@@ -55,7 +55,7 @@ suite('ResourceWorkingCopy', function () {
|
||||
});
|
||||
|
||||
test('orphaned tracking', async () => {
|
||||
runWithFakedTimers({}, async () => {
|
||||
return runWithFakedTimers({}, async () => {
|
||||
assert.strictEqual(workingCopy.isOrphaned(), false);
|
||||
|
||||
let onDidChangeOrphanedPromise = Event.toPromise(workingCopy.onDidChangeOrphaned);
|
||||
|
||||
@@ -234,7 +234,7 @@ suite('StoredFileWorkingCopy', function () {
|
||||
});
|
||||
|
||||
test('orphaned tracking', async () => {
|
||||
runWithFakedTimers({}, async () => {
|
||||
return runWithFakedTimers({}, async () => {
|
||||
assert.strictEqual(workingCopy.hasState(StoredFileWorkingCopyState.ORPHAN), false);
|
||||
|
||||
let onDidChangeOrphanedPromise = Event.toPromise(workingCopy.onDidChangeOrphaned);
|
||||
@@ -411,7 +411,7 @@ suite('StoredFileWorkingCopy', function () {
|
||||
});
|
||||
|
||||
test('resolve (with backup, preserves metadata and orphaned state)', async () => {
|
||||
runWithFakedTimers({}, async () => {
|
||||
return runWithFakedTimers({}, async () => {
|
||||
await workingCopy.resolve({ contents: bufferToStream(VSBuffer.fromString('hello backup')) });
|
||||
|
||||
const orphanedPromise = Event.toPromise(workingCopy.onDidChangeOrphaned);
|
||||
@@ -440,7 +440,7 @@ suite('StoredFileWorkingCopy', function () {
|
||||
});
|
||||
|
||||
test('resolve (updates orphaned state accordingly)', async () => {
|
||||
runWithFakedTimers({}, async () => {
|
||||
return runWithFakedTimers({}, async () => {
|
||||
await workingCopy.resolve();
|
||||
|
||||
const orphanedPromise = Event.toPromise(workingCopy.onDidChangeOrphaned);
|
||||
@@ -694,7 +694,7 @@ suite('StoredFileWorkingCopy', function () {
|
||||
});
|
||||
|
||||
test('save (no errors) - save clears orphaned', async () => {
|
||||
runWithFakedTimers({}, async () => {
|
||||
return runWithFakedTimers({}, async () => {
|
||||
let savedCounter = 0;
|
||||
disposables.add(workingCopy.onDidSave(e => {
|
||||
savedCounter++;
|
||||
@@ -724,7 +724,7 @@ suite('StoredFileWorkingCopy', function () {
|
||||
});
|
||||
});
|
||||
|
||||
test.skip('save (errors)', async () => { // TODO@bpasero enable again
|
||||
test('save (errors)', async () => {
|
||||
let savedCounter = 0;
|
||||
disposables.add(workingCopy.onDidSave(reason => {
|
||||
savedCounter++;
|
||||
|
||||
Vendored
+5
@@ -10000,6 +10000,11 @@ declare module 'vscode' {
|
||||
*/
|
||||
export const onDidChangeTelemetryEnabled: Event<boolean>;
|
||||
|
||||
/**
|
||||
* An {@link Event} which fires when the default shell changes.
|
||||
*/
|
||||
export const onDidChangeShell: Event<string>;
|
||||
|
||||
/**
|
||||
* Creates a new {@link TelemetryLogger telemetry logger}.
|
||||
*
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// See https://github.com/microsoft/vscode/issues/160694
|
||||
export namespace env {
|
||||
|
||||
/**
|
||||
* An {@link Event} which fires when the default shell changes.
|
||||
*/
|
||||
export const onDidChangeShell: Event<string>;
|
||||
}
|
||||
}
|
||||
+13
-4
@@ -60,22 +60,31 @@ declare module 'vscode' {
|
||||
export interface TextDocumentContext {
|
||||
document: TextDocument;
|
||||
selection: Selection;
|
||||
action?: string;
|
||||
}
|
||||
|
||||
export interface InteractiveEditorSessionProviderMetadata {
|
||||
label: string;
|
||||
}
|
||||
|
||||
export interface InteractiveEditorSessionProvider<S extends InteractiveEditorSession = InteractiveEditorSession, R extends InteractiveEditorResponse | InteractiveEditorMessageResponse = InteractiveEditorResponse | InteractiveEditorMessageResponse> {
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
label: string;
|
||||
|
||||
// Create a session. The lifetime of this session is the duration of the editing session with the input mode widget.
|
||||
prepareInteractiveEditorSession(context: TextDocumentContext, token: CancellationToken): ProviderResult<S>;
|
||||
|
||||
provideInteractiveEditorResponse(request: InteractiveEditorRequest, token: CancellationToken): ProviderResult<R>;
|
||||
provideInteractiveEditorResponse(session: S, request: Omit<InteractiveEditorRequest, 'session'>, progress: Progress<{ message: string; edits: TextEdit[] }>, token: CancellationToken): ProviderResult<R>;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
provideInteractiveEditorResponse2?(request: InteractiveEditorRequest, progress: Progress<{ message: string; edits: TextEdit[] }>, token: CancellationToken): ProviderResult<R>;
|
||||
|
||||
// eslint-disable-next-line local/vscode-dts-provider-naming
|
||||
releaseInteractiveEditorSession?(session: S): any;
|
||||
|
||||
// todo@API use enum instead of boolean
|
||||
// eslint-disable-next-line local/vscode-dts-provider-naming
|
||||
handleInteractiveEditorResponseFeedback?(session: S, response: R, kind: InteractiveEditorResponseFeedbackKind): void;
|
||||
}
|
||||
@@ -210,7 +219,7 @@ declare module 'vscode' {
|
||||
|
||||
export function sendInteractiveRequestToProvider(providerId: string, message: InteractiveSessionDynamicRequest): void;
|
||||
|
||||
export function registerInteractiveEditorSessionProvider(provider: InteractiveEditorSessionProvider): Disposable;
|
||||
export function registerInteractiveEditorSessionProvider(provider: InteractiveEditorSessionProvider, metadata?: InteractiveEditorSessionProviderMetadata): Disposable;
|
||||
|
||||
export function transferChatSession(session: InteractiveSession, toWorkspace: Uri): void;
|
||||
}
|
||||
|
||||
@@ -10008,10 +10008,10 @@ typescript@^4.7.4:
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6"
|
||||
integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==
|
||||
|
||||
typescript@^5.3.0-dev.20230905:
|
||||
version "5.3.0-dev.20230905"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.0-dev.20230905.tgz#b88de602ef4afcc3a80a9c38023df82b7529e42a"
|
||||
integrity sha512-Nl9MoKWN0YYlCvQnw850L4ZgqdmqwVGCi9cAoQDw4PsqRGaWAi9HKizS9xu0q4qgKKsEKetWCZHT8dBtJTGaMg==
|
||||
typescript@^5.3.0-dev.20230911:
|
||||
version "5.3.0-dev.20230911"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.0-dev.20230911.tgz#7f60e82ee86e381655ddc63141408eb90b6ca31d"
|
||||
integrity sha512-2iI2l7OuGvU668gBje+JQKE8bsf7SH8w8ScwUkENHCcrbaDpXa/Oqfuwq5gdFM7SfVfp5p6c8kHZRMvL+kabJg==
|
||||
|
||||
typical@^4.0.0:
|
||||
version "4.0.0"
|
||||
|
||||
Reference in New Issue
Block a user