Merge branch 'main' into joao/tan-beetle

This commit is contained in:
João Moreno 2024-06-27 12:06:42 +02:00 committed by GitHub
commit 8dbe5a35bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
477 changed files with 11131 additions and 5522 deletions

View File

@ -22,6 +22,7 @@ jobs:
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
- name: Run CopyCat (VSCodeTriageBot/testissues)
if: github.event.issue.user.login != 'ghost'
uses: ./actions/copycat
with:
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
@ -30,6 +31,7 @@ jobs:
repo: testissues
- name: Run New Release
if: github.event.issue.user.login != 'ghost'
uses: ./actions/new-release
with:
label: new release
@ -41,6 +43,7 @@ jobs:
days: 5
- name: Run Clipboard Labeler
if: github.event.issue.user.login != 'ghost'
uses: ./actions/regex-labeler
with:
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
@ -49,6 +52,7 @@ jobs:
comment: "It looks like you're using the VS Code Issue Reporter but did not paste the text generated into the created issue. We've closed this issue, please open a new one containing the text we placed in your clipboard.\n\nHappy Coding!"
- name: Run Clipboard Labeler (Chinese)
if: github.event.issue.user.login != 'ghost'
uses: ./actions/regex-labeler
with:
appInsightsKey: ${{secrets.TRIAGE_ACTIONS_APP_INSIGHTS}}
@ -58,6 +62,7 @@ jobs:
# source of truth in ./english-please.yml
- name: Run English Please
if: github.event.issue.user.login != 'ghost'
uses: ./actions/english-please
with:
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
@ -69,6 +74,7 @@ jobs:
translatorRequestedLabelColor: "c29cff"
# source of truth in ./test-plan-item-validator.yml
- name: Run Test Plan Item Validator
if: github.event.issue.user.login != 'ghost'
uses: ./actions/test-plan-item-validator
with:
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}

View File

@ -44,7 +44,7 @@ export async function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(vscode.tests.registerTestFollowupProvider({
async provideFollowup(_result, test, taskIndex, messageIndex, _token) {
return [{
title: '$(sparkle) Ask copilot for help',
title: '$(sparkle) Fix with Copilot',
command: 'github.copilot.tests.fixTestFailure',
arguments: [{ source: 'peekFollowup', test, message: test.taskStates[taskIndex].messages[messageIndex] }]
}];
@ -196,13 +196,8 @@ export async function activate(context: vscode.ExtensionContext) {
true
);
(coverage as vscode.TestRunProfile2).loadDetailedCoverage = async (_run, coverage, _token, test) => {
if (coverage instanceof V8CoverageFile) {
return test ? coverage.testDetails(test) : coverage.details;
}
return [];
};
coverage.loadDetailedCoverage = async (_run, coverage) => coverage instanceof V8CoverageFile ? coverage.details : [];
coverage.loadDetailedCoverageForTest = async (_run, coverage, test) => coverage instanceof V8CoverageFile ? coverage.testDetails(test) : [];
for (const [name, arg] of browserArgs) {
const cfg = ctrl.createRunProfile(

View File

@ -11,7 +11,6 @@
"src/**/*",
"../../../src/vscode-dts/vscode.d.ts",
"../../../src/vscode-dts/vscode.proposed.testObserver.d.ts",
"../../../src/vscode-dts/vscode.proposed.attributableCoverage.d.ts",
"../../../src/vscode-dts/vscode.proposed.testRunInDebug.d.ts",
"../../../src/vscode-dts/vscode.proposed.attributableCoverage.d.ts"
]
}

View File

@ -7,7 +7,7 @@
{
"kind": 2,
"language": "github-issues",
"value": "$REPOS=repo:microsoft/lsprotocol repo:microsoft/monaco-editor repo:microsoft/vscode repo:microsoft/vscode-anycode repo:microsoft/vscode-autopep8 repo:microsoft/vscode-black-formatter repo:microsoft/vscode-copilot repo:microsoft/vscode-copilot-release repo:microsoft/vscode-dev repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-flake8 repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-hexeditor repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-isort repo:microsoft/vscode-js-debug repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-l10n repo:microsoft/vscode-livepreview repo:microsoft/vscode-markdown-languageservice repo:microsoft/vscode-markdown-tm-grammar repo:microsoft/vscode-mypy repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-pylint repo:microsoft/vscode-python repo:microsoft/vscode-python-debugger repo:microsoft/vscode-python-tools-extension-template repo:microsoft/vscode-references-view repo:microsoft/vscode-remote-release repo:microsoft/vscode-remote-repositories-github repo:microsoft/vscode-remote-tunnels repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-unpkg repo:microsoft/vscode-vsce\n\n$MILESTONE=milestone:\"May 2024\""
"value": "$REPOS=repo:microsoft/lsprotocol repo:microsoft/monaco-editor repo:microsoft/vscode repo:microsoft/vscode-anycode repo:microsoft/vscode-autopep8 repo:microsoft/vscode-black-formatter repo:microsoft/vscode-copilot repo:microsoft/vscode-copilot-release repo:microsoft/vscode-dev repo:microsoft/vscode-dev-chrome-launcher repo:microsoft/vscode-emmet-helper repo:microsoft/vscode-extension-telemetry repo:microsoft/vscode-flake8 repo:microsoft/vscode-github-issue-notebooks repo:microsoft/vscode-hexeditor repo:microsoft/vscode-internalbacklog repo:microsoft/vscode-isort repo:microsoft/vscode-js-debug repo:microsoft/vscode-jupyter repo:microsoft/vscode-jupyter-internal repo:microsoft/vscode-l10n repo:microsoft/vscode-livepreview repo:microsoft/vscode-markdown-languageservice repo:microsoft/vscode-markdown-tm-grammar repo:microsoft/vscode-mypy repo:microsoft/vscode-pull-request-github repo:microsoft/vscode-pylint repo:microsoft/vscode-python repo:microsoft/vscode-python-debugger repo:microsoft/vscode-python-tools-extension-template repo:microsoft/vscode-references-view repo:microsoft/vscode-remote-release repo:microsoft/vscode-remote-repositories-github repo:microsoft/vscode-remote-tunnels repo:microsoft/vscode-remotehub repo:microsoft/vscode-settings-sync-server repo:microsoft/vscode-unpkg repo:microsoft/vscode-vsce\r\n\r\n$MILESTONE=milestone:\"June 2024\""
},
{
"kind": 1,

View File

@ -157,7 +157,7 @@
{
"kind": 2,
"language": "github-issues",
"value": "$REPOS $MILESTONE -$MINE is:issue is:closed reason:completed sort:updated-asc label:bug -label:unreleased -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:*out-of-scope -label:error-telemetry -label:verification-steps-needed -label:verification-found -author:aeschli -author:alexdima -author:alexr00 -author:AmandaSilver -author:andreamah -author:bamurtaugh -author:bpasero -author:chrisdias -author:chrmarti -author:Chuxel -author:claudiaregio -author:connor4312 -author:dbaeumer -author:deepak1556 -author:devinvalenciano -author:digitarald -author:DonJayamanne -author:egamma -author:fiveisprime -author:gregvanl -author:hediet -author:isidorn -author:joaomoreno -author:joyceerhl -author:jrieken -author:kieferrm -author:lramos15 -author:lszomoru -author:meganrogge -author:misolori -author:mjbvz -author:rebornix -author:roblourens -author:rzhao271 -author:sandy081 -author:sbatten -author:stevencl -author:tanhakabir -author:TylerLeonhardt -author:Tyriar -author:weinand -author:amunger -author:karthiknadig -author:eleanorjboyd -author:Yoyokrazy -author:paulacamargo25 -author:ulugbekna -author:aiday-mar -author:daviddossett -author:bhavyaus -author:justschen -author:benibenj -author:luabud"
"value": "$REPOS $MILESTONE -$MINE is:issue is:closed reason:completed sort:updated-asc label:bug -label:unreleased -label:verified -label:z-author-verified -label:on-testplan -label:*duplicate -label:duplicate -label:invalid -label:*as-designed -label:*out-of-scope -label:error-telemetry -label:verification-steps-needed -label:verification-found -author:aeschli -author:alexdima -author:alexr00 -author:AmandaSilver -author:andreamah -author:bamurtaugh -author:bpasero -author:chrisdias -author:chrmarti -author:Chuxel -author:claudiaregio -author:connor4312 -author:dbaeumer -author:deepak1556 -author:devinvalenciano -author:digitarald -author:DonJayamanne -author:egamma -author:fiveisprime -author:gregvanl -author:hediet -author:isidorn -author:joaomoreno -author:joyceerhl -author:jrieken -author:kieferrm -author:lramos15 -author:lszomoru -author:meganrogge -author:misolori -author:mjbvz -author:rebornix -author:roblourens -author:rzhao271 -author:sandy081 -author:sbatten -author:stevencl -author:tanhakabir -author:TylerLeonhardt -author:Tyriar -author:weinand -author:amunger -author:karthiknadig -author:eleanorjboyd -author:Yoyokrazy -author:paulacamargo25 -author:ulugbekna -author:aiday-mar -author:daviddossett -author:bhavyaus -author:justschen -author:benibenj -author:luabud -author:anthonykim1"
},
{
"kind": 1,

File diff suppressed because one or more lines are too long

View File

@ -170,5 +170,6 @@
},
"css.format.spaceAroundSelectorSeparator": true,
"inlineChat.mode": "live",
"inlineChat.experimental.textButtons": true,
"typescript.enablePromptUseWorkspaceTsdk": true
}

View File

@ -1,5 +1,5 @@
disturl "https://electronjs.org/headers"
target "29.4.0"
ms_build_id "9593362"
ms_build_id "9728852"
runtime "electron"
build_from_source "true"

View File

@ -517,7 +517,7 @@ to the base-name name of the original file, and an extension of txt, html, or si
---------------------------------------------------------
go-syntax 0.6.6 - MIT
go-syntax 0.6.8 - MIT
https://github.com/worlpaker/go-syntax
MIT License
@ -833,7 +833,7 @@ SOFTWARE.
---------------------------------------------------------
jlelong/vscode-latex-basics 1.7.0 - MIT
jlelong/vscode-latex-basics 1.9.0 - MIT
https://github.com/jlelong/vscode-latex-basics
Copyright (c) vscode-latex-basics authors

View File

@ -133,14 +133,6 @@ steps:
VSCODE_REMOTE_DEPENDENCIES_CONTAINER_NAME: vscodehub.azurecr.io/vscode-linux-build-agent:bionic-arm32v7
displayName: Install dependencies
- ${{ if or(eq(parameters.VSCODE_ARCH, 'x64'), eq(parameters.VSCODE_ARCH, 'arm64')) }}:
- script: |
set -e
EXPECTED_GLIBC_VERSION="2.17" \
EXPECTED_GLIBCXX_VERSION="3.4.19" \
./build/azure-pipelines/linux/verify-glibc-requirements.sh
displayName: Check GLIBC and GLIBCXX dependencies in remote/node_modules
- script: node build/azure-pipelines/distro/mixin-npm
displayName: Mixin distro node modules
@ -172,9 +164,11 @@ steps:
yarn gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
mv ../vscode-reh-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH) # TODO@joaomoreno
ARCHIVE_PATH=".build/linux/server/vscode-server-linux-legacy-$(VSCODE_ARCH).tar.gz"
UNARCHIVE_PATH="`pwd`/../vscode-server-linux-$(VSCODE_ARCH)"
mkdir -p $(dirname $ARCHIVE_PATH)
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-linux-$(VSCODE_ARCH)
echo "##vso[task.setvariable variable=SERVER_PATH]$ARCHIVE_PATH"
echo "##vso[task.setvariable variable=SERVER_UNARCHIVE_PATH]$UNARCHIVE_PATH"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build server
@ -192,6 +186,26 @@ steps:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build server (web)
- ${{ if or(eq(parameters.VSCODE_ARCH, 'x64'), eq(parameters.VSCODE_ARCH, 'arm64')) }}:
- script: |
set -e
EXPECTED_GLIBC_VERSION="2.17" \
EXPECTED_GLIBCXX_VERSION="3.4.19" \
./build/azure-pipelines/linux/verify-glibc-requirements.sh
env:
SEARCH_PATH: $(SERVER_UNARCHIVE_PATH)
displayName: Check GLIBC and GLIBCXX dependencies in server archive
- ${{ else }}:
- script: |
set -e
EXPECTED_GLIBC_VERSION="2.28" \
EXPECTED_GLIBCXX_VERSION="3.4.22" \
./build/azure-pipelines/linux/verify-glibc-requirements.sh
env:
SEARCH_PATH: $(SERVER_UNARCHIVE_PATH)
displayName: Check GLIBC and GLIBCXX dependencies in server archive
- ${{ if eq(parameters.VSCODE_RUN_INTEGRATION_TESTS, true) }}:
- template: product-build-linux-test.yml
parameters:

View File

@ -131,16 +131,6 @@ steps:
displayName: Install dependencies
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
- script: |
set -e
EXPECTED_GLIBC_VERSION="2.28" \
EXPECTED_GLIBCXX_VERSION="3.4.25" \
./build/azure-pipelines/linux/verify-glibc-requirements.sh
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
displayName: Check GLIBC and GLIBCXX dependencies in remote/node_modules
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
- script: node build/azure-pipelines/distro/mixin-npm
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'))
@ -213,9 +203,11 @@ steps:
yarn gulp vscode-reh-linux-$(VSCODE_ARCH)-min-ci
mv ../vscode-reh-linux-$(VSCODE_ARCH) ../vscode-server-linux-$(VSCODE_ARCH) # TODO@joaomoreno
ARCHIVE_PATH=".build/linux/server/vscode-server-linux-$(VSCODE_ARCH).tar.gz"
UNARCHIVE_PATH="`pwd`/../vscode-server-linux-$(VSCODE_ARCH)"
mkdir -p $(dirname $ARCHIVE_PATH)
tar --owner=0 --group=0 -czf $ARCHIVE_PATH -C .. vscode-server-linux-$(VSCODE_ARCH)
echo "##vso[task.setvariable variable=SERVER_PATH]$ARCHIVE_PATH"
echo "##vso[task.setvariable variable=SERVER_UNARCHIVE_PATH]$UNARCHIVE_PATH"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build server
@ -232,6 +224,36 @@ steps:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build server (web)
- ${{ if or(eq(parameters.VSCODE_ARCH, 'x64'), eq(parameters.VSCODE_ARCH, 'arm64')) }}:
- script: |
set -e
source ./build/azure-pipelines/linux/setup-env.sh
EXPECTED_GLIBC_VERSION="2.28" \
EXPECTED_GLIBCXX_VERSION="3.4.25" \
./build/azure-pipelines/linux/verify-glibc-requirements.sh
env:
SEARCH_PATH: $(SERVER_UNARCHIVE_PATH)
npm_config_arch: $(NPM_ARCH)
VSCODE_ARCH: $(VSCODE_ARCH)
displayName: Check GLIBC and GLIBCXX dependencies in server archive
- ${{ else }}:
- script: |
set -e
source ./build/azure-pipelines/linux/setup-env.sh
EXPECTED_GLIBC_VERSION="2.28" \
EXPECTED_GLIBCXX_VERSION="3.4.26" \
./build/azure-pipelines/linux/verify-glibc-requirements.sh
env:
SEARCH_PATH: $(SERVER_UNARCHIVE_PATH)
npm_config_arch: $(NPM_ARCH)
VSCODE_ARCH: $(VSCODE_ARCH)
displayName: Check GLIBC and GLIBCXX dependencies in server archive
- ${{ else }}:
- script: yarn gulp "transpile-client-swc" "transpile-extensions"
env:

View File

@ -9,8 +9,8 @@ elif [ "$VSCODE_ARCH" == "armhf" ]; then
TRIPLE="arm-rpi-linux-gnueabihf"
fi
# Get all files with .node extension from remote/node_modules folder
files=$(find remote/node_modules -name "*.node" -not -path "*prebuilds*")
# Get all files with .node extension from server folder
files=$(find $SEARCH_PATH -name "*.node" -not -path "*prebuilds*" -o -type f -executable -name "node")
echo "Verifying requirements for files: $files"
@ -19,13 +19,13 @@ for file in $files; do
glibcxx_version="$EXPECTED_GLIBCXX_VERSION"
while IFS= read -r line; do
if [[ $line == *"GLIBC_"* ]]; then
version=$(echo "$line" | awk '{print $5}' | tr -d '()')
version=$(echo "$line" | awk '{if ($5 ~ /^[0-9a-fA-F]+$/) print $6; else print $5}' | tr -d '()')
version=${version#*_}
if [[ $(printf "%s\n%s" "$version" "$glibc_version" | sort -V | tail -n1) == "$version" ]]; then
glibc_version=$version
fi
elif [[ $line == *"GLIBCXX_"* ]]; then
version=$(echo "$line" | awk '{print $5}' | tr -d '()')
version=$(echo "$line" | awk '{if ($5 ~ /^[0-9a-fA-F]+$/) print $6; else print $5}' | tr -d '()')
version=${version#*_}
if [[ $(printf "%s\n%s" "$version" "$glibcxx_version" | sort -V | tail -n1) == "$version" ]]; then
glibcxx_version=$version
@ -34,11 +34,11 @@ for file in $files; do
done < <("$PWD/.build/sysroots/$TRIPLE/$TRIPLE/bin/objdump" -T "$file")
if [[ "$glibc_version" != "$EXPECTED_GLIBC_VERSION" ]]; then
echo "Error: File $file has dependency on GLIBC > $EXPECTED_GLIBC_VERSION"
echo "Error: File $file has dependency on GLIBC > $EXPECTED_GLIBC_VERSION, found $glibc_version"
exit 1
fi
if [[ "$glibcxx_version" != "$EXPECTED_GLIBCXX_VERSION" ]]; then
echo "Error: File $file has dependency on GLIBCXX > $EXPECTED_GLIBCXX_VERSION"
echo "Error: File $file has dependency on GLIBCXX > $EXPECTED_GLIBCXX_VERSION, found $glibcxx_version"
exit 1
fi
done

View File

@ -315,6 +315,18 @@ extends:
VSCODE_QUALITY: ${{ variables.VSCODE_QUALITY }}
VSCODE_BUILD_WIN32_ARM64: ${{ parameters.VSCODE_BUILD_WIN32_ARM64 }}
- stage: CustomSDL
dependsOn: []
pool:
name: 1es-windows-2019-x64
os: windows
jobs:
- job: WindowsSDL
variables:
- group: 'API Scan'
steps:
- template: build/azure-pipelines/sdl-scan.yml@self
- ${{ if and(eq(parameters.VSCODE_COMPILE_ONLY, false), eq(variables['VSCODE_BUILD_STAGE_WINDOWS'], true)) }}:
- stage: Windows
dependsOn:

View File

@ -1,296 +1,151 @@
trigger: none
pr: none
parameters:
- name: NPM_REGISTRY
displayName: "Custom NPM Registry"
type: string
default: "https://pkgs.dev.azure.com/monacotools/Monaco/_packaging/vscode/npm/registry/"
- name: SCAN_WINDOWS
displayName: "Scan Windows"
type: boolean
default: true
- name: SCAN_LINUX
displayName: "Scan Linux"
type: boolean
default: false
variables:
- name: NPM_REGISTRY
value: ${{ parameters.NPM_REGISTRY }}
- name: SCAN_WINDOWS
value: ${{ eq(parameters.SCAN_WINDOWS, true) }}
- name: SCAN_LINUX
value: ${{ eq(parameters.SCAN_LINUX, true) }}
- name: VSCODE_MIXIN_REPO
value: microsoft/vscode-distro
- name: skipComponentGovernanceDetection
value: true
- name: NPM_ARCH
value: x64
type: string
default: x64
- name: VSCODE_ARCH
value: x64
- name: Codeql.enabled
value: true
- name: Codeql.TSAEnabled
value: true
- name: Codeql.TSAOptionsPath
value: '$(Build.SourcesDirectory)\build\azure-pipelines\config\tsaoptions.json'
type: string
default: x64
stages:
- stage: Windows
condition: eq(variables.SCAN_WINDOWS, 'true')
pool: 1es-windows-2019-x64
jobs:
- job: WindowsJob
timeoutInMinutes: 0
steps:
- task: CredScan@3
continueOnError: true
inputs:
scanFolder: "$(Build.SourcesDirectory)"
outputFormat: "pre"
steps:
- task: NodeTool@0
inputs:
versionSource: fromFile
versionFilePath: .nvmrc
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
- task: NodeTool@0
inputs:
versionSource: fromFile
versionFilePath: .nvmrc
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
- template: ./distro/download-distro.yml
- template: ./distro/download-distro.yml
- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
inputs:
azureSubscription: "vscode-builds-subscription"
KeyVaultName: vscode-build-secrets
SecretsFilter: "github-distro-mixin-password"
- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
inputs:
azureSubscription: "vscode-builds-subscription"
KeyVaultName: vscode-build-secrets
SecretsFilter: "github-distro-mixin-password"
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { npm config set registry "${{ parameters.NPM_REGISTRY }}" --location=project }
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
# following is a workaround for yarn to send authorization header
# for GET requests to the registry.
exec { Add-Content -Path .npmrc -Value "always-auth=true" }
exec { yarn config set registry "${{ parameters.NPM_REGISTRY }}" }
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne('${{ parameters.NPM_REGISTRY }}', 'none'))
displayName: Setup NPM & Yarn
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { npm config set registry "$env:NPM_REGISTRY" --location=project }
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
# following is a workaround for yarn to send authorization header
# for GET requests to the registry.
exec { Add-Content -Path .npmrc -Value "always-auth=true" }
exec { yarn config set registry "$env:NPM_REGISTRY" }
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM & Yarn
- task: npmAuthenticate@0
inputs:
workingFile: .npmrc
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne('${{ parameters.NPM_REGISTRY }}', 'none'))
displayName: Setup NPM Authentication
- task: npmAuthenticate@0
inputs:
workingFile: .npmrc
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Authentication
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { node build/setup-npm-registry.js "${{ parameters.NPM_REGISTRY }}" }
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne('${{ parameters.NPM_REGISTRY }}', 'none'))
displayName: Setup NPM Registry
- powershell: |
. build/azure-pipelines/win32/exec.ps1
$ErrorActionPreference = "Stop"
exec { node build/setup-npm-registry.js $env:NPM_REGISTRY }
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Registry
- pwsh: |
$includes = @'
{
'target_defaults': {
'conditions': [
['OS=="win"', {
'msvs_configuration_attributes': {
'SpectreMitigation': 'Spectre'
},
'msvs_settings': {
'VCCLCompilerTool': {
'AdditionalOptions': [
'/Zi',
'/FS'
],
},
'VCLinkerTool': {
'AdditionalOptions': [
'/profile'
]
}
}
}]
]
}
}
'@
- task: CodeQL3000Init@0
displayName: CodeQL Initialize
condition: eq(variables['Codeql.enabled'], 'True')
if (!(Test-Path "~/.gyp")) {
mkdir "~/.gyp"
}
echo $includes > "~/.gyp/include.gypi"
displayName: Create include.gypi
- powershell: |
. build/azure-pipelines/win32/exec.ps1
. build/azure-pipelines/win32/retry.ps1
$ErrorActionPreference = "Stop"
# TODO: remove custom node-gyp when updating to Node v20,
# refs https://github.com/npm/cli/releases/tag/v10.2.3 which is available with Node >= 20.10.0
$nodeGypDir = "$(Agent.TempDirectory)/custom-packages"
mkdir "$nodeGypDir"
npm install node-gyp@10.0.1 -g --prefix "$nodeGypDir"
$env:npm_config_node_gyp = "${nodeGypDir}/node_modules/node-gyp/bin/node-gyp.js"
$env:npm_config_arch = "$(NPM_ARCH)"
retry { exec { yarn --frozen-lockfile --check-files } }
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"
CHILD_CONCURRENCY: 1
displayName: Install dependencies
- powershell: |
. build/azure-pipelines/win32/exec.ps1
. build/azure-pipelines/win32/retry.ps1
$ErrorActionPreference = "Stop"
retry { exec { yarn --frozen-lockfile --check-files } }
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"
CHILD_CONCURRENCY: 1
displayName: Install dependencies
- script: node build/azure-pipelines/distro/mixin-npm
displayName: Mixin distro node modules
- script: node build/azure-pipelines/distro/mixin-npm
displayName: Mixin distro node modules
- script: node build/azure-pipelines/distro/mixin-quality
displayName: Mixin distro quality
env:
VSCODE_QUALITY: stable
- script: node build/azure-pipelines/distro/mixin-quality
displayName: Mixin distro quality
env:
VSCODE_QUALITY: stable
- powershell: yarn compile
displayName: Compile
- powershell: yarn compile
displayName: Compile
- task: CodeQL3000Finalize@0
displayName: CodeQL Finalize
condition: eq(variables['Codeql.enabled'], 'True')
- powershell: yarn gulp "vscode-symbols-win32-${{ parameters.VSCODE_ARCH }}"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Download Symbols
- powershell: yarn gulp "vscode-symbols-win32-$(VSCODE_ARCH)"
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Download Symbols
- task: BinSkim@4
inputs:
InputType: "Basic"
Function: "analyze"
TargetPattern: "guardianGlob"
AnalyzeIgnorePdbLoadError: true
AnalyzeTargetGlob: '$(agent.builddirectory)\scanbin\**.dll;$(agent.builddirectory)\scanbin\**.exe;$(agent.builddirectory)\scanbin\**.node'
AnalyzeLocalSymbolDirectories: '$(agent.builddirectory)\scanbin\VSCode-win32-${{ parameters.VSCODE_ARCH }}\pdb'
- task: PSScriptAnalyzer@1
inputs:
Path: '$(Build.SourcesDirectory)'
Settings: required
Recurse: true
- task: CopyFiles@2
displayName: 'Collect Symbols for API Scan'
inputs:
SourceFolder: $(Agent.BuildDirectory)
Contents: 'scanbin\**\*.pdb'
TargetFolder: '$(agent.builddirectory)\symbols'
flattenFolders: true
condition: succeeded()
- task: BinSkim@4
inputs:
InputType: "Basic"
Function: "analyze"
TargetPattern: "guardianGlob"
AnalyzeIgnorePdbLoadError: true
AnalyzeTargetGlob: '$(agent.builddirectory)\scanbin\**.dll;$(agent.builddirectory)\scanbin\**.exe;$(agent.builddirectory)\scanbin\**.node'
AnalyzeLocalSymbolDirectories: '$(agent.builddirectory)\scanbin\VSCode-win32-$(VSCODE_ARCH)\pdb'
# - task: APIScan@2
# inputs:
# softwareFolder: $(agent.builddirectory)\scanbin
# softwareName: 'vscode-client'
# softwareVersionNum: '1'
# symbolsFolder: 'SRV*http://symweb;$(agent.builddirectory)\symbols'
# isLargeApp: false
# toolVersion: 'Latest'
# displayName: Run ApiScan
# condition: succeeded()
# env:
# AzureServicesAuthConnectionString: $(apiscan-connectionstring)
- task: AntiMalware@4
inputs:
InputType: Basic
ScanType: CustomScan
FileDirPath: '$(Build.SourcesDirectory)'
EnableServices: true
SupportLogOnError: false
TreatSignatureUpdateFailureAs: 'Warning'
SignatureFreshness: 'OneDay'
TreatStaleSignatureAs: 'Error'
- task: PublishSecurityAnalysisLogs@3
inputs:
ArtifactName: CodeAnalysisLogs
ArtifactType: Container
PublishProcessedResults: false
AllTools: true
- task: TSAUpload@2
inputs:
GdnPublishTsaOnboard: true
GdnPublishTsaConfigFile: '$(Build.SourcesDirectory)\build\azure-pipelines\config\tsaoptions.json'
- stage: Linux
dependsOn: []
condition: eq(variables.SCAN_LINUX, 'true')
pool:
vmImage: "Ubuntu-18.04"
jobs:
- job: LinuxJob
steps:
- task: CredScan@2
inputs:
toolMajorVersion: "V2"
- task: NodeTool@0
inputs:
versionSource: fromFile
versionFilePath: .nvmrc
nodejsMirror: https://github.com/joaomoreno/node-mirror/releases/download
- template: ./distro/download-distro.yml
- task: AzureKeyVault@1
displayName: "Azure Key Vault: Get Secrets"
inputs:
azureSubscription: "vscode-builds-subscription"
KeyVaultName: vscode-build-secrets
SecretsFilter: "github-distro-mixin-password"
- script: |
set -e
npm config set registry "$NPM_REGISTRY" --location=project
# npm >v7 deprecated the `always-auth` config option, refs npm/cli@72a7eeb
# following is a workaround for yarn to send authorization header
# for GET requests to the registry.
echo "always-auth=true" >> .npmrc
yarn config set registry "$NPM_REGISTRY"
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM & Yarn
- task: npmAuthenticate@0
inputs:
workingFile: .npmrc
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Authentication
- script: node build/setup-npm-registry.js $NPM_REGISTRY
condition: and(succeeded(), ne(variables.NODE_MODULES_RESTORED, 'true'), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Registry
- script: |
set -e
for i in {1..5}; do # try 5 times
yarn --cwd build --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
exit 1
fi
echo "Yarn failed $i, trying again..."
done
displayName: Install build dependencies
- script: |
set -e
export npm_config_arch=$(NPM_ARCH)
if [ -z "$CC" ] || [ -z "$CXX" ]; then
# Download clang based on chromium revision used by vscode
curl -s https://raw.githubusercontent.com/chromium/chromium/96.0.4664.110/tools/clang/scripts/update.py | python - --output-dir=$PWD/.build/CR_Clang --host-os=linux
# Download libcxx headers and objects from upstream electron releases
DEBUG=libcxx-fetcher \
VSCODE_LIBCXX_OBJECTS_DIR=$PWD/.build/libcxx-objects \
VSCODE_LIBCXX_HEADERS_DIR=$PWD/.build/libcxx_headers \
VSCODE_LIBCXXABI_HEADERS_DIR=$PWD/.build/libcxxabi_headers \
VSCODE_ARCH="$(NPM_ARCH)" \
node build/linux/libcxx-fetcher.js
# Set compiler toolchain
export CC=$PWD/.build/CR_Clang/bin/clang
export CXX=$PWD/.build/CR_Clang/bin/clang++
export CXXFLAGS="-std=c++17 -nostdinc++ -D__NO_INLINE__ -I$PWD/.build/libcxx_headers -isystem$PWD/.build/libcxx_headers/include -isystem$PWD/.build/libcxxabi_headers/include -fPIC -flto=thin -fsplit-lto-unit -D_LIBCPP_ABI_NAMESPACE=Cr"
export LDFLAGS="-stdlib=libc++ -fuse-ld=lld -flto=thin -fsplit-lto-unit -L$PWD/.build/libcxx-objects -lc++abi"
export VSCODE_REMOTE_CC=$(which gcc)
export VSCODE_REMOTE_CXX=$(which g++)
fi
for i in {1..5}; do # try 5 times
yarn --frozen-lockfile --check-files && break
if [ $i -eq 3 ]; then
echo "Yarn failed too many times" >&2
exit 1
fi
echo "Yarn failed $i, trying again..."
done
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Install dependencies
- script: yarn --frozen-lockfile --check-files
workingDirectory: .build/distro/npm
env:
npm_config_arch: $(NPM_ARCH)
displayName: Install distro node modules
- script: node build/azure-pipelines/distro/mixin-npm
displayName: Mixin distro node modules
- script: node build/azure-pipelines/distro/mixin-quality
displayName: Mixin distro quality
env:
VSCODE_QUALITY: stable
- script: yarn gulp vscode-symbols-linux-$(VSCODE_ARCH)
env:
GITHUB_TOKEN: "$(github-distro-mixin-password)"
displayName: Build
- task: BinSkim@3
inputs:
toolVersion: Latest
InputType: CommandLine
arguments: analyze $(agent.builddirectory)\scanbin\exe\*.* --recurse --local-symbol-directories $(agent.builddirectory)\scanbin\VSCode-linux-$(VSCODE_ARCH)\pdb
- task: TSAUpload@2
inputs:
GdnPublishTsaConfigFile: '$(Build.SourceDirectory)\build\azure-pipelines\config\tsaoptions.json'
- task: PublishSecurityAnalysisLogs@3
inputs:
ArtifactName: CodeAnalysisLogs
ArtifactType: Container
PublishProcessedResults: false
AllTools: true

View File

@ -72,6 +72,11 @@ steps:
}
displayName: Build integration tests
- powershell: .\build\azure-pipelines\win32\listprocesses.bat
displayName: Diagnostics before integration test runs
continueOnError: true
condition: succeededOrFailed()
- ${{ if eq(parameters.VSCODE_QUALITY, 'oss') }}:
- powershell: .\scripts\test-integration.bat --tfs "Integration Tests"
displayName: Run integration tests (Electron)
@ -121,6 +126,11 @@ steps:
displayName: Run integration tests (Remote)
timeoutInMinutes: 20
- powershell: .\build\azure-pipelines\win32\listprocesses.bat
displayName: Diagnostics after integration test runs
continueOnError: true
condition: succeededOrFailed()
- ${{ if eq(parameters.VSCODE_RUN_SMOKE_TESTS, true) }}:
- powershell: .\build\azure-pipelines\win32\listprocesses.bat
displayName: Diagnostics before smoke test run

View File

@ -234,7 +234,7 @@ class MonacoGenerator {
function generateApiProposalNames() {
let eol;
try {
const src = fs.readFileSync('src/vs/workbench/services/extensions/common/extensionsApiProposals.ts', 'utf-8');
const src = fs.readFileSync('src/vs/platform/extensions/common/extensionsApiProposals.ts', 'utf-8');
const match = /\r?\n/m.exec(src);
eol = match ? match[0] : os.EOL;
}
@ -242,18 +242,27 @@ function generateApiProposalNames() {
eol = os.EOL;
}
const pattern = /vscode\.proposed\.([a-zA-Z\d]+)\.d\.ts$/;
const proposalNames = new Set();
const versionPattern = /^\s*\/\/\s*version\s*:\s*(\d+)\s*$/mi;
const proposals = new Map();
const input = es.through();
const output = input
.pipe(util.filter((f) => pattern.test(f.path)))
.pipe(es.through((f) => {
const name = path.basename(f.path);
const match = pattern.exec(name);
if (match) {
proposalNames.add(match[1]);
if (!match) {
return;
}
const proposalName = match[1];
const contents = f.contents.toString('utf8');
const versionMatch = versionPattern.exec(contents);
const version = versionMatch ? versionMatch[1] : undefined;
proposals.set(proposalName, {
proposal: `https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.${proposalName}.d.ts`,
version: version ? parseInt(version) : undefined
});
}, function () {
const names = [...proposalNames.values()].sort();
const names = [...proposals.keys()].sort();
const contents = [
'/*---------------------------------------------------------------------------------------------',
' * Copyright (c) Microsoft Corporation. All rights reserved.',
@ -262,14 +271,18 @@ function generateApiProposalNames() {
'',
'// THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY.',
'',
'export const allApiProposals = Object.freeze({',
`${names.map(name => `\t${name}: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.${name}.d.ts'`).join(`,${eol}`)}`,
'});',
'export type ApiProposalName = keyof typeof allApiProposals;',
'const _allApiProposals = {',
`${names.map(proposalName => {
const proposal = proposals.get(proposalName);
return `\t${proposalName}: {${eol}\t\tproposal: '${proposal.proposal}',${eol}${proposal.version ? `\t\tversion: ${proposal.version}${eol}` : ''}\t}`;
}).join(`,${eol}`)}`,
'};',
'export const allApiProposals = Object.freeze<{ [proposalName: string]: Readonly<{ proposal: string; version?: number }> }>(_allApiProposals);',
'export type ApiProposalName = keyof typeof _allApiProposals;',
'',
].join(eol);
this.emit('data', new File({
path: 'vs/workbench/services/extensions/common/extensionsApiProposals.ts',
path: 'vs/platform/extensions/common/extensionsApiProposals.ts',
contents: Buffer.from(contents)
}));
this.emit('end');

View File

@ -275,7 +275,7 @@ function generateApiProposalNames() {
let eol: string;
try {
const src = fs.readFileSync('src/vs/workbench/services/extensions/common/extensionsApiProposals.ts', 'utf-8');
const src = fs.readFileSync('src/vs/platform/extensions/common/extensionsApiProposals.ts', 'utf-8');
const match = /\r?\n/m.exec(src);
eol = match ? match[0] : os.EOL;
} catch {
@ -283,7 +283,8 @@ function generateApiProposalNames() {
}
const pattern = /vscode\.proposed\.([a-zA-Z\d]+)\.d\.ts$/;
const proposalNames = new Set<string>();
const versionPattern = /^\s*\/\/\s*version\s*:\s*(\d+)\s*$/mi;
const proposals = new Map<string, { proposal: string; version?: number }>();
const input = es.through();
const output = input
@ -292,11 +293,22 @@ function generateApiProposalNames() {
const name = path.basename(f.path);
const match = pattern.exec(name);
if (match) {
proposalNames.add(match[1]);
if (!match) {
return;
}
const proposalName = match[1];
const contents = f.contents.toString('utf8');
const versionMatch = versionPattern.exec(contents);
const version = versionMatch ? versionMatch[1] : undefined;
proposals.set(proposalName, {
proposal: `https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.${proposalName}.d.ts`,
version: version ? parseInt(version) : undefined
});
}, function () {
const names = [...proposalNames.values()].sort();
const names = [...proposals.keys()].sort();
const contents = [
'/*---------------------------------------------------------------------------------------------',
' * Copyright (c) Microsoft Corporation. All rights reserved.',
@ -305,15 +317,19 @@ function generateApiProposalNames() {
'',
'// THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY.',
'',
'export const allApiProposals = Object.freeze({',
`${names.map(name => `\t${name}: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.${name}.d.ts'`).join(`,${eol}`)}`,
'});',
'export type ApiProposalName = keyof typeof allApiProposals;',
'const _allApiProposals = {',
`${names.map(proposalName => {
const proposal = proposals.get(proposalName)!;
return `\t${proposalName}: {${eol}\t\tproposal: '${proposal.proposal}',${eol}${proposal.version ? `\t\tversion: ${proposal.version}${eol}` : ''}\t}`;
}).join(`,${eol}`)}`,
'};',
'export const allApiProposals = Object.freeze<{ [proposalName: string]: Readonly<{ proposal: string; version?: number }> }>(_allApiProposals);',
'export type ApiProposalName = keyof typeof _allApiProposals;',
'',
].join(eol);
this.emit('data', new File({
path: 'vs/workbench/services/extensions/common/extensionsApiProposals.ts',
path: 'vs/platform/extensions/common/extensionsApiProposals.ts',
contents: Buffer.from(contents)
}));
this.emit('end');

View File

@ -54,7 +54,7 @@ function darwinBundleDocumentType(extensions, icon, nameOrSuffix, utis) {
role: 'Editor',
ostypes: ['TEXT', 'utxt', 'TUTX', '****'],
extensions,
iconFile: 'resources/darwin/' + icon + '.icns',
iconFile: 'resources/darwin/' + icon.toLowerCase() + '.icns',
utis
};
}

View File

@ -68,7 +68,7 @@ function darwinBundleDocumentType(extensions: string[], icon: string, nameOrSuff
role: 'Editor',
ostypes: ['TEXT', 'utxt', 'TUTX', '****'],
extensions,
iconFile: 'resources/darwin/' + icon + '.icns',
iconFile: 'resources/darwin/' + icon.toLowerCase() + '.icns',
utis
};
}

View File

@ -68,7 +68,8 @@ const CORE_TYPES = [
'fetch',
'RequestInit',
'Headers',
'Response'
'Response',
'__global'
];
// Types that are defined in a common layer but are known to be only
// available in native environments should not be allowed in browser
@ -170,59 +171,17 @@ const RULES = [
'@types/node' // no node.js
]
},
// Common: vs/workbench/api/common/extHostTypes.ts
// Common: vs/base/parts/sandbox/electron-sandbox/preload.js
{
target: '**/vs/workbench/api/common/extHostTypes.ts',
target: '**/vs/base/parts/sandbox/electron-sandbox/preload.js',
allowedTypes: [
...CORE_TYPES,
// Safe access to global
'__global'
// Safe access to a very small subset of node.js
'process',
'NodeJS'
],
disallowedTypes: NATIVE_TYPES,
disallowedDefinitions: [
'lib.dom.d.ts', // no DOM
'@types/node' // no node.js
]
},
// Common: vs/workbench/api/common/extHostChatAgents2.ts
{
target: '**/vs/workbench/api/common/extHostChatAgents2.ts',
allowedTypes: [
...CORE_TYPES,
// Safe access to global
'__global'
],
disallowedTypes: NATIVE_TYPES,
disallowedDefinitions: [
'lib.dom.d.ts', // no DOM
'@types/node' // no node.js
]
},
// Common: vs/workbench/api/common/extHostChatVariables.ts
{
target: '**/vs/workbench/api/common/extHostChatVariables.ts',
allowedTypes: [
...CORE_TYPES,
// Safe access to global
'__global'
],
disallowedTypes: NATIVE_TYPES,
disallowedDefinitions: [
'lib.dom.d.ts', // no DOM
'@types/node' // no node.js
]
},
// Common: vs/workbench/api/common/extensionHostMain.ts
{
target: '**/vs/workbench/api/common/extensionHostMain.ts',
allowedTypes: [
...CORE_TYPES,
// Safe access to global
'__global'
],
disallowedTypes: NATIVE_TYPES,
disallowedDefinitions: [
'lib.dom.d.ts', // no DOM
'@types/node' // no node.js
]
},

View File

@ -69,7 +69,8 @@ const CORE_TYPES = [
'fetch',
'RequestInit',
'Headers',
'Response'
'Response',
'__global'
];
// Types that are defined in a common layer but are known to be only
@ -185,66 +186,18 @@ const RULES: IRule[] = [
]
},
// Common: vs/workbench/api/common/extHostTypes.ts
// Common: vs/base/parts/sandbox/electron-sandbox/preload.js
{
target: '**/vs/workbench/api/common/extHostTypes.ts',
target: '**/vs/base/parts/sandbox/electron-sandbox/preload.js',
allowedTypes: [
...CORE_TYPES,
// Safe access to global
'__global'
// Safe access to a very small subset of node.js
'process',
'NodeJS'
],
disallowedTypes: NATIVE_TYPES,
disallowedDefinitions: [
'lib.dom.d.ts', // no DOM
'@types/node' // no node.js
]
},
// Common: vs/workbench/api/common/extHostChatAgents2.ts
{
target: '**/vs/workbench/api/common/extHostChatAgents2.ts',
allowedTypes: [
...CORE_TYPES,
// Safe access to global
'__global'
],
disallowedTypes: NATIVE_TYPES,
disallowedDefinitions: [
'lib.dom.d.ts', // no DOM
'@types/node' // no node.js
]
},
// Common: vs/workbench/api/common/extHostChatVariables.ts
{
target: '**/vs/workbench/api/common/extHostChatVariables.ts',
allowedTypes: [
...CORE_TYPES,
// Safe access to global
'__global'
],
disallowedTypes: NATIVE_TYPES,
disallowedDefinitions: [
'lib.dom.d.ts', // no DOM
'@types/node' // no node.js
]
},
// Common: vs/workbench/api/common/extensionHostMain.ts
{
target: '**/vs/workbench/api/common/extensionHostMain.ts',
allowedTypes: [
...CORE_TYPES,
// Safe access to global
'__global'
],
disallowedTypes: NATIVE_TYPES,
disallowedDefinitions: [
'lib.dom.d.ts', // no DOM
'@types/node' // no node.js
]
},

View File

@ -94,6 +94,7 @@
"--vscode-debugTokenExpression-name",
"--vscode-debugTokenExpression-number",
"--vscode-debugTokenExpression-string",
"--vscode-debugTokenExpression-type",
"--vscode-debugTokenExpression-value",
"--vscode-debugToolBar-background",
"--vscode-debugToolBar-border",
@ -127,6 +128,7 @@
"--vscode-dropdown-foreground",
"--vscode-dropdown-listBackground",
"--vscode-editor-background",
"--vscode-editor-collapsedText",
"--vscode-editor-findMatchBackground",
"--vscode-editor-findMatchBorder",
"--vscode-editor-findMatchForeground",
@ -714,6 +716,7 @@
"--vscode-terminalOverviewRuler-cursorForeground",
"--vscode-terminalOverviewRuler-findMatchForeground",
"--vscode-terminalStickyScroll-background",
"--vscode-terminalStickyScroll-border",
"--vscode-terminalStickyScrollHover-background",
"--vscode-testing-coverCountBadgeBackground",
"--vscode-testing-coverCountBadgeForeground",
@ -851,6 +854,8 @@
"--z-index-notebook-scrollbar",
"--z-index-run-button-container",
"--zoom-factor",
"--test-bar-width"
"--test-bar-width",
"--widget-color",
"--text-link-decoration"
]
}

View File

@ -1341,7 +1341,7 @@ SOFTWARE.
---------------------------------------------------------
clap_derive 4.5.4 - MIT OR Apache-2.0
https://github.com/clap-rs/clap/tree/master/clap_derive
https://github.com/clap-rs/clap
Copyright (c) Individual contributors
@ -1367,7 +1367,7 @@ SOFTWARE.
---------------------------------------------------------
clap_lex 0.7.0 - MIT OR Apache-2.0
https://github.com/clap-rs/clap/tree/master/clap_lex
https://github.com/clap-rs/clap
Copyright (c) Individual contributors
@ -3428,7 +3428,7 @@ DEALINGS IN THE SOFTWARE.
httparse 1.8.0 - MIT/Apache-2.0
https://github.com/seanmonstar/httparse
Copyright (c) 2015-2021 Sean McArthur
Copyright (c) 2015-2024 Sean McArthur
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -8507,6 +8507,7 @@ subtle 2.5.0 - BSD-3-Clause
https://github.com/dalek-cryptography/subtle
Copyright (c) 2016-2017 Isis Agora Lovecruft, Henry de Valence. All rights reserved.
Copyright (c) 2016-2024 Isis Agora Lovecruft. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@ -10790,33 +10791,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
zbus 3.15.2 - MIT
https://github.com/dbus2/zbus/
The MIT License (MIT)
Copyright (c) 2024 Zeeshan Ali Khan & zbus contributors
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
LICENSE-MIT
---------------------------------------------------------
---------------------------------------------------------
@ -10824,33 +10799,7 @@ DEALINGS IN THE SOFTWARE.
zbus_macros 3.15.2 - MIT
https://github.com/dbus2/zbus/
The MIT License (MIT)
Copyright (c) 2024 Zeeshan Ali Khan & zbus contributors
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
LICENSE-MIT
---------------------------------------------------------
---------------------------------------------------------
@ -10858,33 +10807,7 @@ DEALINGS IN THE SOFTWARE.
zbus_names 2.6.1 - MIT
https://github.com/dbus2/zbus/
The MIT License (MIT)
Copyright (c) 2024 Zeeshan Ali Khan & zbus contributors
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
LICENSE-MIT
---------------------------------------------------------
---------------------------------------------------------
@ -10977,33 +10900,7 @@ licences; see files named LICENSE.*.txt for details.
zvariant 3.15.2 - MIT
https://github.com/dbus2/zbus/
The MIT License (MIT)
Copyright (c) 2024 Zeeshan Ali Khan & zbus contributors
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
LICENSE-MIT
---------------------------------------------------------
---------------------------------------------------------
@ -11011,33 +10908,7 @@ DEALINGS IN THE SOFTWARE.
zvariant_derive 3.15.2 - MIT
https://github.com/dbus2/zbus/
The MIT License (MIT)
Copyright (c) 2024 Zeeshan Ali Khan & zbus contributors
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
LICENSE-MIT
---------------------------------------------------------
---------------------------------------------------------
@ -11045,31 +10916,5 @@ DEALINGS IN THE SOFTWARE.
zvariant_utils 1.0.1 - MIT
https://github.com/dbus2/zbus/
The MIT License (MIT)
Copyright (c) 2024 Zeeshan Ali Khan & zbus contributors
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
LICENSE-MIT
---------------------------------------------------------

View File

@ -8,13 +8,6 @@ import { BaseLanguageClient, LanguageClientOptions } from 'vscode-languageclient
import { startClient, LanguageClientConstructor } from '../cssClient';
import { LanguageClient } from 'vscode-languageclient/browser';
declare const Worker: {
new(stringUrl: string): any;
};
declare const TextDecoder: {
new(encoding?: string): { decode(buffer: ArrayBuffer): string };
};
let client: BaseLanguageClient | undefined;
// this method is called when vs code is activated
@ -25,7 +18,7 @@ export async function activate(context: ExtensionContext) {
worker.postMessage({ i10lLocation: l10n.uri?.toString(false) ?? '' });
const newLanguageClient: LanguageClientConstructor = (id: string, name: string, clientOptions: LanguageClientOptions) => {
return new LanguageClient(id, name, clientOptions, worker);
return new LanguageClient(id, name, worker, clientOptions);
};
client = await startClient(context, newLanguageClient, { TextDecoder });

View File

@ -1,7 +1,10 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out"
"outDir": "./out",
"lib": [
"webworker"
]
},
"include": [
"src/**/*",

View File

@ -994,7 +994,7 @@
]
},
"dependencies": {
"vscode-languageclient": "^10.0.0-next.5",
"vscode-languageclient": "^10.0.0-next.8",
"vscode-uri": "^3.0.8"
},
"devDependencies": {

View File

@ -11,8 +11,8 @@
"browser": "./dist/browser/cssServerMain",
"dependencies": {
"@vscode/l10n": "^0.0.18",
"vscode-css-languageservice": "^6.2.14",
"vscode-languageserver": "^10.0.0-next.3",
"vscode-css-languageservice": "^6.3.0",
"vscode-languageserver": "^10.0.0-next.6",
"vscode-uri": "^3.0.8"
},
"devDependencies": {

View File

@ -24,28 +24,28 @@ undici-types@~5.26.4:
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
vscode-css-languageservice@^6.2.14:
version "6.2.14"
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-6.2.14.tgz#d44fe75c03942d865a9c1a5ff5fb4e8dec1f89d0"
integrity sha512-5UPQ9Y1sUTnuMyaMBpO7LrBkqjhEJb5eAwdUlDp+Uez8lry+Tspnk3+3p2qWS4LlNsr4p3v9WkZxUf1ltgFpgw==
vscode-css-languageservice@^6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-6.3.0.tgz#51724d193d19b1a9075b1cef5cfeea6a555d2aa4"
integrity sha512-nU92imtkgzpCL0xikrIb8WvedV553F2BENzgz23wFuok/HLN5BeQmroMy26pUwFxV2eV8oNRmYCUv8iO7kSMhw==
dependencies:
"@vscode/l10n" "^0.0.18"
vscode-languageserver-textdocument "^1.0.11"
vscode-languageserver-types "3.17.5"
vscode-uri "^3.0.8"
vscode-jsonrpc@9.0.0-next.2:
version "9.0.0-next.2"
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.2.tgz#29e9741c742c80329bba1c60ce38fd014651ba80"
integrity sha512-meIaXAgChCHzWy45QGU8YpCNyqnZQ/sYeCj32OLDDbUYsCF7AvgpdXx3nnZn9yzr8ed0Od9bW+NGphEmXsqvIQ==
vscode-jsonrpc@9.0.0-next.4:
version "9.0.0-next.4"
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.4.tgz#ba403ddb3b82ca578179963dbe08e120a935f50d"
integrity sha512-zSVIr58lJSMYKIsZ5P7GtBbv1eEx25eNyOf0NmEzxmn1GhUNJAVAb5hkA1poKUwj1FRMwN6CeyWxZypmr8SsQQ==
vscode-languageserver-protocol@3.17.6-next.4:
version "3.17.6-next.4"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.4.tgz#3c56f6eb588bb42fccc0ac54a0d5daf2d02f0a1b"
integrity sha512-/2bleKBxZLyRObS4mkpaWlVI9xGiUqMVmh/ztZ2vL4uP2XyIpraT45JBpn9AtXr0alqKJPKLuKr+/qcYULvm/w==
vscode-languageserver-protocol@3.17.6-next.6:
version "3.17.6-next.6"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.6.tgz#8863a4dc8b395a8c31106ffdc945a00f9163b68b"
integrity sha512-naxM9kc/phpl0kAFNVPejMUWUtzFXdPYY/BtQTYtfbBbHf8sceHOrKkmf6yynZRu1A4oFtRZNqV3wyFRTWqUHw==
dependencies:
vscode-jsonrpc "9.0.0-next.2"
vscode-languageserver-types "3.17.6-next.3"
vscode-jsonrpc "9.0.0-next.4"
vscode-languageserver-types "3.17.6-next.4"
vscode-languageserver-textdocument@^1.0.11:
version "1.0.11"
@ -57,17 +57,17 @@ vscode-languageserver-types@3.17.5:
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz#3273676f0cf2eab40b3f44d085acbb7f08a39d8a"
integrity sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==
vscode-languageserver-types@3.17.6-next.3:
version "3.17.6-next.3"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.3.tgz#f71d6c57f18d921346cfe0c227aabd72eb8cd2f0"
integrity sha512-l5kNFXFRQGuzriXpuBqFpRmkf6f6A4VoU3h95OsVkqIOoi1k7KbwSo600cIdsKSJWrPg/+vX+QMPcMw1oI7ItA==
vscode-languageserver-types@3.17.6-next.4:
version "3.17.6-next.4"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.4.tgz#6670939eb98f00aa7b05021dc3dd7fe9aa4453ea"
integrity sha512-SeJTpH/S14EbxOAVaOUoGVqPToqpRTld5QO5Ghig3AlbFJTFF9Wu7srHMfa85L0SX1RYAuuCSFKJVVCxDIk1/Q==
vscode-languageserver@^10.0.0-next.3:
version "10.0.0-next.3"
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-10.0.0-next.3.tgz#a63c5ea9fab1be93d7732ab0fdc18c9b37956e07"
integrity sha512-4x1qHImf6ePji4+8PX43lnBCBfBNdi2jneGX2k5FswJhx/cxaYYmusShmmtO/clyL1iurxJacrQoXfw9+ikhvg==
vscode-languageserver@^10.0.0-next.6:
version "10.0.0-next.6"
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-10.0.0-next.6.tgz#0db118a93fe010c6b40cd04e91a15d09e7b60b60"
integrity sha512-0Lh1nhQfSxo5Ob+ayYO1QTIsDix2/Lc72Urm1KZrCFxK5zIFYaEh3QFeM9oZih4Rzs0ZkQPXXnoHtpvs5GT+Zw==
dependencies:
vscode-languageserver-protocol "3.17.6-next.4"
vscode-languageserver-protocol "3.17.6-next.6"
vscode-uri@^3.0.8:
version "3.0.8"

View File

@ -47,32 +47,32 @@ undici-types@~5.26.4:
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
vscode-jsonrpc@9.0.0-next.2:
version "9.0.0-next.2"
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.2.tgz#29e9741c742c80329bba1c60ce38fd014651ba80"
integrity sha512-meIaXAgChCHzWy45QGU8YpCNyqnZQ/sYeCj32OLDDbUYsCF7AvgpdXx3nnZn9yzr8ed0Od9bW+NGphEmXsqvIQ==
vscode-jsonrpc@9.0.0-next.4:
version "9.0.0-next.4"
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.4.tgz#ba403ddb3b82ca578179963dbe08e120a935f50d"
integrity sha512-zSVIr58lJSMYKIsZ5P7GtBbv1eEx25eNyOf0NmEzxmn1GhUNJAVAb5hkA1poKUwj1FRMwN6CeyWxZypmr8SsQQ==
vscode-languageclient@^10.0.0-next.5:
version "10.0.0-next.5"
resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-10.0.0-next.5.tgz#7431d88255a5fd99e9423659ac484b1f968200f3"
integrity sha512-JIf1WE7fvV0RElFM062bAummI433vcxuFwqoYAp+1zTVhta/jznxkTz1zs3Hbj2tiDfclf0TZ0qCxflAP1mY2Q==
vscode-languageclient@^10.0.0-next.8:
version "10.0.0-next.8"
resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-10.0.0-next.8.tgz#5afa0ced3b2ac68d31cc1c48edc4f289744542a0"
integrity sha512-D9inIHgqKayO9Tv0MeLb3XIL76yTuWmKdHqcGZKzjtQrMGJgASJDYWTapu+yAjEpDp0gmVOaCYyIlLB86ncDoQ==
dependencies:
minimatch "^9.0.3"
semver "^7.6.0"
vscode-languageserver-protocol "3.17.6-next.4"
vscode-languageserver-protocol "3.17.6-next.6"
vscode-languageserver-protocol@3.17.6-next.4:
version "3.17.6-next.4"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.4.tgz#3c56f6eb588bb42fccc0ac54a0d5daf2d02f0a1b"
integrity sha512-/2bleKBxZLyRObS4mkpaWlVI9xGiUqMVmh/ztZ2vL4uP2XyIpraT45JBpn9AtXr0alqKJPKLuKr+/qcYULvm/w==
vscode-languageserver-protocol@3.17.6-next.6:
version "3.17.6-next.6"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.6.tgz#8863a4dc8b395a8c31106ffdc945a00f9163b68b"
integrity sha512-naxM9kc/phpl0kAFNVPejMUWUtzFXdPYY/BtQTYtfbBbHf8sceHOrKkmf6yynZRu1A4oFtRZNqV3wyFRTWqUHw==
dependencies:
vscode-jsonrpc "9.0.0-next.2"
vscode-languageserver-types "3.17.6-next.3"
vscode-jsonrpc "9.0.0-next.4"
vscode-languageserver-types "3.17.6-next.4"
vscode-languageserver-types@3.17.6-next.3:
version "3.17.6-next.3"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.3.tgz#f71d6c57f18d921346cfe0c227aabd72eb8cd2f0"
integrity sha512-l5kNFXFRQGuzriXpuBqFpRmkf6f6A4VoU3h95OsVkqIOoi1k7KbwSo600cIdsKSJWrPg/+vX+QMPcMw1oI7ItA==
vscode-languageserver-types@3.17.6-next.4:
version "3.17.6-next.4"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.4.tgz#6670939eb98f00aa7b05021dc3dd7fe9aa4453ea"
integrity sha512-SeJTpH/S14EbxOAVaOUoGVqPToqpRTld5QO5Ghig3AlbFJTFF9Wu7srHMfa85L0SX1RYAuuCSFKJVVCxDIk1/Q==
vscode-uri@^3.0.8:
version "3.0.8"

View File

@ -149,7 +149,8 @@ export class ExtensionLinter {
const effectiveProposalNames = extensionEnabledApiProposals[extensionId];
if (Array.isArray(effectiveProposalNames) && enabledApiProposals.children) {
for (const child of enabledApiProposals.children) {
if (child.type === 'string' && !effectiveProposalNames.includes(getNodeValue(child))) {
const proposalName = child.type === 'string' ? getNodeValue(child) : undefined;
if (typeof proposalName === 'string' && !effectiveProposalNames.includes(proposalName.split('@')[0])) {
const start = document.positionAt(child.offset);
const end = document.positionAt(child.offset + child.length);
diagnostics.push(new Diagnostic(new Range(start, end), apiProposalNotListed, DiagnosticSeverity.Error));

View File

@ -1967,23 +1967,23 @@
{
"command": "git.pushRef",
"group": "navigation",
"when": "scmProvider == git && scmHistoryItemGroupHasUpstream"
"when": "scmProvider == git && scmHistoryItemGroupHasRemote"
},
{
"command": "git.publish",
"group": "navigation",
"when": "scmProvider == git && !scmHistoryItemGroupHasUpstream"
"when": "scmProvider == git && !scmHistoryItemGroupHasRemote"
}
],
"scm/outgoingChanges/context": [
{
"command": "git.pushRef",
"when": "scmProvider == git && scmHistoryItemGroupHasUpstream",
"when": "scmProvider == git && scmHistoryItemGroupHasRemote",
"group": "1_modification@1"
},
{
"command": "git.publish",
"when": "scmProvider == git && !scmHistoryItemGroupHasUpstream",
"when": "scmProvider == git && !scmHistoryItemGroupHasRemote",
"group": "1_modification@1"
}
],

View File

@ -145,6 +145,7 @@ export interface LogOptions {
readonly sortByAuthorDate?: boolean;
readonly shortStats?: boolean;
readonly author?: string;
readonly refNames?: string[];
}
export interface CommitOptions {

View File

@ -2103,38 +2103,36 @@ export class CommandCenter {
}
}
if (!opts.amend) {
// no changes, and the user has not configured to commit all in this case
if (!noUnstagedChanges && noStagedChanges && !enableSmartCommit && !opts.all) {
const suggestSmartCommit = config.get<boolean>('suggestSmartCommit') === true;
// no changes, and the user has not configured to commit all in this case
if (!noUnstagedChanges && noStagedChanges && !enableSmartCommit && !opts.all) {
const suggestSmartCommit = config.get<boolean>('suggestSmartCommit') === true;
if (!suggestSmartCommit) {
return;
}
// prompt the user if we want to commit all or not
const message = l10n.t('There are no staged changes to commit.\n\nWould you like to stage all your changes and commit them directly?');
const yes = l10n.t('Yes');
const always = l10n.t('Always');
const never = l10n.t('Never');
const pick = await window.showWarningMessage(message, { modal: true }, yes, always, never);
if (pick === always) {
config.update('enableSmartCommit', true, true);
} else if (pick === never) {
config.update('suggestSmartCommit', false, true);
return;
} else if (pick !== yes) {
return; // do not commit on cancel
}
if (!suggestSmartCommit) {
return;
}
if (opts.all === undefined) {
opts = { ...opts, all: noStagedChanges };
} else if (!opts.all && noStagedChanges) {
opts = { ...opts, all: true };
// prompt the user if we want to commit all or not
const message = l10n.t('There are no staged changes to commit.\n\nWould you like to stage all your changes and commit them directly?');
const yes = l10n.t('Yes');
const always = l10n.t('Always');
const never = l10n.t('Never');
const pick = await window.showWarningMessage(message, { modal: true }, yes, always, never);
if (pick === always) {
config.update('enableSmartCommit', true, true);
} else if (pick === never) {
config.update('suggestSmartCommit', false, true);
return;
} else if (pick !== yes) {
return; // do not commit on cancel
}
}
if (opts.all === undefined) {
opts = { ...opts, all: noStagedChanges };
} else if (!opts.all && noStagedChanges) {
opts = { ...opts, all: true };
}
}
// enable signing of commits if configured

View File

@ -220,16 +220,16 @@ class GitIncomingChangesFileDecorationProvider implements FileDecorationProvider
const historyProvider = this.repository.historyProvider;
const currentHistoryItemGroup = historyProvider.currentHistoryItemGroup;
if (!currentHistoryItemGroup?.base) {
if (!currentHistoryItemGroup?.remote) {
return [];
}
const ancestor = await historyProvider.resolveHistoryItemGroupCommonAncestor(currentHistoryItemGroup.id, currentHistoryItemGroup.base.id);
const ancestor = await historyProvider.resolveHistoryItemGroupCommonAncestor(currentHistoryItemGroup.id, currentHistoryItemGroup.remote.id);
if (!ancestor) {
return [];
}
const changes = await this.repository.diffBetween(ancestor.id, currentHistoryItemGroup.base.id);
const changes = await this.repository.diffBetween(ancestor.id, currentHistoryItemGroup.remote.id);
return changes;
} catch (err) {
return [];

View File

@ -1165,6 +1165,12 @@ export class Repository {
args.push(`--author="${options.author}"`);
}
if (options?.refNames) {
args.push('--topo-order');
args.push('--decorate=full');
args.push(...options.refNames);
}
if (options?.path) {
args.push('--', options.path);
}
@ -1496,9 +1502,16 @@ export class Repository {
return parseGitChanges(this.repositoryRoot, gitResult.stdout);
}
async getMergeBase(ref1: string, ref2: string): Promise<string | undefined> {
async getMergeBase(ref1: string, ref2: string, ...refs: string[]): Promise<string | undefined> {
try {
const args = ['merge-base', ref1, ref2];
const args = ['merge-base'];
if (refs.length !== 0) {
args.push('--octopus');
args.push(...refs);
}
args.push(ref1, ref2);
const result = await this.exec(args);
return result.stdout.trim();

View File

@ -4,13 +4,14 @@
*--------------------------------------------------------------------------------------------*/
import { Disposable, Event, EventEmitter, FileDecoration, FileDecorationProvider, SourceControlHistoryItem, SourceControlHistoryItemChange, SourceControlHistoryItemGroup, SourceControlHistoryOptions, SourceControlHistoryProvider, ThemeIcon, Uri, window, LogOutputChannel } from 'vscode';
import { Disposable, Event, EventEmitter, FileDecoration, FileDecorationProvider, SourceControlHistoryItem, SourceControlHistoryItemChange, SourceControlHistoryItemGroup, SourceControlHistoryOptions, SourceControlHistoryProvider, ThemeIcon, Uri, window, LogOutputChannel, SourceControlHistoryItemLabel } from 'vscode';
import { Repository, Resource } from './repository';
import { IDisposable, dispose, filterEvent } from './util';
import { toGitUri } from './uri';
import { Branch, RefType, UpstreamRef } from './api/git';
import { emojify, ensureEmojis } from './emoji';
import { Operation } from './operation';
import { Commit } from './git';
export class GitHistoryProvider implements SourceControlHistoryProvider, FileDecorationProvider, IDisposable {
@ -21,6 +22,8 @@ export class GitHistoryProvider implements SourceControlHistoryProvider, FileDec
readonly onDidChangeFileDecorations: Event<Uri[]> = this._onDidChangeDecorations.event;
private _HEAD: Branch | undefined;
private _HEADMergeBase: Branch | undefined;
private _currentHistoryItemGroup: SourceControlHistoryItemGroup | undefined;
get currentHistoryItemGroup(): SourceControlHistoryItemGroup | undefined { return this._currentHistoryItemGroup; }
set currentHistoryItemGroup(value: SourceControlHistoryItemGroup | undefined) {
@ -29,6 +32,12 @@ export class GitHistoryProvider implements SourceControlHistoryProvider, FileDec
}
private historyItemDecorations = new Map<string, FileDecoration>();
private historyItemLabels = new Map<string, string>([
['HEAD -> refs/heads/', 'target'],
['refs/heads/', 'git-branch'],
['refs/remotes/', 'cloud'],
['refs/tags/', 'tag']
]);
private disposables: Disposable[] = [];
@ -43,18 +52,25 @@ export class GitHistoryProvider implements SourceControlHistoryProvider, FileDec
this.logger.trace('GitHistoryProvider:onDidRunGitStatus - HEAD:', JSON.stringify(this._HEAD));
this.logger.trace('GitHistoryProvider:onDidRunGitStatus - repository.HEAD:', JSON.stringify(this.repository.HEAD));
// Get the merge base of the current history item group
const mergeBase = await this.resolveHEADMergeBase();
// Check if HEAD has changed
if (!force &&
this._HEAD?.name === this.repository.HEAD?.name &&
this._HEAD?.commit === this.repository.HEAD?.commit &&
this._HEAD?.upstream?.name === this.repository.HEAD?.upstream?.name &&
this._HEAD?.upstream?.remote === this.repository.HEAD?.upstream?.remote &&
this._HEAD?.upstream?.commit === this.repository.HEAD?.upstream?.commit) {
this._HEAD?.upstream?.commit === this.repository.HEAD?.upstream?.commit &&
this._HEADMergeBase?.name === mergeBase?.name &&
this._HEADMergeBase?.remote === mergeBase?.remote &&
this._HEADMergeBase?.commit === mergeBase?.commit) {
this.logger.trace('GitHistoryProvider:onDidRunGitStatus - HEAD has not changed');
return;
}
this._HEAD = this.repository.HEAD;
this._HEADMergeBase = mergeBase;
// Check if HEAD does not support incoming/outgoing (detached commit, tag)
if (!this.repository.HEAD?.name || !this.repository.HEAD?.commit || this.repository.HEAD.type === RefType.Tag) {
@ -67,11 +83,14 @@ export class GitHistoryProvider implements SourceControlHistoryProvider, FileDec
this.currentHistoryItemGroup = {
id: `refs/heads/${this.repository.HEAD.name ?? ''}`,
name: this.repository.HEAD.name ?? '',
base: this.repository.HEAD.upstream ?
{
id: `refs/remotes/${this.repository.HEAD.upstream.remote}/${this.repository.HEAD.upstream.name}`,
name: `${this.repository.HEAD.upstream.remote}/${this.repository.HEAD.upstream.name}`,
} : undefined
remote: this.repository.HEAD.upstream ? {
id: `refs/remotes/${this.repository.HEAD.upstream.remote}/${this.repository.HEAD.upstream.name}`,
name: `${this.repository.HEAD.upstream.remote}/${this.repository.HEAD.upstream.name}`,
} : undefined,
base: mergeBase ? {
id: `refs/remotes/${mergeBase.remote}/${mergeBase.name}`,
name: `${mergeBase.remote}/${mergeBase.name}`,
} : undefined
};
this.logger.trace(`GitHistoryProvider:onDidRunGitStatus - currentHistoryItemGroup (${force}): ${JSON.stringify(this.currentHistoryItemGroup)}`);
@ -112,6 +131,47 @@ export class GitHistoryProvider implements SourceControlHistoryProvider, FileDec
return historyItems;
}
async provideHistoryItems2(options: SourceControlHistoryOptions): Promise<SourceControlHistoryItem[]> {
if (!this.currentHistoryItemGroup || !options.historyItemGroupIds) {
return [];
}
// Deduplicate refNames
const refNames = Array.from(new Set<string>(options.historyItemGroupIds));
// Get the merge base of the refNames
const refsMergeBase = await this.resolveHistoryItemGroupsMergeBase(refNames);
if (!refsMergeBase) {
return [];
}
// Get the commits
const commits = await this.repository.log({ range: `${refsMergeBase}^..`, refNames });
await ensureEmojis();
const historyItems: SourceControlHistoryItem[] = [];
historyItems.push(...commits.map(commit => {
const newLineIndex = commit.message.indexOf('\n');
const subject = newLineIndex !== -1 ? commit.message.substring(0, newLineIndex) : commit.message;
const labels = this.resolveHistoryItemLabels(commit, refNames);
return {
id: commit.hash,
parentIds: commit.parents,
message: emojify(subject),
author: commit.authorName,
icon: new ThemeIcon('git-commit'),
timestamp: commit.authorDate?.getTime(),
statistics: commit.shortStat ?? { files: 0, insertions: 0, deletions: 0 },
labels: labels.length !== 0 ? labels : undefined
};
}));
return historyItems;
}
async provideHistoryItemSummary(historyItemId: string, historyItemParentId: string | undefined): Promise<SourceControlHistoryItem> {
if (!historyItemParentId) {
const commit = await this.repository.getCommit(historyItemId);
@ -161,7 +221,7 @@ export class GitHistoryProvider implements SourceControlHistoryProvider, FileDec
async resolveHistoryItemGroupCommonAncestor(historyItemId1: string, historyItemId2: string | undefined): Promise<{ id: string; ahead: number; behind: number } | undefined> {
if (!historyItemId2) {
const upstreamRef = await this.resolveHistoryItemGroupBase(historyItemId1);
const upstreamRef = await this.resolveHistoryItemGroupMergeBase(historyItemId1);
if (!upstreamRef) {
this.logger.info(`GitHistoryProvider:resolveHistoryItemGroupCommonAncestor - Failed to resolve history item group base for '${historyItemId1}'`);
return undefined;
@ -191,7 +251,38 @@ export class GitHistoryProvider implements SourceControlHistoryProvider, FileDec
return this.historyItemDecorations.get(uri.toString());
}
private async resolveHistoryItemGroupBase(historyItemId: string): Promise<UpstreamRef | undefined> {
private async resolveHistoryItemGroupsMergeBase(refNames: string[]): Promise<string | undefined> {
if (refNames.length < 2) {
return undefined;
}
const refsMergeBase = await this.repository.getMergeBase(refNames[0], refNames[1], ...refNames.slice(2));
return refsMergeBase;
}
private resolveHistoryItemLabels(commit: Commit, refNames: string[]): SourceControlHistoryItemLabel[] {
const labels: SourceControlHistoryItemLabel[] = [];
for (const label of commit.refNames) {
if (!label.startsWith('HEAD -> ') && !refNames.includes(label)) {
continue;
}
for (const [key, value] of this.historyItemLabels) {
if (label.startsWith(key)) {
labels.push({
title: label.substring(key.length),
icon: new ThemeIcon(value)
});
break;
}
}
}
return labels;
}
private async resolveHistoryItemGroupMergeBase(historyItemId: string): Promise<UpstreamRef | undefined> {
try {
// Upstream
const branch = await this.repository.getBranch(historyItemId);
@ -202,7 +293,7 @@ export class GitHistoryProvider implements SourceControlHistoryProvider, FileDec
// Base (config -> reflog -> default)
const remoteBranch = await this.repository.getBranchBase(historyItemId);
if (!remoteBranch?.remote || !remoteBranch?.name || !remoteBranch?.commit || remoteBranch?.type !== RefType.RemoteHead) {
this.logger.info(`GitHistoryProvider:resolveHistoryItemGroupBase - Failed to resolve history item group base for '${historyItemId}'`);
this.logger.info(`GitHistoryProvider:resolveHistoryItemGroupUpstreamOrBase - Failed to resolve history item group base for '${historyItemId}'`);
return undefined;
}
@ -213,12 +304,21 @@ export class GitHistoryProvider implements SourceControlHistoryProvider, FileDec
};
}
catch (err) {
this.logger.error(`GitHistoryProvider:resolveHistoryItemGroupBase - Failed to get branch base for '${historyItemId}': ${err.message}`);
this.logger.error(`GitHistoryProvider:resolveHistoryItemGroupUpstreamOrBase - Failed to get branch base for '${historyItemId}': ${err.message}`);
}
return undefined;
}
private async resolveHEADMergeBase(): Promise<Branch | undefined> {
if (this.repository.HEAD?.type !== RefType.Head || !this.repository.HEAD?.name) {
return undefined;
}
const mergeBase = await this.repository.getBranchBase(this.repository.HEAD.name);
return mergeBase;
}
dispose(): void {
dispose(this.disposables);
}

View File

@ -1112,8 +1112,8 @@ export class Repository implements Disposable {
return this.run(Operation.Diff, () => this.repository.diffBetweenShortStat(ref1, ref2));
}
getMergeBase(ref1: string, ref2: string): Promise<string | undefined> {
return this.run(Operation.MergeBase, () => this.repository.getMergeBase(ref1, ref2));
getMergeBase(ref1: string, ref2: string, ...refs: string[]): Promise<string | undefined> {
return this.run(Operation.MergeBase, () => this.repository.getMergeBase(ref1, ref2, ...refs));
}
async hashObject(data: string): Promise<string> {

View File

@ -8,13 +8,6 @@ import { LanguageClientOptions } from 'vscode-languageclient';
import { startClient, LanguageClientConstructor, AsyncDisposable } from '../htmlClient';
import { LanguageClient } from 'vscode-languageclient/browser';
declare const Worker: {
new(stringUrl: string): any;
};
declare const TextDecoder: {
new(encoding?: string): { decode(buffer: ArrayBuffer): string };
};
let client: AsyncDisposable | undefined;
// this method is called when vs code is activated
@ -25,7 +18,7 @@ export async function activate(context: ExtensionContext) {
worker.postMessage({ i10lLocation: l10n.uri?.toString(false) ?? '' });
const newLanguageClient: LanguageClientConstructor = (id: string, name: string, clientOptions: LanguageClientOptions) => {
return new LanguageClient(id, name, clientOptions, worker);
return new LanguageClient(id, name, worker, clientOptions);
};
const timer = {

View File

@ -1,7 +1,10 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out"
"outDir": "./out",
"lib": [
"webworker"
]
},
"include": [
"src/**/*",

View File

@ -259,7 +259,7 @@
},
"dependencies": {
"@vscode/extension-telemetry": "^0.9.0",
"vscode-languageclient": "^10.0.0-next.3",
"vscode-languageclient": "^10.0.0-next.8",
"vscode-uri": "^3.0.8"
},
"devDependencies": {

View File

@ -10,9 +10,9 @@
"main": "./out/node/htmlServerMain",
"dependencies": {
"@vscode/l10n": "^0.0.18",
"vscode-css-languageservice": "^6.2.13",
"vscode-html-languageservice": "^5.2.0",
"vscode-languageserver": "^10.0.0-next.2",
"vscode-css-languageservice": "^6.3.0",
"vscode-html-languageservice": "^5.3.0",
"vscode-languageserver": "^10.0.0-next.6",
"vscode-languageserver-textdocument": "^1.0.11",
"vscode-uri": "^3.0.8"
},

View File

@ -24,38 +24,38 @@ undici-types@~5.26.4:
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
vscode-css-languageservice@^6.2.13:
version "6.2.13"
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-6.2.13.tgz#c7c2dc7a081a203048d60157c65536767d6d96f8"
integrity sha512-2rKWXfH++Kxd9Z4QuEgd1IF7WmblWWU7DScuyf1YumoGLkY9DW6wF/OTlhOyO2rN63sWHX2dehIpKBbho4ZwvA==
vscode-css-languageservice@^6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/vscode-css-languageservice/-/vscode-css-languageservice-6.3.0.tgz#51724d193d19b1a9075b1cef5cfeea6a555d2aa4"
integrity sha512-nU92imtkgzpCL0xikrIb8WvedV553F2BENzgz23wFuok/HLN5BeQmroMy26pUwFxV2eV8oNRmYCUv8iO7kSMhw==
dependencies:
"@vscode/l10n" "^0.0.18"
vscode-languageserver-textdocument "^1.0.11"
vscode-languageserver-types "3.17.5"
vscode-uri "^3.0.8"
vscode-html-languageservice@^5.2.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-5.2.0.tgz#5b36f9131acc073cebaa2074dc8ff53e84c80f31"
integrity sha512-cdNMhyw57/SQzgUUGSIMQ66jikqEN6nBNyhx5YuOyj9310+eY9zw8Q0cXpiKzDX8aHYFewQEXRnigl06j/TVwQ==
vscode-html-languageservice@^5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/vscode-html-languageservice/-/vscode-html-languageservice-5.3.0.tgz#298ae5600c6749cbb95838975d07f449c44cb478"
integrity sha512-C4Z3KsP5Ih+fjHpiBc5jxmvCl+4iEwvXegIrzu2F5pktbWvQaBT3YkVPk8N+QlSSMk8oCG6PKtZ/Sq2YHb5e8g==
dependencies:
"@vscode/l10n" "^0.0.18"
vscode-languageserver-textdocument "^1.0.11"
vscode-languageserver-types "^3.17.5"
vscode-uri "^3.0.8"
vscode-jsonrpc@9.0.0-next.2:
version "9.0.0-next.2"
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.2.tgz#29e9741c742c80329bba1c60ce38fd014651ba80"
integrity sha512-meIaXAgChCHzWy45QGU8YpCNyqnZQ/sYeCj32OLDDbUYsCF7AvgpdXx3nnZn9yzr8ed0Od9bW+NGphEmXsqvIQ==
vscode-jsonrpc@9.0.0-next.4:
version "9.0.0-next.4"
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.4.tgz#ba403ddb3b82ca578179963dbe08e120a935f50d"
integrity sha512-zSVIr58lJSMYKIsZ5P7GtBbv1eEx25eNyOf0NmEzxmn1GhUNJAVAb5hkA1poKUwj1FRMwN6CeyWxZypmr8SsQQ==
vscode-languageserver-protocol@3.17.6-next.3:
version "3.17.6-next.3"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.3.tgz#09d3e28e9ad12270233d07fa0b69cf1d51d7dfe4"
integrity sha512-H8ATH5SAvc3JzttS+AL6g681PiBOZM/l34WP2JZk4akY3y7NqTP+f9cJ+MhrVBbD3aDS8bdAKewZgbFLW6M8Pg==
vscode-languageserver-protocol@3.17.6-next.6:
version "3.17.6-next.6"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.6.tgz#8863a4dc8b395a8c31106ffdc945a00f9163b68b"
integrity sha512-naxM9kc/phpl0kAFNVPejMUWUtzFXdPYY/BtQTYtfbBbHf8sceHOrKkmf6yynZRu1A4oFtRZNqV3wyFRTWqUHw==
dependencies:
vscode-jsonrpc "9.0.0-next.2"
vscode-languageserver-types "3.17.6-next.3"
vscode-jsonrpc "9.0.0-next.4"
vscode-languageserver-types "3.17.6-next.4"
vscode-languageserver-textdocument@^1.0.11:
version "1.0.11"
@ -67,17 +67,17 @@ vscode-languageserver-types@3.17.5, vscode-languageserver-types@^3.17.5:
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz#3273676f0cf2eab40b3f44d085acbb7f08a39d8a"
integrity sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==
vscode-languageserver-types@3.17.6-next.3:
version "3.17.6-next.3"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.3.tgz#f71d6c57f18d921346cfe0c227aabd72eb8cd2f0"
integrity sha512-l5kNFXFRQGuzriXpuBqFpRmkf6f6A4VoU3h95OsVkqIOoi1k7KbwSo600cIdsKSJWrPg/+vX+QMPcMw1oI7ItA==
vscode-languageserver-types@3.17.6-next.4:
version "3.17.6-next.4"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.4.tgz#6670939eb98f00aa7b05021dc3dd7fe9aa4453ea"
integrity sha512-SeJTpH/S14EbxOAVaOUoGVqPToqpRTld5QO5Ghig3AlbFJTFF9Wu7srHMfa85L0SX1RYAuuCSFKJVVCxDIk1/Q==
vscode-languageserver@^10.0.0-next.2:
version "10.0.0-next.2"
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-10.0.0-next.2.tgz#9a8ac58f72979961497c4fd7f6097561d4134d5f"
integrity sha512-WZdK/XO6EkNU6foYck49NpS35sahWhYFs4hwCGalH/6lhPmdUKABTnWioK/RLZKWqH8E5HdlAHQMfSBIxKBV9Q==
vscode-languageserver@^10.0.0-next.6:
version "10.0.0-next.6"
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-10.0.0-next.6.tgz#0db118a93fe010c6b40cd04e91a15d09e7b60b60"
integrity sha512-0Lh1nhQfSxo5Ob+ayYO1QTIsDix2/Lc72Urm1KZrCFxK5zIFYaEh3QFeM9oZih4Rzs0ZkQPXXnoHtpvs5GT+Zw==
dependencies:
vscode-languageserver-protocol "3.17.6-next.3"
vscode-languageserver-protocol "3.17.6-next.6"
vscode-uri@^3.0.8:
version "3.0.8"

View File

@ -149,32 +149,32 @@ undici-types@~5.26.4:
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
vscode-jsonrpc@9.0.0-next.2:
version "9.0.0-next.2"
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.2.tgz#29e9741c742c80329bba1c60ce38fd014651ba80"
integrity sha512-meIaXAgChCHzWy45QGU8YpCNyqnZQ/sYeCj32OLDDbUYsCF7AvgpdXx3nnZn9yzr8ed0Od9bW+NGphEmXsqvIQ==
vscode-jsonrpc@9.0.0-next.4:
version "9.0.0-next.4"
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.4.tgz#ba403ddb3b82ca578179963dbe08e120a935f50d"
integrity sha512-zSVIr58lJSMYKIsZ5P7GtBbv1eEx25eNyOf0NmEzxmn1GhUNJAVAb5hkA1poKUwj1FRMwN6CeyWxZypmr8SsQQ==
vscode-languageclient@^10.0.0-next.3:
version "10.0.0-next.3"
resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-10.0.0-next.3.tgz#d7336bafafb37569ac1d8e931d20ba2a6385cc64"
integrity sha512-jJhPdZaiELpPRnCUt8kQcF2HJuvzLgeW4HOGc6dp8Je+p08ndueVT4fpSsbly6KiEHr/Ri73tNz0CSfsOye6MA==
vscode-languageclient@^10.0.0-next.8:
version "10.0.0-next.8"
resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-10.0.0-next.8.tgz#5afa0ced3b2ac68d31cc1c48edc4f289744542a0"
integrity sha512-D9inIHgqKayO9Tv0MeLb3XIL76yTuWmKdHqcGZKzjtQrMGJgASJDYWTapu+yAjEpDp0gmVOaCYyIlLB86ncDoQ==
dependencies:
minimatch "^9.0.3"
semver "^7.6.0"
vscode-languageserver-protocol "3.17.6-next.4"
vscode-languageserver-protocol "3.17.6-next.6"
vscode-languageserver-protocol@3.17.6-next.4:
version "3.17.6-next.4"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.4.tgz#3c56f6eb588bb42fccc0ac54a0d5daf2d02f0a1b"
integrity sha512-/2bleKBxZLyRObS4mkpaWlVI9xGiUqMVmh/ztZ2vL4uP2XyIpraT45JBpn9AtXr0alqKJPKLuKr+/qcYULvm/w==
vscode-languageserver-protocol@3.17.6-next.6:
version "3.17.6-next.6"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.6.tgz#8863a4dc8b395a8c31106ffdc945a00f9163b68b"
integrity sha512-naxM9kc/phpl0kAFNVPejMUWUtzFXdPYY/BtQTYtfbBbHf8sceHOrKkmf6yynZRu1A4oFtRZNqV3wyFRTWqUHw==
dependencies:
vscode-jsonrpc "9.0.0-next.2"
vscode-languageserver-types "3.17.6-next.3"
vscode-jsonrpc "9.0.0-next.4"
vscode-languageserver-types "3.17.6-next.4"
vscode-languageserver-types@3.17.6-next.3:
version "3.17.6-next.3"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.3.tgz#f71d6c57f18d921346cfe0c227aabd72eb8cd2f0"
integrity sha512-l5kNFXFRQGuzriXpuBqFpRmkf6f6A4VoU3h95OsVkqIOoi1k7KbwSo600cIdsKSJWrPg/+vX+QMPcMw1oI7ItA==
vscode-languageserver-types@3.17.6-next.4:
version "3.17.6-next.4"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.4.tgz#6670939eb98f00aa7b05021dc3dd7fe9aa4453ea"
integrity sha512-SeJTpH/S14EbxOAVaOUoGVqPToqpRTld5QO5Ghig3AlbFJTFF9Wu7srHMfa85L0SX1RYAuuCSFKJVVCxDIk1/Q==
vscode-uri@^3.0.8:
version "3.0.8"

View File

@ -62,6 +62,11 @@
"command": "notebook.cellOutput.copy",
"title": "%copyCellOutput.title%",
"category": "Notebook"
},
{
"command": "notebook.cellOutput.openInTextEditor",
"title": "%openCellOutput.title%",
"category": "Notebook"
}
],
"notebooks": [
@ -108,12 +113,24 @@
{
"command": "notebook.cellOutput.copy",
"when": "notebookCellHasOutputs"
},
{
"command": "notebook.cellOutput.openInTextEditor",
"when": "false"
}
],
"webview/context": [
{
"command": "notebook.cellOutput.copy",
"when": "webviewId == 'notebook.output' && webviewSection == 'image'"
},
{
"command": "notebook.cellOutput.copy",
"when": "webviewId == 'notebook.output' && webviewSection == 'text'"
},
{
"command": "notebook.cellOutput.openInTextEditor",
"when": "webviewId == 'notebook.output' && webviewSection == 'text'"
}
]
}

View File

@ -7,6 +7,7 @@
"openIpynbInNotebookEditor.title": "Open IPYNB File In Notebook Editor",
"cleanInvalidImageAttachment.title": "Clean Invalid Image Attachment Reference",
"copyCellOutput.title": "Copy Cell Output",
"openCellOutput.title": "Open Cell Output in Text Editor",
"markdownAttachmentRenderer.displayName": {
"message": "Markdown-It ipynb Cell Attachment renderer",
"comment": [

View File

@ -8,12 +8,6 @@ import { LanguageClientOptions } from 'vscode-languageclient';
import { startClient, LanguageClientConstructor, SchemaRequestService, AsyncDisposable, languageServerDescription } from '../jsonClient';
import { LanguageClient } from 'vscode-languageclient/browser';
declare const Worker: {
new(stringUrl: string): any;
};
declare function fetch(uri: string, options: any): any;
let client: AsyncDisposable | undefined;
// this method is called when vs code is activated
@ -24,7 +18,7 @@ export async function activate(context: ExtensionContext) {
worker.postMessage({ i10lLocation: l10n.uri?.toString(false) ?? '' });
const newLanguageClient: LanguageClientConstructor = (id: string, name: string, clientOptions: LanguageClientOptions) => {
return new LanguageClient(id, name, clientOptions, worker);
return new LanguageClient(id, name, worker, clientOptions);
};
const schemaRequests: SchemaRequestService = {

View File

@ -1,7 +1,10 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "./out"
"outDir": "./out",
"lib": [
"webworker"
]
},
"include": [
"src/**/*",

View File

@ -163,7 +163,7 @@
"dependencies": {
"@vscode/extension-telemetry": "^0.9.0",
"request-light": "^0.7.0",
"vscode-languageclient": "^10.0.0-next.5"
"vscode-languageclient": "^10.0.0-next.8"
},
"devDependencies": {
"@types/node": "20.x"

View File

@ -15,8 +15,8 @@
"@vscode/l10n": "^0.0.18",
"jsonc-parser": "^3.2.1",
"request-light": "^0.7.0",
"vscode-json-languageservice": "^5.3.11",
"vscode-languageserver": "^10.0.0-next.3",
"vscode-json-languageservice": "^5.4.0",
"vscode-languageserver": "^10.0.0-next.6",
"vscode-uri": "^3.0.8"
},
"devDependencies": {

View File

@ -24,6 +24,11 @@ jsonc-parser@^3.2.1:
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a"
integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==
jsonc-parser@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.3.0.tgz#030d182672c8ffc2805db95467c83ffc0b033d9d"
integrity sha512-RK1Xb5alM78sdXpB2hqqK7jxAE5jTRH05GvUiLWqh7Vbp6OPHuJYlsAMRUDYNYJTAQgkmhHgkdwOEknxwP4ojQ==
request-light@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/request-light/-/request-light-0.7.0.tgz#885628bb2f8040c26401ebf258ec51c4ae98ac2a"
@ -34,51 +39,51 @@ undici-types@~5.26.4:
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
vscode-json-languageservice@^5.3.11:
version "5.3.11"
resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-5.3.11.tgz#71dbc56e9b1d07a57aa6a3d5569c8b7f2c05ca05"
integrity sha512-WYS72Ymria3dn8ZbjtBbt5K71m05wY1Q6hpXV5JxUT0q75Ts0ljLmnZJAVpx8DjPgYbFD+Z8KHpWh2laKLUCtQ==
vscode-json-languageservice@^5.4.0:
version "5.4.0"
resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-5.4.0.tgz#caf1aabc81b1df9faf6a97e4c34e13a2d10a8cdf"
integrity sha512-NCkkCr63OHVkE4lcb0xlUAaix6vE5gHQW4NrswbLEh3ArXj81lrGuFTsGEYEUXlNHdnc53vWPcjeSy/nMTrfXg==
dependencies:
"@vscode/l10n" "^0.0.18"
jsonc-parser "^3.2.1"
jsonc-parser "^3.3.0"
vscode-languageserver-textdocument "^1.0.11"
vscode-languageserver-types "^3.17.5"
vscode-uri "^3.0.8"
vscode-jsonrpc@9.0.0-next.2:
version "9.0.0-next.2"
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.2.tgz#29e9741c742c80329bba1c60ce38fd014651ba80"
integrity sha512-meIaXAgChCHzWy45QGU8YpCNyqnZQ/sYeCj32OLDDbUYsCF7AvgpdXx3nnZn9yzr8ed0Od9bW+NGphEmXsqvIQ==
vscode-jsonrpc@9.0.0-next.4:
version "9.0.0-next.4"
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.4.tgz#ba403ddb3b82ca578179963dbe08e120a935f50d"
integrity sha512-zSVIr58lJSMYKIsZ5P7GtBbv1eEx25eNyOf0NmEzxmn1GhUNJAVAb5hkA1poKUwj1FRMwN6CeyWxZypmr8SsQQ==
vscode-languageserver-protocol@3.17.6-next.4:
version "3.17.6-next.4"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.4.tgz#3c56f6eb588bb42fccc0ac54a0d5daf2d02f0a1b"
integrity sha512-/2bleKBxZLyRObS4mkpaWlVI9xGiUqMVmh/ztZ2vL4uP2XyIpraT45JBpn9AtXr0alqKJPKLuKr+/qcYULvm/w==
vscode-languageserver-protocol@3.17.6-next.6:
version "3.17.6-next.6"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.6.tgz#8863a4dc8b395a8c31106ffdc945a00f9163b68b"
integrity sha512-naxM9kc/phpl0kAFNVPejMUWUtzFXdPYY/BtQTYtfbBbHf8sceHOrKkmf6yynZRu1A4oFtRZNqV3wyFRTWqUHw==
dependencies:
vscode-jsonrpc "9.0.0-next.2"
vscode-languageserver-types "3.17.6-next.3"
vscode-jsonrpc "9.0.0-next.4"
vscode-languageserver-types "3.17.6-next.4"
vscode-languageserver-textdocument@^1.0.11:
version "1.0.11"
resolved "https://registry.yarnpkg.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz#0822a000e7d4dc083312580d7575fe9e3ba2e2bf"
integrity sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==
vscode-languageserver-types@3.17.6-next.3:
version "3.17.6-next.3"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.3.tgz#f71d6c57f18d921346cfe0c227aabd72eb8cd2f0"
integrity sha512-l5kNFXFRQGuzriXpuBqFpRmkf6f6A4VoU3h95OsVkqIOoi1k7KbwSo600cIdsKSJWrPg/+vX+QMPcMw1oI7ItA==
vscode-languageserver-types@3.17.6-next.4:
version "3.17.6-next.4"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.4.tgz#6670939eb98f00aa7b05021dc3dd7fe9aa4453ea"
integrity sha512-SeJTpH/S14EbxOAVaOUoGVqPToqpRTld5QO5Ghig3AlbFJTFF9Wu7srHMfa85L0SX1RYAuuCSFKJVVCxDIk1/Q==
vscode-languageserver-types@^3.17.5:
version "3.17.5"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz#3273676f0cf2eab40b3f44d085acbb7f08a39d8a"
integrity sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==
vscode-languageserver@^10.0.0-next.3:
version "10.0.0-next.3"
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-10.0.0-next.3.tgz#a63c5ea9fab1be93d7732ab0fdc18c9b37956e07"
integrity sha512-4x1qHImf6ePji4+8PX43lnBCBfBNdi2jneGX2k5FswJhx/cxaYYmusShmmtO/clyL1iurxJacrQoXfw9+ikhvg==
vscode-languageserver@^10.0.0-next.6:
version "10.0.0-next.6"
resolved "https://registry.yarnpkg.com/vscode-languageserver/-/vscode-languageserver-10.0.0-next.6.tgz#0db118a93fe010c6b40cd04e91a15d09e7b60b60"
integrity sha512-0Lh1nhQfSxo5Ob+ayYO1QTIsDix2/Lc72Urm1KZrCFxK5zIFYaEh3QFeM9oZih4Rzs0ZkQPXXnoHtpvs5GT+Zw==
dependencies:
vscode-languageserver-protocol "3.17.6-next.4"
vscode-languageserver-protocol "3.17.6-next.6"
vscode-uri@^3.0.8:
version "3.0.8"

View File

@ -154,32 +154,32 @@ undici-types@~5.26.4:
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
vscode-jsonrpc@9.0.0-next.2:
version "9.0.0-next.2"
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.2.tgz#29e9741c742c80329bba1c60ce38fd014651ba80"
integrity sha512-meIaXAgChCHzWy45QGU8YpCNyqnZQ/sYeCj32OLDDbUYsCF7AvgpdXx3nnZn9yzr8ed0Od9bW+NGphEmXsqvIQ==
vscode-jsonrpc@9.0.0-next.4:
version "9.0.0-next.4"
resolved "https://registry.yarnpkg.com/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.4.tgz#ba403ddb3b82ca578179963dbe08e120a935f50d"
integrity sha512-zSVIr58lJSMYKIsZ5P7GtBbv1eEx25eNyOf0NmEzxmn1GhUNJAVAb5hkA1poKUwj1FRMwN6CeyWxZypmr8SsQQ==
vscode-languageclient@^10.0.0-next.5:
version "10.0.0-next.5"
resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-10.0.0-next.5.tgz#7431d88255a5fd99e9423659ac484b1f968200f3"
integrity sha512-JIf1WE7fvV0RElFM062bAummI433vcxuFwqoYAp+1zTVhta/jznxkTz1zs3Hbj2tiDfclf0TZ0qCxflAP1mY2Q==
vscode-languageclient@^10.0.0-next.8:
version "10.0.0-next.8"
resolved "https://registry.yarnpkg.com/vscode-languageclient/-/vscode-languageclient-10.0.0-next.8.tgz#5afa0ced3b2ac68d31cc1c48edc4f289744542a0"
integrity sha512-D9inIHgqKayO9Tv0MeLb3XIL76yTuWmKdHqcGZKzjtQrMGJgASJDYWTapu+yAjEpDp0gmVOaCYyIlLB86ncDoQ==
dependencies:
minimatch "^9.0.3"
semver "^7.6.0"
vscode-languageserver-protocol "3.17.6-next.4"
vscode-languageserver-protocol "3.17.6-next.6"
vscode-languageserver-protocol@3.17.6-next.4:
version "3.17.6-next.4"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.4.tgz#3c56f6eb588bb42fccc0ac54a0d5daf2d02f0a1b"
integrity sha512-/2bleKBxZLyRObS4mkpaWlVI9xGiUqMVmh/ztZ2vL4uP2XyIpraT45JBpn9AtXr0alqKJPKLuKr+/qcYULvm/w==
vscode-languageserver-protocol@3.17.6-next.6:
version "3.17.6-next.6"
resolved "https://registry.yarnpkg.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.6.tgz#8863a4dc8b395a8c31106ffdc945a00f9163b68b"
integrity sha512-naxM9kc/phpl0kAFNVPejMUWUtzFXdPYY/BtQTYtfbBbHf8sceHOrKkmf6yynZRu1A4oFtRZNqV3wyFRTWqUHw==
dependencies:
vscode-jsonrpc "9.0.0-next.2"
vscode-languageserver-types "3.17.6-next.3"
vscode-jsonrpc "9.0.0-next.4"
vscode-languageserver-types "3.17.6-next.4"
vscode-languageserver-types@3.17.6-next.3:
version "3.17.6-next.3"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.3.tgz#f71d6c57f18d921346cfe0c227aabd72eb8cd2f0"
integrity sha512-l5kNFXFRQGuzriXpuBqFpRmkf6f6A4VoU3h95OsVkqIOoi1k7KbwSo600cIdsKSJWrPg/+vX+QMPcMw1oI7ItA==
vscode-languageserver-types@3.17.6-next.4:
version "3.17.6-next.4"
resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.4.tgz#6670939eb98f00aa7b05021dc3dd7fe9aa4453ea"
integrity sha512-SeJTpH/S14EbxOAVaOUoGVqPToqpRTld5QO5Ghig3AlbFJTFF9Wu7srHMfa85L0SX1RYAuuCSFKJVVCxDIk1/Q==
yallist@^4.0.0:
version "4.0.0"

View File

@ -79,6 +79,10 @@
[
"<",
">"
],
[
"~",
"~"
]
],
"folding": {

View File

@ -205,7 +205,7 @@ table > tbody > tr + tr > td {
blockquote {
margin: 0;
padding: 2px 16px 0 10px;
padding: 0px 16px 0 10px;
border-left-width: 5px;
border-left-style: solid;
border-radius: 2px;

View File

@ -71,6 +71,11 @@ function generateNestedViewAllElement(outputId: string) {
function truncatedArrayOfString(id: string, buffer: string[], linesLimit: number, linkOptions: LinkOptions) {
const container = document.createElement('div');
container.setAttribute('data-vscode-context', JSON.stringify({
webviewSection: 'text',
outputId: id,
'preventDefaultContextMenuItems': true
}));
const lineCount = buffer.length;
if (lineCount <= linesLimit) {
@ -95,6 +100,11 @@ function truncatedArrayOfString(id: string, buffer: string[], linesLimit: number
function scrollableArrayOfString(id: string, buffer: string[], linkOptions: LinkOptions) {
const element = document.createElement('div');
element.setAttribute('data-vscode-context', JSON.stringify({
webviewSection: 'text',
outputId: id,
'preventDefaultContextMenuItems': true
}));
if (buffer.length > softScrollableLineLimit) {
element.appendChild(generateNestedViewAllElement(id));
}

View File

@ -408,9 +408,9 @@ word-wrap@~1.2.3:
integrity sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==
ws@^8.13.0:
version "8.13.0"
resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0"
integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==
version "8.17.1"
resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b"
integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==
xml-name-validator@^4.0.0:
version "4.0.0"

View File

@ -4,7 +4,7 @@
"license": "MIT",
"description": "Dependencies shared by all extensions",
"dependencies": {
"typescript": "^5.5.0-dev.20240603"
"typescript": "^5.5.2"
},
"scripts": {
"postinstall": "node ./postinstall.mjs"

View File

@ -1315,6 +1315,12 @@
"markdownDescription": "%typescript.workspaceSymbols.excludeLibrarySymbols%",
"scope": "window"
},
"typescript.tsserver.enableRegionDiagnostics": {
"type": "boolean",
"default": true,
"description": "%typescript.tsserver.enableRegionDiagnostics%",
"scope": "window"
},
"javascript.experimental.updateImportsOnPaste": {
"scope": "window",
"type": "boolean",

View File

@ -16,6 +16,7 @@
"typescript.tsserver.pluginPaths": "Additional paths to discover TypeScript Language Service plugins.",
"typescript.tsserver.pluginPaths.item": "Either an absolute or relative path. Relative path will be resolved against workspace folder(s).",
"typescript.tsserver.trace": "Enables tracing of messages sent to the TS server. This trace can be used to diagnose TS Server issues. The trace may contain file paths, source code, and other potentially sensitive information from your project.",
"typescript.tsserver.enableRegionDiagnostics": "Enables region-based diagnostics in TypeScript. Requires using TypeScript 5.6+ in the workspace.",
"typescript.validate.enable": "Enable/disable TypeScript validation.",
"typescript.format.enable": "Enable/disable default TypeScript formatter.",
"javascript.format.enable": "Enable/disable default JavaScript formatter.",

View File

@ -124,6 +124,7 @@ export interface TypeScriptServiceConfiguration {
readonly localNodePath: string | null;
readonly globalNodePath: string | null;
readonly workspaceSymbolsExcludeLibrarySymbols: boolean;
readonly enableRegionDiagnostics: boolean;
}
export function areServiceConfigurationsEqual(a: TypeScriptServiceConfiguration, b: TypeScriptServiceConfiguration): boolean {
@ -162,6 +163,7 @@ export abstract class BaseServiceConfigurationProvider implements ServiceConfigu
localNodePath: this.readLocalNodePath(configuration),
globalNodePath: this.readGlobalNodePath(configuration),
workspaceSymbolsExcludeLibrarySymbols: this.readWorkspaceSymbolsExcludeLibrarySymbols(configuration),
enableRegionDiagnostics: this.readEnableRegionDiagnostics(configuration),
};
}
@ -267,4 +269,8 @@ export abstract class BaseServiceConfigurationProvider implements ServiceConfigu
private readWebTypeAcquisition(configuration: vscode.WorkspaceConfiguration): boolean {
return configuration.get<boolean>('typescript.tsserver.web.typeAcquisition.enabled', false);
}
private readEnableRegionDiagnostics(configuration: vscode.WorkspaceConfiguration): boolean {
return configuration.get<boolean>('typescript.tsserver.enableRegionDiagnostics', true);
}
}

View File

@ -99,13 +99,13 @@ class DocumentPasteProvider implements vscode.DocumentPasteEditProvider {
return;
}
const response = await this._client.execute('getPasteEdits', {
const response = await this._client.interruptGetErr(() => this._client.execute('getPasteEdits', {
file,
// TODO: only supports a single paste for now
pastedText: [text],
pasteLocations: ranges.map(typeConverters.Range.toTextSpan),
copiedFrom
}, token);
}, token));
if (response.type !== 'response' || !response.body || token.isCancellationRequested) {
return;
}

View File

@ -34,6 +34,7 @@ export const enum DiagnosticKind {
Syntax,
Semantic,
Suggestion,
RegionSemantic,
}
class FileDiagnostics {
@ -48,7 +49,8 @@ class FileDiagnostics {
public updateDiagnostics(
language: DiagnosticLanguage,
kind: DiagnosticKind,
diagnostics: ReadonlyArray<vscode.Diagnostic>
diagnostics: ReadonlyArray<vscode.Diagnostic>,
ranges: ReadonlyArray<vscode.Range> | undefined
): boolean {
if (language !== this.language) {
this._diagnostics.clear();
@ -61,6 +63,9 @@ class FileDiagnostics {
return false;
}
if (kind === DiagnosticKind.RegionSemantic) {
return this.updateRegionDiagnostics(diagnostics, ranges!);
}
this._diagnostics.set(kind, diagnostics);
return true;
}
@ -83,6 +88,23 @@ class FileDiagnostics {
}
}
/**
* @param ranges The ranges whose diagnostics were updated.
*/
private updateRegionDiagnostics(
diagnostics: ReadonlyArray<vscode.Diagnostic>,
ranges: ReadonlyArray<vscode.Range>): boolean {
if (!this._diagnostics.get(DiagnosticKind.Semantic)) {
this._diagnostics.set(DiagnosticKind.Semantic, diagnostics);
return true;
}
const oldDiagnostics = this._diagnostics.get(DiagnosticKind.Semantic)!;
const newDiagnostics = oldDiagnostics.filter(diag => !ranges.some(range => diag.range.intersection(range)));
newDiagnostics.push(...diagnostics);
this._diagnostics.set(DiagnosticKind.Semantic, newDiagnostics);
return true;
}
private getSuggestionDiagnostics(settings: DiagnosticSettings) {
const enableSuggestions = settings.getEnableSuggestions(this.language);
return this.get(DiagnosticKind.Suggestion).filter(x => {
@ -284,15 +306,16 @@ export class DiagnosticsManager extends Disposable {
file: vscode.Uri,
language: DiagnosticLanguage,
kind: DiagnosticKind,
diagnostics: ReadonlyArray<vscode.Diagnostic>
diagnostics: ReadonlyArray<vscode.Diagnostic>,
ranges: ReadonlyArray<vscode.Range> | undefined,
): void {
let didUpdate = false;
const entry = this._diagnostics.get(file);
if (entry) {
didUpdate = entry.updateDiagnostics(language, kind, diagnostics);
didUpdate = entry.updateDiagnostics(language, kind, diagnostics, ranges);
} else if (diagnostics.length) {
const fileDiagnostics = new FileDiagnostics(file, language);
fileDiagnostics.updateDiagnostics(language, kind, diagnostics);
fileDiagnostics.updateDiagnostics(language, kind, diagnostics, ranges);
this._diagnostics.set(file, fileDiagnostics);
didUpdate = true;
}

View File

@ -138,7 +138,11 @@ export default class LanguageProvider extends Disposable {
this.client.bufferSyncSupport.requestAllDiagnostics();
}
public diagnosticsReceived(diagnosticsKind: DiagnosticKind, file: vscode.Uri, diagnostics: (vscode.Diagnostic & { reportUnnecessary: any; reportDeprecated: any })[]): void {
public diagnosticsReceived(
diagnosticsKind: DiagnosticKind,
file: vscode.Uri,
diagnostics: (vscode.Diagnostic & { reportUnnecessary: any; reportDeprecated: any })[],
ranges: vscode.Range[] | undefined): void {
if (diagnosticsKind !== DiagnosticKind.Syntax && !this.client.hasCapabilityForResource(file, ClientCapability.Semantic)) {
return;
}
@ -175,7 +179,7 @@ export default class LanguageProvider extends Disposable {
}
}
return true;
}));
}), ranges);
}
public configFileDiagnosticsReceived(file: vscode.Uri, diagnostics: vscode.Diagnostic[]): void {

View File

@ -275,12 +275,12 @@ class SyncedBufferMap extends ResourceMap<SyncedBuffer> {
}
class PendingDiagnostics extends ResourceMap<number> {
public getOrderedFileSet(): ResourceMap<void> {
public getOrderedFileSet(): ResourceMap<void | vscode.Range[]> {
const orderedResources = Array.from(this.entries())
.sort((a, b) => a.value - b.value)
.map(entry => entry.resource);
const map = new ResourceMap<void>(this._normalizePath, this.config);
const map = new ResourceMap<void | vscode.Range[]>(this._normalizePath, this.config);
for (const resource of orderedResources) {
map.set(resource, undefined);
}
@ -292,7 +292,7 @@ class GetErrRequest {
public static executeGetErrRequest(
client: ITypeScriptServiceClient,
files: ResourceMap<void>,
files: ResourceMap<void | vscode.Range[]>,
onDone: () => void
) {
return new GetErrRequest(client, files, onDone);
@ -303,7 +303,7 @@ class GetErrRequest {
private constructor(
private readonly client: ITypeScriptServiceClient,
public readonly files: ResourceMap<void>,
public readonly files: ResourceMap<void | vscode.Range[]>,
onDone: () => void
) {
if (!this.isErrorReportingEnabled()) {
@ -313,19 +313,39 @@ class GetErrRequest {
}
const supportsSyntaxGetErr = this.client.apiVersion.gte(API.v440);
const allFiles = coalesce(Array.from(files.entries())
.filter(entry => supportsSyntaxGetErr || client.hasCapabilityForResource(entry.resource, ClientCapability.Semantic))
const fileEntries = Array.from(files.entries()).filter(entry => supportsSyntaxGetErr || client.hasCapabilityForResource(entry.resource, ClientCapability.Semantic));
const allFiles = coalesce(fileEntries
.map(entry => client.toTsFilePath(entry.resource)));
if (!allFiles.length) {
this._done = true;
setImmediate(onDone);
} else {
const request = this.areProjectDiagnosticsEnabled()
let request;
if (this.areProjectDiagnosticsEnabled()) {
// Note that geterrForProject is almost certainly not the api we want here as it ends up computing far
// too many diagnostics
? client.executeAsync('geterrForProject', { delay: 0, file: allFiles[0] }, this._token.token)
: client.executeAsync('geterr', { delay: 0, files: allFiles }, this._token.token);
request = client.executeAsync('geterrForProject', { delay: 0, file: allFiles[0] }, this._token.token);
}
else {
let requestFiles;
if (this.areRegionDiagnosticsEnabled()) {
requestFiles = coalesce(fileEntries
.map(entry => {
const file = client.toTsFilePath(entry.resource);
const ranges = entry.value;
if (file && ranges) {
return typeConverters.Range.toFileRangesRequestArgs(file, ranges);
}
return file;
}));
}
else {
requestFiles = allFiles;
}
request = client.executeAsync('geterr', { delay: 0, files: requestFiles }, this._token.token);
}
request.finally(() => {
if (this._done) {
@ -350,6 +370,10 @@ class GetErrRequest {
return this.client.configuration.enableProjectDiagnostics && this.client.capabilities.has(ClientCapability.Semantic);
}
private areRegionDiagnosticsEnabled() {
return this.client.configuration.enableRegionDiagnostics && this.client.apiVersion.gte(API.v560);
}
public cancel(): any {
if (!this._done) {
this._token.cancel();
@ -722,7 +746,9 @@ export default class BufferSyncSupport extends Disposable {
// Add all open TS buffers to the geterr request. They might be visible
for (const buffer of this.syncedBuffers.values()) {
orderedFileSet.set(buffer.resource, undefined);
const editors = vscode.window.visibleTextEditors.filter(editor => editor.document.uri.toString() === buffer.resource.toString());
const visibleRanges = editors.flatMap(editor => editor.visibleRanges);
orderedFileSet.set(buffer.resource, visibleRanges.length ? visibleRanges : undefined);
}
for (const { resource } of orderedFileSet.entries()) {

View File

@ -78,6 +78,7 @@ export enum EventName {
syntaxDiag = 'syntaxDiag',
semanticDiag = 'semanticDiag',
suggestionDiag = 'suggestionDiag',
regionSemanticDiag = 'regionSemanticDiag',
configFileDiag = 'configFileDiag',
telemetry = 'telemetry',
projectLanguageServiceState = 'projectLanguageServiceState',

View File

@ -26,14 +26,24 @@ export namespace Range {
Math.max(0, start.line - 1), Math.max(start.offset - 1, 0),
Math.max(0, end.line - 1), Math.max(0, end.offset - 1));
export const toFileRangeRequestArgs = (file: string, range: vscode.Range): Proto.FileRangeRequestArgs => ({
file,
// @ts-expect-error until ts 5.6
export const toFileRange = (range: vscode.Range): Proto.FileRange => ({
startLine: range.start.line + 1,
startOffset: range.start.character + 1,
endLine: range.end.line + 1,
endOffset: range.end.character + 1
});
export const toFileRangeRequestArgs = (file: string, range: vscode.Range): Proto.FileRangeRequestArgs => ({
file,
...toFileRange(range)
});
// @ts-expect-error until ts 5.6
export const toFileRangesRequestArgs = (file: string, ranges: vscode.Range[]): Proto.FileRangesRequestArgs => ({
file,
ranges: ranges.map(toFileRange)
});
export const toFormattingRequestArgs = (file: string, range: vscode.Range): Proto.FormatRequestArgs => ({
file,
line: range.start.line + 1,

View File

@ -90,8 +90,8 @@ export default class TypeScriptServiceClientHost extends Disposable {
services,
allModeIds));
this.client.onDiagnosticsReceived(({ kind, resource, diagnostics }) => {
this.diagnosticsReceived(kind, resource, diagnostics);
this.client.onDiagnosticsReceived(({ kind, resource, diagnostics, spans }) => {
this.diagnosticsReceived(kind, resource, diagnostics, spans);
}, null, this._disposables);
this.client.onConfigDiagnosticsReceived(diag => this.configFileDiagnosticsReceived(diag), null, this._disposables);
@ -236,14 +236,16 @@ export default class TypeScriptServiceClientHost extends Disposable {
private async diagnosticsReceived(
kind: DiagnosticKind,
resource: vscode.Uri,
diagnostics: Proto.Diagnostic[]
diagnostics: Proto.Diagnostic[],
spans: Proto.TextSpan[] | undefined,
): Promise<void> {
const language = await this.findLanguage(resource);
if (language) {
language.diagnosticsReceived(
kind,
resource,
this.createMarkerDatas(diagnostics, language.diagnosticSource));
this.createMarkerDatas(diagnostics, language.diagnosticSource),
spans?.map(span => typeConverters.Range.fromTextSpan(span)));
}
}

View File

@ -37,6 +37,7 @@ export interface TsDiagnostics {
readonly kind: DiagnosticKind;
readonly resource: vscode.Uri;
readonly diagnostics: Proto.Diagnostic[];
readonly spans?: Proto.TextSpan[];
}
interface ToCancelOnResourceChanged {
@ -947,7 +948,8 @@ export default class TypeScriptServiceClient extends Disposable implements IType
switch (event.event) {
case EventName.syntaxDiag:
case EventName.semanticDiag:
case EventName.suggestionDiag: {
case EventName.suggestionDiag:
case EventName.regionSemanticDiag: {
// This event also roughly signals that projects have been loaded successfully (since the TS server is synchronous)
this.loadingIndicator.reset();
@ -956,7 +958,9 @@ export default class TypeScriptServiceClient extends Disposable implements IType
this._onDiagnosticsReceived.fire({
kind: getDiagnosticsKind(event),
resource: this.toResource(diagnosticEvent.body.file),
diagnostics: diagnosticEvent.body.diagnostics
diagnostics: diagnosticEvent.body.diagnostics,
// @ts-expect-error until ts 5.6
spans: diagnosticEvent.body.spans,
});
}
break;
@ -1261,6 +1265,7 @@ function getDiagnosticsKind(event: Proto.Event) {
case 'syntaxDiag': return DiagnosticKind.Syntax;
case 'semanticDiag': return DiagnosticKind.Semantic;
case 'suggestionDiag': return DiagnosticKind.Suggestion;
case 'regionSemanticDiag': return DiagnosticKind.RegionSemantic;
}
throw new Error('Unknown dignostics kind');
}

View File

@ -7,13 +7,14 @@
"enabledApiProposals": [
"activeComment",
"authSession",
"defaultChatParticipant",
"chatParticipantPrivate",
"chatProvider",
"chatVariableResolver",
"contribViewsRemote",
"contribStatusBarItems",
"contribViewsRemote",
"createFileSystemWatcher",
"customEditorMove",
"defaultChatParticipant",
"diffCommand",
"documentFiltersExclusive",
"documentPaste",
@ -27,6 +28,8 @@
"findTextInFiles",
"fsChunks",
"interactive",
"languageStatusText",
"lmTools",
"mappedEditsProvider",
"notebookCellExecutionState",
"notebookDeprecated",
@ -35,25 +38,24 @@
"notebookMime",
"portsAttributes",
"quickPickSortByLabel",
"languageStatusText",
"resolvers",
"scmActionButton",
"scmSelectedProvider",
"scmTextDocument",
"scmValidation",
"taskPresentationGroup",
"telemetry",
"terminalDataWriteEvent",
"terminalDimensions",
"terminalShellIntegration",
"tunnels",
"testObserver",
"textSearchProvider",
"timeline",
"tokenInformation",
"treeViewActiveItem",
"treeViewReveal",
"workspaceTrust",
"telemetry"
"tunnels",
"workspaceTrust"
],
"private": true,
"activationEvents": [],
@ -63,6 +65,11 @@
},
"icon": "media/icon.png",
"contributes": {
"languageModels": [
{
"vendor": "test-lm-vendor"
}
],
"chatParticipants": [
{
"id": "api-test.participant",
@ -242,7 +249,9 @@
},
"devDependencies": {
"@types/mocha": "^9.1.1",
"@types/node": "20.x"
"@types/node": "20.x",
"@types/node-forge": "^1.3.11",
"node-forge": "^1.3.1"
},
"repository": {
"type": "git",

View File

@ -0,0 +1,153 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import 'mocha';
import * as assert from 'assert';
import * as vscode from 'vscode';
import { assertNoRpc, closeAllEditors, DeferredPromise, disposeAll } from '../utils';
suite('lm', function () {
let disposables: vscode.Disposable[] = [];
setup(function () {
disposables = [];
});
teardown(async function () {
assertNoRpc();
await closeAllEditors();
disposeAll(disposables);
});
test('lm request and stream', async function () {
let p: vscode.Progress<vscode.ChatResponseFragment> | undefined;
const defer = new DeferredPromise<void>();
disposables.push(vscode.lm.registerChatModelProvider('test-lm', {
async provideLanguageModelResponse(_messages, _options, _extensionId, progress, _token) {
p = progress;
return defer.p;
},
async provideTokenCount(_text, _token) {
return 1;
},
}, {
name: 'test-lm',
version: '1.0.0',
family: 'test',
vendor: 'test-lm-vendor',
maxInputTokens: 100,
maxOutputTokens: 100,
}));
const models = await vscode.lm.selectChatModels({ id: 'test-lm' });
assert.strictEqual(models.length, 1);
const request = await models[0].sendRequest([vscode.LanguageModelChatMessage.User('Hello')]);
// assert we have a request immediately
assert.ok(request);
assert.ok(p);
assert.strictEqual(defer.isSettled, false);
let streamDone = false;
let responseText = '';
const pp = (async () => {
for await (const chunk of request.text) {
responseText += chunk;
}
streamDone = true;
})();
assert.strictEqual(responseText, '');
assert.strictEqual(streamDone, false);
p.report({ index: 0, part: 'Hello' });
defer.complete();
await pp;
await new Promise(r => setTimeout(r, 1000));
assert.strictEqual(streamDone, true);
assert.strictEqual(responseText, 'Hello');
});
test('lm request fail', async function () {
disposables.push(vscode.lm.registerChatModelProvider('test-lm', {
async provideLanguageModelResponse(_messages, _options, _extensionId, _progress, _token) {
throw new Error('BAD');
},
async provideTokenCount(_text, _token) {
return 1;
},
}, {
name: 'test-lm',
version: '1.0.0',
family: 'test',
vendor: 'test-lm-vendor',
maxInputTokens: 100,
maxOutputTokens: 100,
}));
const models = await vscode.lm.selectChatModels({ id: 'test-lm' });
assert.strictEqual(models.length, 1);
try {
await models[0].sendRequest([vscode.LanguageModelChatMessage.User('Hello')]);
assert.ok(false, 'EXPECTED error');
} catch (error) {
assert.ok(error instanceof Error);
}
});
test('lm stream fail', async function () {
const defer = new DeferredPromise<void>();
disposables.push(vscode.lm.registerChatModelProvider('test-lm', {
async provideLanguageModelResponse(_messages, _options, _extensionId, _progress, _token) {
return defer.p;
},
async provideTokenCount(_text, _token) {
return 1;
},
}, {
name: 'test-lm',
version: '1.0.0',
family: 'test',
vendor: 'test-lm-vendor',
maxInputTokens: 100,
maxOutputTokens: 100,
}));
const models = await vscode.lm.selectChatModels({ id: 'test-lm' });
assert.strictEqual(models.length, 1);
const res = await models[0].sendRequest([vscode.LanguageModelChatMessage.User('Hello')]);
assert.ok(res);
const result = (async () => {
for await (const _chunk of res.text) {
}
})();
defer.error(new Error('STREAM FAIL'));
try {
await result;
assert.ok(false, 'EXPECTED error');
} catch (error) {
assert.ok(error);
// assert.ok(error instanceof Error); // todo@jrieken requires one more insiders
}
});
});

View File

@ -0,0 +1,77 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as https from 'https';
import 'mocha';
import { assertNoRpc } from '../utils';
import { pki } from 'node-forge';
import { AddressInfo } from 'net';
import { resetCaches } from '@vscode/proxy-agent';
suite('vscode API - network proxy support', () => {
teardown(async function () {
assertNoRpc();
});
test('custom root certificate', async () => {
const keys = pki.rsa.generateKeyPair(2048);
const cert = pki.createCertificate();
cert.publicKey = keys.publicKey;
cert.serialNumber = '01';
cert.validity.notBefore = new Date();
cert.validity.notAfter = new Date();
cert.validity.notAfter.setFullYear(cert.validity.notBefore.getFullYear() + 1);
const attrs = [{
name: 'commonName',
value: 'localhost-proxy-test'
}];
cert.setSubject(attrs);
cert.setIssuer(attrs);
cert.sign(keys.privateKey);
const certPEM = pki.certificateToPem(cert);
const privateKeyPEM = pki.privateKeyToPem(keys.privateKey);
let resolvePort: (port: number) => void;
let rejectPort: (err: any) => void;
const port = new Promise<number>((resolve, reject) => {
resolvePort = resolve;
rejectPort = reject;
});
const server = https.createServer({
key: privateKeyPEM,
cert: certPEM,
}, (_req, res) => {
res.end();
}).listen(0, '127.0.0.1', () => {
const address = server.address();
resolvePort((address as AddressInfo).port);
}).on('error', err => {
rejectPort(err);
});
// Using https.globalAgent because it is shared with proxyResolver.ts and mutable.
(https.globalAgent as any).testCertificates = [certPEM];
resetCaches();
try {
const portNumber = await port;
await new Promise<void>((resolve, reject) => {
https.get(`https://127.0.0.1:${portNumber}`, { servername: 'localhost-proxy-test' }, res => {
if (res.statusCode === 200) {
resolve();
} else {
reject(new Error(`Unexpected status code: ${res.statusCode}`));
}
})
.on('error', reject);
});
} finally {
delete (https.globalAgent as any).testCertificates;
resetCaches();
server.close();
}
});
});

View File

@ -7,6 +7,20 @@
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-9.1.1.tgz#e7c4f1001eefa4b8afbd1eee27a237fee3bf29c4"
integrity sha512-Z61JK7DKDtdKTWwLeElSEBcWGRLY8g95ic5FoQqI9CMx0ns/Ghep3B4DfcEimiKMvtamNVULVNKEsiwV3aQmXw==
"@types/node-forge@^1.3.11":
version "1.3.11"
resolved "https://registry.yarnpkg.com/@types/node-forge/-/node-forge-1.3.11.tgz#0972ea538ddb0f4d9c2fa0ec5db5724773a604da"
integrity sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==
dependencies:
"@types/node" "*"
"@types/node@*":
version "20.14.6"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.6.tgz#f3c19ffc98c2220e18de259bb172dd4d892a6075"
integrity sha512-JbA0XIJPL1IiNnU7PFxDXyfAwcwVVrOoqyzzyQTyMeVhBzkJVMSkC1LlVsRQ2lpqiY4n6Bb9oCS6lzDKVQxbZw==
dependencies:
undici-types "~5.26.4"
"@types/node@20.x":
version "20.11.24"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.24.tgz#cc207511104694e84e9fb17f9a0c4c42d4517792"
@ -14,6 +28,11 @@
dependencies:
undici-types "~5.26.4"
node-forge@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3"
integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==
undici-types@~5.26.4:
version "5.26.5"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"

View File

@ -234,10 +234,10 @@ to-regex-range@^5.0.1:
dependencies:
is-number "^7.0.0"
typescript@^5.5.0-dev.20240603:
version "5.5.0-dev.20240603"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.0-dev.20240603.tgz#a1b7311df5039a8abbaaa2213c21cac6ec547490"
integrity sha512-gdm3Sh1A+Pjj9ZlfBEJY3o2rs3tvpcSbu3vYqcCijMe09BePQBtZlsuShuPn+zCnP+qBLxdKjFiw5v1tkna3tA==
typescript@^5.5.2:
version "5.5.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.2.tgz#c26f023cb0054e657ce04f72583ea2d85f8d0507"
integrity sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==
vscode-grammar-updater@^1.1.0:
version "1.1.0"

View File

@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.91.0",
"distro": "170beceb9849568b8f7159757bc3fc3964af1986",
"distro": "9cef7f933867933892cb3b591231ed071fe861a8",
"author": {
"name": "Microsoft Corporation"
},
@ -73,7 +73,7 @@
"@vscode/deviceid": "^0.1.1",
"@vscode/iconv-lite-umd": "0.7.0",
"@vscode/policy-watcher": "^1.1.4",
"@vscode/proxy-agent": "^0.20.0",
"@vscode/proxy-agent": "^0.21.0",
"@vscode/ripgrep": "^1.15.9",
"@vscode/spdlog": "^0.15.0",
"@vscode/sqlite3": "5.1.6-vscode",
@ -207,7 +207,7 @@
"ts-loader": "^9.4.2",
"ts-node": "^10.9.1",
"tsec": "0.2.7",
"typescript": "^5.6.0-dev.20240612",
"typescript": "^5.6.0-dev.20240618",
"util": "^0.12.4",
"vscode-nls-dev": "^3.3.1",
"webpack": "^5.91.0",

View File

@ -50,8 +50,8 @@
},
{
"name": "ms-vscode.js-debug",
"version": "1.90.0",
"sha256": "1317dd7d1ac50641c1534a3e957ecbc94349f4fbd897acb916da11eea3208a66",
"version": "1.91.0",
"sha256": "53b99146c7fa280f00c74414e09721530c622bf3e5eac2c967ddfb9906b51c80",
"repo": "https://github.com/microsoft/vscode-js-debug",
"metadata": {
"id": "25629058-ddac-4e17-abba-74678e126c5d",

View File

@ -8,7 +8,7 @@
"@parcel/watcher": "2.1.0",
"@vscode/deviceid": "^0.1.1",
"@vscode/iconv-lite-umd": "0.7.0",
"@vscode/proxy-agent": "^0.20.0",
"@vscode/proxy-agent": "^0.21.0",
"@vscode/ripgrep": "^1.15.9",
"@vscode/spdlog": "^0.15.0",
"@vscode/vscode-languagedetection": "1.0.21",

View File

@ -66,10 +66,10 @@
resolved "https://registry.yarnpkg.com/@vscode/iconv-lite-umd/-/iconv-lite-umd-0.7.0.tgz#d2f1e0664ee6036408f9743fee264ea0699b0e48"
integrity sha512-bRRFxLfg5dtAyl5XyiVWz/ZBPahpOpPrNYnnHpOpUZvam4tKH35wdhP4Kj6PbM0+KdliOsPzbGWpkxcdpNB/sg==
"@vscode/proxy-agent@^0.20.0":
version "0.20.0"
resolved "https://registry.yarnpkg.com/@vscode/proxy-agent/-/proxy-agent-0.20.0.tgz#48cbfd15e76da674bb1ba6e09a05b736d5677df0"
integrity sha512-FskCQwrFiXI+KiGgvEvUENNDffu5cDg3Cz1zWsafqvuPoPpTC88SOJl9kbeu3Y2YvSMcHx/r3tkK6ICoMaEWNQ==
"@vscode/proxy-agent@^0.21.0":
version "0.21.0"
resolved "https://registry.yarnpkg.com/@vscode/proxy-agent/-/proxy-agent-0.21.0.tgz#93c818b863ad20b42679032ecc1e3ecdc6306f12"
integrity sha512-9YcpBq+ZhMr3EQY/5ScyHc9kIIU/AcYOQn3DXq0N9tl81ViVsUvii3Fh+FAtD0YQ/qWtDfGxt8VCWZtuyh2D0g==
dependencies:
"@tootallnate/once" "^3.0.0"
agent-base "^7.0.1"

View File

@ -261,4 +261,4 @@ fi
wait_for_async_execs
exec "$@" "--no-sandbox"
exec "$@"

View File

@ -77,8 +77,8 @@ parts:
apps:
@@NAME@@:
command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@
command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@ --no-sandbox
common-id: @@NAME@@.desktop
url-handler:
command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@ --open-url
command: electron-launch $SNAP/usr/share/@@NAME@@/bin/@@NAME@@ --open-url --no-sandbox

View File

@ -8,6 +8,10 @@
//@ts-check
'use strict';
/**
* @import { ISandboxConfiguration } from './vs/base/parts/sandbox/common/sandboxTypes'
*/
/* eslint-disable no-restricted-globals */
// Simple module style to support node.js and browser environments
@ -29,8 +33,6 @@
const safeProcess = preloadGlobals.process;
/**
* @typedef {import('./vs/base/parts/sandbox/common/sandboxTypes').ISandboxConfiguration} ISandboxConfiguration
*
* @param {string[]} modulePaths
* @param {(result: unknown, configuration: ISandboxConfiguration) => Promise<unknown> | undefined} resultCallback
* @param {{

View File

@ -7,9 +7,9 @@
'use strict';
/**
* @typedef {import('./vs/base/common/product').IProductConfiguration} IProductConfiguration
* @typedef {import('./vs/base/node/languagePacks').NLSConfiguration} NLSConfiguration
* @typedef {import('./vs/platform/environment/common/argv').NativeParsedArgs} NativeParsedArgs
* @import { IProductConfiguration } from './vs/base/common/product'
* @import { NLSConfiguration } from './vs/base/node/languagePacks'
* @import { NativeParsedArgs } from './vs/platform/environment/common/argv'
*/
const perf = require('./vs/base/common/performance');
@ -21,7 +21,7 @@ const os = require('os');
const bootstrap = require('./bootstrap');
const bootstrapNode = require('./bootstrap-node');
const { getUserDataPath } = require('./vs/platform/environment/node/userDataPath');
const { stripComments } = require('./vs/base/common/stripComments');
const { parse } = require('./vs/base/common/jsonc');
const { getUNCHost, addUNCHostToAllowlist } = require('./vs/base/node/unc');
/** @type {Partial<IProductConfiguration>} */
// @ts-ignore
@ -205,7 +205,10 @@ function configureCommandlineSwitchesSync(cliArgs) {
'force-color-profile',
// disable LCD font rendering, a Chromium flag
'disable-lcd-text'
'disable-lcd-text',
// bypass any specified proxy for the given semi-colon-separated list of hosts
'proxy-bypass-list'
];
if (process.platform === 'linux') {
@ -243,10 +246,7 @@ function configureCommandlineSwitchesSync(cliArgs) {
app.commandLine.appendSwitch(argvKey);
}
} else if (argvValue) {
if (argvKey === 'force-color-profile') {
// Color profile
app.commandLine.appendSwitch(argvKey, argvValue);
} else if (argvKey === 'password-store') {
if (argvKey === 'password-store') {
// Password store
// TODO@TylerLeonhardt: Remove this migration in 3 months
let migratedArgvValue = argvValue;
@ -254,6 +254,8 @@ function configureCommandlineSwitchesSync(cliArgs) {
migratedArgvValue = 'gnome-libsecret';
}
app.commandLine.appendSwitch(argvKey, migratedArgvValue);
} else {
app.commandLine.appendSwitch(argvKey, argvValue);
}
}
}
@ -316,7 +318,7 @@ function readArgvConfigSync() {
const argvConfigPath = getArgvConfigPath();
let argvConfig;
try {
argvConfig = JSON.parse(stripComments(fs.readFileSync(argvConfigPath).toString()));
argvConfig = parse(fs.readFileSync(argvConfigPath).toString());
} catch (error) {
if (error && error.code === 'ENOENT') {
createDefaultArgvConfigSync(argvConfigPath);

View File

@ -5,6 +5,10 @@
// @ts-check
/**
* @import { IServerAPI } from './vs/server/node/remoteExtensionHostAgentServer'
*/
const perf = require('./vs/base/common/performance');
const performance = require('perf_hooks').performance;
const product = require('../product.json');
@ -45,9 +49,6 @@ async function start() {
return;
}
/**
* @typedef { import('./vs/server/node/remoteExtensionHostAgentServer').IServerAPI } IServerAPI
*/
/** @type {IServerAPI | null} */
let _remoteExtensionHostAgentServer = null;
/** @type {Promise<IServerAPI> | null} */

View File

@ -34,6 +34,16 @@
"./main.js",
"./server-main.js",
"./server-cli.js",
"./vs/base/common/jsonc.js",
"./vs/base/common/performance.js",
"./vs/base/node/unc.js",
"./vs/base/node/languagePacks.js",
"./vs/platform/environment/node/userDataPath.js",
"./vs/base/parts/sandbox/electron-sandbox/preload-aux.js",
"./vs/base/parts/sandbox/electron-sandbox/preload.js",
"./vs/code/electron-sandbox/processExplorer/processExplorer.js",
"./vs/code/electron-sandbox/workbench/workbench.js",
"./vs/workbench/contrib/issue/electron-sandbox/issueReporter.js",
"./typings",
"./vs/**/*.ts",
"vscode-dts/vscode.proposed.*.d.ts",

View File

@ -10,6 +10,7 @@
]
},
"exclude": [
"./vs/workbench/contrib/webview/browser/pre/service-worker.js",
"*/test/*",
"**/*.test.ts"
]

View File

@ -2373,6 +2373,107 @@ export function h(tag: string, ...args: [] | [attributes: { $: string } & Partia
return result;
}
export function svgElem<TTag extends string>
(tag: TTag):
TagToRecord<TTag> extends infer Y ? { [TKey in keyof Y]: Y[TKey] } : never;
export function svgElem<TTag extends string, T extends Child[]>
(tag: TTag, children: [...T]):
(ArrayToObj<T> & TagToRecord<TTag>) extends infer Y ? { [TKey in keyof Y]: Y[TKey] } : never;
export function svgElem<TTag extends string>
(tag: TTag, attributes: Partial<ElementAttributes<TagToElement<TTag>>>):
TagToRecord<TTag> extends infer Y ? { [TKey in keyof Y]: Y[TKey] } : never;
export function svgElem<TTag extends string, T extends Child[]>
(tag: TTag, attributes: Partial<ElementAttributes<TagToElement<TTag>>>, children: [...T]):
(ArrayToObj<T> & TagToRecord<TTag>) extends infer Y ? { [TKey in keyof Y]: Y[TKey] } : never;
export function svgElem(tag: string, ...args: [] | [attributes: { $: string } & Partial<ElementAttributes<HTMLElement>> | Record<string, any>, children?: any[]] | [children: any[]]): Record<string, HTMLElement> {
let attributes: { $?: string } & Partial<ElementAttributes<HTMLElement>>;
let children: (Record<string, HTMLElement> | HTMLElement)[] | undefined;
if (Array.isArray(args[0])) {
attributes = {};
children = args[0];
} else {
attributes = args[0] as any || {};
children = args[1];
}
const match = H_REGEX.exec(tag);
if (!match || !match.groups) {
throw new Error('Bad use of h');
}
const tagName = match.groups['tag'] || 'div';
const el = document.createElementNS('http://www.w3.org/2000/svg', tagName) as any as HTMLElement;
if (match.groups['id']) {
el.id = match.groups['id'];
}
const classNames = [];
if (match.groups['class']) {
for (const className of match.groups['class'].split('.')) {
if (className !== '') {
classNames.push(className);
}
}
}
if (attributes.className !== undefined) {
for (const className of attributes.className.split('.')) {
if (className !== '') {
classNames.push(className);
}
}
}
if (classNames.length > 0) {
el.className = classNames.join(' ');
}
const result: Record<string, HTMLElement> = {};
if (match.groups['name']) {
result[match.groups['name']] = el;
}
if (children) {
for (const c of children) {
if (isHTMLElement(c)) {
el.appendChild(c);
} else if (typeof c === 'string') {
el.append(c);
} else if ('root' in c) {
Object.assign(result, c);
el.appendChild(c.root);
}
}
}
for (const [key, value] of Object.entries(attributes)) {
if (key === 'className') {
continue;
} else if (key === 'style') {
for (const [cssKey, cssValue] of Object.entries(value)) {
el.style.setProperty(
camelCaseToHyphenCase(cssKey),
typeof cssValue === 'number' ? cssValue + 'px' : '' + cssValue
);
}
} else if (key === 'tabIndex') {
el.tabIndex = value;
} else {
el.setAttribute(camelCaseToHyphenCase(key), value.toString());
}
}
result['root'] = el;
return result;
}
function camelCaseToHyphenCase(str: string) {
return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
}

View File

@ -482,6 +482,7 @@ export const allowedMarkdownAttr = [
'alt',
'checked',
'class',
'colspan',
'controls',
'data-code',
'data-href',
@ -493,6 +494,7 @@ export const allowedMarkdownAttr = [
'muted',
'playsinline',
'poster',
'rowspan',
'src',
'style',
'target',
@ -634,7 +636,7 @@ const plainTextRenderer = new Lazy<marked.Renderer>((withCodeBlocks?: boolean) =
const plainTextWithCodeBlocksRenderer = new Lazy<marked.Renderer>(() => {
const renderer = createRenderer();
renderer.code = (code: string): string => {
return '\n' + '```' + '\n' + code + '```' + '\n';
return `\n\`\`\`\n${code}\n\`\`\`\n`;
};
return renderer;
});
@ -766,8 +768,8 @@ function completeListItemPattern(list: marked.Tokens.List): marked.Tokens.List |
const previousListItemsText = mergeRawTokenText(list.items.slice(0, -1));
// Grabbing the `- ` or `1. ` off the list item because I can't find a better way to do this
const lastListItemLead = lastListItem.raw.match(/^(\s*(-|\d+\.) +)/)?.[0];
// Grabbing the `- ` or `1. ` or `* ` off the list item because I can't find a better way to do this
const lastListItemLead = lastListItem.raw.match(/^(\s*(-|\d+\.|\*) +)/)?.[0];
if (!lastListItemLead) {
// Is badly formatted
return;

View File

@ -3,7 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { mainWindow } from 'vs/base/browser/window';
import { onUnexpectedError } from 'vs/base/common/errors';
export function createTrustedTypesPolicy<Options extends TrustedTypePolicyOptions>(
@ -28,7 +27,7 @@ export function createTrustedTypesPolicy<Options extends TrustedTypePolicyOption
}
}
try {
return mainWindow.trustedTypes?.createPolicy(policyName, policyOptions);
return (globalThis as any).trustedTypes?.createPolicy(policyName, policyOptions);
} catch (err) {
onUnexpectedError(err);
return undefined;

View File

@ -134,6 +134,11 @@
padding-right: 4px;
}
.monaco-hover .hover-row.status-bar .actions .action-container a {
color: var(--vscode-textLink-foreground);
text-decoration: var(--text-link-decoration);
}
.monaco-hover .markdown-hover .hover-contents .codicon {
color: inherit;
font-size: inherit;

View File

@ -50,12 +50,18 @@ export class HoverAction extends Disposable {
return new HoverAction(parent, actionOptions, keybindingLabel);
}
public readonly actionLabel: string;
public readonly actionKeybindingLabel: string | null;
private readonly actionContainer: HTMLElement;
private readonly action: HTMLElement;
private constructor(parent: HTMLElement, actionOptions: { label: string; iconClass?: string; run: (target: HTMLElement) => void; commandId: string }, keybindingLabel: string | null) {
super();
this.actionLabel = actionOptions.label;
this.actionKeybindingLabel = keybindingLabel;
this.actionContainer = dom.append(parent, $('div.action-container'));
this.actionContainer.setAttribute('tabindex', '0');

View File

@ -569,10 +569,6 @@ export class AsyncDataTree<TInput, T, TFilterData = void> implements IDisposable
this.tree.resort(this.getDataNode(element), recursive);
}
hasElement(element: TInput | T): boolean {
return this.tree.hasElement(this.getDataNode(element));
}
hasNode(element: TInput | T): boolean {
return element === this.root.element || this.nodes.has(element as T);
}

View File

@ -137,6 +137,19 @@ export function transformErrorForSerialization(error: any): any {
return error;
}
export function transformErrorFromSerialization(data: SerializedError): Error {
let error: Error;
if (data.noTelemetry) {
error = new ErrorNoTelemetry();
} else {
error = new Error();
error.name = data.name;
}
error.message = data.message;
error.stack = data.stack;
return error;
}
// see https://github.com/v8/v8/wiki/Stack%20Trace%20API#basic-stack-traces
export interface V8CallSite {
getThis(): unknown;

View File

@ -1308,40 +1308,6 @@ export function visit(text: string, visitor: JSONVisitor, options: ParseOptions
return true;
}
/**
* Takes JSON with JavaScript-style comments and remove
* them. Optionally replaces every none-newline character
* of comments with a replaceCharacter
*/
export function stripComments(text: string, replaceCh?: string): string {
const _scanner = createScanner(text);
const parts: string[] = [];
let kind: SyntaxKind;
let offset = 0;
let pos: number;
do {
pos = _scanner.getPosition();
kind = _scanner.scan();
switch (kind) {
case SyntaxKind.LineCommentTrivia:
case SyntaxKind.BlockCommentTrivia:
case SyntaxKind.EOF:
if (offset !== pos) {
parts.push(text.substring(offset, pos));
}
if (replaceCh !== undefined) {
parts.push(_scanner.getTokenValue().replace(/[^\r\n]/g, replaceCh));
}
offset = _scanner.getPosition();
break;
}
} while (kind !== SyntaxKind.EOF);
return parts.join('');
}
export function getNodeType(value: any): NodeType {
switch (typeof value) {
case 'boolean': return 'boolean';

View File

@ -3,11 +3,21 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/**
* A drop-in replacement for JSON.parse that can parse
* JSON with comments and trailing commas.
*
* @param content the content to strip comments from
* @returns the parsed content as JSON
*/
export function parse(content: string): any;
/**
* Strips single and multi line JavaScript comments from JSON
* content. Ignores characters in strings BUT doesn't support
* string continuation across multiple lines since it is not
* supported in JSON.
*
* @param content the content to strip comments from
* @returns the content without comments
*/

View File

@ -3,9 +3,10 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
/// <reference path="../../../typings/require.d.ts" />
//@ts-check
'use strict';
(function () {
function factory(path, os, productName, cwd) {
@ -17,7 +18,6 @@
const regexp = /("[^"\\]*(?:\\.[^"\\]*)*")|('[^'\\]*(?:\\.[^'\\]*)*')|(\/\*[^\/\*]*(?:(?:\*|\/)[^\/\*]*)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))|(,\s*[}\]])/g;
/**
*
* @param {string} content
* @returns {string}
*/
@ -46,12 +46,27 @@
}
});
}
/**
* @param {string} content
* @returns {any}
*/
function parse(content) {
const commentsStripped = stripComments(content);
try {
return JSON.parse(commentsStripped);
} catch (error) {
const trailingCommasStriped = commentsStripped.replace(/,\s*([}\]])/g, '$1');
return JSON.parse(trailingCommasStriped);
}
}
return {
stripComments
stripComments,
parse
};
}
if (typeof define === 'function') {
// amd
define([], function () { return factory(); });
@ -59,6 +74,6 @@
// commonjs
module.exports = factory();
} else {
console.trace('strip comments defined in UNKNOWN context (neither requirejs or commonjs)');
console.trace('jsonc defined in UNKNOWN context (neither requirejs or commonjs)');
}
})();

View File

@ -140,11 +140,15 @@ export function derivedDisposable<T extends IDisposable | undefined>(computeFnOr
computeFn = computeFnOrUndefined as any;
}
const store = new DisposableStore();
let store: DisposableStore | undefined = undefined;
return new Derived(
new DebugNameData(owner, undefined, computeFn),
r => {
store.clear();
if (!store) {
store = new DisposableStore();
} else {
store.clear();
}
const result = computeFn(r);
if (result) {
store.add(result);
@ -152,7 +156,12 @@ export function derivedDisposable<T extends IDisposable | undefined>(computeFnOr
return result;
}, undefined,
undefined,
() => store.dispose(),
() => {
if (store) {
store.dispose();
store = undefined;
}
},
strictEquals
);
}

View File

@ -40,6 +40,10 @@ export class ObservableLazy<T> {
* A promise whose state is observable.
*/
export class ObservablePromise<T> {
public static fromFn<T>(fn: () => Promise<T>): ObservablePromise<T> {
return new ObservablePromise(fn());
}
private readonly _value = observableValue<PromiseResult<T> | undefined>(this, undefined);
/**

View File

@ -3,9 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
//@ts-check
'use strict';
(function () {
@ -42,6 +41,7 @@
// Identify browser environment when following property is not present
// https://nodejs.org/dist/latest-v16.x/docs/api/perf_hooks.html#performancenodetiming
// @ts-ignore
if (typeof performance === 'object' && typeof performance.mark === 'function' && !performance.nodeTiming) {
// in a browser context, reuse performance-util
@ -119,6 +119,7 @@
module.exports = _factory(sharedObj);
} else {
console.trace('perf-util defined in UNKNOWN context (neither requirejs or commonjs)');
// @ts-ignore
sharedObj.perf = _factory(sharedObj);
}

View File

@ -173,6 +173,7 @@ export interface IProductConfiguration {
readonly extensionPointExtensionKind?: { readonly [extensionPointId: string]: ('ui' | 'workspace' | 'web')[] };
readonly extensionSyncedKeys?: { readonly [extensionId: string]: string[] };
readonly extensionsEnabledWithApiProposalVersion?: string[];
readonly extensionEnabledApiProposals?: { readonly [extensionId: string]: string[] };
readonly extensionUntrustedWorkspaceSupport?: { readonly [extensionId: string]: ExtensionUntrustedWorkspaceSupport };
readonly extensionVirtualWorkspacesSupport?: { readonly [extensionId: string]: ExtensionVirtualWorkspaceSupport };

View File

@ -3,9 +3,10 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
/// <reference path="../../../typings/require.d.ts" />
//@ts-check
'use strict';
(function () {
function factory() {
@ -18,6 +19,7 @@
// The property `process.uncHostAllowlist` is not available in official node.js
// releases, only in our own builds, so we have to probe for availability
// @ts-ignore
return process.uncHostAllowlist;
}
@ -114,6 +116,7 @@
return;
}
// @ts-ignore
process.restrictUNCAccess = false;
}
@ -122,6 +125,7 @@
return true;
}
// @ts-ignore
return process.restrictUNCAccess === false;
}

View File

@ -7,6 +7,13 @@
(function () {
'use strict';
/**
* @import { ISandboxConfiguration } from '../common/sandboxTypes'
* @import { IpcRenderer } from './electronTypes'
* @import { IpcRendererEvent } from 'electron'
* @import { ISandboxNodeProcess } from './globals'
*/
const { ipcRenderer, webFrame, contextBridge, webUtils } = require('electron');
//#region Utilities
@ -41,10 +48,6 @@
//#region Resolve Configuration
/**
* @typedef {import('../common/sandboxTypes').ISandboxConfiguration} ISandboxConfiguration
*/
/** @type {ISandboxConfiguration | undefined} */
let configuration = undefined;
@ -123,9 +126,6 @@
* A minimal set of methods exposed from Electron's `ipcRenderer`
* to support communication to main process.
*
* @typedef {import('./electronTypes').IpcRenderer} IpcRenderer
* @typedef {import('electron').IpcRendererEvent} IpcRendererEvent
*
* @type {IpcRenderer}
*/
@ -256,8 +256,6 @@
* Note: when `sandbox` is enabled, the only properties available
* are https://github.com/electron/electron/blob/master/docs/api/process.md#sandbox
*
* @typedef {import('./globals').ISandboxNodeProcess} ISandboxNodeProcess
*
* @type {ISandboxNodeProcess}
*/
process: {

View File

@ -607,6 +607,15 @@ const y = 2;
assert.deepStrictEqual(newTokens, completeTokens);
});
test(`incomplete ${name} in asterisk list`, () => {
const text = `* list item one\n* list item two and ${delimiter}text`;
const tokens = marked.lexer(text);
const newTokens = fillInIncompleteTokens(tokens);
const completeTokens = marked.lexer(text + delimiter);
assert.deepStrictEqual(newTokens, completeTokens);
});
test(`incomplete ${name} in numbered list`, () => {
const text = `1. list item one\n2. list item two and ${delimiter}text`;
const tokens = marked.lexer(text);

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