Skip to content

Releases: MatAtBread/nodent

Fix block scoped `const`.

02 May 12:48
Compare
Choose a tag to compare
  • Test both strict and non-strict modes (nodent-compiler)
  • Avoid deprecation warning in NodeJS 10 for new Buffer()
  • Fix regression in 3.2.5 for var declared in loop bodies
  • Treat const as block scoped by default (pre-ES6 implementations usually treated const as function scoped). See MatAtBread/nodent-transform@5fa3d01

More `try-catch` fixes

30 Apr 14:38
Compare
Choose a tag to compare
  • Fix issue where catch body was incompletely transformed (see #109)
  • Fix issue where unreachable continuation generated an illegal Identifer after try-catch (see MatAtBread/fast-async#56)

Fix the lifetime of let and const loop variable declarations

24 Apr 15:45
Compare
Choose a tag to compare

Fix the lifetime of let and const loop variable declarations

The previous implementation correctly limited the scope, but not the lifetime of the loop declarations, meaning they would be re-used if referenced in a callback.

Move compiler-only tests into a different sub-directory since they are now duplicates of the tests in nodent-compiler.

Refactor for nodent-compiler and nodent-transformer

18 Apr 13:54
Compare
Choose a tag to compare

v3.2.0 Refactor

Use nodent-compiler @3.2.0, which in turn uses the [email protected], which is the base AST transformer (with no parser or code generator), which is also used
Fix tests to not report unnecessary mismatch for 'directive' due to acorn v5.4.x

Note that the project is now structured so that:

  • nodent-transform is the base level AST transfomer
  • nodent-compiler is the transformer with a parser (acorn) and code generator (derived from astring)
  • nodent is the compiler, require hook for node, CLI and helpers (like http, events, etc)

Roll-up fixes

05 Mar 16:51
Compare
Choose a tag to compare

Set default Promise implementation for http covers from options.
Roll-up fixes in nodent-compiler (labelled break, onParserInstallation)
Roll-up fixes in nodent-runtime (avoid bugs with non-hoisting environments, minimal impl for Promise-supporting environments)

Correct parentheses in right-associative `new (fn())()`

08 Sep 12:58
Compare
Choose a tag to compare

Correctly walk destructuring assignment initializers

21 Aug 15:35
Compare
Choose a tag to compare

Fixes an issue where default initial values for destructured declarations were not transpiled:

const {bar1 = async () => 1} = {};

...now transpiles to....

const {bar1 = () => (function ($return, $error) {
    return $return(1);
}).$asyncbind(this, true)} = {};

Add 'host' value to compiler options

18 Aug 11:36
Compare
Choose a tag to compare

Permit the compiler options es6target, noRuntime, promises and engine to be defined with the value "host", in which case they are determined from the execution environment the code was compiled in (ie. the version of nodejs). This allows transpiled code to gracefully compile across node >0.10 using additional features of each platform as they are available. An addition named set of options, also called "host" is defined to use these values, allowing the directive "use nodent-host" to compile code for the current platform. The new value can also be used to set (or reset) names sets in the package.json. For example, to set "host" as the default values:

  "nodent":{
    "directive":{
      "default":{
		"es6target":"host",
		"promises":"host",
		"engine":"host",
		"noRuntime":"host"
      }
    }
  }

Extract compiler into separate module 'nodent-compiler'

12 Jul 10:42
Compare
Choose a tag to compare

Allows compilation to take place with no CLI ot runtime (which requires modifications to Function.prototype and global namespace). Addresses #93

Fix issue with '.' after a template literal

04 Jul 11:10
Compare
Choose a tag to compare