Skip to content

If import is used in the file, prefer that import specifier over calculating new one #42224

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

Merged
merged 7 commits into from
Jan 8, 2021

Conversation

sheetalkamat
Copy link
Member

@sheetalkamat sheetalkamat commented Jan 5, 2021

Fixes #39117

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jan 5, 2021
@sheetalkamat sheetalkamat changed the title Project ref declaration emit If import is used in the file, prefer that import specifier over calculating new one Jan 5, 2021
@typescript-bot typescript-bot added For Milestone Bug PRs that fix a bug with a specific milestone and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jan 5, 2021
@sheetalkamat
Copy link
Member Author

@typescript-bot test this
@typescript-bot user test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 6, 2021

Heya @sheetalkamat, I've started to run the parallelized community code test suite on this PR at 71e42ba. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jan 6, 2021

Heya @sheetalkamat, I've started to run the extended test suite on this PR at 71e42ba. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master.

@sheetalkamat sheetalkamat merged commit 66ba15a into master Jan 8, 2021
@sheetalkamat sheetalkamat deleted the projectRefDeclarationEmit branch January 8, 2021 23:20
Zzzen pushed a commit to Zzzen/TypeScript that referenced this pull request Jan 16, 2021
…ulating new one (microsoft#42224)

* Test case where the wrong path is emitted

* If import is used in the file, prefer that import specifier over calculating new one
Fixes microsoft#39117

* Update Baselines and/or Applied Lint Fixes

* When non-relative path is used as user preference, ignore relative paths even if they are from the existing file

* Fix test

* Add comment

Co-authored-by: TypeScript Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

With project references, some cross-package imports of inferred types are emitted with relative paths
4 participants