traceur-rb 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +2 -2
- data/lib/js/compile.js +7 -15
- data/lib/traceur.rb +2 -1
- data/lib/traceur/compilation_error.rb +27 -0
- data/lib/traceur/compiler.rb +4 -1
- data/lib/traceur/configuration.rb +1 -1
- data/lib/traceur/node/runner.rb +1 -1
- data/lib/traceur/version.rb +1 -1
- data/spec/examples/syntax_error.js +3 -0
- data/spec/integration/examples_spec.rb +6 -0
- data/vendor/node_modules/traceur/LICENSE +202 -0
- data/vendor/node_modules/traceur/README.md +5 -5
- data/vendor/node_modules/traceur/bin/traceur-runtime.js +1392 -623
- data/vendor/node_modules/traceur/bin/traceur.js +24749 -17990
- data/vendor/node_modules/traceur/node_modules/.bin/semver +2 -2
- data/vendor/node_modules/traceur/node_modules/commander/History.md +222 -0
- data/vendor/node_modules/traceur/node_modules/commander/Readme.md +127 -35
- data/vendor/node_modules/traceur/node_modules/commander/index.js +261 -93
- data/vendor/node_modules/traceur/node_modules/commander/package.json +41 -9
- data/vendor/node_modules/traceur/node_modules/glob/LICENSE +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/README.md +357 -0
- data/vendor/node_modules/traceur/node_modules/glob/common.js +177 -0
- data/vendor/node_modules/traceur/node_modules/glob/glob.js +649 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/.eslintrc +17 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/LICENSE +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/README.md +37 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/inflight.js +44 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md +36 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +34 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js +51 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js +33 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/package.json +61 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inflight/test.js +97 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/LICENSE +16 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/README.md +42 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/inherits.js +1 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/package.json +33 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/inherits/test.js +25 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/.npmignore +1 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/.travis.yml +4 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/LICENSE +23 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/README.md +216 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/benchmark.js +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/browser.js +1181 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/minimatch.js +845 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +2 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.travis.yml +3 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +121 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +8 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +191 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +2 -0
- data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/collections → glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/.travis.yml +0 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +6 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +80 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +5 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +38 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +73 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +56 -0
- data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/url2 → glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/.travis.yml +1 -1
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +18 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +62 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +6 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +13 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +83 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +39 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +75 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-comparison.js +32 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/bash-results.txt +1075 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/cases.txt +182 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/dollar.js +9 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/empty-option.js +10 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/generate.sh +24 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/negative-increment.js +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/nested.js +16 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/order.js +10 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/pad.js +13 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/same-type.js +7 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/test/sequence.js +50 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/package.json +60 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/basic.js +399 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/brace-expand.js +45 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/defaults.js +274 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/minimatch/test/extglob-ending-with-state-char.js +8 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/LICENSE +27 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/README.md +51 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE +15 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +36 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +34 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +51 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +33 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/once.js +21 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/package.json +42 -0
- data/vendor/node_modules/traceur/node_modules/glob/node_modules/once/test/once.js +23 -0
- data/vendor/node_modules/traceur/node_modules/glob/package.json +72 -0
- data/vendor/node_modules/traceur/node_modules/glob/sync.js +409 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/.release.json +17 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/CHANGELOG.md +165 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/LICENSE +19 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/README.md +364 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/dist/rsvp.js +1671 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/dist/rsvp.min.js +9 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp.js +66 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp.umd.js +50 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/-internal.js +265 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/all-settled.js +71 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/all.js +15 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/asap.js +109 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/config.js +28 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/defer.js +45 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/enumerator.js +125 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/events.js +201 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/filter.js +120 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/hash-settled.js +124 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/hash.js +94 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/instrument.js +41 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/map.js +99 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/node.js +281 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise-hash.js +51 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise.js +496 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/all.js +52 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/race.js +105 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/reject.js +47 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/promise/resolve.js +49 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/race.js +15 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/reject.js +16 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/resolve.js +17 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/rethrow.js +46 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/lib/rsvp/utils.js +39 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/package.json +100 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/README.md +9 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/bower.json +22 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/composer.json +18 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/package.json +52 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.amd.js +1607 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.js +1566 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/rsvp.js/rsvp.min.js +26 -0
- data/vendor/node_modules/traceur/node_modules/rsvp/vertx.js +1 -0
- data/vendor/node_modules/traceur/node_modules/semver/bin/semver +2 -2
- data/vendor/node_modules/traceur/node_modules/semver/package.json +4 -3
- data/vendor/node_modules/traceur/node_modules/semver/semver.browser.js +7 -0
- data/vendor/node_modules/traceur/node_modules/semver/semver.browser.js.gz +0 -0
- data/vendor/node_modules/traceur/node_modules/semver/semver.js +7 -0
- data/vendor/node_modules/traceur/node_modules/semver/semver.min.js +1 -1
- data/vendor/node_modules/traceur/node_modules/semver/semver.min.js.gz +0 -0
- data/vendor/node_modules/traceur/node_modules/semver/test/index.js +8 -4
- data/vendor/node_modules/traceur/node_modules/semver/test/ltr.js +2 -1
- data/vendor/node_modules/traceur/node_modules/source-map-support/.npmignore +1 -0
- data/vendor/node_modules/traceur/node_modules/{q-io/node_modules/mime/LICENSE → source-map-support/LICENSE.md} +7 -5
- data/vendor/node_modules/traceur/node_modules/source-map-support/README.md +165 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/browser-source-map-support.js +89 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/index.html +6 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/require.js +36 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.coffee +13 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.js +24 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/amd-test/script.map +10 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-source-map-support.js +89 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/index.html +6 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.coffee +12 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.js +25 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/browser-test/script.map +10 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/build.js +69 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/index.html +6 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.coffee +12 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.js +25 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/script.map +10 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/header-test/server.js +45 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/.npmignore +2 -0
- data/vendor/node_modules/traceur/node_modules/{q-io → source-map-support/node_modules/source-map}/.travis.yml +1 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/CHANGELOG.md +121 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/LICENSE +28 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/Makefile.dryice.js +166 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/README.md +434 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/assert-shim.js +56 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/mini-require.js +152 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/prefix-source-map.jsm +20 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/prefix-utils.jsm +18 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-browser.js +8 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-source-map.jsm +6 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/suffix-utils.jsm +21 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/test-prefix.js +8 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/build/test-suffix.js +3 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map.js +8 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/array-set.js +97 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/base64-vlq.js +144 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/base64.js +42 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/binary-search.js +81 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-consumer.js +478 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-map-generator.js +380 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/source-node.js +371 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/lib/source-map/util.js +205 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/LICENSE +58 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/README.md +171 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/amdefine.js +299 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/intercept.js +36 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/node_modules/amdefine/package.json +37 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/package.json +142 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/run-tests.js +62 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-api.js +26 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-array-set.js +104 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-base64-vlq.js +24 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-base64.js +35 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-binary-search.js +54 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-dog-fooding.js +72 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-map-consumer.js +451 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-map-generator.js +417 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/test-source-node.js +365 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/node_modules/source-map/test/source-map/util.js +161 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/package.json +52 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/source-map-support.js +381 -0
- data/vendor/node_modules/traceur/node_modules/source-map-support/test.js +359 -0
- data/vendor/node_modules/traceur/package.json +234 -20
- data/vendor/node_modules/traceur/src/node/NodeCompiler.js +78 -0
- data/vendor/node_modules/traceur/src/node/System.js +32 -5
- data/vendor/node_modules/traceur/src/node/api.js +28 -93
- data/vendor/node_modules/traceur/src/node/command.js +84 -19
- data/vendor/node_modules/traceur/src/node/compileAllJsFilesInDir.js +40 -0
- data/vendor/node_modules/traceur/src/node/interpreter.js +11 -8
- data/vendor/node_modules/traceur/src/node/recursiveModuleCompile.js +171 -0
- data/vendor/node_modules/traceur/src/node/require.js +7 -21
- data/vendor/node_modules/traceur/src/node/to-amd-compiler.js +2 -7
- data/vendor/node_modules/traceur/src/node/to-closure-compiler.js +28 -0
- data/vendor/node_modules/traceur/src/node/to-commonjs-compiler.js +3 -7
- data/vendor/node_modules/traceur/src/node/traceur.js +1 -1
- metadata +196 -190
- data/vendor/node_modules/traceur/node_modules/q-io/.npmignore +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/CHANGES.md +0 -122
- data/vendor/node_modules/traceur/node_modules/q-io/LICENSE +0 -19
- data/vendor/node_modules/traceur/node_modules/q-io/README.md +0 -928
- data/vendor/node_modules/traceur/node_modules/q-io/buffer-stream.js +0 -59
- data/vendor/node_modules/traceur/node_modules/q-io/coverage-report.js +0 -44
- data/vendor/node_modules/traceur/node_modules/q-io/deprecate.js +0 -51
- data/vendor/node_modules/traceur/node_modules/q-io/fs-boot.js +0 -307
- data/vendor/node_modules/traceur/node_modules/q-io/fs-common.js +0 -499
- data/vendor/node_modules/traceur/node_modules/q-io/fs-mock.js +0 -547
- data/vendor/node_modules/traceur/node_modules/q-io/fs-root.js +0 -105
- data/vendor/node_modules/traceur/node_modules/q-io/fs.js +0 -355
- data/vendor/node_modules/traceur/node_modules/q-io/fs2http.js +0 -65
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps.js +0 -152
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/chain.js +0 -24
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/content.js +0 -93
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/cookie.js +0 -154
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/decorators.js +0 -178
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/fs.js +0 -417
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/html.js +0 -58
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/json.js +0 -78
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/negotiate.js +0 -120
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/proxy.js +0 -27
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/redirect.js +0 -209
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/route.js +0 -125
- data/vendor/node_modules/traceur/node_modules/q-io/http-apps/status.js +0 -175
- data/vendor/node_modules/traceur/node_modules/q-io/http-cookie.js +0 -75
- data/vendor/node_modules/traceur/node_modules/q-io/http.js +0 -378
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/.npmignore +0 -11
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/CHANGES.md +0 -78
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/LICENSE.md +0 -21
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/README.md +0 -1285
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/collections.js +0 -22
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/dict.js +0 -142
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/fast-map.js +0 -57
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/fast-set.js +0 -183
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-collection.js +0 -261
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-map.js +0 -186
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-order.js +0 -55
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/generic-set.js +0 -59
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/heap.js +0 -236
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/iterator.js +0 -371
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/list.js +0 -435
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/array-changes.js +0 -247
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/map-changes.js +0 -147
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/property-changes.js +0 -448
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/listen/range-changes.js +0 -139
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/lru-map.js +0 -79
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/lru-set.js +0 -142
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/map.js +0 -60
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/multi-map.js +0 -41
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/package.json +0 -12
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/sync +0 -7
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/sync.patch +0 -48
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/node_modules/weak-map/weak-map.js +0 -590
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/package.json +0 -49
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/set.js +0 -173
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-array.js +0 -274
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-function.js +0 -59
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-object.js +0 -538
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim-regexp.js +0 -14
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/shim.js +0 -6
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array-map.js +0 -49
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array-set.js +0 -51
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-array.js +0 -269
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-map.js +0 -61
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/sorted-set.js +0 -736
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/tree-log.js +0 -40
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/collections/weak-map.js +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/README.md +0 -66
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/mime.js +0 -114
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/package.json +0 -35
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/test.js +0 -84
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/types/mime.types +0 -1588
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mime/types/node.types +0 -77
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/CHANGES +0 -15
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/LICENSE +0 -19
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/README +0 -96
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/lib/mimeparse.js +0 -166
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/mimeparse/package.json +0 -43
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/CONTRIBUTING.md +0 -40
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/LICENSE +0 -19
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/README.md +0 -813
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/benchmark/compare-with-callbacks.js +0 -71
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/benchmark/scenarios.js +0 -36
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/package.json +0 -93
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/q.js +0 -1937
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/q/queue.js +0 -35
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/.gitmodules +0 -6
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/History.md +0 -36
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/Makefile +0 -7
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/Readme.md +0 -38
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/benchmark.js +0 -32
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/examples.js +0 -39
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/index.js +0 -2
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/lib/querystring.js +0 -123
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/package.json +0 -19
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/.gitmodules +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/.npmignore +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/History.md +0 -128
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/Makefile +0 -53
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/Readme.md +0 -61
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/bin/expresso +0 -856
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/api.html +0 -1080
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/index.html +0 -377
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/index.md +0 -290
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/layout/foot.html +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/docs/layout/head.html +0 -42
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/lib/bar.js +0 -4
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/lib/foo.js +0 -16
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/package.json +0 -12
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/assert.test.js +0 -91
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/async.test.js +0 -12
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/bar.test.js +0 -13
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/foo.test.js +0 -14
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/http.test.js +0 -146
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/serial/async.test.js +0 -39
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/expresso/test/serial/http.test.js +0 -48
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/.gitmodules +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/History.md +0 -22
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/Makefile +0 -6
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/Readme.md +0 -248
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/examples/runner.js +0 -53
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/index.js +0 -2
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/lib/eql.js +0 -91
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/lib/should.js +0 -548
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/package.json +0 -8
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/support/should/test/should.test.js +0 -358
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/qs/test/querystring.test.js +0 -133
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/.npmignore +0 -3
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/LICENSE.md +0 -20
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/README.md +0 -33
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/package.json +0 -37
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/test/url2-spec.js +0 -125
- data/vendor/node_modules/traceur/node_modules/q-io/node_modules/url2/url2.js +0 -151
- data/vendor/node_modules/traceur/node_modules/q-io/package.json +0 -51
- data/vendor/node_modules/traceur/node_modules/q-io/reader.js +0 -133
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/boot-directory-spec.js +0 -47
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/contains-spec.js +0 -11
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/fixtures/hello.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/issues/1-spec.js +0 -33
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/make-tree-spec.js +0 -92
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/append-spec.js +0 -41
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/copy-tree-spec.js +0 -57
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/fixture/hello.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/link-spec.js +0 -70
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/make-tree-spec.js +0 -109
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/merge-spec.js +0 -67
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/move-spec.js +0 -219
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/object-spec.js +0 -20
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/range-spec.js +0 -26
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/read-spec.js +0 -40
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/remove-directory-spec.js +0 -37
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/remove-tree-spec.js +0 -39
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/root-spec.js +0 -32
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/stat-spec.js +0 -26
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/symbolic-link-spec.js +0 -86
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/working-directory-spec.js +0 -31
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/mock/write-spec.js +0 -73
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/range-spec.js +0 -23
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/range-spec.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/read-spec.js +0 -22
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/relative-spec.js +0 -25
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/reroot-spec.js +0 -45
- data/vendor/node_modules/traceur/node_modules/q-io/spec/fs/write-spec.js +0 -38
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/cookie-spec.js +0 -52
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/directory-list-spec.js +0 -86
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/01234.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/1234.txt +0 -1
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/5678.txt +0 -0
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/fixtures/9012/3456.txt +0 -0
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/hosts-spec.js +0 -49
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/interpret-range-spec.js +0 -47
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/partial-range-spec.js +0 -186
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/proxy-spec.js +0 -82
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http-apps/symbolic-link-spec.js +0 -110
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http/agent-spec.js +0 -96
- data/vendor/node_modules/traceur/node_modules/q-io/spec/http/basic-spec.js +0 -96
- data/vendor/node_modules/traceur/node_modules/q-io/spec/lib/jasmine-promise.js +0 -42
- data/vendor/node_modules/traceur/node_modules/q-io/writer.js +0 -111
- data/vendor/node_modules/traceur/src/node/compile-single-file.js +0 -69
- data/vendor/node_modules/traceur/src/node/compiler.js +0 -116
- data/vendor/node_modules/traceur/src/node/inline-module.js +0 -149
@@ -0,0 +1,161 @@
|
|
1
|
+
/* -*- Mode: js; js-indent-level: 2; -*- */
|
2
|
+
/*
|
3
|
+
* Copyright 2011 Mozilla Foundation and contributors
|
4
|
+
* Licensed under the New BSD license. See LICENSE or:
|
5
|
+
* http://opensource.org/licenses/BSD-3-Clause
|
6
|
+
*/
|
7
|
+
if (typeof define !== 'function') {
|
8
|
+
var define = require('amdefine')(module, require);
|
9
|
+
}
|
10
|
+
define(function (require, exports, module) {
|
11
|
+
|
12
|
+
var util = require('../../lib/source-map/util');
|
13
|
+
|
14
|
+
// This is a test mapping which maps functions from two different files
|
15
|
+
// (one.js and two.js) to a minified generated source.
|
16
|
+
//
|
17
|
+
// Here is one.js:
|
18
|
+
//
|
19
|
+
// ONE.foo = function (bar) {
|
20
|
+
// return baz(bar);
|
21
|
+
// };
|
22
|
+
//
|
23
|
+
// Here is two.js:
|
24
|
+
//
|
25
|
+
// TWO.inc = function (n) {
|
26
|
+
// return n + 1;
|
27
|
+
// };
|
28
|
+
//
|
29
|
+
// And here is the generated code (min.js):
|
30
|
+
//
|
31
|
+
// ONE.foo=function(a){return baz(a);};
|
32
|
+
// TWO.inc=function(a){return a+1;};
|
33
|
+
exports.testGeneratedCode = " ONE.foo=function(a){return baz(a);};\n"+
|
34
|
+
" TWO.inc=function(a){return a+1;};";
|
35
|
+
exports.testMap = {
|
36
|
+
version: 3,
|
37
|
+
file: 'min.js',
|
38
|
+
names: ['bar', 'baz', 'n'],
|
39
|
+
sources: ['one.js', 'two.js'],
|
40
|
+
sourceRoot: '/the/root',
|
41
|
+
mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'
|
42
|
+
};
|
43
|
+
exports.testMapWithSourcesContent = {
|
44
|
+
version: 3,
|
45
|
+
file: 'min.js',
|
46
|
+
names: ['bar', 'baz', 'n'],
|
47
|
+
sources: ['one.js', 'two.js'],
|
48
|
+
sourcesContent: [
|
49
|
+
' ONE.foo = function (bar) {\n' +
|
50
|
+
' return baz(bar);\n' +
|
51
|
+
' };',
|
52
|
+
' TWO.inc = function (n) {\n' +
|
53
|
+
' return n + 1;\n' +
|
54
|
+
' };'
|
55
|
+
],
|
56
|
+
sourceRoot: '/the/root',
|
57
|
+
mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'
|
58
|
+
};
|
59
|
+
exports.emptyMap = {
|
60
|
+
version: 3,
|
61
|
+
file: 'min.js',
|
62
|
+
names: [],
|
63
|
+
sources: [],
|
64
|
+
mappings: ''
|
65
|
+
};
|
66
|
+
|
67
|
+
|
68
|
+
function assertMapping(generatedLine, generatedColumn, originalSource,
|
69
|
+
originalLine, originalColumn, name, map, assert,
|
70
|
+
dontTestGenerated, dontTestOriginal) {
|
71
|
+
if (!dontTestOriginal) {
|
72
|
+
var origMapping = map.originalPositionFor({
|
73
|
+
line: generatedLine,
|
74
|
+
column: generatedColumn
|
75
|
+
});
|
76
|
+
assert.equal(origMapping.name, name,
|
77
|
+
'Incorrect name, expected ' + JSON.stringify(name)
|
78
|
+
+ ', got ' + JSON.stringify(origMapping.name));
|
79
|
+
assert.equal(origMapping.line, originalLine,
|
80
|
+
'Incorrect line, expected ' + JSON.stringify(originalLine)
|
81
|
+
+ ', got ' + JSON.stringify(origMapping.line));
|
82
|
+
assert.equal(origMapping.column, originalColumn,
|
83
|
+
'Incorrect column, expected ' + JSON.stringify(originalColumn)
|
84
|
+
+ ', got ' + JSON.stringify(origMapping.column));
|
85
|
+
|
86
|
+
var expectedSource;
|
87
|
+
|
88
|
+
if (originalSource && map.sourceRoot && originalSource.indexOf(map.sourceRoot) === 0) {
|
89
|
+
expectedSource = originalSource;
|
90
|
+
} else if (originalSource) {
|
91
|
+
expectedSource = map.sourceRoot
|
92
|
+
? util.join(map.sourceRoot, originalSource)
|
93
|
+
: originalSource;
|
94
|
+
} else {
|
95
|
+
expectedSource = null;
|
96
|
+
}
|
97
|
+
|
98
|
+
assert.equal(origMapping.source, expectedSource,
|
99
|
+
'Incorrect source, expected ' + JSON.stringify(expectedSource)
|
100
|
+
+ ', got ' + JSON.stringify(origMapping.source));
|
101
|
+
}
|
102
|
+
|
103
|
+
if (!dontTestGenerated) {
|
104
|
+
var genMapping = map.generatedPositionFor({
|
105
|
+
source: originalSource,
|
106
|
+
line: originalLine,
|
107
|
+
column: originalColumn
|
108
|
+
});
|
109
|
+
assert.equal(genMapping.line, generatedLine,
|
110
|
+
'Incorrect line, expected ' + JSON.stringify(generatedLine)
|
111
|
+
+ ', got ' + JSON.stringify(genMapping.line));
|
112
|
+
assert.equal(genMapping.column, generatedColumn,
|
113
|
+
'Incorrect column, expected ' + JSON.stringify(generatedColumn)
|
114
|
+
+ ', got ' + JSON.stringify(genMapping.column));
|
115
|
+
}
|
116
|
+
}
|
117
|
+
exports.assertMapping = assertMapping;
|
118
|
+
|
119
|
+
function assertEqualMaps(assert, actualMap, expectedMap) {
|
120
|
+
assert.equal(actualMap.version, expectedMap.version, "version mismatch");
|
121
|
+
assert.equal(actualMap.file, expectedMap.file, "file mismatch");
|
122
|
+
assert.equal(actualMap.names.length,
|
123
|
+
expectedMap.names.length,
|
124
|
+
"names length mismatch: " +
|
125
|
+
actualMap.names.join(", ") + " != " + expectedMap.names.join(", "));
|
126
|
+
for (var i = 0; i < actualMap.names.length; i++) {
|
127
|
+
assert.equal(actualMap.names[i],
|
128
|
+
expectedMap.names[i],
|
129
|
+
"names[" + i + "] mismatch: " +
|
130
|
+
actualMap.names.join(", ") + " != " + expectedMap.names.join(", "));
|
131
|
+
}
|
132
|
+
assert.equal(actualMap.sources.length,
|
133
|
+
expectedMap.sources.length,
|
134
|
+
"sources length mismatch: " +
|
135
|
+
actualMap.sources.join(", ") + " != " + expectedMap.sources.join(", "));
|
136
|
+
for (var i = 0; i < actualMap.sources.length; i++) {
|
137
|
+
assert.equal(actualMap.sources[i],
|
138
|
+
expectedMap.sources[i],
|
139
|
+
"sources[" + i + "] length mismatch: " +
|
140
|
+
actualMap.sources.join(", ") + " != " + expectedMap.sources.join(", "));
|
141
|
+
}
|
142
|
+
assert.equal(actualMap.sourceRoot,
|
143
|
+
expectedMap.sourceRoot,
|
144
|
+
"sourceRoot mismatch: " +
|
145
|
+
actualMap.sourceRoot + " != " + expectedMap.sourceRoot);
|
146
|
+
assert.equal(actualMap.mappings, expectedMap.mappings,
|
147
|
+
"mappings mismatch:\nActual: " + actualMap.mappings + "\nExpected: " + expectedMap.mappings);
|
148
|
+
if (actualMap.sourcesContent) {
|
149
|
+
assert.equal(actualMap.sourcesContent.length,
|
150
|
+
expectedMap.sourcesContent.length,
|
151
|
+
"sourcesContent length mismatch");
|
152
|
+
for (var i = 0; i < actualMap.sourcesContent.length; i++) {
|
153
|
+
assert.equal(actualMap.sourcesContent[i],
|
154
|
+
expectedMap.sourcesContent[i],
|
155
|
+
"sourcesContent[" + i + "] mismatch");
|
156
|
+
}
|
157
|
+
}
|
158
|
+
}
|
159
|
+
exports.assertEqualMaps = assertEqualMaps;
|
160
|
+
|
161
|
+
});
|
@@ -0,0 +1,52 @@
|
|
1
|
+
{
|
2
|
+
"name": "source-map-support",
|
3
|
+
"description": "Fixes stack traces for files with source maps",
|
4
|
+
"version": "0.2.9",
|
5
|
+
"main": "./source-map-support.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "node_modules/mocha/bin/mocha"
|
8
|
+
},
|
9
|
+
"dependencies": {
|
10
|
+
"source-map": "0.1.32"
|
11
|
+
},
|
12
|
+
"devDependencies": {
|
13
|
+
"coffee-script": "1.7.1",
|
14
|
+
"browserify": "3.44.2",
|
15
|
+
"mocha": "1.18.2"
|
16
|
+
},
|
17
|
+
"repository": {
|
18
|
+
"type": "git",
|
19
|
+
"url": "https://github.com/evanw/node-source-map-support"
|
20
|
+
},
|
21
|
+
"bugs": {
|
22
|
+
"url": "https://github.com/evanw/node-source-map-support/issues"
|
23
|
+
},
|
24
|
+
"licenses": [
|
25
|
+
{
|
26
|
+
"type": "MIT"
|
27
|
+
}
|
28
|
+
],
|
29
|
+
"gitHead": "fc511adace58467c478967819b38b3945d2183ef",
|
30
|
+
"homepage": "https://github.com/evanw/node-source-map-support",
|
31
|
+
"_id": "source-map-support@0.2.9",
|
32
|
+
"_shasum": "0bfb3bdae680f36b51815160bb950d0b17f4a248",
|
33
|
+
"_from": "source-map-support@>=0.2.8 <0.3.0",
|
34
|
+
"_npmVersion": "1.4.28",
|
35
|
+
"_npmUser": {
|
36
|
+
"name": "evanw",
|
37
|
+
"email": "evan.exe@gmail.com"
|
38
|
+
},
|
39
|
+
"maintainers": [
|
40
|
+
{
|
41
|
+
"name": "evanw",
|
42
|
+
"email": "evan.exe@gmail.com"
|
43
|
+
}
|
44
|
+
],
|
45
|
+
"dist": {
|
46
|
+
"shasum": "0bfb3bdae680f36b51815160bb950d0b17f4a248",
|
47
|
+
"tarball": "http://registry.npmjs.org/source-map-support/-/source-map-support-0.2.9.tgz"
|
48
|
+
},
|
49
|
+
"directories": {},
|
50
|
+
"_resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.2.9.tgz",
|
51
|
+
"readme": "ERROR: No README data found!"
|
52
|
+
}
|
@@ -0,0 +1,381 @@
|
|
1
|
+
var SourceMapConsumer = require('source-map').SourceMapConsumer;
|
2
|
+
var path = require('path');
|
3
|
+
var fs = require('fs');
|
4
|
+
|
5
|
+
// Only install once if called multiple times
|
6
|
+
var alreadyInstalled = false;
|
7
|
+
|
8
|
+
// If true, the caches are reset before a stack trace formatting operation
|
9
|
+
var emptyCacheBetweenOperations = false;
|
10
|
+
|
11
|
+
// Maps a file path to a string containing the file contents
|
12
|
+
var fileContentsCache = {};
|
13
|
+
|
14
|
+
// Maps a file path to a source map for that file
|
15
|
+
var sourceMapCache = {};
|
16
|
+
|
17
|
+
function isInBrowser() {
|
18
|
+
return typeof window !== 'undefined';
|
19
|
+
}
|
20
|
+
|
21
|
+
function retrieveFile(path) {
|
22
|
+
if (path in fileContentsCache) {
|
23
|
+
return fileContentsCache[path];
|
24
|
+
}
|
25
|
+
|
26
|
+
try {
|
27
|
+
// Use SJAX if we are in the browser
|
28
|
+
if (isInBrowser()) {
|
29
|
+
var xhr = new XMLHttpRequest();
|
30
|
+
xhr.open('GET', path, false);
|
31
|
+
xhr.send(null);
|
32
|
+
var contents = xhr.readyState === 4 ? xhr.responseText : null;
|
33
|
+
}
|
34
|
+
|
35
|
+
// Otherwise, use the filesystem
|
36
|
+
else {
|
37
|
+
var contents = fs.readFileSync(path, 'utf8');
|
38
|
+
}
|
39
|
+
} catch (e) {
|
40
|
+
var contents = null;
|
41
|
+
}
|
42
|
+
|
43
|
+
return fileContentsCache[path] = contents;
|
44
|
+
}
|
45
|
+
|
46
|
+
// Support URLs relative to a directory, but be careful about a protocol prefix
|
47
|
+
// in case we are in the browser (i.e. directories may start with "http://")
|
48
|
+
function supportRelativeURL(file, url) {
|
49
|
+
if (!file) return url;
|
50
|
+
var dir = path.dirname(file);
|
51
|
+
var match = /^\w+:\/\/[^\/]*/.exec(dir);
|
52
|
+
var protocol = match ? match[0] : '';
|
53
|
+
return protocol + path.resolve(dir.slice(protocol.length), url);
|
54
|
+
}
|
55
|
+
|
56
|
+
function retrieveSourceMapURL(source) {
|
57
|
+
var fileData;
|
58
|
+
|
59
|
+
if (isInBrowser()) {
|
60
|
+
var xhr = new XMLHttpRequest();
|
61
|
+
xhr.open('GET', source, false);
|
62
|
+
xhr.send(null);
|
63
|
+
fileData = xhr.readyState === 4 ? xhr.responseText : null;
|
64
|
+
|
65
|
+
// Support providing a sourceMappingURL via the SourceMap header
|
66
|
+
var sourceMapHeader = xhr.getResponseHeader("SourceMap") ||
|
67
|
+
xhr.getResponseHeader("X-SourceMap");
|
68
|
+
if (sourceMapHeader) {
|
69
|
+
return sourceMapHeader;
|
70
|
+
}
|
71
|
+
}
|
72
|
+
|
73
|
+
// Get the URL of the source map
|
74
|
+
fileData = retrieveFile(source);
|
75
|
+
var match = /\/\/[#@]\s*sourceMappingURL=(.*)\s*$/m.exec(fileData);
|
76
|
+
if (!match) return null;
|
77
|
+
return match[1];
|
78
|
+
};
|
79
|
+
|
80
|
+
// Can be overridden by the retrieveSourceMap option to install. Takes a
|
81
|
+
// generated source filename; returns a {map, optional url} object, or null if
|
82
|
+
// there is no source map. The map field may be either a string or the parsed
|
83
|
+
// JSON object (ie, it must be a valid argument to the SourceMapConsumer
|
84
|
+
// constructor).
|
85
|
+
function retrieveSourceMap(source) {
|
86
|
+
var sourceMappingURL = retrieveSourceMapURL(source);
|
87
|
+
if (!sourceMappingURL) return null;
|
88
|
+
|
89
|
+
// Read the contents of the source map
|
90
|
+
var sourceMapData;
|
91
|
+
var dataUrlPrefix = "data:application/json;base64,";
|
92
|
+
if (sourceMappingURL.slice(0, dataUrlPrefix.length).toLowerCase() == dataUrlPrefix) {
|
93
|
+
// Support source map URL as a data url
|
94
|
+
sourceMapData = new Buffer(sourceMappingURL.slice(dataUrlPrefix.length), "base64").toString();
|
95
|
+
sourceMappingURL = null;
|
96
|
+
} else {
|
97
|
+
// Support source map URLs relative to the source URL
|
98
|
+
sourceMappingURL = supportRelativeURL(source, sourceMappingURL);
|
99
|
+
sourceMapData = retrieveFile(sourceMappingURL, 'utf8');
|
100
|
+
}
|
101
|
+
|
102
|
+
if (!sourceMapData) {
|
103
|
+
return null;
|
104
|
+
}
|
105
|
+
|
106
|
+
return {
|
107
|
+
url: sourceMappingURL,
|
108
|
+
map: sourceMapData
|
109
|
+
};
|
110
|
+
}
|
111
|
+
|
112
|
+
function mapSourcePosition(position) {
|
113
|
+
var sourceMap = sourceMapCache[position.source];
|
114
|
+
if (!sourceMap) {
|
115
|
+
// Call the (overrideable) retrieveSourceMap function to get the source map.
|
116
|
+
var urlAndMap = retrieveSourceMap(position.source);
|
117
|
+
if (urlAndMap) {
|
118
|
+
sourceMap = sourceMapCache[position.source] = {
|
119
|
+
url: urlAndMap.url,
|
120
|
+
map: new SourceMapConsumer(urlAndMap.map)
|
121
|
+
};
|
122
|
+
|
123
|
+
// Load all sources stored inline with the source map into the file cache
|
124
|
+
// to pretend like they are already loaded. They may not exist on disk.
|
125
|
+
if (sourceMap.map.sourcesContent) {
|
126
|
+
sourceMap.map.sources.forEach(function(source, i) {
|
127
|
+
var contents = sourceMap.map.sourcesContent[i];
|
128
|
+
if (contents) {
|
129
|
+
var url = supportRelativeURL(sourceMap.url, source);
|
130
|
+
fileContentsCache[url] = contents;
|
131
|
+
}
|
132
|
+
});
|
133
|
+
}
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
// Resolve the source URL relative to the URL of the source map
|
138
|
+
if (sourceMap) {
|
139
|
+
var originalPosition = sourceMap.map.originalPositionFor(position);
|
140
|
+
|
141
|
+
// Only return the original position if a matching line was found. If no
|
142
|
+
// matching line is found then we return position instead, which will cause
|
143
|
+
// the stack trace to print the path and line for the compiled file. It is
|
144
|
+
// better to give a precise location in the compiled file than a vague
|
145
|
+
// location in the original file.
|
146
|
+
if (originalPosition.source !== null) {
|
147
|
+
originalPosition.source = supportRelativeURL(
|
148
|
+
sourceMap.url, originalPosition.source);
|
149
|
+
return originalPosition;
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
return position;
|
154
|
+
}
|
155
|
+
|
156
|
+
// Parses code generated by FormatEvalOrigin(), a function inside V8:
|
157
|
+
// https://code.google.com/p/v8/source/browse/trunk/src/messages.js
|
158
|
+
function mapEvalOrigin(origin) {
|
159
|
+
// Most eval() calls are in this format
|
160
|
+
var match = /^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(origin);
|
161
|
+
if (match) {
|
162
|
+
var position = mapSourcePosition({
|
163
|
+
source: match[2],
|
164
|
+
line: match[3],
|
165
|
+
column: match[4] - 1
|
166
|
+
});
|
167
|
+
return 'eval at ' + match[1] + ' (' + position.source + ':' +
|
168
|
+
position.line + ':' + (position.column + 1) + ')';
|
169
|
+
}
|
170
|
+
|
171
|
+
// Parse nested eval() calls using recursion
|
172
|
+
match = /^eval at ([^(]+) \((.+)\)$/.exec(origin);
|
173
|
+
if (match) {
|
174
|
+
return 'eval at ' + match[1] + ' (' + mapEvalOrigin(match[2]) + ')';
|
175
|
+
}
|
176
|
+
|
177
|
+
// Make sure we still return useful information if we didn't find anything
|
178
|
+
return origin;
|
179
|
+
}
|
180
|
+
|
181
|
+
// This is copied almost verbatim from the V8 source code at
|
182
|
+
// https://code.google.com/p/v8/source/browse/trunk/src/messages.js. The
|
183
|
+
// implementation of wrapCallSite() used to just forward to the actual source
|
184
|
+
// code of CallSite.prototype.toString but unfortunately a new release of V8
|
185
|
+
// did something to the prototype chain and broke the shim. The only fix I
|
186
|
+
// could find was copy/paste.
|
187
|
+
function CallSiteToString() {
|
188
|
+
var fileName;
|
189
|
+
var fileLocation = "";
|
190
|
+
if (this.isNative()) {
|
191
|
+
fileLocation = "native";
|
192
|
+
} else {
|
193
|
+
fileName = this.getScriptNameOrSourceURL();
|
194
|
+
if (!fileName && this.isEval()) {
|
195
|
+
fileLocation = this.getEvalOrigin();
|
196
|
+
fileLocation += ", "; // Expecting source position to follow.
|
197
|
+
}
|
198
|
+
|
199
|
+
if (fileName) {
|
200
|
+
fileLocation += fileName;
|
201
|
+
} else {
|
202
|
+
// Source code does not originate from a file and is not native, but we
|
203
|
+
// can still get the source position inside the source string, e.g. in
|
204
|
+
// an eval string.
|
205
|
+
fileLocation += "<anonymous>";
|
206
|
+
}
|
207
|
+
var lineNumber = this.getLineNumber();
|
208
|
+
if (lineNumber != null) {
|
209
|
+
fileLocation += ":" + lineNumber;
|
210
|
+
var columnNumber = this.getColumnNumber();
|
211
|
+
if (columnNumber) {
|
212
|
+
fileLocation += ":" + columnNumber;
|
213
|
+
}
|
214
|
+
}
|
215
|
+
}
|
216
|
+
|
217
|
+
var line = "";
|
218
|
+
var functionName = this.getFunctionName();
|
219
|
+
var addSuffix = true;
|
220
|
+
var isConstructor = this.isConstructor();
|
221
|
+
var isMethodCall = !(this.isToplevel() || isConstructor);
|
222
|
+
if (isMethodCall) {
|
223
|
+
var typeName = this.getTypeName();
|
224
|
+
var methodName = this.getMethodName();
|
225
|
+
if (functionName) {
|
226
|
+
if (typeName && functionName.indexOf(typeName) != 0) {
|
227
|
+
line += typeName + ".";
|
228
|
+
}
|
229
|
+
line += functionName;
|
230
|
+
if (methodName && functionName.indexOf("." + methodName) != functionName.length - methodName.length - 1) {
|
231
|
+
line += " [as " + methodName + "]";
|
232
|
+
}
|
233
|
+
} else {
|
234
|
+
line += typeName + "." + (methodName || "<anonymous>");
|
235
|
+
}
|
236
|
+
} else if (isConstructor) {
|
237
|
+
line += "new " + (functionName || "<anonymous>");
|
238
|
+
} else if (functionName) {
|
239
|
+
line += functionName;
|
240
|
+
} else {
|
241
|
+
line += fileLocation;
|
242
|
+
addSuffix = false;
|
243
|
+
}
|
244
|
+
if (addSuffix) {
|
245
|
+
line += " (" + fileLocation + ")";
|
246
|
+
}
|
247
|
+
return line;
|
248
|
+
}
|
249
|
+
|
250
|
+
function cloneCallSite(frame) {
|
251
|
+
var object = {};
|
252
|
+
Object.getOwnPropertyNames(Object.getPrototypeOf(frame)).forEach(function(name) {
|
253
|
+
object[name] = /^(?:is|get)/.test(name) ? function() { return frame[name].call(frame); } : frame[name];
|
254
|
+
});
|
255
|
+
object.toString = CallSiteToString;
|
256
|
+
return object;
|
257
|
+
}
|
258
|
+
|
259
|
+
function wrapCallSite(frame) {
|
260
|
+
// Most call sites will return the source file from getFileName(), but code
|
261
|
+
// passed to eval() ending in "//# sourceURL=..." will return the source file
|
262
|
+
// from getScriptNameOrSourceURL() instead
|
263
|
+
var source = frame.getFileName() || frame.getScriptNameOrSourceURL();
|
264
|
+
if (source) {
|
265
|
+
var position = mapSourcePosition({
|
266
|
+
source: source,
|
267
|
+
line: frame.getLineNumber(),
|
268
|
+
column: frame.getColumnNumber() - 1
|
269
|
+
});
|
270
|
+
frame = cloneCallSite(frame);
|
271
|
+
frame.getFileName = function() { return position.source; };
|
272
|
+
frame.getLineNumber = function() { return position.line; };
|
273
|
+
frame.getColumnNumber = function() { return position.column + 1; };
|
274
|
+
frame.getScriptNameOrSourceURL = function() { return position.source; };
|
275
|
+
return frame;
|
276
|
+
}
|
277
|
+
|
278
|
+
// Code called using eval() needs special handling
|
279
|
+
var origin = frame.isEval() && frame.getEvalOrigin();
|
280
|
+
if (origin) {
|
281
|
+
origin = mapEvalOrigin(origin);
|
282
|
+
frame = cloneCallSite(frame);
|
283
|
+
frame.getEvalOrigin = function() { return origin; };
|
284
|
+
return frame;
|
285
|
+
}
|
286
|
+
|
287
|
+
// If we get here then we were unable to change the source position
|
288
|
+
return frame;
|
289
|
+
}
|
290
|
+
|
291
|
+
// This function is part of the V8 stack trace API, for more info see:
|
292
|
+
// http://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
|
293
|
+
function prepareStackTrace(error, stack) {
|
294
|
+
if (emptyCacheBetweenOperations) {
|
295
|
+
fileContentsCache = {};
|
296
|
+
sourceMapCache = {};
|
297
|
+
}
|
298
|
+
return error + stack.map(function(frame) {
|
299
|
+
return '\n at ' + wrapCallSite(frame);
|
300
|
+
}).join('');
|
301
|
+
}
|
302
|
+
|
303
|
+
// Generate position and snippet of original source with pointer
|
304
|
+
function getErrorSource(error) {
|
305
|
+
var match = /\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(error.stack);
|
306
|
+
if (match) {
|
307
|
+
var source = match[1];
|
308
|
+
var line = +match[2];
|
309
|
+
var column = +match[3];
|
310
|
+
|
311
|
+
// Support the inline sourceContents inside the source map
|
312
|
+
var contents = fileContentsCache[source];
|
313
|
+
|
314
|
+
// Support files on disk
|
315
|
+
if (!contents && fs.existsSync(source)) {
|
316
|
+
contents = fs.readFileSync(source, 'utf8');
|
317
|
+
}
|
318
|
+
|
319
|
+
// Format the line from the original source code like node does
|
320
|
+
if (contents) {
|
321
|
+
var code = contents.split(/(?:\r\n|\r|\n)/)[line - 1];
|
322
|
+
if (code) {
|
323
|
+
return '\n' + source + ':' + line + '\n' + code + '\n' +
|
324
|
+
new Array(column).join(' ') + '^';
|
325
|
+
}
|
326
|
+
}
|
327
|
+
}
|
328
|
+
return null;
|
329
|
+
}
|
330
|
+
|
331
|
+
// Mimic node's stack trace printing when an exception escapes the process
|
332
|
+
function handleUncaughtExceptions(error) {
|
333
|
+
if (!error || !error.stack) {
|
334
|
+
console.log('Uncaught exception:', error);
|
335
|
+
} else {
|
336
|
+
var source = getErrorSource(error);
|
337
|
+
if (source !== null) console.log(source);
|
338
|
+
console.log(error.stack);
|
339
|
+
}
|
340
|
+
process.exit(1);
|
341
|
+
}
|
342
|
+
|
343
|
+
exports.wrapCallSite = wrapCallSite;
|
344
|
+
exports.getErrorSource = getErrorSource;
|
345
|
+
exports.mapSourcePosition = mapSourcePosition;
|
346
|
+
exports.retrieveSourceMap = retrieveSourceMap;
|
347
|
+
|
348
|
+
exports.install = function(options) {
|
349
|
+
if (!alreadyInstalled) {
|
350
|
+
alreadyInstalled = true;
|
351
|
+
Error.prepareStackTrace = prepareStackTrace;
|
352
|
+
|
353
|
+
// Configure options
|
354
|
+
options = options || {};
|
355
|
+
var installHandler = 'handleUncaughtExceptions' in options ?
|
356
|
+
options.handleUncaughtExceptions : true;
|
357
|
+
emptyCacheBetweenOperations = 'emptyCacheBetweenOperations' in options ?
|
358
|
+
options.emptyCacheBetweenOperations : false;
|
359
|
+
|
360
|
+
// Allow sources to be found by methods other than reading the files
|
361
|
+
// directly from disk.
|
362
|
+
if (options.retrieveFile)
|
363
|
+
retrieveFile = options.retrieveFile;
|
364
|
+
|
365
|
+
// Allow source maps to be found by methods other than reading the files
|
366
|
+
// directly from disk.
|
367
|
+
if (options.retrieveSourceMap)
|
368
|
+
retrieveSourceMap = options.retrieveSourceMap;
|
369
|
+
|
370
|
+
// Provide the option to not install the uncaught exception handler. This is
|
371
|
+
// to support other uncaught exception handlers (in test frameworks, for
|
372
|
+
// example). If this handler is not installed and there are no other uncaught
|
373
|
+
// exception handlers, uncaught exceptions will be caught by node's built-in
|
374
|
+
// exception handler and the process will still be terminated. However, the
|
375
|
+
// generated JavaScript code will be shown above the stack trace instead of
|
376
|
+
// the original source code.
|
377
|
+
if (installHandler && !isInBrowser()) {
|
378
|
+
process.on('uncaughtException', handleUncaughtExceptions);
|
379
|
+
}
|
380
|
+
}
|
381
|
+
};
|