Export @babel/parser#tokTypes in @babel/core (#8986)
* Export @babel/parser in @babel/core * Expose tokTypes instead of parser
This commit is contained in:
parent
2bf8dde782
commit
806e133473
@ -55,6 +55,7 @@ export default function makeAPI(
|
||||
async: () => false,
|
||||
caller,
|
||||
assertVersion,
|
||||
tokTypes: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -10,6 +10,8 @@ export { version } from "../package.json";
|
||||
export { getEnv } from "./config/helpers/environment";
|
||||
|
||||
export * as types from "@babel/types";
|
||||
export { tokTypes } from "@babel/parser";
|
||||
|
||||
export { default as traverse } from "@babel/traverse";
|
||||
export { default as template } from "@babel/template";
|
||||
|
||||
|
||||
@ -154,6 +154,14 @@ describe("api", function() {
|
||||
);
|
||||
});
|
||||
|
||||
it("exposes types", function() {
|
||||
expect(babel.types).toBeDefined();
|
||||
});
|
||||
|
||||
it("exposes the parser's token types", function() {
|
||||
expect(babel.tokTypes).toBeDefined();
|
||||
});
|
||||
|
||||
it("transformFile", function(done) {
|
||||
const options = {
|
||||
babelrc: false,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user