Skip to content

Backward compatible with old names#396

Merged
Gaurav0 merged 4 commits intoember-cli:masterfrom
Gaurav0:old_names
Apr 12, 2016
Merged

Backward compatible with old names#396
Gaurav0 merged 4 commits intoember-cli:masterfrom
Gaurav0:old_names

Conversation

@Gaurav0
Copy link
Copy Markdown
Contributor

@Gaurav0 Gaurav0 commented Apr 12, 2016

No description provided.

@rwjblue
Copy link
Copy Markdown
Member

rwjblue commented Apr 12, 2016

This looks perfect for default exports, can you also add support for named exports?

@Gaurav0
Copy link
Copy Markdown
Contributor Author

Gaurav0 commented Apr 12, 2016

@rwjblue done.

@rwjblue
Copy link
Copy Markdown
Member

rwjblue commented Apr 12, 2016

Awesome, thank you! Does that support import a, { b, c } from "demo-app/b";? I can't tell by just glancing at the regexp...

@Gaurav0
Copy link
Copy Markdown
Contributor Author

Gaurav0 commented Apr 12, 2016

I'll add a test.

@Gaurav0
Copy link
Copy Markdown
Contributor Author

Gaurav0 commented Apr 12, 2016

@rwjblue done. Any others you can think of? Thanks again for the review.

@rwjblue
Copy link
Copy Markdown
Member

rwjblue commented Apr 12, 2016

Hmm, maybe multiline?

import {
  a,
  b,
  c
} from 'demo-app/utils';

@joostdevries
Copy link
Copy Markdown
Member

@Gaurav0 wouldn't this cover all:

var r = new RegExp(`import ([^]+?) from (\'|\")${oldName}/`,'gmi');

@Gaurav0
Copy link
Copy Markdown
Contributor Author

Gaurav0 commented Apr 12, 2016

@joostdevries Doesn't work

@Gaurav0 Gaurav0 merged commit 9080eca into ember-cli:master Apr 12, 2016
@Gaurav0 Gaurav0 deleted the old_names branch April 12, 2016 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants