Skip to content

Add vscode.Uri to types for vscode.RelativePattern's base parameter#111155

Merged
bpasero merged 1 commit intomicrosoft:masterfrom
dsanders11:relative-pattern-uri
Nov 24, 2020
Merged

Add vscode.Uri to types for vscode.RelativePattern's base parameter#111155
bpasero merged 1 commit intomicrosoft:masterfrom
dsanders11:relative-pattern-uri

Conversation

@dsanders11
Copy link
Member

This PR fixes #111154.

It's a little more than just syntactic sugar, since using a vscode.Uri will set baseFolder which means the path doesn't need to be re-parsed back into a vscode.Uri, as is done in a couple parts of the codebase if baseFolder is not set.

@jrieken jrieken assigned bpasero and unassigned jrieken Nov 24, 2020
@bpasero bpasero added this to the November 2020 milestone Nov 24, 2020
@bpasero bpasero merged commit 5987e40 into microsoft:master Nov 24, 2020
* relative to the base path.
*/
constructor(base: WorkspaceFolder | string, pattern: string)
constructor(base: Uri | WorkspaceFolder | string, pattern: string)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jsdoc tag seems outdated (already before this change)

if (typeof base === 'string') {
this.base = base;
} else if (URI.isUri(base)) {
this.baseFolder = base;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a baseFolder? Also, what is baseFolder and is it API creep? It's not declared in vscode.d.ts

@bpasero
Copy link
Member

bpasero commented Nov 24, 2020

Will follow up, the questions are relevant even before this change and originate from a change I did: 782c941

@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2021
@dsanders11 dsanders11 deleted the relative-pattern-uri branch October 13, 2022 21:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add vscode.Uri to types for vscode.RelativePattern.base

3 participants