Skip to content

Commit ed6733d

Browse files
committed
2.6.1 (#5381)
1 parent d572d74 commit ed6733d

File tree

26 files changed

+86
-41
lines changed

26 files changed

+86
-41
lines changed

docs/v2/annotated-source/index.html

+31
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,37 @@ <h1>index.coffee</h1>
458458

459459
</li>
460460

461+
462+
<li id="section-18">
463+
<div class="annotation">
464+
465+
<div class="sswrap ">
466+
<a class="ss" href="#section-18">&#x00a7;</a>
467+
</div>
468+
<p>Explicitly define all named exports so that Node’s automatic detection of
469+
named exports from CommonJS packages finds all of them. This enables consuming
470+
packages to write code like <code>import { compile } from &#39;coffeescript&#39;</code>.
471+
Don’t simplify this into a loop or similar; the <code>module.exports.name</code> part is
472+
essential for Node’s algorithm to successfully detect the name.</p>
473+
474+
</div>
475+
476+
<div class="content"><div class='highlight'><pre>module.<span class="hljs-built_in">exports</span>.VERSION = CoffeeScript.VERSION
477+
module.<span class="hljs-built_in">exports</span>.FILE_EXTENSIONS = CoffeeScript.FILE_EXTENSIONS
478+
module.<span class="hljs-built_in">exports</span>.helpers = CoffeeScript.helpers
479+
module.<span class="hljs-built_in">exports</span>.registerCompiled = CoffeeScript.registerCompiled
480+
module.<span class="hljs-built_in">exports</span>.compile = CoffeeScript.compile
481+
module.<span class="hljs-built_in">exports</span>.tokens = CoffeeScript.tokens
482+
module.<span class="hljs-built_in">exports</span>.nodes = CoffeeScript.nodes
483+
module.<span class="hljs-built_in">exports</span>.register = CoffeeScript.register
484+
module.<span class="hljs-built_in">exports</span>.<span class="hljs-built_in">eval</span> = CoffeeScript.<span class="hljs-built_in">eval</span>
485+
module.<span class="hljs-built_in">exports</span>.run = CoffeeScript.run
486+
module.<span class="hljs-built_in">exports</span>.transpile = CoffeeScript.transpile
487+
module.<span class="hljs-built_in">exports</span>._compileRawFileContent = CoffeeScript._compileRawFileContent
488+
module.<span class="hljs-built_in">exports</span>._compileFile = CoffeeScript._compileFile</pre></div></div>
489+
490+
</li>
491+
461492
</ul>
462493
</div>
463494
</body>

docs/v2/annotated-source/nodes.html

+9-13
Original file line numberDiff line numberDiff line change
@@ -1009,11 +1009,12 @@ <h3 id="base">Base</h3>
10091009
<div class="sswrap ">
10101010
<a class="ss" href="#section-42">&#x00a7;</a>
10111011
</div>
1012-
<p><code>jumps</code> tells you if an expression, or an internal part of an expression
1013-
has a flow control construct (like <code>break</code>, or <code>continue</code>, or <code>return</code>,
1014-
or <code>throw</code>) that jumps out of the normal flow of control and can’t be
1015-
used as a value. This is important because things like this make no sense;
1016-
we have to disallow them.</p>
1012+
<p><code>jumps</code> tells you if an expression, or an internal part of an expression,
1013+
has a flow control construct (like <code>break</code>, <code>continue</code>, or <code>return</code>)
1014+
that jumps out of the normal flow of control and can’t be used as a value.
1015+
(Note that <code>throw</code> is not considered a flow control construct.)
1016+
This is important because flow control in the middle of an expression
1017+
makes no sense; we have to disallow it.</p>
10171018

10181019
</div>
10191020

@@ -1350,13 +1351,8 @@ <h3 id="root">Root</h3>
13501351
@initializeScope o
13511352
fragments = @body.compileRoot o
13521353
<span class="hljs-keyword">return</span> fragments <span class="hljs-keyword">if</span> o.bare
1353-
parts = []
1354-
parts.push @makeCode <span class="hljs-string">&#x27;(&#x27;</span>
1355-
parts.push @makeCode <span class="hljs-string">&#x27;async &#x27;</span> <span class="hljs-keyword">if</span> @isAsync
1356-
parts.push @makeCode <span class="hljs-string">&#x27;function() {\n&#x27;</span>
1357-
parts.push ...fragments
1358-
parts.push @makeCode <span class="hljs-string">&#x27;\n}).call(this);\n&#x27;</span>
1359-
[].concat ...parts
1354+
functionKeyword = <span class="hljs-string">&quot;<span class="hljs-subst">#{<span class="hljs-keyword">if</span> @isAsync <span class="hljs-keyword">then</span> <span class="hljs-string">&#x27;async &#x27;</span> <span class="hljs-keyword">else</span> <span class="hljs-string">&#x27;&#x27;</span>}</span>function&quot;</span>
1355+
[].concat @makeCode(<span class="hljs-string">&quot;(<span class="hljs-subst">#{functionKeyword}</span>() {\n&quot;</span>), fragments, @makeCode(<span class="hljs-string">&quot;\n}).call(this);\n&quot;</span>)
13601356

13611357
initializeScope: <span class="hljs-function"><span class="hljs-params">(o)</span> -&gt;</span>
13621358
o.scope = <span class="hljs-keyword">new</span> Scope <span class="hljs-literal">null</span>, @body, <span class="hljs-literal">null</span>, o.referencedVars ? []</pre></div></div>
@@ -9055,7 +9051,7 @@ <h3 id="try">Try</h3>
90559051

90569052
isStatement: YES
90579053

9058-
jumps: <span class="hljs-function"><span class="hljs-params">(o)</span> -&gt;</span> @recovery.jumps(o)
9054+
jumps: <span class="hljs-function"><span class="hljs-params">(o)</span> -&gt;</span> @recovery.jumps o
90599055

90609056
makeReturn: <span class="hljs-function"><span class="hljs-params">(results, mark)</span> -&gt;</span>
90619057
ret = @recovery.makeReturn results, mark

docs/v2/browser-compiler-legacy/coffeescript.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/v2/browser-compiler-modern/coffeescript.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/v2/index.html

+11-2
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@
694694
<section id="introduction">
695695
<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>
696696
<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>
697-
<p><strong>Latest Version:</strong> <a href="https://github.com/jashkenas/coffeescript/tarball/2.6.0">2.6.0</a></p>
697+
<p><strong>Latest Version:</strong> <a href="https://github.com/jashkenas/coffeescript/tarball/2.6.1">2.6.1</a></p>
698698
<blockquote class="uneditable-code-block"><pre><code class="language-bash"><span class="comment"># Install locally for a project:</span>
699699
npm install --save-dev coffeescript
700700

@@ -4922,7 +4922,7 @@ <h2>Web Chat (IRC)</h2>
49224922
</section>
49234923
<section id="annotated-source">
49244924
<h2>Annotated Source</h2>
4925-
<p>You can browse the CoffeeScript 2.6.0 source in readable, annotated form <a href="annotated-source/">here</a>. You can also jump directly to a particular source file:</p>
4925+
<p>You can browse the CoffeeScript 2.6.1 source in readable, annotated form <a href="annotated-source/">here</a>. You can also jump directly to a particular source file:</p>
49264926
<ul>
49274927
<li><a href="annotated-source/grammar.html">Grammar Rules — src/grammar</a></li>
49284928
<li><a href="annotated-source/lexer.html">Lexing Tokens — src/lexer</a></li>
@@ -5600,6 +5600,15 @@ <h3>Argument parsing and shebang (<code>#!</code>) lines</h3>
56005600
<section id="changelog">
56015601
<h2>Changelog</h2>
56025602

5603+
<section id="2.6.1">
5604+
<h3><a href="https://github.com/jashkenas/coffeescript/compare/2.6.0...2.6.1">2.6.1</a>
5605+
<span class="timestamp"> &mdash; <time datetime="2021-10-03">2021-10-03</time></span>
5606+
</h3><ul>
5607+
<li>The <code>coffeescript</code> package itself now supports named exports when used by ES modules in Node.js; or in other words, <code>import { compile } from 'coffeescript'</code> now works, rather than only <code>import CoffeeScript from 'coffeescript'</code>.</li>
5608+
<li>Bugfix for a stack overflow error when compiling large files in non-bare mode.</li>
5609+
</ul>
5610+
5611+
</section>
56035612
<section id="2.6.0">
56045613
<h3><a href="https://github.com/jashkenas/coffeescript/compare/2.5.1...2.6.0">2.6.0</a>
56055614
<span class="timestamp"> &mdash; <time datetime="2021-09-19">2021-09-19</time></span>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
```
2+
releaseHeader('2021-10-03', '2.6.1', '2.6.0')
3+
```
4+
5+
* The `coffeescript` package itself now supports named exports when used by ES modules in Node.js; or in other words, `import { compile } from 'coffeescript'` now works, rather than only `import CoffeeScript from 'coffeescript'`.
6+
* Bugfix for a stack overflow error when compiling large files in non-bare mode.

documentation/site/body.html

+3
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@
207207
</section>
208208
<section id="changelog">
209209
<%= htmlFor('changelog') %>
210+
<section id="2.6.1">
211+
<%= htmlFor('changelog/2.6.1') %>
212+
</section>
210213
<section id="2.6.0">
211214
<%= htmlFor('changelog/2.6.0') %>
212215
</section>

lib/coffeescript-browser-compiler-legacy/coffeescript.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript-browser-compiler-modern/coffeescript.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript/browser.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript/cake.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript/coffeescript.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript/command.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript/grammar.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript/helpers.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript/index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript/lexer.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript/nodes.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript/optparse.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript/register.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript/repl.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript/rewriter.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript/scope.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript/sourcemap.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"compiler"
99
],
1010
"author": "Jeremy Ashkenas",
11-
"version": "2.6.0",
11+
"version": "2.6.1",
1212
"license": "MIT",
1313
"engines": {
1414
"node": ">=6"

0 commit comments

Comments
 (0)