@babel/plugin-transform-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 = void 0; | ||
var _helperPluginUtils = require("@babel/helper-plugin-utils"); | ||
var _helperRemapAsyncToGenerator = require("@babel/helper-remap-async-to-generator"); | ||
var _helperModuleImports = require("@babel/helper-module-imports"); | ||
var _core = require("@babel/core"); | ||
var _default = (0, _helperPluginUtils.declare)((api, options) => { | ||
import { declare } from "@babel/helper-plugin-utils"; | ||
import remapAsyncToGenerator from "@babel/helper-remap-async-to-generator"; | ||
import { addNamed } from "@babel/helper-module-imports"; | ||
import { types as t } from "@babel/core"; | ||
export default declare((api, options) => { | ||
var _api$assumption, _api$assumption2; | ||
@@ -28,7 +22,7 @@ api.assertVersion(7); | ||
if (wrapAsync) { | ||
wrapAsync = _core.types.cloneNode(wrapAsync); | ||
wrapAsync = t.cloneNode(wrapAsync); | ||
} else { | ||
wrapAsync = state.methodWrapper = (0, _helperModuleImports.addNamed)(path, method, module); | ||
wrapAsync = state.methodWrapper = addNamed(path, method, module); | ||
} | ||
(0, _helperRemapAsyncToGenerator.default)(path, { | ||
remapAsyncToGenerator(path, { | ||
wrapAsync | ||
@@ -45,3 +39,3 @@ }, noNewArrows, ignoreFunctionLength); | ||
if (!path.node.async || path.node.generator) return; | ||
(0, _helperRemapAsyncToGenerator.default)(path, { | ||
remapAsyncToGenerator(path, { | ||
wrapAsync: state.addHelper("asyncToGenerator") | ||
@@ -53,4 +47,3 @@ }, noNewArrows, ignoreFunctionLength); | ||
}); | ||
exports.default = _default; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@babel/plugin-transform-async-to-generator", | ||
"version": "7.21.4-esm.3", | ||
"version": "7.21.4-esm.4", | ||
"description": "Turn async functions into ES2015 generators", | ||
@@ -20,5 +20,5 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-module-imports": "7.21.4-esm.3", | ||
"@babel/helper-plugin-utils": "7.21.4-esm.3", | ||
"@babel/helper-remap-async-to-generator": "7.21.4-esm.3" | ||
"@babel/helper-module-imports": "7.21.4-esm.4", | ||
"@babel/helper-plugin-utils": "7.21.4-esm.4", | ||
"@babel/helper-remap-async-to-generator": "7.21.4-esm.4" | ||
}, | ||
@@ -29,4 +29,4 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@babel/core": "7.21.4-esm.3", | ||
"@babel/helper-plugin-test-runner": "7.21.4-esm.3" | ||
"@babel/core": "7.21.4-esm.4", | ||
"@babel/helper-plugin-test-runner": "7.21.4-esm.4" | ||
}, | ||
@@ -33,0 +33,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
6
7602
45
+ 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-module-imports@7.21.4-esm.4(transitive)
+ Added@babel/helper-plugin-utils@7.21.4-esm.4(transitive)
+ Added@babel/helper-remap-async-to-generator@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-module-imports@7.21.4-esm.3(transitive)
- Removed@babel/helper-plugin-utils@7.21.4-esm.3(transitive)
- Removed@babel/helper-remap-async-to-generator@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)