From fb4d6ed67dbb06713c4e4b4ed99bced0f8ba70c0 Mon Sep 17 00:00:00 2001 From: Corey Farrell Date: Sat, 6 Apr 2019 19:10:04 -0400 Subject: [PATCH] feat: Add bigInt and importMeta to default parser plugins. (#356) This allows code with these features to be instrumented without having to reconfigure the parser plugins. Fixes #338 --- packages/istanbul-lib-instrument/src/instrumenter.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/istanbul-lib-instrument/src/instrumenter.js b/packages/istanbul-lib-instrument/src/instrumenter.js index 231266f7..628e702c 100644 --- a/packages/istanbul-lib-instrument/src/instrumenter.js +++ b/packages/istanbul-lib-instrument/src/instrumenter.js @@ -21,9 +21,18 @@ export function defaultOpts() { ignoreClassMethods: [], sourceMapUrlCallback: null, debug: false, + /* babel parser plugins are to be enabled when the feature is stage 3 and + * implemented in a released version of node.js */ plugins: [ 'asyncGenerators', + 'bigInt', + /* Verify and add upon release of node.js 12: + * classProperties + * classPrivateProperties + * classPrivateMethods + */ 'dynamicImport', + 'importMeta', 'objectRestSpread', 'optionalCatchBinding', 'flow',