Skip to content

Commit

Permalink
2.1.1 (#4835)
Browse files Browse the repository at this point in the history
* Bump version to 2.1.1

* 2.1.1 changelog

* 2.1.1 updated output
  • Loading branch information
GeoffreyBooth authored Dec 30, 2017
1 parent 38f5963 commit 12fcbfc
Show file tree
Hide file tree
Showing 21 changed files with 61 additions and 28 deletions.
14 changes: 7 additions & 7 deletions docs/v2/annotated-source/nodes.html
Original file line number Diff line number Diff line change
Expand Up @@ -3838,20 +3838,20 @@ <h3 id="class">Class</h3>
<span class="hljs-keyword">if</span> argumentsNode = @body.contains isLiteralArguments
argumentsNode.error <span class="hljs-string">"Class bodies shouldn't reference arguments"</span>

@name = @class.name ? @defaultClassVariableName
directives = @walkBody()
@setContext()

ident = <span class="hljs-keyword">new</span> IdentifierLiteral @name
params = []
args = []
args = [<span class="hljs-keyword">new</span> ThisLiteral]
wrapper = <span class="hljs-keyword">new</span> Code params, @body
klass = <span class="hljs-keyword">new</span> Parens <span class="hljs-keyword">new</span> Call wrapper, args
klass = <span class="hljs-keyword">new</span> Parens <span class="hljs-keyword">new</span> Call (<span class="hljs-keyword">new</span> Value wrapper, [<span class="hljs-keyword">new</span> Access <span class="hljs-keyword">new</span> PropertyName <span class="hljs-string">'call'</span>]), args

@body.spaced = <span class="hljs-literal">true</span>

o.classScope = wrapper.makeScope o.scope

@name = @class.name ? o.classScope.freeVariable @defaultClassVariableName
ident = <span class="hljs-keyword">new</span> IdentifierLiteral @name
directives = @walkBody()
@setContext()

<span class="hljs-keyword">if</span> @class.hasNameClash
parent = <span class="hljs-keyword">new</span> IdentifierLiteral o.classScope.freeVariable <span class="hljs-string">'superClass'</span>
wrapper.params.push <span class="hljs-keyword">new</span> Param parent
Expand Down
4 changes: 2 additions & 2 deletions docs/v2/browser-compiler/coffeescript.js

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions docs/v2/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@
<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>“It’s 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.1.0">2.1.0</a></p>
<p><strong>Latest Version:</strong> <a href="https://github.com/jashkenas/coffeescript/tarball/2.1.1">2.1.1</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

Expand Down Expand Up @@ -4790,7 +4790,7 @@ <h2>Web Chat (IRC)</h2>
</section>
<section id="annotated-source">
<h2>Annotated Source</h2>
<p>You can browse the CoffeeScript 2.1.0 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.1.1 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>
Expand Down Expand Up @@ -5467,6 +5467,14 @@ <h3>Argument parsing and shebang (<code>#!</code>) lines</h3>
</section>
<section id="changelog">
<h2>Changelog</h2>
<div class="anchor" id="2.1.1"></div>
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/2.1.0...2.1.1">2.1.1</a>
<span class="timestamp"> &mdash; <time datetime="2017-12-29">December 29, 2017</time></span>
</h2><ul>
<li>Bugfix to set the correct context for executable class bodies. So in <code>class @B extends @A then @property = 1</code>, the <code>@</code> in <code>@property</code> now refers to the class, not the global object.</li>
<li>Bugfix where anonymous classes were getting created using the same automatic variable name. They now each receive unique names, so as not to override each other.</li>
</ul>
<div class="anchor" id="2.1.0"></div>
<h2 class="header">
<a href="https://github.com/jashkenas/coffeescript/compare/2.0.3...2.1.0">2.1.0</a>
Expand Down
19 changes: 18 additions & 1 deletion docs/v2/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -3659,6 +3659,23 @@ <h1>CoffeeScript Test Suite</h1>
eq 42, a.x
eq 84, a.hoisted

test "#4822: nested anonymous classes use non-conflicting variable names", ->
Class = class
@a: class
@b: 1

eq Class.a.b, 1

test "#4827: executable class body wrappers have correct context", ->
test = ->
class @A
class @B extends @A
@property = 1

o = {}
test.call o
ok typeof o.A is typeof o.B is 'function'

</script>
<script type="text/x-coffeescript" class="test" id="cluster">
# Cluster Module
Expand Down Expand Up @@ -4045,7 +4062,7 @@ <h1>CoffeeScript Test Suite</h1>

return DummyClass;

})();"""
}).call(this);"""

test "#3638: Demand a whitespace after # symbol", ->
eqJS """
Expand Down
8 changes: 8 additions & 0 deletions documentation/sections/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## Changelog

```
releaseHeader('2017-12-29', '2.1.1', '2.1.0')
```

* Bugfix to set the correct context for executable class bodies. So in `class @B extends @A then @property = 1`, the `@` in `@property` now refers to the class, not the global object.
* Bugfix where anonymous classes were getting created using the same automatic variable name. They now each receive unique names, so as not to override each other.


```
releaseHeader('2017-12-10', '2.1.0', '2.0.3')
```
Expand Down
2 changes: 1 addition & 1 deletion lib/coffeescript/browser.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/coffeescript/cake.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/coffeescript/coffeescript.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/coffeescript/command.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/coffeescript/grammar.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/coffeescript/helpers.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/coffeescript/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/coffeescript/lexer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/coffeescript/nodes.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/coffeescript/optparse.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/coffeescript/register.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/coffeescript/repl.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/coffeescript/rewriter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/coffeescript/scope.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/coffeescript/sourcemap.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"compiler"
],
"author": "Jeremy Ashkenas",
"version": "2.1.0",
"version": "2.1.1",
"license": "MIT",
"engines": {
"node": ">=6"
Expand Down

0 comments on commit 12fcbfc

Please sign in to comment.