Skip to content
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

getEditsForFileRename: changes package import of symlinked package to relative path #25029

Closed
ajafff opened this issue Jun 17, 2018 · 2 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@ajafff
Copy link
Contributor

ajafff commented Jun 17, 2018

TypeScript Version: 3.0.0-dev.20180616

Search Terms: rename, relative

Repro

  • clone https://github.com/fimbullinter/wotan
  • yarn
    • creates symlinks for each packages/<name> as node_modules/@fimbul/<name>
  • open in VSCode
  • rename packages/wotan/index.ts to packages/wotan/index1.ts (simply append "1" to the name)
  • accept automatic update of imports

Expected behavior:

No edits, file stays unchanged

Actual behavior:

In the first line export * from '@fimbul/ymir'; is changed to export * from '../ymir/src';

Playground Link:

Related Issues:

#24961
#25026

@arciisine
Copy link

I'm experiencing a similar issue, with referencing .ts files from node_modules. When I accept automatic update of imports, files that are wholly unrelated are being modified in node_modules, and rewritten from the form ./src/file.ts to @scope/package/src/file.ts.

@mhegazy mhegazy assigned ghost Jun 19, 2018
@mhegazy mhegazy added the Bug A bug in TypeScript label Jun 19, 2018
@mhegazy mhegazy added this to the TypeScript 3.0 milestone Jun 19, 2018
@ghost ghost added the Fixed A PR has been merged for this issue label Jun 20, 2018
@ghost
Copy link

ghost commented Jun 26, 2018

Fixed by #25074

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants