@babel/helper-remap-async-to-generator
Advanced tools
Comparing version 7.21.4-esm.4 to 7.22.5
@@ -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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
10090
63
0
5
No
+ Added@babel/code-frame@7.24.6(transitive)
+ Added@babel/compat-data@7.24.6(transitive)
+ Added@babel/core@7.24.6(transitive)
+ Added@babel/generator@7.24.6(transitive)
+ Added@babel/helper-annotate-as-pure@7.24.6(transitive)
+ Added@babel/helper-compilation-targets@7.24.6(transitive)
+ Added@babel/helper-environment-visitor@7.24.6(transitive)
+ Added@babel/helper-function-name@7.24.6(transitive)
+ Added@babel/helper-hoist-variables@7.24.6(transitive)
+ Added@babel/helper-module-imports@7.24.6(transitive)
+ Added@babel/helper-module-transforms@7.24.6(transitive)
+ Added@babel/helper-simple-access@7.24.6(transitive)
+ Added@babel/helper-split-export-declaration@7.24.6(transitive)
+ Added@babel/helper-string-parser@7.24.6(transitive)
+ Added@babel/helper-validator-identifier@7.24.6(transitive)
+ Added@babel/helper-validator-option@7.24.6(transitive)
+ Added@babel/helper-wrap-function@7.24.6(transitive)
+ Added@babel/helpers@7.24.6(transitive)
+ Added@babel/highlight@7.24.6(transitive)
+ Added@babel/parser@7.24.6(transitive)
+ Added@babel/template@7.24.6(transitive)
+ Added@babel/traverse@7.24.6(transitive)
+ Added@babel/types@7.24.6(transitive)
+ Addedcaniuse-lite@1.0.30001627(transitive)
+ Addedelectron-to-chromium@1.4.789(transitive)
- Removed@babel/code-frame@7.21.4-esm.47.24.7(transitive)
- Removed@babel/compat-data@7.24.7(transitive)
- Removed@babel/core@7.24.7(transitive)
- Removed@babel/generator@7.21.4-esm.47.24.7(transitive)
- Removed@babel/helper-annotate-as-pure@7.21.4-esm.4(transitive)
- Removed@babel/helper-compilation-targets@7.24.7(transitive)
- Removed@babel/helper-environment-visitor@7.21.4-esm.47.24.7(transitive)
- Removed@babel/helper-function-name@7.21.4-esm.47.24.7(transitive)
- Removed@babel/helper-hoist-variables@7.21.4-esm.47.24.7(transitive)
- Removed@babel/helper-module-imports@7.24.7(transitive)
- Removed@babel/helper-module-transforms@7.24.7(transitive)
- Removed@babel/helper-simple-access@7.24.7(transitive)
- Removed@babel/helper-split-export-declaration@7.21.4-esm.47.24.7(transitive)
- Removed@babel/helper-string-parser@7.21.4-esm.47.24.7(transitive)
- Removed@babel/helper-validator-identifier@7.21.4-esm.47.24.7(transitive)
- Removed@babel/helper-validator-option@7.24.7(transitive)
- Removed@babel/helper-wrap-function@7.21.4-esm.4(transitive)
- Removed@babel/helpers@7.24.7(transitive)
- Removed@babel/highlight@7.21.4-esm.47.24.7(transitive)
- Removed@babel/parser@7.21.4-esm.47.24.7(transitive)
- Removed@babel/template@7.21.4-esm.47.24.7(transitive)
- Removed@babel/traverse@7.21.4-esm.47.24.7(transitive)
- Removed@babel/types@7.21.4-esm.47.24.7(transitive)
- Removedcaniuse-lite@1.0.30001629(transitive)
- Removedelectron-to-chromium@1.4.790(transitive)
Updated@babel/types@^7.22.5