Socket
Socket
Sign inDemoInstall

babel-plugin-transform-bigint

Package Overview
Dependencies
56
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.10 to 1.0.11

__tests__/__snapshots__/index-test.js.snap

15

index.js

@@ -90,2 +90,5 @@ // see https://github.com/babel/babel/pull/6015

if (path.node.type === 'UnaryExpression') {
if (path.node.operator === '+') { // +0n is not allowed
return false;
}
return canBeBigInt(path.get('argument'));

@@ -109,5 +112,6 @@ }

for (const path of binding.referencePaths) {
if (path.parentPath.node.type === 'BinaryExpression' && getFunctionName(path.parentPath.node.operator) != null && canBeBigInt(path.parentPath) === false) {
return false;
}
//The next code causes infinite recursion, seems:
//if (path.parentPath.node.type === 'BinaryExpression' && getFunctionName(path.parentPath.node.operator) != null && canBeBigInt(path.parentPath) === false) {
// return false;
//}
}

@@ -180,2 +184,7 @@ } else {

}
//if (path.node.callee.type === 'MemberExpression' &&
// path.node.callee.object.type === 'Identifier' &&
// path.node.callee.object.name === 'JSBI') {
// return JSBI;
//}
}

@@ -182,0 +191,0 @@ if (path.node.type === 'CallExpression') {

13

package.json
{
"name": "babel-plugin-transform-bigint",
"version": "1.0.10",
"version": "1.0.11",
"description": "A plugin for babel to transform `x * y` into something like `JSBI.multiply(x, y)` to support bigints.",
"main": "index.js",
"scripts": {
"test": "npx babel --plugins=module:./index.js tests.js"
"test": "jest"
},

@@ -12,8 +12,9 @@ "author": "",

"dependencies": {
"@babel/plugin-syntax-bigint": "^7.2.0",
"big-integer": "^1.6.41"
"@babel/plugin-syntax-bigint": "^7.8.3",
"big-integer": "^1.6.48"
},
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2"
"@babel/cli": "^7.12.10",
"@babel/core": "^7.12.10",
"jest": "^27.0.6"
},

@@ -20,0 +21,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc