Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Disallow duplicate named exports #107
I think I got all the cases for named exports - let me know if I missed one! Also wasn't sure about the error message wording, but was hoping that by including the name of the offending duplicate export that debugging could be made easier for the end user. Finally, wasn't sure where to put the tests - happy to move them!
referenced this pull request
Sep 5, 2016
Looks like the CI tests are failing because of test files in Babel plugins that contain duplicates exports in the same file. I think it'll require similar changes to this PR: babel/babel#3518.
How are cross-repo changes like this usually handled? I'm happy to make the necessary changes in the Babel repo, including reverting the band-aid fix for duplicate default exports if and when this PR lands.
Yes that would be nice. Thanks.
Oh for some reason I did not see the other comment of you. So there is no real workflow yet on how to do the cross-repo stuff. I described in this PR how to link babylon in babel. I should really but that in the Contributing file.
Finally got around to fixing those tests! PR open here: babel/babel#4538
I mention it in the issue as well, but will also make a 2nd PR that removes the initial band-aid fix that was merged into Babel itself and to rename the test files so they follow the convention used in the currently open PR. I plan on getting to this tomorrow!
Current coverage is 97.04% (diff: 100%)
@@ master #107 diff @@ ========================================== Files 19 19 Lines 3130 3185 +55 Methods 320 327 +7 Messages 0 0 Branches 800 819 +19 ========================================== + Hits 3029 3091 +62 + Misses 101 94 -7 Partials 0 0
Opened one more PR that reverts the commit I made that throws a warning in babel itself since we have moved that into babylon. I also updated the test names so that they match the convention I used in my more recent PR that was merged today. Let me know if you need anything else!
Sep 22, 2016
Seems like this change causes Babylon to throw for one of my files that worked fine before.
The file in questions looks like this:
export toString from './toString';
`toString` has already been exported. Exported identifiers must be unique. (1:7) > 1 | export toString from './toString'; | ^ 2 |
Is this an intended change, is not
Seems like all keys on