* First attempt at using AppVeyor
* Maybe it doesn't like the leading dot?
* Versions are an array
* Fix tests on Windows: for some reason, Windows requires `coffee` to be executed as `node coffee` (in the context of `spawnSync`, at least)
* Use npm@latest, see if that's less noisy
* Nevermind, only an issue on Node 6
* Better to see the NPM version before npm install
* Fix#4706: Comments before a PARAM_START token stay before that token
* Simplify nodes
* Add function-in-function test
* Fix#4706: Comments after class name should go after the identifier that's after `class`, not the variable assigned to
* Fix#4706: Top-level identifiers with trailing comments get wrapped in parentheses (around the comment too) so that Flow doesn't interpret it as a JavaScript label
* Cleanup
* If the source has parentheses wrapping an identifier followed by a block comment, output those parentheses rather than optimizing them away; this is a requirement of Flow, to distinguish from JavaScript labels
* More tests for Flow comments
* For local variables with trailing inline herecomments, output the comments up in the variable declarations line for Flow compatibility
* Fix#4706: Comments before a PARAM_START token stay before that token
* Simplify nodes
* Add function-in-function test
* Fix#4706: Comments after class name should go after the identifier that's after `class`, not the variable assigned to
* Fix#4706: Top-level identifiers with trailing comments get wrapped in parentheses (around the comment too) so that Flow doesn't interpret it as a JavaScript label
* Cleanup
* If the source has parentheses wrapping an identifier followed by a block comment, output those parentheses rather than optimizing them away; this is a requirement of Flow, to distinguish from JavaScript labels
* More tests for Flow comments
The handling of hoisted nodes in class bodies was incorrect, as the node
was being unwrapped *before* checking if it was hoisted, meaning nodes
that should have been hoisted would be output normally.
This affected `PassthroughLiteral`s as they were wrapped in a `Value`.
* Fix#4725: apply transpile option to require’d .coffee files
* Use the current module’s options if it has any, before going searching up the tree
* Don’t mutate passed-in options object
* If the REPL is run with `--transpile`, turn transpilation on for both the current REPL input and any files imported by that input
* Use the command.coffee machinery for parsing arguments
* Fix test for Windows
* Fix#4725: apply transpile option to require’d .coffee files
* Use the current module’s options if it has any, before going searching up the tree
* Don’t mutate passed-in options object
* ?
* ??
* Revert the coffee.EXE approach
* Explicitly define the PATH to include only the folders we need
* Get spawnSync working in Windows
* Simplify test to be cross-platform
* Fix#4464: backticked expressions in class body should be left in the body, not hoisted
* Fix#4464: backticked expressions in class body should be left in the body, not hoisted
* Simplify fix for #4464
This uses more of the existing machinery for moving class body
expressions into the initializer.
* Clarify the purpose of Class::addInitializerExpression
* Further clarify the purpose of Class::addInitializerExpression
* Add reference to class fields; format
comment wrapping
* Reapply 1d3af8c432, that got lost because of rebase/force-push shenanigans
* Updated output
* Upgrade Babeli (now babel-minify) which fixes the bug that was forcing us to run Babel twice for transpilation
* Add --transpile option (WIP)
* Node API always compiles a string, so it doesn’t need the option to pass a path to an options file, it can always just pass an object to `transpile`; get `transpile` working with `eval`
* Not allowing argument to `--transpile` so don’t need to cover so many cases
* Don’t need to worry about `sourceMaps` option to pass to Babel, `inputSourceMap` overrides it
* Rewrite Webpack test to use Node API
* Make the compiler safe again for browsers and Webpack/Browserify
* Node version of CoffeeScript.compile passes reference to Babel if transpile is requested
* Test Node API for transpile option
* Test for merged source maps
* Test for Node API error message
* Only stop searching for Babel options if a package.json has a truthy "babel" key
* Update docs
* Get `coffee` command working again in Node 6, by converting the ‘await’ wrapper in the REPL to use a Promise instead of the ‘await’ keyword; add tests for REPL ‘await’ wrapper, including test to skip async tests if the runtime doesn’t support them
* Fix async tests: now if a test function is a Promise (which an `await` function is), we add it to an array of async test functions and wait for them all to resolve before finishing the test run, so that if any async tests fail we see those failures in the output
* Code review
* Unnecessary
* Let's support Node 6+ if we can
* Simplify the returned promise
* Simplify async check
* Get `coffee` command working again in Node 6, by converting the ‘await’ wrapper in the REPL to use a Promise instead of the ‘await’ keyword; add tests for REPL ‘await’ wrapper, including test to skip async tests if the runtime doesn’t support them
* Code review
* Let's support Node 6+ if we can
* _extends utility instead of Object.assign()
* eqJS test for _extends
* Test that a user-defined function named `_extends` doesn’t conflict with our utility function
* IE8 polyfill note in docs
* Per discussion in #3075: if `sourceFiles` is unspecified, but `filename` is, use `filename`; output null instead of an empty string for `sources` or `sourceRoot`
* Update source map tests to reflect that now we return null instead of empty strings; check generated sources array
* Update source map documentation; still leave more obscure options undocumented
* Follow the TypeScript compiler’s example regarding v3SourceMap, but output empty strings instead of made-up filenames
* Have `sources` default to ‘<anonymous>’
* fix splat error with soak properties or expressions
* Add test based on #4260
* Add test based on #1349
* tests for the leading splat variant
* test for spaced prefix ...
* fixed 'if' statement in parens
* fixed replacing 'void 0' with '[]'
* remove 'void 0' replacement; add Splat::compileNode
* Use LEVEL_OP; follow style better
* Fix#3709: throwing an if, for, switch or while should throw the returned value of the statement/loop
* Fix#3789: don’t throw a throw (unless it’s in a closure)
* LEVEL_LIST works better than a list of node types
* Fix#2870: If --output ends with a filename, and the input is a file and not a path, save as the desired filename
* If an output path ends in a slash, force saving into an output folder even if that folder name would contain a period (e.g. /scripts.js/); if output filename is only periods, treat it as a path
* Restrict exceptions
* Fix#4629: interpolations (whether in strings or CSX tags) that contain nothing but comments should not be optimized out
* Template literals need an expression inside their interpolations, so if we only have a comment to put in there, toss in an empty string as well
* Don't throw an error in the console when loading a try: URL
* Handle the possibility of compiling multiple scripts with the same filename, or multiple anonymous scripts
* Fix#4558: Much more robust caching of sources and source maps, more careful lookup of source maps especially for CoffeeScript code compiled within a Coffee script (. . . within a Coffee script, etc.)
* Reimplement `cake release` to just use the shell to avoid the issues plaguing that command (something to do with module caching perhaps)
* Make `addLocationDataFn` more DRY
* Style fixes
* Provide access to full parser inside our custom function running in parser.js; rename the function to lay the groundwork for adding data aside from location data
* Fix style.
* Fix style.
* Label test comments
* Update grammar to remove comment tokens; update DSL to call new helper function that preserves comments through parsing
* New implementation of compiling block comments: the lexer pulls them out of the token stream, attaching them as a property to a token; the rewriter moves the attachment around so it lives on a token that is destined to make it through to compilation (and in a good placement); and the nodes render the block comment. All tests but one pass (commented out).
* If a comment follows a class declaration, move the comment inside the class body
* Style
* Improve indentation of multiline comments
* Fix indentation for block comments, at least in the cases covered by the one failing test
* Don’t reverse the order of unshifted comments
* Simplify rewriter’s handling of comments, generalizing the special case
* Expand the list of tokens we need to avoid for passing comments through the parser; get some literal tokens to have nodes created for them so that the comments pass through
* Improve comments; fix multiline flag
* Prepare HereComments for processing line comments
* Line comments, first draft: the tests pass, but the line comments aren’t indented and sometimes trail previous lines when they shouldn’t; updated compiler output in following commit
* Updated compiler, now with line comments
* `process` doesn’t exist in the browser, so we should check for its existence first
* Update parser output
* Test that proves #4290 is fixed
* Indent line comments, first pass
* Compiled output with indented line comments
* Comments that start a new line shouldn’t trail; don’t skip comments attached to generated tokens; stop looking for indentation once we hit a newline
* Revised output
* Cleanup
* Split “multiline” line comment tokens, shifting them forward or back as appropriate
* Fix comments in module specifiers
* Abstract attaching comments to a node
* Line comments in interpolated strings
* Line comments can’t be multiline anymore
* Improve handling of blank lines and indentation of following comments that start a new line (i.e. don’t trail)
* Make comments compilation more object-oriented
* Remove lots of dead code that we don’t need anymore because a comment is never a node, only a fragment
* Improve eqJS helper
* Fix#4290 definitively, with improved output for arrays with interspersed block comments
* Add support for line comments output interspersed within arrays
* Fix mistake, don’t lose the variable we’re working on
* Remove redundant replacements
* Check for indentation only from the start of the string
* Indentations in generated JS are always multiples of two spaces (never tabs) so just look for 2+ spaces
* Update package versions; run Babel twice, once for each preset, temporarily until a Babili bug is fixed that prevents it from running with the env preset
* Don’t rely on `fragment.type`, which can break when the compiler is minified
* Updated generated docs and browser compiler
* Output block comments after function arguments
* Comments appear above scope `var` declarations; better tracking of generated `JS` tokens created only to shepherd comments through to the output
* Create new FuncGlyph node, to hold comments we want to output near the function parameters
* Block comments between `)` and `->`/`=>` get output between `)` and `{`.
* Fix indentation of comments that are the first line inside a bare mode block
* Updated output
* Full Flow example
* Updated browser compiler
* Abstract and organize comment fragment generation code; store more properties on the comment fragment objects; make `throw` behave like `return`
* Abstract token insertion code
* Add missing locationData to STRING_START token, giving it the locationData of the overall StringWithInterpolations token so that comments attached to STRING_START end up on the StringWithInterpolations node
* Allow `SUPER` tokens to carry comments
* Rescue comments from `Existence` nodes and `If` nodes’ conditions
* Rescue comments after `\` line continuation tokens
* Updated compiled output
* Updated browser compiler
* Output block comments in the same `compileFragments` method as line comments, except for inline block comments
* Comments before splice
* Updated browser compiler
* Track compiledComments as a property of Base, to ensure that it’s not a global variable
* Docs: split up the Usage section
* Docs for type annotations via Flow; updated docs output
* Update regular comments documentation
* Updated browser compiler
* Comments before soak
* Comments before static methods, and probably before `@variable =` (this) assignments generally
* Comments before ‘if exists?’, refactor comment before ‘if this.var’ to be more precise, improve helper methods
* Comments before a method that contains ‘super()’ should output above the method property, not above the ‘super.method()’ call
* Fix missing comments before `if not` (i.e. before a UNARY token)
* Fix comments before ‘for’; add test for comment before assignment if (fixed in earlier commit)
* Comments within heregexes
* Updated browser compiler
* Update description to reflect what’s now happening in compileCommentFragments
* Preserve blank lines between line comments; output “whitespace-only” line comments as blank lines, rather than `//` following by whitespace
* Better future-proof comments tests
* Comments before object destructuring; abstract method for setting comments aside before compilation
* Handle more cases of comments before or after `for` loop declaration lines
* Fix indentation of comments preceding `for` loops
* Fix comment before splat function parameter
* Catch another RegexWithInterpolations comment edge case
* Updated browser compiler
* Change heregex example to one that’s more readable; update output
* Remove a few last references to the defunct HERECOMMENT token
* Abstract location hash creation into a function
* Improved clarity per code review notes
* Updated browser compiler