Uh oh!
There was an error while loading. Please reload this page.
Use more nodelike paths for import types when possible - #24610
Merged
Wesley Wigham (weswigham) merged 3 commits intoJun 5, 2018
Merged
Conversation
Wesley Wigham (weswigham)
requested review from
Mohamed Hegazy (mhegazy) and Ron Buckton (rbuckton)June 1, 2018 23:29
Mohamed Hegazy (mhegazy)
commented
Jun 3, 2018
Contributor
We have the code to this in the services. We use it to generate import quick fixes. |
Wesley Wigham (weswigham)force-pushed
the
basic-import-path-nodification
branch
from
June 4, 2018 19:30
3543ffb to
052d1a2CompareWesley Wigham (weswigham)
commented
Jun 4, 2018
MemberAuthor
Mohamed Hegazy (@mhegazy) Moved, patched |
Wesley Wigham (weswigham)force-pushed
the
basic-import-path-nodification
branch
from
June 4, 2018 19:33
052d1a2 to
d79d781Compare…/directory conflict handling
Wesley Wigham (weswigham)force-pushed
the
basic-import-path-nodification
branch
from
June 4, 2018 19:33
d79d781 to
ebfda15CompareMohamed Hegazy (mhegazy)
commented
Jun 4, 2018
Contributor
Sheetal Nandi (@sheetalkamat) and Andy (Andrewkraft) (@Andy-MS) can you please review this change. |
Sheetal Nandi (sheetalkamat)
approved these changes
Jun 4, 2018
| const extensions = getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, { extension: "json", isMixedContent: false, scriptKind: ScriptKind.JSON }]); | ||
| for (const e of extensions) { | ||
| const fullPath = path + e; | ||
| if (host.fileExists!(fullPath)) { |
There was a problem hiding this comment.
Might want to mark this with #18217
Deleted user (ghost)
approved these changes
Jun 4, 2018
Wesley Wigham (weswigham) added a commit
to weswigham/TypeScript
that referenced
this pull request
Jun 12, 2018
* Use more nodelike paths for import types when possible * move functionality from services into compiler, fix with propert file/directory conflict handling * mark suspect cast
This was referenced Mar 13, 2021
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 freeto 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.
Partial fix for #24599
A complete fix (ie, one where
/indexis also removed and maybe wherepackage.json's get walked backward) requires a much more complex reverse resolver to check there's no directory/file conflicts (in the case of/index) and for file contents (in the case of reversing apackage.json). If we think that's worth doing, we can; but this simple change of stripping the leading relative part makes the output as portable as is usually expected.