Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## v108.0.15 (2019-12-20)

- Use `source-map-support` package for mapping stack trace line numbers to
original iced/coffee file line numbers.

This is potentially a breaking change, depending how you use or integrate
with IcedCoffeeScript. The old behavior can be restored by calling the
following new IcedCoffeeScript API:

```
require('iced-coffee-script').installPrepareStackTrace()
```

See the README file for more information.

## v108.0.13 (2019-04-30)
- Fix error on repl exit

Expand Down
7 changes: 7 additions & 0 deletions Cakefile
Original file line number Diff line number Diff line change
Expand Up @@ -317,4 +317,11 @@ task 'test:browser', 'run the test suite against the merged browser script', ->
result = {}
global.testingBrowser = yes
(-> eval source).call result
# When testing browser build, install custom prepareStackTrace handler instead
# of source-map-support. `CoffeeScript.run` is pulled from `browser.coffee` in
# browser build, and it's incompatible with our source-map-support hooks.
result.CoffeeScript.installPrepareStackTrace()
# WARNING: This task does not work properly right now for some reason. Somehow
# functions like `run` still come from `coffee-script.coffee` instead
# of `browser.coffee` in `result.CoffeeScript`.
runTests result.CoffeeScript
26 changes: 26 additions & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,29 @@

Top 100 contributors are listed here:
http://github.com/maxtaco/coffee-script/contributors


Note about handling errors with `source-map-support`:

Since v108.0.15 (2019-12-20), IcedCoffeeScript uses `source-map-support`
package to handle location mapping for stack traces for errors coming from
IcedCoffeeScript code. It's enabled by default when using `iced` to run
scripts or when using `register` to enable IcedCoffeeScript in Node's module
system.

To enable it manually (e.g. in environments other than Node.js or when not
using `register`), use the following API:

```
require('iced-coffee-script').installSourceMapSupport({})
```

This function can also be called with options for `source-map-support`
instead of an empty object. Available options are described in
`source-map-support` README file.

To use the old error handler, use the following API instead:

```
require('iced-coffee-script').installPrepareStackTrace()
```
8 changes: 8 additions & 0 deletions extras/iced-coffee-script-108.0.15-min.js

Large diffs are not rendered by default.

Loading