2.1.1 (#4835)
* Bump version to 2.1.1 * 2.1.1 changelog * 2.1.1 updated output
This commit is contained in:
parent
38f5963b85
commit
12fcbfc654
|
@ -3838,20 +3838,20 @@ exports.ExecutableClassBody = <span class="hljs-class"><span class="hljs-keyword
|
|||
<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
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -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>“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
|
||||
|
||||
|
@ -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.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>
|
||||
|
@ -5467,6 +5467,14 @@ x = <span class="number">2</span> + <span class="number">2</span>
|
|||
</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"> — <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>
|
||||
|
|
|
@ -3659,6 +3659,23 @@ test "#4724: backticked expression in a class body with hoisted member", ->
|
|||
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
|
||||
|
@ -4045,7 +4062,7 @@ test "#3132: Place block-comments nicely", ->
|
|||
|
||||
return DummyClass;
|
||||
|
||||
})();"""
|
||||
}).call(this);"""
|
||||
|
||||
test "#3638: Demand a whitespace after # symbol", ->
|
||||
eqJS """
|
||||
|
|
|
@ -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')
|
||||
```
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Generated by CoffeeScript 2.1.0
|
||||
// Generated by CoffeeScript 2.1.1
|
||||
(function() {
|
||||
// This **Browser** compatibility layer extends core CoffeeScript functions
|
||||
// to make things work smoothly when compiling code directly in the browser.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Generated by CoffeeScript 2.1.0
|
||||
// Generated by CoffeeScript 2.1.1
|
||||
(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))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Generated by CoffeeScript 2.1.0
|
||||
// Generated by CoffeeScript 2.1.1
|
||||
(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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Generated by CoffeeScript 2.1.0
|
||||
// Generated by CoffeeScript 2.1.1
|
||||
(function() {
|
||||
// The `coffee` utility. Handles command-line compilation of CoffeeScript
|
||||
// into various forms: saved into `.js` files or printed to stdout
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Generated by CoffeeScript 2.1.0
|
||||
// Generated by CoffeeScript 2.1.1
|
||||
(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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Generated by CoffeeScript 2.1.0
|
||||
// Generated by CoffeeScript 2.1.1
|
||||
(function() {
|
||||
// This file contains the common helper functions that we'd like to share among
|
||||
// the **Lexer**, **Rewriter**, and the **Nodes**. Merge objects, flatten
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Generated by CoffeeScript 2.1.0
|
||||
// Generated by CoffeeScript 2.1.1
|
||||
(function() {
|
||||
// Node.js Implementation
|
||||
var CoffeeScript, ext, fn, fs, helpers, i, len, path, ref, universalCompile, vm,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Generated by CoffeeScript 2.1.0
|
||||
// Generated by CoffeeScript 2.1.1
|
||||
(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,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Generated by CoffeeScript 2.1.0
|
||||
// Generated by CoffeeScript 2.1.1
|
||||
(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),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Generated by CoffeeScript 2.1.0
|
||||
// Generated by CoffeeScript 2.1.1
|
||||
(function() {
|
||||
var LONG_FLAG, MULTI_FLAG, OPTIONAL, OptionParser, SHORT_FLAG, buildRule, buildRules, normalizeArguments, repeat,
|
||||
slice = [].slice;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Generated by CoffeeScript 2.1.0
|
||||
// Generated by CoffeeScript 2.1.1
|
||||
(function() {
|
||||
var CoffeeScript, Module, binary, child_process, ext, findExtension, fork, getRootModule, helpers, i, len, loadFile, path, ref;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Generated by CoffeeScript 2.1.0
|
||||
// Generated by CoffeeScript 2.1.1
|
||||
(function() {
|
||||
var CoffeeScript, addHistory, addMultilineHandler, fs, getCommandId, merge, nodeREPL, path, replDefaults, runInContext, sawSIGINT, transpile, updateSyntaxError, vm;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Generated by CoffeeScript 2.1.0
|
||||
// Generated by CoffeeScript 2.1.1
|
||||
(function() {
|
||||
// The CoffeeScript language has a good deal of optional syntax, implicit syntax,
|
||||
// and shorthand syntax. This can greatly complicate a grammar and bloat
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Generated by CoffeeScript 2.1.0
|
||||
// Generated by CoffeeScript 2.1.1
|
||||
(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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Generated by CoffeeScript 2.1.0
|
||||
// Generated by CoffeeScript 2.1.1
|
||||
(function() {
|
||||
// Source maps allow JavaScript runtimes to match running JavaScript back to
|
||||
// the original source code that corresponds to it. This can be minified
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"compiler"
|
||||
],
|
||||
"author": "Jeremy Ashkenas",
|
||||
"version": "2.1.0",
|
||||
"version": "2.1.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
|
|
Loading…
Reference in New Issue