From 1301390087491e0383877945a62783bb71321344 Mon Sep 17 00:00:00 2001
From: dtaniwaki
Date: Sat, 4 Oct 2014 12:54:07 +0900
Subject: [PATCH 01/21] Use stdio option instead of customFds
---
lib/coffee-script/command.js | 2 +-
src/command.coffee | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/coffee-script/command.js b/lib/coffee-script/command.js
index 357653b743..c2ccb23749 100644
--- a/lib/coffee-script/command.js
+++ b/lib/coffee-script/command.js
@@ -554,7 +554,7 @@
p = spawn(process.execPath, nodeArgs.concat(args), {
cwd: process.cwd(),
env: process.env,
- customFds: [0, 1, 2]
+ stdio: [0, 1, 2]
});
return p.on('exit', function(code) {
return process.exit(code);
diff --git a/src/command.coffee b/src/command.coffee
index 25ac8d6d86..5116a93981 100644
--- a/src/command.coffee
+++ b/src/command.coffee
@@ -417,7 +417,7 @@ forkNode = ->
p = spawn process.execPath, nodeArgs.concat(args),
cwd: process.cwd()
env: process.env
- customFds: [0, 1, 2]
+ stdio: [0, 1, 2]
p.on 'exit', (code) -> process.exit code
# Print the `--help` usage message and exit. Deprecated switches are not
From 61988fe3616748cf6a0f7706037e87cda0a48001 Mon Sep 17 00:00:00 2001
From: Jeremy Ashkenas
Date: Wed, 18 Feb 2015 15:46:14 -0500
Subject: [PATCH 02/21] #3862 changelog
---
documentation/index.html.js | 3 ++-
index.html | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/documentation/index.html.js b/documentation/index.html.js
index c6c5bb59c3..2f6c39c3b5 100644
--- a/documentation/index.html.js
+++ b/documentation/index.html.js
@@ -1217,7 +1217,8 @@ Expressions
arguments.
- Fixed a few yield-related bugs.
+ Fixed a few yield-related edge cases with yield return
+ and yield throw.
Minor bug fixes and various improvements to compiler error messages.
diff --git a/index.html b/index.html
index 90a99427a5..5e31f416a9 100644
--- a/index.html
+++ b/index.html
@@ -2509,7 +2509,8 @@
arguments.
- Fixed a few yield-related bugs.
+ Fixed a few yield-related edge cases with yield return
+ and yield throw.
Minor bug fixes and various improvements to compiler error messages.
From 7395ac1d4fbcf729215fb0c8944d366ed75ea00a Mon Sep 17 00:00:00 2001
From: Jeremy Ashkenas
Date: Wed, 18 Feb 2015 15:48:45 -0500
Subject: [PATCH 03/21] variable names
---
documentation/index.html.js | 2 +-
index.html | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/documentation/index.html.js b/documentation/index.html.js
index 2f6c39c3b5..3747920dae 100644
--- a/documentation/index.html.js
+++ b/documentation/index.html.js
@@ -1211,7 +1211,7 @@ Expressions
dynamically name properties.
- Internal compiler names no longer start with underscores. This makes
+ Internal compiler variable names no longer start with underscores. This makes
the generated JavaScript a bit prettier, and also fixes an issue with
the completely broken and ungodly way that AngularJS "parses" function
arguments.
diff --git a/index.html b/index.html
index 5e31f416a9..6a6a93d5b9 100644
--- a/index.html
+++ b/index.html
@@ -2503,7 +2503,7 @@
dynamically name properties.
- Internal compiler names no longer start with underscores. This makes
+ Internal compiler variable names no longer start with underscores. This makes
the generated JavaScript a bit prettier, and also fixes an issue with
the completely broken and ungodly way that AngularJS "parses" function
arguments.
From 836175baab1eb0fa58125f703daf6fe296b40cf6 Mon Sep 17 00:00:00 2001
From: Sam Gentle
Date: Fri, 20 Feb 2015 02:54:08 +1100
Subject: [PATCH 04/21] add -r/--require command line option
---
lib/coffee-script/command.js | 22 ++++++++++++++++++++--
lib/coffee-script/repl.js | 18 ++++++++++++++----
src/command.coffee | 11 +++++++++++
src/repl.coffee | 13 ++++++++-----
4 files changed, 53 insertions(+), 11 deletions(-)
diff --git a/lib/coffee-script/command.js b/lib/coffee-script/command.js
index cf718829be..bab488bb2d 100644
--- a/lib/coffee-script/command.js
+++ b/lib/coffee-script/command.js
@@ -1,6 +1,6 @@
// Generated by CoffeeScript 1.9.1
(function() {
- var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, findDirectoryIndex, forkNode, fs, helpers, hidden, joinTimeout, jsToSources, mkdirp, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, ref, removeSource, removeSourceDir, silentUnlink, sourceCode, sources, spawn, timeLog, usage, useWinPathSep, version, wait, watch, watchDir, watchedDirs, writeJs,
+ var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, findDirectoryIndex, forkNode, fs, helpers, hidden, joinTimeout, jsToSources, makePrelude, mkdirp, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, ref, removeSource, removeSourceDir, silentUnlink, sourceCode, sources, spawn, timeLog, usage, useWinPathSep, version, wait, watch, watchDir, watchedDirs, writeJs,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
fs = require('fs');
@@ -35,7 +35,7 @@
BANNER = 'Usage: coffee [options] path/to/script.coffee -- [args]\n\nIf called without options, `coffee` will run your script.';
- SWITCHES = [['-b', '--bare', 'compile without a top-level function wrapper'], ['-c', '--compile', 'compile to JavaScript and save as .js files'], ['-e', '--eval', 'pass a string from the command line as input'], ['-h', '--help', 'display this help message'], ['-i', '--interactive', 'run an interactive CoffeeScript REPL'], ['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling'], ['-m', '--map', 'generate source map and save as .js.map files'], ['-n', '--nodes', 'print out the parse tree that the parser produces'], ['--nodejs [ARGS]', 'pass options directly to the "node" binary'], ['--no-header', 'suppress the "Generated by" header'], ['-o', '--output [DIR]', 'set the output directory for compiled JavaScript'], ['-p', '--print', 'print out the compiled JavaScript'], ['-s', '--stdio', 'listen for and compile scripts over stdio'], ['-l', '--literate', 'treat stdio as literate style coffee-script'], ['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce'], ['-v', '--version', 'display the version number'], ['-w', '--watch', 'watch scripts for changes and rerun commands']];
+ SWITCHES = [['-b', '--bare', 'compile without a top-level function wrapper'], ['-c', '--compile', 'compile to JavaScript and save as .js files'], ['-e', '--eval', 'pass a string from the command line as input'], ['-h', '--help', 'display this help message'], ['-i', '--interactive', 'run an interactive CoffeeScript REPL'], ['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling'], ['-m', '--map', 'generate source map and save as .js.map files'], ['-n', '--nodes', 'print out the parse tree that the parser produces'], ['--nodejs [ARGS]', 'pass options directly to the "node" binary'], ['--no-header', 'suppress the "Generated by" header'], ['-o', '--output [DIR]', 'set the output directory for compiled JavaScript'], ['-p', '--print', 'print out the compiled JavaScript'], ['-r', '--require [MODULE*]', 'require the given module before eval or REPL'], ['-s', '--stdio', 'listen for and compile scripts over stdio'], ['-l', '--literate', 'treat stdio as literate style coffee-script'], ['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce'], ['-v', '--version', 'display the version number'], ['-w', '--watch', 'watch scripts for changes and rerun commands']];
opts = {};
@@ -57,6 +57,10 @@
replCliOpts = {
useGlobal: true
};
+ if (opts.require) {
+ opts.prelude = makePrelude(opts.require);
+ }
+ replCliOpts.prelude = opts.prelude;
if (opts.nodejs) {
return forkNode();
}
@@ -98,6 +102,17 @@
return results;
};
+ makePrelude = function(requires) {
+ return requires.map(function(module) {
+ var _, match, name;
+ if (match = module.match(/^(.*)=(.*)$/)) {
+ _ = match[0], name = match[1], module = match[2];
+ }
+ name || (name = helpers.baseFileName(module, true, useWinPathSep));
+ return name + " = require('" + module + "')";
+ }).join(';');
+ };
+
compilePath = function(source, topLevel, base) {
var code, err, file, files, i, len, results, stats;
if (indexOf.call(sources, source) >= 0 || watchedDirs[source] || !topLevel && (notSources[source] || hidden(source))) {
@@ -205,6 +220,9 @@
return printLine(CoffeeScript.nodes(t.input, t.options).toString().trim());
} else if (o.run) {
CoffeeScript.register();
+ if (opts.prelude) {
+ CoffeeScript["eval"](opts.prelude, t.options);
+ }
return CoffeeScript.run(t.input, t.options);
} else if (o.join && t.file !== o.join) {
if (helpers.isLiterate(file)) {
diff --git a/lib/coffee-script/repl.js b/lib/coffee-script/repl.js
index 90e29aab8d..e06633102c 100644
--- a/lib/coffee-script/repl.js
+++ b/lib/coffee-script/repl.js
@@ -1,6 +1,6 @@
// Generated by CoffeeScript 1.9.1
(function() {
- var CoffeeScript, addHistory, addMultilineHandler, fs, getCommandId, merge, nodeREPL, path, ref, replDefaults, updateSyntaxError, vm;
+ var CoffeeScript, addHistory, addMultilineHandler, fs, getCommandId, merge, nodeREPL, path, ref, replDefaults, runInContext, updateSyntaxError, vm;
fs = require('fs');
@@ -19,7 +19,7 @@
historyFile: process.env.HOME ? path.join(process.env.HOME, '.coffee_history') : void 0,
historyMaxInputSize: 10240,
"eval": function(input, context, filename, cb) {
- var Assign, Block, Literal, Value, ast, err, js, ref1, referencedVars, result, token, tokens;
+ var Assign, Block, Literal, Value, ast, err, js, ref1, referencedVars, token, tokens;
input = input.replace(/\uFF00/g, '\n');
input = input.replace(/^\(([\s\S]*)\n\)$/m, '$1');
ref1 = require('./nodes'), Block = ref1.Block, Assign = ref1.Assign, Value = ref1.Value, Literal = ref1.Literal;
@@ -43,8 +43,7 @@
locals: Object.keys(context),
referencedVars: referencedVars
});
- result = context === global ? vm.runInThisContext(js, filename) : vm.runInContext(js, context, filename);
- return cb(null, result);
+ return cb(null, runInContext(js, context, filename));
} catch (_error) {
err = _error;
updateSyntaxError(err, input);
@@ -53,6 +52,14 @@
}
};
+ runInContext = function(js, context, filename) {
+ if (context === global) {
+ return vm.runInThisContext(js, filename);
+ } else {
+ return vm.runInContext(js, context, filename);
+ }
+ };
+
addMultilineHandler = function(repl) {
var inputStream, multiline, nodeLineListener, origPrompt, outputStream, ref1, rli;
rli = repl.rli, inputStream = repl.inputStream, outputStream = repl.outputStream;
@@ -174,6 +181,9 @@
process.argv = ['coffee'].concat(process.argv.slice(2));
opts = merge(replDefaults, opts);
repl = nodeREPL.start(opts);
+ if (opts.prelude) {
+ runInContext(opts.prelude, repl.context, 'prelude');
+ }
repl.on('exit', function() {
return repl.outputStream.write('\n');
});
diff --git a/src/command.coffee b/src/command.coffee
index 22dad33430..5e048b03b5 100644
--- a/src/command.coffee
+++ b/src/command.coffee
@@ -44,6 +44,7 @@ SWITCHES = [
[ '--no-header', 'suppress the "Generated by" header']
['-o', '--output [DIR]', 'set the output directory for compiled JavaScript']
['-p', '--print', 'print out the compiled JavaScript']
+ ['-r', '--require [MODULE*]', 'require the given module before eval or REPL']
['-s', '--stdio', 'listen for and compile scripts over stdio']
['-l', '--literate', 'treat stdio as literate style coffee-script']
['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce']
@@ -69,6 +70,8 @@ exports.run = ->
# `node` REPL CLI and, therefore, (b) make packages that modify native prototypes
# (such as 'colors' and 'sugar') work as expected.
replCliOpts = useGlobal: yes
+ opts.prelude = makePrelude opts.require if opts.require
+ replCliOpts.prelude = opts.prelude
return forkNode() if opts.nodejs
return usage() if opts.help
return version() if opts.version
@@ -101,6 +104,13 @@ exports.run = ->
source = path.resolve source
compilePath source, yes, source
+makePrelude = (requires) ->
+ requires.map (module) ->
+ [_, name, module] = match if match = module.match(/^(.*)=(.*)$/)
+ name ||= helpers.baseFileName module, yes, useWinPathSep
+ "#{name} = require('#{module}')"
+ .join ';'
+
# Compile a path, which could be a script or a directory. If a directory
# is passed, recursively compile all '.coffee', '.litcoffee', and '.coffee.md'
# extension source files in it and all subdirectories.
@@ -167,6 +177,7 @@ compileScript = (file, input, base = null) ->
printLine CoffeeScript.nodes(t.input, t.options).toString().trim()
else if o.run
CoffeeScript.register()
+ CoffeeScript.eval opts.prelude, t.options if opts.prelude
CoffeeScript.run t.input, t.options
else if o.join and t.file isnt o.join
t.input = helpers.invertLiterate t.input if helpers.isLiterate file
diff --git a/src/repl.coffee b/src/repl.coffee
index f5f2fa5cfc..7c859fb95a 100644
--- a/src/repl.coffee
+++ b/src/repl.coffee
@@ -33,16 +33,18 @@ replDefaults =
new Assign (new Value new Literal '_'), ast, '='
]
js = ast.compile {bare: yes, locals: Object.keys(context), referencedVars}
- result = if context is global
- vm.runInThisContext js, filename
- else
- vm.runInContext js, context, filename
- cb null, result
+ cb null, runInContext js, context, filename
catch err
# AST's `compile` does not add source code information to syntax errors.
updateSyntaxError err, input
cb err
+runInContext = (js, context, filename) ->
+ if context is global
+ vm.runInThisContext js, filename
+ else
+ vm.runInContext js, context, filename
+
addMultilineHandler = (repl) ->
{rli, inputStream, outputStream} = repl
# Node 0.11.12 changed API, prompt is now _prompt.
@@ -149,6 +151,7 @@ module.exports =
process.argv = ['coffee'].concat process.argv[2..]
opts = merge replDefaults, opts
repl = nodeREPL.start opts
+ runInContext opts.prelude, repl.context, 'prelude' if opts.prelude
repl.on 'exit', -> repl.outputStream.write '\n'
addMultilineHandler repl
addHistory repl, opts.historyFile, opts.historyMaxInputSize if opts.historyFile
From 88529bc3395e74150cff94d2edd528ebff986612 Mon Sep 17 00:00:00 2001
From: Ben Creasy
Date: Fri, 20 Feb 2015 14:02:47 -0800
Subject: [PATCH 05/21] Replace references to jQuery's 'bind' with 'on'
---
documentation/coffee/fat_arrow.coffee | 2 +-
documentation/index.html.js | 2 +-
documentation/js/fat_arrow.js | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/documentation/coffee/fat_arrow.coffee b/documentation/coffee/fat_arrow.coffee
index 836eb7a6a9..0c45d8f1f5 100644
--- a/documentation/coffee/fat_arrow.coffee
+++ b/documentation/coffee/fat_arrow.coffee
@@ -2,5 +2,5 @@ Account = (customer, cart) ->
@customer = customer
@cart = cart
- $('.shopping_cart').bind 'click', (event) =>
+ $('.shopping_cart').on 'click', (event) =>
@customer.purchase @cart
\ No newline at end of file
diff --git a/documentation/index.html.js b/documentation/index.html.js
index 3747920dae..7e08df2d58 100644
--- a/documentation/index.html.js
+++ b/documentation/index.html.js
@@ -806,7 +806,7 @@ Expressions
it to the current value of this, right on the spot. This is helpful
when using callback-based libraries like Prototype or jQuery, for creating
iterator functions to pass to each, or event-handler functions
- to use with bind. Functions created with the fat arrow are able to access
+ to use with on. Functions created with the fat arrow are able to access
properties of the this where they're defined.
<%= codeFor('fat_arrow') %>
diff --git a/documentation/js/fat_arrow.js b/documentation/js/fat_arrow.js
index 5a5398636a..b8b30432fa 100644
--- a/documentation/js/fat_arrow.js
+++ b/documentation/js/fat_arrow.js
@@ -4,7 +4,7 @@ var Account;
Account = function(customer, cart) {
this.customer = customer;
this.cart = cart;
- return $('.shopping_cart').bind('click', (function(_this) {
+ return $('.shopping_cart').on('click', (function(_this) {
return function(event) {
return _this.customer.purchase(_this.cart);
};
From 50fff63252377ec1899fa23d4841a06b870a882f Mon Sep 17 00:00:00 2001
From: Kohei Hasegawa
Date: Sat, 21 Feb 2015 13:59:35 -0500
Subject: [PATCH 06/21] Add link of changelog
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 90f6788c69..486d7d26db 100644
--- a/README.md
+++ b/README.md
@@ -57,4 +57,6 @@ If you'd like to chat, drop by #coffeescript on Freenode IRC.
The source repository: https://github.com/jashkenas/coffeescript.git
+Changelog: http://coffeescript.org/#changelog
+
Our lovely and talented contributors are listed here: http://github.com/jashkenas/coffeescript/contributors
From ef6f90753a7caaee86191554c25fe5d71685a38f Mon Sep 17 00:00:00 2001
From: Kohei Hasegawa
Date: Sat, 21 Feb 2015 14:09:24 -0500
Subject: [PATCH 07/21] Delete README
---
README | 50 --------------------------------------------------
1 file changed, 50 deletions(-)
delete mode 100644 README
diff --git a/README b/README
deleted file mode 100644
index 37d7bbfe14..0000000000
--- a/README
+++ /dev/null
@@ -1,50 +0,0 @@
- {
- } } {
- { { } }
- } }{ {
- { }{ } } _____ __ __
- { }{ }{ { } / ____| / _|/ _|
- .- { { } { }} -. | | ___ | |_| |_ ___ ___
- ( { } { } { } } ) | | / _ \| _| _/ _ \/ _ \
- |`-..________ ..-'| | |___| (_) | | | || __/ __/
- | | \_____\___/|_| |_| \___|\___|
- | ;--.
- | (__ \ _____ _ _
- | | ) ) / ____| (_) | |
- | |/ / | (___ ___ _ __ _ _ __ | |_
- | ( / \___ \ / __| '__| | '_ \| __|
- | |/ ____) | (__| | | | |_) | |_
- | | |_____/ \___|_| |_| .__/ \__|
- `-.._________..-' | |
- |_|
-
-
- CoffeeScript is a little language that compiles into JavaScript.
-
- If you have the Node Package Manager installed:
- npm install -g coffee-script
- (Leave off the -g if you don't wish to install globally.)
-
- Or, if you don't wish to use npm:
- sudo bin/cake install
-
- Execute a script:
- coffee /path/to/script.coffee
-
- Compile a script:
- coffee -c /path/to/script.coffee
-
- For documentation, usage, and examples, see:
- http://coffeescript.org/
-
- To suggest a feature, report a bug, or general discussion:
- http://github.com/jashkenas/coffeescript/issues/
-
- If you'd like to chat, drop by #coffeescript on Freenode IRC,
- or on webchat.freenode.net.
-
- The source repository:
- git://github.com/jashkenas/coffeescript.git
-
- Top 100 contributors are listed here:
- http://github.com/jashkenas/coffeescript/contributors
From 71c59dddcc8d5242ff4f92f6bb34cd2a2ab21a84 Mon Sep 17 00:00:00 2001
From: Andrey Taritsyn
Date: Sun, 22 Feb 2015 19:08:15 +0300
Subject: [PATCH 08/21] Fix getting of character at index
---
lib/coffee-script/lexer.js | 2 +-
src/lexer.coffee | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/coffee-script/lexer.js b/lib/coffee-script/lexer.js
index f725e3fcd1..9d08d678f7 100644
--- a/lib/coffee-script/lexer.js
+++ b/lib/coffee-script/lexer.js
@@ -208,7 +208,7 @@
heredoc = quote.length === 3;
ref2 = this.matchWithInterpolations(regex, quote), tokens = ref2.tokens, end = ref2.index;
$ = tokens.length - 1;
- delimiter = quote[0];
+ delimiter = quote.charAt(0);
if (heredoc) {
indent = null;
doc = ((function() {
diff --git a/src/lexer.coffee b/src/lexer.coffee
index ea7e54a81f..d495713791 100644
--- a/src/lexer.coffee
+++ b/src/lexer.coffee
@@ -204,7 +204,7 @@ exports.Lexer = class Lexer
{tokens, index: end} = @matchWithInterpolations regex, quote
$ = tokens.length - 1
- delimiter = quote[0]
+ delimiter = quote.charAt(0)
if heredoc
# Find the smallest indentation. It will be removed from all lines later.
indent = null
From 6645fbb895d26271ef827df084a0d2b29da4d5f5 Mon Sep 17 00:00:00 2001
From: Giles Bowkett
Date: Mon, 23 Feb 2015 16:39:05 -0700
Subject: [PATCH 09/21] added descriptions to tests which only had Issue
numbers
---
test/assignment.coffee | 4 ++--
test/compilation.coffee | 4 ++--
test/control_flow.coffee | 2 +-
test/soaks.coffee | 7 +++----
4 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/test/assignment.coffee b/test/assignment.coffee
index 1f615bf73c..c1c908e474 100644
--- a/test/assignment.coffee
+++ b/test/assignment.coffee
@@ -162,7 +162,7 @@ test "variable swapping to verify caching of RHS values when appropriate", ->
eq nonceB, b
eq nonceC, c
-test "#713", ->
+test "#713: destructuring assignment should return right-hand-side value", ->
nonces = [nonceA={},nonceB={}]
eq nonces, [a, b] = [c, d] = nonces
eq nonceA, a
@@ -247,7 +247,7 @@ test "destructuring assignment with context (@) properties", ->
eq d, obj.d
eq e, obj.e
-test "#1024", ->
+test "#1024: destructure empty assignments to produce javascript-like results", ->
eq 2 * [] = 3 + 5, 16
test "#1005: invalid identifiers allowed on LHS of destructuring assignment", ->
diff --git a/test/compilation.coffee b/test/compilation.coffee
index b1b5247a6e..390375c8f3 100644
--- a/test/compilation.coffee
+++ b/test/compilation.coffee
@@ -81,7 +81,7 @@ test "#2516: Unicode spaces should not be part of identifiers", ->
test "don't accidentally stringify keywords", ->
ok (-> this == 'this')() is false
-test "#1026", ->
+test "#1026: no if/else/else allowed", ->
cantCompile '''
if a
b
@@ -91,7 +91,7 @@ test "#1026", ->
d
'''
-test "#1050", ->
+test "#1050: no closing asterisk comments from within block comments", ->
cantCompile "### */ ###"
test "#1273: escaping quotes at the end of heredocs", ->
diff --git a/test/control_flow.coffee b/test/control_flow.coffee
index f074ef3d2e..9725f44586 100644
--- a/test/control_flow.coffee
+++ b/test/control_flow.coffee
@@ -186,7 +186,7 @@ test "tight formatting with leading `then`", ->
then nonce
else undefined
-test "#738", ->
+test "#738: inline function defintion", ->
nonce = {}
fn = if true then -> nonce
eq nonce, fn()
diff --git a/test/soaks.coffee b/test/soaks.coffee
index 330a99b2f1..375d3929f9 100644
--- a/test/soaks.coffee
+++ b/test/soaks.coffee
@@ -52,11 +52,10 @@ test "function invocation with soaked property access", ->
test "if-to-ternary should safely parenthesize soaked property accesses", ->
ok (if nonexistent?.property then false else true)
-test "#726", ->
- # TODO: check this test, looks like it's not really testing anything
+test "#726: don't check for a property on a conditionally-referenced nonexistent thing", ->
eq undefined, nonexistent?[Date()]
-test "#756", ->
+test "#756: conditional assignment edge cases", ->
# TODO: improve this test
a = null
ok isNaN a?.b.c + 1
@@ -88,7 +87,7 @@ test "soaked method invocation", ->
eq obj , obj.increment().increment().self?()
eq 2 , counter
-test "#733", ->
+test "#733: conditional assignments", ->
a = b: {c: null}
eq a.b?.c?(), undefined
a.b?.c or= (it) -> it
From 84c125a71b18ac1016a3540d0977a65e3c9940b5 Mon Sep 17 00:00:00 2001
From: Andreas Lubbe
Date: Thu, 26 Feb 2015 13:01:12 +0100
Subject: [PATCH 10/21] yield now behaves as expected around 'this' - fixes
https://github.com/jashkenas/coffeescript/issues/3882
---
lib/coffee-script/nodes.js | 4 ++--
src/nodes.coffee | 2 +-
test/generators.coffee | 47 ++++++++++++++++++++++++++++++++++++++
3 files changed, 50 insertions(+), 3 deletions(-)
diff --git a/lib/coffee-script/nodes.js b/lib/coffee-script/nodes.js
index 86df69277c..28b6907eba 100644
--- a/lib/coffee-script/nodes.js
+++ b/lib/coffee-script/nodes.js
@@ -87,7 +87,7 @@
};
Base.prototype.compileClosure = function(o) {
- var args, argumentsNode, func, jumpNode, meth, parts;
+ var args, argumentsNode, func, jumpNode, meth, parts, ref3;
if (jumpNode = this.jumps()) {
jumpNode.error('cannot use a pure statement in an expression');
}
@@ -105,7 +105,7 @@
func = new Value(func, [new Access(new Literal(meth))]);
}
parts = (new Call(func, args)).compileNode(o);
- if (func.isGenerator) {
+ if (func.isGenerator || ((ref3 = func.base) != null ? ref3.isGenerator : void 0)) {
parts.unshift(this.makeCode("(yield* "));
parts.push(this.makeCode(")"));
}
diff --git a/src/nodes.coffee b/src/nodes.coffee
index 3c56589425..973f4309e4 100644
--- a/src/nodes.coffee
+++ b/src/nodes.coffee
@@ -90,7 +90,7 @@ exports.Base = class Base
meth = 'call'
func = new Value func, [new Access new Literal meth]
parts = (new Call func, args).compileNode o
- if func.isGenerator
+ if func.isGenerator or func.base?.isGenerator
parts.unshift @makeCode "(yield* "
parts.push @makeCode ")"
parts
diff --git a/test/generators.coffee b/test/generators.coffee
index 66447fdb7e..7932b48280 100644
--- a/test/generators.coffee
+++ b/test/generators.coffee
@@ -218,3 +218,50 @@ test "symbolic operators has precedence over the `yield`", ->
mapped = CoffeeScript.eval "(arr) -> (#{expression} for i in arr)"
arrayEq mapped(values), collect yielded values
+
+test "yield handles 'this' correctly", ->
+ x = ->
+ yield switch
+ when true then yield => this
+ yield for item in [1]
+ yield => this
+ yield if true then yield => this
+ yield try throw yield => this
+ throw yield => this
+
+ y = x.call [1, 2, 3]
+
+ z = y.next()
+ arrayEq z.value(), [1, 2, 3]
+ ok z.done is false
+
+ z = y.next 123
+ ok z.value is 123 and z.done is false
+
+ z = y.next()
+ arrayEq z.value(), [1, 2, 3]
+ ok z.done is false
+
+ z = y.next 42
+ arrayEq z.value, [42]
+ ok z.done is false
+
+ z = y.next()
+ arrayEq z.value(), [1, 2, 3]
+ ok z.done is false
+
+ z = y.next 456
+ ok z.value is 456 and z.done is false
+
+ z = y.next()
+ arrayEq z.value(), [1, 2, 3]
+ ok z.done is false
+
+ z = y.next new Error "ignore me"
+ ok z.value is undefined and z.done is false
+
+ z = y.next()
+ arrayEq z.value(), [1, 2, 3]
+ ok z.done is false
+
+ throws -> y.next new Error "boom"
From 7f7765546fc2bd131f90cfec01cde93beda6d655 Mon Sep 17 00:00:00 2001
From: Joshua Peek
Date: Thu, 26 Feb 2015 12:37:27 -0600
Subject: [PATCH 11/21] Escape literal `[` in regexp
Improves compatibility with strict ES5 regexp syntax
---
lib/coffee-script/lexer.js | 2 +-
src/lexer.coffee | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/coffee-script/lexer.js b/lib/coffee-script/lexer.js
index 9d08d678f7..1d02d9cfc3 100644
--- a/lib/coffee-script/lexer.js
+++ b/lib/coffee-script/lexer.js
@@ -946,7 +946,7 @@
HEREDOC_INDENT = /\n+([^\n\S]*)(?=\S)/g;
- REGEX = /^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*])*)(\/)?/;
+ REGEX = /^\/(?!\/)((?:[^\[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)?/;
REGEX_FLAGS = /^\w*/;
diff --git a/src/lexer.coffee b/src/lexer.coffee
index d495713791..2c46e64984 100644
--- a/src/lexer.coffee
+++ b/src/lexer.coffee
@@ -837,11 +837,11 @@ HEREDOC_INDENT = /\n+([^\n\S]*)(?=\S)/g
# Regex-matching-regexes.
REGEX = /// ^
/ (?!/) ((
- ?: [^ [ / \n \\ ] # every other thing
+ ?: [^ \[ / \n \\ ] # every other thing
| \\[^\n] # anything but newlines escaped
| \[ # character class
(?: \\[^\n] | [^ \] \n \\ ] )*
- ]
+ \]
)*) (/)?
///
From 06aa3295966206351f96dfe7b996ed7192181185 Mon Sep 17 00:00:00 2001
From: Jeremy Ashkenas
Date: Thu, 26 Feb 2015 16:05:12 -0500
Subject: [PATCH 12/21] Revert "Escape literal [ in regexp"
---
lib/coffee-script/lexer.js | 2 +-
src/lexer.coffee | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/coffee-script/lexer.js b/lib/coffee-script/lexer.js
index 1d02d9cfc3..9d08d678f7 100644
--- a/lib/coffee-script/lexer.js
+++ b/lib/coffee-script/lexer.js
@@ -946,7 +946,7 @@
HEREDOC_INDENT = /\n+([^\n\S]*)(?=\S)/g;
- REGEX = /^\/(?!\/)((?:[^\[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)?/;
+ REGEX = /^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*])*)(\/)?/;
REGEX_FLAGS = /^\w*/;
diff --git a/src/lexer.coffee b/src/lexer.coffee
index 2c46e64984..d495713791 100644
--- a/src/lexer.coffee
+++ b/src/lexer.coffee
@@ -837,11 +837,11 @@ HEREDOC_INDENT = /\n+([^\n\S]*)(?=\S)/g
# Regex-matching-regexes.
REGEX = /// ^
/ (?!/) ((
- ?: [^ \[ / \n \\ ] # every other thing
+ ?: [^ [ / \n \\ ] # every other thing
| \\[^\n] # anything but newlines escaped
| \[ # character class
(?: \\[^\n] | [^ \] \n \\ ] )*
- \]
+ ]
)*) (/)?
///
From c8147c046af21b4e0d94dcf784fac457f8c598c8 Mon Sep 17 00:00:00 2001
From: Jeremy Ashkenas
Date: Tue, 3 Mar 2015 14:30:52 -0500
Subject: [PATCH 13/21] Reverts #3758, Fixes #3863 -- kills the broken warning
---
lib/coffee-script/command.js | 11 +----------
src/command.coffee | 7 -------
2 files changed, 1 insertion(+), 17 deletions(-)
diff --git a/lib/coffee-script/command.js b/lib/coffee-script/command.js
index bab488bb2d..344d99771d 100644
--- a/lib/coffee-script/command.js
+++ b/lib/coffee-script/command.js
@@ -1,6 +1,6 @@
// Generated by CoffeeScript 1.9.1
(function() {
- var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, findDirectoryIndex, forkNode, fs, helpers, hidden, joinTimeout, jsToSources, makePrelude, mkdirp, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, ref, removeSource, removeSourceDir, silentUnlink, sourceCode, sources, spawn, timeLog, usage, useWinPathSep, version, wait, watch, watchDir, watchedDirs, writeJs,
+ var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, findDirectoryIndex, forkNode, fs, helpers, hidden, joinTimeout, makePrelude, mkdirp, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, ref, removeSource, removeSourceDir, silentUnlink, sourceCode, sources, spawn, timeLog, usage, useWinPathSep, version, wait, watch, watchDir, watchedDirs, writeJs,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
fs = require('fs');
@@ -49,8 +49,6 @@
optionParser = null;
- jsToSources = {};
-
exports.run = function() {
var i, len, literals, ref1, replCliOpts, results, source;
parseOptions();
@@ -486,13 +484,6 @@
}
sourceMapPath = outputPath(sourcePath, base, ".js.map");
jsDir = path.dirname(jsPath);
- if (jsPath in jsToSources) {
- printLine("Error: The two following source files have the same output file:");
- printLine(" " + jsToSources[jsPath]);
- printLine(" " + sourcePath);
- process.exit(1);
- }
- jsToSources[jsPath] = sourcePath;
compile = function() {
if (opts.compile) {
if (js.length <= 0) {
diff --git a/src/command.coffee b/src/command.coffee
index 5e048b03b5..fddf1a302f 100644
--- a/src/command.coffee
+++ b/src/command.coffee
@@ -59,7 +59,6 @@ sourceCode = []
notSources = {}
watchedDirs = {}
optionParser = null
-jsToSources = {}
# Run `coffee` by parsing passed options and determining what action to take.
# Many flags cause us to divert before compiling anything. Flags passed after
@@ -364,12 +363,6 @@ mkdirp = (dir, fn) ->
writeJs = (base, sourcePath, js, jsPath, generatedSourceMap = null) ->
sourceMapPath = outputPath sourcePath, base, ".js.map"
jsDir = path.dirname jsPath
- if jsPath of jsToSources
- printLine "Error: The two following source files have the same output file:"
- printLine " " + jsToSources[jsPath]
- printLine " " + sourcePath
- process.exit 1
- jsToSources[jsPath] = sourcePath
compile = ->
if opts.compile
js = ' ' if js.length <= 0
From 83744917b0fc7a8a8de8ecd9e263b12e7f130119 Mon Sep 17 00:00:00 2001
From: Joshua Peek
Date: Sun, 8 Mar 2015 21:59:09 -0700
Subject: [PATCH 14/21] Escape literal ] in REGEX
] is not allowed in the PatternCharacter set
---
lib/coffee-script/lexer.js | 2 +-
src/lexer.coffee | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/coffee-script/lexer.js b/lib/coffee-script/lexer.js
index 9d08d678f7..90f390897e 100644
--- a/lib/coffee-script/lexer.js
+++ b/lib/coffee-script/lexer.js
@@ -946,7 +946,7 @@
HEREDOC_INDENT = /\n+([^\n\S]*)(?=\S)/g;
- REGEX = /^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*])*)(\/)?/;
+ REGEX = /^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)?/;
REGEX_FLAGS = /^\w*/;
diff --git a/src/lexer.coffee b/src/lexer.coffee
index d495713791..9390772f6b 100644
--- a/src/lexer.coffee
+++ b/src/lexer.coffee
@@ -841,7 +841,7 @@ REGEX = /// ^
| \\[^\n] # anything but newlines escaped
| \[ # character class
(?: \\[^\n] | [^ \] \n \\ ] )*
- ]
+ \]
)*) (/)?
///
From 3548b4883e05a41ed6d39147f081999d5116e68d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Matthieu=20Bult=C3=A9?=
Date: Sun, 8 Mar 2015 14:40:27 +0100
Subject: [PATCH 15/21] Added checking on process.stdout to be compatible with
browserify
---
lib/coffee-script/helpers.js | 6 +++---
src/helpers.coffee | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/coffee-script/helpers.js b/lib/coffee-script/helpers.js
index e40f51b48a..b5e25d1a04 100644
--- a/lib/coffee-script/helpers.js
+++ b/lib/coffee-script/helpers.js
@@ -201,7 +201,7 @@
};
syntaxErrorToString = function() {
- var codeLine, colorize, colorsEnabled, end, filename, first_column, first_line, last_column, last_line, marker, ref1, ref2, start;
+ var codeLine, colorize, colorsEnabled, end, filename, first_column, first_line, last_column, last_line, marker, ref1, ref2, ref3, ref4, start;
if (!(this.code && this.location)) {
return Error.prototype.toString.call(this);
}
@@ -218,9 +218,9 @@
end = first_line === last_line ? last_column + 1 : codeLine.length;
marker = codeLine.slice(0, start).replace(/[^\s]/g, ' ') + repeat('^', end - start);
if (typeof process !== "undefined" && process !== null) {
- colorsEnabled = process.stdout.isTTY && !process.env.NODE_DISABLE_COLORS;
+ colorsEnabled = ((ref2 = process.stdout) != null ? ref2.isTTY : void 0) && !((ref3 = process.env) != null ? ref3.NODE_DISABLE_COLORS : void 0);
}
- if ((ref2 = this.colorful) != null ? ref2 : colorsEnabled) {
+ if ((ref4 = this.colorful) != null ? ref4 : colorsEnabled) {
colorize = function(str) {
return "\x1B[1;31m" + str + "\x1B[0m";
};
diff --git a/src/helpers.coffee b/src/helpers.coffee
index 53f1bde2de..cfa5547d79 100644
--- a/src/helpers.coffee
+++ b/src/helpers.coffee
@@ -173,7 +173,7 @@ syntaxErrorToString = ->
# Check to see if we're running on a color-enabled TTY.
if process?
- colorsEnabled = process.stdout.isTTY and not process.env.NODE_DISABLE_COLORS
+ colorsEnabled = process.stdout?.isTTY and not process.env?.NODE_DISABLE_COLORS
if @colorful ? colorsEnabled
colorize = (str) -> "\x1B[1;31m#{str}\x1B[0m"
From cc1b056b03a12ada575efdeb7b2a930f51eae33d Mon Sep 17 00:00:00 2001
From: Cotton Hou
Date: Fri, 31 Oct 2014 23:48:45 +0800
Subject: [PATCH 16/21] optionally to read data-src out from load
+load
If we had used -> in the callback above, @customer would
have referred to the undefined "customer" property of the DOM element,
@@ -1876,9 +1876,9 @@
constructed.
- CoffeeScript functions also support
+ CoffeeScript functions also support
ES6 generator functions
- through the yield keyword. There's no function*(){}
+ through the yield keyword. There's no function*(){}
nonsense — a generator in CoffeeScript is simply a function that yields.
perfectSquares = ->
@@ -2491,6 +2491,36 @@
Change Log
+
+
+
+
+ -
+ Fixed the watch mode error
+ The two following source files have the same output file.
+
+ -
+ yield now behaves as expected around expressions containing
+ this.
+
+ -
+ Added a Ruby-style -r option to the cli, which allows
+ requiring a module before execution with --eval or
+ --interactive.
+
+ -
+ To avoid dublicate browser requests for .coffee files, you can now
+ use script tags with the data-src attribute.
+
+ -
+ Minor bug fixes for IE8, strict ES5 regexp and browserify support.
+
+
+
+
-
- Interpolation now works in object literal keys (again). You can use this to
+ Interpolation now works in object literal keys (again). You can use this to
dynamically name properties.
-
@@ -2527,10 +2557,10 @@
-
CoffeeScript now supports ES6 generators. A generator is simply a function
- that yields.
+ that yields.
-
- More robust parsing and improved error messages for strings and regexes —
+ More robust parsing and improved error messages for strings and regexes —
especially with respect to interpolation.
-
diff --git a/lib/coffee-script/browser.js b/lib/coffee-script/browser.js
index 029ff34f4a..2bc615ac2c 100644
--- a/lib/coffee-script/browser.js
+++ b/lib/coffee-script/browser.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.9.1
+// Generated by CoffeeScript 1.9.2
(function() {
var CoffeeScript, compile, runScripts,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
diff --git a/lib/coffee-script/cake.js b/lib/coffee-script/cake.js
index 7f347c6a39..3550fe4504 100644
--- a/lib/coffee-script/cake.js
+++ b/lib/coffee-script/cake.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.9.1
+// Generated by CoffeeScript 1.9.2
(function() {
var CoffeeScript, cakefileDirectory, fatalError, fs, helpers, missingTask, oparse, options, optparse, path, printTasks, switches, tasks;
diff --git a/lib/coffee-script/coffee-script.js b/lib/coffee-script/coffee-script.js
index c62a5d98f3..18133b34c3 100644
--- a/lib/coffee-script/coffee-script.js
+++ b/lib/coffee-script/coffee-script.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.9.1
+// Generated by CoffeeScript 1.9.2
(function() {
var Lexer, SourceMap, base, compile, ext, formatSourcePosition, fs, getSourceMap, helpers, i, len, lexer, parser, path, ref, sourceMaps, vm, withPrettyErrors,
hasProp = {}.hasOwnProperty,
@@ -18,7 +18,7 @@
SourceMap = require('./sourcemap');
- exports.VERSION = '1.9.1';
+ exports.VERSION = '1.9.2';
exports.FILE_EXTENSIONS = ['.coffee', '.litcoffee', '.coffee.md'];
diff --git a/lib/coffee-script/command.js b/lib/coffee-script/command.js
index f504b16981..6d8d59b85f 100644
--- a/lib/coffee-script/command.js
+++ b/lib/coffee-script/command.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.9.1
+// Generated by CoffeeScript 1.9.2
(function() {
var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, findDirectoryIndex, forkNode, fs, helpers, hidden, joinTimeout, makePrelude, mkdirp, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, ref, removeSource, removeSourceDir, silentUnlink, sourceCode, sources, spawn, timeLog, usage, useWinPathSep, version, wait, watch, watchDir, watchedDirs, writeJs,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
diff --git a/lib/coffee-script/grammar.js b/lib/coffee-script/grammar.js
index 985400162a..da31dcb152 100644
--- a/lib/coffee-script/grammar.js
+++ b/lib/coffee-script/grammar.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.9.1
+// Generated by CoffeeScript 1.9.2
(function() {
var Parser, alt, alternatives, grammar, name, o, operators, token, tokens, unwrap;
diff --git a/lib/coffee-script/helpers.js b/lib/coffee-script/helpers.js
index b5e25d1a04..70bfa0b1d6 100644
--- a/lib/coffee-script/helpers.js
+++ b/lib/coffee-script/helpers.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.9.1
+// Generated by CoffeeScript 1.9.2
(function() {
var buildLocationData, extend, flatten, ref, repeat, syntaxErrorToString;
diff --git a/lib/coffee-script/index.js b/lib/coffee-script/index.js
index 9b811a2d52..17bd27d2cf 100644
--- a/lib/coffee-script/index.js
+++ b/lib/coffee-script/index.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.9.1
+// Generated by CoffeeScript 1.9.2
(function() {
var key, ref, val;
diff --git a/lib/coffee-script/lexer.js b/lib/coffee-script/lexer.js
index 90f390897e..2903c66e0e 100644
--- a/lib/coffee-script/lexer.js
+++ b/lib/coffee-script/lexer.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.9.1
+// Generated by CoffeeScript 1.9.2
(function() {
var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HERECOMMENT_ILLEGAL, HEREDOC_DOUBLE, HEREDOC_INDENT, HEREDOC_SINGLE, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDENTABLE_CLOSERS, INDEXABLE, INVALID_ESCAPE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LEADING_BLANK_LINE, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTI_DENT, NOT_REGEX, NUMBER, OPERATOR, POSSIBLY_DIVISION, REGEX, REGEX_FLAGS, REGEX_ILLEGAL, RELATION, RESERVED, Rewriter, SHIFT, SIMPLE_STRING_OMIT, STRICT_PROSCRIBED, STRING_DOUBLE, STRING_OMIT, STRING_SINGLE, STRING_START, TRAILING_BLANK_LINE, TRAILING_SPACES, UNARY, UNARY_MATH, VALID_FLAGS, WHITESPACE, compact, count, invertLiterate, key, locationDataToString, ref, ref1, repeat, starts, throwSyntaxError,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
diff --git a/lib/coffee-script/nodes.js b/lib/coffee-script/nodes.js
index 28b6907eba..f5eb7656a2 100644
--- a/lib/coffee-script/nodes.js
+++ b/lib/coffee-script/nodes.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.9.1
+// Generated by CoffeeScript 1.9.2
(function() {
var Access, Arr, Assign, Base, Block, Call, Class, Code, CodeFragment, Comment, Existence, Expansion, Extends, For, HEXNUM, IDENTIFIER, IS_REGEX, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, NEGATE, NO, NUMBER, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, isComplexOrAssignable, isLiteralArguments, isLiteralThis, locationDataToString, merge, multident, parseNum, ref1, ref2, some, starts, throwSyntaxError, unfoldSoak, utility,
extend1 = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
diff --git a/lib/coffee-script/optparse.js b/lib/coffee-script/optparse.js
index b72af77287..1a1182005c 100644
--- a/lib/coffee-script/optparse.js
+++ b/lib/coffee-script/optparse.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.9.1
+// Generated by CoffeeScript 1.9.2
(function() {
var LONG_FLAG, MULTI_FLAG, OPTIONAL, OptionParser, SHORT_FLAG, buildRule, buildRules, normalizeArguments, repeat;
diff --git a/lib/coffee-script/register.js b/lib/coffee-script/register.js
index a798bfc710..85765d7572 100644
--- a/lib/coffee-script/register.js
+++ b/lib/coffee-script/register.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.9.1
+// Generated by CoffeeScript 1.9.2
(function() {
var CoffeeScript, Module, binary, child_process, ext, findExtension, fork, helpers, i, len, loadFile, path, ref;
diff --git a/lib/coffee-script/repl.js b/lib/coffee-script/repl.js
index e06633102c..14e5ab6dce 100644
--- a/lib/coffee-script/repl.js
+++ b/lib/coffee-script/repl.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.9.1
+// Generated by CoffeeScript 1.9.2
(function() {
var CoffeeScript, addHistory, addMultilineHandler, fs, getCommandId, merge, nodeREPL, path, ref, replDefaults, runInContext, updateSyntaxError, vm;
diff --git a/lib/coffee-script/rewriter.js b/lib/coffee-script/rewriter.js
index 3b00a1b89f..0511e15bc3 100644
--- a/lib/coffee-script/rewriter.js
+++ b/lib/coffee-script/rewriter.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.9.1
+// Generated by CoffeeScript 1.9.2
(function() {
var BALANCED_PAIRS, CALL_CLOSERS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, generate, k, left, len, ref, rite,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; },
diff --git a/lib/coffee-script/scope.js b/lib/coffee-script/scope.js
index 91c8c9dcf5..b6418ad7a3 100644
--- a/lib/coffee-script/scope.js
+++ b/lib/coffee-script/scope.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.9.1
+// Generated by CoffeeScript 1.9.2
(function() {
var Scope,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
diff --git a/lib/coffee-script/sourcemap.js b/lib/coffee-script/sourcemap.js
index d10bc37115..5566b95ea2 100644
--- a/lib/coffee-script/sourcemap.js
+++ b/lib/coffee-script/sourcemap.js
@@ -1,4 +1,4 @@
-// Generated by CoffeeScript 1.9.1
+// Generated by CoffeeScript 1.9.2
(function() {
var LineMap, SourceMap;
From 46d16b5c4970c6e4d8a8d08caaed16d488a5577d Mon Sep 17 00:00:00 2001
From: Jeremy Ashkenas
Date: Wed, 15 Apr 2015 11:49:14 -0400
Subject: [PATCH 21/21] #3942 -- revising changelog
---
documentation/index.html.js | 15 ++++++++-------
index.html | 15 ++++++++-------
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/documentation/index.html.js b/documentation/index.html.js
index 5b7d948134..0f522feef8 100644
--- a/documentation/index.html.js
+++ b/documentation/index.html.js
@@ -1207,24 +1207,25 @@ Expressions
<%= releaseHeader('2015-04-15', '1.9.2', '1.9.1') %>
-
- Fixed the watch mode error
- The two following source files have the same output file.
+ Fixed a watch mode error introduced in 1.9.1 when compiling
+ multiple files with the same filename.
-
- yield now behaves as expected around expressions containing
+ Bugfix for yield around expressions containing
this.
-
- Added a Ruby-style -r option to the cli, which allows
+ Added a Ruby-style -r option to the REPL, which allows
requiring a module before execution with --eval or
--interactive.
-
- To avoid dublicate browser requests for .coffee files, you can now
- use script tags with the data-src attribute.
+ In <script type="text/coffeescript"> tags, to avoid
+ possible duplicate browser requests for .coffee files,
+ you can now use the data-src attribute instead of src.
-
- Minor bug fixes for IE8, strict ES5 regexp and browserify support.
+ Minor bug fixes for IE8, strict ES5 regular expressions and Browserify.
diff --git a/index.html b/index.html
index 9582fac53d..863c1f743b 100644
--- a/index.html
+++ b/index.html
@@ -2499,24 +2499,25 @@
-
- Fixed the watch mode error
- The two following source files have the same output file.
+ Fixed a watch mode error introduced in 1.9.1 when compiling
+ multiple files with the same filename.
-
- yield now behaves as expected around expressions containing
+ Bugfix for yield around expressions containing
this.
-
- Added a Ruby-style -r option to the cli, which allows
+ Added a Ruby-style -r option to the REPL, which allows
requiring a module before execution with --eval or
--interactive.
-
- To avoid dublicate browser requests for .coffee files, you can now
- use script tags with the data-src attribute.
+ In <script type="text/coffeescript"> tags, to avoid
+ possible duplicate browser requests for .coffee files,
+ you can now use the data-src attribute instead of src.
-
- Minor bug fixes for IE8, strict ES5 regexp and browserify support.
+ Minor bug fixes for IE8, strict ES5 regular expressions and Browserify.