Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-async-to-generator

Package Overview
Dependencies
Maintainers
4
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-async-to-generator - npm Package Compare versions

Comparing version 7.21.4-esm.4 to 7.22.5

25

lib/index.js

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

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) => {
"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) => {
var _api$assumption, _api$assumption2;

@@ -22,7 +28,7 @@ api.assertVersion(7);

if (wrapAsync) {
wrapAsync = t.cloneNode(wrapAsync);
wrapAsync = _core.types.cloneNode(wrapAsync);
} else {
wrapAsync = state.methodWrapper = addNamed(path, method, module);
wrapAsync = state.methodWrapper = (0, _helperModuleImports.addNamed)(path, method, module);
}
remapAsyncToGenerator(path, {
(0, _helperRemapAsyncToGenerator.default)(path, {
wrapAsync

@@ -39,3 +45,3 @@ }, noNewArrows, ignoreFunctionLength);

if (!path.node.async || path.node.generator) return;
remapAsyncToGenerator(path, {
(0, _helperRemapAsyncToGenerator.default)(path, {
wrapAsync: state.addHelper("asyncToGenerator")

@@ -47,3 +53,4 @@ }, noNewArrows, ignoreFunctionLength);

});
exports.default = _default;
//# sourceMappingURL=index.js.map
{
"name": "@babel/plugin-transform-async-to-generator",
"version": "7.21.4-esm.4",
"version": "7.22.5",
"description": "Turn async functions into ES2015 generators",

@@ -20,12 +20,12 @@ "repository": {

"dependencies": {
"@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"
"@babel/helper-module-imports": "^7.22.5",
"@babel/helper-plugin-utils": "^7.22.5",
"@babel/helper-remap-async-to-generator": "^7.22.5"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0 || ^7.21.4-esm.2"
"@babel/core": "^7.0.0-0"
},
"devDependencies": {
"@babel/core": "7.21.4-esm.4",
"@babel/helper-plugin-test-runner": "7.21.4-esm.4"
"@babel/core": "^7.22.5",
"@babel/helper-plugin-test-runner": "^7.22.5"
},

@@ -36,3 +36,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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc