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

Updates JS/TS imports on directory rename #50244

Closed
mjbvz opened this issue May 21, 2018 · 5 comments
Closed

Updates JS/TS imports on directory rename #50244

mjbvz opened this issue May 21, 2018 · 5 comments
Assignees
Labels
feature-request Request for new features or functionality javascript JavaScript support issues typescript Typescript support issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@mjbvz
Copy link
Collaborator

mjbvz commented May 21, 2018

Follow up on #19439

Request

  1. In a js project:
index.js
jsconfig.json
sub/
    a.js
    b.js

with index.js:

import {a} from './sub/a'
import {b} from './sub/b'
  1. Rename sub to sub2

Expected behavior
All import paths that reference sub get updated to sub2:

index.js:

import {a} from './sub2/a'
import {b} from './sub2/b'
@mjbvz mjbvz added feature-request Request for new features or functionality typescript Typescript support issues javascript JavaScript support issues labels May 21, 2018
@mjbvz mjbvz self-assigned this May 21, 2018
@mjbvz
Copy link
Collaborator Author

mjbvz commented May 21, 2018

Depends on microsoft/TypeScript#24260

@AlCalzone
Copy link

Should this be working in 1.24.1 with TypeScript 2.9.2 or do I have to wait for another VSCode update?

@mjbvz
Copy link
Collaborator Author

mjbvz commented Jun 15, 2018

No you need to be on vscode insiders

@mjbvz mjbvz added the verification-needed Verification of issue is requested label Jun 25, 2018
@RMacfarlane RMacfarlane added the verified Verification succeeded label Jun 27, 2018
@jamesmillerburgess
Copy link

Really looking forward to this! 👍

@n2o1988
Copy link

n2o1988 commented Jul 13, 2018

Hi all, I'm on VSCode 1.25.1 and I still can't get the rename/move folders refactoring to work. It does work with single files, but not with folders.
I was wondering if it is already available or if I need to wait for the next version (or be on vscode insiders) to have this?

To clarify: my project doesn't have .ts files, but only .js files. Is that supposed to only work with typescript files?
I do have this set in my pref: "javascript.updateImportsOnFileMove.enabled": "always"
And I'm on MacOS Sierra 10.12.5

@vscodebot vscodebot bot locked and limited conversation to collaborators Jul 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality javascript JavaScript support issues typescript Typescript support issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants