babel-helper-remap-async-to-generator
Advanced tools
Comparing version 6.5.0 to 6.6.0
@@ -1,5 +0,5 @@ | ||
/* @flow */ | ||
"use strict"; | ||
var _Object$assign = require("babel-runtime/core-js/object/assign")["default"]; | ||
var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; | ||
@@ -23,4 +23,2 @@ | ||
/*:: import type { NodePath } from "babel-traverse";*/ | ||
var buildWrapper = _babelTemplate2["default"]("\n (function () {\n var ref = FUNCTION;\n return function (PARAMS) {\n return ref.apply(this, arguments);\n };\n })\n"); | ||
@@ -44,3 +42,3 @@ | ||
function classOrObjectMethod(path /*: NodePath*/, callId /*: Object*/) { | ||
function classOrObjectMethod(path, callId) { | ||
var node = path.node; | ||
@@ -56,3 +54,3 @@ var body = node.body; | ||
function plainFunction(path /*: NodePath*/, callId /*: Object*/) { | ||
function plainFunction(path, callId) { | ||
var node = path.node; | ||
@@ -68,2 +66,8 @@ var wrapper = buildWrapper; | ||
node.generator = true; | ||
// Either the wrapped generator is invoked with `.apply(this, arguments)` or it has no params, | ||
// so it should capture `arguments` | ||
if (node.shadow) { | ||
// node.shadow may be `true` or an object | ||
node.shadow = _Object$assign({}, node.shadow, { arguments: false }); | ||
} | ||
@@ -116,3 +120,3 @@ var asyncFnId = node.id; | ||
exports["default"] = function (path /*: NodePath*/, callId /*: Object*/) { | ||
exports["default"] = function (path, callId) { | ||
var node = path.node; | ||
@@ -119,0 +123,0 @@ if (node.generator) return; |
{ | ||
"name": "babel-helper-remap-async-to-generator", | ||
"version": "6.5.0", | ||
"version": "6.6.0", | ||
"description": "", | ||
@@ -10,7 +10,7 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-remap-async-to-generator", | ||
"babel-runtime": "^5.0.0", | ||
"babel-template": "^6.3.13", | ||
"babel-types": "^6.4.5", | ||
"babel-traverse": "^6.4.5", | ||
"babel-helper-function-name": "^6.3.13" | ||
"babel-template": "^6.6.0", | ||
"babel-types": "^6.6.0", | ||
"babel-traverse": "^6.6.0", | ||
"babel-helper-function-name": "^6.6.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4314
95
Updatedbabel-template@^6.6.0
Updatedbabel-traverse@^6.6.0
Updatedbabel-types@^6.6.0