Skip to content

Commit 8061ecf

Browse files
2.3.0 (#5043)
* 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
1 parent 6df8f5f commit 8061ecf

33 files changed

+3315
-4109
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ language: node_js
33
node_js:
44
- 6
55
- 8
6-
- 9
6+
- 10
77

88
cache:
99
directories:

CONTRIBUTING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,9 @@
66

77
* Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/coffeescript/tree/master/src). If you’re just getting started with CoffeeScript, there’s a nice [style guide](https://github.com/polarmobile/coffeescript-style-guide).
88

9-
* In your pull request, do not add documentation to `index.html` or re-build the minified `coffeescript.js` file. We’ll do those things before cutting a new release. You _should,_ however, commit the updated compiled JavaScript files in `lib`.
9+
* In your pull request, do not add documentation to `index.html` or re-build the minified `coffeescript.js` file. We’ll do those things before cutting a new release. You _should,_ however, commit the updated compiled JavaScript files in `lib`.
10+
11+
* To get started, read the guides in the wiki:
12+
* [Hacking on the CoffeeScript Compiler](https://github.com/jashkenas/coffeescript/wiki/%5BHowTo%5D-Hacking-on-the-CoffeeScript-Compiler)
13+
* [How parsing works](https://github.com/jashkenas/coffeescript/wiki/%5BHowTo%5D-How-parsing-works)
14+
* [Update the docs](https://github.com/jashkenas/coffeescript/wiki/%5BHowTo%5D-Update-the-docs)

README.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
@@@@@@@ @@@@ @@@@@
2-
{ @@@@@@@@@@ @@@ @@@
3-
} } { @@@@ @@ @@@ @@@
4-
{ { } } @@@@ @@@@@@@ @@@ @@@ @@@@@@ @@@@@@
5-
} }{ { @@@@ @@@ @@ @@@@@ @@@@@@ @@@ @@ @@@@ @@
6-
{ }{ } } @@@@ @@@@ @@ @@@ @@@ @@@ @@@ @@@ @@@
7-
{ }{ }{ { } @@@@ @@@@ @@ @@@ @@@ @@@@@@@@ @@@@@@@@
8-
{ { } { } { } } @@@@@ @@@@ @@ @@@ @@@ @@@ @@@
9-
{ } { } { } @@@@@@@@@@ @@@@@@@@ @@@ @@@ @@@@@@@@ @@@@@@@@
10-
@@@@@@ { } { } @@@@@@@ @@@@@ @@@ @@@ @@@@@ @@@@@
11-
@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@ @@@
12-
@@ @@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@ @@@ @@@
13-
@@ @@@@@@@@@@@@@@@@@@@@@@@@ @@@@ @@ @@@ @@@@
14-
@@@ @@@@@@@@@@@@@@@@@@@@@ @@@@ @@@ @@ @@@@
15-
@@@ @@@@@@@@@@@@@@@@@@ @@@@@ @@@@@ @@ @@ @@@ @@@@@@@ @@@@@
16-
@@@ @@@@@@@@@@@@@@@@ @@@@@ @@@ @@@ @@@@@@@@ @@@@ @@@@ @@@@@@@
17-
@@@@@@@@@@@@@@ @@@@@ @@@ @@@@ @@@@ @@@ @@@ @@@
18-
@@@@@ @@@@ @@@@ @@@@ @@@@ @@@@ @@@@ @@@@
19-
@@@ @@@@ @@@ @@@@ @@@@ @@@ @@@@ @@@@
20-
@@@ @@@@ @@@@ @@@@ @@@@ @@@@ @@@@ @@@@
21-
@@@@@@@@@ @@@@@@ @@@@ @@@@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into JavaScript.
2727

@@ -30,11 +30,13 @@ CoffeeScript is a little language that compiles into JavaScript.
3030
Once you have Node.js installed:
3131

3232
```shell
33+
# Install locally for a project:
34+
npm install --save-dev coffeescript
35+
36+
# Install globally to execute .coffee files anywhere:
3337
npm install --global coffeescript
3438
```
3539

36-
Leave off the `--global` if you don’t wish to install globally.
37-
3840
## Getting Started
3941

4042
Execute a script:

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ environment:
22
matrix:
33
- nodejs_version: '6'
44
- nodejs_version: '8'
5-
- nodejs_version: '9'
5+
- nodejs_version: '10'
66
- nodejs_version: '' # Installs latest.
77

88
install:

docs/v2/annotated-source/grammar.html

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -580,11 +580,11 @@ <h2 id="grammatical-rules">Grammatical Rules</h2>
580580
o <span class="hljs-string">'Identifier'</span>
581581
o <span class="hljs-string">'Property'</span>
582582
o <span class="hljs-string">'ThisProperty'</span>
583-
o <span class="hljs-string">'[ Expression ]'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Value <span class="hljs-keyword">new</span> ComputedPropertyName $<span class="hljs-number">2</span>
584583
]
585584

586585
ObjAssignable: [
587586
o <span class="hljs-string">'SimpleObjAssignable'</span>
587+
o <span class="hljs-string">'[ Expression ]'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> Value <span class="hljs-keyword">new</span> ComputedPropertyName $<span class="hljs-number">2</span>
588588
o <span class="hljs-string">'AlphaNumeric'</span>
589589
]</pre></div></div>
590590

@@ -1492,26 +1492,31 @@ <h2 id="grammatical-rules">Grammatical Rules</h2>
14921492
</div>
14931493

14941494
<div class="content"><div class='highlight'><pre> For: [
1495-
o <span class="hljs-string">'Statement ForBody'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> For $<span class="hljs-number">1</span>, $<span class="hljs-number">2</span>
1496-
o <span class="hljs-string">'Expression ForBody'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> For $<span class="hljs-number">1</span>, $<span class="hljs-number">2</span>
1497-
o <span class="hljs-string">'ForBody Block'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> For $<span class="hljs-number">2</span>, $<span class="hljs-number">1</span>
1498-
o <span class="hljs-string">'ForLineBody Block'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> For $<span class="hljs-number">2</span>, $<span class="hljs-number">1</span>
1495+
o <span class="hljs-string">'Statement ForBody'</span>, <span class="hljs-function">-&gt;</span> $<span class="hljs-number">2.</span>addBody $<span class="hljs-number">1</span>
1496+
o <span class="hljs-string">'Expression ForBody'</span>, <span class="hljs-function">-&gt;</span> $<span class="hljs-number">2.</span>addBody $<span class="hljs-number">1</span>
1497+
o <span class="hljs-string">'ForBody Block'</span>, <span class="hljs-function">-&gt;</span> $<span class="hljs-number">1.</span>addBody $<span class="hljs-number">2</span>
1498+
o <span class="hljs-string">'ForLineBody Block'</span>, <span class="hljs-function">-&gt;</span> $<span class="hljs-number">1.</span>addBody $<span class="hljs-number">2</span>
14991499
]
15001500

15011501
ForBody: [
1502-
o <span class="hljs-string">'FOR Range'</span>, <span class="hljs-function">-&gt;</span> source: (LOC(<span class="hljs-number">2</span>) <span class="hljs-keyword">new</span> Value($<span class="hljs-number">2</span>))
1503-
o <span class="hljs-string">'FOR Range BY Expression'</span>, <span class="hljs-function">-&gt;</span> source: (LOC(<span class="hljs-number">2</span>) <span class="hljs-keyword">new</span> Value($<span class="hljs-number">2</span>)), step: $<span class="hljs-number">4</span>
1504-
o <span class="hljs-string">'ForStart ForSource'</span>, <span class="hljs-function">-&gt;</span> $<span class="hljs-number">2.</span>own = $<span class="hljs-number">1.</span>own; $<span class="hljs-number">2.</span>ownTag = $<span class="hljs-number">1.</span>ownTag; $<span class="hljs-number">2.</span>name = $<span class="hljs-number">1</span>[<span class="hljs-number">0</span>]; $<span class="hljs-number">2.</span>index = $<span class="hljs-number">1</span>[<span class="hljs-number">1</span>]; $<span class="hljs-number">2</span>
1502+
o <span class="hljs-string">'FOR Range'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> For [], source: (LOC(<span class="hljs-number">2</span>) <span class="hljs-keyword">new</span> Value($<span class="hljs-number">2</span>))
1503+
o <span class="hljs-string">'FOR Range BY Expression'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> For [], source: (LOC(<span class="hljs-number">2</span>) <span class="hljs-keyword">new</span> Value($<span class="hljs-number">2</span>)), step: $<span class="hljs-number">4</span>
1504+
o <span class="hljs-string">'ForStart ForSource'</span>, <span class="hljs-function">-&gt;</span> $<span class="hljs-number">1.</span>addSource $<span class="hljs-number">2</span>
15051505
]
15061506

15071507
ForLineBody: [
1508-
o <span class="hljs-string">'FOR Range BY ExpressionLine'</span>, <span class="hljs-function">-&gt;</span> source: (LOC(<span class="hljs-number">2</span>) <span class="hljs-keyword">new</span> Value($<span class="hljs-number">2</span>)), step: $<span class="hljs-number">4</span>
1509-
o <span class="hljs-string">'ForStart ForLineSource'</span>, <span class="hljs-function">-&gt;</span> $<span class="hljs-number">2.</span>own = $<span class="hljs-number">1.</span>own; $<span class="hljs-number">2.</span>ownTag = $<span class="hljs-number">1.</span>ownTag; $<span class="hljs-number">2.</span>name = $<span class="hljs-number">1</span>[<span class="hljs-number">0</span>]; $<span class="hljs-number">2.</span>index = $<span class="hljs-number">1</span>[<span class="hljs-number">1</span>]; $<span class="hljs-number">2</span>
1508+
o <span class="hljs-string">'FOR Range BY ExpressionLine'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> For [], source: (LOC(<span class="hljs-number">2</span>) <span class="hljs-keyword">new</span> Value($<span class="hljs-number">2</span>)), step: $<span class="hljs-number">4</span>
1509+
o <span class="hljs-string">'ForStart ForLineSource'</span>, <span class="hljs-function">-&gt;</span> $<span class="hljs-number">1.</span>addSource $<span class="hljs-number">2</span>
15101510
]
15111511

15121512
ForStart: [
1513-
o <span class="hljs-string">'FOR ForVariables'</span>, <span class="hljs-function">-&gt;</span> $<span class="hljs-number">2</span>
1514-
o <span class="hljs-string">'FOR OWN ForVariables'</span>, <span class="hljs-function">-&gt;</span> $<span class="hljs-number">3.</span>own = <span class="hljs-literal">yes</span>; $<span class="hljs-number">3.</span>ownTag = (LOC(<span class="hljs-number">2</span>) <span class="hljs-keyword">new</span> Literal($<span class="hljs-number">2</span>)); $<span class="hljs-number">3</span>
1513+
o <span class="hljs-string">'FOR ForVariables'</span>, <span class="hljs-function">-&gt;</span> <span class="hljs-keyword">new</span> For [], name: $<span class="hljs-number">2</span>[<span class="hljs-number">0</span>], index: $<span class="hljs-number">2</span>[<span class="hljs-number">1</span>]
1514+
o <span class="hljs-string">'FOR AWAIT ForVariables'</span>, <span class="hljs-function">-&gt;</span>
1515+
[name, index] = $<span class="hljs-number">3</span>
1516+
<span class="hljs-keyword">new</span> For [], {name, index, await: <span class="hljs-literal">yes</span>, awaitTag: (LOC(<span class="hljs-number">2</span>) <span class="hljs-keyword">new</span> Literal($<span class="hljs-number">2</span>))}
1517+
o <span class="hljs-string">'FOR OWN ForVariables'</span>, <span class="hljs-function">-&gt;</span>
1518+
[name, index] = $<span class="hljs-number">3</span>
1519+
<span class="hljs-keyword">new</span> For [], {name, index, own: <span class="hljs-literal">yes</span>, ownTag: (LOC(<span class="hljs-number">2</span>) <span class="hljs-keyword">new</span> Literal($<span class="hljs-number">2</span>))}
15151520
]</pre></div></div>
15161521

15171522
</li>

docs/v2/annotated-source/lexer.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2579,7 +2579,7 @@ <h2 id="constants">Constants</h2>
25792579
///</span>
25802580

25812581
REGEX_FLAGS = <span class="hljs-regexp">/^\w*/</span>
2582-
VALID_FLAGS = <span class="hljs-regexp">/^(?!.*(.).*\1)[imguy]*$/</span>
2582+
VALID_FLAGS = <span class="hljs-regexp">/^(?!.*(.).*\1)[gimsuy]*$/</span>
25832583

25842584
HEREGEX = <span class="hljs-regexp">/// ^
25852585
(?:

0 commit comments

Comments
 (0)