Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreadman committed Dec 12, 2024
2 parents c5fd256 + bee3e32 commit edd9e90
Show file tree
Hide file tree
Showing 111 changed files with 1,685 additions and 1,260 deletions.
10 changes: 5 additions & 5 deletions .vscode/notebooks/grooming.github-issues

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/lib/inlineMeta.js

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

2 changes: 1 addition & 1 deletion build/lib/inlineMeta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface IInlineMetaContext {

const packageJsonMarkerId = 'BUILD_INSERT_PACKAGE_CONFIGURATION';

// TODO@bpasero in order to inline `product.json`, more work is
// TODO in order to inline `product.json`, more work is
// needed to ensure that we cover all cases where modifications
// are done to the product configuration during build. There are
// at least 2 more changes that kick in very late:
Expand Down
2 changes: 2 additions & 0 deletions cli/src/bin/code/legacy_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ pub fn try_parse_legacy(
subcommand: ExtensionSubcommand::Install(InstallExtensionArgs {
id_or_path: exts,
pre_release: args.contains_key("pre-release"),
donot_include_pack_and_dependencies: args
.contains_key("do-not-include-pack-dependencies"),
force: args.contains_key("force"),
}),
desktop_code_options,
Expand Down
7 changes: 7 additions & 0 deletions cli/src/commands/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ impl ExtensionSubcommand {
if args.pre_release {
target.push("--pre-release".to_string());
}
if args.donot_include_pack_and_dependencies {
target.push("do-not-include-pack-dependencies".to_string());
}
if args.force {
target.push("--force".to_string());
}
Expand Down Expand Up @@ -333,6 +336,10 @@ pub struct InstallExtensionArgs {
#[clap(long)]
pub pre_release: bool,

/// Don't include installing pack and dependencies of the extension
#[clap(long)]
pub donot_include_pack_and_dependencies: bool,

/// Update to the latest version of the extension if it's already installed.
#[clap(long)]
pub force: bool,
Expand Down
1 change: 1 addition & 0 deletions cli/src/tunnels/code_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pub struct CodeServerArgs {
pub show_versions: bool,
pub category: Option<String>,
pub pre_release: bool,
pub donot_include_pack_and_dependencies: bool,
pub force: bool,
pub start_server: bool,
// connection tokens
Expand Down
6 changes: 3 additions & 3 deletions extensions/css-language-features/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"css.format.newlineBetweenRules.desc": "Separate rulesets by a blank line.",
"css.format.spaceAroundSelectorSeparator.desc": "Ensure a space character around selector separators '>', '+', '~' (e.g. `a > b`).",
"css.format.braceStyle.desc": "Put braces on the same line as rules (`collapse`) or put braces on own line (`expand`).",
"css.format.preserveNewLines.desc": "Whether existing line breaks before elements should be preserved.",
"css.format.preserveNewLines.desc": "Whether existing line breaks before rules and declarations should be preserved.",
"css.format.maxPreserveNewLines.desc": "Maximum number of line breaks to be preserved in one chunk, when `#css.format.preserveNewLines#` is enabled.",
"less.title": "LESS",
"less.completion.triggerPropertyValueCompletion.desc": "By default, VS Code triggers property value completion after selecting a CSS property. Use this setting to disable this behavior.",
Expand Down Expand Up @@ -69,7 +69,7 @@
"less.format.newlineBetweenRules.desc": "Separate rulesets by a blank line.",
"less.format.spaceAroundSelectorSeparator.desc": "Ensure a space character around selector separators '>', '+', '~' (e.g. `a > b`).",
"less.format.braceStyle.desc": "Put braces on the same line as rules (`collapse`) or put braces on own line (`expand`).",
"less.format.preserveNewLines.desc": "Whether existing line breaks before elements should be preserved.",
"less.format.preserveNewLines.desc": "Whether existing line breaks before rules and declarations should be preserved.",
"less.format.maxPreserveNewLines.desc": "Maximum number of line breaks to be preserved in one chunk, when `#less.format.preserveNewLines#` is enabled.",
"scss.title": "SCSS (Sass)",
"scss.completion.triggerPropertyValueCompletion.desc": "By default, VS Code triggers property value completion after selecting a CSS property. Use this setting to disable this behavior.",
Expand Down Expand Up @@ -103,7 +103,7 @@
"scss.format.newlineBetweenRules.desc": "Separate rulesets by a blank line.",
"scss.format.spaceAroundSelectorSeparator.desc": "Ensure a space character around selector separators '>', '+', '~' (e.g. `a > b`).",
"scss.format.braceStyle.desc": "Put braces on the same line as rules (`collapse`) or put braces on own line (`expand`).",
"scss.format.preserveNewLines.desc": "Whether existing line breaks before elements should be preserved.",
"scss.format.preserveNewLines.desc": "Whether existing line breaks before rules and declarations should be preserved.",
"scss.format.maxPreserveNewLines.desc": "Maximum number of line breaks to be preserved in one chunk, when `#scss.format.preserveNewLines#` is enabled.",
"css.colorDecorators.enable.deprecationMessage": "The setting `css.colorDecorators.enable` has been deprecated in favor of `editor.colorDecorators`.",
"scss.colorDecorators.enable.deprecationMessage": "The setting `scss.colorDecorators.enable` has been deprecated in favor of `editor.colorDecorators`.",
Expand Down
9 changes: 5 additions & 4 deletions extensions/git/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 extensions/git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3470,7 +3470,7 @@
]
},
"dependencies": {
"@joaomoreno/unique-names-generator": "^5.1.0",
"@joaomoreno/unique-names-generator": "^5.2.0",
"@vscode/extension-telemetry": "^0.9.0",
"@vscode/iconv-lite-umd": "0.7.0",
"byline": "^5.0.0",
Expand Down
4 changes: 3 additions & 1 deletion extensions/json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
],
"filenames": [
"babel.config.json",
"bun.lock",
".babelrc.json",
".ember-cli",
"typedoc.json"
Expand All @@ -74,7 +75,8 @@
"JSON Lines"
],
"extensions": [
".jsonl"
".jsonl",
".ndjson"
],
"filenames": [],
"configuration": "./language-configuration.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@

import * as vscode from 'vscode';
import { DocumentSelector } from '../configuration/documentSelector';
import { LanguageDescription } from '../configuration/languageDescription';
import { API } from '../tsServer/api';
import protocol from '../tsServer/protocol/protocol';
import * as typeConverters from '../typeConverters';
import { ClientCapability, ITypeScriptServiceClient } from '../typescriptService';
import FileConfigurationManager from './fileConfigurationManager';
import { conditionalRegistration, requireGlobalConfiguration, requireMinVersion, requireSomeCapability } from './util/dependentRegistration';
import protocol from '../tsServer/protocol/protocol';
import { API } from '../tsServer/api';
import { LanguageDescription } from '../configuration/languageDescription';

class CopyMetadata {
constructor(
Expand Down Expand Up @@ -48,6 +49,7 @@ class DocumentPasteProvider implements vscode.DocumentPasteEditProvider {
constructor(
private readonly _modeId: string,
private readonly _client: ITypeScriptServiceClient,
private readonly fileConfigurationManager: FileConfigurationManager,
) { }

async prepareDocumentPaste(document: vscode.TextDocument, ranges: readonly vscode.Range[], dataTransfer: vscode.DataTransfer, token: vscode.CancellationToken) {
Expand All @@ -60,10 +62,10 @@ class DocumentPasteProvider implements vscode.DocumentPasteEditProvider {
return;
}

const response = await this._client.execute('preparePasteEdits', {
const response = await this._client.interruptGetErr(() => this._client.execute('preparePasteEdits', {
file,
copiedTextSpan: ranges.map(typeConverters.Range.toTextSpan),
}, token);
}, token));
if (token.isCancellationRequested || response.type !== 'response' || !response.body) {
return;
}
Expand Down Expand Up @@ -115,13 +117,17 @@ class DocumentPasteProvider implements vscode.DocumentPasteEditProvider {
return;
}

const response = await this._client.interruptGetErr(() => this._client.execute('getPasteEdits', {
file,
// TODO: only supports a single paste for now
pastedText: [text],
pasteLocations: ranges.map(typeConverters.Range.toTextSpan),
copiedFrom
}, token));
const response = await this._client.interruptGetErr(() => {
this.fileConfigurationManager.ensureConfigurationForDocument(document, token);

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

export function register(selector: DocumentSelector, language: LanguageDescription, client: ITypeScriptServiceClient) {
export function register(selector: DocumentSelector, language: LanguageDescription, client: ITypeScriptServiceClient, fileConfigurationManager: FileConfigurationManager) {
return conditionalRegistration([
requireSomeCapability(client, ClientCapability.Semantic),
requireMinVersion(client, API.v570),
requireGlobalConfiguration(language.id, enabledSettingId),
], () => {
return vscode.languages.registerDocumentPasteEditProvider(selector.semantic, new DocumentPasteProvider(language.id, client), {
return vscode.languages.registerDocumentPasteEditProvider(selector.semantic, new DocumentPasteProvider(language.id, client, fileConfigurationManager), {
providedPasteEditKinds: [DocumentPasteProvider.kind],
copyMimeTypes: [DocumentPasteProvider.metadataMimeType],
pasteMimeTypes: [DocumentPasteProvider.metadataMimeType],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { conditionalRegistration, requireGlobalConfiguration } from './util/depe
class TypeScriptFormattingProvider implements vscode.DocumentRangeFormattingEditProvider, vscode.OnTypeFormattingEditProvider {
public constructor(
private readonly client: ITypeScriptServiceClient,
private readonly formattingOptionsManager: FileConfigurationManager
private readonly fileConfigurationManager: FileConfigurationManager
) { }

public async provideDocumentRangeFormattingEdits(
Expand All @@ -29,7 +29,7 @@ class TypeScriptFormattingProvider implements vscode.DocumentRangeFormattingEdit
return undefined;
}

await this.formattingOptionsManager.ensureConfigurationOptions(document, options, token);
await this.fileConfigurationManager.ensureConfigurationOptions(document, options, token);

const args = typeConverters.Range.toFormattingRequestArgs(file, range);
const response = await this.client.execute('format', args, token);
Expand All @@ -52,7 +52,7 @@ class TypeScriptFormattingProvider implements vscode.DocumentRangeFormattingEdit
return [];
}

await this.formattingOptionsManager.ensureConfigurationOptions(document, options, token);
await this.fileConfigurationManager.ensureConfigurationOptions(document, options, token);

const args: Proto.FormatOnKeyRequestArgs = {
...typeConverters.Position.toFileLocationRequestArgs(file, position),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class LanguageProvider extends Disposable {
import('./languageFeatures/codeLens/implementationsCodeLens').then(provider => this._register(provider.register(selector, this.description, this.client, cachedNavTreeResponse))),
import('./languageFeatures/codeLens/referencesCodeLens').then(provider => this._register(provider.register(selector, this.description, this.client, cachedNavTreeResponse))),
import('./languageFeatures/completions').then(provider => this._register(provider.register(selector, this.description, this.client, this.typingsStatus, this.fileConfigurationManager, this.commandManager, this.telemetryReporter, this.onCompletionAccepted))),
import('./languageFeatures/copyPaste').then(provider => this._register(provider.register(selector, this.description, this.client))),
import('./languageFeatures/copyPaste').then(provider => this._register(provider.register(selector, this.description, this.client, this.fileConfigurationManager))),
import('./languageFeatures/definitions').then(provider => this._register(provider.register(selector, this.client))),
import('./languageFeatures/directiveCommentCompletions').then(provider => this._register(provider.register(selector, this.client))),
import('./languageFeatures/documentHighlight').then(provider => this._register(provider.register(selector, this.client))),
Expand Down
9 changes: 5 additions & 4 deletions src/vs/base/browser/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2189,22 +2189,23 @@ export function h(tag: string, ...args: [] | [attributes: { $: string } & Partia
return result;
}

/** @deprecated This is a duplication of the h function. Needs cleanup. */
export function svgElem<TTag extends string>
(tag: TTag):
TagToRecord<TTag> extends infer Y ? { [TKey in keyof Y]: Y[TKey] } : never;

/** @deprecated This is a duplication of the h function. Needs cleanup. */
export function svgElem<TTag extends string, T extends Child[]>
(tag: TTag, children: [...T]):
(ArrayToObj<T> & TagToRecord<TTag>) extends infer Y ? { [TKey in keyof Y]: Y[TKey] } : never;

/** @deprecated This is a duplication of the h function. Needs cleanup. */
export function svgElem<TTag extends string>
(tag: TTag, attributes: Partial<ElementAttributes<TagToElement<TTag>>>):
TagToRecord<TTag> extends infer Y ? { [TKey in keyof Y]: Y[TKey] } : never;

/** @deprecated This is a duplication of the h function. Needs cleanup. */
export function svgElem<TTag extends string, T extends Child[]>
(tag: TTag, attributes: Partial<ElementAttributes<TagToElement<TTag>>>, children: [...T]):
(ArrayToObj<T> & TagToRecord<TTag>) extends infer Y ? { [TKey in keyof Y]: Y[TKey] } : never;

/** @deprecated This is a duplication of the h function. Needs cleanup. */
export function svgElem(tag: string, ...args: [] | [attributes: { $: string } & Partial<ElementAttributes<HTMLElement>> | Record<string, any>, children?: any[]] | [children: any[]]): Record<string, HTMLElement> {
let attributes: { $?: string } & Partial<ElementAttributes<HTMLElement>>;
let children: (Record<string, HTMLElement> | HTMLElement)[] | undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/vs/base/browser/ui/inputbox/inputBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export class InputBox extends Widget {
this.tooltip = tooltip;
if (!this.hover.value) {
this.hover.value = this._register(getBaseLayerHoverDelegate().setupDelayedHoverAtMouse(this.input, () => ({
content: tooltip,
content: this.tooltip,
appearance: {
compact: true,
}
Expand Down
4 changes: 2 additions & 2 deletions src/vs/base/browser/ui/tree/abstractTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { IToggleStyles, Toggle, unthemedToggleStyles } from '../toggle/toggle.js
import { getVisibleState, isFilterResult } from './indexTreeModel.js';
import { ICollapseStateChangeEvent, ITreeContextMenuEvent, ITreeDragAndDrop, ITreeEvent, ITreeFilter, ITreeModel, ITreeModelSpliceEvent, ITreeMouseEvent, ITreeNavigator, ITreeNode, ITreeRenderer, TreeDragOverBubble, TreeError, TreeFilterResult, TreeMouseEventTarget, TreeVisibility } from './tree.js';
import { Action } from '../../../common/actions.js';
import { distinct, equals, range } from '../../../common/arrays.js';
import { distinct, equals, insertInto, range } from '../../../common/arrays.js';
import { Delayer, disposableTimeout, timeout } from '../../../common/async.js';
import { Codicon } from '../../../common/codicons.js';
import { ThemeIcon } from '../../../common/themables.js';
Expand Down Expand Up @@ -3089,7 +3089,7 @@ export abstract class AbstractTree<T, TFilterData, TRef> implements IDisposable
state.expanded[getId(node.element)] = node.collapsed ? 0 : 1;
}

queue.push(...node.children);
insertInto(queue, queue.length, node.children);
}

return state;
Expand Down
Loading

0 comments on commit edd9e90

Please sign in to comment.