Skip to content

renameFile command updates imports with case insensitive paths #25036

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

Closed
donaldpipowitch opened this issue Jun 18, 2018 · 2 comments
Closed

renameFile command updates imports with case insensitive paths #25036

donaldpipowitch opened this issue Jun 18, 2018 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@donaldpipowitch
Copy link
Contributor

donaldpipowitch commented Jun 18, 2018

TypeScript Version: 2.9.2

Search Terms: renameFile, case, import, path, refactor

Code

// file: ./Foo/foo.ts
export const foo = 1;
// file: ./index.ts
import { foo } from './Foo/foo';
  • move ./Foo/foo.ts for example into ./test directory

Expected behavior:

./index.ts should be:

import { foo } from './test/Foo/foo';

Actual behavior:

./index.ts is be:

import { foo } from './test/foo/foo'; // lower cased

Related Issues:

I saw #21736 which speaks about a --forceConsistentCasingInFileNames flag as well as a TSServer option useCaseSensitiveFileNames. Not sure if these options can be applied here.


Tested on Mac with case insensitive file system. (Lower cases my imports, breaks CI.)

@j-oliveras
Copy link
Contributor

Duplicate of #24968?

@donaldpipowitch
Copy link
Contributor Author

Thanks!

@mhegazy mhegazy added the Duplicate An existing issue was already created label Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants