Socket
Socket
Sign inDemoInstall

@babel/helper-remap-async-to-generator

Package Overview
Dependencies
55
Maintainers
4
Versions
78
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.21.4-esm.3 to 7.21.4-esm.4

lib/package.json

26

lib/index.js

@@ -1,12 +0,6 @@

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var _helperWrapFunction = require("@babel/helper-wrap-function");
var _helperAnnotateAsPure = require("@babel/helper-annotate-as-pure");
var _helperEnvironmentVisitor = require("@babel/helper-environment-visitor");
var _core = require("@babel/core");
var _t = require("@babel/types");
import wrapFunction from "@babel/helper-wrap-function";
import annotateAsPure from "@babel/helper-annotate-as-pure";
import environmentVisitor from "@babel/helper-environment-visitor";
import { traverse } from "@babel/core";
import * as _t from "@babel/types";
const {

@@ -19,3 +13,3 @@ callExpression,

} = _t;
const awaitVisitor = _core.traverse.visitors.merge([{
const awaitVisitor = traverse.visitors.merge([{
ArrowFunctionExpression(path) {

@@ -30,4 +24,4 @@ path.skip();

}
}, _helperEnvironmentVisitor.default]);
function _default(path, helpers, noNewArrows, ignoreFunctionLength) {
}, environmentVisitor]);
export default function (path, helpers, noNewArrows, ignoreFunctionLength) {
path.traverse(awaitVisitor, {

@@ -39,6 +33,6 @@ wrapAwait: helpers.wrapAwait

path.node.generator = true;
(0, _helperWrapFunction.default)(path, cloneNode(helpers.wrapAsync), noNewArrows, ignoreFunctionLength);
wrapFunction(path, cloneNode(helpers.wrapAsync), noNewArrows, ignoreFunctionLength);
const isProperty = path.isObjectMethod() || path.isClassMethod() || path.parentPath.isObjectProperty() || path.parentPath.isClassProperty();
if (!isProperty && !isIIFE && path.isExpression()) {
(0, _helperAnnotateAsPure.default)(path);
annotateAsPure(path);
}

@@ -45,0 +39,0 @@ function checkIsIIFE(path) {

{
"name": "@babel/helper-remap-async-to-generator",
"version": "7.21.4-esm.3",
"version": "7.21.4-esm.4",
"description": "Helper function to remap async functions to generators",

@@ -17,10 +17,10 @@ "repository": {

"dependencies": {
"@babel/helper-annotate-as-pure": "7.21.4-esm.3",
"@babel/helper-environment-visitor": "7.21.4-esm.3",
"@babel/helper-wrap-function": "7.21.4-esm.3",
"@babel/types": "7.21.4-esm.3"
"@babel/helper-annotate-as-pure": "7.21.4-esm.4",
"@babel/helper-environment-visitor": "7.21.4-esm.4",
"@babel/helper-wrap-function": "7.21.4-esm.4",
"@babel/types": "7.21.4-esm.4"
},
"devDependencies": {
"@babel/core": "7.21.4-esm.3",
"@babel/traverse": "7.21.4-esm.3"
"@babel/core": "7.21.4-esm.4",
"@babel/traverse": "7.21.4-esm.4"
},

@@ -27,0 +27,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc