Skip to content

Commit

Permalink
Merge pull request microsoft#1792 from microsoft/connor4312/1.82
Browse files Browse the repository at this point in the history
v1.82
  • Loading branch information
connor4312 authored Aug 30, 2023
2 parents 72c0276 + 43ab1c2 commit bf9c6e6
Show file tree
Hide file tree
Showing 6 changed files with 199 additions and 18 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This changelog records changes to stable releases since 1.50.2. "TBA" changes he

## Nightly (only)

Nothing, yet

## v1.82 (August 2023)

- feat: allow basic webassembly debugging ([vscode#102181](https://github.com/microsoft/vscode/issues/102181))
- feat: add `Symbol.for("debug.description")` as a way to generate object descriptions ([vscode#102181](https://github.com/microsoft/vscode/issues/102181))
- feat: adopt supportTerminateDebuggee for browsers and node ([#1733](https://github.com/microsoft/vscode-js-debug/issues/1733))
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "js-debug",
"displayName": "JavaScript Debugger",
"version": "1.81.0",
"version": "1.82.0",
"publisher": "ms-vscode",
"author": {
"name": "Microsoft Corporation"
Expand Down
191 changes: 184 additions & 7 deletions src/typings/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1733,6 +1733,11 @@ declare module 'vscode' {
*/
kind?: QuickPickItemKind;

/**
* The icon path or {@link ThemeIcon} for the QuickPickItem.
*/
iconPath?: Uri | { light: Uri; dark: Uri } | ThemeIcon;

/**
* A human-readable string which is rendered less prominent in the same line. Supports rendering of
* {@link ThemeIcon theme icons} via the `$(<name>)`-syntax.
Expand Down Expand Up @@ -4145,6 +4150,26 @@ declare module 'vscode' {
* signaled by returning `undefined`, `null`, or an empty array.
*/
provideDocumentRangeFormattingEdits(document: TextDocument, range: Range, options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;


/**
* Provide formatting edits for multiple ranges in a document.
*
* This function is optional but allows a formatter to perform faster when formatting only modified ranges or when
* formatting a large number of selections.
*
* The given ranges are hints and providers can decide to format a smaller
* or larger range. Often this is done by adjusting the start and end
* of the range to full syntax nodes.
*
* @param document The document in which the command was invoked.
* @param ranges The ranges which should be formatted.
* @param options Options controlling formatting.
* @param token A cancellation token.
* @return A set of text edits or a thenable that resolves to such. The lack of a result can be
* signaled by returning `undefined`, `null`, or an empty array.
*/
provideDocumentRangesFormattingEdits?(document: TextDocument, ranges: Range[], options: FormattingOptions, token: CancellationToken): ProviderResult<TextEdit[]>;
}

/**
Expand Down Expand Up @@ -7160,10 +7185,10 @@ declare module 'vscode' {
readonly extensionPath: string;

/**
* Gets the extension's environment variable collection for this workspace, enabling changes
* to be applied to terminal environment variables.
* Gets the extension's global environment variable collection for this workspace, enabling changes to be
* applied to terminal environment variables.
*/
readonly environmentVariableCollection: EnvironmentVariableCollection;
readonly environmentVariableCollection: GlobalEnvironmentVariableCollection;

/**
* Get the absolute path of a resource contained in the extension.
Expand Down Expand Up @@ -10392,6 +10417,44 @@ declare module 'vscode' {
* An optional interface to implement drag and drop in the tree view.
*/
dragAndDropController?: TreeDragAndDropController<T>;

/**
* By default, when the children of a tree item have already been fetched, child checkboxes are automatically managed based on the checked state of the parent tree item.
* If the tree item is collapsed by default (meaning that the children haven't yet been fetched) then child checkboxes will not be updated.
* To override this behavior and manage child and parent checkbox state in the extension, set this to `true`.
*
* Examples where {@link TreeViewOptions.manageCheckboxStateManually} is false, the default behavior:
*
* 1. A tree item is checked, then its children are fetched. The children will be checked.
*
* 2. A tree item's parent is checked. The tree item and all of it's siblings will be checked.
* - [ ] Parent
* - [ ] Child 1
* - [ ] Child 2
* When the user checks Parent, the tree will look like this:
* - [x] Parent
* - [x] Child 1
* - [x] Child 2
*
* 3. A tree item and all of it's siblings are checked. The parent will be checked.
* - [ ] Parent
* - [ ] Child 1
* - [ ] Child 2
* When the user checks Child 1 and Child 2, the tree will look like this:
* - [x] Parent
* - [x] Child 1
* - [x] Child 2
*
* 4. A tree item is unchecked. The parent will be unchecked.
* - [x] Parent
* - [x] Child 1
* - [x] Child 2
* When the user unchecks Child 1, the tree will look like this:
* - [ ] Parent
* - [ ] Child 1
* - [x] Child 2
*/
manageCheckboxStateManually?: boolean;
}

/**
Expand Down Expand Up @@ -10608,6 +10671,16 @@ declare module 'vscode' {
readonly value: number;
}

/**
* An event describing the change in a tree item's checkbox state.
*/
export interface TreeCheckboxChangeEvent<T> {
/**
* The items that were checked or unchecked.
*/
readonly items: ReadonlyArray<[T, TreeItemCheckboxState]>;
}

/**
* Represents a Tree view
*/
Expand Down Expand Up @@ -10643,6 +10716,11 @@ declare module 'vscode' {
*/
readonly onDidChangeVisibility: Event<TreeViewVisibilityChangeEvent>;

/**
* An event to signal that an element or root has either been checked or unchecked.
*/
readonly onDidChangeCheckboxState: Event<TreeCheckboxChangeEvent<T>>;

/**
* An optional human-readable message that will be rendered in the view.
* Setting the message to null, undefined, or empty string will remove the message from the view.
Expand Down Expand Up @@ -10824,6 +10902,12 @@ declare module 'vscode' {
*/
accessibilityInformation?: AccessibilityInformation;

/**
* {@link TreeItemCheckboxState TreeItemCheckboxState} of the tree item.
* {@link TreeDataProvider.onDidChangeTreeData onDidChangeTreeData} should be fired when {@link TreeItem.checkboxState checkboxState} changes.
*/
checkboxState?: TreeItemCheckboxState | { readonly state: TreeItemCheckboxState; readonly tooltip?: string; readonly accessibilityInformation?: AccessibilityInformation };

/**
* @param label A human-readable string describing this item
* @param collapsibleState {@link TreeItemCollapsibleState} of the tree item. Default is {@link TreeItemCollapsibleState.None}
Expand Down Expand Up @@ -10872,6 +10956,20 @@ declare module 'vscode' {
highlights?: [number, number][];
}

/**
* Checkbox state of the tree item
*/
export enum TreeItemCheckboxState {
/**
* Determines an item is unchecked
*/
Unchecked = 0,
/**
* Determines an item is checked
*/
Checked = 1
}

/**
* Value-object describing what options a terminal should use.
*/
Expand Down Expand Up @@ -11236,6 +11334,23 @@ declare module 'vscode' {
Prepend = 3
}

/**
* Options applied to the mutator.
*/
export interface EnvironmentVariableMutatorOptions {
/**
* Apply to the environment just before the process is created. Defaults to false.
*/
applyAtProcessCreation?: boolean;

/**
* Apply to the environment in the shell integration script. Note that this _will not_ apply
* the mutator if shell integration is disabled or not working for some reason. Defaults to
* false.
*/
applyAtShellIntegration?: boolean;
}

/**
* A type of mutation and its value to be applied to an environment variable.
*/
Expand All @@ -11249,6 +11364,11 @@ declare module 'vscode' {
* The value to use for the variable.
*/
readonly value: string;

/**
* Options applied to the mutator.
*/
readonly options: EnvironmentVariableMutatorOptions;
}

/**
Expand Down Expand Up @@ -11278,8 +11398,10 @@ declare module 'vscode' {
*
* @param variable The variable to replace.
* @param value The value to replace the variable with.
* @param options Options applied to the mutator, when no options are provided this will
* default to `{ applyAtProcessCreation: true }`.
*/
replace(variable: string, value: string): void;
replace(variable: string, value: string, options?: EnvironmentVariableMutatorOptions): void;

/**
* Append a value to an environment variable.
Expand All @@ -11289,8 +11411,10 @@ declare module 'vscode' {
*
* @param variable The variable to append to.
* @param value The value to append to the variable.
* @param options Options applied to the mutator, when no options are provided this will
* default to `{ applyAtProcessCreation: true }`.
*/
append(variable: string, value: string): void;
append(variable: string, value: string, options?: EnvironmentVariableMutatorOptions): void;

/**
* Prepend a value to an environment variable.
Expand All @@ -11300,8 +11424,10 @@ declare module 'vscode' {
*
* @param variable The variable to prepend.
* @param value The value to prepend to the variable.
* @param options Options applied to the mutator, when no options are provided this will
* default to `{ applyAtProcessCreation: true }`.
*/
prepend(variable: string, value: string): void;
prepend(variable: string, value: string, options?: EnvironmentVariableMutatorOptions): void;

/**
* Gets the mutator that this collection applies to a variable, if any.
Expand Down Expand Up @@ -11331,6 +11457,39 @@ declare module 'vscode' {
clear(): void;
}

/**
* A collection of mutations that an extension can apply to a process environment. Applies to all scopes.
*/
export interface GlobalEnvironmentVariableCollection extends EnvironmentVariableCollection {
/**
* Gets scope-specific environment variable collection for the extension. This enables alterations to
* terminal environment variables solely within the designated scope, and is applied in addition to (and
* after) the global collection.
*
* Each object obtained through this method is isolated and does not impact objects for other scopes,
* including the global collection.
*
* @param scope The scope to which the environment variable collection applies to.
*
* If a scope parameter is omitted, collection applicable to all relevant scopes for that parameter is
* returned. For instance, if the 'workspaceFolder' parameter is not specified, the collection that applies
* across all workspace folders will be returned.
*
* @return Environment variable collection for the passed in scope.
*/
getScoped(scope: EnvironmentVariableScope): EnvironmentVariableCollection;
}

/**
* The scope object to which the environment variable collection applies.
*/
export interface EnvironmentVariableScope {
/**
* Any specific workspace folder to get collection for.
*/
workspaceFolder?: WorkspaceFolder;
}

/**
* A location in the editor at which progress information can be shown. It depends on the
* location how progress is visually represented.
Expand Down Expand Up @@ -15902,7 +16061,7 @@ declare module 'vscode' {
* @param id The unique identifier of the provider.
* @param label The human-readable name of the provider.
* @param provider The authentication provider provider.
* @params options Additional options for the provider.
* @param options Additional options for the provider.
* @return A {@link Disposable} that unregisters this provider when being disposed.
*/
export function registerAuthenticationProvider(id: string, label: string, provider: AuthenticationProvider, options?: AuthenticationProviderOptions): Disposable;
Expand Down Expand Up @@ -16226,6 +16385,24 @@ declare module 'vscode' {
*/
createTestItem(id: string, label: string, uri?: Uri): TestItem;

/**
* Marks an item's results as being outdated. This is commonly called when
* code or configuration changes and previous results should no longer
* be considered relevant. The same logic used to mark results as outdated
* may be used to drive {@link TestRunRequest.continuous continuous test runs}.
*
* If an item is passed to this method, test results for the item and all of
* its children will be marked as outdated. If no item is passed, then all
* test owned by the TestController will be marked as outdated.
*
* Any test runs started before the moment this method is called, including
* runs which may still be ongoing, will be marked as outdated and deprioritized
* in the editor's UI.
*
* @param item Item to mark as outdated. If undefined, all the controller's items are marked outdated.
*/
invalidateTestResults(items?: TestItem | readonly TestItem[]): void;

/**
* Unregisters the test controller, disposing of its associated tests
* and unpersisted results.
Expand Down
14 changes: 7 additions & 7 deletions src/typings/vscode.proposed.portsAttributes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ declare module 'vscode' {
*/
Notify = 1,
/**
* Once the port is forwarded, open the browser to the forwarded port.
* Once the port is forwarded, open the user's web browser to the forwarded port.
*/
OpenBrowser = 2,
/**
Expand All @@ -30,11 +30,7 @@ declare module 'vscode' {
/**
* Do not forward the port.
*/
Ignore = 5,
/**
* Once the port is forwarded, open the browser to the forwarded port. Only open the browser the first time the port is forwarded in a session.
*/
OpenBrowserOnce = 6
Ignore = 5
}

/**
Expand Down Expand Up @@ -62,8 +58,12 @@ declare module 'vscode' {
* Provides attributes for the given port. For ports that your extension doesn't know about, simply
* return undefined. For example, if `providePortAttributes` is called with ports 3000 but your
* extension doesn't know anything about 3000 you should return undefined.
* @param port The port number of the port that attributes are being requested for.
* @param pid The pid of the process that is listening on the port. If the pid is unknown, undefined will be passed.
* @param commandLine The command line of the process that is listening on the port. If the command line is unknown, undefined will be passed.
* @param token A cancellation token that indicates the result is no longer needed.
*/
providePortAttributes(port: number, pid: number | undefined, commandLine: string | undefined, token: CancellationToken): ProviderResult<PortAttributes>;
providePortAttributes(attributes: { port: number; pid?: number; commandLine?: string }, token: CancellationToken): ProviderResult<PortAttributes>;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/ui/portAttributesProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class JsDebugPortAttributesProvider
/**
* @inheritdoc
*/
public async providePortAttributes(port: number, pid: number | undefined) {
public async providePortAttributes({ port, pid }: { port: number; pid?: number }) {
if (pid && this.cachedResolutions.includes(`${port}:${pid}`)) {
return { port, autoForwardAction: PortAutoForwardAction.Ignore };
}
Expand Down

0 comments on commit bf9c6e6

Please sign in to comment.