Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 13.7k
Add string literal completions for package.jsonimports field#57718
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
238651d2adb14c22b614808eaa16083c5b8b48f75207f6c3c117415adb0d416294c7da0d0b881475c0b1a0ea1b9c00448be96bd5ac36d20a0f4a6f8675938348b2c7856a1563b84468aa80cdfa96209a917b2aae22e4d49a18104e36bed48File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -201,6 +201,7 @@ import { | ||||||||||||||||||||||||||||
| getParseTreeNode, | ||||||||||||||||||||||||||||
| getPathComponents, | ||||||||||||||||||||||||||||
| getPathFromPathComponents, | ||||||||||||||||||||||||||||
| getRelativePathFromDirectory, | ||||||||||||||||||||||||||||
| getRelativePathToDirectoryOrUrl, | ||||||||||||||||||||||||||||
| getResolutionModeOverride, | ||||||||||||||||||||||||||||
| getRootLength, | ||||||||||||||||||||||||||||
| @@ -496,6 +497,7 @@ import { | ||||||||||||||||||||||||||||
| ResolvedModuleWithFailedLookupLocations, | ||||||||||||||||||||||||||||
| ResolvedTypeReferenceDirective, | ||||||||||||||||||||||||||||
| ResolvedTypeReferenceDirectiveWithFailedLookupLocations, | ||||||||||||||||||||||||||||
| resolvePath, | ||||||||||||||||||||||||||||
| returnFalse, | ||||||||||||||||||||||||||||
| ReturnStatement, | ||||||||||||||||||||||||||||
| returnUndefined, | ||||||||||||||||||||||||||||
| @@ -6493,6 +6495,21 @@ export function getPossibleOriginalInputExtensionForExtension(path: string): Ext | ||||||||||||||||||||||||||||
| [Extension.Tsx, Extension.Ts, Extension.Jsx, Extension.Js]; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| /** @internal */ | ||||||||||||||||||||||||||||
| export function getPossibleOriginalInputPathWithoutChangingExt( | ||||||||||||||||||||||||||||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is kinda a reverse of TypeScript/src/compiler/emitter.ts Lines 542 to 554 in 3fca8c8
| ||||||||||||||||||||||||||||
| filePath: string, | ||||||||||||||||||||||||||||
| ignoreCase: boolean, | ||||||||||||||||||||||||||||
| outputDir: string | undefined, | ||||||||||||||||||||||||||||
| getCommonSourceDirectory: () => string, | ||||||||||||||||||||||||||||
| ): string { | ||||||||||||||||||||||||||||
| return outputDir ? | ||||||||||||||||||||||||||||
| resolvePath( | ||||||||||||||||||||||||||||
| getCommonSourceDirectory(), | ||||||||||||||||||||||||||||
| getRelativePathFromDirectory(outputDir, filePath, ignoreCase), | ||||||||||||||||||||||||||||
| ) : | ||||||||||||||||||||||||||||
| filePath; | ||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||
| * Returns 'undefined' if and only if 'options.paths' is undefined. | ||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1148,7 +1148,7 @@ export class FileSystem { | ||||||||||||
| for (const key of Object.keys(files)) { | ||||||||||||
| const value = normalizeFileSetEntry(files[key]); | ||||||||||||
| const path = dirname ? vpath.resolve(dirname, key) : key; | ||||||||||||
| vpath.validate(path, vpath.ValidationFlags.Absolute); | ||||||||||||
| vpath.validate(path, vpath.ValidationFlags.Absolute | vpath.ValidationFlags.AllowWildcard); | ||||||||||||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have no idea if this is completely correct. I added it to make pathCompletionsPackageJsonImportsSrcNoDistWildcard6 pass as it's using I have added that test based on the existing pathCompletionsPackageJsonExportsWildcard6. The difference is that the test I have added is a The existing one validates here: TypeScript/src/harness/vfsUtil.ts Lines 1104 to 1108 in b8e4ed8
And the On the other hand, the Member There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ron Buckton (@rbuckton) can you advise? | ||||||||||||
| // eslint-disable-next-line no-restricted-syntax | ||||||||||||
| if (value === null || value === undefined || value instanceof Rmdir || value instanceof Unlink) { | ||||||||||||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.