babel-plugin-transform-bigint
Advanced tools
Comparing version 1.0.17 to 1.0.18
12
index.js
@@ -289,2 +289,5 @@ // see https://github.com/babel/babel/pull/6015 | ||
} | ||
if (path.node.type === 'CallExpression') { | ||
return maybeJSBI; | ||
} | ||
if (path.node.type === 'UpdateExpression') { | ||
@@ -299,2 +302,5 @@ return canBeBigInt(path.get('argument')); | ||
} | ||
if (path.node.type === 'ArrayExpression') { | ||
return false; | ||
} | ||
console.debug('unknown path.node.type: ' + path.node.type); | ||
@@ -515,2 +521,5 @@ //TODO: | ||
AssignmentExpression: function (path, state) { | ||
if (types.isMemberExpression(path.node.left) && types.isIdentifier(path.node.left.object) && path.node.left.object.name === 'arguments') { | ||
throw new RangeError('arguments should not be used'); | ||
} | ||
const JSBI = canBeBigInt(path); | ||
@@ -560,5 +569,2 @@ if (JSBI !== false) { | ||
Identifier: function (path) { | ||
if (path.node.name === 'arguments') { | ||
throw new RangeError('arguments should not be used'); | ||
} | ||
if (path.node.name === 'eval') { | ||
@@ -565,0 +571,0 @@ throw new RangeError('eval should not be used'); |
{ | ||
"name": "babel-plugin-transform-bigint", | ||
"version": "1.0.17", | ||
"version": "1.0.18", | ||
"description": "A plugin for babel to transform `x * y` into something like `JSBI.multiply(x, y)` to support bigints.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43212
779