@babel/helper-wrap-function
Advanced tools
Comparing version 7.21.4-esm.4 to 7.22.5
@@ -1,4 +0,10 @@ | ||
import nameFunction from "@babel/helper-function-name"; | ||
import template from "@babel/template"; | ||
import * as _t from "@babel/types"; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = wrapFunction; | ||
var _helperFunctionName = require("@babel/helper-function-name"); | ||
var _template = require("@babel/template"); | ||
var _t = require("@babel/types"); | ||
const { | ||
@@ -14,3 +20,3 @@ blockStatement, | ||
} = _t; | ||
const buildAnonymousExpressionWrapper = template.expression(` | ||
const buildAnonymousExpressionWrapper = _template.default.expression(` | ||
(function () { | ||
@@ -23,3 +29,3 @@ var REF = FUNCTION; | ||
`); | ||
const buildNamedExpressionWrapper = template.expression(` | ||
const buildNamedExpressionWrapper = _template.default.expression(` | ||
(function () { | ||
@@ -33,3 +39,3 @@ var REF = FUNCTION; | ||
`); | ||
const buildDeclarationWrapper = template.statements(` | ||
const buildDeclarationWrapper = _template.default.statements(` | ||
function NAME(PARAMS) { return REF.apply(this, arguments); } | ||
@@ -98,3 +104,3 @@ function REF() { | ||
const returnFn = container.callee.body.body[1].argument; | ||
nameFunction({ | ||
(0, _helperFunctionName.default)({ | ||
node: returnFn, | ||
@@ -113,3 +119,3 @@ parent: path.parent, | ||
} | ||
export default function wrapFunction(path, callId, noNewArrows = true, ignoreFunctionLength = false) { | ||
function wrapFunction(path, callId, noNewArrows = true, ignoreFunctionLength = false) { | ||
if (path.isMethod()) { | ||
@@ -116,0 +122,0 @@ classOrObjectMethod(path, callId); |
{ | ||
"name": "@babel/helper-wrap-function", | ||
"version": "7.21.4-esm.4", | ||
"version": "7.22.5", | ||
"description": "Helper to wrap functions inside a function call.", | ||
@@ -17,6 +17,6 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-function-name": "7.21.4-esm.4", | ||
"@babel/template": "7.21.4-esm.4", | ||
"@babel/traverse": "7.21.4-esm.4", | ||
"@babel/types": "7.21.4-esm.4" | ||
"@babel/helper-function-name": "^7.22.5", | ||
"@babel/template": "^7.22.5", | ||
"@babel/traverse": "^7.22.5", | ||
"@babel/types": "^7.22.5" | ||
}, | ||
@@ -27,3 +27,3 @@ "engines": { | ||
"author": "The Babel Team (https://babel.dev/team)", | ||
"type": "module" | ||
"type": "commonjs" | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
15375
121
0
5
No
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/generator@7.26.2(transitive)
+ Added@babel/helper-function-name@7.24.7(transitive)
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@babel/parser@7.26.2(transitive)
+ Added@babel/template@7.25.9(transitive)
+ Added@babel/traverse@7.25.9(transitive)
+ Added@babel/types@7.26.0(transitive)
+ Addedjsesc@3.0.2(transitive)
+ Addedpicocolors@1.1.1(transitive)
- Removed@babel/code-frame@7.21.4-esm.4(transitive)
- Removed@babel/generator@7.21.4-esm.4(transitive)
- Removed@babel/helper-environment-visitor@7.21.4-esm.4(transitive)
- Removed@babel/helper-function-name@7.21.4-esm.4(transitive)
- Removed@babel/helper-hoist-variables@7.21.4-esm.4(transitive)
- Removed@babel/helper-split-export-declaration@7.21.4-esm.4(transitive)
- Removed@babel/helper-string-parser@7.21.4-esm.4(transitive)
- Removed@babel/helper-validator-identifier@7.21.4-esm.4(transitive)
- Removed@babel/highlight@7.21.4-esm.4(transitive)
- Removed@babel/parser@7.21.4-esm.4(transitive)
- Removed@babel/template@7.21.4-esm.4(transitive)
- Removed@babel/traverse@7.21.4-esm.4(transitive)
- Removed@babel/types@7.21.4-esm.4(transitive)
- Removedansi-styles@3.2.1(transitive)
- Removedchalk@2.4.2(transitive)
- Removedcolor-convert@1.9.3(transitive)
- Removedcolor-name@1.1.3(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedhas-flag@3.0.0(transitive)
- Removedjsesc@2.5.2(transitive)
- Removedsupports-color@5.5.0(transitive)
- Removedto-fast-properties@2.0.0(transitive)
Updated@babel/template@^7.22.5
Updated@babel/traverse@^7.22.5
Updated@babel/types@^7.22.5