* Docs: named functions and function declarations
* No more prototypal `extends`; update docs and example
* More comprehensive documentation of the existential operator; closes#1631
* Better document operators, including `from`
* No fat arrow class methods anymore
* Destructuring shouldn’t say that default values are applied in case of undefined or null
* Spinoff generator and async functions into their own sections; reorder things so that the sections on functions come just before classes, and destructuring goes next to the operators (which discuss assignment)
* Rewrite “CoffeeScript 2” section, making it less practical and more explanatory; move practical info into “Usage”
* Update “Variable Scoping and Lexical Safety” section to remove incorrect reference to Ruby (fixes#2360), add missing details about the safety wrapper, add note about `let`/`const`.
* Updated browser compiler
* Updated docs
* Rewrite Literate CoffeeScript breaking changes
* Split apart the “Breaking Changes” and “Unsupported Features” sections into separate sidebar items and files
* Add example of `not in`, closes#3281
* Fix words in bold that should be in backticks
* Consolidate some breaking changes sections
* Add Node API documentation; closes#3551
* Move the chaining documentation out of the changelog into its own section
* Start with the test I want to pass: return an implicit (braces-less) object
* Update Rewriter class to follow pattern of nodes.coffee; move debugging snippet to where it’ll work in CS2
* Allow export default implicit object
* `return` assumes a continuation onto the next line *if* the next line is indented
* Fix comment; improve test
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 parenthesized conditions in if-else assignment
* Add compiled output
* Use ‘is’ instead of ‘==‘; ‘right’ is a poor name when you mean ‘correct,’ not the right-hand side of the assignments in this test
Added the missing '#'s for correct string interpolation. Seems like this went unnoticed because in these test cases, the `check` function tests if the compilation fails, which it does either way.
* Write .coffee_history in $XDG_CACHE_HOME
Previously, if the $HOME environmental variable was set, the
.coffee_history file was written there. This is still the case, but
first we check if $XDG_CACHE_HOME is set, and if so we write it
there instead. This allows users who want to follow the XDG Base
Directory Specification [0] to do so. Actually, this helps out *all*
users who want to keep their home directory a bit cleaner. It seems
that using this standardized environmental variable is the cleanest
way to do this, rather than involving configuration files or command
line flags or anything else.
Fixes#3705.
[0] https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
* Stylistic corrections
Corrected some style deficiencies, thanks to helpful advice from
@GeoffreyBooth.
* Reimplement `invertLiterate` without any dependency, tracking indentation levels (including inside lists); update literate test files to also check that no tests are skipped
* Drop Literate CoffeeScript’s support for executable code blocks inside list items (and also for second paragraphs or blockquotes in list items)
* Update Literate CoffeeScript docs to reflect current supported syntax
* 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
* Use Markdown-It instead of Marked for generating the docs; update package versions
* Fix links to v2 docs
* Bump version to 1.12.5; update changelog and compiled docs output
* Update compiled output for 1.12.5
* Improve styling for tables
* Throw an error for ambiguous `get` or `set` function calls or ES5 getter/setter keywords, to warn the user to use parentheses if they intend a function call (or to inform them that `get` or `set` cannot be used as a keyword)
* Code golf
* Catch get or set keyword before static method
* DRY up getting the previous token
* Throw an error if get or set are used as keywords before what looks like a function or method with an interpolated/dynamic name
* Allow `get` or `set` parentheses-less function calls when first argument is a string without a colon (so a plain string, not a property accessor)
* Revert "Allow `get` or `set` parentheses-less function calls when first argument is a string without a colon (so a plain string, not a property accessor)"
This reverts commit 2d1addf5a4.
* Optimization
* No longer throw an error on `get` or `set` function calls to objects with dynamic property names (introduces a way to circumvent our check for trying to avoid the `get` or `set` keywords, but not worth the complications for this tiny edge case)
* 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
* Add tabbed literate test; modernize Markdown title heading
* Better parsing of Literate CoffeeScript files, including now correct parsing of tabbed .litcoffee files; and more accurate stack traces (assuming you don’t do your own word wrapping within list items)
* Swap Marked for MarkdownIt for parsing the Markdown of Literate CoffeeScript files; use MarkdownIt’s `map` property to preserve correct line numbers
* Literate CoffeeScript tests: remove trailing whitespace, fix spelling
* Literate CoffeeScript tests: add block quote test
* Literate CoffeeScript (tabbed, at least) seems to need a consistent starting indentation
* Restore test
* Reference links work now in MarkdownIt
* Breaking change in Literate CoffeeScript: code blocks within HTML tags must be unindented
* Breaking change in Literate CoffeeScript: code blocks within lists need a blank line separating them from the list item text