Skip to content

Commit

Permalink
avoid exporting multiple values with same identifier. fixes #467
Browse files Browse the repository at this point in the history
  • Loading branch information
millermedeiros committed Oct 30, 2016
1 parent 872e2f2 commit 5d8f3e2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 34 deletions.
10 changes: 2 additions & 8 deletions test/compare/custom/module-in.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,16 @@ export class MyClass {
}
}

export
default 123;
export default function (x) {
return x
}
export default x => x;
export default class {
constructor(x, y) {
this.x = x;
this.y = y;
}
}

export { MY_CONST, myFunc };
export { FOO_CONST, myOtherFunc };
export { MY_CONST as THE_CONST, myFunc as theFunc };

export * from 'src/other_module';
export { foo , bar }from 'src/other_module';
export {foo as myFoo,bar} from 'src/other_module';
export {foo as myFoo,baz} from 'src/other_module';
14 changes: 3 additions & 11 deletions test/compare/custom/module-out.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@ export class MyClass {
}
}

export default 123;

export default function (x) {
return x
}

export default x => x;

export default class {
constructor(x, y) {
this.x = x;
Expand All @@ -62,8 +54,8 @@ export default class {
}

export {
MY_CONST,
myFunc
FOO_CONST,
myOtherFunc
};

export {
Expand All @@ -80,6 +72,6 @@ export {

export {
foo as myFoo,
bar
baz
} from 'src/other_module';

10 changes: 2 additions & 8 deletions test/compare/default/module-in.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ export class MyClass {
}
}

export
default 123;
export default function (x) {
return x
}
export default x => x;
export default class {
constructor(x, y) {
this.x = x;
Expand All @@ -55,12 +49,12 @@ export default class {
// #408
export { lorem, hipstersum, nosemicolon }

export { MY_CONST, myFunc };
export { FOO_CONST, myOtherFunc };
export { MY_CONST as THE_CONST, myFunc as theFunc };

export * from 'src/other_module';
export {
foo ,
bar
}from 'src/other_module';
export {foo as myFoo,bar} from 'src/other_module';
export {foo as myFoo,baz} from 'src/other_module';
9 changes: 2 additions & 7 deletions test/compare/default/module-out.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ export class MyClass {
}
}

export default 123;
export default function (x) {
return x
}
export default x => x;
export default class {
constructor(x, y) {
this.x = x;
Expand All @@ -47,9 +42,9 @@ export default class {
// #408
export { lorem, hipstersum, nosemicolon }

export { MY_CONST, myFunc };
export { FOO_CONST, myOtherFunc };
export { MY_CONST as THE_CONST, myFunc as theFunc };

export * from 'src/other_module';
export { foo, bar } from 'src/other_module';
export { foo as myFoo, bar } from 'src/other_module';
export { foo as myFoo, baz } from 'src/other_module';

0 comments on commit 5d8f3e2

Please sign in to comment.