Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix default exported classes without a name (#4518)
* fix default exported classes without a name This correctly requeues class without name so the es3 transform can transform the default keyword. * Replace phabricator issue number with github
- Loading branch information
Showing
13 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...nsform-es2015-modules-commonjs/test/fixtures/regression/es3-compatibility-class/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default class {} |
6 changes: 6 additions & 0 deletions
6
...form-es2015-modules-commonjs/test/fixtures/regression/es3-compatibility-class/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
"use strict"; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = class {}; |
7 changes: 7 additions & 0 deletions
7
...orm-es2015-modules-commonjs/test/fixtures/regression/es3-compatibility-class/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"plugins": [ | ||
"transform-es2015-modules-commonjs", | ||
"transform-es3-member-expression-literals", | ||
"transform-es3-property-literals" | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
...orm-es2015-modules-commonjs/test/fixtures/regression/es3-compatibility-function/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default function () {} |
7 changes: 7 additions & 0 deletions
7
...m-es2015-modules-commonjs/test/fixtures/regression/es3-compatibility-function/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
"use strict"; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
|
||
exports["default"] = function () {}; |
7 changes: 7 additions & 0 deletions
7
...-es2015-modules-commonjs/test/fixtures/regression/es3-compatibility-function/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"plugins": [ | ||
"transform-es2015-modules-commonjs", | ||
"transform-es3-member-expression-literals", | ||
"transform-es3-property-literals" | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
...-es2015-modules-commonjs/test/fixtures/regression/es3-compatibility-named-class/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default class Foo {} |
7 changes: 7 additions & 0 deletions
7
...s2015-modules-commonjs/test/fixtures/regression/es3-compatibility-named-class/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
"use strict"; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
class Foo {} | ||
exports["default"] = Foo; |
7 changes: 7 additions & 0 deletions
7
...2015-modules-commonjs/test/fixtures/regression/es3-compatibility-named-class/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"plugins": [ | ||
"transform-es2015-modules-commonjs", | ||
"transform-es3-member-expression-literals", | ||
"transform-es3-property-literals" | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
...2015-modules-commonjs/test/fixtures/regression/es3-compatibility-named-function/actual.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default function bat () {} |
7 changes: 7 additions & 0 deletions
7
...15-modules-commonjs/test/fixtures/regression/es3-compatibility-named-function/expected.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
"use strict"; | ||
|
||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = bat; | ||
function bat() {} |
7 changes: 7 additions & 0 deletions
7
...5-modules-commonjs/test/fixtures/regression/es3-compatibility-named-function/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"plugins": [ | ||
"transform-es2015-modules-commonjs", | ||
"transform-es3-member-expression-literals", | ||
"transform-es3-property-literals" | ||
] | ||
} |