* Update changelog for 2.2.4

* Bump version to 2.2.4; update output
This commit is contained in:
Geoffrey Booth 2018-03-29 20:00:45 -07:00 committed by GitHub
parent 001f97ac39
commit e5aa758dda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 598 additions and 592 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -646,7 +646,7 @@ div.CodeMirror-cursor {
<section id="overview">
<p><strong>CoffeeScript is a little language that compiles into JavaScript.</strong> Underneath that awkward Java-esque patina, JavaScript has always had a gorgeous heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.</p>
<p>The golden rule of CoffeeScript is: <em>“Its just JavaScript.”</em> The code compiles one-to-one into the equivalent JS, and there is no interpretation at runtime. You can use any existing JavaScript library seamlessly from CoffeeScript (and vice-versa). The compiled output is readable, pretty-printed, and tends to run as fast or faster than the equivalent handwritten JavaScript.</p>
<p><strong>Latest Version:</strong> <a href="https://github.com/jashkenas/coffeescript/tarball/2.2.3">2.2.3</a></p>
<p><strong>Latest Version:</strong> <a href="https://github.com/jashkenas/coffeescript/tarball/2.2.4">2.2.4</a></p>
<blockquote class="uneditable-code-block"><pre><code class="language-bash"><span class="comment"># Install locally for a project:</span>
npm install --save-dev coffeescript
@ -4790,7 +4790,7 @@ The CoffeeScript logo is available in SVG for use in presentations.</li>
</section>
<section id="annotated-source">
<h2>Annotated Source</h2>
<p>You can browse the CoffeeScript 2.2.3 source in readable, annotated form <a href="annotated-source/">here</a>. You can also jump directly to a particular source file:</p>
<p>You can browse the CoffeeScript 2.2.4 source in readable, annotated form <a href="annotated-source/">here</a>. You can also jump directly to a particular source file:</p>
<ul>
<li><a href="annotated-source/grammar.html">Grammar Rules — src/grammar</a></li>
<li><a href="annotated-source/lexer.html">Lexing Tokens — src/lexer</a></li>
@ -5467,9 +5467,17 @@ x = <span class="number">2</span> + <span class="number">2</span>
</section>
<section id="changelog">
<h2>Changelog</h2>
<div class="anchor" id="2.2.4"></div>
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/2.2.3...2.2.4">2.2.4</a>
<span class="timestamp"> &mdash; <time datetime="2018-03-29">March 29, 2018</time></span>
</h2><ul>
<li>When the <code>by</code> value in a <code>for</code> loop is a literal number, e.g. <code>for x in [2..1] by -1</code>, fewer checks are necessary to determine if the loop is in range.</li>
<li>Bugfix for regression in 2.2.0 where a statement inside parentheses, e.g. <code>(fn(); break) while condition</code>, was compiling. Pure statements like <code>break</code> or <code>return</code> cannot turn a parenthesized block into an expression, and should throw an error.</li>
</ul>
<div class="anchor" id="2.2.3"></div>
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/2.1.2...2.2.3">2.2.3</a>
<a href="https://github.com/jashkenas/coffeescript/compare/2.2.2...2.2.3">2.2.3</a>
<span class="timestamp"> &mdash; <time datetime="2018-03-11">March 11, 2018</time></span>
</h2><ul>
<li>Bugfix for object destructuring with an empty array as a keys value: <code>{ key: [] } = obj</code>.</li>
@ -5477,7 +5485,7 @@ x = <span class="number">2</span> + <span class="number">2</span>
</ul>
<div class="anchor" id="2.2.2"></div>
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/2.1.1...2.2.2">2.2.2</a>
<a href="https://github.com/jashkenas/coffeescript/compare/2.2.1...2.2.2">2.2.2</a>
<span class="timestamp"> &mdash; <time datetime="2018-02-21">February 21, 2018</time></span>
</h2><ul>
<li>Bugfix for regression in 2.2.0 where a range with a <code>by</code> (step) value that increments or decrements in the opposite direction as the range was returning an array containing the first value of the range, whereas it should be returning an empty array. In other words, <code>x for x in [2..1] by 1</code> should equal <code>[]</code>, not <code>[2]</code> (because the step value is positive 1, counting up, whereas the range goes from 2 to 1, counting down).</li>
@ -5485,7 +5493,7 @@ x = <span class="number">2</span> + <span class="number">2</span>
</ul>
<div class="anchor" id="2.2.1"></div>
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/2.1.0...2.2.1">2.2.1</a>
<a href="https://github.com/jashkenas/coffeescript/compare/2.2.0...2.2.1">2.2.1</a>
<span class="timestamp"> &mdash; <time datetime="2018-02-06">February 6, 2018</time></span>
</h2><ul>
<li>Bugfix for regression in 2.2.0 involving an error thrown by the compiler in certain cases when using destructuring with a splat or expansion in an array.</li>

View File

@ -1664,9 +1664,10 @@ test "#5004: array destructuring with accessors", ->
<script type="text/x-coffeescript" class="test" id="async">
# Functions that contain the `await` keyword will compile into async functions,
# supported by Node 7.6+, Chrome 55+, Firefox 52+, Safari 10.1+ and Edge.
# But runtimes that dont support the `await` keyword will throw an error,
# even if we put `return unless global.supportsAsync` at the top of this file.
# Therefore we need to prevent runtimes which will choke on such code from even
# But runtimes that dont support the `await` keyword will throw an error just
# from parsing this file, even without executing it, even if we put
# `return unless try new Function 'async () => {}'` at the top of this file.
# Therefore we need to prevent runtimes which will choke on such code from
# parsing it, which is handled in `Cakefile`.
@ -2154,6 +2155,7 @@ test "classes with value'd constructors", ->
inner = ++counter
->
@value = inner
@
class One
constructor: classMaker()
@ -6808,37 +6810,6 @@ test "#3921: `switch`", ->
else "none"
eq "five", c
# Issue #3441: Parentheses wrapping expression throw invalid error in `then` clause
test "#3441: `StatementLiteral` in parentheses", ->
i = 0
r1 = ((i++; break) while i < 10)
arrayEq r1, []
i = 0
r2 = ((i++; continue) while i < 10)
arrayEq r2, []
i = 0
r4 = while i < 10 then (i++; break)
arrayEq r4, []
i = 0
r5 = while i < 10 then (i++; continue)
arrayEq r5, []
arr = [0..9]
r6 = ((a; break) for a in arr)
arrayEq r6, []
r7 = ((a; continue) for a in arr)
arrayEq r7, []
r8 = for a in arr then (a; break)
arrayEq r8, []
r9 = for a in arr then (a; continue)
arrayEq r9, []
# Issue #3909: backslash to break line in `for` loops throw syntax error
test "#3909: backslash `for own ... of`", ->
@ -8794,6 +8765,42 @@ test "#4097: `yield return` as an expression", ->
^^^^^^^^^^^^
'''
test "#5013: `await return` as an expression", ->
assertErrorFormat '''
-> (await return)
''', '''
[stdin]:1:5: error: cannot use a pure statement in an expression
-> (await return)
^^^^^^^^^^^^
'''
test "#5013: `return` as an expression", ->
assertErrorFormat '''
-> (return)
''', '''
[stdin]:1:5: error: cannot use a pure statement in an expression
-> (return)
^^^^^^
'''
test "#5013: `break` as an expression", ->
assertErrorFormat '''
(b = 1; break) for b in a
''', '''
[stdin]:1:9: error: cannot use a pure statement in an expression
(b = 1; break) for b in a
^^^^^
'''
test "#5013: `continue` as an expression", ->
assertErrorFormat '''
(b = 1; continue) for b in a
''', '''
[stdin]:1:9: error: cannot use a pure statement in an expression
(b = 1; continue) for b in a
^^^^^^^^
'''
test "`&&=` and `||=` with a space in-between", ->
assertErrorFormat '''
a = 0
@ -16886,7 +16893,7 @@ testRepl "keeps running after runtime error", (input, output) ->
eq 'undefined', output.lastWrite()
testRepl "#4604: wraps an async function", (input, output) ->
return unless global.supportsAsync
return unless try new Function 'async () => {}' # Feature detect support for async functions.
input.emitLine 'await new Promise (resolve) -> setTimeout (-> resolve 33), 10'
setTimeout ->
eq '33', output.lastWrite()

View File

@ -1,19 +1,25 @@
## Changelog
```
releaseHeader('2018-03-11', '2.2.3', '2.1.2')
releaseHeader('2018-03-29', '2.2.4', '2.2.3')
```
* When the `by` value in a `for` loop is a literal number, e.g. `for x in [2..1] by -1`, fewer checks are necessary to determine if the loop is in range.
* Bugfix for regression in 2.2.0 where a statement inside parentheses, e.g. `(fn(); break) while condition`, was compiling. Pure statements like `break` or `return` cannot turn a parenthesized block into an expression, and should throw an error.
```
releaseHeader('2018-03-11', '2.2.3', '2.2.2')
```
* Bugfix for object destructuring with an empty array as a keys value: `{ key: [] } = obj`.
* Bugfix for array destructuring onto targets attached to `this`: `[ @most... , @penultimate, @last ] = arr`.
```
releaseHeader('2018-02-21', '2.2.2', '2.1.1')
releaseHeader('2018-02-21', '2.2.2', '2.2.1')
```
* Bugfix for regression in 2.2.0 where a range with a `by` (step) value that increments or decrements in the opposite direction as the range was returning an array containing the first value of the range, whereas it should be returning an empty array. In other words, `x for x in [2..1] by 1` should equal `[]`, not `[2]` (because the step value is positive 1, counting up, whereas the range goes from 2 to 1, counting down).
* Bugfixes for allowing backslashes in `import` and `export` statements and lines that trigger the start of an indented block, like an `if` statement.
```
releaseHeader('2018-02-06', '2.2.1', '2.1.0')
releaseHeader('2018-02-06', '2.2.1', '2.2.0')
```
* Bugfix for regression in 2.2.0 involving an error thrown by the compiler in certain cases when using destructuring with a splat or expansion in an array.
* Bugfix for regression in 2.2.0 where in certain cases a range iterator variable was declared in the global scope.

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 2.2.3
// Generated by CoffeeScript 2.2.4
(function() {
// This **Browser** compatibility layer extends core CoffeeScript functions
// to make things work smoothly when compiling code directly in the browser.

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 2.2.3
// Generated by CoffeeScript 2.2.4
(function() {
// `cake` is a simplified version of [Make](http://www.gnu.org/software/make/)
// ([Rake](http://rake.rubyforge.org/), [Jake](https://github.com/280north/jake))

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 2.2.3
// Generated by CoffeeScript 2.2.4
(function() {
// CoffeeScript can be used both on the server, as a command-line compiler based
// on Node.js/V8, or to run CoffeeScript directly in the browser. This module

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 2.2.3
// Generated by CoffeeScript 2.2.4
(function() {
// The `coffee` utility. Handles command-line compilation of CoffeeScript
// into various forms: saved into `.js` files or printed to stdout

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 2.2.3
// Generated by CoffeeScript 2.2.4
(function() {
// The CoffeeScript parser is generated by [Jison](https://github.com/zaach/jison)
// from this grammar file. Jison is a bottom-up parser generator, similar in

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 2.2.3
// Generated by CoffeeScript 2.2.4
(function() {
// This file contains the common helper functions that we'd like to share among
// the **Lexer**, **Rewriter**, and the **Nodes**. Merge objects, flatten

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 2.2.3
// Generated by CoffeeScript 2.2.4
(function() {
// Node.js Implementation
var CoffeeScript, ext, fs, helpers, i, len, path, ref, universalCompile, vm,

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 2.2.3
// Generated by CoffeeScript 2.2.4
(function() {
// The CoffeeScript Lexer. Uses a series of token-matching regexes to attempt
// matches against the beginning of the source code. When a match is found,

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 2.2.3
// Generated by CoffeeScript 2.2.4
(function() {
// `nodes.coffee` contains all of the node classes for the syntax tree. Most
// nodes are created as the result of actions in the [grammar](grammar.html),

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 2.2.3
// Generated by CoffeeScript 2.2.4
(function() {
var LONG_FLAG, MULTI_FLAG, OPTIONAL, OptionParser, SHORT_FLAG, buildRule, buildRules, normalizeArguments, repeat,
splice = [].splice;

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 2.2.3
// Generated by CoffeeScript 2.2.4
(function() {
var CoffeeScript, Module, binary, child_process, ext, findExtension, fork, getRootModule, helpers, i, len, loadFile, path, ref;

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 2.2.3
// Generated by CoffeeScript 2.2.4
(function() {
var CoffeeScript, addHistory, addMultilineHandler, fs, getCommandId, merge, nodeREPL, path, replDefaults, runInContext, sawSIGINT, transpile, updateSyntaxError, vm;

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 2.2.3
// Generated by CoffeeScript 2.2.4
(function() {
// The CoffeeScript language has a good deal of optional syntax, implicit syntax,
// and shorthand syntax. This can greatly complicate a grammar and bloat

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 2.2.3
// Generated by CoffeeScript 2.2.4
(function() {
// The **Scope** class regulates lexical scoping within CoffeeScript. As you
// generate code, you create a tree of scopes in the same shape as the nested

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 2.2.3
// Generated by CoffeeScript 2.2.4
(function() {
// Source maps allow JavaScript runtimes to match running JavaScript back to
// the original source code that corresponds to it. This can be minified

View File

@ -8,7 +8,7 @@
"compiler"
],
"author": "Jeremy Ashkenas",
"version": "2.2.3",
"version": "2.2.4",
"license": "MIT",
"engines": {
"node": ">=6"