Releases: MatAtBread/nodent
Correct hoisting of destructing var declarations
Correct hoisting of destructing var declarations (implemented in nodejs >6.0.0)
Update test script to be more discerning about how to detect JS feature implementations in V8
Add test 'es6-destructure'
Update to acorn v3.1.0
Update to acorn v3.1.0
Update acorn-es7-plugin
Update acorn-es7-plugin to correctly parse the statement export async function name(){...}
as async function name(){...} is a valid named declaration.
Expose runtime.js
Place runtimes ($asyncbind and $asyncspawn) in a separate file ('lib/runtime.js') so the dedicated Babler or other tool builder can extract them without having to include the entire compiler
Implement EagerThenables(). Separate thenable, eager for inclusion via browserify
- Implement
nodent.EagerThenable()
to provide Promise-like (but unchainable) execution semantics (eager evaluation, asynchronous resolution) - Implement new test harness to collate performance by mode and Promise implementation
- Allow optional passing of a Promise type to the covers http, https, map, events and movre Thenable to it's own fix to ease integration with Browserify or Webpack (specifically, these covers can be required directly as there is no hard dependancy on the 'nodent' parameter, and so no need to require the entire library into thebrowser). The default behaviour is now to use the global.Promise if present, or nodent.Thenable if not.
Improve compilation speed, update to acorn v3.0.4
- Significant improvement in compilation speed by re-factoring output.js (thanks to @davidbonnet for pointing it out)
- Update to acorn v3.0.4
Update to acorn 2.7.0. Invoke async function in es7 mode 'eagerly'
- Update to Acorn v2.7.0. This tightens up the parsing of some ES6 edge cases and could possibly break old ES5 sloppy mode code
- Implement 'eager' evaluation for 'ES7' mode (promises & generators always were eager). This means that you can invoke an async function without a preceding await (simply by calling it as normal), but you can't get the result. This is useful for initiating 'background' things, or running async functions for their side effects. This brings the semantics of all modes into compliance with the specification, but changes those of 'ES7' mode compared to versions prior to 2.3.x. Specifically calls to myAsyncFunction() without an await in v2.3.13 or earlier wouldn't actually execute the function body, but would provide a Thenable that would. As of v2.4.0, the body is executed in any case, but without the await the result is not available. v2.4.0 will behave as earlier versions if you specify the code-generation option lazyThenables.
Compilation performance improvement
- Improve compiler performance (approx 25%)
- Clean code to work with istanbul
- Fix typo
Support ES5 Strict Mode, and fix logical/conditional operators
- Improve compiler performance (approx 20%)
- Fix issues related to the generation of nested FunctionDeclarations in ES5-Strict mode
- Re-implement mapLogicalOps & mapCondOps to generate correct code for expressions like
a || b && await c
. Previous version produced code that wouldn't run in some circumstances - Allow the option
{log:false}
instead of a no-op function - Correctly place directives at the top of the Program/function when hoisting declarations.
Thanks to https://github.com/epoberezkin for the additional test cases and enhancements
Implement `AsyncFunction` helper for dynamic compilation
Provide the cover 'asyncfunction' which implements the type AsyncFunction
to dynamically compile and create asynchronous functions.