Socket
Socket
Sign inDemoInstall

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

Package Overview
Dependencies
55
Maintainers
4
Versions
77
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.21.4-esm.4 to 7.22.5

26

lib/index.js

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

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";
"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");
const {

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

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

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

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

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

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

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

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

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

"dependencies": {
"@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"
"@babel/helper-annotate-as-pure": "^7.22.5",
"@babel/helper-environment-visitor": "^7.22.5",
"@babel/helper-wrap-function": "^7.22.5",
"@babel/types": "^7.22.5"
},
"devDependencies": {
"@babel/core": "7.21.4-esm.4",
"@babel/traverse": "7.21.4-esm.4"
"@babel/core": "^7.22.5",
"@babel/traverse": "^7.22.5"
},
"peerDependencies": {
"@babel/core": "^7.0.0 || ^7.21.4-esm.2"
"@babel/core": "^7.0.0"
},

@@ -34,3 +34,3 @@ "engines": {

"author": "The Babel Team (https://babel.dev/team)",
"type": "module"
"type": "commonjs"
}

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