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
79b412d
commit 6e5315d
Showing
22 changed files
with
92 additions
and
78 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/usr/bin/env node | ||
|
||
require("../lib/babel"); | ||
import("../lib/babel.js"); |
3 changes: 1 addition & 2 deletions
3
packages/babel-cli/test/fixtures/babel/--copy-files with only/stdout.txt
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
src/foo/bar.js -> lib/foo/bar.js | ||
Successfully compiled 1 file with Babel (123ms). | ||
Successfully compiled 0 files with Babel (123ms). |
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
2 changes: 1 addition & 1 deletion
2
...gin-proposal-object-rest-spread/test/fixtures/object-rest/duplicate-decl-bug/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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"plugins": ["./plugin-clear-scope", "proposal-object-rest-spread"] | ||
"plugins": ["./plugin-clear-scope.cjs", "proposal-object-rest-spread"] | ||
} |
File renamed without changes.
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
33 changes: 0 additions & 33 deletions
33
packages/babel-plugin-transform-modules-commonjs/test/fixtures/source-map/exec.js
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
packages/babel-plugin-transform-modules-commonjs/test/fixtures/source-map/options.json
This file was deleted.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
packages/babel-plugin-transform-modules-commonjs/test/source-map.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,38 @@ | ||
import { transformSync } from "@babel/core"; | ||
import pluginCommonJS from "../lib/index"; | ||
|
||
const tests = [ | ||
'import "foo";', | ||
'import foo from "foo";', | ||
'import {default as foo2} from "foo";', | ||
'import * as foo from "foo";', | ||
'import {bar} from "foo";', | ||
'import {bar2, baz} from "foo";', | ||
'import {bar as baz2} from "foo";', | ||
'import {bar as baz3, xyz} from "foo";', | ||
'import bar, * as bar2 from "foo";', | ||
'import bar, {bar2, bar3 as bar4} from "foo";', | ||
|
||
"export var a;", | ||
"export default function(){};", | ||
"export default function f(){};", | ||
"export default 42;", | ||
"export {foo}; var foo;", | ||
"export { foo as default }; var foo;", | ||
'export * from "foo";', | ||
'export {foo} from "foo";', | ||
'export {default as foo} from "foo";', | ||
]; | ||
|
||
describe("source maps", () => { | ||
it.each(tests)("%s", code => { | ||
var res = transformSync(code, { | ||
configFile: false, | ||
sourceMap: true, | ||
plugins: [pluginCommonJS], | ||
}); | ||
|
||
// Should create mapping | ||
expect(res.map.mappings).not.toBe(""); | ||
}); | ||
}); |
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
2 changes: 1 addition & 1 deletion
2
...n-transform-react-jsx-development/test/fixtures/cross-platform/generated-jsx/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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"plugins": [ | ||
"./plugin.js", | ||
"./plugin.cjs", | ||
["transform-react-jsx-development", { "runtime": "automatic" }] | ||
] | ||
} |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
packages/babel-traverse/test/fixtures/comments/attachment/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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"plugins": ["./remove"] | ||
"plugins": ["./remove.cjs"] | ||
} |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ages/babel-traverse/test/fixtures/regression/visit-tsfunctiontype-parameters/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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"plugins": ["syntax-typescript", "./plugin"] | ||
"plugins": ["syntax-typescript", "./plugin.cjs"] | ||
} |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
packages/babel-traverse/test/fixtures/rename/break-statements/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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"plugins": ["./plugin"] | ||
"plugins": ["./plugin.cjs"] | ||
} |
File renamed without changes.