This change spawns `coffee` with a new path, but without removing all other
environment variables. This is useful for preserving environment needed by
Node, for example, `LD_LIBRARY_PATH` on Unix. In particular, fix#5179.
* Build both a legacy and modern browser compiler
* Dynamic import example and documentation
* Update the docs to use the modern browser compiler if the browser supports it
* Update policy regarding Stage 3 features
* This never made sense, and assigning a string to index 0 *of a string* throws in Module mode (and silently does nothing in Script mode) so remove this unneeded code that throws when compiling `fn for i from from iterable` in Module mode
* Have browser-based tests use the ES module version if supported
* Simplify building logic
* Update output
* For the ES module version of the browser compiler, don't automatically attach the runScripts event handler
* Consistent comments
* Fix comment
The `rli` property is just a reference to itself. It still exists
for legacy reasons but it will likely be removed in a future major
version. This makes sure everything works as expected.
* Add test for #5085
$ cake test
failed 1 and passed 1274 tests in 4.81 seconds
#5085: Bug: @ reference to class not maintained in do block
AssertionError [ERR_ASSERTION]: Expected undefined to equal 2
* Fix#5085: @ reference to class in "do" block
Assuming that a bound Code node inside an ExecutableClassBody without a
name must be a "do" block.
* Additional tests
https://github.com/jashkenas/coffeescript/pull/5145#issuecomment-462127244
Also switched to concat'g strings for test values, as opposed to
incrementing numbers: makes the tests a bit easier to read.
* implement coffeescript._addSoucrse method
This method enables an external module to implement caching of
compilation results. When the compiled js source is loaded from cache,
the original coffee code should be added with this method in order to
enable the Error.prepareStackTrace below to correctly adjust the stack
trace for the corresponding file (the source map will be generated on
demand).
* replace _addSource with registerCompiled
* extract the logic from _compileFile into _compileRawFileContent
_compileFile takes care of logging the file and calls _compileRawFileContent
this way an external caching implementation which computes cache key
based on raw content of the sources file, can reuse the logic of
_compileFile and avoid having calling `fs.readFileSync` for the file
more twice in case of cache miss
* remove 'output' argument from registerCompiled
* Port to Babel 7
Use the Babel 7 @babel/core transpiler, falling back to the older babel-core version if possible.
* Use Babel 7 and preset-env 7 to build the browser compiler and test Babel transpilation
* Update docs for Babel 7
* Update links to use https://coffeescript.org
* 2.3.1 changelog
* Bump version to 2.3.1; update output
* Forgot one
* Another one
* Lock Babel versions for Node 6 build to succeed, until Babel 7 is out
* Changelog sub-sections should use h3, not h2; no need for hack anchor tag anymore
* Internationalize dates to user’s locale
* Consistent names
* Split up the changelog into separate files per version; make HTML markup consistent with the other sections in the docs
* Fix sidebar links for introduction and overview
* Move the building of the comments hash into its own function, to make clearer that it only happens once
* Abstract token comments dictionary
* Format comments
* Allow attaching a “data” property to tokens, to allow extra info to pass through the parser into the node classes
* Add data to StringLiteral tokens such that we should be able to deindent them in the nodes class
* Update output
* Another comment fix
* Add data to every token, with common properties
* Be more defensive, even though we apparently don't need to be
* Improve comments
* Remove the token data property, leaving all unrelated improvements
* Code review improvements; update output
* Explicitly turn off minify mangling, because it was previously implicitly disabled by the existence of the `eval` call we’re about to remove
* Update babel-core
* Run browser-compiled scripts using window.eval rather than just eval, to use a clean scope (many times faster)
* Update output
* Fix browser-based test broken by #5028
* Update output
* Move analytics initialization into docs.coffee
* Bump Bootstrap and CodeMirror versions
* Update output
* Merge CodeMirror styles
* Update CodeMirror styles
* Better flexbox layout for docs, including flex auto-sized sidebar and main column
* Minor styling fixes for Edge
* Fix scrollspy for new layout
* Update output
* Clicking on the CoffeeScript logo in the navbar should scroll to top; fix main column width on mobile
* Update output
* 2.3.0 changelog
* Update operators section for **
* Update docs for ES2018 object rest/spread
* Remove references to Node's experimental modules support
* Move the README coffee cup to the right side, so our name isn't cut off on the NPM page; update README and CONTRIBUTING text
* Update dependencies
* Add compatibility note for async generators
* Bump version to 2.3.0 and update output
* Have CI test in Node 10 instead of 9
* Somehow this gets generated slightly differently in Node 10
* Fix#4042: Update broken link
* Move analytics initialization into docs.coffee
* Bump Bootstrap and CodeMirror versions
* Update output
* Merge CodeMirror styles
* Update CodeMirror styles
* Better flexbox layout for docs, including flex auto-sized sidebar and main column
* Minor styling fixes for Edge
* Fix scrollspy for new layout
* Update output
* Clicking on the CoffeeScript logo in the navbar should scroll to top; fix main column width on mobile
* Update output
* Support ES2018 regex dotall flag
* Test in Node 9
* Alphabetize regex flags
* Split regex dotall test into its own file, use new feature detection method of loading it
* Update docs to explain compatibility for ES2018 and newer Node features
* Remove unnecessary paragraph
* Passthrough exponentiation operator; remove tests that are invalid JavaScript
* Treat **= as a passthrough assignment
* Get tests passing in Node 6
* Improve scoping
* Move exponentiation tests into their own file, now that it's filtered out by Cakefile
* Restore original test
* Make `node --harmony bin/cake test` pass on Node 9
Make classMaker() explicitly return an object
* Update Travis and AppVeyor to use --harmony and v9