Permalink
Browse files

Export @babel/parser#tokTypes in @babel/core (#8986)

* Export @babel/parser in @babel/core

* Expose tokTypes instead of parser
  • Loading branch information...
kaicataldo authored and loganfsmyth committed Dec 1, 2018
1 parent 2bf8dde commit 806e1334737f4fbf29615c04d227076b76d7f041
@@ -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,

0 comments on commit 806e133

Please sign in to comment.