Skip to content

Commit c09d8fb

Browse files
Release 2.4.0 (#5182)
* cake doc:site:watch should also watch the changelog files * Changelog for 2.4.0 * 2.4.0 output
1 parent f6d6377 commit c09d8fb

File tree

23 files changed

+62
-36
lines changed

23 files changed

+62
-36
lines changed

Cakefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,12 @@ task 'build:watch:harmony', 'watch and continually rebuild the CoffeeScript comp
192192

193193
buildDocs = (watch = no) ->
194194
# Constants
195-
indexFile = 'documentation/site/index.html'
196-
siteSourceFolder = "documentation/site"
197-
sectionsSourceFolder = 'documentation/sections'
198-
examplesSourceFolder = 'documentation/examples'
199-
outputFolder = "docs/v#{majorVersion}"
195+
indexFile = 'documentation/site/index.html'
196+
siteSourceFolder = "documentation/site"
197+
sectionsSourceFolder = 'documentation/sections'
198+
changelogSourceFolder = 'documentation/sections/changelog'
199+
examplesSourceFolder = 'documentation/examples'
200+
outputFolder = "docs/v#{majorVersion}"
200201

201202
# Helpers
202203
releaseHeader = (date, version, prevVersion) ->
@@ -279,7 +280,7 @@ buildDocs = (watch = no) ->
279280
catch exception
280281

281282
if watch
282-
for target in [indexFile, siteSourceFolder, examplesSourceFolder, sectionsSourceFolder]
283+
for target in [indexFile, siteSourceFolder, examplesSourceFolder, sectionsSourceFolder, changelogSourceFolder]
283284
fs.watch target, interval: 200, renderIndex
284285
log 'watching...', green
285286

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* CoffeeScript Compiler v2.3.2
2+
* CoffeeScript Compiler v2.4.0
33
* https://coffeescript.org
44
*
55
* Copyright 2011, Jeremy Ashkenas
@@ -18,7 +18,7 @@ var CoffeeScript = function() {
1818
"compiler"
1919
],
2020
"author": "Jeremy Ashkenas",
21-
"version": "2.3.2",
21+
"version": "2.4.0",
2222
"license": "MIT",
2323
"engines": {
2424
"node": ">=6"
@@ -66,7 +66,7 @@ var CoffeeScript = function() {
6666
;
6767
})();require['./helpers'] = (function() {
6868
var exports = {}, module = {exports: exports};
69-
// Generated by CoffeeScript 2.3.2
69+
// Generated by CoffeeScript 2.4.0
7070
(function() {
7171
// This file contains the common helper functions that we'd like to share among
7272
// the **Lexer**, **Rewriter**, and the **Nodes**. Merge objects, flatten
@@ -420,7 +420,7 @@ var CoffeeScript = function() {
420420
return module.exports;
421421
})();require['./rewriter'] = (function() {
422422
var exports = {}, module = {exports: exports};
423-
// Generated by CoffeeScript 2.3.2
423+
// Generated by CoffeeScript 2.4.0
424424
(function() {
425425
// The CoffeeScript language has a good deal of optional syntax, implicit syntax,
426426
// and shorthand syntax. This can greatly complicate a grammar and bloat
@@ -1440,7 +1440,7 @@ var CoffeeScript = function() {
14401440
return module.exports;
14411441
})();require['./lexer'] = (function() {
14421442
var exports = {}, module = {exports: exports};
1443-
// Generated by CoffeeScript 2.3.2
1443+
// Generated by CoffeeScript 2.4.0
14441444
(function() {
14451445
// The CoffeeScript Lexer. Uses a series of token-matching regexes to attempt
14461446
// matches against the beginning of the source code. When a match is found,
@@ -4295,7 +4295,7 @@ if (typeof module !== 'undefined' && require.main === module) {
42954295
return module.exports;
42964296
})();require['./scope'] = (function() {
42974297
var exports = {}, module = {exports: exports};
4298-
// Generated by CoffeeScript 2.3.2
4298+
// Generated by CoffeeScript 2.4.0
42994299
(function() {
43004300
// The **Scope** class regulates lexical scoping within CoffeeScript. As you
43014301
// generate code, you create a tree of scopes in the same shape as the nested
@@ -4486,7 +4486,7 @@ if (typeof module !== 'undefined' && require.main === module) {
44864486
return module.exports;
44874487
})();require['./nodes'] = (function() {
44884488
var exports = {}, module = {exports: exports};
4489-
// Generated by CoffeeScript 2.3.2
4489+
// Generated by CoffeeScript 2.4.0
44904490
(function() {
44914491
// `nodes.coffee` contains all of the node classes for the syntax tree. Most
44924492
// nodes are created as the result of actions in the [grammar](grammar.html),
@@ -10394,7 +10394,7 @@ if (typeof module !== 'undefined' && require.main === module) {
1039410394
return module.exports;
1039510395
})();require['./sourcemap'] = (function() {
1039610396
var exports = {}, module = {exports: exports};
10397-
// Generated by CoffeeScript 2.3.2
10397+
// Generated by CoffeeScript 2.4.0
1039810398
(function() {
1039910399
// Source maps allow JavaScript runtimes to match running JavaScript back to
1040010400
// the original source code that corresponds to it. This can be minified
@@ -10609,7 +10609,7 @@ if (typeof module !== 'undefined' && require.main === module) {
1060910609
return module.exports;
1061010610
})();require['./coffeescript'] = (function() {
1061110611
var exports = {}, module = {exports: exports};
10612-
// Generated by CoffeeScript 2.3.2
10612+
// Generated by CoffeeScript 2.4.0
1061310613
(function() {
1061410614
// CoffeeScript can be used both on the server, as a command-line compiler based
1061510615
// on Node.js/V8, or to run CoffeeScript directly in the browser. This module
@@ -11062,7 +11062,7 @@ if (typeof module !== 'undefined' && require.main === module) {
1106211062
return module.exports;
1106311063
})();require['./browser'] = (function() {
1106411064
var exports = {}, module = {exports: exports};
11065-
// Generated by CoffeeScript 2.3.2
11065+
// Generated by CoffeeScript 2.4.0
1106611066
(function() {
1106711067
// This **Browser** compatibility layer extends core CoffeeScript functions
1106811068
// to make things work smoothly when compiling code directly in the browser.

docs/v2/browser-compiler/coffeescript.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/v2/index.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@
693693
<section id="introduction">
694694
<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>
695695
<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>
696-
<p><strong>Latest Version:</strong> <a href="https://github.com/jashkenas/coffeescript/tarball/2.3.2">2.3.2</a></p>
696+
<p><strong>Latest Version:</strong> <a href="https://github.com/jashkenas/coffeescript/tarball/2.4.0">2.4.0</a></p>
697697
<blockquote class="uneditable-code-block"><pre><code class="language-bash"><span class="comment"># Install locally for a project:</span>
698698
npm install --save-dev coffeescript
699699

@@ -4408,6 +4408,7 @@ <h2>Modules</h2>
44084408
</div>
44094409

44104410
</aside>
4411+
<div id="dynamic-import" class="bookmark"></div>
44114412
<p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports">Dynamic import</a> is also supported, with mandatory parentheses:</p>
44124413
<aside class="code-example container-fluid bg-ribbed-dark" data-example="dynamic_import">
44134414
<div class="row">
@@ -4900,7 +4901,7 @@ <h2>Web Chat (IRC)</h2>
49004901
</section>
49014902
<section id="annotated-source">
49024903
<h2>Annotated Source</h2>
4903-
<p>You can browse the CoffeeScript 2.3.2 source in readable, annotated form <a href="annotated-source/">here</a>. You can also jump directly to a particular source file:</p>
4904+
<p>You can browse the CoffeeScript 2.4.0 source in readable, annotated form <a href="annotated-source/">here</a>. You can also jump directly to a particular source file:</p>
49044905
<ul>
49054906
<li><a href="annotated-source/grammar.html">Grammar Rules — src/grammar</a></li>
49064907
<li><a href="annotated-source/lexer.html">Lexing Tokens — src/lexer</a></li>
@@ -5578,6 +5579,17 @@ <h3>Argument parsing and shebang (<code>#!</code>) lines</h3>
55785579
<section id="changelog">
55795580
<h2>Changelog</h2>
55805581

5582+
<section id="2.4.0">
5583+
<h3><a href="https://github.com/jashkenas/coffeescript/compare/2.3.2...2.4.0">2.4.0</a>
5584+
<span class="timestamp"> &mdash; <time datetime="2019-03-29">2019-03-29</time></span>
5585+
</h3><ul>
5586+
<li>Dynamic <code>import()</code> expressions are now supported. The parentheses are always required, to distinguish from <code>import</code> statements. See <a href="#dynamic-import">Modules</a>. Note that as of this writing, the JavaScript feature itself is still Stage 3; if it changes before being fully standardized, it may change in CoffeeScript too. Using <code>import()</code> before its upstream <a href="https://github.com/tc39/proposal-dynamic-import">ECMAScript proposal</a> is finalized should be considered provisional, subject to breaking changes if the proposal changes or is rejected. We have also revised our <a href="#contributing">policy</a> on Stage 3 ECMAScript features, to support them when the features are <a href="https://caniuse.com/#feat=es6-module-dynamic-import">shipped</a> in significant runtimes such as major browsers or Node.js.</li>
5587+
<li>There are now two browser versions of the CoffeeScript compiler: the traditional one that’s been published for years, and a new <a href="/browser-compiler-modern/coffeescript.js">ES module version</a> that can be used via <code>import</code>. If your browser supports it, it is in effect on this page. A reference to the ES module browser compiler is in the <code>package.json</code> <code>&quot;module&quot;</code> field.</li>
5588+
<li>The Node API now exposes the previously private <code>registerCompiled</code> method, to allow plugins that use the <code>coffeescript</code> package to take advantage of CoffeeScript’s internal caching.</li>
5589+
<li>Bugfixes for commas in strings in block arrays, a reference to <code>@</code> not being maintained in a <code>do</code> block in a class, and function default parameters should no longer be wrapped by extraneous parentheses.</li>
5590+
</ul>
5591+
5592+
</section>
55815593
<section id="2.3.2">
55825594
<h3><a href="https://github.com/jashkenas/coffeescript/compare/2.3.1...2.3.2">2.3.2</a>
55835595
<span class="timestamp"> &mdash; <time datetime="2018-09-19">2018-09-19</time></span>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
```
2+
releaseHeader('2019-03-29', '2.4.0', '2.3.2')
3+
```
4+
5+
* Dynamic `import()` expressions are now supported. The parentheses are always required, to distinguish from `import` statements. See [Modules](#dynamic-import). Note that as of this writing, the JavaScript feature itself is still Stage 3; if it changes before being fully standardized, it may change in CoffeeScript too. Using `import()` before its upstream [ECMAScript proposal](https://github.com/tc39/proposal-dynamic-import) is finalized should be considered provisional, subject to breaking changes if the proposal changes or is rejected. We have also revised our [policy](#contributing) on Stage 3 ECMAScript features, to support them when the features are [shipped](https://caniuse.com/#feat=es6-module-dynamic-import) in significant runtimes such as major browsers or Node.js.
6+
* There are now two browser versions of the CoffeeScript compiler: the traditional one that’s been published for years, and a new [ES module version](/browser-compiler-modern/coffeescript.js) that can be used via `import`. If your browser supports it, it is in effect on this page. A reference to the ES module browser compiler is in the `package.json` `"module"` field.
7+
* The Node API now exposes the previously private `registerCompiled` method, to allow plugins that use the `coffeescript` package to take advantage of CoffeeScript’s internal caching.
8+
* Bugfixes for commas in strings in block arrays, a reference to `@` not being maintained in a `do` block in a class, and function default parameters should no longer be wrapped by extraneous parentheses.

documentation/sections/modules.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ ES2015 modules are supported in CoffeeScript, with very similar `import` and `ex
66
codeFor('modules')
77
```
88

9+
<div id="dynamic-import" class="bookmark"></div>
10+
911
[Dynamic import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Dynamic_Imports) is also supported, with mandatory parentheses:
1012

1113
```

documentation/site/body.html

Lines changed: 3 additions & 0 deletions
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.4.0">
211+
<%= htmlFor('changelog/2.4.0') %>
212+
</section>
210213
<section id="2.3.2">
211214
<%= htmlFor('changelog/2.3.2') %>
212215
</section>

lib/coffeescript/browser.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript/cake.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/coffeescript/coffeescript.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)