Apr 2, 2016
- #397 - Fix cases of blocks not indenting properly (@rianhunter)
Jul 3, 2015
May 5, 2015
- Fix
a - (b + c)
incorrectly dropping parentheses (#373) if (x in y)
now translates tox of y
instead ofin
(@snowyu, #355)- Fix "Cannot read property 'line' of undefined" errors (@snowyu, #356)
Feb 14, 2015
- Remove 'coffee-script' as hard dependency, just use pre-built distribution (#351)
Feb 13, 2015
- Fix nesting division operators (eg:
a / (b * c)
) (#348) - Add 'coffee-script' as a hard dependency (#351)
Feb 10, 2015
- Upgrade from
esprima-harmony
toesprima-fb
v10001.1.0 (#343) - Fix multiple unary operators not being spaced properly (eg:
a - - - b
) (#339) - Fix nesting subtraction operators (eg:
a - (b - c)
) (#347) - Fix nesting ternary operators (eg:
a ? (b ? c : d) e
) (#345)
Feb 2, 2015
Full rewrite that features the Esprima parser. This release resolves a lot of issues, a lot of which are tracked with the "fixed in 2.0" label.
Check the migration guide for information on what's changed from v0 to v2.0.
- add error handling during conversion
- online editor: fix scrolling for safari
- online editor: add favicon
- online editor: fix options usage
- fix block comments
- merge 275 thanks to liukun
- merge 276 thanks to liukun
- merge 184 thanks to Carl Fürstenberg
- fix
x != undefined
- fix
for in
- fix CLI error code
- show line numbers in errors
- Update dependencies
- Fixed DocPad always being installed (only needed for dev)
- Updated for CoffeeScript ~1.7.1 from ~1.6.3
- Browserify build no longer includes the entire
package.json
file- It was only used for the version number, which is now inserted automatically via our build script
- fix [merge #233 swtich with >2 cases](js2coffee#233) thanks to Tomasz Szatkowski
- fix [fix #252 install fails on unbutu](js2coffee#252)
- merged [Add implicit returns (mostly fixes #48)](js2coffee#168) thanks to Dave Burt
- merged [fixes #240: treat unrecognised extensions as JS; support JSON](js2coffee#241) thanks to Michael Ficarra
- merged [Fix incorrect translation of unbracketed then/else (fixes #141, #182)](js2coffee#226) fixes also #108 - thanks to @nateschiffer
- merged Parenthesize function expressions that are part of member expressions fixed #222, #135, #55, #177 thanks to @karlbohlmark
- merged [Support empty for loops. Closes #116.](js2coffee#120) thanks to Ryunosuke Sato
- fixed nopt issue issue #231
- Replace option parser with nopt
- add CLI option for indent issue #143
- add CLI option for single quoted string literals
- use ansidiff in tests for colored assertion errors
- you can pass build options as a JSON comment in test files:
// OPTIONS:{"single_quotes":true}
- Nested objects and arrays are now easier to read
- Thanks to Anton Wilhelm for issue #224 and pull request #227
Thanks to @balupton, @tsantef, @ForbesLindesay
- Fixed CoffeeScript version problems
- Use only compatible coffee-script version
- Defines RESERVED words if not defined
- Rewrote to only use local coffee-script installation, rather than using global installation
- Fixed global leak
- Tests now use the Joe Test Runner, instead of using nothing before
- Watched, compiled, bundled, and automatically tested with DocPad
- Added TravisCI support
Small "emergency" bugfixes, thanks @tricknotes.
- Exit when compilation completes in Node 0.6. (#112)
- Fix typo in the help text when typing
js2coffee
. (#113)
Thanks to @Wisdom, @nilbus, @joelvh, @gabipurcaru, @michaelficarra, @tricknotes, @eventualbuddha, @clkao for the contributions.
- Fix misspelling in package.json.
- Object lookups using object literals (
o[{a:1, b:2}]
) are now supported. - Fixed
js2coffee file.js
not working in Linux. (#90, #54) - Returning from an if without curly braces are now supported. (
if (x) return y;
)) (#50) - Returning object literals should now have the objects parenthesized
properly. (
return {x:1, y:2}
) (#52) - Always new-line objects to support
{ a: { b: c } }
. (#96, #94) - Reserved words are now allowed as property accessors. Fixes
object.on(...)
. (#97, #95, #75) - Empty switch cases now get compiled correctly. (#70, #28)
- The value
undefined
now gets compiled properly. (#20, #85) - Declaring
var x
will now translate tox = undefined
. (#79) - Updated reserved keywords list. (#25, #67)
- Compile
!!
into!!
instead ofnot not
. (#30) - Implement CRLF support. Closes (#81, #88)
!!!x
now condenses tonot x
.==
and===
now becomeis
. (#29)!(a instanceof b)
now becomesa not instanceof b
. (#29)- Doing
var x = y
will now have different behavior for reserved keywords. (#79)
- Fixed bad link in README. (#63)
- Make
npm test
run tests. - Running tests now shows less output.
- Running tests now exits with an error code when it fails.
- Invert the 'a == null' behavior. (#19, #51)
- Fix the problem where passing an anonymous function as a parameter can sometimes lead to syntax errors. (#55)
Lots of refactoring and new improvements.
- Single line ifs.
if (x) continue;
will now compile tocontinue if x
. - Hide empty catches. (#32).
try { .. } catch (f) {}
now becomestry ..
without a catch.
- Omit returns more agressively. (#42)
- Omit many unneeded parentheses in certain cases. (#31)
- Fix
x.prototype.y
to bex::y
instead ofx::.y
(#24) - The
in
operator now compiles toof
. (#46)a in b
now compiles toa of b
.
- Fix floating point numbers. (#45)
- Fix a problem with returning object literals. (#47)
- Lots and lots of refactoring.
Builder
is now a class (to support warnings in the future, and more).- Implement a new
Transformer
class to do AST transformations before building the compiled source. - Recursive functions now use
Node::walk()
. - Move stuff into
js2coffee/helpers.coffee
andjs2coffee/node_ext.coffee
.
Special thanks to Michael Ficarra for agressively reporting issues and suggesting numerous improvements.
- Account for negative existence checks (
if !x?
). (#19)- Compile
if (x != null)
tounless x?
- Compile
if (x === null)
toif x?
- Compile
- Ensure object literals with more than one property get surrounded by
({ .. })
. (#8) - Support
debugger
. (#27) - Support destructuring in functions. (#17)
- Use
loop
instead ofwhile true
in while and for loops. (#35) - Use the
::
prototype operator. (#24) - Use
unless
anduntil
as the inverse ofif
andwhile
respectively. (#35)
- Keys in object literals now get quoted if needed. This fixes the erroneous
compilation of objects such as
{ 'click #button': function() { ... } }
.
- Allow single-line JS comments without a newline in the end.
- Enquote identifiers in object literals as needed. (#16)
- Ensure that percent interpolation (%i) don't get messed up in the Node version. (#13)
- Ensure that when anonymous functions are called, they are parenthesized. (#14)
- more tests.
++b
is now no longer erroneously translated tob++
.- Fixed an issue where
{ off: 2 }
erroneously becomes{ off_: 2 }
. - Returning object literals should now not create invalid CoffeeScript. (#15)
- Annotate the source code.
- Make a simpler (but less stringent) JS packing routine for
js2coffee.min.js
.
- Narcissus to not go into an infinite loop in the browser.
- Use
this
instead of@
for better readability. (#10)
- Implement += and friends. (#9)
- Use 'cake' instead of 'make'.
- Better string escaping
- Better handling of empty blocks
- Support for commas (eg:
a = 2, b = 3
) - Returns and breaks are omitted when not needed
- Switch/case now uses
switch
instead ofif
- Some other improvements
Initial version.