Skip to content

Use the currentDirectory of the project as projectRootPath in the typings request - #21107

Merged
Sheetal Nandi (sheetalkamat) merged 2 commits into
masterfrom
inferredProjectTypings
Jan 10, 2018
Merged

Sheetal Nandi (sheetalkamat) merged 2 commits into
masterfrom
inferredProjectTypings

Conversation

@sheetalkamat

@sheetalkamat Sheetal Nandi (sheetalkamat) commented Jan 10, 2018 •

Copy link
Copy Markdown
Member

Instead of using custom logic for getting projectRoot for typings request, use the current directory for the project. Earlier for inferred projects the projectRootPath to typings request was "" which meant to use the directory returned by sys.getCurrentDirectory was used. So if there was package json and node modules present in that directory, the typings were picked up from those and returned as relative path (because projectRootPath was not absolute path) resulting in discrepancy between what typings returned and what project could use. Using current directory of the project ensures that projectRoot sent to the typings request is never empty string and always absolute path and also guarantees the correctness of location to look for typings.
Fixes #21040 and #20964

…ct root path

This ensures that we arent picking typings from folder different from the current directory for the project
@sheetalkamat
Sheetal Nandi (sheetalkamat) deleted the inferredProjectTypings branch January 10, 2018 19:40
Sheetal Nandi (sheetalkamat) added a commit that referenced this pull request Jan 23, 2018
[release-2.6] Pulling PRs #20910, #21107 and #21282 to release-2.6 branch
@microsoft Microsoft (microsoft) locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants