diff -Nru node-regenerator-runtime-0.9.5/debian/changelog node-regenerator-runtime-0.10.1/debian/changelog --- node-regenerator-runtime-0.9.5/debian/changelog 2016-11-02 08:37:38.000000000 +0000 +++ node-regenerator-runtime-0.10.1/debian/changelog 2016-12-22 19:09:10.000000000 +0000 @@ -1,3 +1,10 @@ +node-regenerator-runtime (0.10.1-1) unstable; urgency=medium + + * Team upload + * New upstream release + + -- Pirate Praveen Fri, 23 Dec 2016 00:39:10 +0530 + node-regenerator-runtime (0.9.5-1) unstable; urgency=low * Initial release (Closes: #842894) diff -Nru node-regenerator-runtime-0.9.5/package.json node-regenerator-runtime-0.10.1/package.json --- node-regenerator-runtime-0.9.5/package.json 2016-05-02 14:34:13.000000000 +0000 +++ node-regenerator-runtime-0.10.1/package.json 2016-12-08 15:12:02.000000000 +0000 @@ -2,7 +2,7 @@ "name": "regenerator-runtime", "author": "Ben Newman ", "description": "Runtime for Regenerator-compiled generator and async functions.", - "version": "0.9.5", + "version": "0.10.1", "main": "runtime-module.js", "keywords": [ "regenerator", diff -Nru node-regenerator-runtime-0.9.5/README.md node-regenerator-runtime-0.10.1/README.md --- node-regenerator-runtime-0.9.5/README.md 1970-01-01 00:00:00.000000000 +0000 +++ node-regenerator-runtime-0.10.1/README.md 2016-05-02 15:31:09.000000000 +0000 @@ -0,0 +1,31 @@ +# regenerator-runtime + +Standalone runtime for +[Regenerator](https://github.com/facebook/regenerator)-compiled generator +and `async` functions. + +To import the runtime as a module (recommended), either of the following +import styles will work: +```js +// CommonJS +const regeneratorRuntime = require("regenerator-runtime"); + +// ECMAScript 2015 +import regeneratorRuntime from "regenerator-runtime"; +``` + +To ensure that `regeneratorRuntime` is defined globally, either of the +following styles will work: +```js +// CommonJS +require("regenerator-runtime/runtime"); + +// ECMAScript 2015 +import "regenerator-runtime/runtime"; +``` + +To get the absolute file system path of `runtime.js`, evaluate the +following expression: +```js +require("regenerator-runtime/path").path +``` diff -Nru node-regenerator-runtime-0.9.5/runtime.js node-regenerator-runtime-0.10.1/runtime.js --- node-regenerator-runtime-0.9.5/runtime.js 2016-05-02 14:32:31.000000000 +0000 +++ node-regenerator-runtime-0.10.1/runtime.js 2016-12-08 15:11:45.000000000 +0000 @@ -11,7 +11,8 @@ !(function(global) { "use strict"; - var hasOwn = Object.prototype.hasOwnProperty; + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; var undefined; // More compressible than void 0. var $Symbol = typeof Symbol === "function" ? Symbol : {}; var iteratorSymbol = $Symbol.iterator || "@@iterator"; @@ -35,8 +36,9 @@ runtime = global.regeneratorRuntime = inModule ? module.exports : {}; function wrap(innerFn, outerFn, self, tryLocsList) { - // If outerFn provided, then outerFn.prototype instanceof Generator. - var generator = Object.create((outerFn || Generator).prototype); + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next, @@ -82,10 +84,29 @@ function GeneratorFunction() {} function GeneratorFunctionPrototype() {} - var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype; + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "GeneratorFunction"; // Helper for defining the .next, .throw, and .return methods of the // Iterator interface in terms of a single ._invoke method. @@ -122,17 +143,12 @@ // Within the body of any async function, `await x` is transformed to // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test - // `value instanceof AwaitArgument` to determine if the yielded value is - // meant to be awaited. Some may consider the name of this method too - // cutesy, but they are curmudgeons. + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. runtime.awrap = function(arg) { - return new AwaitArgument(arg); + return { __await: arg }; }; - function AwaitArgument(arg) { - this.arg = arg; - } - function AsyncIterator(generator) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); @@ -141,8 +157,10 @@ } else { var result = record.arg; var value = result.value; - if (value instanceof AwaitArgument) { - return Promise.resolve(value.arg).then(function(value) { + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { invoke("next", value, resolve, reject); }, function(err) { invoke("throw", err, resolve, reject); @@ -211,6 +229,7 @@ } defineIteratorMethods(AsyncIterator.prototype); + runtime.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of // AsyncIterator objects; they just return a Promise for the value of @@ -371,10 +390,6 @@ // unified ._invoke helper method. defineIteratorMethods(Gp); - Gp[iteratorSymbol] = function() { - return this; - }; - Gp[toStringTagSymbol] = "Generator"; Gp.toString = function() {