Releases: facebook/regenerator
runtime@0.10.5
runtime@0.10.4
Fixed #290.
v0.9.7
v0.9.6
- The
regenerator-transform
package is now compiled in loose mode: #265 %GeneratorPrototype%
now inherits from%IteratorPrototype%
, and theSymbol.iterator
method has been moved to%IteratorPrototype%
: #264- Arrow functions inside generator functions are now properly ignored by the compiler, like other functions: #277
- Calls to
generator.return(...)
can now be overridden by enclosingfinally
blocks: #255
v0.8.6
Labeled break
is now supported for any labeled statement, not just loops (#162). The async
function transform can be disabled by passing a truthy value value for options.disableAsync
(#161). The runtime is now strict-mode-compliant (#165), and can be required as a module via require("regenerator/runtime-module")
(#166). Core functions in the runtime no longer contain try
-catch
statements that could prevent optimization (#150, ae838ef).
v0.8.2
Stopped attempting to polyfill the promise
dependency (#142). Made yield*
work with string arguments (#157). Calling .next()
on a completed generator now returns { done: true }
instead of throwing a TypeError
(#158). The regeneratorRuntime.isGeneratorFunction
predicate is no longer vulnerable to minification of the GeneratorFunction
constructor (#156). Error parameters for catch
blocks are now renamed more correctly (#154).
v0.7.0
Removed Content Security Policy violations from https://github.com/facebook/regenerator/blob/master/runtime.js due to the use of the Function
constructor as an indirect eval
mechanism (#112).
This change has the potential for backwards incompatibility if you are using a minifier that does not preserve the name of the GeneratorFunction
constructor. To work around this problem, either consider using https://github.com/facebook/regenerator/blob/master/runtime.js unminified, or find a way to tell you minifier not to mangle the GeneratorFunction
name. If this extra burden is super annoying, please file an issue letting me know.
v0.6.10
v0.6.5
After examining some code using Regenerator in the wild, I decided to reinstate require("regenerator").runtime.path
, which specifies the full path of https://github.com/facebook/regenerator/blob/master/runtime.js in case you need to read that file in your projects.
It is also now possible to inject the runtime directly into the transformed AST by calling require("regenerator").transform(ast, { includeRuntime: true })
. This is especially useful when you have multiple AST transform functions (in addition to require("regenerator").transform
) that you want to compose together without reparsing/reprinting the source code.
v0.6.1
Pull request #101 has been merged at last! The master
branch now provides full support for async
functions and await
expressions! This is huge!
The public API of the package now obeys more of the conventions that have emerged for AST-driven transformation projects. Most notably, require("regenerator").compile(source, options).code
is now the preferred way to do what require("regenerator")(source, options)
used to do.