Skip to content

Releases: MatAtBread/nodent

Arrow function and edge-case output fixes

16 Dec 21:12
Compare
Choose a tag to compare

Correct cases where arrow functions contain deeply nested expressions containing await and logical/conditional operators
Fix edge cases in code output (sparse array constants, object pattern precedence, generator member functions), add everything.js syntax tests

Acorn v2.6.x compatability. Implement async `for-in` loops

10 Dec 11:23
Compare
Choose a tag to compare
  • Correctly asynchronize ES6 for...in loops.
  • Update the plugin code to remove 'async' and 'await' from the super-strict keyword tests introduced in acorn v2.6.x that generate parse errors before the plugin gets a chance to manage them. Also compatible with acorn v2.5.2 as used by previous versions of nodent.

Async for...of loops

09 Dec 12:28
Compare
Choose a tag to compare

Correctly asynchronize ES6 for...of loops and add test es6-for-of.js

More Babel fixes. Fix Arrow function variable hositing

08 Dec 16:54
Compare
Choose a tag to compare
  • Mark ArrowFunctionExpression containing a BlockStatement as having a scope (it does in Chrome 46) to constrain hoisting of variables declared inside Arrow Functions
  • Correct 'return undefined' suppression in object/class methods (as well as normal functions)
  • Numerous fixes to make Babel-style Object/ClassMethod play nicely with the ESTree Property & MethodDefinition (v2.3.1-2.3.3)

Babel 6, labeled loops, await non-Promise, version-aware JS loader/directives

07 Dec 00:52
Compare
Choose a tag to compare
  • Implement version-aware in-process JS compiler so modules built with different versions of nodent can co-exist
  • Implement wrapAwait option to allow for the await nonPromise edge-case enabled in the standard implementation
  • Implement 'optionSets' for each use nodent directive and allow their specification in the package.json to avoid use unnecessary use of setDefaultCompileOptions() and the consequent dependency between code and environment.
  • Implement labeled break and continue containing await
  • Only suppress the automatic insertion of return undefined if a function uses async return or async throw. Other async functions now return undefined asynchronously if the run to completion.
  • Fix error that mangled the declaration of a let statement under certain conditions
  • Fix Babel 6 integration (with fast-async)

Support for Babel 6 ESTree extensions

06 Nov 08:46
Compare
Choose a tag to compare

Update tests to reflect correction of async properties
For async properties, the .async flag was incorrectly set on the Property, not Property.value
Fix missing locations on await/async nodes.
Only hoist (scoped) declarations if the scope contains an 'await'.

Nodent v2 - initial release

25 Sep 22:10
Compare
Choose a tag to compare

Nodent v2 is a major update. There may be some breaking changes. Significant changes are:

  • Moved from Uglify2 to Acorn for input parsing, and re-written much of tree manipulation
  • Supports ES6 input syntax, so suitable for adding async & await to ES6 code in Node v4.x.x
  • Provides support for async ES6 constructs such as arrow functions and class methods, etc.
  • Additional tests for interoperability between es7, Promises and Generator mode
  • Cleaner options for code generation and configuration.
  • Removes supports for the pre v1.0.x "<<=" async assignment

Last v1 release

25 Sep 21:42
Compare
Choose a tag to compare

v2 is much more capable, but being new might have unknown issues.