@babel/helper-remap-async-to-generator
Advanced tools
Comparing version 7.21.4-esm.3 to 7.21.4-esm.4
@@ -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
6
9820
58
+ Added@babel/code-frame@7.21.4-esm.4(transitive)
+ Added@babel/generator@7.21.4-esm.4(transitive)
+ Added@babel/helper-annotate-as-pure@7.21.4-esm.4(transitive)
+ Added@babel/helper-environment-visitor@7.21.4-esm.4(transitive)
+ Added@babel/helper-function-name@7.21.4-esm.4(transitive)
+ Added@babel/helper-hoist-variables@7.21.4-esm.4(transitive)
+ Added@babel/helper-split-export-declaration@7.21.4-esm.4(transitive)
+ Added@babel/helper-string-parser@7.21.4-esm.4(transitive)
+ Added@babel/helper-validator-identifier@7.21.4-esm.4(transitive)
+ Added@babel/helper-wrap-function@7.21.4-esm.4(transitive)
+ Added@babel/highlight@7.21.4-esm.4(transitive)
+ Added@babel/parser@7.21.4-esm.4(transitive)
+ Added@babel/template@7.21.4-esm.4(transitive)
+ Added@babel/traverse@7.21.4-esm.4(transitive)
+ Added@babel/types@7.21.4-esm.4(transitive)
- Removed@babel/code-frame@7.21.4-esm.3(transitive)
- Removed@babel/generator@7.21.4-esm.3(transitive)
- Removed@babel/helper-annotate-as-pure@7.21.4-esm.3(transitive)
- Removed@babel/helper-environment-visitor@7.21.4-esm.3(transitive)
- Removed@babel/helper-function-name@7.21.4-esm.3(transitive)
- Removed@babel/helper-hoist-variables@7.21.4-esm.3(transitive)
- Removed@babel/helper-split-export-declaration@7.21.4-esm.3(transitive)
- Removed@babel/helper-string-parser@7.21.4-esm.3(transitive)
- Removed@babel/helper-validator-identifier@7.21.4-esm.3(transitive)
- Removed@babel/helper-wrap-function@7.21.4-esm.3(transitive)
- Removed@babel/highlight@7.21.4-esm.3(transitive)
- Removed@babel/parser@7.21.4-esm.3(transitive)
- Removed@babel/template@7.21.4-esm.3(transitive)
- Removed@babel/traverse@7.21.4-esm.3(transitive)
- Removed@babel/types@7.21.4-esm.3(transitive)
Updated@babel/types@7.21.4-esm.4