You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

babel-plugin-jest-hoist

Package Overview
Dependencies
Maintainers
6
Versions
199
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-jest-hoist - npm Package Compare versions

Comparing version

to
29.0.0-alpha.0

22

build/index.js

@@ -155,7 +155,3 @@ 'use strict';

if (
binding !== null &&
binding !== void 0 &&
binding.path.isVariableDeclarator()
) {
if (binding?.path.isVariableDeclarator()) {
const {node} = binding.path;

@@ -242,4 +238,2 @@ const initNode = node.init;

const extractJestObjExprIfHoistable = expr => {
var _FUNCTIONS$propertyNa;
if (!expr.isCallExpression()) {

@@ -269,7 +263,3 @@ return null;

const functionLooksHoistable =
(_FUNCTIONS$propertyNa = FUNCTIONS[propertyName]) === null ||
_FUNCTIONS$propertyNa === void 0
? void 0
: _FUNCTIONS$propertyNa.call(FUNCTIONS, args);
const functionLooksHoistable = FUNCTIONS[propertyName]?.(args);
return functionLooksHoistable ? jestObjExpr : null;

@@ -342,4 +332,2 @@ };

function visitCallExpr(callExpr) {
var _self$jestObjGetterId;
const {

@@ -351,7 +339,3 @@ node: {callee}

(0, _types().isIdentifier)(callee) &&
callee.name ===
((_self$jestObjGetterId = self.jestObjGetterIdentifier) ===
null || _self$jestObjGetterId === void 0
? void 0
: _self$jestObjGetterId.name)
callee.name === self.jestObjGetterIdentifier?.name
) {

@@ -358,0 +342,0 @@ const mockStmt = callExpr.getStatementParent();

6

package.json
{
"name": "babel-plugin-jest-hoist",
"version": "28.1.3",
"version": "29.0.0-alpha.0",
"repository": {

@@ -10,3 +10,3 @@ "type": "git",

"engines": {
"node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0"
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
},

@@ -41,3 +41,3 @@ "license": "MIT",

},
"gitHead": "2cce069800dab3fc8ca7c469b32d2e2b2f7e2bb1"
"gitHead": "6862afb00307b52f32eedee977a9b3041355f184"
}