Skip to content

Commit

Permalink
Joh/swift cicada (#11)
Browse files Browse the repository at this point in the history
* primary button

* debug: treat 'subtle' frames like 'deemphasized' (microsoft#209078)

To be closer to DAP

Fixes microsoft#206801

* debug: fix resizing window makes debug toolbar disappear (microsoft#209075)

Fixes microsoft#208895

Should work but testing on aux windows was limited due to microsoft#209073

* trees: always handle an twistie events by the tree if it changes collapsed state (microsoft#209090)

This allows preserving your multi-selection while expanding/collapsing other nodes in the tree. I think this is a good overall change to make across our UI. E.g. similarly, without this change, you can't expand a folder in the Explorer view without losing your selection state. cc @joaomoreno

Fixes microsoft#208852

* Adjust scheme and authority of URIs in remote terminals

Fixes microsoft#208572

* Also check file scheme

* Apply environment when selecting default profile as well

Fixes microsoft#204167

* Add ... suffix to new with profile actions

Fixes microsoft#208655

* Add git bash to shell integration description

* Remove notebook view from focus order & accessibility tree when hidden (microsoft#209059)

* Remove notebook view from focus order when hidden

* Set `inert` on the correct container

* Use IconSelectBox to change terminal icon, remove dupes

Fixes microsoft#199964

* testing: fix resolveHandler not called on item replacement (microsoft#209121)

Fixes microsoft#207574

* remove experimental setting (microsoft#209126)

* Remove terminal change icon tests as they required quick pick

* chore: bump katex (microsoft#209141)

* get request to show up in chat view

* Update src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.ts

* Update src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.ts

* Also fire an event when focus & selection goes to empty (microsoft#209145)

Fixes microsoft#209074

* Port followups candidate to main (microsoft#209203)

Fix followups going to participant ID (microsoft#209114)

Fix microsoft/vscode-copilot#4861

* Remove 'session' from transfer API (microsoft#209204)

* Fix typo in editor.action.startDebugTextMate title (microsoft#209160)

TextMate is one word.

* Remove other icon smoke tests

* Limit drop disablement to just http(s) uris (microsoft#209240)

For microsoft#209239

* Introduce ITerminalConfigurationService

Part of microsoft#181900

* Docs

* Adopt terminal config service in terminalActions

* Adopt terminal config service in terminalEditor

* Adopt terminal config service in more files

* Move more to terminal config service

* Remove ITerminalConfigHelper.config completely

Part of microsoft#181900

* Init TerminalConfigurationService

* Test for TerminalConfigurationService

* Pick up editor action command descriptions (microsoft#209259)

Continuation of microsoft#193937 and microsoft#197442

This adds the command descriptions of editor actions to the ICommandQuickPick results so that those results can be picked up by the "similar commands" feature.

Example:

I can add:
```
metadata: {
    description: nls.localize2('test', "xyz"),
}
```
to the [AddLineCommentAction](https://github.com/microsoft/vscode/blob/7d788e70b95c79718b565ff9e255858db4cc74b3/src/vs/editor/contrib/comment/browser/comment.ts#L105)... and then when I search "xyz" it'll show up.

* Fix leak in terminalConfigHelper.test

* Include Command Description in `_getAllCommands` (microsoft#209260)

This is important information for the command so we should include it in this response.

* Move wsl recommendations out of config helper and into contribution

Part of microsoft#181900

* Fix tests

* Fix XtermTerminal.test

* fix microsoft#209167

* Enable dnd in chat references list (microsoft#209263)

* Fix tests for reals this time

* Pick up latest TS for building VS Code (microsoft#209265)

* fix microsoft#207946

* move a line

* clean up

* Remove xterm triggerDataEvent private API usage

* Make types more correct

* Remove _onData access

* Don't use stateful regex (microsoft#209268)

Fixes microsoft#209254

* Remove _onKey access

* Remove _charSizeService access

* Remove unneeded lint suppression

* Remove unused event emitter type

* Remove hack for canvas to force a refresh

I can no longer reproduce this issue and it was a big hack regardless.
Will track issues for any mentioned of bad resizes on the canvas
renderer.

* testing: fix testing-coverage-lineHeight being marked as a color (microsoft#209273)

* De-select output for `focus cell container` commands (microsoft#209269)

* pass message to de-select when container is selected from output

* clear selection in more cases

* Remove xterm canvas renderer from fallback logic

This simplifies things a lot, the plan is to remove the canvas renderer
completely from VS Code if all goes well (microsoft#209276).

Fixes microsoft#209275

* get insert kb to work in input editor

* eng: fix CSS tooling crashes watch task (microsoft#209278)

Get rid of the gulp-postcss plugin and just implement our own, I couldn't get it to work.

Fixes microsoft#207827

* just add as secondary

* Update src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.ts

* Update src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.ts

* Remove isMeasurement (microsoft#209287)

* Remove isMeaasurement from the typing

* Remove isMeasurement

* fix microsoft#146972

* Migrate rest of TerminalConfigHelper to TerminalConfigurationService

Fixes microsoft#181900

* Replace label computer ctor in test

* Remove safari check to use webgl

* remove extra width from aiButton (microsoft#209295)

* Fix hygiene

* use disposableStore

* notebook output performance (microsoft#209282)

* record perf data for notebook outputs

* debounce event per cell

* send size info, emit directly from perf message listener

* fix classification details

* better names

* Fix test failures due to private mangling

* Add `windowOptions` to xtermTerminal

* SCM - Add support for filtering history item changes (microsoft#209327)

* Support Shift+Up/Down keys in notebook outputs (microsoft#209314)

* Fixes microsoft#209324

* Fix opening folders in file picker (microsoft#209330)

Part of microsoft#208937

* SCM - 💄 API cleanup (microsoft#209339)

* SCM - 💄 API cleanup

* Fix compilation

* fix 208710 (microsoft#209343)

* fix syncing profiles (microsoft#209336)

fix microsoft#208710

* bailout if profile with same name exists already

* make it sync

* Fixes microsoft#209251

* add and use ChatInputPart#contentHeight (microsoft#209345)

fixes https://github.com/microsoft/vscode-copilot/issues/4727

* SCM - use custom hover for history item statistics (microsoft#209346)

* Move onto ITerminalConfigurationService

* Bring terminal editor's mousedown handling closer in line with tabbed view

* Use switch, allow Linux to paste regular clipboard too

* Improve setting description

* docs: categorize chat-list-background as other (microsoft#209303)

* Add experimental support for updating markdown links on copy/paste (microsoft#209319)

* Add experimental support for updating markdown links on copy/paste

For microsoft#209318

* Remove log

* use abstract class

* swap lines

* implement as classes

* Logging navigible container events for debug

* make isPresent optional

* Update src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignalLineFeatureContribution.ts

* Log only when config is enabled

* Enable terminal smoke tests on desktop

Fixes microsoft#146811

* exthost: fix profiling not working (microsoft#209142)

* exthost: fix profiling not working

Fixes microsoft#194678. Requires jrieken/v8-inspect-profiler#3 to be merged and published in order to pass the 'host' down.

* bump package

* Inline completion refactoring (microsoft#209011)

* Fix leaks in terminalTabsList

Fixes microsoft#207462

* Fix leaks in terminalInstance dnd

Fixes microsoft#207459

* Fix leaks in hoverService

Fixes microsoft#207454

* Support any OSC link scheme

Fixes microsoft#176812

* SCM - add history item hover (microsoft#209373)

* allow input elements to handle keydown events (microsoft#209362)

* fix microsoft#191745

* move declaration near usage

* chore: increase timeout of Linux x64 job (microsoft#209387)

* Allow via notification

* Fix search text input issues (microsoft#209365)

Fixes microsoft#209361

* fix issue

* api comment (microsoft#209410)

* render inline chat change decoration also inside minimap (microsoft#209414)

* remove restore on profile item (microsoft#209416)

* Engineering - update suppression file (microsoft#209419)

* chore - add `IInstantiationService#dispose` (microsoft#209421)

* Support setting keyboard shortcut from Action Item Context Menu (microsoft#209431)

fixes microsoft#208221

* Introduce hoverDelegate2.ts

Part of microsoft#204965

* Set base delegate, fix imports

* ICustomHover -> IUpdatableHover

* Remove duplicate/deprecated IHoverAction

* Move updatable hover interfaces to hover.ts

* Create IHoverDelegate2.setUpdatableHover

* Add deprecated annotations to old functions

* Move statusBarItem onto new hoverService.setupUpdatableHover

* More adoption, improve deprecated messages

* Remove all usage of setupCustomHover from base/

* Update majority of workbench references to setupCustomHover

* Remove all remaining usages of setupCustomHover

* Remove updatableHoverWidget.ts

* Stub null hover service in some tests

* Fix null access (microsoft#209449)

* Update tab bar colors (microsoft#209451)

tab bar colors debt

* Fix output vsbuffer transfer via workspace edit. (microsoft#209358)

* Fix output vsbuffer transfer via workspace edit.

* Adopt interface change.

* fix microsoft#209091 (microsoft#209454)

* support `vscode.ChatResponseTextEditPart` and support rendering of text edits in chat widget (using the diff editor)

* chore: add new colours (microsoft#209457)

* use disposableStore

* Add CLI cleaning regex (microsoft#209462)

* fix microsoft#152476

* Enable copy paste api in scm input (microsoft#209466)

* Enable dnd and copy paste apis in scm input

For microsoft#209460

Enables dropping or pasting a file from the vscode/system explorer into the scminput to insert the file name. Currently nothing happens when you try this

In the future will also allow extensions to hook into these apis

* Revert organize imports

* Remove duplication

* fix: trim end of matched link (microsoft#209469)

* dispose saved text model with wrong view type (microsoft#209461)

* fix microsoft#184454

* rm empty line

* web: add didResolveRemoteAuthority function for embedders (microsoft#209480)

* Clean up some tests, fix some leaks

* cli: allow public port forwarding via tunnels (microsoft#209489)

* fix microsoft#209487

* chore: increase compile job timeout (microsoft#209497)

* cli: add progress for extraction (microsoft#209499)

For https://github.com/microsoft/vscode-remote-tunnels/issues/724

* Convert Workspace Cell Edit dto to renderer types (microsoft#209498)

* Hide notebook chat actions from f1. (microsoft#209501)

* Fix injected services becoming public by mistake (microsoft#209513)

* Fix injected services becoming public by mistake

Fixes cases of `@IFooService readonly foo: IFooService`. This makes the service public, which is likely not expected and also means we can't mangle it

* Fix name

* Remove unused props

* - extract `IChatListItemRendererOptions`
- use diff editor hiding of unchanged regions
- simpler code compare block (for now)

* Add descriptions for commands microsoft#209511 (microsoft#209524)

* fix microsoft#209441 (microsoft#209526)

* Add color item for sidebar title background (microsoft#209528)

fixes microsoft#209164

* Count replies, not comments (microsoft#209527)

Fixes microsoft/vscode-pull-request-github#5869

* 💄

* Fix tab indicator size when tab action left and tab sizing fixed/shrink (microsoft#209532)

fixes microsoft#207003

* removing issue reporter API (microsoft#209125)

* first snap

* sent the comments to the shadow realm

* one comment we forgot to remove :(

* fix microsoft#207101

* move audio cue config to new file

* rename, move things around

* add accessibility signals to l8n

* add scope

* accessibility signals

* more descriptions

* Add todos for shellIntegration API from API sync

Part of microsoft#145234

* add discard description

* Update src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.ts

* fix microsoft#207813 (microsoft#209553)

* Add eslint rule for potentially unsafe disposable patterns (microsoft#209555)

`DisposableStore`/`MutableDisposable` properties should almost always be `readonly`. Otherwise it's easy to accidentally overwrite the property and leak the previous value. This commonly happens with code such as:

```ts
class Foo {
     private disposables = new DisposableStore();

     bar() {
         this.disposables = new DisposableStore(); // leaks old values
         ...
     }
```

This change adds an eslint rule to enforce this and adopts `readonly` for the caught cases. I only needed to add 2 suppression comments, which seems like an acceptable tradeoff for helping catch a common mistake

* Bump @typescript-eslint versions (microsoft#209516)

6.x is the latest release that supports our current node target

* Fix frontmatter line map (microsoft#209556)

Fixes microsoft#209267

* Fix typo from old code (microsoft#209557)

fix long standing typo

* Add command description (microsoft#209558)

For microsoft#209511

* testing: remove back compat shims for coverage API (microsoft#209559)

Now that the API is finalized, remove the back compat shims that were in place

* chore: update to rust 1.77 (microsoft#209563)

* chore: update to rust 1.77

* fix tests

* debug: add some command descriptions (microsoft#209570)

For microsoft#209511

* Pick up latest md language service (microsoft#209574)

* feat. add a menu item 'expand-select' to expand subtree in search view (microsoft#206033)

* feat. add a menu item 'Expand All' to expand subtree

* feat. update menu text

* Strongly typed instead of `any` for nb config (microsoft#209493)

* Strongly types instead of `any` for nb config

* fix swapped setting fallbacks

* Address review comments

---------

Co-authored-by: Michael Lively <milively@microsoft.com>

* Update borders on template reuse. (microsoft#209577)

* fix: deprecate unity-launch flag (microsoft#209471)

* Clean up chat submit actions (microsoft#209578)

* Align submit/send actions in chat

* Clean up chat submit actions

* Make all remote chat agents sticky (microsoft#209579)

* fix: add open user settings JSON description (microsoft#209583)

* Fix leak (microsoft#209588)

Fix microsoft#208621

* Set role on lightbulb widget (microsoft#209592)

* Add tree sticky scroll colors based on view location fixes microsoft#205441

* Expose comments input as text document (microsoft#209512)

* Expose comments input as text document

Fixes https://github.com/microsoft/vscode-pull-request-github/issues/5875
For microsoft#209508

Exposes comment input editors as text documents that extensions can see. Enables a few features in them too such as 'paste as' and 'drop into'

* Small fixes

* Enable markers in comments

* Fix async

* Fix comment buttons on the top

---------

Co-authored-by: Alex Ross <alros@microsoft.com>

* Adding command descriptions for TF-IDF search (microsoft#209612)

adding descriptions

* debt - `arrays.ts#tail` can return `undefined` (microsoft#209631)

* Fixing typo in description (microsoft#209630)

fixing typo

* Bump distro (microsoft#209636)

* add `StableEditorBottomScrollState` so that inline chat moves lines of interest less (microsoft#209637)

there is still some movement because the height of the zone changes through out the request

* chore - remove arrays#tail, use `array.at(-1)` instead

---------

Co-authored-by: meganrogge <megan.rogge@microsoft.com>
Co-authored-by: Connor Peet <connor@peet.io>
Co-authored-by: Megan Rogge <merogge@microsoft.com>
Co-authored-by: Daniel Imms <2193314+Tyriar@users.noreply.github.com>
Co-authored-by: Kyle Cutler <67761731+kycutler@users.noreply.github.com>
Co-authored-by: Aaron Munger <aamunger@microsoft.com>
Co-authored-by: Raymond Zhao <7199958+rzhao271@users.noreply.github.com>
Co-authored-by: Tyler James Leonhardt <me@tylerleonhardt.com>
Co-authored-by: Rob Lourens <roblourens@gmail.com>
Co-authored-by: George Garside <grg.garside@gmail.com>
Co-authored-by: Matt Bierner <matb@microsoft.com>
Co-authored-by: Logan Ramos <lramos15@gmail.com>
Co-authored-by: Andrea Mah <31675041+andreamah@users.noreply.github.com>
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
Co-authored-by: Ladislau Szomoru <3372902+lszomoru@users.noreply.github.com>
Co-authored-by: Don Jayamanne <don.jayamanne@outlook.com>
Co-authored-by: Henning Dieterichs <hdieterichs@microsoft.com>
Co-authored-by: Alex Ross <alros@microsoft.com>
Co-authored-by: Sandeep Somavarapu <sasomava@microsoft.com>
Co-authored-by: Johannes Rieken <johannes.rieken@gmail.com>
Co-authored-by: hsfzxjy <hsfzxjy@gmail.com>
Co-authored-by: Benjamin Christopher Simmonds <44439583+benibenj@users.noreply.github.com>
Co-authored-by: Peng Lyu <penn.lv@gmail.com>
Co-authored-by: Justin Chen <54879025+justschen@users.noreply.github.com>
Co-authored-by: Michael Lively <milively@microsoft.com>
Co-authored-by: Premium <pagict@gmail.com>
Co-authored-by: BeniBenj <besimmonds@microsoft.com>
Co-authored-by: Aiday Marlen Kyzy <amarlenkyzy@microsoft.com>
  • Loading branch information
1 parent 737491a commit a4f3101
Show file tree
Hide file tree
Showing 1,773 changed files with 68,944 additions and 31,397 deletions.
37 changes: 37 additions & 0 deletions .eslintplugin/code-no-potentially-unsafe-disposables.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*---------------------------------------------------------------------------------------------
* 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';

/**
* Checks for potentially unsafe usage of `DisposableStore` / `MutableDisposable`.
*
* These have been the source of leaks in the past.
*/
export = new class implements eslint.Rule.RuleModule {

create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
function checkVariableDeclaration(inNode: any) {
context.report({
node: inNode,
message: `Use const for 'DisposableStore' to avoid leaks by accidental reassignment.`
});
}

function checkProperty(inNode: any) {
context.report({
node: inNode,
message: `Use readonly for DisposableStore/MutableDisposable to avoid leaks through accidental reassignment.`
});
}

return {
'VariableDeclaration[kind!="const"] NewExpression[callee.name="DisposableStore"]': checkVariableDeclaration,

'PropertyDefinition[readonly!=true][typeAnnotation.typeAnnotation.typeName.name=/DisposableStore|MutableDisposable/]': checkProperty,
'PropertyDefinition[readonly!=true] NewExpression[callee.name=/DisposableStore|MutableDisposable/]': checkProperty,
};
}
};
Original file line number Diff line number Diff line change
@@ -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 * as eslint from 'eslint';
import { TSESTree } from '@typescript-eslint/experimental-utils';

/**
* Enforces that all parameter properties have an explicit access modifier (public, protected, private).
*
* This catches a common bug where a service is accidentally made public by simply writing: `readonly prop: Foo`
*/
export = new class implements eslint.Rule.RuleModule {

create(context: eslint.Rule.RuleContext): eslint.Rule.RuleListener {
function check(inNode: any) {
const node: TSESTree.TSParameterProperty = inNode;

// For now, only apply to injected services
const firstDecorator = node.decorators?.at(0);
if (
firstDecorator?.expression.type !== 'Identifier'
|| !firstDecorator.expression.name.endsWith('Service')
) {
return;
}

if (!node.accessibility) {
context.report({
node: inNode,
message: 'Parameter properties must have an explicit access modifier.'
});
}
}

return {
['TSParameterProperty']: check,
};
}
};
11 changes: 7 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@
],
"local/code-translation-remind": "warn",
"local/code-no-native-private": "warn",
"local/code-parameter-properties-must-have-explicit-accessibility": "warn",
"local/code-no-nls-in-standalone-editor": "warn",
"local/code-no-potentially-unsafe-disposables": "warn",
"local/code-no-standalone-editor": "warn",
"local/code-no-unexternalized-strings": "warn",
"local/code-must-use-super-dispose": "warn",
Expand Down Expand Up @@ -154,14 +156,11 @@
"src/vs/editor/contrib/codeAction/test/browser/codeActionModel.test.ts",
"src/vs/editor/test/common/services/languageService.test.ts",
"src/vs/editor/test/node/classification/typescript.test.ts",
"src/vs/editor/test/node/diffing/defaultLinesDiffComputer.test.ts",
"src/vs/editor/test/node/diffing/fixtures.test.ts",
"src/vs/platform/configuration/test/common/configuration.test.ts",
"src/vs/platform/extensions/test/common/extensionValidator.test.ts",
"src/vs/platform/opener/test/common/opener.test.ts",
"src/vs/platform/registry/test/common/platform.test.ts",
"src/vs/platform/remote/test/common/remoteHosts.test.ts",
"src/vs/platform/telemetry/test/browser/1dsAppender.test.ts",
"src/vs/platform/workspace/test/common/workspace.test.ts",
"src/vs/platform/workspaces/test/electron-main/workspaces.test.ts",
"src/vs/workbench/api/test/browser/mainThreadConfiguration.test.ts",
Expand Down Expand Up @@ -859,7 +858,11 @@
}, // TODO@layers
"tas-client-umd", // node module allowed even in /common/
"vscode-textmate", // node module allowed even in /common/
"@vscode/vscode-languagedetection" // node module allowed even in /common/
"@vscode/vscode-languagedetection", // node module allowed even in /common/
{
"when": "hasBrowser",
"pattern": "@xterm/xterm"
} // node module allowed even in /browser/
]
},
{
Expand Down
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ensure the API police is aware of changes to the vscode-dts file
# this is only about the final API, not about proposed API changes
src/vscode-dts/vscode.d.ts @jrieken @mjbvz
15 changes: 11 additions & 4 deletions .github/workflows/deep-classifier-runner.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
name: "Deep Classifier: Runner"

permissions:
id-token: write
contents: read

on:
schedule:
- cron: 0 * * * *
Expand All @@ -9,7 +14,13 @@ on:
jobs:
main:
runs-on: ubuntu-latest
environment: main
steps:
- uses: azure/login@v2
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
allow-no-subscriptions: true
- name: Checkout Actions
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -47,8 +58,4 @@ jobs:
with:
configPath: classifier
allowLabels: "info-needed|new release|error-telemetry|*english-please|translation-required"
tenantId: ${{secrets.TOOLS_TENANT_ID}}
clientId: ${{secrets.TOOLS_CLIENT_ID}}
clientSecret: ${{secrets.TOOLS_CLIENT_SECRET}}
clientScope: ${{secrets.TOOLS_CLIENT_SCOPE}}
token: ${{secrets.VSCODE_ISSUE_TRIAGE_BOT_PAT}}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ npm-debug.log
Thumbs.db
node_modules/
.build/
.vscode/extensions/**/out/
extensions/**/dist/
/out*/
/extensions/**/out/
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.17.1
18.19.0
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"editorconfig.editorconfig",
"github.vscode-pull-request-github",
"ms-vscode.vscode-github-issue-notebooks",
"ms-vscode.vscode-selfhost-test-provider",
"ms-vscode.extension-test-runner",
"jrieken.vscode-pr-pinger"
]
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
78 changes: 78 additions & 0 deletions .vscode/extensions/vscode-selfhost-test-provider/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"name": "vscode-selfhost-test-provider",
"displayName": "VS Code Selfhost Test Provider",
"description": "Test provider for the VS Code project",
"enabledApiProposals": [
"testObserver"
],
"engines": {
"vscode": "^1.88.0"
},
"contributes": {
"commands": [
{
"command": "selfhost-test-provider.updateSnapshot",
"title": "Update Snapshot",
"icon": "$(merge)"
}
],
"menus": {
"commandPalette": [
{
"command": "selfhost-test-provider.updateSnapshot",
"when": "false"
}
],
"testing/message/context": [
{
"command": "selfhost-test-provider.updateSnapshot",
"group": "inline@1",
"when": "testMessage == isSelfhostSnapshotMessage && !testResultOutdated"
}
],
"testing/message/content": [
{
"command": "selfhost-test-provider.updateSnapshot",
"when": "testMessage == isSelfhostSnapshotMessage && !testResultOutdated"
}
]
}
},
"icon": "icon.png",
"version": "0.4.0",
"publisher": "ms-vscode",
"categories": [
"Other"
],
"activationEvents": [
"workspaceContains:src/vs/loader.js"
],
"workspaceTrust": {
"request": "onDemand",
"description": "Trust is required to execute tests in the workspace."
},
"main": "./out/extension.js",
"prettier": {
"printWidth": 100,
"singleQuote": true,
"tabWidth": 2,
"arrowParens": "avoid"
},
"repository": {
"type": "git",
"url": "https://github.com/microsoft/vscode.git"
},
"license": "MIT",
"scripts": {
"compile": "gulp compile-extension:vscode-selfhost-test-provider",
"watch": "gulp watch-extension:vscode-selfhost-test-provider"
},
"devDependencies": {
"@types/node": "18.x"
},
"dependencies": {
"@jridgewell/trace-mapping": "^0.3.25",
"ansi-styles": "^5.2.0",
"istanbul-to-vscode": "^2.0.1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/

import { IstanbulCoverageContext } from 'istanbul-to-vscode';

export const coverageContext = new IstanbulCoverageContext();
29 changes: 29 additions & 0 deletions .vscode/extensions/vscode-selfhost-test-provider/src/debounce.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/

/**
* Debounces the function call for an interval.
*/
export function debounce(duration: number, fn: () => void): (() => void) & { clear: () => void } {
let timeout: NodeJS.Timeout | void;
const debounced = () => {
if (timeout !== undefined) {
clearTimeout(timeout);
}

timeout = setTimeout(() => {
timeout = undefined;
fn();
}, duration);
};

debounced.clear = () => {
if (timeout) {
clearTimeout(timeout);
timeout = undefined;
}
};

return debounced;
}
Loading

0 comments on commit a4f3101

Please sign in to comment.