-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix export path patterns with .d.ts target extensions in AutoImportProvider #55815
Conversation
@@ -2212,7 +2212,11 @@ function loadEntrypointsFromExportMap( | |||
scope.packageDirectory, | |||
extensionsToExtensionsArray(extensions), | |||
/*excludes*/ undefined, | |||
[changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target))], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was turning *.d.ts
into *.d.d.ts
? target.replace("*", "**/*") | ||
: changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't wait for CodeQL to complain about these
[changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target))], | ||
[ | ||
isDeclarationFileName(target) | ||
? target.replace("*", "**/*") |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding
[ | ||
isDeclarationFileName(target) | ||
? target.replace("*", "**/*") | ||
: changeAnyExtension(target.replace("*", "**/*"), getDeclarationEmitExtensionForPath(target)), |
Check failure
Code scanning / CodeQL
Incomplete string escaping or encoding
Fixes #53116 (a corner case of the 5.2 feature not working)