forked from babel/babel
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d9b1b88
commit f1a6109
Showing
60 changed files
with
473 additions
and
41 deletions.
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
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
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
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
...-transform-modules-amd/test/fixtures/assumption-constantReexports/export-from-2/input.mjs
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 {foo as default} from "foo"; |
9 changes: 9 additions & 0 deletions
9
...-transform-modules-amd/test/fixtures/assumption-constantReexports/export-from-2/output.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,9 @@ | ||
define(["exports", "foo"], function (_exports, _foo) { | ||
"use strict"; | ||
|
||
Object.defineProperty(_exports, "__esModule", { | ||
value: true | ||
}); | ||
_exports.default = void 0; | ||
_exports.default = _foo.foo; | ||
}); |
1 change: 1 addition & 0 deletions
1
...-transform-modules-amd/test/fixtures/assumption-constantReexports/export-from-3/input.mjs
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 {foo as default, bar} from "foo"; |
10 changes: 10 additions & 0 deletions
10
...-transform-modules-amd/test/fixtures/assumption-constantReexports/export-from-3/output.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,10 @@ | ||
define(["exports", "foo"], function (_exports, _foo) { | ||
"use strict"; | ||
|
||
Object.defineProperty(_exports, "__esModule", { | ||
value: true | ||
}); | ||
_exports.bar = _exports.default = void 0; | ||
_exports.default = _foo.foo; | ||
_exports.bar = _foo.bar; | ||
}); |
1 change: 1 addition & 0 deletions
1
...-transform-modules-amd/test/fixtures/assumption-constantReexports/export-from-4/input.mjs
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 {foo as bar} from "foo"; |
9 changes: 9 additions & 0 deletions
9
...-transform-modules-amd/test/fixtures/assumption-constantReexports/export-from-4/output.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,9 @@ | ||
define(["exports", "foo"], function (_exports, _foo) { | ||
"use strict"; | ||
|
||
Object.defineProperty(_exports, "__esModule", { | ||
value: true | ||
}); | ||
_exports.bar = void 0; | ||
_exports.bar = _foo.foo; | ||
}); |
1 change: 1 addition & 0 deletions
1
...-transform-modules-amd/test/fixtures/assumption-constantReexports/export-from-5/input.mjs
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 {foo, bar} from "foo"; |
10 changes: 10 additions & 0 deletions
10
...-transform-modules-amd/test/fixtures/assumption-constantReexports/export-from-5/output.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,10 @@ | ||
define(["exports", "foo"], function (_exports, _foo) { | ||
"use strict"; | ||
|
||
Object.defineProperty(_exports, "__esModule", { | ||
value: true | ||
}); | ||
_exports.bar = _exports.foo = void 0; | ||
_exports.foo = _foo.foo; | ||
_exports.bar = _foo.bar; | ||
}); |
1 change: 1 addition & 0 deletions
1
...-transform-modules-amd/test/fixtures/assumption-constantReexports/export-from-6/input.mjs
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 * from "foo"; |
12 changes: 12 additions & 0 deletions
12
...-transform-modules-amd/test/fixtures/assumption-constantReexports/export-from-6/output.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,12 @@ | ||
define(["exports", "foo"], function (_exports, _foo) { | ||
"use strict"; | ||
|
||
Object.defineProperty(_exports, "__esModule", { | ||
value: true | ||
}); | ||
Object.keys(_foo).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
if (key in _exports && _exports[key] === _foo[key]) return; | ||
_exports[key] = _foo[key]; | ||
}); | ||
}); |
1 change: 1 addition & 0 deletions
1
...in-transform-modules-amd/test/fixtures/assumption-constantReexports/export-from/input.mjs
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 {foo} from "foo"; |
9 changes: 9 additions & 0 deletions
9
...in-transform-modules-amd/test/fixtures/assumption-constantReexports/export-from/output.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,9 @@ | ||
define(["exports", "foo"], function (_exports, _foo) { | ||
"use strict"; | ||
|
||
Object.defineProperty(_exports, "__esModule", { | ||
value: true | ||
}); | ||
_exports.foo = void 0; | ||
_exports.foo = _foo.foo; | ||
}); |
3 changes: 3 additions & 0 deletions
3
...-transform-modules-amd/test/fixtures/assumption-constantReexports/import-export/input.mjs
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,3 @@ | ||
import { foo } from "./foo"; | ||
|
||
export { foo }; |
8 changes: 8 additions & 0 deletions
8
...-transform-modules-amd/test/fixtures/assumption-constantReexports/import-export/output.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,8 @@ | ||
define(["exports", "./foo"], function (_exports, _foo) { | ||
"use strict"; | ||
|
||
Object.defineProperty(_exports, "__esModule", { | ||
value: true | ||
}); | ||
_exports.foo = _foo.foo; | ||
}); |
6 changes: 6 additions & 0 deletions
6
...abel-plugin-transform-modules-amd/test/fixtures/assumption-constantReexports/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,6 @@ | ||
{ | ||
"assumptions": { | ||
"constantReexports": true | ||
}, | ||
"plugins": ["external-helpers", "transform-modules-amd"] | ||
} |
1 change: 1 addition & 0 deletions
1
...ugin-transform-modules-amd/test/fixtures/assumption-enumerableModuleMeta/export/input.mjs
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 var foo = 2; |
8 changes: 8 additions & 0 deletions
8
...ugin-transform-modules-amd/test/fixtures/assumption-enumerableModuleMeta/export/output.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,8 @@ | ||
define(["exports"], function (_exports) { | ||
"use strict"; | ||
|
||
_exports.__esModule = true; | ||
_exports.foo = void 0; | ||
var foo = 2; | ||
_exports.foo = foo; | ||
}); |
6 changes: 6 additions & 0 deletions
6
...l-plugin-transform-modules-amd/test/fixtures/assumption-enumerableModuleMeta/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,6 @@ | ||
{ | ||
"assumptions": { | ||
"enumerableModuleMeta": true | ||
}, | ||
"plugins": ["external-helpers", "transform-modules-amd"] | ||
} |
Oops, something went wrong.