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

Doesn't support rename refactoring with importing from a module (yarn workspaces) #31825

Open
wclr opened this issue Jun 8, 2019 · 2 comments
Labels
Bug A bug in TypeScript
Milestone

Comments

@wclr
Copy link

wclr commented Jun 8, 2019

Ts 3.5.1

I use yarn workspaces in the project so may

./package/module folder is linked and available as @app/module

Say I have such file, that imports from the same module test

import { a, b } from '@app/module/test'
import { b } from './packages/module/test'

Then I rename file packages/module/test to test2

and refactoring does change our file to:

import { a, b } from '@app/module/test' // this is not
import { b } from '@app/module/test2' // this is renamed and put @app instead of `./packages`

Expected result would probably be:

import { a, b } from '@app/module/test2'
import { b } from './packages/module/test2'

If there would be importing only from '@app/module/test' it would not even suggest rename refactoring.

@wclr wclr changed the title Doesn't support module rename refactoring with importing from modules (yarn workspaces) Doesn't support rename refactoring with importing from modules (yarn workspaces) Jun 8, 2019
@wclr wclr changed the title Doesn't support rename refactoring with importing from modules (yarn workspaces) Doesn't support rename refactoring with importing from a module (yarn workspaces) Jun 8, 2019
@RyanCavanaugh RyanCavanaugh added the Working as Intended The behavior described is the intended behavior; this is not a bug label Jun 13, 2019
@RyanCavanaugh
Copy link
Member

The behavior you see is what was requested from multiple other users

@wclr
Copy link
Author

wclr commented Jun 13, 2019

The behavior you see is what was requested from multiple other users

What do you mean? What behavior? You mean refactoring ./packages => @app/module? Ok I could agree with this.

The problem is that it doesn't rename test => test2 and that is a bug definitely.

@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript and removed Working as Intended The behavior described is the intended behavior; this is not a bug labels Jun 13, 2019
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Jun 13, 2019
@wclr wclr mentioned this issue Jul 22, 2019
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants