* Don’t confuse the syntax highlighter
* Comment Assign::compilePatternMatch a bit
* Assignment expressions in conditionals are a bad practice
* Rename `wrapInBraces` to `wrapInParentheses`, to set the stage for future `wrapInBraces` that uses `{` and `wrapInBrackets` that uses `[`
* Correct comment
* object destructuring
* Allow custom position of the rest element.
* Output simple array destructuring assignments to ES2015
* Output simple object destructured assignments to ES2015
* Compile shorthand object properties to ES2015 shorthand properties
This dramatically improves the appearance of destructured imports.
* Don’t confuse the syntax highlighter
* Comment Assign::compilePatternMatch a bit
* Assignment expressions in conditionals are a bad practice
* Rename `wrapInBraces` to `wrapInParentheses`, to set the stage for future `wrapInBraces` that uses `{` and `wrapInBrackets` that uses `[`
* object destructuring
* Allow custom position of the rest element.
* rest element in object destructuring
* rest element in object destructuring
* fix string interpolation
* merging
* fixing splats in object literal
* Rest element in parameter destructuring
* merging with CS2
* merged with CS2
* Add support for the object spread initializer. https://github.com/tc39/proposal-object-rest-spread/blob/master/Spread.md
* Fix misspellings, trailing whitespace, other minor details
* merging with beta2
* refactor object spread properties
* small fix
* - Fixed object spread function parameters.
- Clean up "Assign" and moved all logic for object rest properties in single method (compileObjectDestruct).
- Add helper function "objectWithoutKeys" to the "UTILITIES" for use with object rest properties,
e.g. {a, b, r...} = obj => {a, b} = obj, r = objectWithoutKeys(...)
- Clean up "Obj" and moved all logic for object spread properties in single method (compileSpread).
- Clean up "Code".
- Add method "hasSplat" to "Obj" and "Value" for checking if Obj contains the splat.
- Enable placing spread syntax triple dots on either right or left, per #85 (https://github.com/coffeescript6/discuss/issues/85)
* Fixed typos
* Remove unused code
* Removed dots (e.g. splat) on the left side from the grammar
* Initial release for deep spread properties, e.g. obj2 = {obj.b..., a: 1} or {obj[b][c]..., d: 7}
Tests need to be prepared!
* 1. Object literal spread properties
Object literals:
- obj = { {b:{c:{d:1}}}..., a:1 }
Parenthetical:
- obj = { ( body ), a:1 }
- obj = { ( body )..., a:1 }
Invocation:
- obj = { ( (args) -> ... )(params), a:1 }
- obj = { ( (args) -> ... )(params)..., a:1 }
- obj = { foo(), a:1 }
- obj = { foo()..., a:1 }
2. Refactor, cleanup & other optimizations.
* Merged with 2.0
* Cleanup
* Some more cleanup.
* Fixed error with freeVariable and object destructuring.
* Fixed errors with object spread properties.
* Improvements, fixed errors.
* Minor improvement.
* Minor improvements.
* Typo.
* Remove unnecessary whitespace.
* Remove unnecessary whitespace.
* Changed few "assertErrorFormat" tests since parentheses are now allowed in the Obj.
* Whitespace cleanup
* Comments cleanup
* fix destructured obj param declarations
* refine fix; add test
* Refactor function args ({a, b...})
* Additional tests for object destructuring in function argument.
* Minor improvement for object destructuring variable declaration.
* refactor function args ({a, b...}) and ({a, b...} = {}); Obj And Param cleanup
* fix comment
* Fix object destructuring variable declaration.
* more tests with default values
* fix typo
* Fixed default values in object destructuring.
* small fix
* Babel’s tests for object rest spread
* Style: spaces after colons in object declarations
* Cleanup comments
* Simplify Babel tests
* Fix comments
* Fix destructuring with splats in multiple objects
* Add test for default values in detsructuring assignment with splats
* Handle default values when assigning to object splats
* Rewrite traverseRest to fix handling of dynamic keys
* Fix double parens around destructuring with splats
* Update compileObjectDestruct comments
* Improve formatting of top-level destructures with splats and tidy parens
* Added a bigger destructuring-with-defaults test and fixed a bug
* Refactor destructuring grammar to allow additional forms
* Add a missing case to ObjSpreadExpr
* These tests shouldn’t run in the browser
* Fix test.html
* bound method runtime check
* restore bound method tests
* bound method tests
* test bound method in prop-named class
* run check against parent class
* dummy commit
* remove comment
* rename to boundMethodCheck
* fixes from code review
* use ref to own class for check
* fixes from code review
* remove unneeded param
* CSX implementation
* fixed comment, used toJS, added error tests, fixed error in identifier regex, fixed interpolation inside attributes value and added test
* added missing test for bare attributes, split attribute and indentifier regex, fixed checking for closing tags closing angle bracket
* Refactor tests that compare expected generated JavaScript with actual generated JavaScript to use common helper; add colors to error message to make differences easier to read
* Better match the style of the rest of the codebase
* Remove unused function
* More style fixes
* Allow unspaced less-than operator when not using CSX
* Replace includesCSX with a counter and simplify the unspaced operator logic
* Fixed indexing and realized that I completely enabled the tight spacing, added a test for it too
* Style fixes
* Breaking changes note about bound class methods
* Changelog for 2.0.0-beta2, including renaming “Change Log” to “Changelog” (the preferred spelling per Wikipedia)
* Update version to 2.0.0-beta2
* 2.0.0-beta2 generated output
Bound methods are implemented as assignments to `this` in the
constructor. In derived classes, where `this` is unavailable until
after `super` has been called, the binding is applied and assigned after
the `super` call. This means that any references to 'bound' methods
reachable from the parent constructor will actually point to the unbound
prototype methods.
This can lead to very subtle bugs where a method that is thought to be
bound is handed off and later called with an incorrect context, and the
only defence is for users to be vigilant about referencing bound methods
in constructors.
* Swap Google Closure Compiler for Babili
* Browser compiler, minified by Babili
* Use Babel to transform, not just to minify; add process.env.TRANSFORM to disable transforming if we only want to minify. Unfortunately several browser tests fail when transformed . . .
* Move `super()` calls so that the Babel-transformed browser compiler passes all the browser tests (in Node, at least)
* Updated browser build
* Update browser tests
* Uncomment module test that was waiting for classes to be supported
* Rely on native indexOf
* Replace `bind` helper with native `bind` (no shortcut necessary)
* Update output
* Update modules class tests
* Remove helper for prototype extends
* Update docs to reflect removed extends operator
* Add shortcut for splice, like we have for slice
* Fix browser build to incorporate Markdown-It, not Marked
* Update Google Closure Compiler; recompile browser build but with MINIFY=false, because Closure Compiler throws an error on our current code; see https://github.com/google/closure-compiler-js/issues/59
* Bump version to 2.0.0-beta1; do release build, with updated docs and annotated source
* Output simple array destructuring assignments to ES2015
* Output simple object destructured assignments to ES2015
* Compile shorthand object properties to ES2015 shorthand properties
This dramatically improves the appearance of destructured imports.
* Compile default values in destructured assignment to ES2015
* Rename `wrapInBraces` to `wrapInParentheses`, and `compilePatternMatch` to `compileDestructuring`, for clarity; style improvements (no `==` or `!=`, etc.)
* Don’t confuse the syntax highlighter
* Comment Assign::compilePatternMatch a bit
* Assignment expressions in conditionals are a bad practice
* Optional check for existence that only checks `!== undefined`, not `!= null`, to follow ES convention that default values only apply when a variable is undefined, not falsy
* Add comments; remove unnecessary array splats in function tests
* The fallback destructuring code should apply default values only if `undefined`, not falsy, to follow ES spec
* Support destructuring in function parameters (first pass); catch destructured reserved words
* Destructured variables in function parameter lists shouldn’t be added to the function body with `var` declarations; treat splat array function parameters the legacy way to avoid rethinking #4005
* Remove redundancy in undefined-only check for existence; fix passing option to check
* Fix undefined redundancy
* Simplify getting the variable name
* Reimplement “check for existence if not undefined” without creating a new operator
* `Obj::isAssignable` should not mutate; pass `lhs` property in from `Assign` or `Code` to child arrays and objects so that those child nodes are set as allowable for destructuring
* Revert changes to tests
* Restore revised test for empty destructuring assignment