[typescript-language-features] Fix autoImportFileExcludePatterns format to work on Windows#202762
Merged
mjbvz merged 3 commits intomicrosoft:mainfrom Mar 13, 2024
Merged
[typescript-language-features] Fix autoImportFileExcludePatterns format to work on Windows#202762mjbvz merged 3 commits intomicrosoft:mainfrom
mjbvz merged 3 commits intomicrosoft:mainfrom
Conversation
andrewbranch
commented
Jan 18, 2024
| // it with a path root (e.g. `/` or `c:\`) | ||
| const wildcardPrefix = this.client.apiVersion.gte(API.v540) | ||
| ? '' | ||
| : path.parse(this.client.toTsFilePath(workspaceFolder)!).root; |
Member
Author
There was a problem hiding this comment.
@mjbvz can you help confirm that this non-null assertion is safe here? I looked at the implementation and the only way it can return undefined is
if (fileSchemes.disabledSchemes.has(resource.scheme)) {
return undefined;
}I feel like we wouldn’t make it this far if that were the case for the workspace folder, but I’m not confident.
Member
Author
|
@mjbvz I just noticed this is still open. Could you take a look? Thanks! |
mjbvz
approved these changes
Mar 12, 2024
jrieken
approved these changes
Mar 13, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes microsoft/TypeScript#56415
Fixes microsoft/TypeScript#55781
Counterpart to microsoft/TypeScript#57090. The TypeScript change mostly fixes things on its own, but this change provides a 99% fix even when using an older TS Server version.