Merge branch 'main' into joh/doubtful-jaguar

This commit is contained in:
Johannes Rieken
2025-04-02 10:07:41 +02:00
committed by GitHub
245 changed files with 3592 additions and 2466 deletions
@@ -0,0 +1,66 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as eslint from 'eslint';
import { join, dirname } from 'path';
import { createImportRuleListener } from './utils';
export = new class implements eslint.Rule.RuleModule {
readonly meta: eslint.Rule.RuleMetaData = {
messages: {
noDeepImportOfInternal: 'No deep import of internal modules allowed! Use a re-export from a non-internal module instead. Internal modules can only be imported by direct parents (any module in {{parentDir}}).'
},
docs: {
url: 'https://github.com/microsoft/vscode/wiki/Source-Code-Organization'
},
schema: [
{
type: 'object',
additionalProperties: {
type: 'boolean'
}
}
]
};
create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
const patterns = context.options[0] as Record<string, boolean>;
const internalModulePattern = Object.entries(patterns).map(([key, v]) => v ? key : undefined).filter(v => !!v);
const allowedPatterns = Object.entries(patterns).map(([key, v]) => !v ? key : undefined).filter(v => !!v);
return createImportRuleListener((node, path) => {
const importerModuleDir = dirname(context.filename);
if (path[0] === '.') {
path = join(importerModuleDir, path);
}
const importedModulePath = path;
const importerDirParts = splitParts(importerModuleDir);
const importedModuleParts = splitParts(importedModulePath);
for (let i = 0; i < importedModuleParts.length; i++) {
if (internalModulePattern.some(p => importedModuleParts[i].match(p)) && allowedPatterns.every(p => !importedModuleParts[i].match(p))) {
const importerDirJoined = importerDirParts.join('/');
const expectedParentDir = importedModuleParts.slice(0, i).join('/');
if (!importerDirJoined.startsWith(expectedParentDir)) {
context.report({
node,
messageId: 'noDeepImportOfInternal',
data: {
parentDir: expectedParentDir
}
});
return;
}
}
}
});
}
};
function splitParts(path: string): string[] {
return path.split(/\\|\//);
}
+1 -1
View File
@@ -285,7 +285,7 @@
"workbench-fonts": {"assign": []},
"workbench-history": {"assign": ["bpasero"]},
"workbench-hot-exit": {"assign": ["bpasero"]},
"workbench-hover": {"assign": ["Tyriar"]},
"workbench-hover": {"assign": ["Tyriar", "benibenj"]},
"workbench-launch": {"assign": []},
"workbench-link": {"assign": []},
"workbench-multiroot": {"assign": ["bpasero"]},
+2 -2
View File
@@ -1,6 +1,6 @@
disturl="https://electronjs.org/headers"
target="34.3.2"
ms_build_id="11161073"
target="34.4.0"
ms_build_id="11308985"
runtime="electron"
build_from_source="true"
legacy-peer-deps="true"
+10 -8
View File
@@ -56,12 +56,13 @@
"dev": true
},
"node_modules/@types/node": {
"version": "20.12.11",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.11.tgz",
"integrity": "sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==",
"version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~6.19.2"
}
},
"node_modules/ansi-styles": {
@@ -92,10 +93,11 @@
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
}
}
}
@@ -27,7 +27,7 @@ steps:
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Registry
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js alpine $VSCODE_ARCH > .build/packagelockhash
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js alpine $VSCODE_ARCH $(node -p process.arch) > .build/packagelockhash
displayName: Prepare node_modules cache key
- task: Cache@2
@@ -45,7 +45,7 @@ steps:
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Registry
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js darwin $VSCODE_ARCH > .build/packagelockhash
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js darwin $VSCODE_ARCH $(node -p process.arch) > .build/packagelockhash
displayName: Prepare node_modules cache key
- task: Cache@2
@@ -69,7 +69,7 @@ steps:
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Registry
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js linux $VSCODE_ARCH > .build/packagelockhash
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js linux $VSCODE_ARCH $(node -p process.arch) > .build/packagelockhash
displayName: Prepare node_modules cache key
- task: Cache@2
@@ -13,7 +13,7 @@ steps:
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Registry
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js linux $VSCODE_ARCH > .build/packagelockhash
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js linux $VSCODE_ARCH $(node -p process.arch) > .build/packagelockhash
displayName: Prepare node_modules cache key
- task: Cache@2
@@ -15,7 +15,7 @@ steps:
- pwsh: |
mkdir .build -ea 0
node build/azure-pipelines/common/computeNodeModulesCacheKey.js win32 $(VSCODE_ARCH) > .build/packagelockhash
node build/azure-pipelines/common/computeNodeModulesCacheKey.js win32 $(VSCODE_ARCH) $(node -p process.arch) > .build/packagelockhash
displayName: Prepare node_modules cache key
- task: Cache@2
+7 -12
View File
@@ -197,8 +197,6 @@ extends:
pool:
name: AcesShared
os: macOS
variables:
VSCODE_ARCH: arm64
steps:
- template: build/azure-pipelines/product-compile.yml@self
parameters:
@@ -264,8 +262,7 @@ extends:
- ${{ if eq(parameters.VSCODE_BUILD_MACOS, true) }}:
- job: CLIMacOSX64
pool:
name: Azure Pipelines
image: macOS-13
name: AcesShared
os: macOS
variables:
# todo@connor4312 to diagnose build flakes
@@ -281,8 +278,7 @@ extends:
- ${{ if and(eq(variables['VSCODE_CIBUILD'], false), eq(parameters.VSCODE_BUILD_MACOS_ARM64, true)) }}:
- job: CLIMacOSARM64
pool:
name: Azure Pipelines
image: macOS-13
name: AcesShared
os: macOS
variables:
# todo@connor4312 to diagnose build flakes
@@ -585,8 +581,7 @@ extends:
- ${{ if or(eq(parameters.VSCODE_BUILD_LINUX, true),eq(parameters.VSCODE_BUILD_LINUX_ARMHF, true),eq(parameters.VSCODE_BUILD_LINUX_ARM64, true),eq(parameters.VSCODE_BUILD_ALPINE, true),eq(parameters.VSCODE_BUILD_ALPINE_ARM64, true),eq(parameters.VSCODE_BUILD_MACOS, true),eq(parameters.VSCODE_BUILD_MACOS_ARM64, true),eq(parameters.VSCODE_BUILD_WIN32, true),eq(parameters.VSCODE_BUILD_WIN32_ARM64, true)) }}:
- CompileCLI
pool:
name: Azure Pipelines
image: macOS-13
name: AcesShared
os: macOS
variables:
BUILDSECMON_OPT_IN: true
@@ -596,7 +591,7 @@ extends:
displayName: Unit Tests
timeoutInMinutes: 90
variables:
VSCODE_ARCH: x64
VSCODE_ARCH: arm64
steps:
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
parameters:
@@ -609,7 +604,7 @@ extends:
displayName: Integration Tests
timeoutInMinutes: 90
variables:
VSCODE_ARCH: x64
VSCODE_ARCH: arm64
steps:
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
parameters:
@@ -622,7 +617,7 @@ extends:
displayName: Smoke Tests
timeoutInMinutes: 90
variables:
VSCODE_ARCH: x64
VSCODE_ARCH: arm64
steps:
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
parameters:
@@ -650,7 +645,7 @@ extends:
- job: macOSTest
timeoutInMinutes: 90
variables:
VSCODE_ARCH: x64
VSCODE_ARCH: arm64
steps:
- template: build/azure-pipelines/darwin/product-build-darwin.yml@self
parameters:
+1 -1
View File
@@ -23,7 +23,7 @@ steps:
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Registry
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js compile $VSCODE_ARCH > .build/packagelockhash
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js compile $(node -p process.arch) > .build/packagelockhash
displayName: Prepare node_modules cache key
- task: Cache@2
@@ -27,7 +27,7 @@ steps:
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
displayName: Setup NPM Registry
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js web > .build/packagelockhash
- script: mkdir -p .build && node build/azure-pipelines/common/computeNodeModulesCacheKey.js web $(node -p process.arch) > .build/packagelockhash
displayName: Prepare node_modules cache key
- task: Cache@2
@@ -57,7 +57,7 @@ steps:
- pwsh: |
mkdir .build -ea 0
node build/azure-pipelines/common/computeNodeModulesCacheKey.js win32 $(VSCODE_ARCH) > .build/packagelockhash
node build/azure-pipelines/common/computeNodeModulesCacheKey.js win32 $(VSCODE_ARCH) $(node -p process.arch) > .build/packagelockhash
displayName: Prepare node_modules cache key
- task: Cache@2
+75 -75
View File
@@ -1,75 +1,75 @@
c9b82c9f381742e839fea00aeb14f24519bcaf38a0f4eed25532191701f9535b *chromedriver-v34.3.2-darwin-arm64.zip
d556c1e2b06f1bf131e83c2fb981de755c28e1083a884d257eb964815be16b0c *chromedriver-v34.3.2-darwin-x64.zip
1cabad4f3303ac2ff172a9f22185f64944dbaa6fc68271609077158eaefdee35 *chromedriver-v34.3.2-linux-arm64.zip
4213ce52c72ef414179b5c5c22ae8423847ff030d438296bd6c2aac763930a7b *chromedriver-v34.3.2-linux-armv7l.zip
3c64c08221fdfc0f4be60ea8b1b126f2ecca45f60001b63778522f711022c6ea *chromedriver-v34.3.2-linux-x64.zip
e8388734d88e011cb6cd79795431de9206820749219d80565ee49d90501d2bf3 *chromedriver-v34.3.2-mas-arm64.zip
3ad1dd37bd6e0bb37e8503898db7aedd56bd5213e6d6760b05c3d11f4625062b *chromedriver-v34.3.2-mas-x64.zip
d567b481a0f5d88e84bba7718f89fb08f56363bfc4cb5914e1c2086358a5c252 *chromedriver-v34.3.2-win32-arm64.zip
df6732e9dc61cb20a3c0b2a2de453aac7e2bd54e7cbff43512afa614852c15fa *chromedriver-v34.3.2-win32-ia32.zip
dda0765c8d064924632e18cd152014ecd767f3808fc51c8249a053bfb7ca70a2 *chromedriver-v34.3.2-win32-x64.zip
1945f15caff98f2e0f1ee539c483d352fb8d4d0c13f342caa7abe247676d828c *electron-api.json
c078bbf727b3c3026f60e07a0f4643b85c06c581b54be017d0a6c284ba6772d3 *electron-v34.3.2-darwin-arm64-dsym-snapshot.zip
35f587754d6a3272606258386bf73688d63dd53c7e572d3a7cbaae6f3f60bdae *electron-v34.3.2-darwin-arm64-dsym.zip
08b14ee02c98353de3c738120dfd017322666e82b914a7f6de9b9888dcc5c0f0 *electron-v34.3.2-darwin-arm64-symbols.zip
2a4aa7e8fa30f229e465ebd18d3e4722e2b41529dc51a68a954d333a7e556ffe *electron-v34.3.2-darwin-arm64.zip
1509ccdeb80024f5e3edd5ecf804b4cef4e47ea2bd74e33ef0b39044b0ccf892 *electron-v34.3.2-darwin-x64-dsym-snapshot.zip
3bbe5d587c3f582ed8c126b0fb635cc02ad9a14d077b04892fe6f862092445b0 *electron-v34.3.2-darwin-x64-dsym.zip
fa7ece82e6ecaf1c94ed341e8ebff98e64687c68fe113f52cd9a21400302e22f *electron-v34.3.2-darwin-x64-symbols.zip
23938c62257a65a863ed7aa7c7966ba5f257a7d3dc16c78293e826962cc39c5c *electron-v34.3.2-darwin-x64.zip
0547eecf8ab538d74fa854f591ce8b888a3dbb339256d2db3038e7bb2c6dd929 *electron-v34.3.2-linux-arm64-debug.zip
676d0dc2b1c1c85c8b2abbb8cd5376ee22ecdb910493b910d9ae5a998532136a *electron-v34.3.2-linux-arm64-symbols.zip
774e4ccb39d553e5487994a9f8c60774a90f08cdb049ff65f3963fc27c969ff2 *electron-v34.3.2-linux-arm64.zip
0547eecf8ab538d74fa854f591ce8b888a3dbb339256d2db3038e7bb2c6dd929 *electron-v34.3.2-linux-armv7l-debug.zip
ba33bf53fcb35dea568a2795f5b23ecf46c218abe8258946611c72a1f42f716c *electron-v34.3.2-linux-armv7l-symbols.zip
73ae92c8fffb351d3a455569cf57ce9a3f676f42bf61939c613c607fe0fc3bfb *electron-v34.3.2-linux-armv7l.zip
e61a9a69dd7ea6f2687708a8e83516670cdea53c728226e598e2f6f1fad5b77b *electron-v34.3.2-linux-x64-debug.zip
f1a04df7fe67dd1cd29e7b87871525458d2eb24c0cf3b5835a1c56974707562a *electron-v34.3.2-linux-x64-symbols.zip
7b74c0c4fae82e27c7e9cbca13e9763e046113dba8737d3e27de9a0b300ac87e *electron-v34.3.2-linux-x64.zip
8571a6aa83e00925ceb39fdc5a45a9f6b9aa3d92fd84951c6f252ed723aea4ae *electron-v34.3.2-mas-arm64-dsym-snapshot.zip
477410c6f9a6c5eeaedf376058a02c2996fc0a334aa40eeec7d3734c09347f4d *electron-v34.3.2-mas-arm64-dsym.zip
c2e62dcd6630cb51b2d8e2869e74e47d29bda785521cea6e82e546d0fc58aabb *electron-v34.3.2-mas-arm64-symbols.zip
a1698e8546a062fd59b7f8e5507a7f3220fb00b347f2377de83fc9a07f7f3507 *electron-v34.3.2-mas-arm64.zip
741a24ac230a3651dca81d211f9f00b835c428a5ed0c5f67d370d4e88b62f8d6 *electron-v34.3.2-mas-x64-dsym-snapshot.zip
aeff97ec9e5c9e173ac89e38acd94476025c5640d5f27be1e8c2abd54398bab3 *electron-v34.3.2-mas-x64-dsym.zip
9f14b66b1d612ac66697288e8763171c388f7f200854871a5f0ab464a6a921c2 *electron-v34.3.2-mas-x64-symbols.zip
c979d7e7175f1e8e03ca187997d4c156b878189fc3611b347fadebcb16f3e027 *electron-v34.3.2-mas-x64.zip
f43c700641e8220205dd356952e32718d113cf530520c4ed7209b59851eac266 *electron-v34.3.2-win32-arm64-pdb.zip
3ba6e01c99bffac6b5dd3fd6f122ecdb571cf6f675dc5498c65050bd7a382ef8 *electron-v34.3.2-win32-arm64-symbols.zip
c23f84aabb09c24cd2ae759a547fdba4206af19a3bb0f4554a91cd9528648ad0 *electron-v34.3.2-win32-arm64-toolchain-profile.zip
9b9cb65d75a16782088b492f9ef3bb4d27525012b819c12bf29bd27e159d749b *electron-v34.3.2-win32-arm64.zip
1006e7af4c149114b5ebc3497617aaa6cd1bb0b131e0a225fd73709ff308f9c5 *electron-v34.3.2-win32-ia32-pdb.zip
1ecb6430cd04454f08f557c9579163f3552144bfcc0b67b768dad8868b5b891d *electron-v34.3.2-win32-ia32-symbols.zip
c23f84aabb09c24cd2ae759a547fdba4206af19a3bb0f4554a91cd9528648ad0 *electron-v34.3.2-win32-ia32-toolchain-profile.zip
d004fd5f853754001fafaec33e383d1950b30c935ee71b297ec1c9e084355e9b *electron-v34.3.2-win32-ia32.zip
4e0721552fd2f09e9466e88089af8b965f1bfbc4ae00a59aaf6245b1d1efabfd *electron-v34.3.2-win32-x64-pdb.zip
9dea812a7e7cd0fb18e5fed9a99db5531959a068c24d3c0ecedceb644cd3ffa0 *electron-v34.3.2-win32-x64-symbols.zip
c23f84aabb09c24cd2ae759a547fdba4206af19a3bb0f4554a91cd9528648ad0 *electron-v34.3.2-win32-x64-toolchain-profile.zip
1785e161420fb90d2331c26e50bba3413cae9625b7db3c8524ea02ade631efba *electron-v34.3.2-win32-x64.zip
722b304c31ddac58b0083d94a241c5276464f04bd8ea4fcbfd33051d197be103 *electron.d.ts
31ce159b2e47d1de5bc907d8e1c89726b0f2ba530ec2e9d7a8e5c723b1ccf6e0 *ffmpeg-v34.3.2-darwin-arm64.zip
565539bac64a6ee9cf6f188070f520210a1507341718f5dc388ac7c454b1e1d5 *ffmpeg-v34.3.2-darwin-x64.zip
6006ea0f46ab229feb2685be086b0fafd65981e2939dd2218a078459c75ab527 *ffmpeg-v34.3.2-linux-arm64.zip
9404ce2e85df7c40f809f2cf62c7af607de299839fe6b7ae978c3015500abcc8 *ffmpeg-v34.3.2-linux-armv7l.zip
79aec96898b7e2462826780ee0b52b9ab299dc662af333e128a34fd5ddae87f1 *ffmpeg-v34.3.2-linux-x64.zip
9190743c78210574faf5d5ecb82a00f8fa15e5f2253378cb925a99ca9d39961b *ffmpeg-v34.3.2-mas-arm64.zip
48915adcb1a6342efeda896035101300f0432c0304cfb38f2378e98c6309ebae *ffmpeg-v34.3.2-mas-x64.zip
745d5ef786de6d4a720475079836e2fda7b501cfcd255819485a47de5b24b74e *ffmpeg-v34.3.2-win32-arm64.zip
d0d86d60978439dc8ae4a723d4e4c1f853891d596bfd84033440a232fa762e2f *ffmpeg-v34.3.2-win32-ia32.zip
4441539fd8c9cbe79880ff1bade9bdc0c3744c33d7409130af6404e57ee401ff *ffmpeg-v34.3.2-win32-x64.zip
39edd1eeefe881aa75af0e438204e0b1c6e6724e34fa5819109276331c0c2c9a *hunspell_dictionaries.zip
20dd417536e5f4ebc01f480221284c0673729c27b082bc04e2922f16cd571719 *libcxx-objects-v34.3.2-linux-arm64.zip
7e53c5779c04f895f8282c0450ec4a63074d15a0e910e41006cfea133d0288af *libcxx-objects-v34.3.2-linux-armv7l.zip
92e2283c924ab523ffec3ea22513beaab6417f7fc3d570f57d51a1e1ceb7f510 *libcxx-objects-v34.3.2-linux-x64.zip
9bf3c6e8ad68f523fe086fada4148dd04e5bb0b9290d104873e66f2584a5cf50 *libcxx_headers.zip
34e4b44f9c5e08b557a2caed55456ce7690abab910196a783a2a47b58d2b9ac9 *libcxxabi_headers.zip
11f67635e6659f9188198e4086c51b89890b61a22f6c17c99eff35595ee8f51d *mksnapshot-v34.3.2-darwin-arm64.zip
c0add9ef4ac27c73fa043d04b4c9635fd3fd9f5c16d7a03e961864ba05252813 *mksnapshot-v34.3.2-darwin-x64.zip
6262adf86a340d8d28059937b01ef1117b93212e945fddbceea5c18d7e7c64f0 *mksnapshot-v34.3.2-linux-arm64-x64.zip
f7db8ebe91a1cc8d24ef6aad12949a18d8e4975ac296e3e5e9ecd88c9bccb143 *mksnapshot-v34.3.2-linux-armv7l-x64.zip
6642038e86bda362980ff1c8973a404e2b02efdd87de9e35b650fc1e743833da *mksnapshot-v34.3.2-linux-x64.zip
15883bf8e8cd737c3682d1e719d7cbac92f50b525681aac324dca876861dfc7d *mksnapshot-v34.3.2-mas-arm64.zip
4da23a950bfcc377ef21c37d496017ab4c36da03f3b41049ac114042c42608ce *mksnapshot-v34.3.2-mas-x64.zip
fab59573d3c2f9bdf31146a1896d24ac0c51f736aad86d2f3c7ecef13c05a7fd *mksnapshot-v34.3.2-win32-arm64-x64.zip
66f25e07c6f8d5d2009577a129440255a3baf63c929a5b60b2e77cd52e46105b *mksnapshot-v34.3.2-win32-ia32.zip
8168bfbf61882cfac80aed1e71e364e1c7f2fccd11eac298e6abade8b46894ea *mksnapshot-v34.3.2-win32-x64.zip
d725fdbc02fb506692462e123f8feb232984c653b52cdae99773b9b86aec6cc8 *chromedriver-v34.4.0-darwin-arm64.zip
8f040aac9f120dcf653777c1bf54dbd35c8593efa7834e344da9cfb666f26520 *chromedriver-v34.4.0-darwin-x64.zip
7bb480aac5702941afa7972bac6685290ee1e9784ed876a6a34f1a326c0836b1 *chromedriver-v34.4.0-linux-arm64.zip
721860fe261a6d2d45b5f7df8d258b0e96800c4848b4841c1d894366c82ce69c *chromedriver-v34.4.0-linux-armv7l.zip
def0b44b0d16ee00fdf84d45995d61a14526b1ac884b78f37ffec7520dba22e3 *chromedriver-v34.4.0-linux-x64.zip
f95956bbef533da9a654cc7f39c74eff11b95dbaeaadc3de4461c141621065ac *chromedriver-v34.4.0-mas-arm64.zip
8aae7592af5456d52b2adc2168b54448ed2d15a9cea52643096d05fd9ddbc3da *chromedriver-v34.4.0-mas-x64.zip
ab9e05b0cd86bcc17d15b9f080abff458f8d292c463bcd288e85ec39361e5126 *chromedriver-v34.4.0-win32-arm64.zip
f7e1b5397555c31e71204924e154515166d7bfa9cb1d4aae69cd8c13ae21e960 *chromedriver-v34.4.0-win32-ia32.zip
ce186aa0df40a0fdf7f2e67496341fc4a9db8cb371c6d9b48383eea751d0ba97 *chromedriver-v34.4.0-win32-x64.zip
c74db20f5ed9e1dfd3b91af98245ecd8565e54cb22d17097970d82391e2bbf12 *electron-api.json
f5d8e96a06879ce0bbcabdbdf6f678b59d9ae72aec6ab115a7355d44ddc49d70 *electron-v34.4.0-darwin-arm64-dsym-snapshot.zip
3194b1594945b2c54009274f7f4ea3f271d17b5391817e701f4297bff3b25122 *electron-v34.4.0-darwin-arm64-dsym.zip
0752b8d1f2fd8325f81a4d9663b54639249b87a9496c95a57af16e0ed0471743 *electron-v34.4.0-darwin-arm64-symbols.zip
33fd3c5300bda19350478f6e51719187d7ed5ca1830fa89f52598950d56600f2 *electron-v34.4.0-darwin-arm64.zip
85c31a47db272df0d9a4f00e876940ec1d6269171efe765806e5fc9b884cee0d *electron-v34.4.0-darwin-x64-dsym-snapshot.zip
72ce4fe3c6096500d79c7e5f591e253d5b5ccafad9efe484abdc66ddb0a0c5bd *electron-v34.4.0-darwin-x64-dsym.zip
72dd760ce34e86309762927fdf95aa7f797aadf4c74c20dc68cb2d3ecb77b23a *electron-v34.4.0-darwin-x64-symbols.zip
347ffc0beb8913a7fea2a89fc3a75acd2baea82a45df4f52c16e0df38a371374 *electron-v34.4.0-darwin-x64.zip
d79d27ddd0432ab422d6dbdbf5ce169d9f4221503c0a9f7a8dd594641602d9ee *electron-v34.4.0-linux-arm64-debug.zip
76657528fac7bed38c7bae78a3e2c9b8b9a602b2449c98b3a09050cab8cf5b3f *electron-v34.4.0-linux-arm64-symbols.zip
2da3f57accda3aada5dcf351818619b8c0de5709f83c021bba8fbf8002ff4fb8 *electron-v34.4.0-linux-arm64.zip
d79d27ddd0432ab422d6dbdbf5ce169d9f4221503c0a9f7a8dd594641602d9ee *electron-v34.4.0-linux-armv7l-debug.zip
a71fd2dcd64c5d25e9eca06bf0bc3d3b92632b42bb6a040e967572a55359dc9a *electron-v34.4.0-linux-armv7l-symbols.zip
63e0caefd697095900fb04e4c2a733d875a04240d4a3379963c9e353547a4999 *electron-v34.4.0-linux-armv7l.zip
1b36dff25f20c3c80fc497a89210974eeefeb0ec9df7c5c460d65905c1ab6494 *electron-v34.4.0-linux-x64-debug.zip
1c86992eae47ddf7ee0bc2e37abb98c67f9c9835b45664eef39ee94bc7e1a020 *electron-v34.4.0-linux-x64-symbols.zip
f1b9b91282343cd2e4dc3324f57691853713dcc0309dfb5b7bc556778207ff93 *electron-v34.4.0-linux-x64.zip
aceb61924ba0ce36a407e831c1ecdbde976766b193877f7deb1306da0975e7e7 *electron-v34.4.0-mas-arm64-dsym-snapshot.zip
ce5ca634a90d2280bcf69811ffb55262773040a17a30ab1a1fb7c44be216510d *electron-v34.4.0-mas-arm64-dsym.zip
9c3eea6198cb0fa3890e57acf6996385f6d754abbc9f6c0f5a9ff01793a498d7 *electron-v34.4.0-mas-arm64-symbols.zip
5da7499b9dabc4338b7d22fcf994235470e745f9f4f1da3c6be86dd6060c6315 *electron-v34.4.0-mas-arm64.zip
121f8a9e5ea6a65843a7b9e2bb45ccbcb90e83759ec6fe59e2b5cbd4409a439d *electron-v34.4.0-mas-x64-dsym-snapshot.zip
b7602ddcd02da9ae066acc9b4acc1152a920eee7e3863e802b219669e0e84436 *electron-v34.4.0-mas-x64-dsym.zip
873766fbb0ec114dccc5ece6a044abadfd70ddb5eb274fcc83158f17a58c022c *electron-v34.4.0-mas-x64-symbols.zip
518f1c584e2fc7d10d64efabb62eeafb886e5679ab53d3a54d56fa5220df4152 *electron-v34.4.0-mas-x64.zip
52b659fe388ad9fab0a3a0422be5eddc6396184fe960a70b31f4ff7fcdf2a9a5 *electron-v34.4.0-win32-arm64-pdb.zip
71ee022ed36ed96dd8df2102fc4e637331106ca5b7436bf2f30a543fea52d2cf *electron-v34.4.0-win32-arm64-symbols.zip
c23f84aabb09c24cd2ae759a547fdba4206af19a3bb0f4554a91cd9528648ad0 *electron-v34.4.0-win32-arm64-toolchain-profile.zip
0f92877d5a81590ca00709a3850bcdf0203dd84b3519eda65119ad1322138bbe *electron-v34.4.0-win32-arm64.zip
ba26e2f8bb0cf3efd74dafbcc7d89382e044eff460afc05ed199ce296c6e77d7 *electron-v34.4.0-win32-ia32-pdb.zip
a3a52ea3a4c73d4c8724e3e5db6d7b7d017c89479ab45ded4b8e6cb6132ae516 *electron-v34.4.0-win32-ia32-symbols.zip
c23f84aabb09c24cd2ae759a547fdba4206af19a3bb0f4554a91cd9528648ad0 *electron-v34.4.0-win32-ia32-toolchain-profile.zip
a3f2fb6b939c0e5b12fc2e15fdebee06b73e078181ec6ea1fa1d7d7d08202fa0 *electron-v34.4.0-win32-ia32.zip
90dc5412038c455773ca28130e5ab1f2dc2c6769f3996b5888bc4575f2e43e28 *electron-v34.4.0-win32-x64-pdb.zip
951d5fb3870359b0d6f63f516e86f916824c82b1f3d23edf608599abfb7a03e7 *electron-v34.4.0-win32-x64-symbols.zip
c23f84aabb09c24cd2ae759a547fdba4206af19a3bb0f4554a91cd9528648ad0 *electron-v34.4.0-win32-x64-toolchain-profile.zip
359026d5224cb536d1516a1e0052d1a4771f0402e142fe66e007613af80616d1 *electron-v34.4.0-win32-x64.zip
c2e934d5053503f048a217d9ca4507cf597306f024e8878c27dd34931c0941aa *electron.d.ts
b224dedf0b8e39d3ffe17fef4955da89a13133beaf7de739cabc39b04f6c1720 *ffmpeg-v34.4.0-darwin-arm64.zip
6dafde78730e9ad454d1d70a3cb689d81a5cd460ebd1846bba4d6771936022e2 *ffmpeg-v34.4.0-darwin-x64.zip
346101611df565cabcfaa3515b1db3f70d0891ba8f1241074dd09b69e12630d2 *ffmpeg-v34.4.0-linux-arm64.zip
5c77c712ee93bd26706daa78f0651d9b4ba8e4b46a115908f29d2742a2e1b9f0 *ffmpeg-v34.4.0-linux-armv7l.zip
f5ab70d399d528450c9499966e88ce02a368bb8c7dd7ac0676a6628fa29b3f14 *ffmpeg-v34.4.0-linux-x64.zip
fada98cd1915fc8edf185e324784a5bf2d92792f8d486b1e8c329f8590d745b6 *ffmpeg-v34.4.0-mas-arm64.zip
bd8b1b746d72757e35823d69a049272a77c96c692b491e386ff1b407af651369 *ffmpeg-v34.4.0-mas-x64.zip
dad4dc626670a651cb430f25ec99ffca36993d914bbe03ff72cd462b0b5e82ed *ffmpeg-v34.4.0-win32-arm64.zip
dad4dc626670a651cb430f25ec99ffca36993d914bbe03ff72cd462b0b5e82ed *ffmpeg-v34.4.0-win32-ia32.zip
dad4dc626670a651cb430f25ec99ffca36993d914bbe03ff72cd462b0b5e82ed *ffmpeg-v34.4.0-win32-x64.zip
2e440d189ab79dc13d750baaaaa33bfe8da250b1c0856cffe5c21ef80f5eb601 *hunspell_dictionaries.zip
6a030f9082aad0763754bd460b94af6def7c0a3276d4f807aa735bf86fdbfa0e *libcxx-objects-v34.4.0-linux-arm64.zip
fdfab7bd836b7bb5f808c2eaebaa158afed8b3ff99ba855402e9292a576ab375 *libcxx-objects-v34.4.0-linux-armv7l.zip
49aeeb0e9ff18c3624953ec2edbaff6e4e19cb3ee785efd9aee5a30913fa5d50 *libcxx-objects-v34.4.0-linux-x64.zip
bc529e4e7376a78abcd880dd8b43efd4194f431be345b0a4fc24bb2d3046b35a *libcxx_headers.zip
c46a23338c31d465ddb4005e870b955da8886146e5ee92b2bab1c8bccf876a85 *libcxxabi_headers.zip
84826b3794c096e0188a83a1c0aba3deb416e45d647cdcd21148eca78c7d9ee6 *mksnapshot-v34.4.0-darwin-arm64.zip
3125179e9923408670f9f129081f2b443ebd7d701a58814f4fd4b2eb782161f9 *mksnapshot-v34.4.0-darwin-x64.zip
3913c51aa34f122875524cfdbcd096352f8da24c631f301872aa34e119afd9d4 *mksnapshot-v34.4.0-linux-arm64-x64.zip
4790497b0015d0aedb250dbe23adb3727faadc1f057d6b6c9ecfee7820dd8fe1 *mksnapshot-v34.4.0-linux-armv7l-x64.zip
44d61f6526173959e9dcfe7eb4a0bad5af1f8d2fd4131e1a20f4436f5ab96993 *mksnapshot-v34.4.0-linux-x64.zip
6e2ddc05109204fd972bcc4ef57650c5ee75bc5d09e5a75e6c8b36e4ba8214ac *mksnapshot-v34.4.0-mas-arm64.zip
23bb0f4a35f3aec9fcd6cb904957ad3f719699f18883c89ff5ddf4b5ddfdb350 *mksnapshot-v34.4.0-mas-x64.zip
171dc9123255e37b6f28c7b5ad97c2a70030fef554af50b8cf9e65d3a78faf32 *mksnapshot-v34.4.0-win32-arm64-x64.zip
86e7699c642b0ced11530d1a5bc7c0866063d3350f61eef8afe28b06302cec38 *mksnapshot-v34.4.0-win32-ia32.zip
9d2fe4e95aa56f2b398c774c848ba12194baa32c2ff3c872bb981d99a3fe02ea *mksnapshot-v34.4.0-win32-x64.zip
+2 -3
View File
@@ -84,9 +84,8 @@ function nodeModules(destinationExe, destinationPdb, platform) {
'**/*.node',
// Exclude these paths.
// We don't build the prebuilt node files so we don't scan them
'!**/prebuilds/**/*.node',
// These are 3rd party modules that we should ignore
'!**/@parcel/watcher/**/*']))
'!**/prebuilds/**/*.node'
]))
.pipe(gulp.dest(destinationExe));
};
+3
View File
@@ -85,6 +85,9 @@ const CORE_TYPES = [
'SubtleCrypto',
'JsonWebKey',
'MessageEvent',
// node web types
'ReadableStreamDefaultReader',
'DOMException',
];
// Types that are defined in a common layer but are known to be only
// available in native environments should not be allowed in browser
+4
View File
@@ -84,6 +84,10 @@ const CORE_TYPES = [
'SubtleCrypto',
'JsonWebKey',
'MessageEvent',
// node web types
'ReadableStreamDefaultReader',
'DOMException',
];
// Types that are defined in a common layer but are known to be only
-25
View File
@@ -54,16 +54,11 @@ const TS_CONFIG_PATH = path.join(__dirname, '../../', 'src', 'tsconfig.json');
// #############################################################################################
//
const ignored = new Set([
'vs/base/common/arrays.ts',
'vs/platform/extensionManagement/common/extensionsScannerService.ts',
'vs/platform/configuration/common/configurations.ts',
'vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/tokenizer.ts',
'vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/bracketPairsTree.ts',
'vs/editor/common/model/textModelTokens.ts',
'vs/editor/common/model/tokenizationTextModelPart.ts',
'vs/editor/common/core/textEdit.ts',
'vs/workbench/contrib/debug/common/debugStorage.ts',
'vs/workbench/contrib/debug/common/debugModel.ts',
'vs/workbench/api/common/extHostCommands.ts',
'vs/editor/browser/view/viewLayer.ts',
'vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.ts',
@@ -115,11 +110,7 @@ const ignored = new Set([
'vs/editor/browser/widget/multiDiffEditor/multiDiffEditorViewModel.ts',
'vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.ts',
'vs/platform/terminal/common/capabilities/commandDetectionCapability.ts',
'vs/workbench/contrib/testing/common/testExclusions.ts',
'vs/workbench/contrib/testing/common/testResultStorage.ts',
'vs/workbench/services/userDataProfile/browser/snippetsResource.ts',
'vs/platform/quickinput/browser/quickInputController.ts',
'vs/platform/userDataSync/common/abstractSynchronizer.ts',
'vs/workbench/services/authentication/browser/authenticationExtensionsService.ts',
'vs/workbench/services/textMate/browser/backgroundTokenization/textMateWorkerTokenizerController.ts',
'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.ts',
@@ -133,37 +124,21 @@ const ignored = new Set([
'vs/workbench/contrib/search/common/cacheState.ts',
'vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.ts',
'vs/workbench/contrib/search/browser/anythingQuickAccess.ts',
'vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts',
'vs/workbench/contrib/testing/browser/testResultsView/testResultsOutput.ts',
'vs/workbench/contrib/testing/common/testExplorerFilterState.ts',
'vs/workbench/contrib/testing/browser/testResultsView/testResultsTree.ts',
'vs/workbench/contrib/testing/browser/testingOutputPeek.ts',
'vs/workbench/contrib/testing/browser/explorerProjections/index.ts',
'vs/workbench/contrib/testing/browser/testingExplorerFilter.ts',
'vs/workbench/contrib/testing/browser/testingExplorerView.ts',
'vs/workbench/contrib/testing/common/testServiceImpl.ts',
'vs/platform/quickinput/browser/commandsQuickAccess.ts',
'vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.ts',
'vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.ts',
'vs/workbench/contrib/debug/browser/debugMemory.ts',
'vs/workbench/contrib/markers/browser/markersViewActions.ts',
'vs/workbench/contrib/mergeEditor/browser/view/viewZones.ts',
'vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.ts',
'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts',
'vs/workbench/contrib/output/browser/outputServices.ts',
'vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts',
'vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.ts',
'vs/workbench/contrib/editSessions/browser/editSessionsStorageService.ts',
'vs/workbench/contrib/accessibilitySignals/browser/editorTextPropertySignalsContribution.ts',
'vs/workbench/contrib/inlineCompletions/browser/inlineCompletionLanguageStatusBarContribution.ts',
'vs/workbench/services/extensionManagement/common/webExtensionManagementService.ts',
'vs/workbench/contrib/welcomeDialog/browser/welcomeWidget.ts',
'vs/editor/standalone/browser/quickInput/standaloneQuickInputService.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordInsertView.ts',
'vs/platform/terminal/node/ptyService.ts',
'vs/workbench/api/common/extHostLanguageFeatures.ts',
'vs/workbench/api/common/extHostSearch.ts',
'vs/workbench/contrib/testing/test/common/testStubs.ts'
]);
const cancellationToken = {
isCancellationRequested: () => false,
-25
View File
@@ -23,16 +23,11 @@ const TS_CONFIG_PATH = path.join(__dirname, '../../', 'src', 'tsconfig.json');
//
const ignored = new Set([
'vs/base/common/arrays.ts',
'vs/platform/extensionManagement/common/extensionsScannerService.ts',
'vs/platform/configuration/common/configurations.ts',
'vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/tokenizer.ts',
'vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/bracketPairsTree.ts',
'vs/editor/common/model/textModelTokens.ts',
'vs/editor/common/model/tokenizationTextModelPart.ts',
'vs/editor/common/core/textEdit.ts',
'vs/workbench/contrib/debug/common/debugStorage.ts',
'vs/workbench/contrib/debug/common/debugModel.ts',
'vs/workbench/api/common/extHostCommands.ts',
'vs/editor/browser/view/viewLayer.ts',
'vs/editor/browser/controller/editContext/textArea/textAreaEditContextInput.ts',
@@ -84,11 +79,7 @@ const ignored = new Set([
'vs/editor/browser/widget/multiDiffEditor/multiDiffEditorViewModel.ts',
'vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.ts',
'vs/platform/terminal/common/capabilities/commandDetectionCapability.ts',
'vs/workbench/contrib/testing/common/testExclusions.ts',
'vs/workbench/contrib/testing/common/testResultStorage.ts',
'vs/workbench/services/userDataProfile/browser/snippetsResource.ts',
'vs/platform/quickinput/browser/quickInputController.ts',
'vs/platform/userDataSync/common/abstractSynchronizer.ts',
'vs/workbench/services/authentication/browser/authenticationExtensionsService.ts',
'vs/workbench/services/textMate/browser/backgroundTokenization/textMateWorkerTokenizerController.ts',
'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.ts',
@@ -102,37 +93,21 @@ const ignored = new Set([
'vs/workbench/contrib/search/common/cacheState.ts',
'vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.ts',
'vs/workbench/contrib/search/browser/anythingQuickAccess.ts',
'vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts',
'vs/workbench/contrib/testing/browser/testResultsView/testResultsOutput.ts',
'vs/workbench/contrib/testing/common/testExplorerFilterState.ts',
'vs/workbench/contrib/testing/browser/testResultsView/testResultsTree.ts',
'vs/workbench/contrib/testing/browser/testingOutputPeek.ts',
'vs/workbench/contrib/testing/browser/explorerProjections/index.ts',
'vs/workbench/contrib/testing/browser/testingExplorerFilter.ts',
'vs/workbench/contrib/testing/browser/testingExplorerView.ts',
'vs/workbench/contrib/testing/common/testServiceImpl.ts',
'vs/platform/quickinput/browser/commandsQuickAccess.ts',
'vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.ts',
'vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.ts',
'vs/workbench/contrib/debug/browser/debugMemory.ts',
'vs/workbench/contrib/markers/browser/markersViewActions.ts',
'vs/workbench/contrib/mergeEditor/browser/view/viewZones.ts',
'vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.ts',
'vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts',
'vs/workbench/contrib/output/browser/outputServices.ts',
'vs/workbench/contrib/terminalContrib/typeAhead/browser/terminalTypeAheadAddon.ts',
'vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.ts',
'vs/workbench/contrib/editSessions/browser/editSessionsStorageService.ts',
'vs/workbench/contrib/accessibilitySignals/browser/editorTextPropertySignalsContribution.ts',
'vs/workbench/contrib/inlineCompletions/browser/inlineCompletionLanguageStatusBarContribution.ts',
'vs/workbench/services/extensionManagement/common/webExtensionManagementService.ts',
'vs/workbench/contrib/welcomeDialog/browser/welcomeWidget.ts',
'vs/editor/standalone/browser/quickInput/standaloneQuickInputService.ts',
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordInsertView.ts',
'vs/platform/terminal/node/ptyService.ts',
'vs/workbench/api/common/extHostLanguageFeatures.ts',
'vs/workbench/api/common/extHostSearch.ts',
'vs/workbench/contrib/testing/test/common/testStubs.ts'
]);
+2 -1
View File
@@ -141,7 +141,8 @@ function extractEditor(options) {
delete tsConfig.compilerOptions.moduleResolution;
writeOutputFile('tsconfig.json', JSON.stringify(tsConfig, null, '\t'));
[
'vs/loader.js'
'vs/loader.js',
'typings/css.d.ts'
].forEach(copyFile);
}
function transportCSS(module, enqueue, write) {
+2 -1
View File
@@ -118,7 +118,8 @@ export function extractEditor(options: tss.ITreeShakingOptions & { destRoot: str
writeOutputFile('tsconfig.json', JSON.stringify(tsConfig, null, '\t'));
[
'vs/loader.js'
'vs/loader.js',
'typings/css.d.ts'
].forEach(copyFile);
}
+5 -1
View File
@@ -558,10 +558,11 @@ class LanguageServiceHost {
return old;
}
removeScriptSnapshot(filename) {
filename = normalize(filename);
this._log('removeScriptSnapshot', filename);
this._filesInProject.delete(filename);
this._filesAdded.delete(filename);
this._projectVersion++;
filename = normalize(filename);
delete this._fileNameToDeclaredModule[filename];
return delete this._snapshots[filename];
}
@@ -622,6 +623,9 @@ class LanguageServiceHost {
// node module?
return;
}
if (ref.fileName.endsWith('.css')) {
return;
}
const stopDirname = normalize(this.getCurrentDirectory());
let dirname = filename;
let found = false;
+5 -2
View File
@@ -630,10 +630,11 @@ class LanguageServiceHost implements ts.LanguageServiceHost {
}
removeScriptSnapshot(filename: string): boolean {
filename = normalize(filename);
this._log('removeScriptSnapshot', filename);
this._filesInProject.delete(filename);
this._filesAdded.delete(filename);
this._projectVersion++;
filename = normalize(filename);
delete this._fileNameToDeclaredModule[filename];
return delete this._snapshots[filename];
}
@@ -706,7 +707,9 @@ class LanguageServiceHost implements ts.LanguageServiceHost {
// node module?
return;
}
if (ref.fileName.endsWith('.css')) {
return;
}
const stopDirname = normalize(this.getCurrentDirectory());
let dirname = filename;
+14 -11
View File
@@ -1192,12 +1192,13 @@
"dev": true
},
"node_modules/@types/node": {
"version": "20.11.24",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==",
"version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~6.19.2"
}
},
"node_modules/@types/pump": {
@@ -4141,10 +4142,11 @@
}
},
"node_modules/tar-fs": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
"integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.2.tgz",
"integrity": "sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==",
"dev": true,
"license": "MIT",
"optional": true,
"dependencies": {
"chownr": "^1.1.1",
@@ -4385,10 +4387,11 @@
"dev": true
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
},
"node_modules/universal-user-agent": {
"version": "6.0.0",
+2 -2
View File
@@ -528,12 +528,12 @@
"git": {
"name": "electron",
"repositoryUrl": "https://github.com/electron/electron",
"commitHash": "f98501308a973e0aee2414315b426e5de2c03a60"
"commitHash": "9049d01bd688674dd3d69aa0de992f7130df7f93"
}
},
"isOnlyProductionDependency": true,
"license": "MIT",
"version": "34.3.2"
"version": "34.4.0"
},
{
"component": {
+1
View File
@@ -88,6 +88,7 @@ export default tseslint.config(
'local/code-no-unexternalized-strings': 'warn',
'local/code-must-use-super-dispose': 'warn',
'local/code-declare-service-brand': 'warn',
'local/code-no-deep-import-of-internal': ['error', { '.*Internal': true, 'searchExtTypesInternal': false }],
'local/code-layering': [
'warn',
{
@@ -15,7 +15,7 @@ namespace CustomDataChangedNotification {
export type LanguageClientConstructor = (name: string, description: string, clientOptions: LanguageClientOptions) => BaseLanguageClient;
export interface Runtime {
TextDecoder: { new(encoding?: string): { decode(buffer: ArrayBuffer): string } };
TextDecoder: typeof TextDecoder;
fs?: RequestService;
}
@@ -3,7 +3,6 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { TextDecoder } from 'util';
import { ExtensionContext, extensions, l10n } from 'vscode';
import { BaseLanguageClient, LanguageClient, LanguageClientOptions, ServerOptions, TransportKind } from 'vscode-languageclient/node';
import { LanguageClientConstructor, startClient } from '../cssClient';
+10 -8
View File
@@ -20,12 +20,13 @@
}
},
"node_modules/@types/node": {
"version": "20.11.24",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==",
"version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~6.19.2"
}
},
"node_modules/balanced-match": {
@@ -71,10 +72,11 @@
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
},
"node_modules/vscode-jsonrpc": {
"version": "9.0.0-next.7",
+10 -8
View File
@@ -16,19 +16,21 @@
}
},
"node_modules/@types/node": {
"version": "20.11.24",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==",
"version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~6.19.2"
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
}
}
}
+10 -8
View File
@@ -81,12 +81,13 @@
"integrity": "sha1-JEywLHfsLnT3ipvTGCGKvJxQCmE= sha512-ZsZ2I9Vzso3Ho/pjZFsmmZ++FWeEd/txqybHTm4OgaZzdS8V9V/YYWQwg5TC38Z7uLWUV1vavpLLbjJtKubR1A=="
},
"node_modules/@types/node": {
"version": "20.11.24",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==",
"version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~6.19.2"
}
},
"node_modules/@vscode/emmet-helper": {
@@ -151,10 +152,11 @@
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
},
"node_modules/vscode-languageserver-textdocument": {
"version": "1.0.12",
+10 -8
View File
@@ -182,12 +182,13 @@
"dev": true
},
"node_modules/@types/node": {
"version": "20.11.24",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==",
"version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~6.19.2"
}
},
"node_modules/@types/picomatch": {
@@ -383,10 +384,11 @@
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
},
"node_modules/util-deprecate": {
"version": "1.0.2",
+4 -4
View File
@@ -3298,13 +3298,13 @@
"markdownDescription": "%config.commitShortHashLength%",
"scope": "resource"
},
"git.diagnosticsCommitHook.Enabled": {
"git.diagnosticsCommitHook.enabled": {
"type": "boolean",
"default": false,
"markdownDescription": "%config.diagnosticsCommitHook.Enabled%",
"markdownDescription": "%config.diagnosticsCommitHook.enabled%",
"scope": "resource"
},
"git.diagnosticsCommitHook.Sources": {
"git.diagnosticsCommitHook.sources": {
"type": "object",
"additionalProperties": {
"type": "string",
@@ -3319,7 +3319,7 @@
"default": {
"*": "error"
},
"markdownDescription": "%config.diagnosticsCommitHook.Sources%",
"markdownDescription": "%config.diagnosticsCommitHook.sources%",
"scope": "resource"
},
"git.discardUntrackedChangesToTrash": {
+2 -2
View File
@@ -286,8 +286,8 @@
"config.blameStatusBarItem.enabled": "Controls whether to show blame information in the status bar.",
"config.blameStatusBarItem.template": "Template for the blame information status bar item. Supported variables:\n\n* `hash`: Commit hash\n\n* `hashShort`: First N characters of the commit hash according to `#git.commitShortHashLength#`\n\n* `subject`: First line of the commit message\n\n* `authorName`: Author name\n\n* `authorEmail`: Author email\n\n* `authorDate`: Author date\n\n* `authorDateAgo`: Time difference between now and the author date\n\n",
"config.commitShortHashLength": "Controls the length of the commit short hash.",
"config.diagnosticsCommitHook.Enabled": "Controls whether to check for unresolved diagnostics before committing.",
"config.diagnosticsCommitHook.Sources": "Controls the list of sources (**Item**) and the minimum severity (**Value**) to be considered before committing. **Note:** To ignore diagnostics from a particular source, add the source to the list and set the minimum severity to `none`.",
"config.diagnosticsCommitHook.enabled": "Controls whether to check for unresolved diagnostics before committing.",
"config.diagnosticsCommitHook.sources": "Controls the list of sources (**Item**) and the minimum severity (**Value**) to be considered before committing. **Note:** To ignore diagnostics from a particular source, add the source to the list and set the minimum severity to `none`.",
"config.discardUntrackedChangesToTrash": "Controls whether discarding untracked changes moves the file(s) to the Recycle Bin (Windows), Trash (macOS, Linux) instead of deleting them permanently. **Note:** This setting has no effect when connected to a remote or when running in Linux as a snap package.",
"config.showReferenceDetails": "Controls whether to show the details of the last commit for Git refs in the checkout, branch, and tag pickers.",
"submenu.explorer": "Git",
+10 -2
View File
@@ -632,8 +632,8 @@ class CommandErrorOutputTextDocumentContentProvider implements TextDocumentConte
async function evaluateDiagnosticsCommitHook(repository: Repository, options: CommitOptions): Promise<boolean> {
const config = workspace.getConfiguration('git', Uri.file(repository.root));
const enabled = config.get<boolean>('diagnosticsCommitHook.Enabled', false) === true;
const sourceSeverity = config.get<Record<string, DiagnosticSeverityConfig>>('diagnosticsCommitHook.Sources', { '*': 'error' });
const enabled = config.get<boolean>('diagnosticsCommitHook.enabled', false) === true;
const sourceSeverity = config.get<Record<string, DiagnosticSeverityConfig>>('diagnosticsCommitHook.sources', { '*': 'error' });
if (!enabled) {
return true;
@@ -2867,6 +2867,7 @@ export class CommandCenter {
const branchWhitespaceChar = config.get<string>('branchWhitespaceChar')!;
const branchValidationRegex = config.get<string>('branchValidationRegex')!;
const branchRandomNameEnabled = config.get<boolean>('branchRandomName.enable', false);
const refs = await repository.getRefs({ pattern: 'refs/heads' });
if (defaultName) {
return sanitizeBranchName(defaultName, branchWhitespaceChar);
@@ -2884,6 +2885,13 @@ export class CommandCenter {
const getValidationMessage = (name: string): string | InputBoxValidationMessage | undefined => {
const validateName = new RegExp(branchValidationRegex);
const sanitizedName = sanitizeBranchName(name, branchWhitespaceChar);
// Check if branch name already exists
const existingBranch = refs.find(ref => ref.name === sanitizedName);
if (existingBranch) {
return l10n.t('Branch "{0}" already exists', sanitizedName);
}
if (validateName.test(sanitizedName)) {
// If the sanitized name that we will use is different than what is
// in the input box, show an info message to the user informing them
+57 -21
View File
@@ -11,7 +11,7 @@ import { fileURLToPath } from 'url';
import which from 'which';
import { EventEmitter } from 'events';
import * as filetype from 'file-type';
import { assign, groupBy, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent, splitInChunks, Limiter, Versions, isWindows, pathEquals, isMacintosh, isDescendant, relativePath } from './util';
import { assign, groupBy, IDisposable, toDisposable, dispose, mkdirp, readBytes, detectUnicodeEncoding, Encoding, onceEvent, splitInChunks, Limiter, Versions, isWindows, pathEquals, isMacintosh, isDescendant, relativePathWithNoFallback } from './util';
import { CancellationError, CancellationToken, ConfigurationChangeEvent, LogOutputChannel, Progress, Uri, workspace } from 'vscode';
import { Commit as ApiCommit, Ref, RefType, Branch, Remote, ForcePushMode, GitErrorCodes, LogOptions, Change, Status, CommitOptions, RefQuery as ApiRefQuery, InitOptions } from './api/git';
import * as byline from 'byline';
@@ -352,8 +352,8 @@ function sanitizePath(path: string): string {
return path.replace(/^([a-z]):\\/i, (_, letter) => `${letter.toUpperCase()}:\\`);
}
function sanitizeRelativePath(from: string, to: string): string {
return path.isAbsolute(to) ? relativePath(from, to).replace(/\\/g, '/') : to;
function sanitizeRelativePath(path: string): string {
return path.replace(/\\/g, '/');
}
const COMMIT_FORMAT = '%H%n%aN%n%aE%n%at%n%ct%n%P%n%D%n%B';
@@ -1402,7 +1402,7 @@ export class Repository {
}
async buffer(ref: string, filePath: string): Promise<Buffer> {
const relativePath = sanitizeRelativePath(this.repositoryRoot, filePath);
const relativePath = this.sanitizeRelativePath(filePath);
const child = this.stream(['show', '--textconv', `${ref}:${relativePath}`]);
if (!child.stdout) {
@@ -1465,7 +1465,7 @@ export class Repository {
args.push(treeish);
if (path) {
args.push('--', sanitizeRelativePath(this.repositoryRoot, path));
args.push('--', this.sanitizeRelativePath(path));
}
const { stdout } = await this.exec(args);
@@ -1474,7 +1474,7 @@ export class Repository {
async lsfiles(path: string): Promise<LsFilesElement[]> {
const args = ['ls-files', '--stage'];
const relativePath = sanitizeRelativePath(this.repositoryRoot, path);
const relativePath = this.sanitizeRelativePath(path);
if (relativePath) {
args.push('--', relativePath);
@@ -1489,7 +1489,7 @@ export class Repository {
? await this.lstree(ref, undefined, { recursive: true })
: await this.lsfiles(this.repositoryRoot);
const relativePathLowercase = sanitizeRelativePath(this.repositoryRoot, filePath).toLowerCase();
const relativePathLowercase = this.sanitizeRelativePath(filePath).toLowerCase();
const element = elements.find(file => file.file.toLowerCase() === relativePathLowercase);
if (!element) {
@@ -1578,7 +1578,7 @@ export class Repository {
return await this.diffFiles(false);
}
const args = ['diff', '--', sanitizeRelativePath(this.repositoryRoot, path)];
const args = ['diff', '--', this.sanitizeRelativePath(path)];
const result = await this.exec(args);
return result.stdout;
}
@@ -1591,7 +1591,7 @@ export class Repository {
return await this.diffFiles(false, ref);
}
const args = ['diff', ref, '--', sanitizeRelativePath(this.repositoryRoot, path)];
const args = ['diff', ref, '--', this.sanitizeRelativePath(path)];
const result = await this.exec(args);
return result.stdout;
}
@@ -1604,7 +1604,7 @@ export class Repository {
return await this.diffFiles(true);
}
const args = ['diff', '--cached', '--', sanitizeRelativePath(this.repositoryRoot, path)];
const args = ['diff', '--cached', '--', this.sanitizeRelativePath(path)];
const result = await this.exec(args);
return result.stdout;
}
@@ -1617,7 +1617,7 @@ export class Repository {
return await this.diffFiles(true, ref);
}
const args = ['diff', '--cached', ref, '--', sanitizeRelativePath(this.repositoryRoot, path)];
const args = ['diff', '--cached', ref, '--', this.sanitizeRelativePath(path)];
const result = await this.exec(args);
return result.stdout;
}
@@ -1637,7 +1637,7 @@ export class Repository {
return await this.diffFiles(false, range);
}
const args = ['diff', range, '--', sanitizeRelativePath(this.repositoryRoot, path)];
const args = ['diff', range, '--', this.sanitizeRelativePath(path)];
const result = await this.exec(args);
return result.stdout.trim();
@@ -1729,7 +1729,7 @@ export class Repository {
}
if (paths && paths.length) {
for (const chunk of splitInChunks(paths.map(p => sanitizeRelativePath(this.repositoryRoot, p)), MAX_CLI_LENGTH)) {
for (const chunk of splitInChunks(paths.map(p => this.sanitizeRelativePath(p)), MAX_CLI_LENGTH)) {
await this.exec([...args, '--', ...chunk]);
}
} else {
@@ -1744,13 +1744,13 @@ export class Repository {
return;
}
args.push(...paths.map(p => sanitizeRelativePath(this.repositoryRoot, p)));
args.push(...paths.map(p => this.sanitizeRelativePath(p)));
await this.exec(args);
}
async stage(path: string, data: Uint8Array): Promise<void> {
const relativePath = sanitizeRelativePath(this.repositoryRoot, path);
const relativePath = this.sanitizeRelativePath(path);
const child = this.stream(['hash-object', '--stdin', '-w', '--path', relativePath], { stdio: [null, null, null] });
child.stdin!.end(data);
@@ -1800,7 +1800,7 @@ export class Repository {
try {
if (paths && paths.length > 0) {
for (const chunk of splitInChunks(paths.map(p => sanitizeRelativePath(this.repositoryRoot, p)), MAX_CLI_LENGTH)) {
for (const chunk of splitInChunks(paths.map(p => this.sanitizeRelativePath(p)), MAX_CLI_LENGTH)) {
await this.exec([...args, '--', ...chunk]);
}
} else {
@@ -2014,7 +2014,7 @@ export class Repository {
const args = ['clean', '-f', '-q'];
for (const paths of groups) {
for (const chunk of splitInChunks(paths.map(p => sanitizeRelativePath(this.repositoryRoot, p)), MAX_CLI_LENGTH)) {
for (const chunk of splitInChunks(paths.map(p => this.sanitizeRelativePath(p)), MAX_CLI_LENGTH)) {
promises.push(limiter.queue(() => this.exec([...args, '--', ...chunk])));
}
}
@@ -2054,7 +2054,7 @@ export class Repository {
try {
if (paths && paths.length > 0) {
for (const chunk of splitInChunks(paths.map(p => sanitizeRelativePath(this.repositoryRoot, p)), MAX_CLI_LENGTH)) {
for (const chunk of splitInChunks(paths.map(p => this.sanitizeRelativePath(p)), MAX_CLI_LENGTH)) {
await this.exec([...args, '--', ...chunk]);
}
} else {
@@ -2299,7 +2299,7 @@ export class Repository {
async blame(path: string): Promise<string> {
try {
const args = ['blame', '--', sanitizeRelativePath(this.repositoryRoot, path)];
const args = ['blame', '--', this.sanitizeRelativePath(path)];
const result = await this.exec(args);
return result.stdout.trim();
} catch (err) {
@@ -2319,7 +2319,7 @@ export class Repository {
args.push(ref);
}
args.push('--', sanitizeRelativePath(this.repositoryRoot, path));
args.push('--', this.sanitizeRelativePath(path));
const result = await this.exec(args);
@@ -2958,7 +2958,7 @@ export class Repository {
async updateSubmodules(paths: string[]): Promise<void> {
const args = ['submodule', 'update'];
for (const chunk of splitInChunks(paths.map(p => sanitizeRelativePath(this.repositoryRoot, p)), MAX_CLI_LENGTH)) {
for (const chunk of splitInChunks(paths.map(p => this.sanitizeRelativePath(p)), MAX_CLI_LENGTH)) {
await this.exec([...args, '--', ...chunk]);
}
}
@@ -2977,4 +2977,40 @@ export class Repository {
throw err;
}
}
private sanitizeRelativePath(filePath: string): string {
this.logger.trace(`[Git][sanitizeRelativePath] filePath: ${filePath}`);
// Relative path
if (!path.isAbsolute(filePath)) {
filePath = sanitizeRelativePath(filePath);
this.logger.trace(`[Git][sanitizeRelativePath] relativePath (noop): ${filePath}`);
return filePath;
}
let relativePath: string | undefined;
// Repository root real path
if (this.repositoryRootRealPath) {
relativePath = relativePathWithNoFallback(this.repositoryRootRealPath, filePath);
if (relativePath) {
relativePath = sanitizeRelativePath(relativePath);
this.logger.trace(`[Git][sanitizeRelativePath] relativePath (real path): ${relativePath}`);
return relativePath;
}
}
// Repository root path
relativePath = relativePathWithNoFallback(this.repositoryRoot, filePath);
if (relativePath) {
relativePath = sanitizeRelativePath(relativePath);
this.logger.trace(`[Git][sanitizeRelativePath] relativePath (path): ${relativePath}`);
return relativePath;
}
// Fallback to the original path
filePath = sanitizeRelativePath(filePath);
this.logger.trace(`[Git][sanitizeRelativePath] relativePath (fallback): ${filePath}`);
return filePath;
}
}
+5 -2
View File
@@ -328,6 +328,10 @@ export function pathEquals(a: string, b: string): boolean {
* casing which is why we attempt to use substring() before relative().
*/
export function relativePath(from: string, to: string): string {
return relativePathWithNoFallback(from, to) ?? relative(from, to);
}
export function relativePathWithNoFallback(from: string, to: string): string | undefined {
// There are cases in which the `from` path may contain a trailing separator at
// the end (ex: "C:\", "\\server\folder\" (Windows) or "/" (Linux/macOS)) which
// is by design as documented in https://github.com/nodejs/node/issues/1765. If
@@ -340,8 +344,7 @@ export function relativePath(from: string, to: string): string {
return to.substring(from.length);
}
// Fallback to `path.relative`
return relative(from, to);
return undefined;
}
export function* splitInChunks(array: string[], maxChunkLength: number): IterableIterator<string[]> {
@@ -76,7 +76,7 @@ export type LanguageClientConstructor = (name: string, description: string, clie
export const languageServerDescription = l10n.t('HTML Language Server');
export interface Runtime {
TextDecoder: { new(encoding?: string): { decode(buffer: ArrayBuffer): string } };
TextDecoder: typeof TextDecoder;
fileFs?: FileSystemProvider;
telemetry?: TelemetryReporter;
readonly timer: {
@@ -7,7 +7,6 @@ import { getNodeFileFS } from './nodeFs';
import { Disposable, ExtensionContext, l10n } from 'vscode';
import { startClient, LanguageClientConstructor, AsyncDisposable } from '../htmlClient';
import { ServerOptions, TransportKind, LanguageClientOptions, LanguageClient } from 'vscode-languageclient/node';
import { TextDecoder } from 'util';
import * as fs from 'fs';
import TelemetryReporter from '@vscode/extension-telemetry';
+10 -8
View File
@@ -145,12 +145,13 @@
"license": "MIT"
},
"node_modules/@types/node": {
"version": "20.11.24",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==",
"version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~6.19.2"
}
},
"node_modules/@vscode/extension-telemetry": {
@@ -210,10 +211,11 @@
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
},
"node_modules/vscode-jsonrpc": {
"version": "9.0.0-next.7",
+34
View File
@@ -90,6 +90,18 @@
"command": "imagePreview.copyImage",
"title": "%command.copyImage%",
"category": "Image Preview"
},
{
"command": "imagePreview.reopenAsPreview",
"title": "%command.reopenAsPreview%",
"category": "Image Preview",
"icon": "$(preview)"
},
{
"command": "imagePreview.reopenAsText",
"title": "%command.reopenAsText%",
"category": "Image Preview",
"icon": "$(go-to-file)"
}
],
"menus": {
@@ -107,6 +119,16 @@
{
"command": "imagePreview.copyImage",
"when": "false"
},
{
"command": "imagePreview.reopenAsPreview",
"when": "activeEditor == workbench.editors.files.textFileEditor && resourceExtname == '.svg'",
"group": "navigation"
},
{
"command": "imagePreview.reopenAsText",
"when": "activeCustomEditorId == 'imagePreview.previewEditor' && resourceExtname == '.svg'",
"group": "navigation"
}
],
"webview/context": [
@@ -114,6 +136,18 @@
"command": "imagePreview.copyImage",
"when": "webviewId == 'imagePreview.previewEditor'"
}
],
"editor/title": [
{
"command": "imagePreview.reopenAsPreview",
"when": "editorFocus && resourceExtname == '.svg'",
"group": "navigation"
},
{
"command": "imagePreview.reopenAsText",
"when": "activeCustomEditorId == 'imagePreview.previewEditor' && resourceExtname == '.svg'",
"group": "navigation"
}
]
}
},
+3 -1
View File
@@ -8,5 +8,7 @@
"videoPreviewerLoop": "Loop videos over again automatically.",
"command.zoomIn": "Zoom in",
"command.zoomOut": "Zoom out",
"command.copyImage": "Copy"
"command.copyImage": "Copy",
"command.reopenAsPreview": "Reopen as image preview",
"command.reopenAsText": "Reopen as source text"
}
+3 -3
View File
@@ -54,12 +54,12 @@ class AudioPreview extends MediaPreview {
protected async getWebviewContents(): Promise<string> {
const version = Date.now().toString();
const settings = {
src: await this.getResourcePath(this.webviewEditor, this.resource, version),
src: await this.getResourcePath(this._webviewEditor, this._resource, version),
};
const nonce = getNonce();
const cspSource = this.webviewEditor.webview.cspSource;
const cspSource = this._webviewEditor.webview.cspSource;
return /* html */`<!DOCTYPE html>
<html lang="en">
<head>
@@ -104,7 +104,7 @@ class AudioPreview extends MediaPreview {
}
private extensionResource(...parts: string[]) {
return this.webviewEditor.webview.asWebviewUri(vscode.Uri.joinPath(this.extensionRoot, ...parts));
return this._webviewEditor.webview.asWebviewUri(vscode.Uri.joinPath(this.extensionRoot, ...parts));
}
}
@@ -11,7 +11,7 @@ import { SizeStatusBarEntry } from './sizeStatusBarEntry';
import { Scale, ZoomStatusBarEntry } from './zoomStatusBarEntry';
export class PreviewManager implements vscode.CustomReadonlyEditorProvider {
export class ImagePreviewManager implements vscode.CustomReadonlyEditorProvider {
public static readonly viewType = 'imagePreview.previewEditor';
@@ -48,7 +48,20 @@ export class PreviewManager implements vscode.CustomReadonlyEditorProvider {
});
}
public get activePreview() { return this._activePreview; }
public get activePreview() {
return this._activePreview;
}
public getPreviewFor(resource: vscode.Uri, viewColumn?: vscode.ViewColumn): ImagePreview | undefined {
for (const preview of this._previews) {
if (preview.resource.toString() === resource.toString()) {
if (!viewColumn || preview.viewColumn === viewColumn) {
return preview;
}
}
}
return undefined;
}
private setActivePreview(value: ImagePreview | undefined): void {
this._activePreview = value;
@@ -94,12 +107,12 @@ class ImagePreview extends MediaPreview {
this._register(zoomStatusBarEntry.onDidChangeScale(e => {
if (this.previewState === PreviewState.Active) {
this.webviewEditor.webview.postMessage({ type: 'setScale', scale: e.scale });
this._webviewEditor.webview.postMessage({ type: 'setScale', scale: e.scale });
}
}));
this._register(webviewEditor.onDidChangeViewState(() => {
this.webviewEditor.webview.postMessage({ type: 'setActive', value: this.webviewEditor.active });
this._webviewEditor.webview.postMessage({ type: 'setActive', value: this._webviewEditor.active });
}));
this._register(webviewEditor.onDidDispose(() => {
@@ -121,22 +134,26 @@ class ImagePreview extends MediaPreview {
this.zoomStatusBarEntry.hide(this);
}
public get viewColumn() {
return this._webviewEditor.viewColumn;
}
public zoomIn() {
if (this.previewState === PreviewState.Active) {
this.webviewEditor.webview.postMessage({ type: 'zoomIn' });
this._webviewEditor.webview.postMessage({ type: 'zoomIn' });
}
}
public zoomOut() {
if (this.previewState === PreviewState.Active) {
this.webviewEditor.webview.postMessage({ type: 'zoomOut' });
this._webviewEditor.webview.postMessage({ type: 'zoomOut' });
}
}
public copyImage() {
if (this.previewState === PreviewState.Active) {
this.webviewEditor.reveal();
this.webviewEditor.webview.postMessage({ type: 'copyImage' });
this._webviewEditor.reveal();
this._webviewEditor.webview.postMessage({ type: 'copyImage' });
}
}
@@ -147,7 +164,7 @@ class ImagePreview extends MediaPreview {
return;
}
if (this.webviewEditor.active) {
if (this._webviewEditor.active) {
this.sizeStatusBarEntry.show(this, this._imageSize || '');
this.zoomStatusBarEntry.show(this, this._imageZoom || 'fit');
} else {
@@ -155,20 +172,21 @@ class ImagePreview extends MediaPreview {
this.zoomStatusBarEntry.hide(this);
}
}
protected override async render(): Promise<void> {
await super.render();
this.webviewEditor.webview.postMessage({ type: 'setActive', value: this.webviewEditor.active });
this._webviewEditor.webview.postMessage({ type: 'setActive', value: this._webviewEditor.active });
}
protected override async getWebviewContents(): Promise<string> {
const version = Date.now().toString();
const settings = {
src: await this.getResourcePath(this.webviewEditor, this.resource, version),
src: await this.getResourcePath(this._webviewEditor, this._resource, version),
};
const nonce = getNonce();
const cspSource = this.webviewEditor.webview.cspSource;
const cspSource = this._webviewEditor.webview.cspSource;
return /* html */`<!DOCTYPE html>
<html lang="en">
<head>
@@ -212,7 +230,12 @@ class ImagePreview extends MediaPreview {
}
private extensionResource(...parts: string[]) {
return this.webviewEditor.webview.asWebviewUri(vscode.Uri.joinPath(this.extensionRoot, ...parts));
return this._webviewEditor.webview.asWebviewUri(vscode.Uri.joinPath(this.extensionRoot, ...parts));
}
public async reopenAsText() {
await vscode.commands.executeCommand('reopenActiveEditorWith', 'default');
this._webviewEditor.dispose();
}
}
@@ -226,9 +249,9 @@ export function registerImagePreviewSupport(context: vscode.ExtensionContext, bi
const zoomStatusBarEntry = new ZoomStatusBarEntry();
disposables.push(zoomStatusBarEntry);
const previewManager = new PreviewManager(context.extensionUri, sizeStatusBarEntry, binarySizeStatusBarEntry, zoomStatusBarEntry);
const previewManager = new ImagePreviewManager(context.extensionUri, sizeStatusBarEntry, binarySizeStatusBarEntry, zoomStatusBarEntry);
disposables.push(vscode.window.registerCustomEditorProvider(PreviewManager.viewType, previewManager, {
disposables.push(vscode.window.registerCustomEditorProvider(ImagePreviewManager.viewType, previewManager, {
supportsMultipleEditorsPerDocument: true,
}));
@@ -244,5 +267,14 @@ export function registerImagePreviewSupport(context: vscode.ExtensionContext, bi
previewManager.activePreview?.copyImage();
}));
disposables.push(vscode.commands.registerCommand('imagePreview.reopenAsText', async () => {
return previewManager.activePreview?.reopenAsText();
}));
disposables.push(vscode.commands.registerCommand('imagePreview.reopenAsPreview', async () => {
await vscode.commands.executeCommand('reopenActiveEditorWith', ImagePreviewManager.viewType);
}));
return vscode.Disposable.from(...disposables);
}
+23 -19
View File
@@ -8,8 +8,8 @@ import { Utils } from 'vscode-uri';
import { BinarySizeStatusBarEntry } from './binarySizeStatusBarEntry';
import { Disposable } from './util/dispose';
export function reopenAsText(resource: vscode.Uri, viewColumn: vscode.ViewColumn | undefined) {
vscode.commands.executeCommand('vscode.openWith', resource, 'default', viewColumn);
export async function reopenAsText(resource: vscode.Uri, viewColumn: vscode.ViewColumn | undefined): Promise<void> {
await vscode.commands.executeCommand('vscode.openWith', resource, 'default', viewColumn);
}
export const enum PreviewState {
@@ -25,52 +25,56 @@ export abstract class MediaPreview extends Disposable {
constructor(
extensionRoot: vscode.Uri,
protected readonly resource: vscode.Uri,
protected readonly webviewEditor: vscode.WebviewPanel,
private readonly binarySizeStatusBarEntry: BinarySizeStatusBarEntry,
protected readonly _resource: vscode.Uri,
protected readonly _webviewEditor: vscode.WebviewPanel,
private readonly _binarySizeStatusBarEntry: BinarySizeStatusBarEntry,
) {
super();
webviewEditor.webview.options = {
_webviewEditor.webview.options = {
enableScripts: true,
enableForms: false,
localResourceRoots: [
Utils.dirname(resource),
Utils.dirname(_resource),
extensionRoot,
]
};
this._register(webviewEditor.onDidChangeViewState(() => {
this._register(_webviewEditor.onDidChangeViewState(() => {
this.updateState();
}));
this._register(webviewEditor.onDidDispose(() => {
this._register(_webviewEditor.onDidDispose(() => {
this.previewState = PreviewState.Disposed;
this.dispose();
}));
const watcher = this._register(vscode.workspace.createFileSystemWatcher(new vscode.RelativePattern(resource, '*')));
const watcher = this._register(vscode.workspace.createFileSystemWatcher(new vscode.RelativePattern(_resource, '*')));
this._register(watcher.onDidChange(e => {
if (e.toString() === this.resource.toString()) {
if (e.toString() === this._resource.toString()) {
this.updateBinarySize();
this.render();
}
}));
this._register(watcher.onDidDelete(e => {
if (e.toString() === this.resource.toString()) {
this.webviewEditor.dispose();
if (e.toString() === this._resource.toString()) {
this._webviewEditor.dispose();
}
}));
}
public override dispose() {
super.dispose();
this.binarySizeStatusBarEntry.hide(this);
this._binarySizeStatusBarEntry.hide(this);
}
public get resource() {
return this._resource;
}
protected updateBinarySize() {
vscode.workspace.fs.stat(this.resource).then(({ size }) => {
vscode.workspace.fs.stat(this._resource).then(({ size }) => {
this._binarySize = size;
this.updateState();
});
@@ -86,7 +90,7 @@ export abstract class MediaPreview extends Disposable {
return;
}
this.webviewEditor.webview.html = content;
this._webviewEditor.webview.html = content;
}
protected abstract getWebviewContents(): Promise<string>;
@@ -96,11 +100,11 @@ export abstract class MediaPreview extends Disposable {
return;
}
if (this.webviewEditor.active) {
if (this._webviewEditor.active) {
this.previewState = PreviewState.Active;
this.binarySizeStatusBarEntry.show(this, this._binarySize);
this._binarySizeStatusBarEntry.show(this, this._binarySize);
} else {
this.binarySizeStatusBarEntry.hide(this);
this._binarySizeStatusBarEntry.hide(this);
this.previewState = PreviewState.Visible;
}
}
+3 -3
View File
@@ -56,14 +56,14 @@ class VideoPreview extends MediaPreview {
const version = Date.now().toString();
const configurations = vscode.workspace.getConfiguration('mediaPreview.video');
const settings = {
src: await this.getResourcePath(this.webviewEditor, this.resource, version),
src: await this.getResourcePath(this._webviewEditor, this._resource, version),
autoplay: configurations.get('autoPlay'),
loop: configurations.get('loop'),
};
const nonce = getNonce();
const cspSource = this.webviewEditor.webview.cspSource;
const cspSource = this._webviewEditor.webview.cspSource;
return /* html */`<!DOCTYPE html>
<html lang="en">
<head>
@@ -108,7 +108,7 @@ class VideoPreview extends MediaPreview {
}
private extensionResource(...parts: string[]) {
return this.webviewEditor.webview.asWebviewUri(vscode.Uri.joinPath(this.extensionRoot, ...parts));
return this._webviewEditor.webview.asWebviewUri(vscode.Uri.joinPath(this.extensionRoot, ...parts));
}
}
+10 -8
View File
@@ -143,12 +143,13 @@
"license": "MIT"
},
"node_modules/@types/node": {
"version": "20.11.24",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==",
"version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~6.19.2"
}
},
"node_modules/@vscode/extension-telemetry": {
@@ -166,10 +167,11 @@
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
}
}
}
+10 -8
View File
@@ -202,12 +202,13 @@
"license": "MIT"
},
"node_modules/@types/node": {
"version": "20.11.24",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==",
"version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~6.19.2"
}
},
"node_modules/@types/node-fetch": {
@@ -456,10 +457,11 @@
"integrity": "sha512-V+uqV66BOQnWxvI6HjDnE4VkInmYZUQ4dgB7gzaDyFyFSK1i1nF/j7DpS9UbQAgV9NaF1XpcyuavnM1qOeiEIg=="
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
},
"node_modules/uuid": {
"version": "8.3.2",
@@ -551,7 +551,7 @@ export class AzureActiveDirectoryService {
throw e;
}
const id = `${claims.tid}/${(claims.oid ?? (claims.altsecid ?? '' + claims.ipd ?? ''))}`;
const id = `${claims.tid}/${(claims.oid ?? (claims.altsecid ?? '' + claims.ipd))}`;
const sessionId = existingId || `${id}/${randomUUID()}`;
this._logger.trace(`[${scopeData.scopeStr}] '${sessionId}' Token response parsed successfully.`);
return {
@@ -8,3 +8,4 @@ package-lock.json
fixtures/**
scripts/**
testWorkspace/**
cgmanifest.json
@@ -3,12 +3,12 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { commonOptions, extensionManagementOptions, troubleshootingOptions, globalTunnelOptions, codeTunnelSubcommands, extTunnelSubcommand, codeTunnelOptions } from './code';
import codeTunnelCompletionSpec, { codeTunnelSpecOptions } from './code-tunnel';
import codeTunnelCompletionSpec from './code-tunnel';
const codeTunnelInsidersCompletionSpec: Fig.Spec = {
...codeTunnelCompletionSpec,
name: 'code-tunnel-insiders',
description: 'Create a tunnel that\'s accessible on vscode.dev from anywhere, with insider features.',
description: 'Visual Studio Code Insiders',
subcommands: [...codeTunnelSubcommands, extTunnelSubcommand],
options: [
...commonOptions,
@@ -16,7 +16,6 @@ const codeTunnelInsidersCompletionSpec: Fig.Spec = {
...troubleshootingOptions('code-tunnel-insiders'),
...globalTunnelOptions,
...codeTunnelOptions,
...codeTunnelSpecOptions
]
};
@@ -77,7 +77,6 @@ export const codeTunnelSpecOptions: Fig.Option[] = [
const codeTunnelCompletionSpec: Fig.Spec = {
...code,
name: 'code-tunnel',
description: 'Create a tunnel that\'s accessible on vscode.dev from anywhere.',
subcommands: [
...codeTunnelSubcommands,
extTunnelSubcommand
@@ -87,7 +86,7 @@ const codeTunnelCompletionSpec: Fig.Spec = {
...extensionManagementOptions('code-tunnel'),
...troubleshootingOptions('code-tunnel'),
...globalTunnelOptions,
...codeTunnelOptions
...codeTunnelOptions,
]
};
@@ -546,11 +546,6 @@ export const codeTunnelSubcommands = [
name: 'name',
},
},
{
name: 'status',
description: 'Print process usage and diagnostics information',
options: [...globalTunnelOptions, ...tunnelHelpOptions],
},
{
name: 'unregister',
description: 'Remove this machine\'s association with the port forwarding service',
@@ -769,11 +764,12 @@ export const codeTunnelSubcommands = [
{
name: 'status',
description: 'Print process usage and diagnostics information',
options: [...globalTunnelOptions, ...tunnelHelpOptions],
},
{
name: 'version',
description: `Changes the version of the editor you're using`,
options: globalTunnelOptions
options: [...globalTunnelOptions, ...tunnelHelpOptions],
},
{
name: 'serve-web',
@@ -275,16 +275,15 @@ export async function getCompletionItemsFromSpecs(
vscode.TerminalCompletionItemKind.Method
));
labels.add(commandTextLabel);
} else {
}
else {
const existingItem = items.find(i => (typeof i.label === 'string' ? i.label : i.label.label) === commandTextLabel);
if (!existingItem) {
continue;
}
const preferredItem = compareItems(existingItem, command);
if (preferredItem) {
preferredItem.kind = vscode.TerminalCompletionItemKind.Method;
items.splice(items.indexOf(existingItem), 1, preferredItem);
}
existingItem.documentation ??= command.documentation;
existingItem.detail ??= command.detail;
}
}
filesRequested = true;
@@ -306,20 +305,6 @@ export async function getCompletionItemsFromSpecs(
return { items, filesRequested, foldersRequested, fileExtensions, cwd };
}
function compareItems(existingItem: vscode.TerminalCompletionItem, command: ICompletionResource): vscode.TerminalCompletionItem | undefined {
let score = typeof command.label === 'object' ? (command.label.detail !== undefined ? 1 : 0) : 0;
score += typeof command.label === 'object' ? (command.label.description !== undefined ? 2 : 0) : 0;
score += command.documentation ? typeof command.documentation === 'string' ? 2 : 3 : 0;
if (score > 0) {
score -= typeof existingItem.label === 'object' ? (existingItem.label.detail !== undefined ? 1 : 0) : 0;
score -= typeof existingItem.label === 'object' ? (existingItem.label.description !== undefined ? 2 : 0) : 0;
score -= existingItem.documentation ? typeof existingItem.documentation === 'string' ? 2 : 3 : 0;
if (score >= 0) {
return { ...command, replacementIndex: existingItem.replacementIndex, replacementLength: existingItem.replacementLength };
}
}
}
function getEnvAsRecord(shellIntegrationEnv: ITerminalEnvironment): Record<string, string> {
const env: Record<string, string> = {};
for (const [key, value] of Object.entries(shellIntegrationEnv ?? process.env)) {
@@ -4,8 +4,9 @@
*--------------------------------------------------------------------------------------------*/
import codeInsidersCompletionSpec from '../../completions/code-insiders';
import codeTunnelInsidersCompletionSpec from '../../completions/code-tunnel-insiders';
import type { ISuiteSpec } from '../helpers';
import { createCodeTestSpecs } from './code.test';
import { createCodeTestSpecs, createCodeTunnelTestSpecs } from './code.test';
export const codeInsidersTestSuite: ISuiteSpec = {
name: 'code-insiders',
@@ -13,3 +14,11 @@ export const codeInsidersTestSuite: ISuiteSpec = {
availableCommands: 'code-insiders',
testSpecs: createCodeTestSpecs('code-insiders')
};
export const codeTunnelInsidersTestSuite: ISuiteSpec = {
name: 'code-tunnel-insiders',
completionSpecs: codeTunnelInsidersCompletionSpec,
availableCommands: 'code-tunnel-insiders',
testSpecs: createCodeTunnelTestSpecs('code-tunnel-insiders')
};
@@ -7,6 +7,7 @@ import 'mocha';
import codeCompletionSpec from '../../completions/code';
import { testPaths, type ISuiteSpec, type ITestSpec } from '../helpers';
import codeInsidersCompletionSpec from '../../completions/code-insiders';
import codeTunnelCompletionSpec from '../../completions/code-tunnel';
export const codeSpecOptionsAndSubcommands = [
'-a <folder>',
@@ -104,9 +105,171 @@ export function createCodeTestSpecs(executable: string): ITestSpec[] {
];
}
export function createCodeTunnelTestSpecs(executable: string): ITestSpec[] {
const subcommandAndFlags: string[] = [
'-',
'--add <folder>',
'--category <category>',
'--cli-data-dir <cli_data_dir>',
'--diff <file> <file>',
'--disable-extension <extension-id>',
'--disable-extensions',
'--disable-gpu',
'--enable-proposed-api',
'--extensions-dir [<extensions_dir>]',
'--goto <file:line[:character]>',
'--help',
'--inspect-brk-extensions <port>',
'--inspect-extensions <port>',
'--install-extension <extension-id[@version] | path-to-vsix>',
'--list-extensions',
'--locale <locale>',
'--locate-shell-integration-path <shell>',
'--log [<log>]',
'--max-memory <memory>',
'--merge <path1> <path2> <base> <result>',
'--new-window',
'--pre-release',
'--prof-startup',
'--profile <settingsProfileName>',
'--reuse-window',
'--show-versions',
'--status',
'--sync <sync>',
'--telemetry',
'--uninstall-extension <extension-id>',
'--use-version [<use_version>]',
'--user-data-dir [<user_data_dir>]',
'--verbose',
'--version',
'--wait',
'-a <folder>',
'-d <file> <file>',
'-g <file:line[:character]>',
'-h',
'-m <path1> <path2> <base> <result>',
'-n',
'-r',
'-s',
'-v',
'-w',
'ext',
'help',
'serve-web',
'status',
'tunnel',
'version'
];
const tunnelSubcommandsAndFlags: string[] = [
'--accept-server-license-terms',
'--cli-data-dir <cli_data_dir>',
'--extensions-dir [<extensions_dir>]',
'--help',
'--install-extension [<install_extension>]',
'--log [<log>]',
'--name [<name>]',
'--no-sleep',
'--random-name',
'--server-data-dir [<server_data_dir>]',
'--use-version [<use_version>]',
'--user-data-dir [<user_data_dir>]',
'--verbose',
'-h',
'help',
'kill',
'prune',
'rename <name>',
'restart',
'service',
'status',
'unregister',
'user',
];
const helpSubcommands: string[] = [
'help',
'kill',
'prune',
'rename',
'restart',
'service',
'status',
'unregister',
'user'
];
const serveWebSubcommandsAndFlags: string[] = [
'--accept-server-license-terms',
'--cli-data-dir <cli_data_dir>',
'--connection-token [<connection_token>]',
'--connection-token-file [<connection_token_file>]',
'--help',
'--host [<host>]',
'--log [<log>]',
'--port [<port>]',
'--server-base-path [<server_base_path>]',
'--server-data-dir [<server_data_dir>]',
'--socket-path [<socket_path>]',
'--verbose',
'--without-connection-token',
'-h'
];
const extSubcommands: string[] = [
'install [<ext-id | id>]',
'list',
'uninstall [<ext-id | id>]',
'update'
];
const commonFlags: string[] = [
'--cli-data-dir <cli_data_dir>',
'--log [<log>]',
'--verbose',
'--help',
'-h'
];
const typingTests: ITestSpec[] = [];
for (let i = 1; i < executable.length; i++) {
const expectedCompletions = [{ label: executable, description: executable === codeCompletionSpec.name || executable === codeTunnelCompletionSpec.name ? (codeCompletionSpec as any).description : (codeInsidersCompletionSpec as any).description }];
const input = `${executable.slice(0, i)}|`;
typingTests.push({ input, expectedCompletions, expectedResourceRequests: input.endsWith(' ') ? undefined : { type: 'both', cwd: testPaths.cwd } });
}
return [
...typingTests,
{ input: `${executable} |`, expectedCompletions: subcommandAndFlags, expectedResourceRequests: { type: 'both', cwd: testPaths.cwd } },
{ input: `${executable} tunnel |`, expectedCompletions: tunnelSubcommandsAndFlags },
{ input: `${executable} tunnel user |`, expectedCompletions: ['help', 'login', 'logout', 'show'] },
{ input: `${executable} tunnel prune |`, expectedCompletions: [...commonFlags] },
{ input: `${executable} tunnel kill |`, expectedCompletions: [...commonFlags] },
{ input: `${executable} tunnel restart |`, expectedCompletions: [...commonFlags] },
{ input: `${executable} tunnel status |`, expectedCompletions: [...commonFlags] },
{ input: `${executable} tunnel rename |`, expectedCompletions: [...commonFlags] },
{ input: `${executable} tunnel unregister |`, expectedCompletions: [...commonFlags] },
{ input: `${executable} tunnel service |`, expectedCompletions: [...commonFlags, 'help', 'install', 'log', 'uninstall'] },
{ input: `${executable} tunnel help |`, expectedCompletions: helpSubcommands },
{ input: `${executable} serve-web |`, expectedCompletions: serveWebSubcommandsAndFlags },
{ input: `${executable} ext |`, expectedCompletions: extSubcommands },
{ input: `${executable} ext list |`, expectedCompletions: [...commonFlags, '--category [<category>]', '--show-versions'] },
{ input: `${executable} ext install |`, expectedCompletions: [...commonFlags, '--pre-release', '--donot-include-pack-and-dependencies', '--force'] },
{ input: `${executable} ext update |`, expectedCompletions: [...commonFlags] },
{ input: `${executable} status |`, expectedCompletions: commonFlags },
{ input: `${executable} version |`, expectedCompletions: commonFlags },
];
}
export const codeTestSuite: ISuiteSpec = {
name: 'code',
completionSpecs: codeCompletionSpec,
availableCommands: 'code',
testSpecs: createCodeTestSpecs('code')
};
export const codeTunnelTestSuite: ISuiteSpec = {
name: 'code-tunnel',
completionSpecs: codeTunnelCompletionSpec,
availableCommands: 'code-tunnel',
testSpecs: createCodeTunnelTestSpecs('code-tunnel')
};
@@ -9,9 +9,9 @@ import { basename } from 'path';
import { asArray, getCompletionItemsFromSpecs } from '../terminalSuggestMain';
import { getTokenType } from '../tokens';
import { cdTestSuiteSpec as cdTestSuite } from './completions/cd.test';
import { codeSpecOptionsAndSubcommands, codeTestSuite } from './completions/code.test';
import { codeSpecOptionsAndSubcommands, codeTestSuite, codeTunnelTestSuite } from './completions/code.test';
import { testPaths, type ISuiteSpec } from './helpers';
import { codeInsidersTestSuite } from './completions/code-insiders.test';
import { codeInsidersTestSuite, codeTunnelInsidersTestSuite } from './completions/code-insiders.test';
import { lsTestSuiteSpec } from './completions/upstream/ls.test';
import { echoTestSuiteSpec } from './completions/upstream/echo.test';
import { mkdirTestSuiteSpec } from './completions/upstream/mkdir.test';
@@ -43,6 +43,8 @@ const testSpecs2: ISuiteSpec[] = [
cdTestSuite,
codeTestSuite,
codeInsidersTestSuite,
codeTunnelTestSuite,
codeTunnelInsidersTestSuite,
// completions/upstream/
echoTestSuiteSpec,
+10 -8
View File
@@ -16,19 +16,21 @@
}
},
"node_modules/@types/node": {
"version": "20.11.24",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==",
"version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~6.19.2"
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
}
}
}
+10 -8
View File
@@ -152,12 +152,13 @@
"license": "MIT"
},
"node_modules/@types/node": {
"version": "20.11.24",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==",
"version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~6.19.2"
}
},
"node_modules/@types/semver": {
@@ -257,10 +258,11 @@
"integrity": "sha512-V+uqV66BOQnWxvI6HjDnE4VkInmYZUQ4dgB7gzaDyFyFSK1i1nF/j7DpS9UbQAgV9NaF1XpcyuavnM1qOeiEIg=="
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
},
"node_modules/vscode-tas-client": {
"version": "0.1.84",
+10 -8
View File
@@ -26,12 +26,13 @@
"dev": true
},
"node_modules/@types/node": {
"version": "20.11.24",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==",
"version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~6.19.2"
}
},
"node_modules/@types/node-forge": {
@@ -216,10 +217,11 @@
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
},
"node_modules/wrap-ansi": {
"version": "7.0.0",
+1 -1
View File
@@ -24,7 +24,7 @@ export async function createRandomFile(contents: string | Uint8Array = '', dir:
} else {
fakeFile = vscode.Uri.parse(`${testFs.scheme}:/${rndName() + ext}`);
}
testFs.writeFile(fakeFile, Buffer.from(contents), { create: true, overwrite: true });
testFs.writeFile(fakeFile, typeof contents === 'string' ? Buffer.from(contents) : Buffer.from(contents), { create: true, overwrite: true });
return fakeFile;
}
+10 -8
View File
@@ -16,19 +16,21 @@
}
},
"node_modules/@types/node": {
"version": "20.11.24",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz",
"integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==",
"version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~6.19.2"
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
}
}
}
+182 -289
View File
@@ -17,7 +17,7 @@
"@types/semver": "^7.5.8",
"@vscode/deviceid": "^0.1.1",
"@vscode/iconv-lite-umd": "0.7.0",
"@vscode/policy-watcher": "^1.3.0",
"@vscode/policy-watcher": "^1.3.1",
"@vscode/proxy-agent": "^0.32.0",
"@vscode/ripgrep": "^1.15.11",
"@vscode/spdlog": "^0.15.0",
@@ -97,7 +97,7 @@
"cssnano": "^6.0.3",
"debounce": "^1.0.0",
"deemon": "^1.8.0",
"electron": "34.3.2",
"electron": "34.4.0",
"eslint": "^9.11.1",
"eslint-formatter-compact": "^8.40.0",
"eslint-plugin-header": "3.1.1",
@@ -155,7 +155,7 @@
"ts-node": "^10.9.1",
"tsec": "0.2.7",
"tslib": "^2.6.3",
"typescript": "^5.8.0-dev.20250207",
"typescript": "^5.9.0-dev.20250324",
"typescript-eslint": "^8.8.0",
"util": "^0.12.4",
"webpack": "^5.94.0",
@@ -247,29 +247,31 @@
}
},
"node_modules/@azure/core-http": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.2.2.tgz",
"integrity": "sha512-V1DdoO9V/sFimKpdWoNBgsE+QUjQgpXYnxrTdUp5RyhsTJjvEVn/HKmTQXIHuLUUo6IyIWj+B+Dg4VaXse9dIA==",
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/@azure/core-http/-/core-http-2.3.2.tgz",
"integrity": "sha512-Z4dfbglV9kNZO177CNx4bo5ekFuYwwsvjLiKdZI4r84bYGv3irrbQz7JC3/rUfFH2l4T/W6OFleJaa2X0IaQqw==",
"deprecated": "This package is no longer supported. Please migrate to use @azure/core-rest-pipeline",
"dev": true,
"license": "MIT",
"dependencies": {
"@azure/abort-controller": "^1.0.0",
"@azure/core-asynciterator-polyfill": "^1.0.0",
"@azure/core-auth": "^1.3.0",
"@azure/core-tracing": "1.0.0-preview.13",
"@azure/core-util": "^1.1.1",
"@azure/logger": "^1.0.0",
"@types/node-fetch": "^2.5.0",
"@types/tunnel": "^0.0.3",
"form-data": "^4.0.0",
"node-fetch": "^2.6.0",
"node-fetch": "^2.6.7",
"process": "^0.11.10",
"tough-cookie": "^4.0.0",
"tslib": "^2.2.0",
"tunnel": "^0.0.6",
"uuid": "^8.3.0",
"xml2js": "^0.4.19"
"xml2js": "^0.5.0"
},
"engines": {
"node": ">=12.0.0"
"node": ">=14.0.0"
}
},
"node_modules/@azure/core-http/node_modules/@azure/abort-controller": {
@@ -306,28 +308,6 @@
"uuid": "dist/bin/uuid"
}
},
"node_modules/@azure/core-http/node_modules/xml2js": {
"version": "0.4.23",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
"integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
"dev": true,
"dependencies": {
"sax": ">=0.6.0",
"xmlbuilder": "~11.0.0"
},
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/@azure/core-http/node_modules/xmlbuilder": {
"version": "11.0.1",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
"integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==",
"dev": true,
"engines": {
"node": ">=4.0"
}
},
"node_modules/@azure/core-lro": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/@azure/core-lro/-/core-lro-2.2.1.tgz",
@@ -482,80 +462,20 @@
}
},
"node_modules/@babel/code-frame": {
"version": "7.22.13",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz",
"integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==",
"version": "7.26.2",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz",
"integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/highlight": "^7.22.13",
"chalk": "^2.4.2"
"@babel/helper-validator-identifier": "^7.25.9",
"js-tokens": "^4.0.0",
"picocolors": "^1.0.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/code-frame/node_modules/ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"dependencies": {
"color-convert": "^1.9.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/@babel/code-frame/node_modules/chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"dependencies": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/@babel/code-frame/node_modules/color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"dependencies": {
"color-name": "1.1.3"
}
},
"node_modules/@babel/code-frame/node_modules/color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
"dev": true
},
"node_modules/@babel/code-frame/node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"dev": true,
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/@babel/code-frame/node_modules/supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/@babel/compat-data": {
"version": "7.18.8",
"resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.8.tgz",
@@ -750,19 +670,21 @@
}
},
"node_modules/@babel/helper-string-parser": {
"version": "7.22.5",
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",
"integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==",
"version": "7.25.9",
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz",
"integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/helper-validator-identifier": {
"version": "7.22.20",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
"integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
"version": "7.25.9",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz",
"integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=6.9.0"
}
@@ -777,100 +699,28 @@
}
},
"node_modules/@babel/helpers": {
"version": "7.18.9",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.9.tgz",
"integrity": "sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ==",
"version": "7.27.0",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.0.tgz",
"integrity": "sha512-U5eyP/CTFPuNE3qk+WZMxFkp/4zUzdceQlfzf7DdGdhp+Fezd7HD+i8Y24ZuTMKX3wQBld449jijbGq6OdGNQg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/template": "^7.18.6",
"@babel/traverse": "^7.18.9",
"@babel/types": "^7.18.9"
"@babel/template": "^7.27.0",
"@babel/types": "^7.27.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/highlight": {
"version": "7.22.20",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz",
"integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==",
"dev": true,
"dependencies": {
"@babel/helper-validator-identifier": "^7.22.20",
"chalk": "^2.4.2",
"js-tokens": "^4.0.0"
},
"engines": {
"node": ">=6.9.0"
}
},
"node_modules/@babel/highlight/node_modules/ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"dependencies": {
"color-convert": "^1.9.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/@babel/highlight/node_modules/chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"dependencies": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/@babel/highlight/node_modules/color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"dependencies": {
"color-name": "1.1.3"
}
},
"node_modules/@babel/highlight/node_modules/color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
"dev": true
},
"node_modules/@babel/highlight/node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
"dev": true,
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/@babel/highlight/node_modules/supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"dependencies": {
"has-flag": "^3.0.0"
},
"engines": {
"node": ">=4"
}
},
"node_modules/@babel/parser": {
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz",
"integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==",
"version": "7.27.0",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.0.tgz",
"integrity": "sha512-iaepho73/2Pz7w2eMS0Q5f83+0RKI7i4xmiYeBmDzfRVbQtTOG7Ts0S4HzJVsTMGI9keU8rNfuZr8DKfSt7Yyg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/types": "^7.27.0"
},
"bin": {
"parser": "bin/babel-parser.js"
},
@@ -879,14 +729,15 @@
}
},
"node_modules/@babel/template": {
"version": "7.22.15",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",
"integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",
"version": "7.27.0",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.0.tgz",
"integrity": "sha512-2ncevenBqXI6qRMukPlXwHKHchC7RyMuu4xv5JBXRfOGVcTy1mXCD12qrp7Jsoxll1EV3+9sE4GugBVRjT2jFA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/code-frame": "^7.22.13",
"@babel/parser": "^7.22.15",
"@babel/types": "^7.22.15"
"@babel/code-frame": "^7.26.2",
"@babel/parser": "^7.27.0",
"@babel/types": "^7.27.0"
},
"engines": {
"node": ">=6.9.0"
@@ -923,14 +774,14 @@
}
},
"node_modules/@babel/types": {
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz",
"integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==",
"version": "7.27.0",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.0.tgz",
"integrity": "sha512-H45s8fVLYjbhFH62dIJ3WtmJ6RSPt/3DRO0ZcT2SUiYiQyz3BLVb9ADEnLl91m74aQPS3AzzeajZHYOalWe3bg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/helper-string-parser": "^7.22.5",
"@babel/helper-validator-identifier": "^7.22.20",
"to-fast-properties": "^2.0.0"
"@babel/helper-string-parser": "^7.25.9",
"@babel/helper-validator-identifier": "^7.25.9"
},
"engines": {
"node": ">=6.9.0"
@@ -1181,17 +1032,32 @@
}
},
"node_modules/@eslint/plugin-kit": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.0.tgz",
"integrity": "sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==",
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.7.tgz",
"integrity": "sha512-JubJ5B2pJ4k4yGxaNLdbjrnk9d/iDz6/q8wOilpIowd6PJPgaxCuHBnBszq7Ce2TyMrywm5r4PnKm6V3iiZF+g==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@eslint/core": "^0.12.0",
"levn": "^0.4.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/@eslint/plugin-kit/node_modules/@eslint/core": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.12.0.tgz",
"integrity": "sha512-cmrR6pytBuSMTaBweKoGMwu3EiHiEC+DoyupPmlZ0HxBJBtIxwe+j/E4XPIKNx+Q74c8lXKPwYawBf5glsTkHg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@types/json-schema": "^7.0.15"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/@gulp-sourcemaps/identity-map": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-2.0.1.tgz",
@@ -1646,18 +1512,20 @@
}
},
"node_modules/@octokit/openapi-types": {
"version": "11.2.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-11.2.0.tgz",
"integrity": "sha512-PBsVO+15KSlGmiI8QAzaqvsNlZlrDlyAJYcrXBCvVUxCp7VnXjkwPoFHgjEJXx3WF9BAwkA6nfCUA7i9sODzKA==",
"dev": true
"version": "12.11.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
"integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==",
"dev": true,
"license": "MIT"
},
"node_modules/@octokit/plugin-paginate-rest": {
"version": "2.17.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.17.0.tgz",
"integrity": "sha512-tzMbrbnam2Mt4AhuyCHvpRkS0oZ5MvwwcQPYGtMv4tUa5kkzG58SVB0fcsLulOZQeRnOgdkZWkRUiyBlh0Bkyw==",
"version": "2.21.3",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz",
"integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@octokit/types": "^6.34.0"
"@octokit/types": "^6.40.0"
},
"peerDependencies": {
"@octokit/core": ">=2"
@@ -1723,12 +1591,13 @@
}
},
"node_modules/@octokit/types": {
"version": "6.34.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.34.0.tgz",
"integrity": "sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw==",
"version": "6.41.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
"integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^11.2.0"
"@octokit/openapi-types": "^12.11.0"
}
},
"node_modules/@opentelemetry/api": {
@@ -2436,12 +2305,13 @@
"dev": true
},
"node_modules/@types/node": {
"version": "20.14.13",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.13.tgz",
"integrity": "sha512-+bHoGiZb8UiQ0+WEtmph2IWQCjIqg8MDZMAV+ppRRhUZnquF5mQkP/9vpSwJClEiSM/C7fZZExPzfU0vJTyp8w==",
"version": "20.17.27",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.27.tgz",
"integrity": "sha512-U58sbKhDrthHlxHRJw7ZLiLDZGmAUOZUbpw0S6nL27sYUdhvgBLCRu/keSd6qcTsfArd1sRFCCBxzWATGr/0UA==",
"dev": true,
"license": "MIT",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~6.19.2"
}
},
"node_modules/@types/node-fetch": {
@@ -2843,9 +2713,9 @@
}
},
"node_modules/@vscode/policy-watcher": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@vscode/policy-watcher/-/policy-watcher-1.3.0.tgz",
"integrity": "sha512-a8pPxlZlMJWOOj2NZ/2ceXgHdDU/NXo+8Pn/InV/sPBfbvTnf/MpMc4pscm9pdU4UIrTGR5+OduQW7mTK8DK7Q==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@vscode/policy-watcher/-/policy-watcher-1.3.1.tgz",
"integrity": "sha512-StbJFalUanuWSIeWng0yxu9Rjiyi9BPsvS5UlPqwyRbyA08TLvrM88SHMO2DVfyzMDjwM4MogF8LEUBTvVxS8g==",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
@@ -4167,49 +4037,80 @@
"dev": true
},
"node_modules/bare-events": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.4.2.tgz",
"integrity": "sha512-qMKFd2qG/36aA4GwvKq8MxnPgCQAmBWmSyLWsJcbn8v03wvIPQ/hG1Ms8bPzndZxMDoHpxez5VOS+gC9Yi24/Q==",
"version": "2.5.4",
"resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.4.tgz",
"integrity": "sha512-+gFfDkR8pj4/TrWCGUGWmJIkBwuxPS5F+a5yWjOHQt2hHvNZd5YLzadjmDUtFmMM4y429bnKLa8bYBMHcYdnQA==",
"dev": true,
"license": "Apache-2.0",
"optional": true
},
"node_modules/bare-fs": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.1.tgz",
"integrity": "sha512-W/Hfxc/6VehXlsgFtbB5B4xFcsCl+pAh30cYhoFyXErf6oGrwjh8SwiPAdHgpmWonKuYpZgGywN0SXt7dgsADA==",
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.0.2.tgz",
"integrity": "sha512-S5mmkMesiduMqnz51Bfh0Et9EX0aTCJxhsI4bvzFFLs8Z1AV8RDHadfY5CyLwdoLHgXbNBEN1gQcbEtGwuvixw==",
"dev": true,
"license": "Apache-2.0",
"optional": true,
"dependencies": {
"bare-events": "^2.0.0",
"bare-path": "^2.0.0",
"bare-stream": "^2.0.0"
"bare-events": "^2.5.4",
"bare-path": "^3.0.0",
"bare-stream": "^2.6.4"
},
"engines": {
"bare": ">=1.16.0"
},
"peerDependencies": {
"bare-buffer": "*"
},
"peerDependenciesMeta": {
"bare-buffer": {
"optional": true
}
}
},
"node_modules/bare-os": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.4.0.tgz",
"integrity": "sha512-v8DTT08AS/G0F9xrhyLtepoo9EJBJ85FRSMbu1pQUlAf6A8T0tEEQGMVObWeqpjhSPXsE0VGlluFBJu2fdoTNg==",
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.6.1.tgz",
"integrity": "sha512-uaIjxokhFidJP+bmmvKSgiMzj2sV5GPHaZVAIktcxcpCyBFFWO+YlikVAdhmUo2vYFvFhOXIAlldqV29L8126g==",
"dev": true,
"optional": true
"license": "Apache-2.0",
"optional": true,
"engines": {
"bare": ">=1.14.0"
}
},
"node_modules/bare-path": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.3.tgz",
"integrity": "sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==",
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/bare-path/-/bare-path-3.0.0.tgz",
"integrity": "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==",
"dev": true,
"license": "Apache-2.0",
"optional": true,
"dependencies": {
"bare-os": "^2.1.0"
"bare-os": "^3.0.1"
}
},
"node_modules/bare-stream": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.1.3.tgz",
"integrity": "sha512-tiDAH9H/kP+tvNO5sczyn9ZAA7utrSMobyDchsnyyXBuUe2FSQWbxhtuHB8jwpHYYevVo2UJpcmvvjrbHboUUQ==",
"version": "2.6.5",
"resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.6.5.tgz",
"integrity": "sha512-jSmxKJNJmHySi6hC42zlZnq00rga4jjxcgNZjY9N5WlOe/iOoGRtdwGsHzQv2RlH2KOYMwGUXhf2zXd32BA9RA==",
"dev": true,
"license": "Apache-2.0",
"optional": true,
"dependencies": {
"streamx": "^2.18.0"
"streamx": "^2.21.0"
},
"peerDependencies": {
"bare-buffer": "*",
"bare-events": "*"
},
"peerDependenciesMeta": {
"bare-buffer": {
"optional": true
},
"bare-events": {
"optional": true
}
}
},
"node_modules/base": {
@@ -6079,10 +5980,11 @@
}
},
"node_modules/editorconfig/node_modules/@types/node": {
"version": "10.12.21",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.21.tgz",
"integrity": "sha512-CBgLNk4o3XMnqMc0rhb6lc77IwShMEglz05deDcn2lQxyXEZivfwgYJu7SMha9V5XcrP6qZuevTHV/QrN2vjKQ==",
"dev": true
"version": "10.17.60",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz",
"integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==",
"dev": true,
"license": "MIT"
},
"node_modules/editorconfig/node_modules/@types/semver": {
"version": "5.5.0",
@@ -6112,9 +6014,9 @@
"dev": true
},
"node_modules/electron": {
"version": "34.3.2",
"resolved": "https://registry.npmjs.org/electron/-/electron-34.3.2.tgz",
"integrity": "sha512-n9tzmFexVLxipZXwMTY30H10f0X9k2OP0SkpSwL5VvnDZi0l/Hc+8CEArKkQPbbSf/IS7nxgc96gtTaR+XoSBg==",
"version": "34.4.0",
"resolved": "https://registry.npmjs.org/electron/-/electron-34.4.0.tgz",
"integrity": "sha512-/+RKCgdXa3yp/Ui+xkA84YJMZjnDyAhlHpVwpM454o+ELX3c3UloMzaCt2J0Cq+csAyPakrpDyGIQEabLUeU3w==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
@@ -10922,7 +10824,8 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
"dev": true
"dev": true,
"license": "MIT"
},
"node_modules/js-yaml": {
"version": "4.1.0",
@@ -11687,8 +11590,9 @@
"node_modules/matchdep": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz",
"integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4= sha512-LFgVbaHIHMqCRuCZyfCtUOq9/Lnzhi7Z0KFUE2fhD54+JN2jLh3hC02RLkqauJ3U4soU6H1J3tfj/Byk7GoEjA==",
"integrity": "sha512-LFgVbaHIHMqCRuCZyfCtUOq9/Lnzhi7Z0KFUE2fhD54+JN2jLh3hC02RLkqauJ3U4soU6H1J3tfj/Byk7GoEjA==",
"dev": true,
"license": "MIT",
"dependencies": {
"findup-sync": "^2.0.0",
"micromatch": "^3.0.4",
@@ -11762,8 +11666,9 @@
"node_modules/matchdep/node_modules/findup-sync": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz",
"integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw= sha512-vs+3unmJT45eczmcAZ6zMJtxN3l/QXeccaXQx5cu/MeJMhewVfoWZqibRkOxPnmoR59+Zy5hjabfQc6JLSah4g==",
"integrity": "sha512-vs+3unmJT45eczmcAZ6zMJtxN3l/QXeccaXQx5cu/MeJMhewVfoWZqibRkOxPnmoR59+Zy5hjabfQc6JLSah4g==",
"dev": true,
"license": "MIT",
"dependencies": {
"detect-file": "^1.0.0",
"is-glob": "^3.1.0",
@@ -14615,9 +14520,10 @@
}
},
"node_modules/prebuild-install/node_modules/tar-fs": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
"integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.2.tgz",
"integrity": "sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==",
"license": "MIT",
"dependencies": {
"chownr": "^1.1.1",
"mkdirp-classic": "^0.5.2",
@@ -14803,12 +14709,6 @@
"inherits": "~2.0.0"
}
},
"node_modules/queue-tick": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz",
"integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==",
"dev": true
},
"node_modules/quick-lru": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
@@ -16474,13 +16374,13 @@
}
},
"node_modules/streamx": {
"version": "2.18.0",
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.18.0.tgz",
"integrity": "sha512-LLUC1TWdjVdn1weXGcSxyTR3T4+acB6tVGXT95y0nGbca4t4o/ng1wKAGTljm9VicuCVLvRlqFYXYy5GwgM7sQ==",
"version": "2.22.0",
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.22.0.tgz",
"integrity": "sha512-sLh1evHOzBy/iWRiR6d1zRcLao4gGZr3C1kzNz4fopCOKJb6xD9ub8Mpi9Mr1R6id5o43S+d93fI48UC5uM9aw==",
"dev": true,
"license": "MIT",
"dependencies": {
"fast-fifo": "^1.3.2",
"queue-tick": "^1.0.1",
"text-decoder": "^1.1.0"
},
"optionalDependencies": {
@@ -16889,17 +16789,18 @@
}
},
"node_modules/tar-fs": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz",
"integrity": "sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==",
"version": "3.0.8",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.8.tgz",
"integrity": "sha512-ZoROL70jptorGAlgAYiLoBLItEKw/fUxg9BSYK/dF/GAGYFJOJJJMvjPAKDJraCXFwadD456FCuvLWgfhMsPwg==",
"dev": true,
"license": "MIT",
"dependencies": {
"pump": "^3.0.0",
"tar-stream": "^3.1.5"
},
"optionalDependencies": {
"bare-fs": "^2.1.1",
"bare-path": "^2.1.0"
"bare-fs": "^4.0.1",
"bare-path": "^3.0.0"
}
},
"node_modules/tar-fs/node_modules/pump": {
@@ -17185,15 +17086,6 @@
"node": ">=0.10.0"
}
},
"node_modules/to-fast-properties": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
"integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==",
"dev": true,
"engines": {
"node": ">=4"
}
},
"node_modules/to-object-path": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
@@ -17562,9 +17454,9 @@
"dev": true
},
"node_modules/typescript": {
"version": "5.8.0-dev.20250207",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.0-dev.20250207.tgz",
"integrity": "sha512-bRCO1GkVxTLd/UFJWOg9R1oRiSMidcfpICzuQlDJlHspv6hlcJvvIJP0BvQxrBYpu4dbzqp/Fh8rRYIkEjbSlQ==",
"version": "5.9.0-dev.20250324",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.0-dev.20250324.tgz",
"integrity": "sha512-qehVULhODb1IphPefX/jq0wAXpk6ifAt2lF3mxTsyR3yPDoPkiQdvxw9cURaDjJw6vCijSER6dU8kWmHdWaQnA==",
"dev": true,
"license": "Apache-2.0",
"bin": {
@@ -17753,10 +17645,11 @@
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true,
"license": "MIT"
},
"node_modules/union-value": {
"version": "1.0.1",
+4 -4
View File
@@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.100.0",
"distro": "d42d927c558e17ea6e489cff62878654737d85f7",
"distro": "2155257cf9c35fe3ca94480e3c41859d01fdb988",
"author": {
"name": "Microsoft Corporation"
},
@@ -76,7 +76,7 @@
"@types/semver": "^7.5.8",
"@vscode/deviceid": "^0.1.1",
"@vscode/iconv-lite-umd": "0.7.0",
"@vscode/policy-watcher": "^1.3.0",
"@vscode/policy-watcher": "^1.3.1",
"@vscode/proxy-agent": "^0.32.0",
"@vscode/ripgrep": "^1.15.11",
"@vscode/spdlog": "^0.15.0",
@@ -156,7 +156,7 @@
"cssnano": "^6.0.3",
"debounce": "^1.0.0",
"deemon": "^1.8.0",
"electron": "34.3.2",
"electron": "34.4.0",
"eslint": "^9.11.1",
"eslint-formatter-compact": "^8.40.0",
"eslint-plugin-header": "3.1.1",
@@ -214,7 +214,7 @@
"ts-node": "^10.9.1",
"tsec": "0.2.7",
"tslib": "^2.6.3",
"typescript": "^5.8.0-dev.20250207",
"typescript": "^5.9.0-dev.20250324",
"typescript-eslint": "^8.8.0",
"util": "^0.12.4",
"webpack": "^5.94.0",
+4 -3
View File
@@ -1373,9 +1373,10 @@
}
},
"node_modules/tar-fs": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
"integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.2.tgz",
"integrity": "sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==",
"license": "MIT",
"dependencies": {
"chownr": "^1.1.1",
"mkdirp-classic": "^0.5.2",
+1
View File
@@ -7,6 +7,7 @@
"noImplicitReturns": true,
"noImplicitOverride": true,
"noUnusedLocals": true,
"noUncheckedSideEffectImports": true,
"allowUnreachableCode": false,
"strict": true,
"exactOptionalPropertyTypes": false,
+1
View File
@@ -17,6 +17,7 @@
"declaration": true
},
"include": [
"typings/css.d.ts",
"typings/thenable.d.ts",
"typings/vscode-globals-product.d.ts",
"typings/vscode-globals-nls.d.ts",
+9
View File
@@ -0,0 +1,9 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
// Recognize all CSS files as valid module imports
declare module "vs/css!*" { }
declare module "*.css" { }
Binary file not shown.
+6 -2
View File
@@ -731,13 +731,17 @@ export function compareUndefinedSmallest<T>(comparator: Comparator<T>): Comparat
}
export class ArrayQueue<T> {
private readonly items: readonly T[];
private firstIdx = 0;
private lastIdx = this.items.length - 1;
private lastIdx: number;
/**
* Constructs a queue that is backed by the given array. Runtime is O(1).
*/
constructor(private readonly items: readonly T[]) { }
constructor(items: readonly T[]) {
this.items = items;
this.lastIdx = this.items.length - 1;
}
get length(): number {
return this.lastIdx - this.firstIdx + 1;
+1
View File
@@ -592,4 +592,5 @@ export const codiconsLibrary = {
flag: register('flag', 0xec3f),
lightbulbEmpty: register('lightbulb-empty', 0xec40),
symbolMethodArrow: register('symbol-method-arrow', 0xec41),
copilotUnavailable: register('copilot-unavailable', 0xec42),
} as const;
@@ -6,12 +6,12 @@
// This is a facade for the observable implementation. Only import from here!
export { observableValueOpts } from './api.js';
export { autorun, autorunDelta, autorunHandleChanges, autorunOpts, autorunWithStore, autorunWithStoreHandleChanges } from './autorun.js';
export { autorun, autorunDelta, autorunHandleChanges, autorunOpts, autorunWithStore, autorunWithStoreHandleChanges, autorunIterableDelta } from './autorun.js';
export { asyncTransaction, disposableObservableValue, globalTransaction, observableValue, subtransaction, transaction, TransactionImpl, type IChangeContext, type IChangeTracker, type IObservable, type IObservableWithChange, type IObserver, type IReader, type ISettable, type ISettableObservable, type ITransaction, } from './base.js';
export { derived, derivedDisposable, derivedHandleChanges, derivedOpts, derivedWithSetter, derivedWithStore } from './derived.js';
export { ObservableLazy, ObservableLazyPromise, ObservablePromise, PromiseResult, } from './promise.js';
export { derivedWithCancellationToken, waitForState } from './utilsCancellation.js';
export { constObservable, debouncedObservableDeprecated, derivedConstOnceDefined, derivedObservableWithCache, derivedObservableWithWritableCache, keepObserved, latestChangedValue, mapObservableArrayCached, observableFromEvent, observableFromEventOpts, observableFromPromise, observableFromValueWithChangeEvent, observableSignal, observableSignalFromEvent, recomputeInitiallyAndOnChange, runOnChange, runOnChangeWithStore, signalFromObservable, ValueWithChangeEventFromObservable, wasEventTriggeredRecently, type IObservableSignal, } from './utils.js';
export { constObservable, debouncedObservableDeprecated, debouncedObservable, derivedConstOnceDefined, derivedObservableWithCache, derivedObservableWithWritableCache, keepObserved, latestChangedValue, mapObservableArrayCached, observableFromEvent, observableFromEventOpts, observableFromPromise, observableFromValueWithChangeEvent, observableSignal, observableSignalFromEvent, recomputeInitiallyAndOnChange, runOnChange, runOnChangeWithStore, runOnChangeWithCancellationToken, signalFromObservable, ValueWithChangeEventFromObservable, wasEventTriggeredRecently, type IObservableSignal, } from './utils.js';
export { type DebugOwner } from './debugName.js';
import { addLogger, setLogObservableFn } from './logging/logging.js';
@@ -9,6 +9,7 @@ import { DebugNameData, DebugOwner, IDebugNameData, getDebugName, } from './debu
import { BugIndicatingError, DisposableStore, EqualityComparer, Event, IDisposable, IValueWithChangeEvent, strictEquals, toDisposable } from './commonFacade/deps.js';
import { derived, derivedOpts } from './derived.js';
import { getLogger } from './logging/logging.js';
import { CancellationToken, cancelOnDispose } from '../cancellation.js';
/**
* Represents an efficient observable whose value never changes.
@@ -674,3 +675,9 @@ export function runOnChangeWithStore<T, TChange>(observable: IObservableWithChan
}
};
}
export function runOnChangeWithCancellationToken<T, TChange>(observable: IObservableWithChange<T, TChange>, cb: (value: T, previousValue: undefined | T, deltas: RemoveUndefined<TChange>[], token: CancellationToken) => Promise<void>): IDisposable {
return runOnChangeWithStore(observable, (value, previousValue: undefined | T, deltas, store) => {
cb(value, previousValue, deltas, cancelOnDispose(store));
});
}
+8
View File
@@ -266,6 +266,14 @@ export function splitLinesIncludeSeparators(str: string): string[] {
return linesWithSeparators;
}
export function indexOfPattern(str: string, re: RegExp) {
const match = re.exec(str);
if (match) {
return match.index;
}
return -1;
}
/**
* Returns first index of the string that is not whitespace.
* If string is empty or contains only whitespaces, returns -1
@@ -8,6 +8,7 @@ import { setUnexpectedErrorHandler } from '../../common/errors.js';
import { Emitter, Event } from '../../common/event.js';
import { DisposableStore } from '../../common/lifecycle.js';
import { autorun, autorunHandleChanges, derived, derivedDisposable, IObservable, IObserver, ISettableObservable, ITransaction, keepObserved, observableFromEvent, observableSignal, observableValue, transaction, waitForState } from '../../common/observable.js';
// eslint-disable-next-line local/code-no-deep-import-of-internal
import { BaseObservable, IObservableWithChange } from '../../common/observableInternal/base.js';
import { ensureNoDisposablesAreLeakedInTestSuite } from './utils.js';
@@ -20,7 +20,7 @@ export interface IObjectCollectionBuffer<T extends ObjectCollectionBufferPropert
/**
* The underlying buffer. This **should not** be modified externally.
*/
readonly buffer: ArrayBuffer;
readonly buffer: ArrayBufferLike;
/**
* A view of the underlying buffer. This **should not** be modified externally.
*/
@@ -79,7 +79,7 @@ export function createObjectCollectionBuffer<T extends ObjectCollectionBufferPro
}
class ObjectCollectionBuffer<T extends ObjectCollectionBufferPropertySpec[]> extends Disposable implements IObjectCollectionBuffer<T> {
buffer: ArrayBuffer;
buffer: ArrayBufferLike;
view: Float32Array;
get bufferUsedSize() {
@@ -18,6 +18,12 @@
box-shadow: 0 2px 8px var(--vscode-widget-shadow);
}
.monaco-workbench .workbench-hover .monaco-action-bar .action-item .codicon {
/* Given our font-size, adjust action icons accordingly */
width: 13px;
height: 13px;
}
.monaco-workbench .workbench-hover hr {
border-bottom: none;
}
@@ -26,6 +32,12 @@
font-size: 12px;
}
.monaco-workbench .workbench-hover.compact .monaco-action-bar .action-item .codicon {
/* Given our font-size, adjust action icons accordingly */
width: 12px;
height: 12px;
}
.monaco-workbench .workbench-hover.compact .hover-contents {
padding: 2px 8px;
}
+41
View File
@@ -0,0 +1,41 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { BugIndicatingError } from '../../../base/common/errors.js';
import { OffsetRange } from './offsetRange.js';
import { Range } from './range.js';
/**
* Represents a 1-based range of columns.
* Use {@lik OffsetRange} to represent a 0-based range.
*/
export class ColumnRange {
public static fromOffsetRange(offsetRange: OffsetRange): ColumnRange {
return new ColumnRange(offsetRange.start + 1, offsetRange.endExclusive + 1);
}
constructor(
/** 1-based */
public readonly startColumn: number,
public readonly endColumnExclusive: number
) {
if (startColumn > endColumnExclusive) {
throw new BugIndicatingError(`startColumn ${startColumn} cannot be after endColumnExclusive ${endColumnExclusive}`);
}
}
toRange(lineNumber: number): Range {
return new Range(lineNumber, this.startColumn, lineNumber, this.endColumnExclusive);
}
equals(other: ColumnRange): boolean {
return this.startColumn === other.startColumn
&& this.endColumnExclusive === other.endColumnExclusive;
}
toZeroBasedOffsetRange(): OffsetRange {
return new OffsetRange(this.startColumn - 1, this.endColumnExclusive - 1);
}
}
@@ -0,0 +1,26 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ColumnRange } from './columnRange.js';
import { Range } from './range.js';
export class RangeSingleLine {
public static fromRange(range: Range): RangeSingleLine | undefined {
if (range.endLineNumber !== range.startLineNumber) {
return undefined;
}
return new RangeSingleLine(range.startLineNumber, new ColumnRange(range.startColumn, range.endColumn));
}
constructor(
/** 1-based */
public readonly lineNumber: number,
public readonly columnRange: ColumnRange,
) { }
toRange(): Range {
return new Range(this.lineNumber, this.columnRange.startColumn, this.lineNumber, this.columnRange.endColumnExclusive);
}
}
@@ -135,10 +135,10 @@ export class ContiguousTokensEditing {
}
}
export function toUint32Array(arr: Uint32Array | ArrayBuffer): Uint32Array {
export function toUint32Array(arr: Uint32Array | ArrayBuffer): Uint32Array<ArrayBuffer> {
if (arr instanceof Uint32Array) {
return arr;
return arr as Uint32Array<ArrayBuffer>;
} else {
return new Uint32Array(arr);
return new Uint32Array<ArrayBuffer>(arr);
}
}
@@ -77,6 +77,11 @@ export class TokenArray {
}
return TokenArray.create(result);
}
public append(other: TokenArray): TokenArray {
const result: TokenInfo[] = this._tokenInfo.concat(other._tokenInfo);
return TokenArray.create(result);
}
}
export type TokenMetadata = number;
@@ -0,0 +1,109 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { OffsetRange } from '../core/offsetRange.js';
import { ILanguageIdCodec } from '../languages.js';
import { LineTokens } from './lineTokens.js';
/**
* This class represents a sequence of tokens.
* Conceptually, each token has a length and a metadata number.
* A token array might be used to annotate a string with metadata.
* Use {@link TokenWithTextArrayBuilder} to efficiently create a token array.
*
* TODO: Make this class more efficient (e.g. by using a Int32Array).
*/
export class TokenWithTextArray {
public static fromLineTokens(lineTokens: LineTokens): TokenWithTextArray {
const tokenInfo: TokenWithTextInfo[] = [];
for (let i = 0; i < lineTokens.getCount(); i++) {
tokenInfo.push(new TokenWithTextInfo(lineTokens.getTokenText(i), lineTokens.getMetadata(i)));
}
return TokenWithTextArray.create(tokenInfo);
}
public static create(tokenInfo: TokenWithTextInfo[]): TokenWithTextArray {
return new TokenWithTextArray(tokenInfo);
}
private constructor(
private readonly _tokenInfo: TokenWithTextInfo[],
) { }
public toLineTokens(decoder: ILanguageIdCodec): LineTokens {
return LineTokens.createFromTextAndMetadata(this.map((_r, t) => ({ text: t.text, metadata: t.metadata })), decoder);
}
public forEach(cb: (range: OffsetRange, tokenInfo: TokenWithTextInfo) => void): void {
let lengthSum = 0;
for (const tokenInfo of this._tokenInfo) {
const range = new OffsetRange(lengthSum, lengthSum + tokenInfo.text.length);
cb(range, tokenInfo);
lengthSum += tokenInfo.text.length;
}
}
public map<T>(cb: (range: OffsetRange, tokenInfo: TokenWithTextInfo) => T): T[] {
const result: T[] = [];
let lengthSum = 0;
for (const tokenInfo of this._tokenInfo) {
const range = new OffsetRange(lengthSum, lengthSum + tokenInfo.text.length);
result.push(cb(range, tokenInfo));
lengthSum += tokenInfo.text.length;
}
return result;
}
public slice(range: OffsetRange): TokenWithTextArray {
const result: TokenWithTextInfo[] = [];
let lengthSum = 0;
for (const tokenInfo of this._tokenInfo) {
const tokenStart = lengthSum;
const tokenEndEx = tokenStart + tokenInfo.text.length;
if (tokenEndEx > range.start) {
if (tokenStart >= range.endExclusive) {
break;
}
const deltaBefore = Math.max(0, range.start - tokenStart);
const deltaAfter = Math.max(0, tokenEndEx - range.endExclusive);
result.push(new TokenWithTextInfo(tokenInfo.text.slice(deltaBefore, tokenInfo.text.length - deltaAfter), tokenInfo.metadata));
}
lengthSum += tokenInfo.text.length;
}
return TokenWithTextArray.create(result);
}
public append(other: TokenWithTextArray): TokenWithTextArray {
const result: TokenWithTextInfo[] = this._tokenInfo.concat(other._tokenInfo);
return TokenWithTextArray.create(result);
}
}
export type TokenMetadata = number;
export class TokenWithTextInfo {
constructor(
public readonly text: string,
public readonly metadata: TokenMetadata,
) { }
}
/**
* TODO: Make this class more efficient (e.g. by using a Int32Array).
*/
export class TokenWithTextArrayBuilder {
private readonly _tokens: TokenWithTextInfo[] = [];
public add(text: string, metadata: TokenMetadata): void {
this._tokens.push(new TokenWithTextInfo(text, metadata));
}
public build(): TokenWithTextArray {
return TokenWithTextArray.create(this._tokens);
}
}
@@ -29,7 +29,7 @@ import { KeybindingWeight } from '../../../../platform/keybinding/common/keybind
import { INotificationService, Severity } from '../../../../platform/notification/common/notification.js';
import { IQuickInputService } from '../../../../platform/quickinput/common/quickInput.js';
import { IStorageService, StorageScope, StorageTarget } from '../../../../platform/storage/common/storage.js';
import { IThemeService, themeColorFromId } from '../../../../platform/theme/common/themeService.js';
import { themeColorFromId } from '../../../../platform/theme/common/themeService.js';
import { Selection } from '../../../common/core/selection.js';
import { IHoverService } from '../../../../platform/hover/browser/hover.js';
import { FindWidgetSearchHistory } from './findWidgetSearchHistory.js';
@@ -452,7 +452,6 @@ export class FindController extends CommonFindController implements IFindControl
@IContextViewService private readonly _contextViewService: IContextViewService,
@IContextKeyService _contextKeyService: IContextKeyService,
@IKeybindingService private readonly _keybindingService: IKeybindingService,
@IThemeService private readonly _themeService: IThemeService,
@INotificationService notificationService: INotificationService,
@IStorageService _storageService: IStorageService,
@IClipboardService clipboardService: IClipboardService,
@@ -514,7 +513,7 @@ export class FindController extends CommonFindController implements IFindControl
}
private _createFindWidget() {
this._widget = this._register(new FindWidget(this._editor, this, this._state, this._contextViewService, this._keybindingService, this._contextKeyService, this._themeService, this._storageService, this._notificationService, this._hoverService, this._findWidgetSearchHistory, this._replaceWidgetHistory));
this._widget = this._register(new FindWidget(this._editor, this, this._state, this._contextViewService, this._keybindingService, this._contextKeyService, this._hoverService, this._findWidgetSearchHistory, this._replaceWidgetHistory));
this._findOptionsWidget = this._register(new FindOptionsWidget(this._editor, this._state, this._keybindingService));
}
@@ -33,11 +33,9 @@ import { ContextScopedFindInput, ContextScopedReplaceInput } from '../../../../p
import { showHistoryKeybindingHint } from '../../../../platform/history/browser/historyWidgetKeybindingHint.js';
import { IContextKey, IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';
import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js';
import { INotificationService } from '../../../../platform/notification/common/notification.js';
import { IStorageService, StorageScope, StorageTarget } from '../../../../platform/storage/common/storage.js';
import { asCssVariable, contrastBorder, editorFindMatchForeground, editorFindMatchHighlightBorder, editorFindMatchHighlightForeground, editorFindRangeHighlightBorder, inputActiveOptionBackground, inputActiveOptionBorder, inputActiveOptionForeground } from '../../../../platform/theme/common/colorRegistry.js';
import { registerIcon, widgetClose } from '../../../../platform/theme/common/iconRegistry.js';
import { IThemeService, registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';
import { registerThemingParticipant } from '../../../../platform/theme/common/themeService.js';
import { ThemeIcon } from '../../../../base/common/themables.js';
import { isHighContrast } from '../../../../platform/theme/common/theme.js';
import { assertIsDefined } from '../../../../base/common/types.js';
@@ -87,7 +85,6 @@ let MAX_MATCHES_COUNT_WIDTH = 69;
// let FIND_ALL_CONTROLS_WIDTH = 17/** Find Input margin-left */ + (MAX_MATCHES_COUNT_WIDTH + 3 + 1) /** Match Results */ + 23 /** Button */ * 4 + 2/** sash */;
const FIND_INPUT_AREA_HEIGHT = 33; // The height of Find Widget when Replace Input is not visible.
const ctrlEnterReplaceAllWarningPromptedKey = 'ctrlEnterReplaceAll.windows.donotask';
const ctrlKeyMod = (platform.isMacintosh ? KeyMod.WinCtrl : KeyMod.CtrlCmd);
export class FindWidgetViewZone implements IViewZone {
@@ -130,8 +127,6 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
private readonly _contextViewProvider: IContextViewProvider;
private readonly _keybindingService: IKeybindingService;
private readonly _contextKeyService: IContextKeyService;
private readonly _storageService: IStorageService;
private readonly _notificationService: INotificationService;
private _domNode!: HTMLElement;
private _cachedHeight: number | null = null;
@@ -150,7 +145,6 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
private _isVisible: boolean;
private _isReplaceVisible: boolean;
private _ignoreChangeEvent: boolean;
private _ctrlEnterReplaceAllWarningPrompted: boolean;
private readonly _findFocusTracker: dom.IFocusTracker;
private readonly _findInputFocused: IContextKey<boolean>;
@@ -170,9 +164,6 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
contextViewProvider: IContextViewProvider,
keybindingService: IKeybindingService,
contextKeyService: IContextKeyService,
themeService: IThemeService,
storageService: IStorageService,
notificationService: INotificationService,
private readonly _hoverService: IHoverService,
private readonly _findWidgetSearchHistory: IHistory<string> | undefined,
private readonly _replaceWidgetHistory: IHistory<string> | undefined,
@@ -184,10 +175,6 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
this._contextViewProvider = contextViewProvider;
this._keybindingService = keybindingService;
this._contextKeyService = contextKeyService;
this._storageService = storageService;
this._notificationService = notificationService;
this._ctrlEnterReplaceAllWarningPrompted = !!storageService.getBoolean(ctrlEnterReplaceAllWarningPromptedKey, StorageScope.PROFILE);
this._isVisible = false;
this._isReplaceVisible = false;
@@ -879,17 +866,6 @@ export class FindWidget extends Widget implements IOverlayWidget, IVerticalSashL
e.preventDefault();
return;
} else {
if (platform.isWindows && platform.isNative && !this._ctrlEnterReplaceAllWarningPrompted) {
// this is the first time when users press Ctrl + Enter to replace all
this._notificationService.info(
nls.localize('ctrlEnter.keybindingChanged',
'Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.')
);
this._ctrlEnterReplaceAllWarningPrompted = true;
this._storageService.store(ctrlEnterReplaceAllWarningPromptedKey, true, StorageScope.PROFILE, StorageTarget.USER);
}
this._replaceInput.inputBox.insertAtCursor('\n');
e.preventDefault();
return;
@@ -10,7 +10,7 @@ import { Range } from '../../../../common/core/range.js';
import { SingleTextEdit, TextEdit } from '../../../../common/core/textEdit.js';
import { LineDecoration } from '../../../../common/viewLayout/lineDecorations.js';
import { InlineDecoration } from '../../../../common/viewModel.js';
import { ColumnRange } from '../utils.js';
import { ColumnRange } from '../../../../common/core/columnRange.js';
export class GhostText {
constructor(
@@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/
import { Permutation, compareBy } from '../../../../base/common/arrays.js';
import { BugIndicatingError } from '../../../../base/common/errors.js';
import { DisposableStore, IDisposable } from '../../../../base/common/lifecycle.js';
import { IObservable, observableValue, ISettableObservable, autorun, transaction, IReader } from '../../../../base/common/observable.js';
import { ContextKeyValue, IContextKeyService, RawContextKey } from '../../../../platform/contextkey/common/contextkey.js';
@@ -19,26 +18,6 @@ export function getReadonlyEmptyArray<T>(): readonly T[] {
return array;
}
export class ColumnRange {
constructor(
public readonly startColumn: number,
public readonly endColumnExclusive: number,
) {
if (startColumn > endColumnExclusive) {
throw new BugIndicatingError(`startColumn ${startColumn} cannot be after endColumnExclusive ${endColumnExclusive}`);
}
}
toRange(lineNumber: number): Range {
return new Range(lineNumber, this.startColumn, lineNumber, this.endColumnExclusive);
}
equals(other: ColumnRange): boolean {
return this.startColumn === other.startColumn
&& this.endColumnExclusive === other.endColumnExclusive;
}
}
export function addPositions(pos1: Position, pos2: Position): Position {
return new Position(pos1.lineNumber + pos2.lineNumber - 1, pos2.lineNumber === 1 ? pos1.column + pos2.column - 1 : pos2.column);
}
@@ -27,11 +27,13 @@ import { LineDecoration } from '../../../../../common/viewLayout/lineDecorations
import { RenderLineInput, renderViewLine } from '../../../../../common/viewLayout/viewLineRenderer.js';
import { InlineDecorationType } from '../../../../../common/viewModel.js';
import { GhostText, GhostTextReplacement, IGhostTextLine } from '../../model/ghostText.js';
import { ColumnRange } from '../../utils.js';
import { RangeSingleLine } from '../../../../../common/core/rangeSingleLine.js';
import { ColumnRange } from '../../../../../common/core/columnRange.js';
import { addDisposableListener, getWindow, isHTMLElement, n } from '../../../../../../base/browser/dom.js';
import './ghostTextView.css';
import { IMouseEvent, StandardMouseEvent } from '../../../../../../base/browser/mouseEvent.js';
import { CodeEditorWidget } from '../../../../../browser/widget/codeEditor/codeEditorWidget.js';
import { TokenWithTextArray } from '../../../../../common/tokens/tokenWithTextArray.js';
export interface IGhostTextWidgetModel {
readonly targetTextModel: IObservable<ITextModel | undefined>;
@@ -170,7 +172,7 @@ export class GhostTextView extends Disposable {
const syntaxHighlightingEnabled = this._useSyntaxHighlighting.read(reader);
const extraClassNames = this._extraClassNames.read(reader);
const { inlineTexts, additionalLines, hiddenRange } = computeGhostTextViewData(ghostText, textModel, GHOST_TEXT_CLASS_NAME + extraClassNames);
const { inlineTexts, additionalLines, hiddenRange, additionalLinesOriginalSuffix } = computeGhostTextViewData(ghostText, textModel, GHOST_TEXT_CLASS_NAME + extraClassNames);
const currentLine = textModel.getLineContent(ghostText.lineNumber);
const edit = new OffsetEdit(inlineTexts.map(t => SingleOffsetEdit.insert(t.column - 1, t.text)));
@@ -178,10 +180,18 @@ export class GhostTextView extends Disposable {
const newRanges = edit.getNewTextRanges();
const inlineTextsWithTokens = inlineTexts.map((t, idx) => ({ ...t, tokens: tokens?.[0]?.getTokensInRange(newRanges[idx]) }));
const tokenizedAdditionalLines: LineData[] = additionalLines.map((l, idx) => ({
content: tokens?.[idx + 1] ?? LineTokens.createEmpty(l.content, this._languageService.languageIdCodec),
decorations: l.decorations,
}));
const tokenizedAdditionalLines: LineData[] = additionalLines.map((l, idx) => {
let content = tokens?.[idx + 1] ?? LineTokens.createEmpty(l.content, this._languageService.languageIdCodec);
if (idx === additionalLines.length - 1 && additionalLinesOriginalSuffix) {
const t = TokenWithTextArray.fromLineTokens(textModel.tokenization.getLineTokens(additionalLinesOriginalSuffix.lineNumber));
const existingContent = t.slice(additionalLinesOriginalSuffix.columnRange.toZeroBasedOffsetRange());
content = TokenWithTextArray.fromLineTokens(content).append(existingContent).toLineTokens(content.languageIdCodec);
}
return {
content,
decorations: l.decorations,
};
});
return {
replacedRange,
@@ -344,8 +354,9 @@ function computeGhostTextViewData(ghostText: GhostText | GhostTextReplacement, t
lastIdx = part.column - 1;
}
let additionalLinesOriginalSuffix: RangeSingleLine | undefined = undefined;
if (hiddenTextStartColumn !== undefined) {
addToAdditionalLines([{ line: textBufferLine.substring(lastIdx), lineDecorations: [] }], undefined);
additionalLinesOriginalSuffix = new RangeSingleLine(ghostText.lineNumber, new ColumnRange(lastIdx + 1, textBufferLine.length + 1));
}
const hiddenRange = hiddenTextStartColumn !== undefined ? new ColumnRange(hiddenTextStartColumn, textBufferLine.length + 1) : undefined;
@@ -354,6 +365,7 @@ function computeGhostTextViewData(ghostText: GhostText | GhostTextReplacement, t
inlineTexts,
additionalLines,
hiddenRange,
additionalLinesOriginalSuffix,
};
}
@@ -5,16 +5,13 @@
import { n, trackFocus } from '../../../../../../../base/browser/dom.js';
import { renderIcon } from '../../../../../../../base/browser/ui/iconLabel/iconLabels.js';
import { timeout } from '../../../../../../../base/common/async.js';
import { Codicon } from '../../../../../../../base/common/codicons.js';
import { BugIndicatingError } from '../../../../../../../base/common/errors.js';
import { Disposable, DisposableStore, IDisposable, MutableDisposable, toDisposable } from '../../../../../../../base/common/lifecycle.js';
import { IObservable, ISettableObservable, autorun, autorunWithStore, constObservable, derived, observableFromEvent, observableValue, runOnChange } from '../../../../../../../base/common/observable.js';
import { debouncedObservable } from '../../../../../../../base/common/observableInternal/utils.js';
import { Disposable, DisposableStore, toDisposable } from '../../../../../../../base/common/lifecycle.js';
import { IObservable, ISettableObservable, autorun, constObservable, debouncedObservable, derived, observableFromEvent, observableValue, runOnChange } from '../../../../../../../base/common/observable.js';
import { IAccessibilityService } from '../../../../../../../platform/accessibility/common/accessibility.js';
import { IHoverService } from '../../../../../../../platform/hover/browser/hover.js';
import { IInstantiationService } from '../../../../../../../platform/instantiation/common/instantiation.js';
import { IStorageService, StorageScope, StorageTarget } from '../../../../../../../platform/storage/common/storage.js';
import { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';
import { IThemeService } from '../../../../../../../platform/theme/common/themeService.js';
import { IEditorMouseEvent } from '../../../../../../browser/editorBrowser.js';
@@ -27,19 +24,11 @@ import { EditorOption, RenderLineNumbersType } from '../../../../../../common/co
import { LineRange } from '../../../../../../common/core/lineRange.js';
import { OffsetRange } from '../../../../../../common/core/offsetRange.js';
import { StickyScrollController } from '../../../../../stickyScroll/browser/stickyScrollController.js';
import { InlineEditHost } from '../inlineEditsModel.js';
import { IInlineEditModel, InlineEditTabAction } from '../inlineEditsViewInterface.js';
import { getEditorBlendedColor, inlineEditIndicatorBackground, inlineEditIndicatorPrimaryBackground, inlineEditIndicatorPrimaryBorder, inlineEditIndicatorPrimaryForeground, inlineEditIndicatorSecondaryBackground, inlineEditIndicatorSecondaryBorder, inlineEditIndicatorSecondaryForeground, inlineEditIndicatorsuccessfulBackground, inlineEditIndicatorsuccessfulBorder, inlineEditIndicatorsuccessfulForeground } from '../theme.js';
import { mapOutFalsy, rectToProps } from '../utils/utils.js';
import { GutterIndicatorMenuContent } from './gutterIndicatorMenu.js';
// Represents the user's familiarity with the inline edits feature.
enum UserKind {
FirstTime = 'firstTime',
SecondTime = 'secondTime',
Active = 'active'
}
export class InlineEditsGutterIndicator extends Disposable {
private get model() {
@@ -48,52 +37,18 @@ export class InlineEditsGutterIndicator extends Disposable {
return model;
}
private readonly _activeCompletionId = derived<string | undefined>(reader => {
const layout = this._layout.read(reader);
if (!layout) { return undefined; }
const model = this._model.read(reader);
if (!model) { return undefined; }
return model.inlineEdit.inlineCompletion.id;
});
private readonly _gutterIndicatorStyles: IObservable<{ background: string; foreground: string; border: string }>;
private readonly _isHoveredOverInlineEditDebounced: IObservable<boolean>;
private readonly _newUserAnimationDisposable = this._register(new MutableDisposable());
private readonly _firstToSecondTimeUserDisposable = this._register(new MutableDisposable());
private readonly _secondTimeToActiveUserDisposable = this._register(new MutableDisposable());
private get _newUserType(): UserKind {
return this._storageService.get('inlineEditsGutterIndicatorUserKind', StorageScope.APPLICATION, UserKind.FirstTime) as UserKind;
}
private set _newUserType(value: UserKind) {
switch (value) {
case UserKind.FirstTime:
throw new BugIndicatingError('UserKind should not be set to first time');
case UserKind.SecondTime:
this._firstToSecondTimeUserDisposable.clear();
break;
case UserKind.Active:
this._newUserAnimationDisposable.clear();
this._firstToSecondTimeUserDisposable.clear();
this._secondTimeToActiveUserDisposable.clear();
break;
}
this._storageService.store('inlineEditsGutterIndicatorUserKind', value, StorageScope.APPLICATION, StorageTarget.USER);
}
constructor(
private readonly _editorObs: ObservableCodeEditor,
private readonly _originalRange: IObservable<LineRange | undefined>,
private readonly _verticalOffset: IObservable<number>,
private readonly _host: IObservable<InlineEditHost | undefined>,
private readonly _model: IObservable<IInlineEditModel | undefined>,
private readonly _isHoveringOverInlineEdit: IObservable<boolean>,
private readonly _focusIsInMenu: ISettableObservable<boolean>,
@IHoverService private readonly _hoverService: HoverService,
@IInstantiationService private readonly _instantiationService: IInstantiationService,
@IStorageService private readonly _storageService: IStorageService,
@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,
@IThemeService themeService: IThemeService,
) {
@@ -143,14 +98,10 @@ export class InlineEditsGutterIndicator extends Disposable {
// pulse animation when hovering inline edit
this._register(runOnChange(this._isHoveredOverInlineEditDebounced, (isHovering) => {
if (isHovering) {
this._triggerAnimation();
this.triggerAnimation();
}
}));
if (this._newUserType === UserKind.Active) {
this._register(this.setupNewUserExperience());
}
this._register(autorun(reader => {
this._indicator.readEffect(reader);
if (this._indicator.element) {
@@ -159,87 +110,10 @@ export class InlineEditsGutterIndicator extends Disposable {
}));
}
private setupNewUserExperience(): IDisposable {
if (this._newUserType === UserKind.Active) {
return Disposable.None;
}
const disposableStore = new DisposableStore();
let userHasHoveredOverIcon = false;
let inlineEditHasBeenAccepted = false;
let firstTimeUserAnimationCount = 0;
let secondTimeUserAnimationCount = 0;
// pulse animation for new users
disposableStore.add(runOnChange(this._activeCompletionId, async (id) => {
if (id === undefined) { return; }
const userType = this._newUserType;
// Animation
switch (userType) {
case UserKind.FirstTime: {
for (let i = 0; i < 3 && this._activeCompletionId.get() === id; i++) {
await this._triggerAnimation();
await timeout(500);
}
break;
}
case UserKind.SecondTime: {
this._triggerAnimation();
break;
}
}
// User Kind Transition
switch (userType) {
case UserKind.FirstTime: {
if (++firstTimeUserAnimationCount >= 5 || userHasHoveredOverIcon) {
this._newUserType = UserKind.SecondTime;
}
break;
}
case UserKind.SecondTime: {
if (++secondTimeUserAnimationCount >= 5 && inlineEditHasBeenAccepted) {
this._newUserType = UserKind.Active;
}
break;
}
}
}));
// Remember when the user has hovered over the icon
disposableStore.add(runOnChange(this._isHoveredOverIconDebounced, async (isHovered) => {
if (isHovered) {
userHasHoveredOverIcon = true;
}
}));
// Remember when the user has accepted an inline edit
disposableStore.add(autorunWithStore((reader, store) => {
const host = this._host.read(reader);
if (!host) { return; }
store.add(host.onDidAccept(() => {
inlineEditHasBeenAccepted = true;
}));
}));
return disposableStore;
}
private _triggerAnimation(): Promise<Animation> {
public triggerAnimation(): Promise<Animation> {
if (this._accessibilityService.isMotionReduced()) {
return new Animation(null, null).finished;
}
// WIGGLE ANIMATION:
/* this._iconRef.element.animate([
{ transform: 'rotate(0) scale(1)', offset: 0 },
{ transform: 'rotate(14.4deg) scale(1.1)', offset: 0.15 },
{ transform: 'rotate(-14.4deg) scale(1.2)', offset: 0.3 },
{ transform: 'rotate(14.4deg) scale(1.1)', offset: 0.45 },
{ transform: 'rotate(-14.4deg) scale(1.2)', offset: 0.6 },
{ transform: 'rotate(0) scale(1)', offset: 1 }
], { duration: 800 }); */
// PULSE ANIMATION:
const animation = this._iconRef.element.animate([
@@ -456,11 +330,17 @@ export class InlineEditsGutterIndicator extends Disposable {
};
});
private readonly _iconRef = n.ref<HTMLDivElement>();
public readonly isVisible = this._layout.map(l => !!l);
private readonly _hoverVisible = observableValue(this, false);
public readonly isHoverVisible: IObservable<boolean> = this._hoverVisible;
private readonly _isHoveredOverIcon = observableValue(this, false);
private readonly _isHoveredOverIconDebounced: IObservable<boolean> = debouncedObservable(this._isHoveredOverIcon, 100);
public readonly isHoveredOverIcon: IObservable<boolean> = this._isHoveredOverIconDebounced;
private _showHover(): void {
if (this._hoverVisible.get()) {
@@ -0,0 +1,184 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { timeout } from '../../../../../../base/common/async.js';
import { BugIndicatingError } from '../../../../../../base/common/errors.js';
import { Disposable, DisposableStore, IDisposable, MutableDisposable } from '../../../../../../base/common/lifecycle.js';
import { autorun, autorunWithStore, derived, IObservable, observableValue, runOnChange, runOnChangeWithCancellationToken } from '../../../../../../base/common/observable.js';
import { IConfigurationService } from '../../../../../../platform/configuration/common/configuration.js';
import { IStorageService, StorageScope, StorageTarget } from '../../../../../../platform/storage/common/storage.js';
import { InlineEditsGutterIndicator } from './components/gutterIndicatorView.js';
import { IInlineEditHost, IInlineEditModel } from './inlineEditsViewInterface.js';
import { InlineEditsCollapsedView } from './inlineEditsViews/inlineEditsCollapsedView.js';
enum UserKind {
FirstTime = 'firstTime',
SecondTime = 'secondTime',
Active = 'active'
}
export class InlineEditsOnboardingExperience extends Disposable {
private readonly _disposables = this._register(new MutableDisposable());
private readonly _setupDone = observableValue({ name: 'setupDone' }, false);
private readonly _activeCompletionId = derived<string | undefined>(reader => {
const model = this._model.read(reader);
if (!model) { return undefined; }
if (!this._setupDone.read(reader)) { return undefined; }
const indicator = this._indicator.read(reader);
if (!indicator || !indicator.isVisible.read(reader)) { return undefined; }
return model.inlineEdit.inlineCompletion.id;
});
constructor(
private readonly _host: IObservable<IInlineEditHost | undefined>,
private readonly _model: IObservable<IInlineEditModel | undefined>,
private readonly _indicator: IObservable<InlineEditsGutterIndicator | undefined>,
private readonly _collapsedView: InlineEditsCollapsedView,
@IStorageService private readonly _storageService: IStorageService,
@IConfigurationService private readonly _configurationService: IConfigurationService,
) {
super();
this._register(this._initializeDebugSetting());
// Setup the onboarding experience for new users
if (this.getNewUserType() === UserKind.Active) { // todo: turn === into !== mid month
this._disposables.value = this.setupNewUserExperience();
}
// Existing users should not see the onboarding experience when turning on the onbarding experience
this._register(autorunWithStore((reader, store) => { // todo: remove mid month
const host = this._host.read(reader);
if (!host) { return; }
store.add(host.onDidAccept(() => {
this.setNewUserType(UserKind.Active);
}));
}));
this._setupDone.set(true, undefined);
}
private setupNewUserExperience(): IDisposable {
if (this.getNewUserType() === UserKind.Active) {
return Disposable.None;
}
const disposableStore = new DisposableStore();
let userHasHoveredOverIcon = false;
let inlineEditHasBeenAccepted = false;
let firstTimeUserAnimationCount = 0;
let secondTimeUserAnimationCount = 0;
// pulse animation for new users
disposableStore.add(runOnChangeWithCancellationToken(this._activeCompletionId, async (id, _, __, token) => {
if (id === undefined) { return; }
let userType = this.getNewUserType();
// User Kind Transition
switch (userType) {
case UserKind.FirstTime: {
if (firstTimeUserAnimationCount++ >= 5 || userHasHoveredOverIcon) {
userType = UserKind.SecondTime;
this.setNewUserType(userType);
}
break;
}
case UserKind.SecondTime: {
if (secondTimeUserAnimationCount++ >= 5 && inlineEditHasBeenAccepted) {
userType = UserKind.Active;
this.setNewUserType(userType);
}
break;
}
}
// Animation
switch (userType) {
case UserKind.FirstTime: {
for (let i = 0; i < 3 && !token.isCancellationRequested; i++) {
await this._indicator.get()?.triggerAnimation();
await timeout(500);
}
break;
}
case UserKind.SecondTime: {
this._indicator.get()?.triggerAnimation();
break;
}
}
}));
disposableStore.add(autorun(reader => {
if (this._collapsedView.isVisible.read(reader)) {
if (this.getNewUserType() !== UserKind.Active) {
this._collapsedView.triggerAnimation();
}
}
}));
// Remember when the user has hovered over the icon
disposableStore.add(autorunWithStore((reader, store) => {
const indicator = this._indicator.read(reader);
if (!indicator) { return; }
store.add(runOnChange(indicator.isHoveredOverIcon, async (isHovered) => {
if (isHovered) {
userHasHoveredOverIcon = true;
}
}));
}));
// Remember when the user has accepted an inline edit
disposableStore.add(autorunWithStore((reader, store) => {
const host = this._host.read(reader);
if (!host) { return; }
store.add(host.onDidAccept(() => {
inlineEditHasBeenAccepted = true;
}));
}));
return disposableStore;
}
private getNewUserType(): UserKind {
return this._storageService.get('inlineEditsGutterIndicatorUserKind', StorageScope.APPLICATION, UserKind.FirstTime) as UserKind;
}
private setNewUserType(value: UserKind): void {
switch (value) {
case UserKind.FirstTime:
throw new BugIndicatingError('UserKind should not be set to first time');
case UserKind.SecondTime:
break;
case UserKind.Active:
this._disposables.clear();
break;
}
this._storageService.store('inlineEditsGutterIndicatorUserKind', value, StorageScope.APPLICATION, StorageTarget.USER);
}
private _initializeDebugSetting(): IDisposable {
// Debug setting to reset the new user experience
const hiddenDebugSetting = 'editor.inlineSuggest.edits.resetNewUserExperience';
if (this._configurationService.getValue(hiddenDebugSetting)) {
this._storageService.remove('inlineEditsGutterIndicatorUserKind', StorageScope.APPLICATION);
}
const disposable = this._configurationService.onDidChangeConfiguration(e => {
if (e.affectsConfiguration(hiddenDebugSetting) && this._configurationService.getValue(hiddenDebugSetting)) {
this._storageService.remove('inlineEditsGutterIndicatorUserKind', StorageScope.APPLICATION);
}
});
return disposable;
}
}
@@ -22,6 +22,7 @@ import { TextModel } from '../../../../../common/model/textModel.js';
import { InlineEditsGutterIndicator } from './components/gutterIndicatorView.js';
import { InlineEditWithChanges } from './inlineEditWithChanges.js';
import { GhostTextIndicator, InlineEditHost, InlineEditModel } from './inlineEditsModel.js';
import { InlineEditsOnboardingExperience } from './inlineEditsNewUsers.js';
import { IInlineEditModel, InlineEditTabAction } from './inlineEditsViewInterface.js';
import { InlineEditsCollapsedView } from './inlineEditsViews/inlineEditsCollapsedView.js';
import { InlineEditsDeletionView } from './inlineEditsViews/inlineEditsDeletionView.js';
@@ -90,6 +91,9 @@ export class InlineEditsView extends Disposable {
this._wordReplacementViews.recomputeInitiallyAndOnChange(this._store);
this._indicatorCyclicDependencyCircuitBreaker.set(true, undefined);
this._register(this._instantiationService.createInstance(InlineEditsOnboardingExperience, this._host, this._model, this._indicator, this._inlineCollapsedView));
this._constructorDone.set(true, undefined); // TODO: remove and use correct initialization order
}
@@ -204,7 +208,6 @@ export class InlineEditsView extends Disposable {
this._editorObs,
indicatorDisplayRange,
this._gutterIndicatorOffset,
this._host,
modelWithGhostTextSupport,
this._inlineEditsIsHovered,
this._focusIsInMenu,
@@ -21,6 +21,7 @@ export interface IInlineEditsView {
}
export interface IInlineEditHost {
readonly onDidAccept: Event<void>;
inAcceptFlow: IObservable<boolean>;
}
@@ -7,6 +7,7 @@ import { IMouseEvent } from '../../../../../../../base/browser/mouseEvent.js';
import { Emitter } from '../../../../../../../base/common/event.js';
import { Disposable } from '../../../../../../../base/common/lifecycle.js';
import { constObservable, derived, IObservable } from '../../../../../../../base/common/observable.js';
import { IAccessibilityService } from '../../../../../../../platform/accessibility/common/accessibility.js';
import { asCssVariable } from '../../../../../../../platform/theme/common/colorUtils.js';
import { ICodeEditor } from '../../../../../../browser/editorBrowser.js';
import { ObservableCodeEditor, observableCodeEditor } from '../../../../../../browser/observableCodeEditor.js';
@@ -23,10 +24,14 @@ export class InlineEditsCollapsedView extends Disposable implements IInlineEdits
readonly onDidClick = this._onDidClick.event;
private readonly _editorObs: ObservableCodeEditor;
private readonly _iconRef = n.ref<SVGElement>();
readonly isVisible: IObservable<boolean>;
constructor(
private readonly _editor: ICodeEditor,
private readonly _edit: IObservable<InlineEditWithChanges | undefined>,
@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,
) {
super();
@@ -65,6 +70,27 @@ export class InlineEditsCollapsedView extends Disposable implements IInlineEdits
allowEditorOverflow: false,
minContentWidthInPx: constObservable(0),
}));
this.isVisible = this._edit.map((inlineEdit, reader) => !!inlineEdit && startPoint.read(reader) !== null);
}
public triggerAnimation(): Promise<Animation> {
if (this._accessibilityService.isMotionReduced()) {
return new Animation(null, null).finished;
}
// PULSE ANIMATION:
const animation = this._iconRef.element.animate([
{ offset: 0.00, transform: 'translateY(-3px)', },
{ offset: 0.20, transform: 'translateY(1px)', },
{ offset: 0.36, transform: 'translateY(-1px)', },
{ offset: 0.52, transform: 'translateY(1px)', },
{ offset: 0.68, transform: 'translateY(-1px)', },
{ offset: 0.84, transform: 'translateY(1px)', },
{ offset: 1.00, transform: 'translateY(0px)', },
], { duration: 2000 });
return animation.finished;
}
private getCollapsedIndicator(startPoint: IObservable<Point | null>) {
@@ -74,6 +100,7 @@ export class InlineEditsCollapsedView extends Disposable implements IInlineEdits
return n.svg({
class: 'collapsedView',
ref: this._iconRef,
style: {
position: 'absolute',
top: 0,
@@ -5,11 +5,10 @@
import { Color } from '../../../../../../base/common/color.js';
import { BugIndicatingError } from '../../../../../../base/common/errors.js';
import { IObservable } from '../../../../../../base/common/observable.js';
import { observableFromEventOpts } from '../../../../../../base/common/observableInternal/utils.js';
import { IObservable, observableFromEventOpts } from '../../../../../../base/common/observable.js';
import { localize } from '../../../../../../nls.js';
import { diffRemoved, diffInsertedLine, diffInserted, buttonBackground, buttonForeground, buttonSecondaryBackground, buttonSecondaryForeground, editorBackground } from '../../../../../../platform/theme/common/colorRegistry.js';
import { registerColor, transparent, darken, ColorIdentifier } from '../../../../../../platform/theme/common/colorUtils.js';
import { buttonBackground, buttonForeground, buttonSecondaryBackground, buttonSecondaryForeground, diffInserted, diffInsertedLine, diffRemoved, editorBackground } from '../../../../../../platform/theme/common/colorRegistry.js';
import { ColorIdentifier, darken, registerColor, transparent } from '../../../../../../platform/theme/common/colorUtils.js';
import { IThemeService } from '../../../../../../platform/theme/common/themeService.js';
import { InlineEditTabAction } from './inlineEditsViewInterface.js';
+11 -77
View File
@@ -12,6 +12,16 @@ import { KeyCode, KeyMod } from '../../../../base/common/keyCodes.js';
import { DisposableStore } from '../../../../base/common/lifecycle.js';
import { assertType } from '../../../../base/common/types.js';
import { URI } from '../../../../base/common/uri.js';
import * as nls from '../../../../nls.js';
import { Action2, registerAction2 } from '../../../../platform/actions/common/actions.js';
import { ConfigurationScope, Extensions, IConfigurationRegistry } from '../../../../platform/configuration/common/configurationRegistry.js';
import { ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js';
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
import { KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js';
import { ILogService } from '../../../../platform/log/common/log.js';
import { INotificationService } from '../../../../platform/notification/common/notification.js';
import { IEditorProgressService } from '../../../../platform/progress/common/progress.js';
import { Registry } from '../../../../platform/registry/common/platform.js';
import { ICodeEditor } from '../../../browser/editorBrowser.js';
import { EditorAction, EditorCommand, EditorContributionInstantiation, ServicesAccessor, registerEditorAction, registerEditorCommand, registerEditorContribution, registerModelAndPositionCommand } from '../../../browser/editorExtensions.js';
import { IBulkEditService } from '../../../browser/services/bulkEditService.js';
@@ -27,18 +37,7 @@ import { ILanguageFeaturesService } from '../../../common/services/languageFeatu
import { ITextResourceConfigurationService } from '../../../common/services/textResourceConfiguration.js';
import { CodeEditorStateFlag, EditorStateCancellationTokenSource } from '../../editorState/browser/editorState.js';
import { MessageController } from '../../message/browser/messageController.js';
import * as nls from '../../../../nls.js';
import { Action2, registerAction2 } from '../../../../platform/actions/common/actions.js';
import { ConfigurationScope, Extensions, IConfigurationRegistry } from '../../../../platform/configuration/common/configurationRegistry.js';
import { ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js';
import { IInstantiationService } from '../../../../platform/instantiation/common/instantiation.js';
import { KeybindingWeight } from '../../../../platform/keybinding/common/keybindingsRegistry.js';
import { ILogService } from '../../../../platform/log/common/log.js';
import { INotificationService } from '../../../../platform/notification/common/notification.js';
import { IEditorProgressService } from '../../../../platform/progress/common/progress.js';
import { Registry } from '../../../../platform/registry/common/platform.js';
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js';
import { CONTEXT_RENAME_INPUT_VISIBLE, NewNameSource, RenameWidget, RenameWidgetResult } from './renameWidget.js';
import { CONTEXT_RENAME_INPUT_VISIBLE, RenameWidget } from './renameWidget.js';
class RenameSkeleton {
@@ -151,7 +150,6 @@ class RenameController implements IEditorContribution {
@ILogService private readonly _logService: ILogService,
@ITextResourceConfigurationService private readonly _configService: ITextResourceConfigurationService,
@ILanguageFeaturesService private readonly _languageFeaturesService: ILanguageFeaturesService,
@ITelemetryService private readonly _telemetryService: ITelemetryService,
) {
this._renameWidget = this._disposableStore.add(this._instaService.createInstance(RenameWidget, this.editor, ['acceptRenameInput', 'acceptRenameInputWithPreview']));
}
@@ -254,10 +252,6 @@ class RenameController implements IEditorContribution {
);
trace('received response from rename input field');
if (newSymbolNamesProviders.length > 0) { // @ulugbekna: we're interested only in telemetry for rename suggestions currently
this._reportTelemetry(newSymbolNamesProviders.length, model.getLanguageId(), inputFieldResult);
}
// no result, only hint to focus the editor or not
if (typeof inputFieldResult === 'boolean') {
trace(`returning early - rename input field response - ${inputFieldResult}`);
@@ -343,66 +337,6 @@ class RenameController implements IEditorContribution {
focusPreviousRenameSuggestion(): void {
this._renameWidget.focusPreviousRenameSuggestion();
}
private _reportTelemetry(nRenameSuggestionProviders: number, languageId: string, inputFieldResult: boolean | RenameWidgetResult) {
type RenameInvokedEvent =
{
kind: 'accepted' | 'cancelled';
languageId: string;
nRenameSuggestionProviders: number;
/** provided only if kind = 'accepted' */
source?: NewNameSource['k'];
/** provided only if kind = 'accepted' */
nRenameSuggestions?: number;
/** provided only if kind = 'accepted' */
timeBeforeFirstInputFieldEdit?: number;
/** provided only if kind = 'accepted' */
wantsPreview?: boolean;
/** provided only if kind = 'accepted' */
nRenameSuggestionsInvocations?: number;
/** provided only if kind = 'accepted' */
hadAutomaticRenameSuggestionsInvocation?: boolean;
};
type RenameInvokedClassification = {
owner: 'ulugbekna';
comment: 'A rename operation was invoked.';
kind: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the rename operation was cancelled or accepted.' };
languageId: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Document language ID.' };
nRenameSuggestionProviders: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Number of rename providers for this document.' };
source?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether the new name came from the input field or rename suggestions.' };
nRenameSuggestions?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Number of rename suggestions user has got' };
timeBeforeFirstInputFieldEdit?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Milliseconds before user edits the input field for the first time' };
wantsPreview?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'If user wanted preview.' };
nRenameSuggestionsInvocations?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Number of times rename suggestions were invoked' };
hadAutomaticRenameSuggestionsInvocation?: { classification: 'SystemMetaData'; purpose: 'FeatureInsight'; comment: 'Whether rename suggestions were invoked automatically' };
};
const value: RenameInvokedEvent =
typeof inputFieldResult === 'boolean'
? {
kind: 'cancelled',
languageId,
nRenameSuggestionProviders,
}
: {
kind: 'accepted',
languageId,
nRenameSuggestionProviders,
source: inputFieldResult.stats.source.k,
nRenameSuggestions: inputFieldResult.stats.nRenameSuggestions,
timeBeforeFirstInputFieldEdit: inputFieldResult.stats.timeBeforeFirstInputFieldEdit,
wantsPreview: inputFieldResult.wantsPreview,
nRenameSuggestionsInvocations: inputFieldResult.stats.nRenameSuggestionsInvocations,
hadAutomaticRenameSuggestionsInvocation: inputFieldResult.stats.hadAutomaticRenameSuggestionsInvocation,
};
this._telemetryService.publicLog2<RenameInvokedEvent, RenameInvokedClassification>('renameInvokedEvent', value);
}
}
// ---- action implementation
@@ -174,9 +174,11 @@ export class QuickInputEditorContribution implements IEditorContribution {
return editor.getContribution<QuickInputEditorContribution>(QuickInputEditorContribution.ID);
}
readonly widget = new QuickInputEditorWidget(this.editor);
readonly widget: QuickInputEditorWidget;
constructor(private editor: ICodeEditor) { }
constructor(private editor: ICodeEditor) {
this.widget = new QuickInputEditorWidget(this.editor);
}
dispose(): void {
this.widget.dispose();
@@ -18,6 +18,7 @@ import { IContextViewService } from '../../contextview/browser/contextView.js';
import { IKeybindingService } from '../../keybinding/common/keybinding.js';
import { defaultListStyles } from '../../theme/browser/defaultStyles.js';
import { asCssVariable } from '../../theme/common/colorRegistry.js';
import { ILayoutService } from '../../layout/browser/layoutService.js';
export const acceptSelectedActionCommand = 'acceptSelectedCodeAction';
export const previewSelectedActionCommand = 'previewSelectedCodeAction';
@@ -182,10 +183,10 @@ export class ActionList<T> extends Disposable {
items: readonly IActionListItem<T>[],
private readonly _delegate: IActionListDelegate<T>,
@IContextViewService private readonly _contextViewService: IContextViewService,
@IKeybindingService private readonly _keybindingService: IKeybindingService
@IKeybindingService private readonly _keybindingService: IKeybindingService,
@ILayoutService private readonly _layoutService: ILayoutService,
) {
super();
this.domNode = document.createElement('div');
this.domNode.classList.add('actionList');
const virtualDelegate: IListVirtualDelegate<IActionListItem<T>> = {
@@ -270,7 +271,7 @@ export class ActionList<T> extends Disposable {
}
const maxVhPrecentage = 0.7;
const height = Math.min(heightWithHeaders, this.domNode.ownerDocument.body.clientHeight * maxVhPrecentage);
const height = Math.min(heightWithHeaders, this._layoutService.getContainer(dom.getWindow(this.domNode)).clientHeight * maxVhPrecentage);
this._list.layout(height, maxWidth);
this.domNode.style.height = `${height}px`;
@@ -23,13 +23,14 @@ export class DefaultConfiguration extends Disposable {
private readonly _onDidChangeConfiguration = this._register(new Emitter<{ defaults: ConfigurationModel; properties: string[] }>());
readonly onDidChangeConfiguration = this._onDidChangeConfiguration.event;
private _configurationModel = ConfigurationModel.createEmptyModel(this.logService);
private _configurationModel: ConfigurationModel;
get configurationModel(): ConfigurationModel {
return this._configurationModel;
}
constructor(private readonly logService: ILogService) {
super();
this._configurationModel = ConfigurationModel.createEmptyModel(logService);
}
async initialize(): Promise<ConfigurationModel> {
@@ -94,7 +95,7 @@ export class PolicyConfiguration extends Disposable implements IPolicyConfigurat
private readonly configurationRegistry: IConfigurationRegistry;
private _configurationModel = ConfigurationModel.createEmptyModel(this.logService);
private _configurationModel: ConfigurationModel;
get configurationModel() { return this._configurationModel; }
constructor(
@@ -103,6 +104,7 @@ export class PolicyConfiguration extends Disposable implements IPolicyConfigurat
@ILogService private readonly logService: ILogService
) {
super();
this._configurationModel = ConfigurationModel.createEmptyModel(this.logService);
this.configurationRegistry = Registry.as<IConfigurationRegistry>(Extensions.Configuration);
}
+2 -1
View File
@@ -283,7 +283,8 @@ export interface ICustomDialogOptions {
export interface ICustomDialogMarkdown {
readonly markdown: IMarkdownString;
readonly classes?: string[];
readonly dismissOnLinkClick?: boolean;
/** Custom link handler for markdown content, see {@link IContentActionHandler}. Defaults to {@link openLinkFromMarkdown}. */
actionHandler?(link: string): Promise<boolean>;
}
/**
@@ -30,6 +30,7 @@ import { StopWatch } from '../../../base/common/stopwatch.js';
import { format2 } from '../../../base/common/strings.js';
import { IAssignmentService } from '../../assignment/common/assignment.js';
import { ExtensionGalleryResourceType, Flag, getExtensionGalleryManifestResourceUri, IExtensionGalleryManifest, IExtensionGalleryManifestService } from './extensionGalleryManifest.js';
import { TelemetryTrustedValue } from '../../telemetry/common/telemetryUtils.js';
const CURRENT_TARGET_PLATFORM = isWeb ? TargetPlatform.WEB : getTargetPlatform(platform, arch);
const SEARCH_ACTIVITY_HEADER_NAME = 'X-Market-Search-Activity-Id';
@@ -198,9 +199,9 @@ type GalleryServiceQueryEvent = QueryTelemetryData & {
readonly statusCode?: string;
readonly errorCode?: string;
readonly count?: string;
readonly server?: string;
readonly endToEndId?: string;
readonly activityId?: string;
readonly server?: TelemetryTrustedValue<string>;
readonly endToEndId?: TelemetryTrustedValue<string>;
readonly activityId?: TelemetryTrustedValue<string>;
};
type GalleryServiceAdditionalQueryClassification = {
@@ -1379,9 +1380,10 @@ export abstract class AbstractExtensionGalleryService implements IExtensionGalle
}
}
private getHeaderValue(headers: IHeaders | undefined, name: string): string | undefined {
const value = headers?.[name.toLowerCase()];
return Array.isArray(value) ? value[0] : value;
private getHeaderValue(headers: IHeaders | undefined, name: string): TelemetryTrustedValue<string> | undefined {
const headerValue = headers?.[name.toLowerCase()];
const value = Array.isArray(headerValue) ? headerValue[0] : headerValue;
return value ? new TelemetryTrustedValue(value) : undefined;
}
private async getLatestRawGalleryExtension(extension: string, uri: URI, token: CancellationToken): Promise<IRawGalleryExtension | null> {
@@ -1453,9 +1455,9 @@ export abstract class AbstractExtensionGalleryService implements IExtensionGalle
host: string;
duration: number;
errorCode?: string;
server?: string;
activityId?: string;
endToEndId?: string;
server?: TelemetryTrustedValue<string>;
activityId?: TelemetryTrustedValue<string>;
endToEndId?: TelemetryTrustedValue<string>;
};
this.telemetryService.publicLog2<GalleryServiceGetLatestEvent, GalleryServiceGetLatestEventClassification>('galleryService:getLatest', {
extension,
@@ -1711,9 +1713,9 @@ export abstract class AbstractExtensionGalleryService implements IExtensionGalle
assetType: string;
message: string;
extensionVersion: string;
server?: string;
endToEndId?: string;
activityId?: string;
server?: TelemetryTrustedValue<string>;
endToEndId?: TelemetryTrustedValue<string>;
activityId?: TelemetryTrustedValue<string>;
};
this.telemetryService.publicLog2<GalleryServiceCDNFallbackEvent, GalleryServiceCDNFallbackClassification>('galleryService:cdnFallback', {
extension,
@@ -155,15 +155,15 @@ export abstract class AbstractExtensionsScannerService extends Disposable implem
private readonly _onDidChangeCache = this._register(new Emitter<ExtensionType>());
readonly onDidChangeCache = this._onDidChangeCache.event;
private readonly systemExtensionsCachedScanner = this._register(this.instantiationService.createInstance(CachedExtensionsScanner, this.currentProfile));
private readonly userExtensionsCachedScanner = this._register(this.instantiationService.createInstance(CachedExtensionsScanner, this.currentProfile));
private readonly extensionsScanner = this._register(this.instantiationService.createInstance(ExtensionsScanner));
private readonly systemExtensionsCachedScanner: CachedExtensionsScanner;
private readonly userExtensionsCachedScanner: CachedExtensionsScanner;
private readonly extensionsScanner: ExtensionsScanner;
constructor(
readonly systemExtensionsLocation: URI,
readonly userExtensionsLocation: URI,
private readonly extensionsControlLocation: URI,
private readonly currentProfile: IUserDataProfile,
currentProfile: IUserDataProfile,
@IUserDataProfilesService private readonly userDataProfilesService: IUserDataProfilesService,
@IExtensionsProfileScannerService protected readonly extensionsProfileScannerService: IExtensionsProfileScannerService,
@IFileService protected readonly fileService: IFileService,
@@ -175,6 +175,10 @@ export abstract class AbstractExtensionsScannerService extends Disposable implem
) {
super();
this.systemExtensionsCachedScanner = this._register(this.instantiationService.createInstance(CachedExtensionsScanner, currentProfile));
this.userExtensionsCachedScanner = this._register(this.instantiationService.createInstance(CachedExtensionsScanner, currentProfile));
this.extensionsScanner = this._register(this.instantiationService.createInstance(ExtensionsScanner));
this._register(this.systemExtensionsCachedScanner.onDidChangeCache(() => this._onDidChangeCache.fire(ExtensionType.System)));
this._register(this.userExtensionsCachedScanner.onDidChangeCache(() => this._onDidChangeCache.fire(ExtensionType.User)));
}

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