Uh oh!
There was an error while loading. Please reload this page.
Add string literal completions for package.jsonimports field - #57718
Conversation
| } | ||
| /** @internal */ | ||
| export function getPossibleOriginalInputPathWithoutChangingExt( |
There was a problem hiding this comment.
this is kinda a reverse of getOutputPathWithoutChangingExt:
TypeScript/src/compiler/emitter.ts
Lines 542 to 554 in 3fca8c8
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Mateusz Burzyński (Andarist)
commented
Mar 11, 2024
Andrew Branch (@andrewbranch) I opened this as a draft because there are some minor cleanups to be done here. I'd appreciate an early review here though - in case there is something fundamentally wrong with this. |
Uh oh!
There was an error while loading. Please reload this page.
Mateusz Burzyński (@Andarist) did you still want to pursue this? We're looking to get this done in the TS 5.7 timeframe. |
Mateusz Burzyński (Andarist)
commented
Aug 23, 2024
Daniel Rosenwasser (@DanielRosenwasser) yes, it would be great if Andrew Branch (@andrewbranch) could give this a quick look to check if im not doing anything overly wrong so I dont spend too much time on cleaning up things that will turn out to be wrong in the end ;p |
Andrew Branch (andrewbranch)
left a comment
There was a problem hiding this comment.
Yeah, this looks on the right track to me, thanks!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Mateusz Burzyński (Andarist)
commented
Sep 25, 2024
Andrew Branch (@andrewbranch) thanks for the review! I’ll try to clean this up asap |
…letions # Conflicts: # src/compiler/utilities.ts # src/services/stringCompletions.ts
06559e9 to
22b6148Compare| 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); |
There was a problem hiding this comment.
I have no idea if this is completely correct. I added it to make pathCompletionsPackageJsonImportsSrcNoDistWildcard6 pass as it's using ? in the component path component.
I have added that test based on the existing pathCompletionsPackageJsonExportsWildcard6. The difference is that the test I have added is a fourslash/server test and it follows a slightly different codepath.
The existing one validates here:
TypeScript/src/harness/vfsUtil.ts
Lines 1104 to 1108 in b8e4ed8
And the ValidationFlags.AllowWildcard was added there here
On the other hand, the fourslash/server validates here, where I'm adding this comment. This codepath was added as part of #20763 - which proceeds the PR that introduced ValidationFlags.AllowWildcard. So perhaps this was just a harmless omission in that newer PR. I don't know why this is a flag in the first place though so 🤷♂️
There was a problem hiding this comment.
Ron Buckton (@rbuckton) can you advise?
Mateusz Burzyński (Andarist)
commented
Oct 17, 2024
Andrew Branch (@andrewbranch) it's ready for re-review :) I could also use a build of this to test it more easily in a real project, and not only in the test harness ;p cc Jake Bailey (@jakebailey) |
Jake Bailey (jakebailey)
commented
Oct 31, 2024
TypeScript Bot (@typescript-bot) pack this |
Hey Jake Bailey (@jakebailey), I've packed this into an installable tgz. You can install it for testing by referencing it in your and then running There is also a playground for this build and an npm module you can use via |
Jake Bailey (jakebailey)
left a comment
There was a problem hiding this comment.
I think this is okay; the FS thing I think is also fine? Everything passes...
closes#52460
closes#57680
closes#57777
Currently, this only has tests based on #55015 but I still have to add more