summaryrefslogtreecommitdiff
path: root/deps/npm
diff options
context:
space:
mode:
authorKat Marchán <kzm@sykosomatic.org>2016-05-27 14:07:59 -0700
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2016-05-28 10:42:48 -0400
commitbd8b1ddb2007dcc8ec2a0a08e16208aa21b83400 (patch)
treeaab54a7bbc42e1477a8a2b175dfc9f9eb36ca9e2 /deps/npm
parent16f98e589c69ffe6283aa11493fd417368708557 (diff)
downloadandroid-node-v8-bd8b1ddb2007dcc8ec2a0a08e16208aa21b83400.tar.gz
android-node-v8-bd8b1ddb2007dcc8ec2a0a08e16208aa21b83400.tar.bz2
android-node-v8-bd8b1ddb2007dcc8ec2a0a08e16208aa21b83400.zip
deps: upgrade npm to 3.9.3
Contains the following npm releases: - v3.9.0: https://github.com/npm/npm/releases/tag/v3.9.0 - v3.9.1: https://github.com/npm/npm/releases/tag/v3.9.1 - v3.9.2: https://github.com/npm/npm/releases/tag/v3.9.2 - v3.9.3: https://github.com/npm/npm/releases/tag/v3.9.3 PR-URL: https://github.com/nodejs/node/pull/7030 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps/npm')
-rw-r--r--deps/npm/AUTHORS2
-rw-r--r--deps/npm/CHANGELOG.md288
-rw-r--r--deps/npm/appveyor.yml36
-rwxr-xr-xdeps/npm/bin/npm-cli.js1
-rw-r--r--deps/npm/doc/files/package.json.md10
-rw-r--r--deps/npm/doc/misc/npm-scripts.md3
-rw-r--r--deps/npm/html/doc/README.html2
-rw-r--r--deps/npm/html/doc/cli/npm-access.html2
-rw-r--r--deps/npm/html/doc/cli/npm-adduser.html2
-rw-r--r--deps/npm/html/doc/cli/npm-bin.html2
-rw-r--r--deps/npm/html/doc/cli/npm-bugs.html2
-rw-r--r--deps/npm/html/doc/cli/npm-build.html2
-rw-r--r--deps/npm/html/doc/cli/npm-bundle.html2
-rw-r--r--deps/npm/html/doc/cli/npm-cache.html2
-rw-r--r--deps/npm/html/doc/cli/npm-completion.html2
-rw-r--r--deps/npm/html/doc/cli/npm-config.html2
-rw-r--r--deps/npm/html/doc/cli/npm-dedupe.html2
-rw-r--r--deps/npm/html/doc/cli/npm-deprecate.html2
-rw-r--r--deps/npm/html/doc/cli/npm-dist-tag.html2
-rw-r--r--deps/npm/html/doc/cli/npm-docs.html2
-rw-r--r--deps/npm/html/doc/cli/npm-edit.html2
-rw-r--r--deps/npm/html/doc/cli/npm-explore.html2
-rw-r--r--deps/npm/html/doc/cli/npm-help-search.html2
-rw-r--r--deps/npm/html/doc/cli/npm-help.html2
-rw-r--r--deps/npm/html/doc/cli/npm-init.html2
-rw-r--r--deps/npm/html/doc/cli/npm-install-test.html2
-rw-r--r--deps/npm/html/doc/cli/npm-install.html2
-rw-r--r--deps/npm/html/doc/cli/npm-link.html2
-rw-r--r--deps/npm/html/doc/cli/npm-logout.html2
-rw-r--r--deps/npm/html/doc/cli/npm-ls.html4
-rw-r--r--deps/npm/html/doc/cli/npm-outdated.html2
-rw-r--r--deps/npm/html/doc/cli/npm-owner.html2
-rw-r--r--deps/npm/html/doc/cli/npm-pack.html2
-rw-r--r--deps/npm/html/doc/cli/npm-ping.html2
-rw-r--r--deps/npm/html/doc/cli/npm-prefix.html2
-rw-r--r--deps/npm/html/doc/cli/npm-prune.html2
-rw-r--r--deps/npm/html/doc/cli/npm-publish.html2
-rw-r--r--deps/npm/html/doc/cli/npm-rebuild.html2
-rw-r--r--deps/npm/html/doc/cli/npm-repo.html2
-rw-r--r--deps/npm/html/doc/cli/npm-restart.html2
-rw-r--r--deps/npm/html/doc/cli/npm-root.html2
-rw-r--r--deps/npm/html/doc/cli/npm-run-script.html2
-rw-r--r--deps/npm/html/doc/cli/npm-search.html2
-rw-r--r--deps/npm/html/doc/cli/npm-shrinkwrap.html2
-rw-r--r--deps/npm/html/doc/cli/npm-star.html2
-rw-r--r--deps/npm/html/doc/cli/npm-stars.html2
-rw-r--r--deps/npm/html/doc/cli/npm-start.html2
-rw-r--r--deps/npm/html/doc/cli/npm-stop.html2
-rw-r--r--deps/npm/html/doc/cli/npm-tag.html2
-rw-r--r--deps/npm/html/doc/cli/npm-team.html2
-rw-r--r--deps/npm/html/doc/cli/npm-test.html2
-rw-r--r--deps/npm/html/doc/cli/npm-uninstall.html2
-rw-r--r--deps/npm/html/doc/cli/npm-unpublish.html2
-rw-r--r--deps/npm/html/doc/cli/npm-update.html2
-rw-r--r--deps/npm/html/doc/cli/npm-version.html2
-rw-r--r--deps/npm/html/doc/cli/npm-view.html2
-rw-r--r--deps/npm/html/doc/cli/npm-whoami.html2
-rw-r--r--deps/npm/html/doc/cli/npm.html6
-rw-r--r--deps/npm/html/doc/files/npm-folders.html2
-rw-r--r--deps/npm/html/doc/files/npm-global.html2
-rw-r--r--deps/npm/html/doc/files/npm-json.html12
-rw-r--r--deps/npm/html/doc/files/npmrc.html2
-rw-r--r--deps/npm/html/doc/files/package.json.html12
-rw-r--r--deps/npm/html/doc/index.html2
-rw-r--r--deps/npm/html/doc/misc/npm-coding-style.html2
-rw-r--r--deps/npm/html/doc/misc/npm-config.html2
-rw-r--r--deps/npm/html/doc/misc/npm-developers.html2
-rw-r--r--deps/npm/html/doc/misc/npm-disputes.html8
-rw-r--r--deps/npm/html/doc/misc/npm-index.html2
-rw-r--r--deps/npm/html/doc/misc/npm-orgs.html2
-rw-r--r--deps/npm/html/doc/misc/npm-registry.html2
-rw-r--r--deps/npm/html/doc/misc/npm-scope.html2
-rw-r--r--deps/npm/html/doc/misc/npm-scripts.html5
-rw-r--r--deps/npm/html/doc/misc/removing-npm.html2
-rw-r--r--deps/npm/html/doc/misc/semver.html2
-rw-r--r--deps/npm/lib/access.js1
-rw-r--r--deps/npm/lib/cache/add-remote-git.js2
-rw-r--r--deps/npm/lib/cache/caching-client.js6
-rw-r--r--deps/npm/lib/completion.js4
-rw-r--r--deps/npm/lib/config/core.js3
-rw-r--r--deps/npm/lib/explore.js27
-rw-r--r--deps/npm/lib/fetch-package-metadata.js45
-rw-r--r--deps/npm/lib/install/action/extract.js5
-rw-r--r--deps/npm/lib/install/deps.js132
-rw-r--r--deps/npm/lib/install/inflate-shrinkwrap.js8
-rw-r--r--deps/npm/lib/ls.js11
-rw-r--r--deps/npm/lib/npm.js10
-rw-r--r--deps/npm/lib/unbuild.js2
-rw-r--r--deps/npm/lib/utils/completion/file-completion.js4
-rw-r--r--deps/npm/lib/utils/error-handler.js6
-rw-r--r--deps/npm/lib/utils/escape-arg.js27
-rw-r--r--deps/npm/lib/utils/escape-exec-path.js30
-rw-r--r--deps/npm/lib/utils/git.js6
-rw-r--r--deps/npm/lib/utils/is-windows-bash.js3
-rw-r--r--deps/npm/lib/utils/is-windows-shell.js4
-rw-r--r--deps/npm/lib/utils/is-windows.js2
-rw-r--r--deps/npm/lib/utils/lifecycle.js56
-rw-r--r--deps/npm/lib/utils/link.js16
-rw-r--r--deps/npm/lib/utils/module-name.js2
-rw-r--r--deps/npm/man/man1/npm-ls.12
-rw-r--r--deps/npm/man/man1/npm.12
-rw-r--r--deps/npm/man/man5/npm-json.510
-rw-r--r--deps/npm/man/man5/package.json.510
-rw-r--r--deps/npm/man/man7/npm-scripts.73
-rw-r--r--deps/npm/node_modules/fstream-npm/fstream-npm.js3
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/.npmignore1
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/example/basic.js13
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/index.js2
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore7
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml3
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile5
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md4
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js4
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js8
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json71
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js84
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json61
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json115
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.ignore2
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.npmignore1
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/00-setup.js70
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/basic.js28
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/common.js40
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/ignore-most.js41
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/nested-ignores.js51
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/read-file-order.js81
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/unignore-child.js38
-rw-r--r--deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/zz-cleanup.js10
-rw-r--r--deps/npm/node_modules/fstream-npm/package.json108
-rw-r--r--deps/npm/node_modules/graceful-fs/README.md84
-rw-r--r--deps/npm/node_modules/graceful-fs/package.json65
-rw-r--r--deps/npm/node_modules/hosted-git-info/.npmignore5
-rw-r--r--deps/npm/node_modules/hosted-git-info/.travis.yml5
-rw-r--r--deps/npm/node_modules/hosted-git-info/package.json112
-rw-r--r--deps/npm/node_modules/hosted-git-info/test/basic.js15
-rw-r--r--deps/npm/node_modules/hosted-git-info/test/bitbucket-https-with-embedded-auth.js27
-rw-r--r--deps/npm/node_modules/hosted-git-info/test/bitbucket.js23
-rw-r--r--deps/npm/node_modules/hosted-git-info/test/gist.js41
-rw-r--r--deps/npm/node_modules/hosted-git-info/test/github.js40
-rw-r--r--deps/npm/node_modules/hosted-git-info/test/gitlab.js23
-rw-r--r--deps/npm/node_modules/hosted-git-info/test/https-with-inline-auth.js39
-rw-r--r--deps/npm/node_modules/hosted-git-info/test/lib/standard-tests.js27
-rw-r--r--deps/npm/node_modules/inflight/package.json121
-rw-r--r--deps/npm/node_modules/inflight/test.js97
-rw-r--r--deps/npm/node_modules/init-package-json/init-package-json.js16
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore7
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml3
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile5
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md4
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js4
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js8
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json49
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js84
-rw-r--r--deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json41
-rw-r--r--deps/npm/node_modules/init-package-json/package.json79
-rw-r--r--deps/npm/node_modules/lodash._baseuniq/LICENSE64
-rw-r--r--deps/npm/node_modules/lodash._baseuniq/README.md4
-rw-r--r--deps/npm/node_modules/lodash._baseuniq/index.js632
-rw-r--r--deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/LICENSE64
-rw-r--r--deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/README.md4
-rw-r--r--deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/index.js110
-rw-r--r--deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/package.json22
-rw-r--r--deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._root/LICENSE (renamed from deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._setcache/LICENSE)0
-rw-r--r--deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._root/README.md18
-rw-r--r--deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._root/index.js59
-rw-r--r--deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._root/package.json (renamed from deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._setcache/package.json)44
-rw-r--r--deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._setcache/README.md18
-rw-r--r--deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._setcache/index.js588
-rw-r--r--deps/npm/node_modules/lodash._baseuniq/package.json40
-rw-r--r--deps/npm/node_modules/lodash.keys/README.md4
-rw-r--r--deps/npm/node_modules/lodash.keys/index.js41
-rw-r--r--deps/npm/node_modules/lodash.keys/package.json34
-rw-r--r--deps/npm/node_modules/lodash.union/README.md4
-rw-r--r--deps/npm/node_modules/lodash.union/index.js4
-rw-r--r--deps/npm/node_modules/lodash.union/node_modules/lodash._baseflatten/README.md4
-rw-r--r--deps/npm/node_modules/lodash.union/node_modules/lodash._baseflatten/index.js6
-rw-r--r--deps/npm/node_modules/lodash.union/node_modules/lodash._baseflatten/package.json16
-rw-r--r--deps/npm/node_modules/lodash.union/node_modules/lodash.rest/README.md4
-rw-r--r--deps/npm/node_modules/lodash.union/node_modules/lodash.rest/index.js73
-rw-r--r--deps/npm/node_modules/lodash.union/node_modules/lodash.rest/package.json20
-rw-r--r--deps/npm/node_modules/lodash.union/package.json32
-rw-r--r--deps/npm/node_modules/lodash.uniq/LICENSE64
-rw-r--r--deps/npm/node_modules/lodash.uniq/README.md4
-rw-r--r--deps/npm/node_modules/lodash.uniq/index.js13
-rw-r--r--deps/npm/node_modules/lodash.uniq/package.json38
-rw-r--r--deps/npm/node_modules/lodash.without/LICENSE64
-rw-r--r--deps/npm/node_modules/lodash.without/README.md4
-rw-r--r--deps/npm/node_modules/lodash.without/index.js45
-rw-r--r--deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/LICENSE64
-rw-r--r--deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/README.md4
-rw-r--r--deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/index.js632
-rw-r--r--deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._root/LICENSE (renamed from deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._setcache/LICENSE)0
-rw-r--r--deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._root/README.md18
-rw-r--r--deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._root/index.js59
-rw-r--r--deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._root/package.json (renamed from deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._setcache/package.json)40
-rw-r--r--deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._setcache/README.md18
-rw-r--r--deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._setcache/index.js588
-rw-r--r--deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/package.json34
-rw-r--r--deps/npm/node_modules/lodash.without/node_modules/lodash.rest/LICENSE29
-rw-r--r--deps/npm/node_modules/lodash.without/node_modules/lodash.rest/README.md4
-rw-r--r--deps/npm/node_modules/lodash.without/node_modules/lodash.rest/index.js160
-rw-r--r--deps/npm/node_modules/lodash.without/node_modules/lodash.rest/package.json38
-rw-r--r--deps/npm/node_modules/lodash.without/package.json38
-rw-r--r--deps/npm/node_modules/npm-package-arg/package.json16
-rw-r--r--deps/npm/node_modules/read-package-tree/package.json116
-rw-r--r--deps/npm/node_modules/read-package-tree/rpt.js158
-rw-r--r--deps/npm/node_modules/read-package-tree/test/symlinked-node-modules.js70
-rw-r--r--deps/npm/node_modules/readable-stream/README.md4
-rw-r--r--deps/npm/node_modules/readable-stream/coverage/lcov-report/base.css212
-rw-r--r--deps/npm/node_modules/readable-stream/coverage/lcov-report/index.html93
-rw-r--r--deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_duplex.js.html287
-rw-r--r--deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_passthrough.js.html140
-rw-r--r--deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_readable.js.html2741
-rw-r--r--deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_transform.js.html602
-rw-r--r--deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_writable.js.html1640
-rw-r--r--deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/index.html145
-rw-r--r--deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.css1
-rw-r--r--deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.js1
-rw-r--r--deps/npm/node_modules/readable-stream/coverage/lcov-report/sort-arrow-sprite.pngbin0 -> 209 bytes
-rw-r--r--deps/npm/node_modules/readable-stream/coverage/lcov-report/sorter.js158
-rw-r--r--deps/npm/node_modules/readable-stream/coverage/lcov.info1642
-rw-r--r--deps/npm/node_modules/readable-stream/doc/stream.md (renamed from deps/npm/node_modules/readable-stream/doc/stream.markdown)49
-rw-r--r--deps/npm/node_modules/readable-stream/lib/_stream_readable.js53
-rw-r--r--deps/npm/node_modules/readable-stream/lib/_stream_transform.js6
-rw-r--r--deps/npm/node_modules/readable-stream/lib/_stream_writable.js40
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/buffer-shims/index.js108
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/buffer-shims/license.md (renamed from deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/LICENCE)12
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/buffer-shims/package.json84
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/buffer-shims/readme.md21
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/index.js37
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/.travis.yml3
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/example/array.js14
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/example/keyword.js16
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/example/prompt.js49
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/index.js79
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.editorconfig7
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.gitattributes1
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.npmignore3
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.tern-project1
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.travis.yml2
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/AUTHORS38
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/LICENSE19
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/README.md377
-rwxr-xr-xdeps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/acorn54
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/build-acorn.js51
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/generate-identifier-regex.js47
-rwxr-xr-xdeps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/prepublish.sh2
-rwxr-xr-xdeps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/update_authors.sh6
-rwxr-xr-xdeps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/without_eval48
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/.keep0
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/acorn.js4014
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/acorn_csp.js3985
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/acorn_loose.js1298
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/walk.js342
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/package.json192
-rwxr-xr-xdeps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/expression.js697
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/identifier.js129
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/index.js75
-rwxr-xr-xdeps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/location.js68
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/acorn_loose.js0
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/expression.js511
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/index.js50
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/parseutil.js126
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/state.js17
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/statement.js419
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/tokenize.js108
-rwxr-xr-xdeps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/lval.js213
-rwxr-xr-xdeps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/node.js70
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/options.js118
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/parseutil.js89
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/state.js78
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/statement.js594
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/tokencontext.js107
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/tokenize.js672
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/tokentype.js142
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/util.js9
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/walk/index.js291
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/whitespace.js11
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/.npmignore3
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/LICENSE24
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/Makefile11
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/Readme.md29
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/component.json11
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/index.js21
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/package.json109
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/test.js152
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/README.md54
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/build/build.js208
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/component.json19
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/index.js3
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/package.json78
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/.editorconfig12
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/.jscs.json130
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/.npmignore1
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/.travis.yml60
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/CHANGELOG.md203
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/LICENSE21
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/README.md75
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/index.js128
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/isArguments.js17
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/package.json141
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/test/index.js5
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/package.json137
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/readme.markdown122
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/array.js35
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/async.js42
-rwxr-xr-xdeps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/bin/run.js5
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/custom-parser.js42
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/es6.js15
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/for.js30
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/inspect.js36
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/opts.js134
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/parent.js33
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/.npmignore3
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/LICENSE39
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/README.md132
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/.npmignore5
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/LICENSE18
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/README.md14
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/duplex.js1
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js89
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js46
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js982
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js210
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js386
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/README.md54
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/build/build.js208
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/component.json19
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/index.js3
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json78
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/package.json104
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/passthrough.js1
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/readable.js11
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/transform.js1
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/writable.js1
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/.npmignore1
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/Makefile4
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/README.md32
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/immutable.js19
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/mutable.js17
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/package.json109
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/test.js83
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/package.json94
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/through2.js96
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/package.json86
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/readme.md23
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/index.js39
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/package.json38
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/README.md72
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/index.js59
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/.npmignore3
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/README.md24
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/common.js58
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/evaluator.js364
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/package.json73
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/.editorconfig3
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/.npmignore2
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/.travis.yml15
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/LICENSE20
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/README.md143
-rwxr-xr-xdeps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/example/add-braces44
-rwxr-xr-xdeps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/example/generic-identity17
-rwxr-xr-xdeps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/example/identity8
-rwxr-xr-xdeps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/example/to-while84
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/comments.js351
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/fast-path.js477
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/lines.js878
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/mapping.js277
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/options.js95
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/parser.js152
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/patcher.js515
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/printer.js1802
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/types.js5
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/util.js283
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/main.js99
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/.npmignore2
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/.travis.yml20
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/LICENSE20
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/README.md489
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/babel.js105
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/core.js367
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/e4x.js84
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/es6.js217
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/es7.js36
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/esprima.js96
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/flow.js269
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/jsx.js100
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/mozilla.js49
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/equiv.js184
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/node-path.js474
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/path-visitor.js419
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/path.js366
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/scope.js330
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/shared.js41
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/types.js828
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/main.js34
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/package.json100
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/ChangeLog170
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/LICENSE.BSD21
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/README.md27
-rwxr-xr-xdeps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/bin/esparse.js126
-rwxr-xr-xdeps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/bin/esvalidate.js199
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/esprima.js5739
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/package.json145
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/.travis.yml6
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/LICENSE20
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/README.md246
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/package.json85
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/private.js129
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/test/run.js68
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/README.md729
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/dist/source-map.debug.js3006
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/dist/source-map.js3005
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/dist/source-map.min.js2
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/dist/source-map.min.js.map1
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/array-set.js104
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/base64-vlq.js141
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/base64.js68
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/binary-search.js112
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/mapping-list.js80
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/quick-sort.js115
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/source-map-consumer.js1082
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/source-map-generator.js396
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/source-node.js408
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/util.js369
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/package.json240
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/source-map.js8
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/package.json102
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/package.json94
-rw-r--r--deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/unreachableBranchTransformer.js97
-rw-r--r--deps/npm/node_modules/readable-stream/package.json59
-rw-r--r--deps/npm/node_modules/readable-stream/readable.js6
-rw-r--r--deps/npm/node_modules/realize-package-specifier/index.js4
-rw-r--r--deps/npm/node_modules/which/.npmignore3
-rw-r--r--deps/npm/node_modules/which/.travis.yml6
-rw-r--r--deps/npm/node_modules/which/CHANGELOG.md118
-rw-r--r--deps/npm/node_modules/which/changelog.sh9
-rw-r--r--deps/npm/node_modules/which/node_modules/is-absolute/LICENSE21
-rw-r--r--deps/npm/node_modules/which/node_modules/is-absolute/README.md53
-rw-r--r--deps/npm/node_modules/which/node_modules/is-absolute/index.js26
-rw-r--r--deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/LICENSE-MIT21
-rw-r--r--deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/README.md38
-rw-r--r--deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/index.js21
-rw-r--r--deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/package.json76
-rw-r--r--deps/npm/node_modules/which/node_modules/is-absolute/package.json76
-rw-r--r--deps/npm/node_modules/which/node_modules/isexe/LICENSE15
-rw-r--r--deps/npm/node_modules/which/node_modules/isexe/package.json24
-rw-r--r--deps/npm/node_modules/which/package.json63
-rw-r--r--deps/npm/node_modules/which/test/basic.js120
-rw-r--r--deps/npm/node_modules/which/test/bin.js119
-rw-r--r--deps/npm/node_modules/which/test/windows.js10
-rw-r--r--deps/npm/node_modules/which/which.js26
-rw-r--r--deps/npm/package.json32
-rw-r--r--deps/npm/test/common-tap.js35
-rw-r--r--deps/npm/test/fixtures/config/userconfig-with-gc22
-rw-r--r--deps/npm/test/tap/00-config-setup.js10
-rw-r--r--deps/npm/test/tap/bugs.js7
-rw-r--r--deps/npm/test/tap/builtin-config.js28
-rw-r--r--deps/npm/test/tap/bundled-dependencies-no-pkgjson.js47
-rw-r--r--deps/npm/test/tap/cache-ls-filenames.js51
-rw-r--r--deps/npm/test/tap/cache-shasum.js24
-rw-r--r--deps/npm/test/tap/check-permissions.js11
-rw-r--r--deps/npm/test/tap/config-basic.js39
-rw-r--r--deps/npm/test/tap/config-certfile.js3
-rw-r--r--deps/npm/test/tap/config-edit.js8
-rw-r--r--deps/npm/test/tap/dedupe-scoped.js14
-rw-r--r--deps/npm/test/tap/do-not-remove-other-bins.js4
-rw-r--r--deps/npm/test/tap/extraneous-dep-cycle-ls-ok.js2
-rw-r--r--deps/npm/test/tap/gently-rm-linked-module.js108
-rw-r--r--deps/npm/test/tap/gently-rm-symlinked-global-dir.js24
-rw-r--r--deps/npm/test/tap/git-cache-locking.js19
-rw-r--r--deps/npm/test/tap/git-cache-no-hooks.js36
-rw-r--r--deps/npm/test/tap/git-dependency-install-link.js9
-rw-r--r--deps/npm/test/tap/git-npmignore.js131
-rw-r--r--deps/npm/test/tap/github-shortcut.js8
-rw-r--r--deps/npm/test/tap/graceful-restart.js4
-rw-r--r--deps/npm/test/tap/install-bad-man.js2
-rw-r--r--deps/npm/test/tap/install-link-scripts.js6
-rw-r--r--deps/npm/test/tap/install-man.js2
-rw-r--r--deps/npm/test/tap/install-save-local.js4
-rw-r--r--deps/npm/test/tap/install-scoped-already-installed.js2
-rw-r--r--deps/npm/test/tap/install-scoped-link.js6
-rw-r--r--deps/npm/test/tap/legacy-bundled-git.js4
-rw-r--r--deps/npm/test/tap/legacy-missing-bindir.js4
-rw-r--r--deps/npm/test/tap/legacy-npm-self-install.js6
-rw-r--r--deps/npm/test/tap/legacy-test-package.js6
-rw-r--r--deps/npm/test/tap/legacy-url-dep.js2
-rw-r--r--deps/npm/test/tap/lifecycle-path.js43
-rw-r--r--deps/npm/test/tap/logout-scoped.js6
-rw-r--r--deps/npm/test/tap/logout.js6
-rw-r--r--deps/npm/test/tap/ls-l-depth-0.js2
-rw-r--r--deps/npm/test/tap/ls.js188
-rw-r--r--deps/npm/test/tap/no-global-warns.js25
-rw-r--r--deps/npm/test/tap/optional-metadep-rollback-collision.js8
-rw-r--r--deps/npm/test/tap/outdated-depth-deep.js71
-rw-r--r--deps/npm/test/tap/outdated-depth-integer.js3
-rw-r--r--deps/npm/test/tap/outdated.js2
-rw-r--r--deps/npm/test/tap/publish-access-unscoped-restricted-fails.js58
-rw-r--r--deps/npm/test/tap/publish-config.js2
-rw-r--r--deps/npm/test/tap/registry.js4
-rw-r--r--deps/npm/test/tap/repo.js26
-rw-r--r--deps/npm/test/tap/retry-on-stale-cache.js195
-rw-r--r--deps/npm/test/tap/scripts-whitespace-windows.js4
-rw-r--r--deps/npm/test/tap/shrinkwrap-nested.js153
-rw-r--r--deps/npm/test/tap/shrinkwrap-version-match.js124
-rw-r--r--deps/npm/test/tap/sorted-package-json.js47
-rw-r--r--deps/npm/test/tap/spawn-enoent-help.js2
-rw-r--r--deps/npm/test/tap/symlink-cycle.js2
-rw-r--r--deps/npm/test/tap/umask-lifecycle.js14
-rw-r--r--deps/npm/test/tap/unit-child-path.js11
-rw-r--r--deps/npm/test/tap/unit-gentlyrm.js140
-rw-r--r--deps/npm/test/tap/unit-link.js281
-rw-r--r--deps/npm/test/tap/unpack-foreign-tarball.js3
-rw-r--r--deps/npm/test/tap/unpublish-config.js2
-rw-r--r--deps/npm/test/tap/verify-no-lifecycle-on-repo.js27
-rw-r--r--deps/npm/test/tap/version-lifecycle.js54
-rw-r--r--deps/npm/test/tap/version-update-shrinkwrap.js14
517 files changed, 13754 insertions, 52654 deletions
diff --git a/deps/npm/AUTHORS b/deps/npm/AUTHORS
index 1793a43860..2a76de5f20 100644
--- a/deps/npm/AUTHORS
+++ b/deps/npm/AUTHORS
@@ -396,3 +396,5 @@ Steve Mao <maochenyan@gmail.com>
Anna Henningsen <anna@addaleax.net>
Rachel Evans <git@rve.org.uk>
Sam Minnee <sam@silverstripe.com>
+Zirak <zirakertan@gmail.com>
+Daniel Lupu <lupu.daniel.f@gmail.com>
diff --git a/deps/npm/CHANGELOG.md b/deps/npm/CHANGELOG.md
index a0475830c9..20a42d1676 100644
--- a/deps/npm/CHANGELOG.md
+++ b/deps/npm/CHANGELOG.md
@@ -1,3 +1,289 @@
+### v3.9.3 (2016-05-19):
+
+This week continues our `big-bug` squashing adventure! Things are churning along
+nicely, and we've gotten a lot of fantastic contributions from the community.
+Please keep it up!
+
+A quick note on last week's release: We had a small `npm shrinkwrap`-related
+crasher in `npm@3.9.1`, so once this release goes out, `v3.9.2` is going to be
+`npm@latest`. Please update if you ended up in with that previous version!
+
+Remember we have a weekly team meeting, and you can [suggest agenda items in the
+GitHub issue](https://github.com/npm/npm/issues/12761). Keep an eye out for the
+`#npmweekly` tag on Twitter, too, and join the conversation! We'll do our best
+to address questions y'all send us. ✌
+
+#### FIXES
+
+* [`42d71be`](https://github.com/npm/npm/commit/42d71be2cec674dd9e860ad414f53184f667620d)
+ [#12685](https://github.com/npm/npm/pull/12685)
+ When using `npm ls <pkg>` without a semver specifier, `npm ls` would skip
+ any packages in your tree that matched by name, but had a prerelease version
+ in their `package.json`. This patch fixes it so `npm ls` does a simple name
+ match unless you use the `npm ls <pkg>@<version>` format.
+ ([@zkat](https://github.com/zkat))
+* [`c698ae6`](https://github.com/npm/npm/commit/c698ae666afc92fbc0fcba3c082cfa9b34a4420d)
+ [#12685](https://github.com/npm/npm/pull/12685)
+ Added some tests for more basic `npm ls` functionality.
+ ([@zkat](https://github.com/zkat))
+
+### NOTABLE DEPENDENCY UPDATES
+
+* [`3a6fe23`](https://github.com/npm/npm/commit/3a6fe2373c45e80a1f28aaf176d552f6f97cf131)
+ [npm/fstream-npm#17](https://github.com/npm/fstream-npm/pull/17)
+ `fstream-npm@1.1.0`:
+ `fstream-npm` always includes NOTICE files now.
+ ([@kemitchell](https://github.com/kemitchell))
+* [`df04e05`](https://github.com/npm/npm/commit/df04e05af1f257a1903372e1baf334c0969fbdbd)
+ [#10013](https://github.com/npm/npm/issues/10013)
+ `read-package-tree@5.1.4`:
+ Fixes an issue where `npm install` would fail if your `node_modules` was
+ symlinked.
+ ([@iarna](https://github.com/iarna))
+* [`584676f`](https://github.com/npm/npm/commit/584676f85eaebcb9d6c4d70d2ad320be8a8d6a74)
+ [npm/init-package-json#62](https://github.com/npm/init-package-json/pull/62)
+ `init-package-json@1.9.4`:
+ Stop using `package` for a variable, which defeats some bundlers and linters.
+ ([@adius](https://github.com/adius))
+* [`935a7e3`](https://github.com/npm/npm/commit/935a7e359535e13924934811b77924cbad82619a)
+ `readable-stream@2.1.3`:
+ Node 6 build and buffer-related updates.
+ ([@calvinmetcalf](https://github.com/calvinmetcalf))
+
+#### OTHER DEPENDENCY UPDATES
+
+* [`4c4609e`](https://github.com/npm/npm/commit/4c4609ea49e77303f9d72af6757620e6b3a9a6a9)
+ `inflight@1.0.5`
+ ([@zkat](https://github.com/zkat))
+* [`7a3030d`](https://github.com/npm/npm/commit/7a3030d3d44ea2136425f72950ba22e6efd441d9)
+ `hosted-git-info@2.1.5`
+ ([@zkat](https://github.com/zkat))
+* [`5ed4b58`](https://github.com/npm/npm/commit/5ed4b58409eeb134bca1c96252682fd7600d9906)
+ `which@1.2.9`
+ ([@isaacs](https://github.com/isaacs))
+
+### v3.9.2 (2016-05-17)
+
+This is a quick patch release. The previous release, 3.9.1, introduced a
+bug where npm would crash given a combination of specific package tree on
+disk and a shrinkwrap.
+
+* [`cde367f`](https://github.com/npm/npm/commit/cde367fbb6eebc5db68a44b12a5c7bea158d70db)
+ [#12724](https://github.com/npm/npm/issues/12724)
+ Fix crasher when inflating shrinkwraps with packages on disk that were
+ installed by older npm versions.
+ ([@iarna](https://github.com/iarna))
+
+### v3.9.1 (2016-05-12)
+
+HI all! We have bug fixes to a couple of the hairy corners of `npm`, in the
+form of shrinkwraps and bundled dependencies. Plus some documentation improvements
+and our lodash deps bot a bump.
+
+This is our first week really focused on getting the
+[big bugs](https://github.com/npm/npm/issues?q=is%3Aopen+is%3Aissue+label:big-bug)
+list down. Our work from this week will be landing next week, and I can't
+wait to tell you about that! (It's about symlinks!)
+
+#### SHRINKWRAP FIX
+
+* [`b894413`](https://github.com/npm/npm/commit/b8944139a935680c4a267468bb2d3c3082b5609f)
+ [#12372](https://github.com/npm/npm/issues/12372)
+ Changing a nested dependency in an `npm-shrinkwrap.json` and then running `npm install`
+ would not get up the updated package. This corrects that.
+ ([@misterbyrne](https://github.com/misterbyrne))
+
+#### BUNDLED DEPENDENCIES FIX
+
+* [`d0c6d19`](https://github.com/npm/npm/commit/d0c6d194471be8ce3e7b41b744b24f63dd1a3f6f)
+ [#12476](https://github.com/npm/npm/pull/12476)
+ Protects against a crasher when a bundled dep is missing a package.json.
+ ([@dflupu](https://github.com/dflupu))
+
+#### DOCS IMPROVEMENTS
+
+* [`6699aa5`](https://github.com/npm/npm/commit/6699aa53c0a729cfc921ac1d8107c320e5a5ac95)
+ [#12585](https://github.com/npm/npm/pull/12585)
+ Document that engineStrict is quite gone. Not "deprecated" so much as "extirpated".
+ ([@othiym23](https://github.com/othiym23))
+* [`7a41a84`](https://github.com/npm/npm/commit/7a41a84b655be3204d2e80848278a510e42c80e7)
+ [#12636](https://github.com/npm/npm/pull/12636)
+ Improve `npm-scripts` documentation regarding when `node-gyp` is used.
+ ([@reconbot](https://github.com/reconbot))
+* [`4c4b4ba`](https://github.com/npm/npm/commit/4c4b4badf09b9b50cdca85314429a0111bb35cb1)
+ [#12586](https://github.com/npm/npm/pull/12586)
+ Correct `package.json` documentation as to when `node-gyp rebuild` called.
+ This now matches https://docs.npmjs.com/misc/scripts#default-values
+ ([@reconbot](https://github.com/reconbot))
+
+#### DEPENDENCY UPDATES
+
+* [`cfa797f`](https://github.com/npm/npm/commit/cfa797fedd34696d45b61e3ae0398407afece880)
+ `lodash._baseuniq@4.6.0`
+ ([@jdalton](https://github.com/jdalton))
+* [`ab6f180`](https://github.com/npm/npm/commit/ab6f1801971b513f9294b4b8902034ab402af02d)
+ `lodash.keys@4.0.7`
+ ([@jdalton](https://github.com/jdalton))
+* [`4b8d8b6`](https://github.com/npm/npm/commit/4b8d8b63e760a8aa03e8bffa974495dfafbfcb06)
+ `lodash.union@4.4.0`
+ ([@jdalton](https://github.com/jdalton))
+* [`46099d3`](https://github.com/npm/npm/commit/46099d34542760098e5d13c7468a405a724ca407)
+ `lodash.uniq@4.3.0`
+ ([@jdalton](https://github.com/jdalton))
+* [`fff89c6`](https://github.com/npm/npm/commit/fff89c6826c86e9e789adcc9c398385539306042)
+ `lodash.without@4.2.0`
+ ([@jdalton](https://github.com/jdalton))
+
+### v3.9.0 (2016-05-05)
+
+Wow! This is a big release week! We've completed the fixes that let the
+test suite pass on Windows, plus more general bug fixes we found while
+fixing things on Windows. Plus a warning to help folks work around a common
+footgun. PLUS an improvement to how npm works with long cache timeouts.
+
+#### INFINITE CACHE A LITTLE BETTER
+
+* [`111ae3e`](https://github.com/npm/npm/commit/111ae3ec366ece7ebcf5988f5bc2a7cd70737dfe)
+ [#8581](https://github.com/npm/npm/issues/8581)
+ When a package is fetched from the cache which cannot satisfy the version
+ requirements, an attempt to fetch it from the network is made. This is
+ helpful for folks using high values for `--cache-min` who are willing to
+ accept possibly not-the-most-recent modules in return for less network
+ traffic.
+ ([@Zirak](https://github.com/Zirak))
+
+#### WARNING: FOOTGUN
+
+* [`60b9a05`](https://github.com/npm/npm/commit/60b9a051aa46b8892fe63b3681839a6fd6642bfd)
+ [#12475](https://github.com/npm/npm/pull/12475)
+ Options can only start with ASCII dashes. Ordinarily this isn't a problem
+ but many web documentation tools "helpfully" convert `--` into an emdash
+ (–), or `-` into an endash (–). If you copy and paste from this documentation
+ your commands won't work the way you expect. This adds a warning that tries
+ to be a little more descriptive about why your command is failing.
+ ([@iarna](https://github.com/iarna))
+
+#### WINDOWS CI
+
+We have [Windows CI](https://ci.appveyor.com/project/npm/npm) setup now! We still have to
+tweak it a little bit around paths to the git binaries, but it's otherwise ready!
+
+* [`bb5d6cb`](https://github.com/npm/npm/commit/bb5d6cbf46b2609243d3b384caadd196e665a797)
+ [#11444](https://github.com/npm/npm/pull/11444)
+ Add AppVeyor to CI matrix.
+ ([@othiym23](https://github.com/othiym23))
+
+#### COVERAGE DATA
+
+Not only do our tests produce coverage reports after they run now, we also
+automatically [update Coveralls](https://coveralls.io/github/npm/npm) with
+results from [Travis CI](travis-ci.org/npm/npm) runs.
+
+* [`044cbab`](https://github.com/npm/npm/commit/044cbab0d49adeeb0d9310c64fee6c9759cc7428)
+ [#11444](https://github.com/npm/npm/pull/11444)
+ Enable coverage reporting for every test run.
+ ([@othiym23](https://github.com/othiym23))
+
+#### EVERYONE BUGS
+
+* [`37c6a51`](https://github.com/npm/npm/commit/37c6a51c71b0feec8f639b3199a8a9172e58deec)
+ [#12150](https://github.com/npm/npm/pull/12150)
+ Ensure that 'npm cache ls' outputs real filenames. Previously it would
+ sometimes double up the package name in the path it printed.
+ ([@isaacs](https://github.com/isaacs))
+* [`d3ce0b2`](https://github.com/npm/npm/commit/d3ce0b253eb519375071aee29db4ee129dbcdf5c)
+ [#11444](https://github.com/npm/npm/pull/11444)
+ Fix unbuilding bins for scoped modules.
+ ([@iarna](https://github.com/iarna))
+* [`e928a30`](https://github.com/npm/npm/commit/e928a30947477a09245f54e9381f46b97bee32d5)
+ [#11444](https://github.com/npm/npm/pull/11444)
+ Make handling of local modules (eg `npm install /path/to/my/module`) more
+ consistent when saved to a `package.json`. There were bugs previously where
+ it wouldn't consistently resolve relative paths in the same way.
+ ([@iarna](https://github.com/iarna))
+* [`b820ed4`](https://github.com/npm/npm/commit/b820ed4fc04e21577fa66f7c9482b5ab002e7985)
+ [#11444](https://github.com/npm/npm/pull/11444)
+ Under certain circumstances the paths produced for linking, either
+ relative or absolute, would end up basing off the wrong virtual cwd.
+ This resulted in failures for `npm link` in this situations.
+ ([@iarna](https://github.com/iarna))
+
+#### WINDOWS BUGS
+
+* [`7380425`](https://github.com/npm/npm/commit/7380425d810fb8bfc69405a9cbbdec19978a7bee)
+ [#11444](https://github.com/npm/npm/pull/11444)
+ Scoped module names were not being correctly inferred from the path on Windows.
+ ([@zkat](https://github.com/zkat))
+* [`91fc24f`](https://github.com/npm/npm/commit/91fc24f2763c2e0591093099ffc866c735f27fde)
+ [#11444](https://github.com/npm/npm/pull/11444)
+ Explore with a command to run didn't work properly in Windows– it would pop open a new
+ cmd window and leave it there.
+ ([@iarna](https://github.com/iarna))
+
+#### WINDOWS REFACTORING
+
+* [`f07e643`](https://github.com/npm/npm/commit/f07e6430d4ca02f811138f6140a8bad927607a1f)
+ [#11444](https://github.com/npm/npm/pull/11444)
+ Move exec path escaping out to its own function. This turns out to be
+ tricky to get right because how you escape commands to run on Windows via
+ cmd is different then how you escape them at other times. Specifically,
+ you HAVE to quote each directory segment that has a quote in it, that is:
+ `C:\"Program Files"\MyApp\MyApp.exe` By contrast, if that were an argument
+ to a command being run, you CAN'T DO quote it that way, instead you have
+ to wrap the entire path in quotes, like so: `"C:\Program
+ Files\MyApp\MyApp.exe"`.
+ ([@iarna](https://github.com/iarna))
+* [`2e01d29`](https://github.com/npm/npm/commit/2e01d299f8244134b1aa040cab1b59c72c9df4da)
+ [#11444](https://github.com/npm/npm/pull/11444)
+ Create a single function for detecting if we're running on Windows (and
+ using a Windows shell like cmd) and use this instead of doing it one-off
+ all over the place.
+ ([@iarna](https://github.com/iarna))
+
+#### FIX WINDOWS TESTS
+
+As I said before, our tests are passing on Windows! 🎉
+
+* [`ef0dd74`](https://github.com/npm/npm/commit/ef0dd74583be25c72343ed07d1127e4d0cc02df9)
+ [#11444](https://github.com/npm/npm/pull/11444)
+ The fruits of many weeks of labor, fix our tests to pass on Windows.
+ ([@zkat](https://github.com/zkat))
+ ([@iarna](https://github.com/iarna))
+
+#### DEPENDENCY UPDATES
+
+* [`8fccda8`](https://github.com/npm/npm/commit/8fccda8587209659c469ab55c608b0e2d7533530)
+ [#11444](https://github.com/npm/npm/pull/11444)
+ `normalize-git-url@3.0.2`:
+ Fix file URLs on Windows.
+ ([@zkat](https://github.com/zkat))
+* [`f53a154`](https://github.com/npm/npm/commit/f53a154df8e0696623e6a71f33e0a7c11a7555aa)
+ `readable-stream@2.1.2`:
+ When readable-stream is disabled, reuse result of `require('stream')`
+ instead of calling it every time.
+ ([@calvinmetcalf](https://github.com/calvinmetcalf))
+* [`02841cf`](https://github.com/npm/npm/commit/02841cfb81d6ba86f691ab43d9bbdac29aec27e7)
+ [#11444](https://github.com/npm/npm/pull/11444)
+ `realize-package-specifier@3.0.2`:
+ Resolve local package paths relative to package root, not cwd.
+ ([@zkat](https://github.com/zkat))
+ ([@iarna](https://github.com/iarna))
+* [`247c1c5`](https://github.com/npm/npm/commit/247c1c5ae08c882c9232ca605731039168bae6ed)
+ [#11444](https://github.com/npm/npm/pull/11444)
+ `npm-package-arg@4.1.1`:
+ Fix Windows file URIs with leading slashes.
+ ([@zkat](https://github.com/zkat))
+* [`365c72b`](https://github.com/npm/npm/commit/365c72bc3ecd9e45f9649725dd635d5625219d8c)
+ `which@1.2.8`
+ ([@isaacs](https://github.com/isaacs))
+* [`e568caa`](https://github.com/npm/npm/commit/e568caabb8390a924ce1cfa51fc914ee6c1637a2)
+ `graceful-fs@4.1.4`
+ ([@isaacs](https://github.com/isaacs))
+* [`304b974`](https://github.com/npm/npm/commit/304b97434959a58f84383bcccc0357c51a4eb39a)
+ [#11444](https://github.com/npm/npm/pull/11444)
+ `standard@6.0.8`
+ ([@feross](https://github.com/feross))
+
### v3.8.9 (2016-04-28)
Our biggest news this week is that we got the
@@ -2412,7 +2698,7 @@ in line with `npm@2`.
* [`95ee92c`](https://github.com/npm/npm/commit/95ee92c)
[#9433](https://github.com/npm/npm/issues/9433)
- Give better error messages for invalid urls in the dependecy
+ Give better error messages for invalid URLs in the dependecy
list.
([@jamietre](https://github.com/jamietre))
diff --git a/deps/npm/appveyor.yml b/deps/npm/appveyor.yml
new file mode 100644
index 0000000000..47d806df34
--- /dev/null
+++ b/deps/npm/appveyor.yml
@@ -0,0 +1,36 @@
+environment:
+ matrix:
+ # LTS is our most important target
+ - nodejs_version: "4"
+ # latest
+ - nodejs_version: "5"
+ # I like 0.10 better than 0.12
+ - nodejs_version: "0.10"
+ - nodejs_version: "0.12"
+ # EOL summer 2016, most likely
+ - nodejs_version: "0.8"
+ COVERALLS_REPO_TOKEN:
+ secure: XdC0aySefK0HLh1GNk6aKrzZPbCfPQLyA4mYtFGEp4DrTuZA/iuCUS0LDqFYO8JQ
+platform:
+ - x86
+ - x64
+install:
+ - ps: Install-Product node $env:nodejs_version $env:platform
+ - npm config set spin false
+ - npm rebuild
+ - node . install -g .
+ - set "PATH=%APPDATA%\npm;C:\Program Files\Git\mingw64\libexec;%PATH%"
+ - npm install --loglevel=http
+test_script:
+ - node --version
+ - npm --version
+ - npm test
+notifications:
+- provider: Slack
+ incoming_webhook:
+ secure: vXiG5AgpqxJsXZ0N0CTYDuVrX6RMjBybZKtOx6IbRxCyjgd+DAx6Z9/0XgYQjuof7QFJY3M/U6HxaREQVYbNVHA+C5N5dNALRbKzAC8QNbA=
+# GO_FAST
+matrix:
+ fast_finish: true
+# we don't need the builds, we just need tests
+build: off
diff --git a/deps/npm/bin/npm-cli.js b/deps/npm/bin/npm-cli.js
index 2346feba47..55fa054d66 100755
--- a/deps/npm/bin/npm-cli.js
+++ b/deps/npm/bin/npm-cli.js
@@ -1,6 +1,5 @@
#!/usr/bin/env node
;(function () { // wrapper in case we're in module_context mode
-
// windows: running "npm blah" in this folder will invoke WSH, not node.
/*global WScript*/
if (typeof WScript !== 'undefined') {
diff --git a/deps/npm/doc/files/package.json.md b/deps/npm/doc/files/package.json.md
index 15cba2b7df..af7fb8a536 100644
--- a/deps/npm/doc/files/package.json.md
+++ b/deps/npm/doc/files/package.json.md
@@ -654,10 +654,10 @@ field is advisory only will produce warnings when your package is installed as a
## engineStrict
-**This feature was deprecated with npm 3.0.0**
+**This feature was removed in npm 3.0.0**
Prior to npm 3.0.0, this feature was used to treat this package as if the
-user had set `engine-strict`.
+user had set `engine-strict`. It is no longer used.
## os
@@ -731,10 +731,10 @@ npm will default some values based on package contents.
If there is a `server.js` file in the root of your package, then npm
will default the `start` command to `node server.js`.
-* `"scripts":{"preinstall": "node-gyp rebuild"}`
+* `"scripts":{"install": "node-gyp rebuild"}`
- If there is a `binding.gyp` file in the root of your package, npm will
- default the `preinstall` command to compile using node-gyp.
+ If there is a `binding.gyp` file in the root of your package and you have not defined an `install` or `preinstall` script, npm will
+ default the `install` command to compile using node-gyp.
* `"contributors": [...]`
diff --git a/deps/npm/doc/misc/npm-scripts.md b/deps/npm/doc/misc/npm-scripts.md
index e7f0f0c4e3..3164715d98 100644
--- a/deps/npm/doc/misc/npm-scripts.md
+++ b/deps/npm/doc/misc/npm-scripts.md
@@ -71,7 +71,8 @@ npm will default some script values based on package contents.
* `"install": "node-gyp rebuild"`:
- If there is a `binding.gyp` file in the root of your package, npm will
+ If there is a `binding.gyp` file in the root of your package and you
+ haven't defined your own `install` or `preinstall` scripts, npm will
default the `install` command to compile using node-gyp.
## USER
diff --git a/deps/npm/html/doc/README.html b/deps/npm/html/doc/README.html
index bc00a45f08..d8a75cce97 100644
--- a/deps/npm/html/doc/README.html
+++ b/deps/npm/html/doc/README.html
@@ -126,5 +126,5 @@ will no doubt tell you to put the output in a gist or email.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@3.8.9</p>
+<p id="footer"><a href="../doc/README.html">README</a> &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-access.html b/deps/npm/html/doc/cli/npm-access.html
index 7c440d8b03..1ba078beb9 100644
--- a/deps/npm/html/doc/cli/npm-access.html
+++ b/deps/npm/html/doc/cli/npm-access.html
@@ -84,5 +84,5 @@ with an HTTP 402 status code (logically enough), unless you use
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-access &mdash; npm@3.8.9</p>
+<p id="footer">npm-access &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-adduser.html b/deps/npm/html/doc/cli/npm-adduser.html
index 6e98920109..e6135b2d24 100644
--- a/deps/npm/html/doc/cli/npm-adduser.html
+++ b/deps/npm/html/doc/cli/npm-adduser.html
@@ -72,5 +72,5 @@ over any global configuration.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-adduser &mdash; npm@3.8.9</p>
+<p id="footer">npm-adduser &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-bin.html b/deps/npm/html/doc/cli/npm-bin.html
index 169066e35c..f838c7ec04 100644
--- a/deps/npm/html/doc/cli/npm-bin.html
+++ b/deps/npm/html/doc/cli/npm-bin.html
@@ -35,5 +35,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-bin &mdash; npm@3.8.9</p>
+<p id="footer">npm-bin &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-bugs.html b/deps/npm/html/doc/cli/npm-bugs.html
index 7c19ab81fa..43e6ad0a00 100644
--- a/deps/npm/html/doc/cli/npm-bugs.html
+++ b/deps/npm/html/doc/cli/npm-bugs.html
@@ -55,5 +55,5 @@ a <code>package.json</code> in the current folder and use the <code>name</code>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-bugs &mdash; npm@3.8.9</p>
+<p id="footer">npm-bugs &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-build.html b/deps/npm/html/doc/cli/npm-build.html
index c049a5970a..29dc60289d 100644
--- a/deps/npm/html/doc/cli/npm-build.html
+++ b/deps/npm/html/doc/cli/npm-build.html
@@ -40,5 +40,5 @@ directly, run:</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-build &mdash; npm@3.8.9</p>
+<p id="footer">npm-build &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-bundle.html b/deps/npm/html/doc/cli/npm-bundle.html
index adf4984324..5bb20102c8 100644
--- a/deps/npm/html/doc/cli/npm-bundle.html
+++ b/deps/npm/html/doc/cli/npm-bundle.html
@@ -31,5 +31,5 @@ install packages into the local space.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-bundle &mdash; npm@3.8.9</p>
+<p id="footer">npm-bundle &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-cache.html b/deps/npm/html/doc/cli/npm-cache.html
index ff8e909533..fcf9fa3b0c 100644
--- a/deps/npm/html/doc/cli/npm-cache.html
+++ b/deps/npm/html/doc/cli/npm-cache.html
@@ -81,5 +81,5 @@ they do not make an HTTP request to the registry.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-cache &mdash; npm@3.8.9</p>
+<p id="footer">npm-cache &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-completion.html b/deps/npm/html/doc/cli/npm-completion.html
index 18c53c4bf1..7b78e9e468 100644
--- a/deps/npm/html/doc/cli/npm-completion.html
+++ b/deps/npm/html/doc/cli/npm-completion.html
@@ -43,5 +43,5 @@ completions based on the arguments.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-completion &mdash; npm@3.8.9</p>
+<p id="footer">npm-completion &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-config.html b/deps/npm/html/doc/cli/npm-config.html
index 6ba2140103..7495ef9a3b 100644
--- a/deps/npm/html/doc/cli/npm-config.html
+++ b/deps/npm/html/doc/cli/npm-config.html
@@ -67,5 +67,5 @@ global config.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-config &mdash; npm@3.8.9</p>
+<p id="footer">npm-config &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-dedupe.html b/deps/npm/html/doc/cli/npm-dedupe.html
index ee21a8813b..58b4be2955 100644
--- a/deps/npm/html/doc/cli/npm-dedupe.html
+++ b/deps/npm/html/doc/cli/npm-dedupe.html
@@ -61,5 +61,5 @@ result in new modules being installed.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-dedupe &mdash; npm@3.8.9</p>
+<p id="footer">npm-dedupe &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-deprecate.html b/deps/npm/html/doc/cli/npm-deprecate.html
index 34031e1c12..2ee07776d9 100644
--- a/deps/npm/html/doc/cli/npm-deprecate.html
+++ b/deps/npm/html/doc/cli/npm-deprecate.html
@@ -38,5 +38,5 @@ something like this:</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-deprecate &mdash; npm@3.8.9</p>
+<p id="footer">npm-deprecate &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-dist-tag.html b/deps/npm/html/doc/cli/npm-dist-tag.html
index 9bfb253b18..5938cbc315 100644
--- a/deps/npm/html/doc/cli/npm-dist-tag.html
+++ b/deps/npm/html/doc/cli/npm-dist-tag.html
@@ -87,5 +87,5 @@ begin with a number or the letter <code>v</code>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-dist-tag &mdash; npm@3.8.9</p>
+<p id="footer">npm-dist-tag &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-docs.html b/deps/npm/html/doc/cli/npm-docs.html
index 440c2968ec..221da6b9a5 100644
--- a/deps/npm/html/doc/cli/npm-docs.html
+++ b/deps/npm/html/doc/cli/npm-docs.html
@@ -56,5 +56,5 @@ the current folder and use the <code>name</code> property.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-docs &mdash; npm@3.8.9</p>
+<p id="footer">npm-docs &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-edit.html b/deps/npm/html/doc/cli/npm-edit.html
index 53a6628580..2303e31e7c 100644
--- a/deps/npm/html/doc/cli/npm-edit.html
+++ b/deps/npm/html/doc/cli/npm-edit.html
@@ -49,5 +49,5 @@ or <code>&quot;notepad&quot;</code> on Windows.</li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-edit &mdash; npm@3.8.9</p>
+<p id="footer">npm-edit &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-explore.html b/deps/npm/html/doc/cli/npm-explore.html
index 3df5851dd5..dc369cc353 100644
--- a/deps/npm/html/doc/cli/npm-explore.html
+++ b/deps/npm/html/doc/cli/npm-explore.html
@@ -49,5 +49,5 @@ Windows</li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-explore &mdash; npm@3.8.9</p>
+<p id="footer">npm-explore &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-help-search.html b/deps/npm/html/doc/cli/npm-help-search.html
index dfcfc0d613..251d15f1ae 100644
--- a/deps/npm/html/doc/cli/npm-help-search.html
+++ b/deps/npm/html/doc/cli/npm-help-search.html
@@ -45,5 +45,5 @@ where the terms were found in the documentation.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-help-search &mdash; npm@3.8.9</p>
+<p id="footer">npm-help-search &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-help.html b/deps/npm/html/doc/cli/npm-help.html
index 9f7c503b02..16aa7f74c0 100644
--- a/deps/npm/html/doc/cli/npm-help.html
+++ b/deps/npm/html/doc/cli/npm-help.html
@@ -50,5 +50,5 @@ matches are equivalent to specifying a topic name.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-help &mdash; npm@3.8.9</p>
+<p id="footer">npm-help &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-init.html b/deps/npm/html/doc/cli/npm-init.html
index 8ec506cb0d..8378206733 100644
--- a/deps/npm/html/doc/cli/npm-init.html
+++ b/deps/npm/html/doc/cli/npm-init.html
@@ -48,5 +48,5 @@ defaults and not prompt you for any options.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-init &mdash; npm@3.8.9</p>
+<p id="footer">npm-init &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-install-test.html b/deps/npm/html/doc/cli/npm-install-test.html
index 31b2360d2f..9b8f31b37e 100644
--- a/deps/npm/html/doc/cli/npm-install-test.html
+++ b/deps/npm/html/doc/cli/npm-install-test.html
@@ -42,4 +42,4 @@ takes exactly the same arguments as <code>npm install</code>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-install-test &mdash; npm@3.8.9</p>
+<p id="footer">npm-install-test &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-install.html b/deps/npm/html/doc/cli/npm-install.html
index 19433d8ddb..d0d91f6574 100644
--- a/deps/npm/html/doc/cli/npm-install.html
+++ b/deps/npm/html/doc/cli/npm-install.html
@@ -312,5 +312,5 @@ affects a real use-case, it will be investigated.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-install &mdash; npm@3.8.9</p>
+<p id="footer">npm-install &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-link.html b/deps/npm/html/doc/cli/npm-link.html
index 171d15d02b..b059f3d24b 100644
--- a/deps/npm/html/doc/cli/npm-link.html
+++ b/deps/npm/html/doc/cli/npm-link.html
@@ -73,5 +73,5 @@ include that scope, e.g.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-link &mdash; npm@3.8.9</p>
+<p id="footer">npm-link &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-logout.html b/deps/npm/html/doc/cli/npm-logout.html
index 5bfb0614b3..e941a8e64d 100644
--- a/deps/npm/html/doc/cli/npm-logout.html
+++ b/deps/npm/html/doc/cli/npm-logout.html
@@ -51,5 +51,5 @@ it takes precedence.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-logout &mdash; npm@3.8.9</p>
+<p id="footer">npm-logout &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-ls.html b/deps/npm/html/doc/cli/npm-ls.html
index 8054e28c1a..6e0645ba50 100644
--- a/deps/npm/html/doc/cli/npm-ls.html
+++ b/deps/npm/html/doc/cli/npm-ls.html
@@ -21,7 +21,7 @@ installed, as well as their dependencies, in a tree-structure.</p>
limit the results to only the paths to the packages named. Note that
nested packages will <em>also</em> show the paths to the specified packages.
For example, running <code>npm ls promzard</code> in npm&#39;s source tree will show:</p>
-<pre><code>npm@3.8.9 /path/to/npm
+<pre><code>npm@3.9.3 /path/to/npm
└─┬ init-package-json@0.0.4
└── promzard@0.1.5
</code></pre><p>It will print out extraneous, missing, and invalid packages.</p>
@@ -104,5 +104,5 @@ project.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-ls &mdash; npm@3.8.9</p>
+<p id="footer">npm-ls &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-outdated.html b/deps/npm/html/doc/cli/npm-outdated.html
index 44adfcf8c3..d1abeec7c9 100644
--- a/deps/npm/html/doc/cli/npm-outdated.html
+++ b/deps/npm/html/doc/cli/npm-outdated.html
@@ -116,5 +116,5 @@ project.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-outdated &mdash; npm@3.8.9</p>
+<p id="footer">npm-outdated &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-owner.html b/deps/npm/html/doc/cli/npm-owner.html
index 6128be0aed..ca54bbd494 100644
--- a/deps/npm/html/doc/cli/npm-owner.html
+++ b/deps/npm/html/doc/cli/npm-owner.html
@@ -51,5 +51,5 @@ that is not implemented at this time.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-owner &mdash; npm@3.8.9</p>
+<p id="footer">npm-owner &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-pack.html b/deps/npm/html/doc/cli/npm-pack.html
index 6231908218..331f878363 100644
--- a/deps/npm/html/doc/cli/npm-pack.html
+++ b/deps/npm/html/doc/cli/npm-pack.html
@@ -41,5 +41,5 @@ overwritten the second time.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-pack &mdash; npm@3.8.9</p>
+<p id="footer">npm-pack &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-ping.html b/deps/npm/html/doc/cli/npm-ping.html
index cd427f7daf..d99f3a785a 100644
--- a/deps/npm/html/doc/cli/npm-ping.html
+++ b/deps/npm/html/doc/cli/npm-ping.html
@@ -32,4 +32,4 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-ping &mdash; npm@3.8.9</p>
+<p id="footer">npm-ping &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-prefix.html b/deps/npm/html/doc/cli/npm-prefix.html
index 6590641892..705cb7ef6e 100644
--- a/deps/npm/html/doc/cli/npm-prefix.html
+++ b/deps/npm/html/doc/cli/npm-prefix.html
@@ -38,5 +38,5 @@ to contain a package.json file unless <code>-g</code> is also specified.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-prefix &mdash; npm@3.8.9</p>
+<p id="footer">npm-prefix &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-prune.html b/deps/npm/html/doc/cli/npm-prune.html
index 2056b1e8c5..ad6df58f94 100644
--- a/deps/npm/html/doc/cli/npm-prune.html
+++ b/deps/npm/html/doc/cli/npm-prune.html
@@ -40,5 +40,5 @@ negate <code>NODE_ENV</code> being set to <code>production</code>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-prune &mdash; npm@3.8.9</p>
+<p id="footer">npm-prune &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-publish.html b/deps/npm/html/doc/cli/npm-publish.html
index fc55ae4a8c..510934dd93 100644
--- a/deps/npm/html/doc/cli/npm-publish.html
+++ b/deps/npm/html/doc/cli/npm-publish.html
@@ -72,5 +72,5 @@ it is removed with <a href="../cli/npm-unpublish.html">npm-unpublish(1)</a>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-publish &mdash; npm@3.8.9</p>
+<p id="footer">npm-publish &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-rebuild.html b/deps/npm/html/doc/cli/npm-rebuild.html
index 7d010cf146..7aa72125c9 100644
--- a/deps/npm/html/doc/cli/npm-rebuild.html
+++ b/deps/npm/html/doc/cli/npm-rebuild.html
@@ -35,5 +35,5 @@ the new binary.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-rebuild &mdash; npm@3.8.9</p>
+<p id="footer">npm-rebuild &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-repo.html b/deps/npm/html/doc/cli/npm-repo.html
index 2cb9c62624..415a6fc26c 100644
--- a/deps/npm/html/doc/cli/npm-repo.html
+++ b/deps/npm/html/doc/cli/npm-repo.html
@@ -41,5 +41,5 @@ a <code>package.json</code> in the current folder and use the <code>name</code>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-repo &mdash; npm@3.8.9</p>
+<p id="footer">npm-repo &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-restart.html b/deps/npm/html/doc/cli/npm-restart.html
index 85c870f2d2..5ca681c9dc 100644
--- a/deps/npm/html/doc/cli/npm-restart.html
+++ b/deps/npm/html/doc/cli/npm-restart.html
@@ -53,5 +53,5 @@ behavior will be accompanied by an increase in major version number</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-restart &mdash; npm@3.8.9</p>
+<p id="footer">npm-restart &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-root.html b/deps/npm/html/doc/cli/npm-root.html
index 3a551f9f64..ba312bdfa6 100644
--- a/deps/npm/html/doc/cli/npm-root.html
+++ b/deps/npm/html/doc/cli/npm-root.html
@@ -35,5 +35,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-root &mdash; npm@3.8.9</p>
+<p id="footer">npm-root &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-run-script.html b/deps/npm/html/doc/cli/npm-run-script.html
index d22c8a7533..598b7658e4 100644
--- a/deps/npm/html/doc/cli/npm-run-script.html
+++ b/deps/npm/html/doc/cli/npm-run-script.html
@@ -63,5 +63,5 @@ you will be given a warning to run <code>npm install</code>, just in case you&#3
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-run-script &mdash; npm@3.8.9</p>
+<p id="footer">npm-run-script &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-search.html b/deps/npm/html/doc/cli/npm-search.html
index 2398f8e98b..55ccade815 100644
--- a/deps/npm/html/doc/cli/npm-search.html
+++ b/deps/npm/html/doc/cli/npm-search.html
@@ -57,5 +57,5 @@ Pass a different registry url such as the default above in order to override thi
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-search &mdash; npm@3.8.9</p>
+<p id="footer">npm-search &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-shrinkwrap.html b/deps/npm/html/doc/cli/npm-shrinkwrap.html
index 1154c1d554..25d8744b0f 100644
--- a/deps/npm/html/doc/cli/npm-shrinkwrap.html
+++ b/deps/npm/html/doc/cli/npm-shrinkwrap.html
@@ -169,5 +169,5 @@ contents rather than versions.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-shrinkwrap &mdash; npm@3.8.9</p>
+<p id="footer">npm-shrinkwrap &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-star.html b/deps/npm/html/doc/cli/npm-star.html
index 3707e36ea8..87229093b5 100644
--- a/deps/npm/html/doc/cli/npm-star.html
+++ b/deps/npm/html/doc/cli/npm-star.html
@@ -36,5 +36,5 @@ a vaguely positive way to show that you care.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-star &mdash; npm@3.8.9</p>
+<p id="footer">npm-star &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-stars.html b/deps/npm/html/doc/cli/npm-stars.html
index dd81cc8500..f1aa3beeb1 100644
--- a/deps/npm/html/doc/cli/npm-stars.html
+++ b/deps/npm/html/doc/cli/npm-stars.html
@@ -36,5 +36,5 @@ you will most certainly enjoy this command.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-stars &mdash; npm@3.8.9</p>
+<p id="footer">npm-stars &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-start.html b/deps/npm/html/doc/cli/npm-start.html
index f3b8c1e93d..591d0c4da4 100644
--- a/deps/npm/html/doc/cli/npm-start.html
+++ b/deps/npm/html/doc/cli/npm-start.html
@@ -39,5 +39,5 @@ more details.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-start &mdash; npm@3.8.9</p>
+<p id="footer">npm-start &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-stop.html b/deps/npm/html/doc/cli/npm-stop.html
index 5b17fbe4f1..4ec953de40 100644
--- a/deps/npm/html/doc/cli/npm-stop.html
+++ b/deps/npm/html/doc/cli/npm-stop.html
@@ -34,5 +34,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-stop &mdash; npm@3.8.9</p>
+<p id="footer">npm-stop &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-tag.html b/deps/npm/html/doc/cli/npm-tag.html
index 5bde83752a..edf98f585c 100644
--- a/deps/npm/html/doc/cli/npm-tag.html
+++ b/deps/npm/html/doc/cli/npm-tag.html
@@ -63,5 +63,5 @@ that do not begin with a number or the letter <code>v</code>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-tag &mdash; npm@3.8.9</p>
+<p id="footer">npm-tag &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-team.html b/deps/npm/html/doc/cli/npm-team.html
index 9c800024dc..b3a481f9f3 100644
--- a/deps/npm/html/doc/cli/npm-team.html
+++ b/deps/npm/html/doc/cli/npm-team.html
@@ -67,4 +67,4 @@ use the <code>npm access</code> command to grant or revoke the appropriate permi
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-team &mdash; npm@3.8.9</p>
+<p id="footer">npm-team &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-test.html b/deps/npm/html/doc/cli/npm-test.html
index 8b087f522f..755d319cd5 100644
--- a/deps/npm/html/doc/cli/npm-test.html
+++ b/deps/npm/html/doc/cli/npm-test.html
@@ -38,5 +38,5 @@ true.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-test &mdash; npm@3.8.9</p>
+<p id="footer">npm-test &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-uninstall.html b/deps/npm/html/doc/cli/npm-uninstall.html
index bcba8719ce..93c940af07 100644
--- a/deps/npm/html/doc/cli/npm-uninstall.html
+++ b/deps/npm/html/doc/cli/npm-uninstall.html
@@ -60,5 +60,5 @@ npm uninstall dtrace-provider --save-optional
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-uninstall &mdash; npm@3.8.9</p>
+<p id="footer">npm-uninstall &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-unpublish.html b/deps/npm/html/doc/cli/npm-unpublish.html
index e326472db8..ea5e2c53b6 100644
--- a/deps/npm/html/doc/cli/npm-unpublish.html
+++ b/deps/npm/html/doc/cli/npm-unpublish.html
@@ -47,5 +47,5 @@ package again, a new version number must be used.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-unpublish &mdash; npm@3.8.9</p>
+<p id="footer">npm-unpublish &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-update.html b/deps/npm/html/doc/cli/npm-update.html
index 3fc761c639..76af599fd1 100644
--- a/deps/npm/html/doc/cli/npm-update.html
+++ b/deps/npm/html/doc/cli/npm-update.html
@@ -118,5 +118,5 @@ be <em>downgraded</em>.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-update &mdash; npm@3.8.9</p>
+<p id="footer">npm-update &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-version.html b/deps/npm/html/doc/cli/npm-version.html
index 124e48157d..4baf12a64d 100644
--- a/deps/npm/html/doc/cli/npm-version.html
+++ b/deps/npm/html/doc/cli/npm-version.html
@@ -100,5 +100,5 @@ and tag up to the server, and deletes the <code>build/temp</code> directory.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-version &mdash; npm@3.8.9</p>
+<p id="footer">npm-version &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-view.html b/deps/npm/html/doc/cli/npm-view.html
index c2e626905c..714c32e6ae 100644
--- a/deps/npm/html/doc/cli/npm-view.html
+++ b/deps/npm/html/doc/cli/npm-view.html
@@ -86,5 +86,5 @@ the field name.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-view &mdash; npm@3.8.9</p>
+<p id="footer">npm-view &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm-whoami.html b/deps/npm/html/doc/cli/npm-whoami.html
index 03488a3852..7932350fbc 100644
--- a/deps/npm/html/doc/cli/npm-whoami.html
+++ b/deps/npm/html/doc/cli/npm-whoami.html
@@ -33,5 +33,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-whoami &mdash; npm@3.8.9</p>
+<p id="footer">npm-whoami &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/cli/npm.html b/deps/npm/html/doc/cli/npm.html
index cb8ad46157..9fb7db821e 100644
--- a/deps/npm/html/doc/cli/npm.html
+++ b/deps/npm/html/doc/cli/npm.html
@@ -13,7 +13,7 @@
<h2 id="synopsis">SYNOPSIS</h2>
<pre><code>npm &lt;command&gt; [args]
</code></pre><h2 id="version">VERSION</h2>
-<p>3.8.9</p>
+<p>3.9.3</p>
<h2 id="description">DESCRIPTION</h2>
<p>npm is the package manager for the Node JavaScript platform. It puts
modules in place so that node can find them, and manages dependency
@@ -126,7 +126,7 @@ will no doubt tell you to put the output in a gist or email.</p>
<p><a href="http://blog.izs.me/">Isaac Z. Schlueter</a> ::
<a href="https://github.com/isaacs/">isaacs</a> ::
<a href="http://twitter.com/izs">@izs</a> ::
-<a href="&#x6d;&#97;&#105;&#108;&#116;&#x6f;&#x3a;&#105;&#64;&#105;&#x7a;&#x73;&#x2e;&#x6d;&#101;">&#105;&#64;&#105;&#x7a;&#x73;&#x2e;&#x6d;&#101;</a></p>
+<a href="&#109;&#x61;&#x69;&#108;&#116;&#x6f;&#x3a;&#x69;&#64;&#105;&#122;&#115;&#x2e;&#x6d;&#101;">&#x69;&#64;&#105;&#122;&#115;&#x2e;&#x6d;&#101;</a></p>
<h2 id="see-also">SEE ALSO</h2>
<ul>
<li><a href="../cli/npm-help.html">npm-help(1)</a></li>
@@ -150,5 +150,5 @@ will no doubt tell you to put the output in a gist or email.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm &mdash; npm@3.8.9</p>
+<p id="footer">npm &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/files/npm-folders.html b/deps/npm/html/doc/files/npm-folders.html
index 382a76b19d..edbff8120c 100644
--- a/deps/npm/html/doc/files/npm-folders.html
+++ b/deps/npm/html/doc/files/npm-folders.html
@@ -182,5 +182,5 @@ cannot be found elsewhere. See <code><a href="../files/package.json.html">packa
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-folders &mdash; npm@3.8.9</p>
+<p id="footer">npm-folders &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/files/npm-global.html b/deps/npm/html/doc/files/npm-global.html
index 382a76b19d..edbff8120c 100644
--- a/deps/npm/html/doc/files/npm-global.html
+++ b/deps/npm/html/doc/files/npm-global.html
@@ -182,5 +182,5 @@ cannot be found elsewhere. See <code><a href="../files/package.json.html">packa
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-folders &mdash; npm@3.8.9</p>
+<p id="footer">npm-folders &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/files/npm-json.html b/deps/npm/html/doc/files/npm-json.html
index f64867d4bc..abad06ab89 100644
--- a/deps/npm/html/doc/files/npm-json.html
+++ b/deps/npm/html/doc/files/npm-json.html
@@ -494,9 +494,9 @@ are capable of properly installing your program. For example:</p>
</code></pre><p>Unless the user has set the <code>engine-strict</code> config flag, this
field is advisory only will produce warnings when your package is installed as a dependency.</p>
<h2 id="enginestrict">engineStrict</h2>
-<p><strong>This feature was deprecated with npm 3.0.0</strong></p>
+<p><strong>This feature was removed in npm 3.0.0</strong></p>
<p>Prior to npm 3.0.0, this feature was used to treat this package as if the
-user had set <code>engine-strict</code>.</p>
+user had set <code>engine-strict</code>. It is no longer used.</p>
<h2 id="os">os</h2>
<p>You can specify which operating systems your
module will run on:</p>
@@ -544,9 +544,9 @@ overridden.</p>
<p>If there is a <code>server.js</code> file in the root of your package, then npm
will default the <code>start</code> command to <code>node server.js</code>.</p>
</li>
-<li><p><code>&quot;scripts&quot;:{&quot;preinstall&quot;: &quot;node-gyp rebuild&quot;}</code></p>
-<p>If there is a <code>binding.gyp</code> file in the root of your package, npm will
-default the <code>preinstall</code> command to compile using node-gyp.</p>
+<li><p><code>&quot;scripts&quot;:{&quot;install&quot;: &quot;node-gyp rebuild&quot;}</code></p>
+<p>If there is a <code>binding.gyp</code> file in the root of your package and you have not defined an <code>install</code> or <code>preinstall</code> script, npm will
+default the <code>install</code> command to compile using node-gyp.</p>
</li>
<li><p><code>&quot;contributors&quot;: [...]</code></p>
<p>If there is an <code>AUTHORS</code> file in the root of your package, npm will
@@ -579,5 +579,5 @@ ignored.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">package.json &mdash; npm@3.8.9</p>
+<p id="footer">package.json &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/files/npmrc.html b/deps/npm/html/doc/files/npmrc.html
index 603df70296..14a406d25c 100644
--- a/deps/npm/html/doc/files/npmrc.html
+++ b/deps/npm/html/doc/files/npmrc.html
@@ -83,5 +83,5 @@ manner.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npmrc &mdash; npm@3.8.9</p>
+<p id="footer">npmrc &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/files/package.json.html b/deps/npm/html/doc/files/package.json.html
index f64867d4bc..abad06ab89 100644
--- a/deps/npm/html/doc/files/package.json.html
+++ b/deps/npm/html/doc/files/package.json.html
@@ -494,9 +494,9 @@ are capable of properly installing your program. For example:</p>
</code></pre><p>Unless the user has set the <code>engine-strict</code> config flag, this
field is advisory only will produce warnings when your package is installed as a dependency.</p>
<h2 id="enginestrict">engineStrict</h2>
-<p><strong>This feature was deprecated with npm 3.0.0</strong></p>
+<p><strong>This feature was removed in npm 3.0.0</strong></p>
<p>Prior to npm 3.0.0, this feature was used to treat this package as if the
-user had set <code>engine-strict</code>.</p>
+user had set <code>engine-strict</code>. It is no longer used.</p>
<h2 id="os">os</h2>
<p>You can specify which operating systems your
module will run on:</p>
@@ -544,9 +544,9 @@ overridden.</p>
<p>If there is a <code>server.js</code> file in the root of your package, then npm
will default the <code>start</code> command to <code>node server.js</code>.</p>
</li>
-<li><p><code>&quot;scripts&quot;:{&quot;preinstall&quot;: &quot;node-gyp rebuild&quot;}</code></p>
-<p>If there is a <code>binding.gyp</code> file in the root of your package, npm will
-default the <code>preinstall</code> command to compile using node-gyp.</p>
+<li><p><code>&quot;scripts&quot;:{&quot;install&quot;: &quot;node-gyp rebuild&quot;}</code></p>
+<p>If there is a <code>binding.gyp</code> file in the root of your package and you have not defined an <code>install</code> or <code>preinstall</code> script, npm will
+default the <code>install</code> command to compile using node-gyp.</p>
</li>
<li><p><code>&quot;contributors&quot;: [...]</code></p>
<p>If there is an <code>AUTHORS</code> file in the root of your package, npm will
@@ -579,5 +579,5 @@ ignored.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">package.json &mdash; npm@3.8.9</p>
+<p id="footer">package.json &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/index.html b/deps/npm/html/doc/index.html
index 47ec351d52..7a3b07647e 100644
--- a/deps/npm/html/doc/index.html
+++ b/deps/npm/html/doc/index.html
@@ -162,5 +162,5 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-index &mdash; npm@3.8.9</p>
+<p id="footer">npm-index &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/misc/npm-coding-style.html b/deps/npm/html/doc/misc/npm-coding-style.html
index c30d6200f1..a1c314795f 100644
--- a/deps/npm/html/doc/misc/npm-coding-style.html
+++ b/deps/npm/html/doc/misc/npm-coding-style.html
@@ -153,5 +153,5 @@ set to anything.&quot;</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-coding-style &mdash; npm@3.8.9</p>
+<p id="footer">npm-coding-style &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/misc/npm-config.html b/deps/npm/html/doc/misc/npm-config.html
index 82612bff67..81da576c69 100644
--- a/deps/npm/html/doc/misc/npm-config.html
+++ b/deps/npm/html/doc/misc/npm-config.html
@@ -862,5 +862,5 @@ exit successfully.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-config &mdash; npm@3.8.9</p>
+<p id="footer">npm-config &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/misc/npm-developers.html b/deps/npm/html/doc/misc/npm-developers.html
index d2c690a8e8..07e7de3c0b 100644
--- a/deps/npm/html/doc/misc/npm-developers.html
+++ b/deps/npm/html/doc/misc/npm-developers.html
@@ -194,5 +194,5 @@ from a fresh checkout.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-developers &mdash; npm@3.8.9</p>
+<p id="footer">npm-developers &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/misc/npm-disputes.html b/deps/npm/html/doc/misc/npm-disputes.html
index 245b8d62e4..6db1b489b6 100644
--- a/deps/npm/html/doc/misc/npm-disputes.html
+++ b/deps/npm/html/doc/misc/npm-disputes.html
@@ -13,7 +13,7 @@
<h2 id="synopsis">SYNOPSIS</h2>
<ol>
<li>Get the author email with <code>npm owner ls &lt;pkgname&gt;</code></li>
-<li>Email the author, CC <a href="&#109;&#x61;&#105;&#x6c;&#x74;&#111;&#x3a;&#115;&#x75;&#112;&#112;&#111;&#x72;&#116;&#64;&#110;&#x70;&#109;&#106;&#115;&#46;&#99;&#111;&#x6d;">&#115;&#x75;&#112;&#112;&#111;&#x72;&#116;&#64;&#110;&#x70;&#109;&#106;&#115;&#46;&#99;&#111;&#x6d;</a></li>
+<li>Email the author, CC <a href="&#109;&#97;&#x69;&#108;&#x74;&#111;&#x3a;&#x73;&#117;&#112;&#x70;&#111;&#114;&#x74;&#x40;&#x6e;&#x70;&#109;&#x6a;&#115;&#x2e;&#99;&#x6f;&#109;">&#x73;&#117;&#112;&#x70;&#111;&#114;&#x74;&#x40;&#x6e;&#x70;&#109;&#x6a;&#115;&#x2e;&#99;&#x6f;&#109;</a></li>
<li>After a few weeks, if there&#39;s no resolution, we&#39;ll sort it out.</li>
</ol>
<p>Don&#39;t squat on package names. Publish code or move out of the way.</p>
@@ -51,12 +51,12 @@ Joe&#39;s appropriate course of action in each case is the same.</p>
owner (Bob).</li>
<li>Joe emails Bob, explaining the situation <strong>as respectfully as
possible</strong>, and what he would like to do with the module name. He
-adds the npm support staff <a href="&#109;&#x61;&#x69;&#x6c;&#116;&#111;&#58;&#x73;&#x75;&#x70;&#x70;&#111;&#x72;&#x74;&#64;&#110;&#x70;&#109;&#106;&#x73;&#46;&#99;&#111;&#109;">&#x73;&#x75;&#x70;&#x70;&#111;&#x72;&#x74;&#64;&#110;&#x70;&#109;&#106;&#x73;&#46;&#99;&#111;&#109;</a> to the CC list of
+adds the npm support staff <a href="&#109;&#x61;&#105;&#x6c;&#116;&#x6f;&#58;&#115;&#117;&#112;&#x70;&#x6f;&#114;&#116;&#x40;&#x6e;&#112;&#109;&#106;&#115;&#x2e;&#x63;&#x6f;&#109;">&#115;&#117;&#112;&#x70;&#x6f;&#114;&#116;&#x40;&#x6e;&#112;&#109;&#106;&#115;&#x2e;&#x63;&#x6f;&#109;</a> to the CC list of
the email. Mention in the email that Bob can run <code>npm owner add
joe foo</code> to add Joe as an owner of the <code>foo</code> package.</li>
<li>After a reasonable amount of time, if Bob has not responded, or if
Bob and Joe can&#39;t come to any sort of resolution, email support
-<a href="&#x6d;&#97;&#105;&#108;&#x74;&#111;&#x3a;&#x73;&#x75;&#x70;&#x70;&#x6f;&#x72;&#x74;&#x40;&#x6e;&#x70;&#109;&#x6a;&#115;&#46;&#x63;&#x6f;&#x6d;">&#x73;&#x75;&#x70;&#x70;&#x6f;&#x72;&#x74;&#x40;&#x6e;&#x70;&#109;&#x6a;&#115;&#46;&#x63;&#x6f;&#x6d;</a> and we&#39;ll sort it out. (&quot;Reasonable&quot; is
+<a href="&#109;&#97;&#x69;&#x6c;&#116;&#x6f;&#58;&#115;&#x75;&#x70;&#112;&#x6f;&#114;&#116;&#64;&#110;&#112;&#109;&#106;&#115;&#x2e;&#99;&#111;&#x6d;">&#115;&#x75;&#x70;&#112;&#x6f;&#114;&#116;&#64;&#110;&#112;&#109;&#106;&#115;&#x2e;&#99;&#111;&#x6d;</a> and we&#39;ll sort it out. (&quot;Reasonable&quot; is
usually at least 4 weeks, but extra time is allowed around common
holidays.)</li>
</ol>
@@ -112,5 +112,5 @@ things into it.</li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-disputes &mdash; npm@3.8.9</p>
+<p id="footer">npm-disputes &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/misc/npm-index.html b/deps/npm/html/doc/misc/npm-index.html
index 8ca630d3e6..88bd599dba 100644
--- a/deps/npm/html/doc/misc/npm-index.html
+++ b/deps/npm/html/doc/misc/npm-index.html
@@ -162,4 +162,4 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-index &mdash; npm@3.8.9</p>
+<p id="footer">npm-index &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/misc/npm-orgs.html b/deps/npm/html/doc/misc/npm-orgs.html
index 98b8ca0fb4..d038adea8b 100644
--- a/deps/npm/html/doc/misc/npm-orgs.html
+++ b/deps/npm/html/doc/misc/npm-orgs.html
@@ -86,4 +86,4 @@
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-orgs &mdash; npm@3.8.9</p>
+<p id="footer">npm-orgs &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/misc/npm-registry.html b/deps/npm/html/doc/misc/npm-registry.html
index 363a1528ef..4de51caf8f 100644
--- a/deps/npm/html/doc/misc/npm-registry.html
+++ b/deps/npm/html/doc/misc/npm-registry.html
@@ -70,5 +70,5 @@ effectively implement the entire CouchDB API anyway.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-registry &mdash; npm@3.8.9</p>
+<p id="footer">npm-registry &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/misc/npm-scope.html b/deps/npm/html/doc/misc/npm-scope.html
index 98e9b5901f..4e60189a90 100644
--- a/deps/npm/html/doc/misc/npm-scope.html
+++ b/deps/npm/html/doc/misc/npm-scope.html
@@ -91,5 +91,5 @@ that registry instead.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-scope &mdash; npm@3.8.9</p>
+<p id="footer">npm-scope &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/misc/npm-scripts.html b/deps/npm/html/doc/misc/npm-scripts.html
index 6ba0c93fd0..eacb44166d 100644
--- a/deps/npm/html/doc/misc/npm-scripts.html
+++ b/deps/npm/html/doc/misc/npm-scripts.html
@@ -74,7 +74,8 @@ other system tools on the target machines.</li>
will default the <code>start</code> command to <code>node server.js</code>.</p>
</li>
<li><p><code>&quot;install&quot;: &quot;node-gyp rebuild&quot;</code>:</p>
-<p>If there is a <code>binding.gyp</code> file in the root of your package, npm will
+<p>If there is a <code>binding.gyp</code> file in the root of your package and you
+haven&#39;t defined your own <code>install</code> or <code>preinstall</code> scripts, npm will
default the <code>install</code> command to compile using node-gyp.</p>
</li>
</ul>
@@ -207,5 +208,5 @@ scripts is for compilation which must be done on the target architecture.</li>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">npm-scripts &mdash; npm@3.8.9</p>
+<p id="footer">npm-scripts &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/misc/removing-npm.html b/deps/npm/html/doc/misc/removing-npm.html
index 0341d6a195..66ea0812ec 100644
--- a/deps/npm/html/doc/misc/removing-npm.html
+++ b/deps/npm/html/doc/misc/removing-npm.html
@@ -57,5 +57,5 @@ modules. To track those down, you can do the following:</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">removing-npm &mdash; npm@3.8.9</p>
+<p id="footer">removing-npm &mdash; npm@3.9.3</p>
diff --git a/deps/npm/html/doc/misc/semver.html b/deps/npm/html/doc/misc/semver.html
index d0ae3178c6..26e2ab5731 100644
--- a/deps/npm/html/doc/misc/semver.html
+++ b/deps/npm/html/doc/misc/semver.html
@@ -302,5 +302,5 @@ range, use the <code>satisfies(version, range)</code> function.</p>
<tr><td style="width:60px;height:10px;background:rgb(237,127,127)" colspan=6>&nbsp;</td><td colspan=10 style="width:10px;height:10px;background:rgb(237,127,127)">&nbsp;</td></tr>
<tr><td colspan=5 style="width:50px;height:10px;background:#fff">&nbsp;</td><td style="width:40px;height:10px;background:rgb(237,127,127)" colspan=4>&nbsp;</td><td style="width:90px;height:10px;background:#fff" colspan=9>&nbsp;</td></tr>
</table>
-<p id="footer">semver &mdash; npm@3.8.9</p>
+<p id="footer">semver &mdash; npm@3.9.3</p>
diff --git a/deps/npm/lib/access.js b/deps/npm/lib/access.js
index 158ce50544..69527c2aa4 100644
--- a/deps/npm/lib/access.js
+++ b/deps/npm/lib/access.js
@@ -35,7 +35,6 @@ access.completion = function (opts, cb) {
} else {
return cb(null, [])
}
- break
case 'public':
case 'restricted':
case 'ls-packages':
diff --git a/deps/npm/lib/cache/add-remote-git.js b/deps/npm/lib/cache/add-remote-git.js
index 5fbd8dbeda..d8f64a85be 100644
--- a/deps/npm/lib/cache/add-remote-git.js
+++ b/deps/npm/lib/cache/add-remote-git.js
@@ -443,7 +443,7 @@ function getResolved (uri, treeish) {
// Checks for known protocols:
// http:, https:, ssh:, and git:, with optional git+ prefix.
if (!parsed.protocol ||
- !parsed.protocol.match(/^(((git\+)?(https?|ssh))|git|file):$/)) {
+ !parsed.protocol.match(/^(((git\+)?(https?|ssh|file))|git|file):$/)) {
uri = 'git+ssh://' + uri
}
diff --git a/deps/npm/lib/cache/caching-client.js b/deps/npm/lib/cache/caching-client.js
index f06dde0021..a6bcee373d 100644
--- a/deps/npm/lib/cache/caching-client.js
+++ b/deps/npm/lib/cache/caching-client.js
@@ -75,6 +75,10 @@ function get (uri, params, cb) {
return get_.call(this, uri, cachePath, params, cb)
}
+ if (params.skipCache) {
+ return get_.call(this, uri, cachePath, params, cb)
+ }
+
var client = this
fs.stat(cachePath, function (er, stat) {
if (!er) {
@@ -112,6 +116,8 @@ function get_ (uri, cachePath, params, cb) {
if (data._etag) etag = data._etag
if (data._lastModified) lastModified = data._lastModified
+ data._cached = true
+
if (stat && timeout && timeout > 0) {
if ((Date.now() - stat.mtime.getTime()) / 1000 < timeout) {
log.verbose('get', uri, 'not expired, no request')
diff --git a/deps/npm/lib/completion.js b/deps/npm/lib/completion.js
index 96f4c3ee55..ae611f918e 100644
--- a/deps/npm/lib/completion.js
+++ b/deps/npm/lib/completion.js
@@ -1,4 +1,3 @@
-
module.exports = completion
completion.usage = 'source <(npm completion)'
@@ -14,6 +13,7 @@ var configNames = Object.keys(configTypes)
var shorthandNames = Object.keys(shorthands)
var allConfs = configNames.concat(shorthandNames)
var once = require('once')
+var isWindowsShell = require('./utils/is-windows-shell.js')
completion.completion = function (opts, cb) {
if (opts.w > 3) return cb()
@@ -45,7 +45,7 @@ completion.completion = function (opts, cb) {
}
function completion (args, cb) {
- if (process.platform === 'win32' && !(/^MINGW(32|64)$/.test(process.env.MSYSTEM))) {
+ if (isWindowsShell) {
var e = new Error('npm completion supported only in MINGW / Git bash on Windows')
e.code = 'ENOTSUP'
e.errno = require('constants').ENOTSUP
diff --git a/deps/npm/lib/config/core.js b/deps/npm/lib/config/core.js
index d1306eb4c8..b833b75409 100644
--- a/deps/npm/lib/config/core.js
+++ b/deps/npm/lib/config/core.js
@@ -10,6 +10,7 @@ var ini = require('ini')
var Umask = configDefs.Umask
var mkdirp = require('mkdirp')
var umask = require('../utils/umask')
+var isWindows = require('../utils/is-windows.js')
exports.load = load
exports.Conf = Conf
@@ -391,7 +392,7 @@ function parseField (f, k) {
f = envReplace(f)
if (isPath) {
- var homePattern = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\//
+ var homePattern = isWindows ? /^~(\/|\\)/ : /^~\//
if (f.match(homePattern) && process.env.HOME) {
f = path.resolve(process.env.HOME, f.substr(2))
}
diff --git a/deps/npm/lib/explore.js b/deps/npm/lib/explore.js
index 105ff84cc8..05b5220d5f 100644
--- a/deps/npm/lib/explore.js
+++ b/deps/npm/lib/explore.js
@@ -9,15 +9,30 @@ var npm = require('./npm.js')
var spawn = require('./utils/spawn')
var path = require('path')
var fs = require('graceful-fs')
+var isWindowsShell = require('./utils/is-windows-shell.js')
+var escapeExecPath = require('./utils/escape-exec-path.js')
+var escapeArg = require('./utils/escape-arg.js')
function explore (args, cb) {
if (args.length < 1 || !args[0]) return cb(explore.usage)
var p = args.shift()
- args = args.join(' ').trim()
- if (args) args = ['-c', args]
- else args = []
var cwd = path.resolve(npm.dir, p)
+ var opts = {cwd: cwd, stdio: 'inherit'}
+
+ var shellArgs = []
+ if (args) {
+ if (isWindowsShell) {
+ var execCmd = escapeExecPath(args.shift())
+ var execArgs = [execCmd].concat(args.map(escapeArg))
+ opts.windowsVerbatimArguments = true
+ shellArgs = ['/d', '/s', '/c'].concat(execArgs)
+ } else {
+ shellArgs.unshift('-c')
+ shellArgs = ['-c', args.map(escapeArg).join(' ').trim()]
+ }
+ }
+
var sh = npm.config.get('shell')
fs.stat(cwd, function (er, s) {
if (er || !s.isDirectory()) {
@@ -26,17 +41,17 @@ function explore (args, cb) {
))
}
- if (!args.length) {
+ if (!shellArgs.length) {
console.log(
'\nExploring ' + cwd + '\n' +
"Type 'exit' or ^D when finished\n"
)
}
- var shell = spawn(sh, args, { cwd: cwd, stdio: 'inherit' })
+ var shell = spawn(sh, shellArgs, opts)
shell.on('close', function (er) {
// only fail if non-interactive.
- if (!args.length) return cb()
+ if (!shellArgs.length) return cb()
cb(er)
})
})
diff --git a/deps/npm/lib/fetch-package-metadata.js b/deps/npm/lib/fetch-package-metadata.js
index 8965a561aa..d4f02bb278 100644
--- a/deps/npm/lib/fetch-package-metadata.js
+++ b/deps/npm/lib/fetch-package-metadata.js
@@ -63,26 +63,29 @@ module.exports = function fetchPackageMetadata (spec, where, tracker, done) {
fetchOtherPackageData(spec, dep, where, addRequestedAndFinish)
}
function addRequestedAndFinish (er, pkg) {
- if (pkg) {
- pkg._requested = dep
- pkg._spec = spec
- pkg._where = where
- if (!pkg._args) pkg._args = []
- pkg._args.push([pkg._spec, pkg._where])
- // non-npm registries can and will return unnormalized data, plus
- // even the npm registry may have package data normalized with older
- // normalization rules. This ensures we get package data in a consistent,
- // stable format.
- try {
- normalizePackageData(pkg)
- } catch (ex) {
- // don't care
- }
- }
+ if (pkg) annotateMetadata(pkg, dep, spec, where)
logAndFinish(er, pkg)
}
}
+var annotateMetadata = module.exports.annotateMetadata = function (pkg, requested, spec, where) {
+ validate('OOSS', arguments)
+ pkg._requested = requested
+ pkg._spec = spec
+ pkg._where = where
+ if (!pkg._args) pkg._args = []
+ pkg._args.push([requested, where])
+ // non-npm registries can and will return unnormalized data, plus
+ // even the npm registry may have package data normalized with older
+ // normalization rules. This ensures we get package data in a consistent,
+ // stable format.
+ try {
+ normalizePackageData(pkg)
+ } catch (ex) {
+ // don't care
+ }
+}
+
function fetchOtherPackageData (spec, dep, where, next) {
validate('SOSF', arguments)
log.silly('fetchOtherPackageData', spec)
@@ -150,6 +153,16 @@ function fetchNamedPackageData (dep, next) {
}
}
+ // We didn't manage to find a compatible version
+ // If this package was requested from cache, force hitting the network
+ if (pkg._cached) {
+ log.silly('fetchNamedPackageData', 'No valid target from cache, forcing network')
+ return npm.registry.get(url, {
+ auth: auth,
+ skipCache: true
+ }, pulseTillDone('fetchMetadata', iferr(next, pickVersionFromRegistryDocument)))
+ }
+
// And failing that, we error out
var targets = versions.length
? 'Valid install targets:\n' + versions.join(', ') + '\n'
diff --git a/deps/npm/lib/install/action/extract.js b/deps/npm/lib/install/action/extract.js
index 4b627a5c30..60aae036c2 100644
--- a/deps/npm/lib/install/action/extract.js
+++ b/deps/npm/lib/install/action/extract.js
@@ -30,6 +30,11 @@ function andUpdatePackageJson (pkg, buildpath, next) {
function andStageBundledChildren (pkg, buildpath, log, next) {
var staging = path.resolve(buildpath, '..')
return iferr(next, function () {
+ for (var i = 0; i < pkg.children.length; ++i) {
+ var c = pkg.children[i]
+ if (!c.package.name) return next(c.error)
+ }
+
asyncMap(pkg.children, andStageBundledModule(pkg, staging, buildpath), cleanupBundled)
})
function cleanupBundled () {
diff --git a/deps/npm/lib/install/deps.js b/deps/npm/lib/install/deps.js
index e15403545c..edc317f846 100644
--- a/deps/npm/lib/install/deps.js
+++ b/deps/npm/lib/install/deps.js
@@ -31,30 +31,32 @@ var moduleName = require('../utils/module-name.js')
// The export functions in this module mutate a dependency tree, adding
// items to them.
-function isDep (tree, child) {
- if (child.fromShrinkwrap) return true
+function isDep (tree, child, cb) {
var name = moduleName(child)
- var requested = isProdDep(tree, name)
- var matches
- if (requested) matches = doesChildVersionMatch(child, requested, tree)
- if (matches) return matches
- requested = isDevDep(tree, name)
- if (!requested) return
- return doesChildVersionMatch(child, requested, tree)
+ var prodVer = isProdDep(tree, name)
+ var devVer = isDevDep(tree, name)
+
+ childDependencySpecifier(tree, name, prodVer, function (er, prodSpec) {
+ if (er) return cb(child.fromShrinkwrap)
+ var matches
+ if (prodSpec) matches = doesChildVersionMatch(child, prodSpec, tree)
+ if (matches) return cb(true, prodSpec)
+ if (devVer === prodVer) return cb(child.fromShrinkwrap)
+ childDependencySpecifier(tree, name, devVer, function (er, devSpec) {
+ if (er) return cb(child.fromShrinkwrap)
+ cb(doesChildVersionMatch(child, devSpec, tree) || child.fromShrinkwrap, null, devSpec)
+ })
+ })
}
-function isDevDep (tree, name) {
+function isDevDep (tree, name, cb) {
var devDeps = tree.package.devDependencies || {}
- var reqVer = devDeps[name]
- if (reqVer == null) return
- return npa(name + '@' + reqVer)
+ return devDeps[name]
}
-function isProdDep (tree, name) {
+function isProdDep (tree, name, cb) {
var deps = tree.package.dependencies || {}
- var reqVer = deps[name]
- if (reqVer == null) return false
- return npa(name + '@' + reqVer)
+ return deps[name]
}
var registryTypes = { range: true, version: true }
@@ -80,6 +82,21 @@ exports.recalculateMetadata = function (tree, log, next) {
recalculateMetadata(tree, log, {}, next)
}
+function childDependencySpecifier (tree, name, spec, cb) {
+ if (!tree.resolved) tree.resolved = {}
+ if (!tree.resolved[name]) tree.resolved[name] = {}
+ if (tree.resolved[name][spec]) {
+ return process.nextTick(function () {
+ cb(null, tree.resolved[name][spec])
+ })
+ }
+ realizePackageSpecifier(name + '@' + spec, packageRelativePath(tree), function (er, req) {
+ if (er) return cb(er)
+ tree.resolved[name][spec] = req
+ cb(null, req)
+ })
+}
+
function recalculateMetadata (tree, log, seen, next) {
validate('OOOF', arguments)
if (seen[tree.path]) return next()
@@ -87,7 +104,8 @@ function recalculateMetadata (tree, log, seen, next) {
if (tree.parent == null) resetMetadata(tree)
function markDeps (spec, done) {
validate('SF', arguments)
- realizePackageSpecifier(spec, packageRelativePath(tree), function (er, req) {
+ var matched = spec.match(/^(@?[^@]+)@(.*)$/)
+ childDependencySpecifier(tree, matched[1], matched[2], function (er, req) {
if (er || !req.name) return done()
var child = findRequirement(tree, req.name, req)
if (child) {
@@ -106,11 +124,26 @@ function recalculateMetadata (tree, log, seen, next) {
function specs (deps) {
return Object.keys(deps).map(function (depname) { return depname + '@' + deps[depname] })
}
+
+ // Ensure dependencies and dev dependencies are marked as required
var tomark = specs(tree.package.dependencies)
if (!tree.parent && (npm.config.get('dev') || !npm.config.get('production'))) {
tomark = union(tomark, specs(tree.package.devDependencies))
}
+ // Ensure any children ONLY from a shrinkwrap are also included
+ var childrenOnlyInShrinkwrap = tree.children.filter(function (child) {
+ return child.fromShrinkwrap &&
+ !tree.package.dependencies[child.package.name] &&
+ !tree.package.devDependencies[child.package.name]
+ })
+ var tomarkOnlyInShrinkwrap = childrenOnlyInShrinkwrap.map(function (child) {
+ return child.package._spec
+ })
+ tomark = union(tomark, tomarkOnlyInShrinkwrap)
+
+ // Don't bother trying to recalc children of failed deps
tree.children = tree.children.filter(function (child) { return !child.failed })
+
chain([
[asyncMap, tomark, markDeps],
[asyncMap, tree.children, function (child, done) { recalculateMetadata(child, log, seen, done) }]
@@ -122,13 +155,15 @@ function recalculateMetadata (tree, log, seen, next) {
})
}
-function addRequiredDep (tree, child) {
- if (!isDep(tree, child)) return false
- var name = isProdDep(tree, moduleName(child)) ? flatNameFromTree(tree) : '#DEV:' + flatNameFromTree(tree)
- replaceModuleName(child.package, '_requiredBy', name)
- replaceModule(child, 'requiredBy', tree)
- replaceModule(tree, 'requires', child)
- return true
+function addRequiredDep (tree, child, cb) {
+ isDep(tree, child, function (childIsDep, childIsProdDep, childIsDevDep) {
+ if (!childIsDep) return cb(false)
+ var name = childIsProdDep ? flatNameFromTree(tree) : '#DEV:' + flatNameFromTree(tree)
+ replaceModuleName(child.package, '_requiredBy', name)
+ replaceModule(child, 'requiredBy', tree)
+ replaceModule(tree, 'requires', child)
+ cb(true)
+ })
}
exports._removeObsoleteDep = removeObsoleteDep
@@ -207,10 +242,12 @@ exports.loadRequestedDeps = function (args, tree, saveToDependencies, log, next)
// For things the user asked to install, that aren't a dependency (or
// won't be when we're done), flag it as "depending" on the user
// themselves, so we don't remove it as a dep that no longer exists
- if (!addRequiredDep(tree, child)) {
- replaceModuleName(child.package, '_requiredBy', '#USER')
- }
- depLoaded(null, child, tracker)
+ addRequiredDep(tree, child, function (childIsDep) {
+ if (!childIsDep) {
+ replaceModuleName(child.package, '_requiredBy', '#USER')
+ }
+ depLoaded(null, child, tracker)
+ })
}))
}, andForEachChild(loadDeps, andFinishTracker(log, next)))
}
@@ -382,8 +419,7 @@ exports.loadExtraneous.andResolveDeps = function (tree, log, next) {
function addDependency (name, versionSpec, tree, log, done) {
validate('SSOOF', arguments)
var next = andAddParentToErrors(tree, done)
- var spec = name + '@' + versionSpec
- realizePackageSpecifier(spec, packageRelativePath(tree), iferr(done, function (req) {
+ childDependencySpecifier(tree, name, versionSpec, iferr(done, function (req) {
var child = findRequirement(tree, name, req)
if (child) {
resolveWithExistingModule(child, tree, log, iferr(next, function (child, log) {
@@ -401,11 +437,10 @@ function addDependency (name, versionSpec, tree, log, done) {
function resolveWithExistingModule (child, tree, log, next) {
validate('OOOF', arguments)
- addRequiredDep(tree, child)
-
- if (tree.parent && child.parent !== tree) updatePhantomChildren(tree.parent, child)
-
- next(null, child, log)
+ addRequiredDep(tree, child, function () {
+ if (tree.parent && child.parent !== tree) updatePhantomChildren(tree.parent, child)
+ next(null, child, log)
+ })
}
var updatePhantomChildren = exports.updatePhantomChildren = function (current, child) {
@@ -482,22 +517,23 @@ function resolveWithNewModule (pkg, tree, log, next) {
var replaced = replaceModule(parent, 'children', child)
if (replaced) removeObsoleteDep(replaced)
- addRequiredDep(tree, child)
- pkg._location = flatNameFromTree(child)
+ addRequiredDep(tree, child, function () {
+ pkg._location = flatNameFromTree(child)
- if (tree.parent && parent !== tree) updatePhantomChildren(tree.parent, child)
+ if (tree.parent && parent !== tree) updatePhantomChildren(tree.parent, child)
- if (pkg._bundled) {
- inflateBundled(child, child.children)
- }
+ if (pkg._bundled) {
+ inflateBundled(child, child.children)
+ }
- if (pkg._shrinkwrap && pkg._shrinkwrap.dependencies) {
- return inflateShrinkwrap(child, pkg._shrinkwrap.dependencies, function (er) {
- next(er, child, log)
- })
- }
+ if (pkg._shrinkwrap && pkg._shrinkwrap.dependencies) {
+ return inflateShrinkwrap(child, pkg._shrinkwrap.dependencies, function (er) {
+ next(er, child, log)
+ })
+ }
- next(null, child, log)
+ next(null, child, log)
+ })
}))
}))
}
diff --git a/deps/npm/lib/install/inflate-shrinkwrap.js b/deps/npm/lib/install/inflate-shrinkwrap.js
index ce22f4e4c5..b38181b9f1 100644
--- a/deps/npm/lib/install/inflate-shrinkwrap.js
+++ b/deps/npm/lib/install/inflate-shrinkwrap.js
@@ -3,7 +3,9 @@ var url = require('url')
var asyncMap = require('slide').asyncMap
var validate = require('aproba')
var iferr = require('iferr')
+var realizePackageSpecifier = require('realize-package-specifier')
var fetchPackageMetadata = require('../fetch-package-metadata.js')
+var annotateMetadata = require('../fetch-package-metadata.js').annotateMetadata
var addShrinkwrap = require('../fetch-package-metadata.js').addShrinkwrap
var addBundled = require('../fetch-package-metadata.js').addBundled
var inflateBundled = require('./inflate-bundled.js')
@@ -32,7 +34,11 @@ var inflateShrinkwrap = module.exports = function (tree, swdeps, finishInflating
child.package.version === sw.version)) {
if (!child.fromShrinkwrap) child.fromShrinkwrap = spec
tree.children.push(child)
- return next()
+
+ return realizePackageSpecifier(spec, tree.path, iferr(next, function (requested) {
+ annotateMetadata(child.package, requested, spec, tree.path)
+ return inflateShrinkwrap(child, sw.dependencies || {}, next)
+ }))
}
fetchPackageMetadata(spec, tree.path, iferr(next, function (pkg) {
pkg._from = sw.from || spec
diff --git a/deps/npm/lib/ls.js b/deps/npm/lib/ls.js
index 4a71c54e1b..d2fe14fb2f 100644
--- a/deps/npm/lib/ls.js
+++ b/deps/npm/lib/ls.js
@@ -62,7 +62,11 @@ var lsFromTree = ls.fromTree = function (dir, physicalTree, args, silent, cb) {
args = args.map(function (a) {
var p = npa(a)
var name = p.name
- var ver = semver.validRange(p.rawSpec) || ''
+ // When version spec is missing, we'll skip using it when filtering.
+ // Otherwise, `semver.validRange` would return '*', which won't
+ // match prerelease versions.
+ var ver = (p.rawSpec &&
+ (semver.validRange(p.rawSpec) || ''))
return [ name, ver, a ]
})
}
@@ -292,8 +296,11 @@ function filterFound (root, args) {
var argName = args[ii][0]
var argVersion = args[ii][1]
var argRaw = args[ii][2]
- if (depName === argName) {
+ if (depName === argName && argVersion) {
found = semver.satisfies(dep.version, argVersion, true)
+ } else if (depName === argName) {
+ // If version is missing from arg, just do a name match.
+ found = true
} else if (dep.path === argRaw) {
found = true
}
diff --git a/deps/npm/lib/npm.js b/deps/npm/lib/npm.js
index 4d45165063..9d6cda386a 100644
--- a/deps/npm/lib/npm.js
+++ b/deps/npm/lib/npm.js
@@ -87,7 +87,7 @@
npm.command = c
if (commandCache[a]) return commandCache[a]
- var cmd = require(__dirname + '/' + a + '.js')
+ var cmd = require(path.join(__dirname, a + '.js'))
commandCache[a] = function () {
var args = Array.prototype.slice.call(arguments, 0)
@@ -96,6 +96,14 @@
}
if (args.length === 1) args.unshift([])
+ // Options are prefixed by a hyphen-minus (-, \u2d).
+ // Other dash-type chars look similar but are invalid.
+ Array(args[0]).forEach(function (arg) {
+ if (/^[\u2010-\u2015\u2212\uFE58\uFE63\uFF0D]/.test(arg)) {
+ log.error('arg', 'Argument starts with non-ascii dash, this is probably invalid:', arg)
+ }
+ })
+
npm.registry.version = npm.version
if (!npm.registry.refer) {
npm.registry.refer = [a].concat(args[0]).map(function (arg) {
diff --git a/deps/npm/lib/unbuild.js b/deps/npm/lib/unbuild.js
index 9bb8d7b665..f5efb1ee6d 100644
--- a/deps/npm/lib/unbuild.js
+++ b/deps/npm/lib/unbuild.js
@@ -59,7 +59,7 @@ function rmStuff (pkg, folder, cb) {
// if it's global, and folder is in {prefix}/node_modules,
// then bins are in {prefix}/bin
// otherwise, then bins are in folder/../.bin
- var parent = path.dirname(folder)
+ var parent = pkg.name[0] === '@' ? path.dirname(path.dirname(folder)) : path.dirname(folder)
var gnm = npm.dir
var top = gnm === parent
diff --git a/deps/npm/lib/utils/completion/file-completion.js b/deps/npm/lib/utils/completion/file-completion.js
index 78777a025e..e16b636a68 100644
--- a/deps/npm/lib/utils/completion/file-completion.js
+++ b/deps/npm/lib/utils/completion/file-completion.js
@@ -1,7 +1,6 @@
module.exports = fileCompletion
var mkdir = require('mkdirp')
-var path = require('path')
var glob = require('glob')
function fileCompletion (root, req, depth, cb) {
@@ -18,8 +17,7 @@ function fileCompletion (root, req, depth, cb) {
glob(pattern, opts, function (er, files) {
if (er) return cb(er)
return cb(null, (files || []).map(function (f) {
- var tail = f.substr(root.length + 1).replace(/^\//, '')
- return path.join(req, tail)
+ return f.substr(root.length + 1).replace(/^\/|\/$/g, '')
}))
})
})
diff --git a/deps/npm/lib/utils/error-handler.js b/deps/npm/lib/utils/error-handler.js
index 91b180e1b3..6eac7e9577 100644
--- a/deps/npm/lib/utils/error-handler.js
+++ b/deps/npm/lib/utils/error-handler.js
@@ -78,9 +78,11 @@ function exit (code, noLog) {
}
})
rollbacks.length = 0
+ } else if (code && !noLog) {
+ writeLogFile(reallyExit)
+ } else {
+ rm('npm-debug.log', reallyExit)
}
- else if (code && !noLog) writeLogFile(reallyExit)
- else rm('npm-debug.log', reallyExit)
function reallyExit (er) {
if (er && !code) code = typeof er.errno === 'number' ? er.errno : 1
diff --git a/deps/npm/lib/utils/escape-arg.js b/deps/npm/lib/utils/escape-arg.js
new file mode 100644
index 0000000000..d12ee5edf5
--- /dev/null
+++ b/deps/npm/lib/utils/escape-arg.js
@@ -0,0 +1,27 @@
+'use strict'
+var path = require('path')
+var isWindowsShell = require('./is-windows-shell.js')
+
+/*
+Escape the name of an executable suitable for passing to the system shell.
+
+Windows is easy, wrap in double quotes and you're done, as there's no
+facility to create files with quotes in their names.
+
+Unix-likes are a little more complicated, wrap in single quotes and escape
+any single quotes in the filename.
+*/
+
+module.exports = escapify
+
+function escapify (str) {
+ if (isWindowsShell) {
+ return '"' + path.normalize(str) + '"'
+ } else {
+ if (/[^-_.~/\w]/.test(str)) {
+ return "'" + str.replace(/'/g, "'\"'\"'") + "'"
+ } else {
+ return str
+ }
+ }
+}
diff --git a/deps/npm/lib/utils/escape-exec-path.js b/deps/npm/lib/utils/escape-exec-path.js
new file mode 100644
index 0000000000..bf94886efa
--- /dev/null
+++ b/deps/npm/lib/utils/escape-exec-path.js
@@ -0,0 +1,30 @@
+'use strict'
+var path = require('path')
+var isWindowsShell = require('./is-windows-shell.js')
+
+/*
+Escape the name of an executable suitable for passing to the system shell.
+
+Windows is easy, wrap in double quotes and you're done, as there's no
+facility to create files with quotes in their names.
+
+Unix-likes are a little more complicated, wrap in single quotes and escape
+any single quotes in the filename.
+*/
+
+module.exports = escapify
+
+function windowsQuotes (str) {
+ if (!/ /.test(str)) return str
+ return '"' + str + '"'
+}
+
+function escapify (str) {
+ if (isWindowsShell) {
+ return path.normalize(str).split(/\\/).map(windowsQuotes).join('\\')
+ } else if (/[^-_.~/\w]/.test(str)) {
+ return "'" + str.replace(/'/g, "'\"'\"'") + "'"
+ } else {
+ return str
+ }
+}
diff --git a/deps/npm/lib/utils/git.js b/deps/npm/lib/utils/git.js
index 2d9da1086e..dc021300ea 100644
--- a/deps/npm/lib/utils/git.js
+++ b/deps/npm/lib/utils/git.js
@@ -32,14 +32,10 @@ function chainableExec () {
return [execGit].concat(args)
}
-function whichGit (cb) {
- return which(git, cb)
-}
-
function whichAndExec (args, options, cb) {
assert.equal(typeof cb, 'function', 'no callback provided')
// check for git
- whichGit(function (err) {
+ which(git, function (err) {
if (err) {
err.code = 'ENOGIT'
return cb(err)
diff --git a/deps/npm/lib/utils/is-windows-bash.js b/deps/npm/lib/utils/is-windows-bash.js
new file mode 100644
index 0000000000..bc4ac7db49
--- /dev/null
+++ b/deps/npm/lib/utils/is-windows-bash.js
@@ -0,0 +1,3 @@
+'use strict'
+var isWindows = require('./is-windows.js')
+module.exports = isWindows && /^MINGW(32|64)$/.test(process.env.MSYSTEM)
diff --git a/deps/npm/lib/utils/is-windows-shell.js b/deps/npm/lib/utils/is-windows-shell.js
new file mode 100644
index 0000000000..803bbaa49c
--- /dev/null
+++ b/deps/npm/lib/utils/is-windows-shell.js
@@ -0,0 +1,4 @@
+'use strict'
+var isWindows = require('./is-windows.js')
+var isWindowsBash = require('./is-windows-bash.js')
+module.exports = isWindows && !isWindowsBash
diff --git a/deps/npm/lib/utils/is-windows.js b/deps/npm/lib/utils/is-windows.js
new file mode 100644
index 0000000000..8a991d54f5
--- /dev/null
+++ b/deps/npm/lib/utils/is-windows.js
@@ -0,0 +1,2 @@
+'use strict'
+module.exports = process.platform === 'win32'
diff --git a/deps/npm/lib/utils/lifecycle.js b/deps/npm/lib/utils/lifecycle.js
index b5893ff6a4..fd1a59b74c 100644
--- a/deps/npm/lib/utils/lifecycle.js
+++ b/deps/npm/lib/utils/lifecycle.js
@@ -293,8 +293,10 @@ function makeEnv (data, prefix, env) {
prefix = prefix || 'npm_package_'
if (!env) {
env = {}
- for (var i in process.env) if (!i.match(/^npm_/)) {
- env[i] = process.env[i]
+ for (var i in process.env) {
+ if (!i.match(/^npm_/)) {
+ env[i] = process.env[i]
+ }
}
// npat asks for tap output
@@ -311,31 +313,33 @@ function makeEnv (data, prefix, env) {
)
}
- for (i in data) if (i.charAt(0) !== '_') {
- var envKey = (prefix + i).replace(/[^a-zA-Z0-9_]/g, '_')
- if (i === 'readme') {
- continue
- }
- if (data[i] && typeof data[i] === 'object') {
- try {
- // quick and dirty detection for cyclical structures
- JSON.stringify(data[i])
- makeEnv(data[i], envKey + '_', env)
- } catch (ex) {
- // usually these are package objects.
- // just get the path and basic details.
- var d = data[i]
- makeEnv(
- { name: d.name, version: d.version, path: d.path },
- envKey + '_',
- env
- )
+ for (i in data) {
+ if (i.charAt(0) !== '_') {
+ var envKey = (prefix + i).replace(/[^a-zA-Z0-9_]/g, '_')
+ if (i === 'readme') {
+ continue
+ }
+ if (data[i] && typeof data[i] === 'object') {
+ try {
+ // quick and dirty detection for cyclical structures
+ JSON.stringify(data[i])
+ makeEnv(data[i], envKey + '_', env)
+ } catch (ex) {
+ // usually these are package objects.
+ // just get the path and basic details.
+ var d = data[i]
+ makeEnv(
+ { name: d.name, version: d.version, path: d.path },
+ envKey + '_',
+ env
+ )
+ }
+ } else {
+ env[envKey] = String(data[i])
+ env[envKey] = env[envKey].indexOf('\n') !== -1
+ ? JSON.stringify(env[envKey])
+ : env[envKey]
}
- } else {
- env[envKey] = String(data[i])
- env[envKey] = env[envKey].indexOf('\n') !== -1
- ? JSON.stringify(env[envKey])
- : env[envKey]
}
}
diff --git a/deps/npm/lib/utils/link.js b/deps/npm/lib/utils/link.js
index d0492e076f..605b77402c 100644
--- a/deps/npm/lib/utils/link.js
+++ b/deps/npm/lib/utils/link.js
@@ -55,19 +55,15 @@ function link (from, to, gently, abs, cb) {
if (npm.config.get('force')) gently = false
to = path.resolve(to)
- var target = from = path.resolve(from)
- if (!abs && process.platform !== 'win32') {
- // junctions on windows must be absolute
- target = path.relative(path.dirname(to), from)
- // if there is no folder in common, then it will be much
- // longer, and using a relative link is dumb.
- if (target.length >= from.length) target = from
- }
+ var toDir = path.dirname(to)
+ var absTarget = path.resolve(toDir, from)
+ var relativeTarget = path.relative(toDir, absTarget)
+ var target = abs ? absTarget : relativeTarget
chain(
[
- [ensureFromIsNotSource, from, to],
- [fs, 'stat', from],
+ [ensureFromIsNotSource, absTarget, to],
+ [fs, 'stat', absTarget],
[rm, to, gently],
[mkdir, path.dirname(to)],
[fs, 'symlink', target, to, 'junction']
diff --git a/deps/npm/lib/utils/module-name.js b/deps/npm/lib/utils/module-name.js
index 7ca175487c..649dfac01b 100644
--- a/deps/npm/lib/utils/module-name.js
+++ b/deps/npm/lib/utils/module-name.js
@@ -11,7 +11,7 @@ function pathToPackageName (dir) {
if (dir === '') return ''
var name = path.relative(path.resolve(dir, '..'), dir)
var scoped = path.relative(path.resolve(dir, '../..'), dir)
- if (scoped[0] === '@') return scoped
+ if (scoped[0] === '@') return scoped.replace(/\\/g, '/')
return name
}
diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1
index 514e8e6213..57199a488b 100644
--- a/deps/npm/man/man1/npm-ls.1
+++ b/deps/npm/man/man1/npm-ls.1
@@ -22,7 +22,7 @@ For example, running \fBnpm ls promzard\fP in npm's source tree will show:
.P
.RS 2
.nf
-npm@3.8.9 /path/to/npm
+npm@3.9.3 /path/to/npm
└─┬ init\-package\-json@0\.0\.4
└── promzard@0\.1\.5
.fi
diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1
index 3229d12038..661f4586d7 100644
--- a/deps/npm/man/man1/npm.1
+++ b/deps/npm/man/man1/npm.1
@@ -10,7 +10,7 @@ npm <command> [args]
.RE
.SH VERSION
.P
-3.8.9
+3.9.3
.SH DESCRIPTION
.P
npm is the package manager for the Node JavaScript platform\. It puts
diff --git a/deps/npm/man/man5/npm-json.5 b/deps/npm/man/man5/npm-json.5
index b2ce56755a..1829c36105 100644
--- a/deps/npm/man/man5/npm-json.5
+++ b/deps/npm/man/man5/npm-json.5
@@ -791,10 +791,10 @@ Unless the user has set the \fBengine\-strict\fP config flag, this
field is advisory only will produce warnings when your package is installed as a dependency\.
.SH engineStrict
.P
-\fBThis feature was deprecated with npm 3\.0\.0\fR
+\fBThis feature was removed in npm 3\.0\.0\fR
.P
Prior to npm 3\.0\.0, this feature was used to treat this package as if the
-user had set \fBengine\-strict\fP\|\.
+user had set \fBengine\-strict\fP\|\. It is no longer used\.
.SH os
.P
You can specify which operating systems your
@@ -878,9 +878,9 @@ npm will default some values based on package contents\.
If there is a \fBserver\.js\fP file in the root of your package, then npm
will default the \fBstart\fP command to \fBnode server\.js\fP\|\.
.IP \(bu 2
-\fB"scripts":{"preinstall": "node\-gyp rebuild"}\fP
-If there is a \fBbinding\.gyp\fP file in the root of your package, npm will
-default the \fBpreinstall\fP command to compile using node\-gyp\.
+\fB"scripts":{"install": "node\-gyp rebuild"}\fP
+If there is a \fBbinding\.gyp\fP file in the root of your package and you have not defined an \fBinstall\fP or \fBpreinstall\fP script, npm will
+default the \fBinstall\fP command to compile using node\-gyp\.
.IP \(bu 2
\fB"contributors": [\.\.\.]\fP
If there is an \fBAUTHORS\fP file in the root of your package, npm will
diff --git a/deps/npm/man/man5/package.json.5 b/deps/npm/man/man5/package.json.5
index b2ce56755a..1829c36105 100644
--- a/deps/npm/man/man5/package.json.5
+++ b/deps/npm/man/man5/package.json.5
@@ -791,10 +791,10 @@ Unless the user has set the \fBengine\-strict\fP config flag, this
field is advisory only will produce warnings when your package is installed as a dependency\.
.SH engineStrict
.P
-\fBThis feature was deprecated with npm 3\.0\.0\fR
+\fBThis feature was removed in npm 3\.0\.0\fR
.P
Prior to npm 3\.0\.0, this feature was used to treat this package as if the
-user had set \fBengine\-strict\fP\|\.
+user had set \fBengine\-strict\fP\|\. It is no longer used\.
.SH os
.P
You can specify which operating systems your
@@ -878,9 +878,9 @@ npm will default some values based on package contents\.
If there is a \fBserver\.js\fP file in the root of your package, then npm
will default the \fBstart\fP command to \fBnode server\.js\fP\|\.
.IP \(bu 2
-\fB"scripts":{"preinstall": "node\-gyp rebuild"}\fP
-If there is a \fBbinding\.gyp\fP file in the root of your package, npm will
-default the \fBpreinstall\fP command to compile using node\-gyp\.
+\fB"scripts":{"install": "node\-gyp rebuild"}\fP
+If there is a \fBbinding\.gyp\fP file in the root of your package and you have not defined an \fBinstall\fP or \fBpreinstall\fP script, npm will
+default the \fBinstall\fP command to compile using node\-gyp\.
.IP \(bu 2
\fB"contributors": [\.\.\.]\fP
If there is an \fBAUTHORS\fP file in the root of your package, npm will
diff --git a/deps/npm/man/man7/npm-scripts.7 b/deps/npm/man/man7/npm-scripts.7
index 7b02bb5a8f..72d4ae06d3 100644
--- a/deps/npm/man/man7/npm-scripts.7
+++ b/deps/npm/man/man7/npm-scripts.7
@@ -92,7 +92,8 @@ If there is a \fBserver\.js\fP file in the root of your package, then npm
will default the \fBstart\fP command to \fBnode server\.js\fP\|\.
.IP \(bu 2
\fB"install": "node\-gyp rebuild"\fP:
-If there is a \fBbinding\.gyp\fP file in the root of your package, npm will
+If there is a \fBbinding\.gyp\fP file in the root of your package and you
+haven't defined your own \fBinstall\fP or \fBpreinstall\fP scripts, npm will
default the \fBinstall\fP command to compile using node\-gyp\.
.RE
diff --git a/deps/npm/node_modules/fstream-npm/fstream-npm.js b/deps/npm/node_modules/fstream-npm/fstream-npm.js
index 8f8114fe89..c3b93214dc 100644
--- a/deps/npm/node_modules/fstream-npm/fstream-npm.js
+++ b/deps/npm/node_modules/fstream-npm/fstream-npm.js
@@ -99,6 +99,9 @@ Packer.prototype.applyIgnores = function (entry, partial, entryObj) {
// license files should never be ignored.
if (entry.match(/^(license|licence)(\.[^\.]*)?$/i)) return true
+ // copyright notice files should never be ignored.
+ if (entry.match(/^(notice)(\.[^\.]*)?$/i)) return true
+
// changelogs should never be ignored.
if (entry.match(/^(changes|changelog|history)(\.[^\.]*)?$/i)) return true
}
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/.npmignore b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/.npmignore
deleted file mode 100644
index a843dc44a1..0000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-test/fixtures
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/example/basic.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/example/basic.js
deleted file mode 100644
index ff4534289c..0000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/example/basic.js
+++ /dev/null
@@ -1,13 +0,0 @@
-var Ignore = require("../")
-Ignore({ path: __dirname
- , ignoreFiles: [".ignore", ".gitignore"]
- })
- .on("child", function (c) {
- console.error(c.path.substr(c.root.path.length + 1))
- c.on("ignoreFile", onIgnoreFile)
- })
- .on("ignoreFile", onIgnoreFile)
-
-function onIgnoreFile (e) {
- console.error("adding ignore file", e.path)
-}
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/index.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/index.js
index f8d40f79ac..abe535df32 100644
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/index.js
+++ b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/index.js
@@ -99,7 +99,7 @@ function expand(str, isTop) {
var isOptions = /^(.*,)+(.+)?$/.test(m.body);
if (!isSequence && !isOptions) {
// {a},b}
- if (m.post.match(/,.*}/)) {
+ if (m.post.match(/,.*\}/)) {
str = m.pre + '{' + m.body + escClose + m.post;
return expand(str);
}
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore
index fd4f2b066b..ae5d8c36ac 100644
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore
+++ b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore
@@ -1,2 +1,5 @@
-node_modules
-.DS_Store
+test
+.gitignore
+.travis.yml
+Makefile
+example.js
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml
deleted file mode 100644
index 6e5919de39..0000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile
deleted file mode 100644
index dd2730cfde..0000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-test:
- @node_modules/.bin/tape test/*.js
-
-.PHONY: test
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md
index 421f3aa5f9..d6880b2f36 100644
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md
+++ b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md
@@ -1,6 +1,6 @@
# balanced-match
-Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`.
+Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!
[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)
[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)
@@ -16,6 +16,7 @@ var balanced = require('balanced-match');
console.log(balanced('{', '}', 'pre{in{nested}}post'));
console.log(balanced('{', '}', 'pre{first}between{second}post'));
+console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
```
The matches are:
@@ -28,6 +29,7 @@ $ node example.js
pre: 'pre',
body: 'first',
post: 'between{second}post' }
+{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
```
## API
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js
deleted file mode 100644
index 9ce76f480a..0000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var balanced = require('./');
-
-console.log(balanced('{', '}', 'pre{in{nested}}post'));
-console.log(balanced('{', '}', 'pre{first}between{second}post'));
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js
index 75f3d71cba..4670f7f79f 100644
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js
+++ b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js
@@ -1,5 +1,8 @@
module.exports = balanced;
function balanced(a, b, str) {
+ if (a instanceof RegExp) a = maybeMatch(a, str);
+ if (b instanceof RegExp) b = maybeMatch(b, str);
+
var r = range(a, b, str);
return r && {
@@ -11,6 +14,11 @@ function balanced(a, b, str) {
};
}
+function maybeMatch(reg, str) {
+ var m = str.match(reg);
+ return m ? m[0] : null;
+}
+
balanced.range = range;
function range(a, b, str) {
var begs, beg, left, right, result;
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
index d71e6b979b..9322bb20fe 100644
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
+++ b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
@@ -1,38 +1,49 @@
{
"_args": [
[
- "balanced-match@^0.3.0",
- "/Users/rebecca/code/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion"
+ {
+ "name": "balanced-match",
+ "raw": "balanced-match@^0.4.1",
+ "rawSpec": "^0.4.1",
+ "scope": null,
+ "spec": ">=0.4.1 <0.5.0",
+ "type": "range"
+ },
+ "/Users/zkat/Documents/code/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion"
]
],
- "_from": "balanced-match@>=0.3.0 <0.4.0",
- "_id": "balanced-match@0.3.0",
+ "_from": "balanced-match@>=0.4.1 <0.5.0",
+ "_id": "balanced-match@0.4.1",
"_inCache": true,
"_installable": true,
"_location": "/fstream-npm/fstream-ignore/minimatch/brace-expansion/balanced-match",
- "_nodeVersion": "4.2.1",
+ "_nodeVersion": "6.0.0",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/balanced-match-0.4.1.tgz_1462129663650_0.39764496590942144"
+ },
"_npmUser": {
"email": "julian@juliangruber.com",
"name": "juliangruber"
},
- "_npmVersion": "2.14.7",
+ "_npmVersion": "3.8.6",
"_phantomChildren": {},
"_requested": {
"name": "balanced-match",
- "raw": "balanced-match@^0.3.0",
- "rawSpec": "^0.3.0",
+ "raw": "balanced-match@^0.4.1",
+ "rawSpec": "^0.4.1",
"scope": null,
- "spec": ">=0.3.0 <0.4.0",
+ "spec": ">=0.4.1 <0.5.0",
"type": "range"
},
"_requiredBy": [
"/fstream-npm/fstream-ignore/minimatch/brace-expansion"
],
- "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz",
- "_shasum": "a91cdd1ebef1a86659e70ff4def01625fc2d6756",
+ "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz",
+ "_shasum": "19053e2e0748eadb379da6c09d455cf5e1039335",
"_shrinkwrap": null,
- "_spec": "balanced-match@^0.3.0",
- "_where": "/Users/rebecca/code/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion",
+ "_spec": "balanced-match@^0.4.1",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion",
"author": {
"email": "mail@juliangruber.com",
"name": "Julian Gruber",
@@ -44,28 +55,28 @@
"dependencies": {},
"description": "Match balanced character pairs, like \"{\" and \"}\"",
"devDependencies": {
- "tape": "~4.2.2"
+ "tape": "~4.5.0"
},
"directories": {},
"dist": {
- "shasum": "a91cdd1ebef1a86659e70ff4def01625fc2d6756",
- "tarball": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz"
+ "shasum": "19053e2e0748eadb379da6c09d455cf5e1039335",
+ "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz"
},
- "gitHead": "a7114b0986554787e90b7ac595a043ca75ea77e5",
+ "gitHead": "7004b289baaaab6a832f4901735e29d37cc2a863",
"homepage": "https://github.com/juliangruber/balanced-match",
"keywords": [
- "balanced",
"match",
- "parse",
"regexp",
- "test"
+ "test",
+ "balanced",
+ "parse"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
- "name": "juliangruber",
- "email": "julian@juliangruber.com"
+ "email": "julian@juliangruber.com",
+ "name": "juliangruber"
}
],
"name": "balanced-match",
@@ -80,19 +91,19 @@
},
"testling": {
"browsers": [
- "android-browser/4.2..latest",
- "chrome/25..latest",
- "chrome/canary",
+ "ie/8..latest",
"firefox/20..latest",
"firefox/nightly",
- "ie/8..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest",
+ "chrome/25..latest",
+ "chrome/canary",
"opera/12..latest",
"opera/next",
- "safari/5.1..latest"
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
],
"files": "test/*.js"
},
- "version": "0.3.0"
+ "version": "0.4.1"
}
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js
deleted file mode 100644
index f5e98e3f2a..0000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js
+++ /dev/null
@@ -1,84 +0,0 @@
-var test = require('tape');
-var balanced = require('..');
-
-test('balanced', function(t) {
- t.deepEqual(balanced('{', '}', 'pre{in{nest}}post'), {
- start: 3,
- end: 12,
- pre: 'pre',
- body: 'in{nest}',
- post: 'post'
- });
- t.deepEqual(balanced('{', '}', '{{{{{{{{{in}post'), {
- start: 8,
- end: 11,
- pre: '{{{{{{{{',
- body: 'in',
- post: 'post'
- });
- t.deepEqual(balanced('{', '}', 'pre{body{in}post'), {
- start: 8,
- end: 11,
- pre: 'pre{body',
- body: 'in',
- post: 'post'
- });
- t.deepEqual(balanced('{', '}', 'pre}{in{nest}}post'), {
- start: 4,
- end: 13,
- pre: 'pre}',
- body: 'in{nest}',
- post: 'post'
- });
- t.deepEqual(balanced('{', '}', 'pre{body}between{body2}post'), {
- start: 3,
- end: 8,
- pre: 'pre',
- body: 'body',
- post: 'between{body2}post'
- });
- t.notOk(balanced('{', '}', 'nope'), 'should be notOk');
- t.deepEqual(balanced('<b>', '</b>', 'pre<b>in<b>nest</b></b>post'), {
- start: 3,
- end: 19,
- pre: 'pre',
- body: 'in<b>nest</b>',
- post: 'post'
- });
- t.deepEqual(balanced('<b>', '</b>', 'pre</b><b>in<b>nest</b></b>post'), {
- start: 7,
- end: 23,
- pre: 'pre</b>',
- body: 'in<b>nest</b>',
- post: 'post'
- });
- t.deepEqual(balanced('{{', '}}', 'pre{{{in}}}post'), {
- start: 3,
- end: 9,
- pre: 'pre',
- body: '{in}',
- post: 'post'
- });
- t.deepEqual(balanced('{{{', '}}', 'pre{{{in}}}post'), {
- start: 3,
- end: 8,
- pre: 'pre',
- body: 'in',
- post: '}post'
- });
- t.deepEqual(balanced('{', '}', 'pre{{first}in{second}post'), {
- start: 4,
- end: 10,
- pre: 'pre{',
- body: 'first',
- post: 'in{second}post'
- });
- t.deepEqual(balanced('<?', '?>', 'pre<?>post'), {
- start: 3,
- end: 4,
- pre: 'pre',
- body: '',
- post: 'post'
- });
- t.end();
-});
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json
index 14febd4da6..0a28e3def3 100644
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json
+++ b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json
@@ -1,21 +1,32 @@
{
"_args": [
[
- "brace-expansion@^1.0.0",
- "/Users/rebecca/code/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch"
+ {
+ "name": "brace-expansion",
+ "raw": "brace-expansion@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "/Users/zkat/Documents/code/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch"
]
],
"_from": "brace-expansion@>=1.0.0 <2.0.0",
- "_id": "brace-expansion@1.1.2",
+ "_id": "brace-expansion@1.1.4",
"_inCache": true,
"_installable": true,
"_location": "/fstream-npm/fstream-ignore/minimatch/brace-expansion",
- "_nodeVersion": "4.2.1",
+ "_nodeVersion": "6.0.0",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/brace-expansion-1.1.4.tgz_1462130058897_0.14984136167913675"
+ },
"_npmUser": {
"email": "julian@juliangruber.com",
"name": "juliangruber"
},
- "_npmVersion": "2.14.7",
+ "_npmVersion": "3.8.6",
"_phantomChildren": {},
"_requested": {
"name": "brace-expansion",
@@ -28,11 +39,11 @@
"_requiredBy": [
"/fstream-npm/fstream-ignore/minimatch"
],
- "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.2.tgz",
- "_shasum": "f21445d0488b658e2771efd870eff51df29f04ef",
+ "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.4.tgz",
+ "_shasum": "464a204c77f482c085c2a36c456bbfbafb67a127",
"_shrinkwrap": null,
"_spec": "brace-expansion@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/fstream-npm/node_modules/fstream-ignore/node_modules/minimatch",
"author": {
"email": "mail@juliangruber.com",
"name": "Julian Gruber",
@@ -42,31 +53,31 @@
"url": "https://github.com/juliangruber/brace-expansion/issues"
},
"dependencies": {
- "balanced-match": "^0.3.0",
+ "balanced-match": "^0.4.1",
"concat-map": "0.0.1"
},
"description": "Brace expansion as known from sh/bash",
"devDependencies": {
- "tape": "4.2.2"
+ "tape": "4.5.1"
},
"directories": {},
"dist": {
- "shasum": "f21445d0488b658e2771efd870eff51df29f04ef",
- "tarball": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.2.tgz"
+ "shasum": "464a204c77f482c085c2a36c456bbfbafb67a127",
+ "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.4.tgz"
},
- "gitHead": "b03773a30fa516b1374945b68e9acb6253d595fa",
+ "gitHead": "1660b75d0bf03b022e7888b576cd5a4080692c1d",
"homepage": "https://github.com/juliangruber/brace-expansion",
"keywords": [],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
- "name": "juliangruber",
- "email": "julian@juliangruber.com"
+ "email": "julian@juliangruber.com",
+ "name": "juliangruber"
},
{
- "name": "isaacs",
- "email": "isaacs@npmjs.com"
+ "email": "isaacs@npmjs.com",
+ "name": "isaacs"
}
],
"name": "brace-expansion",
@@ -82,19 +93,19 @@
},
"testling": {
"browsers": [
- "android-browser/4.2..latest",
- "chrome/25..latest",
- "chrome/canary",
+ "ie/8..latest",
"firefox/20..latest",
"firefox/nightly",
- "ie/8..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest",
+ "chrome/25..latest",
+ "chrome/canary",
"opera/12..latest",
"opera/next",
- "safari/5.1..latest"
+ "safari/5.1..latest",
+ "ipad/6.0..latest",
+ "iphone/6.0..latest",
+ "android-browser/4.2..latest"
],
"files": "test/*.js"
},
- "version": "1.1.2"
+ "version": "1.1.4"
}
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
index ad55dd41f1..e17a18872a 100644
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
+++ b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
@@ -1,60 +1,103 @@
{
+ "_args": [
+ [
+ {
+ "name": "fstream-ignore",
+ "raw": "fstream-ignore@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "/Users/zkat/Documents/code/npm/node_modules/fstream-npm"
+ ]
+ ],
+ "_from": "fstream-ignore@>=1.0.0 <2.0.0",
+ "_id": "fstream-ignore@1.0.5",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/fstream-npm/fstream-ignore",
+ "_nodeVersion": "5.10.1",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/fstream-ignore-1.0.5.tgz_1463518095640_0.10221575922332704"
+ },
+ "_npmUser": {
+ "email": "kat@sykosomatic.org",
+ "name": "zkat"
+ },
+ "_npmVersion": "3.9.1",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "fstream-ignore",
+ "raw": "fstream-ignore@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/fstream-npm"
+ ],
+ "_resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz",
+ "_shasum": "9c31dae34767018fe1d249b24dada67d092da105",
+ "_shrinkwrap": null,
+ "_spec": "fstream-ignore@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/fstream-npm",
"author": {
- "name": "Isaac Z. Schlueter",
"email": "i@izs.me",
+ "name": "Isaac Z. Schlueter",
"url": "http://blog.izs.me/"
},
- "name": "fstream-ignore",
- "description": "A thing for ignoring files based on globs",
- "version": "1.0.3",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/fstream-ignore.git"
- },
- "main": "ignore.js",
- "scripts": {
- "test": "tap test/*.js"
+ "bugs": {
+ "url": "https://github.com/isaacs/fstream-ignore/issues"
},
"dependencies": {
"fstream": "^1.0.0",
"inherits": "2",
"minimatch": "^3.0.0"
},
+ "description": "A thing for ignoring files based on globs",
"devDependencies": {
"mkdirp": "",
"rimraf": "",
- "tap": "^2.2.0"
- },
- "license": "ISC",
- "gitHead": "86c835eef61049496003f6b90c1e6c1236c92d6a",
- "bugs": {
- "url": "https://github.com/isaacs/fstream-ignore/issues"
- },
- "homepage": "https://github.com/isaacs/fstream-ignore#readme",
- "_id": "fstream-ignore@1.0.3",
- "_shasum": "4c74d91fa88b22b42f4f86a18a2820dd79d8fcdd",
- "_from": "fstream-ignore@>=1.0.0 <2.0.0",
- "_npmVersion": "2.14.8",
- "_nodeVersion": "4.2.1",
- "_npmUser": {
- "name": "othiym23",
- "email": "ogd@aoaioxxysz.net"
+ "tap": "^5.7.1"
},
+ "directories": {},
"dist": {
- "shasum": "4c74d91fa88b22b42f4f86a18a2820dd79d8fcdd",
- "tarball": "http://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.3.tgz"
+ "shasum": "9c31dae34767018fe1d249b24dada67d092da105",
+ "tarball": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz"
},
+ "files": [
+ "ignore.js"
+ ],
+ "gitHead": "1438a1a2c25fee71327c36c86de787a14a53ffd4",
+ "homepage": "https://github.com/isaacs/fstream-ignore#readme",
+ "license": "ISC",
+ "main": "ignore.js",
"maintainers": [
{
- "name": "isaacs",
- "email": "isaacs@npmjs.com"
+ "email": "i@izs.me",
+ "name": "isaacs"
},
{
- "name": "othiym23",
- "email": "ogd@aoaioxxysz.net"
+ "email": "ogd@aoaioxxysz.net",
+ "name": "othiym23"
+ },
+ {
+ "email": "kat@sykosomatic.org",
+ "name": "zkat"
}
],
- "directories": {},
- "_resolved": "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.3.tgz",
- "readme": "ERROR: No README data found!"
+ "name": "fstream-ignore",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/isaacs/fstream-ignore.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js --cov"
+ },
+ "version": "1.0.5"
}
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.ignore b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.ignore
deleted file mode 100644
index 773679d45e..0000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.ignore
+++ /dev/null
@@ -1,2 +0,0 @@
-.gitignore
-.*.swp
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.npmignore b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.npmignore
deleted file mode 100644
index 1b26d0de59..0000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-*/a
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/00-setup.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/00-setup.js
deleted file mode 100644
index 351bcd10f1..0000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/00-setup.js
+++ /dev/null
@@ -1,70 +0,0 @@
-// The test fixtures work like this:
-// These dirs are all created: {a,b,c}/{a,b,c}/{a,b,c}/
-// in each one, these files are created:
-// {.,}{a,b,c}{a,b,c}{a,b,c}
-//
-// So, there'll be a/b/c/abc, a/b/c/aba, etc., and dot-versions of each.
-//
-// Each test then writes their own ignore file rules for their purposes,
-// and is responsible for removing them afterwards.
-
-var mkdirp = require("mkdirp")
-var path = require("path")
-var i = 0
-var tap = require("tap")
-var fs = require("fs")
-var rimraf = require("rimraf")
-var fixtures = path.resolve(__dirname, "fixtures")
-
-var chars = ['a', 'b', 'c']
-var dirs = []
-
-for (var i = 0; i < 3; i ++) {
- for (var j = 0; j < 3; j ++) {
- for (var k = 0; k < 3; k ++) {
- dirs.push(chars[i] + '/' + chars[j] + '/' + chars[k])
- }
- }
-}
-
-var files = []
-
-for (var i = 0; i < 3; i ++) {
- for (var j = 0; j < 3; j ++) {
- for (var k = 0; k < 3; k ++) {
- files.push(chars[i] + chars[j] + chars[k])
- files.push('.' + chars[i] + chars[j] + chars[k])
- }
- }
-}
-
-tap.test("remove fixtures", function (t) {
- rimraf(path.resolve(__dirname, "fixtures"), function (er) {
- t.ifError(er, "remove fixtures")
- t.end()
- })
-})
-
-tap.test("create fixtures", function (t) {
- dirs.forEach(function (dir) {
- dir = path.resolve(fixtures, dir)
- t.test("mkdir "+dir, function (t) {
- mkdirp(dir, function (er) {
- t.ifError(er, "mkdir "+dir)
- if (er) return t.end()
-
- files.forEach(function (file) {
- file = path.resolve(dir, file)
- t.test("writeFile "+file, function (t) {
- fs.writeFile(file, path.basename(file), function (er) {
- t.ifError(er, "writing "+file)
- t.end()
- })
- })
- })
- t.end()
- })
- })
- })
- t.end()
-})
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/basic.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/basic.js
deleted file mode 100644
index 3718076eed..0000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/basic.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var IgnoreFile = require("../")
-
-// set the ignores just for this test
-var c = require("./common.js")
-c.ignores({ "a/.basic-ignore": ["b/", "aca"] })
-
-// the files that we expect to not see
-var notAllowed =
- [ /^\/a\/b\/.*/
- , /^\/a\/.*\/aca$/ ]
-
-
-require("tap").test("basic ignore rules", function (t) {
- t.pass("start")
-
- IgnoreFile({ path: __dirname + "/fixtures"
- , ignoreFiles: [".basic-ignore"] })
- .on("ignoreFile", function (e) {
- console.error("ignore file!", e)
- })
- .on("child", function (e) {
- var p = e.path.substr(e.root.path.length)
- notAllowed.forEach(function (na) {
- t.dissimilar(p, na)
- })
- })
- .on("close", t.end.bind(t))
-})
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/common.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/common.js
deleted file mode 100644
index 79470eba61..0000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/common.js
+++ /dev/null
@@ -1,40 +0,0 @@
-if (require.main === module) {
- console.log("1..1")
- console.log("ok 1 trivial pass")
- return
-}
-
-var fs = require("fs")
-var path = require("path")
-var rimraf = require("rimraf")
-
-exports.ignores = ignores
-exports.writeIgnoreFile = writeIgnoreFile
-exports.writeIgnores = writeIgnores
-exports.clearIgnores = clearIgnores
-
-function writeIgnoreFile (file, rules) {
- file = path.resolve(__dirname, "fixtures", file)
- if (Array.isArray(rules)) {
- rules = rules.join("\n")
- }
- fs.writeFileSync(file, rules)
- console.error(file, rules)
-}
-
-function writeIgnores (set) {
- Object.keys(set).forEach(function (f) {
- writeIgnoreFile(f, set[f])
- })
-}
-
-function clearIgnores (set) {
- Object.keys(set).forEach(function (file) {
- fs.unlinkSync(path.resolve(__dirname, "fixtures", file))
- })
-}
-
-function ignores (set) {
- writeIgnores(set)
- process.on("exit", clearIgnores.bind(null, set))
-}
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/ignore-most.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/ignore-most.js
deleted file mode 100644
index 43eec4b546..0000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/ignore-most.js
+++ /dev/null
@@ -1,41 +0,0 @@
-// ignore most things
-var IgnoreFile = require("../")
-
-// set the ignores just for this test
-var c = require("./common.js")
-c.ignores({ ".ignore": ["*", "!a/b/c/.abc", "!/c/b/a/cba"] })
-
-// the only files we expect to see
-var expected =
- [ "/a/b/c/.abc"
- , "/a"
- , "/a/b"
- , "/a/b/c"
- , "/c/b/a/cba"
- , "/c"
- , "/c/b"
- , "/c/b/a" ]
-
-require("tap").test("basic ignore rules", function (t) {
- t.pass("start")
-
- IgnoreFile({ path: __dirname + "/fixtures"
- , ignoreFiles: [".ignore"] })
- .on("ignoreFile", function (e) {
- console.error("ignore file!", e)
- })
- .on("child", function (e) {
- var p = e.path.substr(e.root.path.length)
- var i = expected.indexOf(p)
- if (i === -1) {
- t.fail("unexpected file found", {file: p})
- } else {
- t.pass(p)
- expected.splice(i, 1)
- }
- })
- .on("close", function () {
- t.notOk(expected.length, "all expected files should be seen")
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/nested-ignores.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/nested-ignores.js
deleted file mode 100644
index a9ede59ca7..0000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/nested-ignores.js
+++ /dev/null
@@ -1,51 +0,0 @@
-// ignore most things
-var IgnoreFile = require("../")
-
-// set the ignores just for this test
-var c = require("./common.js")
-c.ignores(
- { ".ignore": ["*", "a", "c", "!a/b/c/.abc", "!/c/b/a/cba"]
- , "a/.ignore": [ "!*", ".ignore" ] // unignore everything
- , "a/a/.ignore": [ "*" ] // re-ignore everything
- , "a/b/.ignore": [ "*", "!/c/.abc" ] // original unignore
- , "a/c/.ignore": [ "*" ] // ignore everything again
- , "c/b/a/.ignore": [ "!cba", "!.cba", "!/a{bc,cb}" ]
- })
-
-// the only files we expect to see
-var expected =
- [ "/a"
- , "/a/a"
- , "/a/b"
- , "/a/b/c"
- , "/a/b/c/.abc"
- , "/a/c"
- , "/c"
- , "/c/b"
- , "/c/b/a"
- , "/c/b/a/cba"
- , "/c/b/a/.cba"
- , "/c/b/a/abc"
- , "/c/b/a/acb" ]
-
-require("tap").test("basic ignore rules", function (t) {
- t.pass("start")
-
- IgnoreFile({ path: __dirname + "/fixtures"
- , ignoreFiles: [".ignore"] })
- .on("child", function (e) {
- var p = e.path.substr(e.root.path.length)
- var i = expected.indexOf(p)
- if (i === -1) {
- console.log("not ok "+p)
- t.fail("unexpected file found", {found: p})
- } else {
- t.pass(p)
- expected.splice(i, 1)
- }
- })
- .on("close", function () {
- t.deepEqual(expected, [], "all expected files should be seen")
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/read-file-order.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/read-file-order.js
deleted file mode 100644
index 0d851164f2..0000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/read-file-order.js
+++ /dev/null
@@ -1,81 +0,0 @@
-var IgnoreFile = require("../")
-, fs = require('fs')
-
-// set the ignores just for this test
-var c = require("./common.js")
-c.ignores({ ".gitignore": ["a/b/c/abc"] })
-c.ignores({ ".ignore": ["*", "!a/b/c/abc"] })
-
-// the only files we expect to see
-var expected =
- [ "/a"
- , "/a/b"
- , "/a/b/c"
- , "/a/b/c/abc" ]
-
-var originalReadFile = fs.readFile
-, parallelCount = 0
-, firstCall
-
-// Overwrite fs.readFile so that when .gitignore and .ignore are read in
-// parallel, .ignore will always be read first.
-fs.readFile = function (filename, options, callback) {
- if (typeof options === 'function') {
- callback = options
- options = false
- }
-
- parallelCount++
-
- process.nextTick(function () {
- if (parallelCount > 1) {
- if (!firstCall) {
- return firstCall = function (cb) {
- originalReadFile(filename, options, function (err, data) {
- callback(err, data)
- if (cb) cb()
- })
- }
- }
-
- if (filename.indexOf('.gitignore') !== -1) {
- firstCall(function () {
- originalReadFile(filename, options, callback)
- })
- } else {
- originalReadFile(filename, options, function (err, data) {
- callback(err, data)
- firstCall()
- })
- }
- } else {
- originalReadFile(filename, options, callback)
- parallelCount = 0
- }
- })
-}
-
-require("tap").test("read file order", function (t) {
- t.pass("start")
-
- IgnoreFile({ path: __dirname + "/fixtures"
- , ignoreFiles: [".gitignore", ".ignore"] })
- .on("ignoreFile", function (e) {
- console.error("ignore file!", e)
- })
- .on("child", function (e) {
- var p = e.path.substr(e.root.path.length)
- var i = expected.indexOf(p)
- if (i === -1) {
- t.fail("unexpected file found", {f: p})
- } else {
- t.pass(p)
- expected.splice(i, 1)
- }
- })
- .on("close", function () {
- fs.readFile = originalReadFile
- t.notOk(expected.length, "all expected files should be seen")
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/unignore-child.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/unignore-child.js
deleted file mode 100644
index 5812354df7..0000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/unignore-child.js
+++ /dev/null
@@ -1,38 +0,0 @@
-// ignore most things
-var IgnoreFile = require("../")
-
-// set the ignores just for this test
-var c = require("./common.js")
-c.ignores({ ".ignore": ["*", "a", "c", "!a/b/c/.abc", "!/c/b/a/cba"] })
-
-// the only files we expect to see
-var expected =
- [ "/a/b/c/.abc"
- , "/a"
- , "/a/b"
- , "/a/b/c"
- , "/c/b/a/cba"
- , "/c"
- , "/c/b"
- , "/c/b/a" ]
-
-require("tap").test("basic ignore rules", function (t) {
- t.pass("start")
-
- IgnoreFile({ path: __dirname + "/fixtures"
- , ignoreFiles: [".ignore"] })
- .on("child", function (e) {
- var p = e.path.substr(e.root.path.length)
- var i = expected.indexOf(p)
- if (i === -1) {
- t.fail("unexpected file found", {f: p})
- } else {
- t.pass(p)
- expected.splice(i, 1)
- }
- })
- .on("close", function () {
- t.notOk(expected.length, "all expected files should be seen")
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/zz-cleanup.js b/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/zz-cleanup.js
deleted file mode 100644
index 82f064a421..0000000000
--- a/deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/test/zz-cleanup.js
+++ /dev/null
@@ -1,10 +0,0 @@
-var tap = require("tap")
-, rimraf = require("rimraf")
-, path = require("path")
-
-tap.test("remove fixtures", function (t) {
- rimraf(path.resolve(__dirname, "fixtures"), function (er) {
- t.ifError(er, "remove fixtures")
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/fstream-npm/package.json b/deps/npm/node_modules/fstream-npm/package.json
index 7b5da94c04..0eddd8be09 100644
--- a/deps/npm/node_modules/fstream-npm/package.json
+++ b/deps/npm/node_modules/fstream-npm/package.json
@@ -1,24 +1,65 @@
{
+ "_args": [
+ [
+ {
+ "name": "fstream-npm",
+ "raw": "fstream-npm@latest",
+ "rawSpec": "latest",
+ "scope": null,
+ "spec": "latest",
+ "type": "tag"
+ },
+ "/Users/zkat/Documents/code/npm"
+ ]
+ ],
+ "_from": "fstream-npm@latest",
+ "_id": "fstream-npm@1.1.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/fstream-npm",
+ "_nodeVersion": "5.10.1",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/fstream-npm-1.1.0.tgz_1463528747313_0.84859543829225"
+ },
+ "_npmUser": {
+ "email": "kat@sykosomatic.org",
+ "name": "zkat"
+ },
+ "_npmVersion": "3.9.1",
+ "_phantomChildren": {
+ "fstream": "1.0.9",
+ "inherits": "2.0.1"
+ },
+ "_requested": {
+ "name": "fstream-npm",
+ "raw": "fstream-npm@latest",
+ "rawSpec": "latest",
+ "scope": null,
+ "spec": "latest",
+ "type": "tag"
+ },
+ "_requiredBy": [
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/fstream-npm/-/fstream-npm-1.1.0.tgz",
+ "_shasum": "80e09743485eaa70d57e89d1ff8fafa366cdefea",
+ "_shrinkwrap": null,
+ "_spec": "fstream-npm@latest",
+ "_where": "/Users/zkat/Documents/code/npm",
"author": {
- "name": "Isaac Z. Schlueter",
"email": "i@izs.me",
+ "name": "Isaac Z. Schlueter",
"url": "http://blog.izs.me/"
},
- "name": "fstream-npm",
- "description": "fstream class for creating npm packages",
- "version": "1.0.7",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/fstream-npm.git"
- },
- "scripts": {
- "test": "standard && tap test/*.js"
+ "bugs": {
+ "url": "https://github.com/npm/fstream-npm/issues"
},
- "main": "./fstream-npm.js",
"dependencies": {
"fstream-ignore": "^1.0.0",
"inherits": "2"
},
+ "description": "fstream class for creating npm packages",
"devDependencies": {
"graceful-fs": "^4.1.2",
"mkdirp": "^0.5.1",
@@ -26,15 +67,42 @@
"standard": "^4.3.1",
"tap": "^1.3.2"
},
- "license": "ISC",
- "readme": "# fstream-npm\n\nThis is an fstream DirReader class that will read a directory and filter\nthings according to the semantics of what goes in an npm package.\n\nFor example:\n\n```javascript\n// This will print out all the files that would be included\n// by 'npm publish' or 'npm install' of this directory.\n\nvar FN = require(\"fstream-npm\")\nFN({ path: \"./\" })\n .on(\"child\", function (e) {\n console.error(e.path.substr(e.root.path.length + 1))\n })\n```\n\n",
- "readmeFilename": "README.md",
- "gitHead": "d57b6b24f91156067f73417dd8785c6312bfc75f",
- "bugs": {
- "url": "https://github.com/npm/fstream-npm/issues"
+ "directories": {},
+ "dist": {
+ "shasum": "80e09743485eaa70d57e89d1ff8fafa366cdefea",
+ "tarball": "https://registry.npmjs.org/fstream-npm/-/fstream-npm-1.1.0.tgz"
},
+ "gitHead": "7df2e946714506f287b0a8125dc05566b840d4b0",
"homepage": "https://github.com/npm/fstream-npm#readme",
- "_id": "fstream-npm@1.0.7",
- "_shasum": "7ed0d1ac13d7686dd9e1bf6ceb8be273bf6d2f86",
- "_from": "fstream-npm@>=1.0.7 <1.1.0"
+ "license": "ISC",
+ "main": "./fstream-npm.js",
+ "maintainers": [
+ {
+ "email": "me@re-becca.org",
+ "name": "iarna"
+ },
+ {
+ "email": "i@izs.me",
+ "name": "isaacs"
+ },
+ {
+ "email": "ogd@aoaioxxysz.net",
+ "name": "othiym23"
+ },
+ {
+ "email": "kat@sykosomatic.org",
+ "name": "zkat"
+ }
+ ],
+ "name": "fstream-npm",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/fstream-npm.git"
+ },
+ "scripts": {
+ "test": "standard && tap test/*.js"
+ },
+ "version": "1.1.0"
}
diff --git a/deps/npm/node_modules/graceful-fs/README.md b/deps/npm/node_modules/graceful-fs/README.md
index d920aaac9e..d0dcd49254 100644
--- a/deps/npm/node_modules/graceful-fs/README.md
+++ b/deps/npm/node_modules/graceful-fs/README.md
@@ -9,8 +9,6 @@ resilient to errors.
## Improvements over [fs module](http://api.nodejs.org/fs.html)
-graceful-fs:
-
* Queues up `open` and `readdir` calls, and retries them once
something closes if there is an EMFILE error from too many file
descriptors.
@@ -51,3 +49,85 @@ This should only ever be done at the top-level application layer, in
order to delay on EMFILE errors from any fs-using dependencies. You
should **not** do this in a library, because it can cause unexpected
delays in other parts of the program.
+
+## Changes
+
+This module is fairly stable at this point, and used by a lot of
+things. That being said, because it implements a subtle behavior
+change in a core part of the node API, even modest changes can be
+extremely breaking, and the versioning is thus biased towards
+bumping the major when in doubt.
+
+The main change between major versions has been switching between
+providing a fully-patched `fs` module vs monkey-patching the node core
+builtin, and the approach by which a non-monkey-patched `fs` was
+created.
+
+The goal is to trade `EMFILE` errors for slower fs operations. So, if
+you try to open a zillion files, rather than crashing, `open`
+operations will be queued up and wait for something else to `close`.
+
+There are advantages to each approach. Monkey-patching the fs means
+that no `EMFILE` errors can possibly occur anywhere in your
+application, because everything is using the same core `fs` module,
+which is patched. However, it can also obviously cause undesirable
+side-effects, especially if the module is loaded multiple times.
+
+Implementing a separate-but-identical patched `fs` module is more
+surgical (and doesn't run the risk of patching multiple times), but
+also imposes the challenge of keeping in sync with the core module.
+
+The current approach loads the `fs` module, and then creates a
+lookalike object that has all the same methods, except a few that are
+patched. It is safe to use in all versions of Node from 0.8 through
+7.0.
+
+### v4
+
+* Do not monkey-patch the fs module. This module may now be used as a
+ drop-in dep, and users can opt into monkey-patching the fs builtin
+ if their app requires it.
+
+### v3
+
+* Monkey-patch fs, because the eval approach no longer works on recent
+ node.
+* fixed possible type-error throw if rename fails on windows
+* verify that we *never* get EMFILE errors
+* Ignore ENOSYS from chmod/chown
+* clarify that graceful-fs must be used as a drop-in
+
+### v2.1.0
+
+* Use eval rather than monkey-patching fs.
+* readdir: Always sort the results
+* win32: requeue a file if error has an OK status
+
+### v2.0
+
+* A return to monkey patching
+* wrap process.cwd
+
+### v1.1
+
+* wrap readFile
+* Wrap fs.writeFile.
+* readdir protection
+* Don't clobber the fs builtin
+* Handle fs.read EAGAIN errors by trying again
+* Expose the curOpen counter
+* No-op lchown/lchmod if not implemented
+* fs.rename patch only for win32
+* Patch fs.rename to handle AV software on Windows
+* Close #4 Chown should not fail on einval or eperm if non-root
+* Fix isaacs/fstream#1 Only wrap fs one time
+* Fix #3 Start at 1024 max files, then back off on EMFILE
+* lutimes that doens't blow up on Linux
+* A full on-rewrite using a queue instead of just swallowing the EMFILE error
+* Wrap Read/Write streams as well
+
+### 1.0
+
+* Update engines for node 0.6
+* Be lstat-graceful on Windows
+* first
diff --git a/deps/npm/node_modules/graceful-fs/package.json b/deps/npm/node_modules/graceful-fs/package.json
index f8fc8a0ebb..cca5d89f6a 100644
--- a/deps/npm/node_modules/graceful-fs/package.json
+++ b/deps/npm/node_modules/graceful-fs/package.json
@@ -1,36 +1,37 @@
{
"_args": [
[
- "graceful-fs@~4.1.2",
+ "graceful-fs@~4.1.3",
"/Users/rebecca/code/npm"
]
],
- "_from": "graceful-fs@>=4.1.2 <4.2.0",
- "_id": "graceful-fs@4.1.3",
+ "_from": "graceful-fs@>=4.1.3 <4.2.0",
+ "_id": "graceful-fs@4.1.4",
"_inCache": true,
"_installable": true,
"_location": "/graceful-fs",
- "_nodeVersion": "4.0.0",
+ "_nodeVersion": "5.6.0",
"_npmOperationalInternal": {
- "host": "packages-6-west.internal.npmjs.com",
- "tmp": "tmp/graceful-fs-4.1.3.tgz_1454449326495_0.943017533281818"
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/graceful-fs-4.1.4.tgz_1462474854900_0.9423982477746904"
},
"_npmUser": {
"email": "i@izs.me",
"name": "isaacs"
},
- "_npmVersion": "3.7.0",
+ "_npmVersion": "3.8.9",
"_phantomChildren": {},
"_requested": {
"name": "graceful-fs",
- "raw": "graceful-fs@~4.1.2",
- "rawSpec": "~4.1.2",
+ "raw": "graceful-fs@~4.1.3",
+ "rawSpec": "~4.1.3",
"scope": null,
- "spec": ">=4.1.2 <4.2.0",
+ "spec": ">=4.1.3 <4.2.0",
"type": "range"
},
"_requiredBy": [
"/",
+ "/cmd-shim",
"/fs-vacuum",
"/fs-write-stream-atomic",
"/fstream",
@@ -41,17 +42,17 @@
"/read-package-json",
"/readdir-scoped-modules",
"/sha",
- "/standard/standard-engine/eslint/file-entry-cache/flat-cache",
- "/standard/standard-engine/eslint/file-entry-cache/flat-cache/read-json-sync",
- "/standard/standard-format/esformatter-jsx/babel-core/regenerator/commoner",
+ "/standard/eslint/file-entry-cache/flat-cache",
+ "/standard/eslint/file-entry-cache/flat-cache/read-json-sync",
+ "/tacks",
"/tap/nyc/read-pkg/load-json-file",
"/tap/nyc/read-pkg/path-type",
"/write-file-atomic"
],
- "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.3.tgz",
- "_shasum": "92033ce11113c41e2628d61fdfa40bc10dc0155c",
+ "_resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.4.tgz",
+ "_shasum": "ef089d2880f033b011823ce5c8fae798da775dbd",
"_shrinkwrap": null,
- "_spec": "graceful-fs@~4.1.2",
+ "_spec": "graceful-fs@~4.1.3",
"_where": "/Users/rebecca/code/npm",
"bugs": {
"url": "https://github.com/isaacs/node-graceful-fs/issues"
@@ -67,8 +68,8 @@
"test": "test"
},
"dist": {
- "shasum": "92033ce11113c41e2628d61fdfa40bc10dc0155c",
- "tarball": "http://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.3.tgz"
+ "shasum": "ef089d2880f033b011823ce5c8fae798da775dbd",
+ "tarball": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.4.tgz"
},
"engines": {
"node": ">=0.4.0"
@@ -79,30 +80,30 @@
"legacy-streams.js",
"polyfills.js"
],
- "gitHead": "694c56f3aed4aee62d6df169be123d3984f61b85",
+ "gitHead": "fe8f05ccc2779d1dfa6db6173f3ed64f1e9aa72c",
"homepage": "https://github.com/isaacs/node-graceful-fs#readme",
"keywords": [
- "EACCESS",
- "EAGAIN",
- "EINVAL",
- "EMFILE",
- "EPERM",
- "error",
- "errors",
"fs",
- "handling",
"module",
- "queue",
"reading",
+ "retry",
"retries",
- "retry"
+ "queue",
+ "error",
+ "errors",
+ "handling",
+ "EMFILE",
+ "EAGAIN",
+ "EINVAL",
+ "EPERM",
+ "EACCESS"
],
"license": "ISC",
"main": "graceful-fs.js",
"maintainers": [
{
- "name": "isaacs",
- "email": "i@izs.me"
+ "email": "i@izs.me",
+ "name": "isaacs"
}
],
"name": "graceful-fs",
@@ -115,5 +116,5 @@
"scripts": {
"test": "node test.js | tap -"
},
- "version": "4.1.3"
+ "version": "4.1.4"
}
diff --git a/deps/npm/node_modules/hosted-git-info/.npmignore b/deps/npm/node_modules/hosted-git-info/.npmignore
index 58e97a7875..efab07fb1b 100644
--- a/deps/npm/node_modules/hosted-git-info/.npmignore
+++ b/deps/npm/node_modules/hosted-git-info/.npmignore
@@ -1,3 +1,2 @@
-*~
-.#
-node_modules
+test
+.travis.yml
diff --git a/deps/npm/node_modules/hosted-git-info/.travis.yml b/deps/npm/node_modules/hosted-git-info/.travis.yml
deleted file mode 100644
index 7dc6619174..0000000000
--- a/deps/npm/node_modules/hosted-git-info/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: node_js
-node_js:
- - "0.11"
- - "0.10"
-script: "npm test"
diff --git a/deps/npm/node_modules/hosted-git-info/package.json b/deps/npm/node_modules/hosted-git-info/package.json
index 1f78066ca4..7c8475510e 100644
--- a/deps/npm/node_modules/hosted-git-info/package.json
+++ b/deps/npm/node_modules/hosted-git-info/package.json
@@ -1,39 +1,103 @@
{
- "name": "hosted-git-info",
- "version": "2.1.4",
- "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab",
- "main": "index.js",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/hosted-git-info.git"
+ "_args": [
+ [
+ {
+ "name": "hosted-git-info",
+ "raw": "hosted-git-info@latest",
+ "rawSpec": "latest",
+ "scope": null,
+ "spec": "latest",
+ "type": "tag"
+ },
+ "/Users/zkat/Documents/code/npm"
+ ]
+ ],
+ "_from": "hosted-git-info@latest",
+ "_id": "hosted-git-info@2.1.5",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/hosted-git-info",
+ "_nodeVersion": "5.10.1",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/hosted-git-info-2.1.5.tgz_1463518889246_0.20443619322031736"
},
- "keywords": [
- "git",
- "github",
- "bitbucket",
- "gitlab"
+ "_npmUser": {
+ "email": "kat@sykosomatic.org",
+ "name": "zkat"
+ },
+ "_npmVersion": "3.9.1",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "hosted-git-info",
+ "raw": "hosted-git-info@latest",
+ "rawSpec": "latest",
+ "scope": null,
+ "spec": "latest",
+ "type": "tag"
+ },
+ "_requiredBy": [
+ "/",
+ "/normalize-package-data",
+ "/npm-package-arg"
],
+ "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.5.tgz",
+ "_shasum": "0ba81d90da2e25ab34a332e6ec77936e1598118b",
+ "_shrinkwrap": null,
+ "_spec": "hosted-git-info@latest",
+ "_where": "/Users/zkat/Documents/code/npm",
"author": {
- "name": "Rebecca Turner",
"email": "me@re-becca.org",
+ "name": "Rebecca Turner",
"url": "http://re-becca.org"
},
- "license": "ISC",
"bugs": {
"url": "https://github.com/npm/hosted-git-info/issues"
},
- "homepage": "https://github.com/npm/hosted-git-info",
- "scripts": {
- "test": "standard && tap test/*.js"
- },
+ "dependencies": {},
+ "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab",
"devDependencies": {
"standard": "^3.3.2",
"tap": "^0.4.13"
},
- "readme": "# hosted-git-info\n\nThis will let you identify and transform various git hosts URLs between\nprotocols. It also can tell you what the URL is for the raw path for\nparticular file for direct access without git.\n\n## Usage\n\n```javascript\nvar hostedGitInfo = require(\"hosted-git-info\")\nvar info = hostedGitInfo.fromUrl(\"git@github.com:npm/hosted-git-info.git\")\n/* info looks like:\n{\n type: \"github\",\n domain: \"github.com\",\n user: \"npm\",\n project: \"hosted-git-info\"\n}\n*/\n```\n\nIf the URL can't be matched with a git host, `null` will be returned. We\ncan match git, ssh and https urls. Additionally, we can match ssh connect\nstrings (`git@github.com:npm/hosted-git-info`) and shortcuts (eg,\n`github:npm/hosted-git-info`). Github specifically, is detected in the case\nof a third, unprefixed, form: `npm/hosted-git-info`.\n\nIf it does match, the returned object has properties of:\n\n* info.type -- The short name of the service\n* info.domain -- The domain for git protocol use\n* info.user -- The name of the user/org on the git host\n* info.project -- The name of the project on the git host\n\nAnd methods of:\n\n* info.file(path)\n\nGiven the path of a file relative to the repository, returns a URL for\ndirectly fetching it from the githost. If no committish was set then\n`master` will be used as the default.\n\nFor example `hostedGitInfo.fromUrl(\"git@github.com:npm/hosted-git-info.git#v1.0.0\").file(\"package.json\")`\nwould return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/package.json`\n\n* info.shortcut()\n\neg, `github:npm/hosted-git-info`\n\n* info.browse()\n\neg, `https://github.com/npm/hosted-git-info/tree/v1.2.0`\n\n* info.bugs()\n\neg, `https://github.com/npm/hosted-git-info/issues`\n\n* info.docs()\n\neg, `https://github.com/npm/hosted-git-info/tree/v1.2.0#readme`\n\n* info.https()\n\neg, `git+https://github.com/npm/hosted-git-info.git`\n\n* info.sshurl()\n\neg, `git+ssh://git@github.com/npm/hosted-git-info.git`\n\n* info.ssh()\n\neg, `git@github.com:npm/hosted-git-info.git`\n\n* info.path()\n\neg, `npm/hosted-git-info`\n\n* info.getDefaultRepresentation()\n\nReturns the default output type. The default output type is based on the\nstring you passed in to be parsed\n\n* info.toString()\n\nUses the getDefaultRepresentation to call one of the other methods to get a URL for\nthis resource. As such `hostedGitInfo.fromUrl(url).toString()` will give\nyou a normalized version of the URL that still uses the same protocol.\n\nShortcuts will still be returned as shortcuts, but the special case github\nform of `org/project` will be normalized to `github:org/project`.\n\nSSH connect strings will be normalized into `git+ssh` URLs.\n\n\n## Supported hosts\n\nCurrently this supports Github, Bitbucket and Gitlab. Pull requests for\nadditional hosts welcome.\n\n",
- "readmeFilename": "README.md",
- "gitHead": "9e1a36df8eb050a663713c79e56d89dadba2bd8d",
- "_id": "hosted-git-info@2.1.4",
- "_shasum": "d9e953b26988be88096c46e926494d9604c300f8",
- "_from": "hosted-git-info@>=2.1.4 <2.2.0"
+ "directories": {},
+ "dist": {
+ "shasum": "0ba81d90da2e25ab34a332e6ec77936e1598118b",
+ "tarball": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.5.tgz"
+ },
+ "gitHead": "4e6bb323a97a57c18e6b4b891527e26154d04fbe",
+ "homepage": "https://github.com/npm/hosted-git-info",
+ "keywords": [
+ "git",
+ "github",
+ "bitbucket",
+ "gitlab"
+ ],
+ "license": "ISC",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "email": "me@re-becca.org",
+ "name": "iarna"
+ },
+ {
+ "email": "ogd@aoaioxxysz.net",
+ "name": "othiym23"
+ },
+ {
+ "email": "kat@sykosomatic.org",
+ "name": "zkat"
+ }
+ ],
+ "name": "hosted-git-info",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/hosted-git-info.git"
+ },
+ "scripts": {
+ "test": "standard && tap test/*.js"
+ },
+ "version": "2.1.5"
}
diff --git a/deps/npm/node_modules/hosted-git-info/test/basic.js b/deps/npm/node_modules/hosted-git-info/test/basic.js
deleted file mode 100644
index 0b93f50e20..0000000000
--- a/deps/npm/node_modules/hosted-git-info/test/basic.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict'
-var HostedGit = require('../index')
-var test = require('tap').test
-
-test('basic', function (t) {
- t.is(HostedGit.fromUrl('https://google.com'), undefined, 'null on failure')
- t.is(HostedGit.fromUrl('https://github.com/abc/def').getDefaultRepresentation(), 'https', 'match https urls')
- t.is(HostedGit.fromUrl('ssh://git@github.com/abc/def').getDefaultRepresentation(), 'sshurl', 'match ssh urls')
- t.is(HostedGit.fromUrl('git+ssh://git@github.com/abc/def').getDefaultRepresentation(), 'sshurl', 'match git+ssh urls')
- t.is(HostedGit.fromUrl('git+https://github.com/abc/def').getDefaultRepresentation(), 'https', 'match git+https urls')
- t.is(HostedGit.fromUrl('git@github.com:abc/def').getDefaultRepresentation(), 'sshurl', 'match ssh connect strings')
- t.is(HostedGit.fromUrl('git://github.com/abc/def').getDefaultRepresentation(), 'git', 'match git urls')
- t.is(HostedGit.fromUrl('github:abc/def').getDefaultRepresentation(), 'shortcut', 'match shortcuts')
- t.end()
-})
diff --git a/deps/npm/node_modules/hosted-git-info/test/bitbucket-https-with-embedded-auth.js b/deps/npm/node_modules/hosted-git-info/test/bitbucket-https-with-embedded-auth.js
deleted file mode 100644
index a2feb2f0e1..0000000000
--- a/deps/npm/node_modules/hosted-git-info/test/bitbucket-https-with-embedded-auth.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict'
-var HostedGit = require('../index')
-var test = require('tap').test
-
-test('Bitbucket HTTPS URLs with embedded auth', function (t) {
- t.is(
- HostedGit.fromUrl('https://user:pass@bitbucket.org/user/repo.git').toString(),
- 'git+https://user:pass@bitbucket.org/user/repo.git',
- 'credentials were included in URL'
- )
- t.is(
- HostedGit.fromUrl('https://user:pass@bitbucket.org/user/repo').toString(),
- 'git+https://user:pass@bitbucket.org/user/repo.git',
- 'credentials were included in URL'
- )
- t.is(
- HostedGit.fromUrl('git+https://user:pass@bitbucket.org/user/repo.git').toString(),
- 'git+https://user:pass@bitbucket.org/user/repo.git',
- 'credentials were included in URL'
- )
- t.is(
- HostedGit.fromUrl('git+https://user:pass@bitbucket.org/user/repo').toString(),
- 'git+https://user:pass@bitbucket.org/user/repo.git',
- 'credentials were included in URL'
- )
- t.end()
-})
diff --git a/deps/npm/node_modules/hosted-git-info/test/bitbucket.js b/deps/npm/node_modules/hosted-git-info/test/bitbucket.js
deleted file mode 100644
index 72e4ba113d..0000000000
--- a/deps/npm/node_modules/hosted-git-info/test/bitbucket.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict'
-var HostedGit = require('../index')
-var test = require('tap').test
-
-test('fromUrl(bitbucket url)', function (t) {
- function verify (host, label, branch) {
- var hostinfo = HostedGit.fromUrl(host)
- var hash = branch ? '#' + branch : ''
- t.ok(hostinfo, label)
- if (!hostinfo) return
- t.is(hostinfo.https(), 'git+https://bitbucket.org/111/222.git' + hash, label + ' -> https')
- t.is(hostinfo.browse(), 'https://bitbucket.org/111/222' + (branch ? '/src/' + branch : ''), label + ' -> browse')
- t.is(hostinfo.docs(), 'https://bitbucket.org/111/222' + (branch ? '/src/' + branch : '') + '#readme', label + ' -> docs')
- t.is(hostinfo.ssh(), 'git@bitbucket.org:111/222.git' + hash, label + ' -> ssh')
- t.is(hostinfo.sshurl(), 'git+ssh://git@bitbucket.org/111/222.git' + hash, label + ' -> sshurl')
- t.is(hostinfo.shortcut(), 'bitbucket:111/222' + hash, label + ' -> shortcut')
- t.is(hostinfo.file('C'), 'https://bitbucket.org/111/222/raw/' + (branch || 'master') + '/C', label + ' -> file')
- }
-
- require('./lib/standard-tests')(verify, 'bitbucket.org', 'bitbucket')
-
- t.end()
-})
diff --git a/deps/npm/node_modules/hosted-git-info/test/gist.js b/deps/npm/node_modules/hosted-git-info/test/gist.js
deleted file mode 100644
index cf36d3c8dd..0000000000
--- a/deps/npm/node_modules/hosted-git-info/test/gist.js
+++ /dev/null
@@ -1,41 +0,0 @@
-'use strict'
-var HostedGit = require('../index')
-var test = require('tap').test
-
-test('fromUrl(gist url)', function (t) {
- function verify (host, label, branch) {
- var hostinfo = HostedGit.fromUrl(host)
- var hash = branch ? '#' + branch : ''
- t.ok(hostinfo, label)
- if (!hostinfo) return
- t.is(hostinfo.https(), 'git+https://gist.github.com/222.git' + hash, label + ' -> https')
- t.is(hostinfo.git(), 'git://gist.github.com/222.git' + hash, label + ' -> git')
- t.is(hostinfo.browse(), 'https://gist.github.com/222' + (branch ? '/' + branch : ''), label + ' -> browse')
- t.is(hostinfo.bugs(), 'https://gist.github.com/222', label + ' -> bugs')
- t.is(hostinfo.docs(), 'https://gist.github.com/222' + (branch ? '/' + branch : ''), label + ' -> docs')
- t.is(hostinfo.ssh(), 'git@gist.github.com:/222.git' + hash, label + ' -> ssh')
- t.is(hostinfo.sshurl(), 'git+ssh://git@gist.github.com/222.git' + hash, label + ' -> sshurl')
- t.is(hostinfo.shortcut(), 'gist:222' + hash, label + ' -> shortcut')
- if (hostinfo.user) {
- t.is(hostinfo.file('C'), 'https://gist.githubusercontent.com/111/222/raw/' + (branch ? branch + '/' : '') + 'C', label + ' -> file')
- }
- }
-
- verify('git@gist.github.com:222.git', 'git@')
- var hostinfo = HostedGit.fromUrl('git@gist.github.com:/ef860c7z5e0de3179341.git')
- if (t.ok(hostinfo, 'git@hex')) {
- t.is(hostinfo.https(), 'git+https://gist.github.com/ef860c7z5e0de3179341.git', 'git@hex -> https')
- }
- verify('git@gist.github.com:/222.git', 'git@/')
- verify('git://gist.github.com/222', 'git')
- verify('git://gist.github.com/222.git', 'git.git')
- verify('git://gist.github.com/222#branch', 'git#branch', 'branch')
- verify('git://gist.github.com/222.git#branch', 'git.git#branch', 'branch')
-
- require('./lib/standard-tests')(verify, 'gist.github.com', 'gist')
-
- verify(HostedGit.fromUrl('gist:111/222').toString(), 'round-tripped shortcut')
- verify('gist:222', 'shortened shortcut')
-
- t.end()
-})
diff --git a/deps/npm/node_modules/hosted-git-info/test/github.js b/deps/npm/node_modules/hosted-git-info/test/github.js
deleted file mode 100644
index 56098a3e39..0000000000
--- a/deps/npm/node_modules/hosted-git-info/test/github.js
+++ /dev/null
@@ -1,40 +0,0 @@
-'use strict'
-var HostedGit = require('../index')
-var test = require('tap').test
-
-test('fromUrl(github url)', function (t) {
- function verify (host, label, branch) {
- var hostinfo = HostedGit.fromUrl(host)
- var hash = branch ? '#' + branch : ''
- t.ok(hostinfo, label)
- if (!hostinfo) return
- t.is(hostinfo.https(), 'git+https://github.com/111/222.git' + hash, label + ' -> https')
- t.is(hostinfo.git(), 'git://github.com/111/222.git' + hash, label + ' -> git')
- t.is(hostinfo.browse(), 'https://github.com/111/222' + (branch ? '/tree/' + branch : ''), label + ' -> browse')
- t.is(hostinfo.bugs(), 'https://github.com/111/222/issues', label + ' -> bugs')
- t.is(hostinfo.docs(), 'https://github.com/111/222' + (branch ? '/tree/' + branch : '') + '#readme', label + ' -> docs')
- t.is(hostinfo.ssh(), 'git@github.com:111/222.git' + hash, label + ' -> ssh')
- t.is(hostinfo.sshurl(), 'git+ssh://git@github.com/111/222.git' + hash, label + ' -> sshurl')
- t.is(hostinfo.shortcut(), 'github:111/222' + hash, label + ' -> shortcut')
- t.is(hostinfo.file('C'), 'https://raw.githubusercontent.com/111/222/' + (branch || 'master') + '/C', label + ' -> file')
- }
-
- // github shorturls
- verify('111/222', 'github-short')
- verify('111/222#branch', 'github-short#branch', 'branch')
-
- // insecure protocols
- verify('git://github.com/111/222', 'git')
- verify('git://github.com/111/222.git', 'git.git')
- verify('git://github.com/111/222#branch', 'git#branch', 'branch')
- verify('git://github.com/111/222.git#branch', 'git.git#branch', 'branch')
-
- verify('http://github.com/111/222', 'http')
- verify('http://github.com/111/222.git', 'http.git')
- verify('http://github.com/111/222#branch', 'http#branch', 'branch')
- verify('http://github.com/111/222.git#branch', 'http.git#branch', 'branch')
-
- require('./lib/standard-tests')(verify, 'github.com', 'github')
-
- t.end()
-})
diff --git a/deps/npm/node_modules/hosted-git-info/test/gitlab.js b/deps/npm/node_modules/hosted-git-info/test/gitlab.js
deleted file mode 100644
index 315c9085bd..0000000000
--- a/deps/npm/node_modules/hosted-git-info/test/gitlab.js
+++ /dev/null
@@ -1,23 +0,0 @@
-'use strict'
-var HostedGit = require('../index')
-var test = require('tap').test
-
-test('fromUrl(gitlab url)', function (t) {
- function verify (host, label, branch) {
- var hostinfo = HostedGit.fromUrl(host)
- var hash = branch ? '#' + branch : ''
- t.ok(hostinfo, label)
- if (!hostinfo) return
- t.is(hostinfo.https(), 'git+https://gitlab.com/111/222.git' + hash, label + ' -> https')
- t.is(hostinfo.browse(), 'https://gitlab.com/111/222' + (branch ? '/tree/' + branch : ''), label + ' -> browse')
- t.is(hostinfo.docs(), 'https://gitlab.com/111/222' + (branch ? '/tree/' + branch : '') + '#README', label + ' -> docs')
- t.is(hostinfo.ssh(), 'git@gitlab.com:111/222.git' + hash, label + ' -> ssh')
- t.is(hostinfo.sshurl(), 'git+ssh://git@gitlab.com/111/222.git' + hash, label + ' -> sshurl')
- t.is(hostinfo.shortcut(), 'gitlab:111/222' + hash, label + ' -> shortcut')
- t.is(hostinfo.file('C'), 'https://gitlab.com/111/222/raw/' + (branch || 'master') + '/C', label + ' -> file')
- }
-
- require('./lib/standard-tests')(verify, 'gitlab.com', 'gitlab')
-
- t.end()
-})
diff --git a/deps/npm/node_modules/hosted-git-info/test/https-with-inline-auth.js b/deps/npm/node_modules/hosted-git-info/test/https-with-inline-auth.js
deleted file mode 100644
index 5e2f5b5a38..0000000000
--- a/deps/npm/node_modules/hosted-git-info/test/https-with-inline-auth.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict'
-var HostedGit = require('../index')
-var test = require('tap').test
-
-test('HTTPS GitHub URL with embedded auth -- generally not a good idea', function (t) {
- function verify (host, label, branch) {
- var hostinfo = HostedGit.fromUrl(host)
- var hash = branch ? '#' + branch : ''
- t.ok(hostinfo, label)
- if (!hostinfo) return
- t.is(hostinfo.https(), 'git+https://user:pass@github.com/111/222.git' + hash, label + ' -> https')
- t.is(hostinfo.git(), 'git://user:pass@github.com/111/222.git' + hash, label + ' -> git')
- t.is(hostinfo.browse(), 'https://github.com/111/222' + (branch ? '/tree/' + branch : ''), label + ' -> browse')
- t.is(hostinfo.bugs(), 'https://github.com/111/222/issues', label + ' -> bugs')
- t.is(hostinfo.docs(), 'https://github.com/111/222' + (branch ? '/tree/' + branch : '') + '#readme', label + ' -> docs')
- t.is(hostinfo.ssh(), 'git@github.com:111/222.git' + hash, label + ' -> ssh')
- t.is(hostinfo.sshurl(), 'git+ssh://git@github.com/111/222.git' + hash, label + ' -> sshurl')
- t.is(hostinfo.shortcut(), 'github:111/222' + hash, label + ' -> shortcut')
- t.is(hostinfo.file('C'), 'https://user:pass@raw.githubusercontent.com/111/222/' + (branch || 'master') + '/C', label + ' -> file')
- }
-
- // insecure protocols
- verify('git://user:pass@github.com/111/222', 'git')
- verify('git://user:pass@github.com/111/222.git', 'git.git')
- verify('git://user:pass@github.com/111/222#branch', 'git#branch', 'branch')
- verify('git://user:pass@github.com/111/222.git#branch', 'git.git#branch', 'branch')
-
- verify('https://user:pass@github.com/111/222', 'https')
- verify('https://user:pass@github.com/111/222.git', 'https.git')
- verify('https://user:pass@github.com/111/222#branch', 'https#branch', 'branch')
- verify('https://user:pass@github.com/111/222.git#branch', 'https.git#branch', 'branch')
-
- verify('http://user:pass@github.com/111/222', 'http')
- verify('http://user:pass@github.com/111/222.git', 'http.git')
- verify('http://user:pass@github.com/111/222#branch', 'http#branch', 'branch')
- verify('http://user:pass@github.com/111/222.git#branch', 'http.git#branch', 'branch')
-
- t.end()
-})
diff --git a/deps/npm/node_modules/hosted-git-info/test/lib/standard-tests.js b/deps/npm/node_modules/hosted-git-info/test/lib/standard-tests.js
deleted file mode 100644
index 929fcca42e..0000000000
--- a/deps/npm/node_modules/hosted-git-info/test/lib/standard-tests.js
+++ /dev/null
@@ -1,27 +0,0 @@
-'use strict'
-module.exports = function (verify, domain, shortname) {
- verify('https://' + domain + '/111/222', 'https')
- verify('https://' + domain + '/111/222.git', 'https.git')
- verify('https://' + domain + '/111/222#branch', 'https#branch', 'branch')
- verify('https://' + domain + '/111/222.git#branch', 'https.git#branch', 'branch')
-
- verify('git+https://' + domain + '/111/222', 'git+https')
- verify('git+https://' + domain + '/111/222.git', 'git+https.git')
- verify('git+https://' + domain + '/111/222#branch', 'git+https#branch', 'branch')
- verify('git+https://' + domain + '/111/222.git#branch', 'git+https.git#branch', 'branch')
-
- verify('git@' + domain + ':111/222', 'ssh')
- verify('git@' + domain + ':111/222.git', 'ssh.git')
- verify('git@' + domain + ':111/222#branch', 'ssh', 'branch')
- verify('git@' + domain + ':111/222.git#branch', 'ssh.git', 'branch')
-
- verify('git+ssh://git@' + domain + '/111/222', 'ssh url')
- verify('git+ssh://git@' + domain + '/111/222.git', 'ssh url.git')
- verify('git+ssh://git@' + domain + '/111/222#branch', 'ssh url#branch', 'branch')
- verify('git+ssh://git@' + domain + '/111/222.git#branch', 'ssh url.git#branch', 'branch')
-
- verify(shortname + ':111/222', 'shortcut')
- verify(shortname + ':111/222.git', 'shortcut.git')
- verify(shortname + ':111/222#branch', 'shortcut#branch', 'branch')
- verify(shortname + ':111/222.git#branch', 'shortcut.git#branch', 'branch')
-}
diff --git a/deps/npm/node_modules/inflight/package.json b/deps/npm/node_modules/inflight/package.json
index 48b4c0e160..e8ff95617a 100644
--- a/deps/npm/node_modules/inflight/package.json
+++ b/deps/npm/node_modules/inflight/package.json
@@ -1,36 +1,113 @@
{
- "name": "inflight",
- "version": "1.0.4",
- "description": "Add callbacks to requests in flight to avoid async duplication",
- "main": "inflight.js",
- "dependencies": {
- "once": "^1.3.0",
- "wrappy": "1"
+ "_args": [
+ [
+ {
+ "name": "inflight",
+ "raw": "inflight@latest",
+ "rawSpec": "latest",
+ "scope": null,
+ "spec": "latest",
+ "type": "tag"
+ },
+ "/Users/zkat/Documents/code/npm"
+ ]
+ ],
+ "_from": "inflight@latest",
+ "_id": "inflight@1.0.5",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/inflight",
+ "_nodeVersion": "5.10.1",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/inflight-1.0.5.tgz_1463529611443_0.00041943578980863094"
},
- "devDependencies": {
- "tap": "^0.4.10"
+ "_npmUser": {
+ "email": "kat@sykosomatic.org",
+ "name": "zkat"
},
- "scripts": {
- "test": "tap test.js"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/inflight.git"
+ "_npmVersion": "3.9.1",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "inflight",
+ "raw": "inflight@latest",
+ "rawSpec": "latest",
+ "scope": null,
+ "spec": "latest",
+ "type": "tag"
},
+ "_requiredBy": [
+ "/",
+ "/glob",
+ "/init-package-json/glob",
+ "/node-gyp/glob",
+ "/read-package-json/glob",
+ "/standard/eslint/glob",
+ "/standard/standard-engine/deglob/glob",
+ "/tap/nyc/glob",
+ "/tap/nyc/istanbul/fileset/glob",
+ "/tap/tap-mocha-reporter/glob"
+ ],
+ "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz",
+ "_shasum": "db3204cd5a9de2e6cd890b85c6e2f66bcf4f620a",
+ "_shrinkwrap": null,
+ "_spec": "inflight@latest",
+ "_where": "/Users/zkat/Documents/code/npm",
"author": {
- "name": "Isaac Z. Schlueter",
"email": "i@izs.me",
+ "name": "Isaac Z. Schlueter",
"url": "http://blog.izs.me/"
},
"bugs": {
"url": "https://github.com/isaacs/inflight/issues"
},
+ "dependencies": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ },
+ "description": "Add callbacks to requests in flight to avoid async duplication",
+ "devDependencies": {
+ "tap": "^1.2.0"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "db3204cd5a9de2e6cd890b85c6e2f66bcf4f620a",
+ "tarball": "https://registry.npmjs.org/inflight/-/inflight-1.0.5.tgz"
+ },
+ "files": [
+ "inflight.js"
+ ],
+ "gitHead": "559e37b4f6327fca797fe8d7fe8ed6d9cae08821",
"homepage": "https://github.com/isaacs/inflight",
"license": "ISC",
- "readme": "# inflight\n\nAdd callbacks to requests in flight to avoid async duplication\n\n## USAGE\n\n```javascript\nvar inflight = require('inflight')\n\n// some request that does some stuff\nfunction req(key, callback) {\n // key is any random string. like a url or filename or whatever.\n //\n // will return either a falsey value, indicating that the\n // request for this key is already in flight, or a new callback\n // which when called will call all callbacks passed to inflightk\n // with the same key\n callback = inflight(key, callback)\n\n // If we got a falsey value back, then there's already a req going\n if (!callback) return\n\n // this is where you'd fetch the url or whatever\n // callback is also once()-ified, so it can safely be assigned\n // to multiple events etc. First call wins.\n setTimeout(function() {\n callback(null, key)\n }, 100)\n}\n\n// only assigns a single setTimeout\n// when it dings, all cbs get called\nreq('foo', cb1)\nreq('foo', cb2)\nreq('foo', cb3)\nreq('foo', cb4)\n```\n",
- "readmeFilename": "README.md",
- "_id": "inflight@1.0.4",
- "_shasum": "6cbb4521ebd51ce0ec0a936bfd7657ef7e9b172a",
- "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.4.tgz",
- "_from": "inflight@>=1.0.4 <1.1.0"
+ "main": "inflight.js",
+ "maintainers": [
+ {
+ "email": "me@re-becca.org",
+ "name": "iarna"
+ },
+ {
+ "email": "i@izs.me",
+ "name": "isaacs"
+ },
+ {
+ "email": "ogd@aoaioxxysz.net",
+ "name": "othiym23"
+ },
+ {
+ "email": "kat@sykosomatic.org",
+ "name": "zkat"
+ }
+ ],
+ "name": "inflight",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/inflight.git"
+ },
+ "scripts": {
+ "test": "tap test.js"
+ },
+ "version": "1.0.5"
}
diff --git a/deps/npm/node_modules/inflight/test.js b/deps/npm/node_modules/inflight/test.js
deleted file mode 100644
index 2bb75b3881..0000000000
--- a/deps/npm/node_modules/inflight/test.js
+++ /dev/null
@@ -1,97 +0,0 @@
-var test = require('tap').test
-var inf = require('./inflight.js')
-
-
-function req (key, cb) {
- cb = inf(key, cb)
- if (cb) setTimeout(function () {
- cb(key)
- cb(key)
- })
- return cb
-}
-
-test('basic', function (t) {
- var calleda = false
- var a = req('key', function (k) {
- t.notOk(calleda)
- calleda = true
- t.equal(k, 'key')
- if (calledb) t.end()
- })
- t.ok(a, 'first returned cb function')
-
- var calledb = false
- var b = req('key', function (k) {
- t.notOk(calledb)
- calledb = true
- t.equal(k, 'key')
- if (calleda) t.end()
- })
-
- t.notOk(b, 'second should get falsey inflight response')
-})
-
-test('timing', function (t) {
- var expect = [
- 'method one',
- 'start one',
- 'end one',
- 'two',
- 'tick',
- 'three'
- ]
- var i = 0
-
- function log (m) {
- t.equal(m, expect[i], m + ' === ' + expect[i])
- ++i
- if (i === expect.length)
- t.end()
- }
-
- function method (name, cb) {
- log('method ' + name)
- process.nextTick(cb)
- }
-
- var one = inf('foo', function () {
- log('start one')
- var three = inf('foo', function () {
- log('three')
- })
- if (three) method('three', three)
- log('end one')
- })
-
- method('one', one)
-
- var two = inf('foo', function () {
- log('two')
- })
- if (two) method('one', two)
-
- process.nextTick(log.bind(null, 'tick'))
-})
-
-test('parameters', function (t) {
- t.plan(8)
-
- var a = inf('key', function (first, second, third) {
- t.equal(first, 1)
- t.equal(second, 2)
- t.equal(third, 3)
- })
- t.ok(a, 'first returned cb function')
-
- var b = inf('key', function (first, second, third) {
- t.equal(first, 1)
- t.equal(second, 2)
- t.equal(third, 3)
- })
- t.notOk(b, 'second should get falsey inflight response')
-
- setTimeout(function () {
- a(1, 2, 3)
- })
-})
diff --git a/deps/npm/node_modules/init-package-json/init-package-json.js b/deps/npm/node_modules/init-package-json/init-package-json.js
index 87c72ccf94..7dc4b0a392 100644
--- a/deps/npm/node_modules/init-package-json/init-package-json.js
+++ b/deps/npm/node_modules/init-package-json/init-package-json.js
@@ -40,7 +40,7 @@ function init (dir, input, config, cb) {
}
}
- var package = path.resolve(dir, 'package.json')
+ var packageFile = path.resolve(dir, 'package.json')
input = path.resolve(input)
var pkg
var ctx = { yes: yes(config) }
@@ -49,14 +49,14 @@ function init (dir, input, config, cb) {
readJson.extraSet = es.filter(function (fn) {
return fn.name !== 'authors' && fn.name !== 'mans'
})
- readJson(package, function (er, d) {
+ readJson(packageFile, function (er, d) {
readJson.extraSet = es
if (er) pkg = {}
else pkg = d
- ctx.filename = package
- ctx.dirname = path.dirname(package)
+ ctx.filename = packageFile
+ ctx.dirname = path.dirname(packageFile)
ctx.basename = path.basename(ctx.dirname)
if (!pkg.version || !semver.valid(pkg.version))
delete pkg.version
@@ -80,7 +80,7 @@ function init (dir, input, config, cb) {
readJson.extraSet = es.filter(function (fn) {
return fn.name !== 'authors' && fn.name !== 'mans'
})
- readJson.extras(package, pkg, function (er, pkg) {
+ readJson.extras(packageFile, pkg, function (er, pkg) {
readJson.extraSet = es
if (er) return cb(er, pkg)
pkg = unParsePeople(pkg)
@@ -105,9 +105,9 @@ function init (dir, input, config, cb) {
var d = JSON.stringify(pkg, null, 2) + '\n'
function write (yes) {
- fs.writeFile(package, d, 'utf8', function (er) {
+ fs.writeFile(packageFile, d, 'utf8', function (er) {
if (!er && yes && !config.get('silent')) {
- console.log('Wrote to %s:\n\n%s\n', package, d)
+ console.log('Wrote to %s:\n\n%s\n', packageFile, d)
}
return cb(er, pkg)
})
@@ -115,7 +115,7 @@ function init (dir, input, config, cb) {
if (ctx.yes) {
return write(true)
}
- console.log('About to write to %s:\n\n%s\n', package, d)
+ console.log('About to write to %s:\n\n%s\n', packageFile, d)
read({prompt:'Is this ok? ', default: 'yes'}, function (er, ok) {
if (!ok || ok.toLowerCase().charAt(0) !== 'y') {
console.log('Aborted.')
diff --git a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore b/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore
index fd4f2b066b..ae5d8c36ac 100644
--- a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore
+++ b/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore
@@ -1,2 +1,5 @@
-node_modules
-.DS_Store
+test
+.gitignore
+.travis.yml
+Makefile
+example.js
diff --git a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml b/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml
deleted file mode 100644
index 6e5919de39..0000000000
--- a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: node_js
-node_js:
- - "0.10"
diff --git a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile b/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile
deleted file mode 100644
index dd2730cfde..0000000000
--- a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-
-test:
- @node_modules/.bin/tape test/*.js
-
-.PHONY: test
diff --git a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md b/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md
index 421f3aa5f9..d6880b2f36 100644
--- a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md
+++ b/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md
@@ -1,6 +1,6 @@
# balanced-match
-Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`.
+Match balanced string pairs, like `{` and `}` or `<b>` and `</b>`. Supports regular expressions as well!
[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match)
[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match)
@@ -16,6 +16,7 @@ var balanced = require('balanced-match');
console.log(balanced('{', '}', 'pre{in{nested}}post'));
console.log(balanced('{', '}', 'pre{first}between{second}post'));
+console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post'));
```
The matches are:
@@ -28,6 +29,7 @@ $ node example.js
pre: 'pre',
body: 'first',
post: 'between{second}post' }
+{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' }
```
## API
diff --git a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js b/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js
deleted file mode 100644
index 9ce76f480a..0000000000
--- a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js
+++ /dev/null
@@ -1,4 +0,0 @@
-var balanced = require('./');
-
-console.log(balanced('{', '}', 'pre{in{nested}}post'));
-console.log(balanced('{', '}', 'pre{first}between{second}post'));
diff --git a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js b/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js
index 75f3d71cba..4670f7f79f 100644
--- a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js
+++ b/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js
@@ -1,5 +1,8 @@
module.exports = balanced;
function balanced(a, b, str) {
+ if (a instanceof RegExp) a = maybeMatch(a, str);
+ if (b instanceof RegExp) b = maybeMatch(b, str);
+
var r = range(a, b, str);
return r && {
@@ -11,6 +14,11 @@ function balanced(a, b, str) {
};
}
+function maybeMatch(reg, str) {
+ var m = str.match(reg);
+ return m ? m[0] : null;
+}
+
balanced.range = range;
function range(a, b, str) {
var begs, beg, left, right, result;
diff --git a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json b/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
index 652900ae4c..306b73b343 100644
--- a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
+++ b/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
@@ -1,40 +1,49 @@
{
"_args": [
[
- "balanced-match@^0.3.0",
- "/Users/rebecca/code/npm/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion"
- ],
- [
- "balanced-match@^0.3.0",
- "/Users/rebecca/code/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion"
+ {
+ "name": "balanced-match",
+ "raw": "balanced-match@^0.4.1",
+ "rawSpec": "^0.4.1",
+ "scope": null,
+ "spec": ">=0.4.1 <0.5.0",
+ "type": "range"
+ },
+ "/Users/zkat/Documents/code/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion"
]
],
- "_from": "balanced-match@>=0.3.0 <0.4.0",
- "_id": "balanced-match@0.3.0",
+ "_from": "balanced-match@>=0.4.1 <0.5.0",
+ "_id": "balanced-match@0.4.1",
"_inCache": true,
"_installable": true,
"_location": "/init-package-json/glob/minimatch/brace-expansion/balanced-match",
- "_nodeVersion": "4.2.1",
+ "_nodeVersion": "6.0.0",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/balanced-match-0.4.1.tgz_1462129663650_0.39764496590942144"
+ },
"_npmUser": {
"email": "julian@juliangruber.com",
"name": "juliangruber"
},
- "_npmVersion": "2.14.7",
+ "_npmVersion": "3.8.6",
"_phantomChildren": {},
"_requested": {
"name": "balanced-match",
- "raw": "balanced-match@^0.3.0",
- "rawSpec": "^0.3.0",
+ "raw": "balanced-match@^0.4.1",
+ "rawSpec": "^0.4.1",
"scope": null,
- "spec": ">=0.3.0 <0.4.0",
+ "spec": ">=0.4.1 <0.5.0",
"type": "range"
},
"_requiredBy": [
"/init-package-json/glob/minimatch/brace-expansion"
],
+ "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz",
+ "_shasum": "19053e2e0748eadb379da6c09d455cf5e1039335",
"_shrinkwrap": null,
- "_spec": "balanced-match@^0.3.0",
- "_where": "/Users/rebecca/code/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion",
+ "_spec": "balanced-match@^0.4.1",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion",
"author": {
"email": "mail@juliangruber.com",
"name": "Julian Gruber",
@@ -46,14 +55,14 @@
"dependencies": {},
"description": "Match balanced character pairs, like \"{\" and \"}\"",
"devDependencies": {
- "tape": "~4.2.2"
+ "tape": "~4.5.0"
},
"directories": {},
"dist": {
- "shasum": "a91cdd1ebef1a86659e70ff4def01625fc2d6756",
- "tarball": "http://registry.npmjs.org/balanced-match/-/balanced-match-0.3.0.tgz"
+ "shasum": "19053e2e0748eadb379da6c09d455cf5e1039335",
+ "tarball": "https://registry.npmjs.org/balanced-match/-/balanced-match-0.4.1.tgz"
},
- "gitHead": "a7114b0986554787e90b7ac595a043ca75ea77e5",
+ "gitHead": "7004b289baaaab6a832f4901735e29d37cc2a863",
"homepage": "https://github.com/juliangruber/balanced-match",
"keywords": [
"match",
@@ -96,5 +105,5 @@
],
"files": "test/*.js"
},
- "version": "0.3.0"
+ "version": "0.4.1"
}
diff --git a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js b/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js
deleted file mode 100644
index f5e98e3f2a..0000000000
--- a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js
+++ /dev/null
@@ -1,84 +0,0 @@
-var test = require('tape');
-var balanced = require('..');
-
-test('balanced', function(t) {
- t.deepEqual(balanced('{', '}', 'pre{in{nest}}post'), {
- start: 3,
- end: 12,
- pre: 'pre',
- body: 'in{nest}',
- post: 'post'
- });
- t.deepEqual(balanced('{', '}', '{{{{{{{{{in}post'), {
- start: 8,
- end: 11,
- pre: '{{{{{{{{',
- body: 'in',
- post: 'post'
- });
- t.deepEqual(balanced('{', '}', 'pre{body{in}post'), {
- start: 8,
- end: 11,
- pre: 'pre{body',
- body: 'in',
- post: 'post'
- });
- t.deepEqual(balanced('{', '}', 'pre}{in{nest}}post'), {
- start: 4,
- end: 13,
- pre: 'pre}',
- body: 'in{nest}',
- post: 'post'
- });
- t.deepEqual(balanced('{', '}', 'pre{body}between{body2}post'), {
- start: 3,
- end: 8,
- pre: 'pre',
- body: 'body',
- post: 'between{body2}post'
- });
- t.notOk(balanced('{', '}', 'nope'), 'should be notOk');
- t.deepEqual(balanced('<b>', '</b>', 'pre<b>in<b>nest</b></b>post'), {
- start: 3,
- end: 19,
- pre: 'pre',
- body: 'in<b>nest</b>',
- post: 'post'
- });
- t.deepEqual(balanced('<b>', '</b>', 'pre</b><b>in<b>nest</b></b>post'), {
- start: 7,
- end: 23,
- pre: 'pre</b>',
- body: 'in<b>nest</b>',
- post: 'post'
- });
- t.deepEqual(balanced('{{', '}}', 'pre{{{in}}}post'), {
- start: 3,
- end: 9,
- pre: 'pre',
- body: '{in}',
- post: 'post'
- });
- t.deepEqual(balanced('{{{', '}}', 'pre{{{in}}}post'), {
- start: 3,
- end: 8,
- pre: 'pre',
- body: 'in',
- post: '}post'
- });
- t.deepEqual(balanced('{', '}', 'pre{{first}in{second}post'), {
- start: 4,
- end: 10,
- pre: 'pre{',
- body: 'first',
- post: 'in{second}post'
- });
- t.deepEqual(balanced('<?', '?>', 'pre<?>post'), {
- start: 3,
- end: 4,
- pre: 'pre',
- body: '',
- post: 'post'
- });
- t.end();
-});
diff --git a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json b/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json
index 1c2bcddd5a..ad188114f9 100644
--- a/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json
+++ b/deps/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json
@@ -1,29 +1,32 @@
{
"_args": [
[
- "brace-expansion@^1.0.0",
- "/Users/rebecca/code/npm/node_modules/glob/node_modules/minimatch"
- ],
- [
- "brace-expansion@^1.0.0",
- "/Users/rebecca/code/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch"
+ {
+ "name": "brace-expansion",
+ "raw": "brace-expansion@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "/Users/zkat/Documents/code/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch"
]
],
"_from": "brace-expansion@>=1.0.0 <2.0.0",
- "_id": "brace-expansion@1.1.3",
+ "_id": "brace-expansion@1.1.4",
"_inCache": true,
"_installable": true,
"_location": "/init-package-json/glob/minimatch/brace-expansion",
- "_nodeVersion": "5.5.0",
+ "_nodeVersion": "6.0.0",
"_npmOperationalInternal": {
- "host": "packages-6-west.internal.npmjs.com",
- "tmp": "tmp/brace-expansion-1.1.3.tgz_1455216688668_0.948847763473168"
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/brace-expansion-1.1.4.tgz_1462130058897_0.14984136167913675"
},
"_npmUser": {
"email": "julian@juliangruber.com",
"name": "juliangruber"
},
- "_npmVersion": "3.3.12",
+ "_npmVersion": "3.8.6",
"_phantomChildren": {},
"_requested": {
"name": "brace-expansion",
@@ -36,9 +39,11 @@
"_requiredBy": [
"/init-package-json/glob/minimatch"
],
+ "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.4.tgz",
+ "_shasum": "464a204c77f482c085c2a36c456bbfbafb67a127",
"_shrinkwrap": null,
"_spec": "brace-expansion@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/init-package-json/node_modules/glob/node_modules/minimatch",
"author": {
"email": "mail@juliangruber.com",
"name": "Julian Gruber",
@@ -48,19 +53,19 @@
"url": "https://github.com/juliangruber/brace-expansion/issues"
},
"dependencies": {
- "balanced-match": "^0.3.0",
+ "balanced-match": "^0.4.1",
"concat-map": "0.0.1"
},
"description": "Brace expansion as known from sh/bash",
"devDependencies": {
- "tape": "4.4.0"
+ "tape": "4.5.1"
},
"directories": {},
"dist": {
- "shasum": "46bff50115d47fc9ab89854abb87d98078a10991",
- "tarball": "http://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.3.tgz"
+ "shasum": "464a204c77f482c085c2a36c456bbfbafb67a127",
+ "tarball": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.4.tgz"
},
- "gitHead": "f0da1bb668e655f67b6b2d660c6e1c19e2a6f231",
+ "gitHead": "1660b75d0bf03b022e7888b576cd5a4080692c1d",
"homepage": "https://github.com/juliangruber/brace-expansion",
"keywords": [],
"license": "MIT",
@@ -102,5 +107,5 @@
],
"files": "test/*.js"
},
- "version": "1.1.3"
+ "version": "1.1.4"
}
diff --git a/deps/npm/node_modules/init-package-json/package.json b/deps/npm/node_modules/init-package-json/package.json
index 21e33c570c..fbca584dd5 100644
--- a/deps/npm/node_modules/init-package-json/package.json
+++ b/deps/npm/node_modules/init-package-json/package.json
@@ -1,39 +1,54 @@
{
"_args": [
[
- "init-package-json@~1.9.3",
- "/Users/rebecca/code/npm"
+ {
+ "name": "init-package-json",
+ "raw": "init-package-json@latest",
+ "rawSpec": "latest",
+ "scope": null,
+ "spec": "latest",
+ "type": "tag"
+ },
+ "/Users/zkat/Documents/code/npm"
]
],
- "_from": "init-package-json@>=1.9.3 <1.10.0",
- "_id": "init-package-json@1.9.3",
+ "_from": "init-package-json@latest",
+ "_id": "init-package-json@1.9.4",
"_inCache": true,
"_installable": true,
"_location": "/init-package-json",
- "_nodeVersion": "4.2.2",
+ "_nodeVersion": "5.10.1",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/init-package-json-1.9.4.tgz_1463610982259_0.011722659226506948"
+ },
"_npmUser": {
- "email": "me@re-becca.org",
- "name": "iarna"
+ "email": "kat@sykosomatic.org",
+ "name": "zkat"
},
- "_npmVersion": "3.5.4",
+ "_npmVersion": "3.9.1",
"_phantomChildren": {
+ "inflight": "1.0.5",
+ "inherits": "2.0.1",
+ "once": "1.3.3",
"read": "1.0.7"
},
"_requested": {
"name": "init-package-json",
- "raw": "init-package-json@~1.9.3",
- "rawSpec": "~1.9.3",
+ "raw": "init-package-json@latest",
+ "rawSpec": "latest",
"scope": null,
- "spec": ">=1.9.3 <1.10.0",
- "type": "range"
+ "spec": "latest",
+ "type": "tag"
},
"_requiredBy": [
"/"
],
- "_shasum": "ca2ff94709b6d9aaad66533c11a0aff645f15c7d",
+ "_resolved": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.9.4.tgz",
+ "_shasum": "b4053d0b40f0cf842a41966937cb3dc0f534e856",
"_shrinkwrap": null,
- "_spec": "init-package-json@~1.9.3",
- "_where": "/Users/rebecca/code/npm",
+ "_spec": "init-package-json@latest",
+ "_where": "/Users/zkat/Documents/code/npm",
"author": {
"email": "i@izs.me",
"name": "Isaac Z. Schlueter",
@@ -60,39 +75,39 @@
},
"directories": {},
"dist": {
- "shasum": "ca2ff94709b6d9aaad66533c11a0aff645f15c7d",
- "tarball": "http://registry.npmjs.org/init-package-json/-/init-package-json-1.9.3.tgz"
+ "shasum": "b4053d0b40f0cf842a41966937cb3dc0f534e856",
+ "tarball": "https://registry.npmjs.org/init-package-json/-/init-package-json-1.9.4.tgz"
},
- "gitHead": "12eb24ff2f75f84a4a27436bc6f6cb765cbd9ee2",
+ "gitHead": "3c34250fa58507056a94f3940ee2a28540f83592",
"homepage": "https://github.com/npm/init-package-json#readme",
"keywords": [
- "helper",
"init",
- "package",
"package.json",
- "prompt",
- "start",
+ "package",
+ "helper",
"wizard",
- "wizerd"
+ "wizerd",
+ "prompt",
+ "start"
],
"license": "ISC",
"main": "init-package-json.js",
"maintainers": [
{
- "name": "isaacs",
- "email": "isaacs@npmjs.com"
+ "email": "isaacs@npmjs.com",
+ "name": "isaacs"
},
{
- "name": "othiym23",
- "email": "ogd@aoaioxxysz.net"
+ "email": "ogd@aoaioxxysz.net",
+ "name": "othiym23"
},
{
- "name": "iarna",
- "email": "me@re-becca.org"
+ "email": "me@re-becca.org",
+ "name": "iarna"
},
{
- "name": "zkat",
- "email": "kat@sykosomatic.org"
+ "email": "kat@sykosomatic.org",
+ "name": "zkat"
}
],
"name": "init-package-json",
@@ -105,5 +120,5 @@
"scripts": {
"test": "tap test/*.js"
},
- "version": "1.9.3"
+ "version": "1.9.4"
}
diff --git a/deps/npm/node_modules/lodash._baseuniq/LICENSE b/deps/npm/node_modules/lodash._baseuniq/LICENSE
index bcbe13d67a..e0c69d5603 100644
--- a/deps/npm/node_modules/lodash._baseuniq/LICENSE
+++ b/deps/npm/node_modules/lodash._baseuniq/LICENSE
@@ -1,23 +1,47 @@
-The MIT License (MIT)
+Copyright jQuery Foundation and other contributors <https://jquery.org/>
-Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/deps/npm/node_modules/lodash._baseuniq/README.md b/deps/npm/node_modules/lodash._baseuniq/README.md
index 1d02b801f9..c18dbb6c37 100644
--- a/deps/npm/node_modules/lodash._baseuniq/README.md
+++ b/deps/npm/node_modules/lodash._baseuniq/README.md
@@ -1,4 +1,4 @@
-# lodash._baseuniq v4.5.1
+# lodash._baseuniq v4.6.0
The internal [lodash](https://lodash.com/) function `baseUniq` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var baseUniq = require('lodash._baseuniq');
```
-See the [package source](https://github.com/lodash/lodash/blob/4.5.1-npm-packages/lodash._baseuniq) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/4.6.0-npm-packages/lodash._baseuniq) for more details.
diff --git a/deps/npm/node_modules/lodash._baseuniq/index.js b/deps/npm/node_modules/lodash._baseuniq/index.js
index ffdc06f7b5..8f3094f9be 100644
--- a/deps/npm/node_modules/lodash._baseuniq/index.js
+++ b/deps/npm/node_modules/lodash._baseuniq/index.js
@@ -1,13 +1,13 @@
/**
- * lodash 4.5.1 (Custom Build) <https://lodash.com/>
+ * lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
-var SetCache = require('lodash._setcache'),
- createSet = require('lodash._createset');
+var createSet = require('lodash._createset'),
+ root = require('lodash._root');
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
@@ -15,6 +15,19 @@ var LARGE_ARRAY_SIZE = 200;
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
+/** `Object#toString` result references. */
+var funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]';
+
+/**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
+ */
+var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+
+/** Used to detect host constructors (Safari). */
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
/**
* A specialized version of `_.includes` for arrays without support for
* specifying an index to search from.
@@ -74,6 +87,18 @@ function baseIndexOf(array, value, fromIndex) {
}
/**
+ * Checks if a cache value for `key` exists.
+ *
+ * @private
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function cacheHas(cache, key) {
+ return cache.has(key);
+}
+
+/**
* Gets the index at which the first occurrence of `NaN` is found in `array`.
*
* @private
@@ -96,11 +121,30 @@ function indexOfNaN(array, fromIndex, fromRight) {
}
/**
- * Converts `set` to an array.
+ * Checks if `value` is a host object in IE < 9.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ */
+function isHostObject(value) {
+ // Many host objects are `Object` objects that can coerce to strings
+ // despite having improperly defined `toString` methods.
+ var result = false;
+ if (value != null && typeof value.toString != 'function') {
+ try {
+ result = !!(value + '');
+ } catch (e) {}
+ }
+ return result;
+}
+
+/**
+ * Converts `set` to an array of its values.
*
* @private
* @param {Object} set The set to convert.
- * @returns {Array} Returns the converted array.
+ * @returns {Array} Returns the values.
*/
function setToArray(set) {
var index = -1,
@@ -112,23 +156,406 @@ function setToArray(set) {
return result;
}
+/** Used for built-in method references. */
+var arrayProto = Array.prototype,
+ objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = Function.prototype.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/** Used to detect if a method is native. */
+var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+);
+
+/** Built-in value references. */
+var splice = arrayProto.splice;
+
+/* Built-in method references that are verified to be native. */
+var Map = getNative(root, 'Map'),
+ nativeCreate = getNative(Object, 'create');
+
+/**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function Hash(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+/**
+ * Removes all key-value entries from the hash.
+ *
+ * @private
+ * @name clear
+ * @memberOf Hash
+ */
+function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+}
+
+/**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function hashDelete(key) {
+ return this.has(key) && delete this.__data__[key];
+}
+
+/**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+}
+
+/**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
+}
+
+/**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+function hashSet(key, value) {
+ var data = this.__data__;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+}
+
+// Add methods to `Hash`.
+Hash.prototype.clear = hashClear;
+Hash.prototype['delete'] = hashDelete;
+Hash.prototype.get = hashGet;
+Hash.prototype.has = hashHas;
+Hash.prototype.set = hashSet;
+
+/**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function ListCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+/**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+function listCacheClear() {
+ this.__data__ = [];
+}
+
+/**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ return true;
+}
+
+/**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ return index < 0 ? undefined : data[index][1];
+}
+
+/**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+}
+
+/**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+}
+
+// Add methods to `ListCache`.
+ListCache.prototype.clear = listCacheClear;
+ListCache.prototype['delete'] = listCacheDelete;
+ListCache.prototype.get = listCacheGet;
+ListCache.prototype.has = listCacheHas;
+ListCache.prototype.set = listCacheSet;
+
+/**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function MapCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+/**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+function mapCacheClear() {
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
+}
+
/**
- * Checks if `value` is in `cache`.
+ * Removes `key` and its value from the map.
*
* @private
- * @param {Object} cache The set cache to search.
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function mapCacheDelete(key) {
+ return getMapData(this, key)['delete'](key);
+}
+
+/**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+}
+
+/**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+}
+
+/**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+function mapCacheSet(key, value) {
+ getMapData(this, key).set(key, value);
+ return this;
+}
+
+// Add methods to `MapCache`.
+MapCache.prototype.clear = mapCacheClear;
+MapCache.prototype['delete'] = mapCacheDelete;
+MapCache.prototype.get = mapCacheGet;
+MapCache.prototype.has = mapCacheHas;
+MapCache.prototype.set = mapCacheSet;
+
+/**
+ *
+ * Creates an array cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+function SetCache(values) {
+ var index = -1,
+ length = values ? values.length : 0;
+
+ this.__data__ = new MapCache;
+ while (++index < length) {
+ this.add(values[index]);
+ }
+}
+
+/**
+ * Adds `value` to the array cache.
+ *
+ * @private
+ * @name add
+ * @memberOf SetCache
+ * @alias push
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache instance.
+ */
+function setCacheAdd(value) {
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
+}
+
+/**
+ * Checks if `value` is in the array cache.
+ *
+ * @private
+ * @name has
+ * @memberOf SetCache
* @param {*} value The value to search for.
* @returns {number} Returns `true` if `value` is found, else `false`.
*/
-function cacheHas(cache, value) {
- var map = cache.__data__;
- if (isKeyable(value)) {
- var data = map.__data__,
- hash = typeof value == 'string' ? data.string : data.hash;
+function setCacheHas(value) {
+ return this.__data__.has(value);
+}
+
+// Add methods to `SetCache`.
+SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+SetCache.prototype.has = setCacheHas;
- return hash[value] === HASH_UNDEFINED;
+/**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
}
- return map.has(value);
+ return -1;
}
/**
@@ -169,6 +596,7 @@ function baseUniq(array, iteratee, comparator) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
+ value = (comparator || value !== 0) ? value : 0;
if (isCommon && computed === computed) {
var seenIndex = seen.length;
while (seenIndex--) {
@@ -192,6 +620,34 @@ function baseUniq(array, iteratee, comparator) {
}
/**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+}
+
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = object[key];
+ return isNative(value) ? value : undefined;
+}
+
+/**
* Checks if `value` is suitable for use as unique object key.
*
* @private
@@ -200,8 +656,146 @@ function baseUniq(array, iteratee, comparator) {
*/
function isKeyable(value) {
var type = typeof value;
- return type == 'number' || type == 'boolean' ||
- (type == 'string' && value != '__proto__') || value == null;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+}
+
+/**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to process.
+ * @returns {string} Returns the source code.
+ */
+function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+}
+
+/**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var other = { 'user': 'fred' };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+}
+
+/**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8 which returns 'object' for typed array and weak map constructors,
+ // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+}
+
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Checks if `value` is a native function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+function isNative(value) {
+ if (!isObject(value)) {
+ return false;
+ }
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
}
module.exports = baseUniq;
diff --git a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/LICENSE b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/LICENSE
index bcbe13d67a..e0c69d5603 100644
--- a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/LICENSE
+++ b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/LICENSE
@@ -1,23 +1,47 @@
-The MIT License (MIT)
+Copyright jQuery Foundation and other contributors <https://jquery.org/>
-Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/README.md b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/README.md
index fe6cc9b512..6486d7e85f 100644
--- a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/README.md
+++ b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/README.md
@@ -1,4 +1,4 @@
-# lodash._createset v4.0.1
+# lodash._createset v4.0.3
The internal [lodash](https://lodash.com/) function `createSet` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var createSet = require('lodash._createset');
```
-See the [package source](https://github.com/lodash/lodash/blob/4.0.1-npm-packages/lodash._createset) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash._createset) for more details.
diff --git a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/index.js b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/index.js
index 8c85b236d1..9cadd2eeeb 100644
--- a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/index.js
+++ b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/index.js
@@ -1,20 +1,26 @@
/**
- * lodash 4.0.1 (Custom Build) <https://lodash.com/>
+ * lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
+/** Used as references for various `Number` constants. */
+var INFINITY = 1 / 0;
+
/** `Object#toString` result references. */
var funcTag = '[object Function]',
genTag = '[object GeneratorFunction]';
-/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
+/**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
+ */
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
-/** Used to detect host constructors (Safari > 5). */
+/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used to determine if values are of the language type `Object`. */
@@ -85,6 +91,23 @@ function isHostObject(value) {
return result;
}
+/**
+ * Converts `set` to an array of its values.
+ *
+ * @private
+ * @param {Object} set The set to convert.
+ * @returns {Array} Returns the values.
+ */
+function setToArray(set) {
+ var index = -1,
+ result = Array(set.size);
+
+ set.forEach(function(value) {
+ result[++index] = value;
+ });
+ return result;
+}
+
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -95,7 +118,8 @@ var funcToString = Function.prototype.toString;
var hasOwnProperty = objectProto.hasOwnProperty;
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
@@ -116,7 +140,7 @@ var Set = getNative(root, 'Set');
* @param {Array} values The values to add to the set.
* @returns {Object} Returns the new set.
*/
-var createSet = !(Set && new Set([1, 2]).size === 2) ? noop : function(values) {
+var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
return new Set(values);
};
@@ -134,13 +158,34 @@ function getNative(object, key) {
}
/**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to process.
+ * @returns {string} Returns the source code.
+ */
+function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+}
+
+/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
* @example
*
* _.isFunction(_);
@@ -158,11 +203,13 @@ function isFunction(value) {
}
/**
- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
@@ -186,40 +233,15 @@ function isObject(value) {
}
/**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-/**
* Checks if `value` is a native function.
*
* @static
* @memberOf _
+ * @since 3.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
* @example
*
* _.isNative(Array.prototype.push);
@@ -229,14 +251,11 @@ function isObjectLike(value) {
* // => false
*/
function isNative(value) {
- if (value == null) {
+ if (!isObject(value)) {
return false;
}
- if (isFunction(value)) {
- return reIsNative.test(funcToString.call(value));
- }
- return isObjectLike(value) &&
- (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
}
/**
@@ -245,6 +264,7 @@ function isNative(value) {
*
* @static
* @memberOf _
+ * @since 2.3.0
* @category Util
* @example
*
diff --git a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/package.json b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/package.json
index 857e620a91..6b6bebb3d7 100644
--- a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/package.json
+++ b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._createset/package.json
@@ -2,24 +2,24 @@
"_args": [
[
"lodash._createset@~4.0.0",
- "/Users/zkat/Documents/code/npm/node_modules/lodash._baseuniq"
+ "/Users/rebecca/code/npm/node_modules/lodash._baseuniq"
]
],
"_from": "lodash._createset@>=4.0.0 <4.1.0",
- "_id": "lodash._createset@4.0.1",
+ "_id": "lodash._createset@4.0.3",
"_inCache": true,
"_installable": true,
"_location": "/lodash._baseuniq/lodash._createset",
"_nodeVersion": "5.5.0",
"_npmOperationalInternal": {
- "host": "packages-13-west.internal.npmjs.com",
- "tmp": "tmp/lodash._createset-4.0.1.tgz_1456896434807_0.3753381560090929"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/lodash._createset-4.0.3.tgz_1463062044214_0.7864094290416688"
},
"_npmUser": {
"email": "john.david.dalton@gmail.com",
"name": "jdalton"
},
- "_npmVersion": "2.14.17",
+ "_npmVersion": "2.15.5",
"_phantomChildren": {},
"_requested": {
"name": "lodash._createset",
@@ -32,11 +32,11 @@
"_requiredBy": [
"/lodash._baseuniq"
],
- "_resolved": "https://registry.npmjs.org/lodash._createset/-/lodash._createset-4.0.1.tgz",
- "_shasum": "00e891e3dd386c4512fcb1f49060dfa4d02a9819",
+ "_resolved": "https://registry.npmjs.org/lodash._createset/-/lodash._createset-4.0.3.tgz",
+ "_shasum": "0f4659fbb09d75194fa9e2b88a6644d363c9fe26",
"_shrinkwrap": null,
"_spec": "lodash._createset@~4.0.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/lodash._baseuniq",
+ "_where": "/Users/rebecca/code/npm/node_modules/lodash._baseuniq",
"author": {
"email": "john.david.dalton@gmail.com",
"name": "John-David Dalton",
@@ -67,8 +67,8 @@
"devDependencies": {},
"directories": {},
"dist": {
- "shasum": "00e891e3dd386c4512fcb1f49060dfa4d02a9819",
- "tarball": "https://registry.npmjs.org/lodash._createset/-/lodash._createset-4.0.1.tgz"
+ "shasum": "0f4659fbb09d75194fa9e2b88a6644d363c9fe26",
+ "tarball": "https://registry.npmjs.org/lodash._createset/-/lodash._createset-4.0.3.tgz"
},
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -97,5 +97,5 @@
"scripts": {
"test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
},
- "version": "4.0.1"
+ "version": "4.0.3"
}
diff --git a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._setcache/LICENSE b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._root/LICENSE
index bcbe13d67a..bcbe13d67a 100644
--- a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._setcache/LICENSE
+++ b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._root/LICENSE
diff --git a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._root/README.md b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._root/README.md
new file mode 100644
index 0000000000..0329abf23d
--- /dev/null
+++ b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._root/README.md
@@ -0,0 +1,18 @@
+# lodash._root v3.0.1
+
+The internal [lodash](https://lodash.com/) function `root` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash._root
+```
+
+In Node.js:
+```js
+var root = require('lodash._root');
+```
+
+See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._root) for more details.
diff --git a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._root/index.js b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._root/index.js
new file mode 100644
index 0000000000..2d8ba0affc
--- /dev/null
+++ b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._root/index.js
@@ -0,0 +1,59 @@
+/**
+ * lodash 3.0.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
+ ? exports
+ : undefined;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
+ ? module
+ : undefined;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal ||
+ ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
+ freeSelf || thisGlobal || Function('return this')();
+
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
+module.exports = root;
diff --git a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._setcache/package.json b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._root/package.json
index 2fedb703b4..561321ef55 100644
--- a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._setcache/package.json
+++ b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._root/package.json
@@ -1,42 +1,42 @@
{
"_args": [
[
- "lodash._setcache@~4.1.0",
- "/Users/zkat/Documents/code/npm/node_modules/lodash._baseuniq"
+ "lodash._root@~3.0.0",
+ "/Users/rebecca/code/npm/node_modules/lodash._baseuniq"
]
],
- "_from": "lodash._setcache@>=4.1.0 <4.2.0",
- "_id": "lodash._setcache@4.1.1",
+ "_from": "lodash._root@>=3.0.0 <3.1.0",
+ "_id": "lodash._root@3.0.1",
"_inCache": true,
"_installable": true,
- "_location": "/lodash._baseuniq/lodash._setcache",
+ "_location": "/lodash._baseuniq/lodash._root",
"_nodeVersion": "5.5.0",
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/lodash._setcache-4.1.1.tgz_1456896443505_0.39592266851104796"
+ "host": "packages-6-west.internal.npmjs.com",
+ "tmp": "tmp/lodash._root-3.0.1.tgz_1455615057559_0.24128212919458747"
},
"_npmUser": {
"email": "john.david.dalton@gmail.com",
"name": "jdalton"
},
- "_npmVersion": "2.14.17",
+ "_npmVersion": "2.14.18",
"_phantomChildren": {},
"_requested": {
- "name": "lodash._setcache",
- "raw": "lodash._setcache@~4.1.0",
- "rawSpec": "~4.1.0",
+ "name": "lodash._root",
+ "raw": "lodash._root@~3.0.0",
+ "rawSpec": "~3.0.0",
"scope": null,
- "spec": ">=4.1.0 <4.2.0",
+ "spec": ">=3.0.0 <3.1.0",
"type": "range"
},
"_requiredBy": [
"/lodash._baseuniq"
],
- "_resolved": "https://registry.npmjs.org/lodash._setcache/-/lodash._setcache-4.1.1.tgz",
- "_shasum": "338f47e49f21ba8bb89e621e7815d781bd4dbd97",
+ "_resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz",
+ "_shasum": "fba1c4524c19ee9a5f8136b4609f017cf4ded692",
"_shrinkwrap": null,
- "_spec": "lodash._setcache@~4.1.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/lodash._baseuniq",
+ "_spec": "lodash._root@~3.0.0",
+ "_where": "/Users/rebecca/code/npm/node_modules/lodash._baseuniq",
"author": {
"email": "john.david.dalton@gmail.com",
"name": "John-David Dalton",
@@ -52,7 +52,7 @@
"url": "http://allyoucanleet.com/"
},
{
- "email": "blaine.bublitz@gmail.com",
+ "email": "blaine@iceddev.com",
"name": "Blaine Bublitz",
"url": "https://github.com/phated"
},
@@ -63,12 +63,12 @@
}
],
"dependencies": {},
- "description": "The internal lodash function `SetCache` exported as a module.",
+ "description": "The internal lodash function `root` exported as a module.",
"devDependencies": {},
"directories": {},
"dist": {
- "shasum": "338f47e49f21ba8bb89e621e7815d781bd4dbd97",
- "tarball": "https://registry.npmjs.org/lodash._setcache/-/lodash._setcache-4.1.1.tgz"
+ "shasum": "fba1c4524c19ee9a5f8136b4609f017cf4ded692",
+ "tarball": "http://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz"
},
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -87,7 +87,7 @@
"name": "phated"
}
],
- "name": "lodash._setcache",
+ "name": "lodash._root",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
@@ -97,5 +97,5 @@
"scripts": {
"test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
},
- "version": "4.1.1"
+ "version": "3.0.1"
}
diff --git a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._setcache/README.md b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._setcache/README.md
deleted file mode 100644
index 696e7cd135..0000000000
--- a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._setcache/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# lodash._setcache v4.1.1
-
-The internal [lodash](https://lodash.com/) function `SetCache` exported as a [Node.js](https://nodejs.org/) module.
-
-## Installation
-
-Using npm:
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash._setcache
-```
-
-In Node.js:
-```js
-var SetCache = require('lodash._setcache');
-```
-
-See the [package source](https://github.com/lodash/lodash/blob/4.1.1-npm-packages/lodash._setcache) for more details.
diff --git a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._setcache/index.js b/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._setcache/index.js
deleted file mode 100644
index dd96de49f1..0000000000
--- a/deps/npm/node_modules/lodash._baseuniq/node_modules/lodash._setcache/index.js
+++ /dev/null
@@ -1,588 +0,0 @@
-/**
- * lodash 4.1.1 (Custom Build) <https://lodash.com/>
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-
-/** Used to stand-in for `undefined` hash values. */
-var HASH_UNDEFINED = '__lodash_hash_undefined__';
-
-/** `Object#toString` result references. */
-var funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]';
-
-/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
-var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
-
-/** Used to detect host constructors (Safari > 5). */
-var reIsHostCtor = /^\[object .+?Constructor\]$/;
-
-/** Used to determine if values are of the language type `Object`. */
-var objectTypes = {
- 'function': true,
- 'object': true
-};
-
-/** Detect free variable `exports`. */
-var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
- ? exports
- : undefined;
-
-/** Detect free variable `module`. */
-var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
- ? module
- : undefined;
-
-/** Detect free variable `global` from Node.js. */
-var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
-
-/** Detect free variable `self`. */
-var freeSelf = checkGlobal(objectTypes[typeof self] && self);
-
-/** Detect free variable `window`. */
-var freeWindow = checkGlobal(objectTypes[typeof window] && window);
-
-/** Detect `this` as the global object. */
-var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
-
-/**
- * Used as a reference to the global object.
- *
- * The `this` value is used if it's the global object to avoid Greasemonkey's
- * restricted `window` object, otherwise the `window` object is used.
- */
-var root = freeGlobal ||
- ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
- freeSelf || thisGlobal || Function('return this')();
-
-/**
- * Checks if `value` is a global object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {null|Object} Returns `value` if it's a global object, else `null`.
- */
-function checkGlobal(value) {
- return (value && value.Object === Object) ? value : null;
-}
-
-/**
- * Checks if `value` is a host object in IE < 9.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
- */
-function isHostObject(value) {
- // Many host objects are `Object` objects that can coerce to strings
- // despite having improperly defined `toString` methods.
- var result = false;
- if (value != null && typeof value.toString != 'function') {
- try {
- result = !!(value + '');
- } catch (e) {}
- }
- return result;
-}
-
-/** Used for built-in method references. */
-var arrayProto = Array.prototype,
- objectProto = Object.prototype;
-
-/** Used to resolve the decompiled source of functions. */
-var funcToString = Function.prototype.toString;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto.toString;
-
-/** Used to detect if a method is native. */
-var reIsNative = RegExp('^' +
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
-);
-
-/** Built-in value references. */
-var splice = arrayProto.splice;
-
-/* Built-in method references that are verified to be native. */
-var Map = getNative(root, 'Map'),
- nativeCreate = getNative(Object, 'create');
-
-/**
- * Creates an hash object.
- *
- * @private
- * @constructor
- * @returns {Object} Returns the new hash object.
- */
-function Hash() {}
-
-/**
- * Removes `key` and its value from the hash.
- *
- * @private
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
-function hashDelete(hash, key) {
- return hashHas(hash, key) && delete hash[key];
-}
-
-/**
- * Gets the hash value for `key`.
- *
- * @private
- * @param {Object} hash The hash to query.
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
-function hashGet(hash, key) {
- if (nativeCreate) {
- var result = hash[key];
- return result === HASH_UNDEFINED ? undefined : result;
- }
- return hasOwnProperty.call(hash, key) ? hash[key] : undefined;
-}
-
-/**
- * Checks if a hash value for `key` exists.
- *
- * @private
- * @param {Object} hash The hash to query.
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function hashHas(hash, key) {
- return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key);
-}
-
-/**
- * Sets the hash `key` to `value`.
- *
- * @private
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- */
-function hashSet(hash, key, value) {
- hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
-}
-
-/**
- * Creates a map cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [values] The values to cache.
- */
-function MapCache(values) {
- var index = -1,
- length = values ? values.length : 0;
-
- this.clear();
- while (++index < length) {
- var entry = values[index];
- this.set(entry[0], entry[1]);
- }
-}
-
-/**
- * Removes all key-value entries from the map.
- *
- * @private
- * @name clear
- * @memberOf MapCache
- */
-function mapClear() {
- this.__data__ = {
- 'hash': new Hash,
- 'map': Map ? new Map : [],
- 'string': new Hash
- };
-}
-
-/**
- * Removes `key` and its value from the map.
- *
- * @private
- * @name delete
- * @memberOf MapCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
-function mapDelete(key) {
- var data = this.__data__;
- if (isKeyable(key)) {
- return hashDelete(typeof key == 'string' ? data.string : data.hash, key);
- }
- return Map ? data.map['delete'](key) : assocDelete(data.map, key);
-}
-
-/**
- * Gets the map value for `key`.
- *
- * @private
- * @name get
- * @memberOf MapCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
-function mapGet(key) {
- var data = this.__data__;
- if (isKeyable(key)) {
- return hashGet(typeof key == 'string' ? data.string : data.hash, key);
- }
- return Map ? data.map.get(key) : assocGet(data.map, key);
-}
-
-/**
- * Checks if a map value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf MapCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function mapHas(key) {
- var data = this.__data__;
- if (isKeyable(key)) {
- return hashHas(typeof key == 'string' ? data.string : data.hash, key);
- }
- return Map ? data.map.has(key) : assocHas(data.map, key);
-}
-
-/**
- * Sets the map `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf MapCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the map cache object.
- */
-function mapSet(key, value) {
- var data = this.__data__;
- if (isKeyable(key)) {
- hashSet(typeof key == 'string' ? data.string : data.hash, key, value);
- } else if (Map) {
- data.map.set(key, value);
- } else {
- assocSet(data.map, key, value);
- }
- return this;
-}
-
-/**
- *
- * Creates a set cache object to store unique values.
- *
- * @private
- * @constructor
- * @param {Array} [values] The values to cache.
- */
-function SetCache(values) {
- var index = -1,
- length = values ? values.length : 0;
-
- this.__data__ = new MapCache;
- while (++index < length) {
- this.push(values[index]);
- }
-}
-
-/**
- * Adds `value` to the set cache.
- *
- * @private
- * @name push
- * @memberOf SetCache
- * @param {*} value The value to cache.
- */
-function cachePush(value) {
- var map = this.__data__;
- if (isKeyable(value)) {
- var data = map.__data__,
- hash = typeof value == 'string' ? data.string : data.hash;
-
- hash[value] = HASH_UNDEFINED;
- }
- else {
- map.set(value, HASH_UNDEFINED);
- }
-}
-
-/**
- * Removes `key` and its value from the associative array.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
-function assocDelete(array, key) {
- var index = assocIndexOf(array, key);
- if (index < 0) {
- return false;
- }
- var lastIndex = array.length - 1;
- if (index == lastIndex) {
- array.pop();
- } else {
- splice.call(array, index, 1);
- }
- return true;
-}
-
-/**
- * Gets the associative array value for `key`.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
-function assocGet(array, key) {
- var index = assocIndexOf(array, key);
- return index < 0 ? undefined : array[index][1];
-}
-
-/**
- * Checks if an associative array value for `key` exists.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function assocHas(array, key) {
- return assocIndexOf(array, key) > -1;
-}
-
-/**
- * Gets the index at which the first occurrence of `key` is found in `array`
- * of key-value pairs.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {*} key The key to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
-function assocIndexOf(array, key) {
- var length = array.length;
- while (length--) {
- if (eq(array[length][0], key)) {
- return length;
- }
- }
- return -1;
-}
-
-/**
- * Sets the associative array `key` to `value`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- */
-function assocSet(array, key, value) {
- var index = assocIndexOf(array, key);
- if (index < 0) {
- array.push([key, value]);
- } else {
- array[index][1] = value;
- }
-}
-
-/**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
-function getNative(object, key) {
- var value = object[key];
- return isNative(value) ? value : undefined;
-}
-
-/**
- * Checks if `value` is suitable for use as unique object key.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
- */
-function isKeyable(value) {
- var type = typeof value;
- return type == 'number' || type == 'boolean' ||
- (type == 'string' && value != '__proto__') || value == null;
-}
-
-/**
- * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * comparison between two values to determine if they are equivalent.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'user': 'fred' };
- * var other = { 'user': 'fred' };
- *
- * _.eq(object, object);
- * // => true
- *
- * _.eq(object, other);
- * // => false
- *
- * _.eq('a', 'a');
- * // => true
- *
- * _.eq('a', Object('a'));
- * // => false
- *
- * _.eq(NaN, NaN);
- * // => true
- */
-function eq(value, other) {
- return value === other || (value !== value && other !== other);
-}
-
-/**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
-function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8 which returns 'object' for typed array and weak map constructors,
- // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
- var tag = isObject(value) ? objectToString.call(value) : '';
- return tag == funcTag || tag == genTag;
-}
-
-/**
- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
-function isObject(value) {
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
-}
-
-/**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-/**
- * Checks if `value` is a native function.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
- * @example
- *
- * _.isNative(Array.prototype.push);
- * // => true
- *
- * _.isNative(_);
- * // => false
- */
-function isNative(value) {
- if (value == null) {
- return false;
- }
- if (isFunction(value)) {
- return reIsNative.test(funcToString.call(value));
- }
- return isObjectLike(value) &&
- (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
-}
-
-// Avoid inheriting from `Object.prototype` when possible.
-Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto;
-
-// Add functions to the `MapCache`.
-MapCache.prototype.clear = mapClear;
-MapCache.prototype['delete'] = mapDelete;
-MapCache.prototype.get = mapGet;
-MapCache.prototype.has = mapHas;
-MapCache.prototype.set = mapSet;
-
-// Add functions to the `SetCache`.
-SetCache.prototype.push = cachePush;
-
-module.exports = SetCache;
diff --git a/deps/npm/node_modules/lodash._baseuniq/package.json b/deps/npm/node_modules/lodash._baseuniq/package.json
index f4cffe5507..f25616330a 100644
--- a/deps/npm/node_modules/lodash._baseuniq/package.json
+++ b/deps/npm/node_modules/lodash._baseuniq/package.json
@@ -1,44 +1,42 @@
{
"_args": [
[
- "lodash._baseuniq@4.5.1",
- "/Users/zkat/Documents/code/npm"
+ "lodash._baseuniq@latest",
+ "/Users/rebecca/code/npm"
]
],
- "_from": "lodash._baseuniq@4.5.1",
- "_id": "lodash._baseuniq@4.5.1",
+ "_from": "lodash._baseuniq@latest",
+ "_id": "lodash._baseuniq@4.6.0",
"_inCache": true,
"_installable": true,
"_location": "/lodash._baseuniq",
"_nodeVersion": "5.5.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/lodash._baseuniq-4.5.1.tgz_1459310621859_0.6014031588565558"
+ "tmp": "tmp/lodash._baseuniq-4.6.0.tgz_1463062037853_0.04403974884189665"
},
"_npmUser": {
"email": "john.david.dalton@gmail.com",
"name": "jdalton"
},
- "_npmVersion": "2.15.1",
+ "_npmVersion": "2.15.5",
"_phantomChildren": {},
"_requested": {
"name": "lodash._baseuniq",
- "raw": "lodash._baseuniq@4.5.1",
- "rawSpec": "4.5.1",
+ "raw": "lodash._baseuniq@latest",
+ "rawSpec": "latest",
"scope": null,
- "spec": "4.5.1",
- "type": "version"
+ "spec": "latest",
+ "type": "tag"
},
"_requiredBy": [
- "/",
- "/lodash.union",
- "/lodash.uniq"
+ "/"
],
- "_resolved": "https://registry.npmjs.org/lodash._baseuniq/-/lodash._baseuniq-4.5.1.tgz",
- "_shasum": "1980430c2e64ee86df6dd35794e1a301b2ab74de",
+ "_resolved": "https://registry.npmjs.org/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz",
+ "_shasum": "0ebb44e456814af7905c6212fa2c9b2d51b841e8",
"_shrinkwrap": null,
- "_spec": "lodash._baseuniq@4.5.1",
- "_where": "/Users/zkat/Documents/code/npm",
+ "_spec": "lodash._baseuniq@latest",
+ "_where": "/Users/rebecca/code/npm",
"author": {
"email": "john.david.dalton@gmail.com",
"name": "John-David Dalton",
@@ -66,14 +64,14 @@
],
"dependencies": {
"lodash._createset": "~4.0.0",
- "lodash._setcache": "~4.1.0"
+ "lodash._root": "~3.0.0"
},
"description": "The internal lodash function `baseUniq` exported as a module.",
"devDependencies": {},
"directories": {},
"dist": {
- "shasum": "1980430c2e64ee86df6dd35794e1a301b2ab74de",
- "tarball": "https://registry.npmjs.org/lodash._baseuniq/-/lodash._baseuniq-4.5.1.tgz"
+ "shasum": "0ebb44e456814af7905c6212fa2c9b2d51b841e8",
+ "tarball": "https://registry.npmjs.org/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz"
},
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -102,5 +100,5 @@
"scripts": {
"test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
},
- "version": "4.5.1"
+ "version": "4.6.0"
}
diff --git a/deps/npm/node_modules/lodash.keys/README.md b/deps/npm/node_modules/lodash.keys/README.md
index 76cafbed3e..5c9c49c627 100644
--- a/deps/npm/node_modules/lodash.keys/README.md
+++ b/deps/npm/node_modules/lodash.keys/README.md
@@ -1,4 +1,4 @@
-# lodash.keys v4.0.6
+# lodash.keys v4.0.7
The [lodash](https://lodash.com/) method `_.keys` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var keys = require('lodash.keys');
```
-See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/4.0.6-npm-packages/lodash.keys) for more details.
+See the [documentation](https://lodash.com/docs#keys) or [package source](https://github.com/lodash/lodash/blob/4.0.7-npm-packages/lodash.keys) for more details.
diff --git a/deps/npm/node_modules/lodash.keys/index.js b/deps/npm/node_modules/lodash.keys/index.js
index 5861b0ffe3..39530dfc6f 100644
--- a/deps/npm/node_modules/lodash.keys/index.js
+++ b/deps/npm/node_modules/lodash.keys/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.6 (Custom Build) <https://lodash.com/>
+ * lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license>
@@ -38,20 +38,6 @@ function baseTimes(n, iteratee) {
return result;
}
-/**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
-function isIndex(value, length) {
- value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
- length = length == null ? MAX_SAFE_INTEGER : length;
- return value > -1 && value % 1 == 0 && value < length;
-}
-
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -59,7 +45,8 @@ var objectProto = Object.prototype;
var hasOwnProperty = objectProto.hasOwnProperty;
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
@@ -104,7 +91,7 @@ function baseKeys(object) {
*
* @private
* @param {string} key The key of the property to get.
- * @returns {Function} Returns the new function.
+ * @returns {Function} Returns the new accessor function.
*/
function baseProperty(key) {
return function(object) {
@@ -154,6 +141,21 @@ function indexKeys(object) {
}
/**
+ * Checks if `value` is a valid array-like index.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
+ */
+function isIndex(value, length) {
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return !!length &&
+ (typeof value == 'number' || reIsUint.test(value)) &&
+ (value > -1 && value % 1 == 0 && value < length);
+}
+
+/**
* Checks if `value` is likely a prototype object.
*
* @private
@@ -335,8 +337,9 @@ function isLength(value) {
}
/**
- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
diff --git a/deps/npm/node_modules/lodash.keys/package.json b/deps/npm/node_modules/lodash.keys/package.json
index fb34e2b8f6..0308e51443 100644
--- a/deps/npm/node_modules/lodash.keys/package.json
+++ b/deps/npm/node_modules/lodash.keys/package.json
@@ -1,41 +1,41 @@
{
"_args": [
[
- "lodash.keys@~4.0.5",
+ "lodash.keys@latest",
"/Users/rebecca/code/npm"
]
],
- "_from": "lodash.keys@>=4.0.5 <4.1.0",
- "_id": "lodash.keys@4.0.6",
+ "_from": "lodash.keys@latest",
+ "_id": "lodash.keys@4.0.7",
"_inCache": true,
"_installable": true,
"_location": "/lodash.keys",
- "_nodeVersion": "5.9.1",
+ "_nodeVersion": "5.5.0",
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/lodash.keys-4.0.6.tgz_1459655434754_0.30223311693407595"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/lodash.keys-4.0.7.tgz_1463062346790_0.19413627637550235"
},
"_npmUser": {
"email": "john.david.dalton@gmail.com",
"name": "jdalton"
},
- "_npmVersion": "2.15.2",
+ "_npmVersion": "2.15.5",
"_phantomChildren": {},
"_requested": {
"name": "lodash.keys",
- "raw": "lodash.keys@~4.0.5",
- "rawSpec": "~4.0.5",
+ "raw": "lodash.keys@latest",
+ "rawSpec": "latest",
"scope": null,
- "spec": ">=4.0.5 <4.1.0",
- "type": "range"
+ "spec": "latest",
+ "type": "tag"
},
"_requiredBy": [
"/"
],
- "_resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.0.6.tgz",
- "_shasum": "2087692c58b0e44e88658108da8ad66f417867ac",
+ "_resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.0.7.tgz",
+ "_shasum": "30e1b3bd98e54d6a0611991812685b6bc47cb63b",
"_shrinkwrap": null,
- "_spec": "lodash.keys@~4.0.5",
+ "_spec": "lodash.keys@latest",
"_where": "/Users/rebecca/code/npm",
"author": {
"email": "john.david.dalton@gmail.com",
@@ -67,8 +67,8 @@
"devDependencies": {},
"directories": {},
"dist": {
- "shasum": "2087692c58b0e44e88658108da8ad66f417867ac",
- "tarball": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.0.6.tgz"
+ "shasum": "30e1b3bd98e54d6a0611991812685b6bc47cb63b",
+ "tarball": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.0.7.tgz"
},
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -101,5 +101,5 @@
"scripts": {
"test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
},
- "version": "4.0.6"
+ "version": "4.0.7"
}
diff --git a/deps/npm/node_modules/lodash.union/README.md b/deps/npm/node_modules/lodash.union/README.md
index 4c1f4c7366..5a4fb54a9e 100644
--- a/deps/npm/node_modules/lodash.union/README.md
+++ b/deps/npm/node_modules/lodash.union/README.md
@@ -1,4 +1,4 @@
-# lodash.union v4.3.0
+# lodash.union v4.4.0
The [lodash](https://lodash.com/) method `_.union` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var union = require('lodash.union');
```
-See the [documentation](https://lodash.com/docs#union) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.union) for more details.
+See the [documentation](https://lodash.com/docs#union) or [package source](https://github.com/lodash/lodash/blob/4.4.0-npm-packages/lodash.union) for more details.
diff --git a/deps/npm/node_modules/lodash.union/index.js b/deps/npm/node_modules/lodash.union/index.js
index 9bc9475d2c..5aa425b775 100644
--- a/deps/npm/node_modules/lodash.union/index.js
+++ b/deps/npm/node_modules/lodash.union/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.3.0 (Custom Build) <https://lodash.com/>
+ * lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license>
@@ -32,7 +32,7 @@ var objectToString = objectProto.toString;
*
* @private
* @param {string} key The key of the property to get.
- * @returns {Function} Returns the new function.
+ * @returns {Function} Returns the new accessor function.
*/
function baseProperty(key) {
return function(object) {
diff --git a/deps/npm/node_modules/lodash.union/node_modules/lodash._baseflatten/README.md b/deps/npm/node_modules/lodash.union/node_modules/lodash._baseflatten/README.md
index bfa8eb7f4a..2c839ab728 100644
--- a/deps/npm/node_modules/lodash.union/node_modules/lodash._baseflatten/README.md
+++ b/deps/npm/node_modules/lodash.union/node_modules/lodash._baseflatten/README.md
@@ -1,4 +1,4 @@
-# lodash._baseflatten v4.2.0
+# lodash._baseflatten v4.2.1
The internal [lodash](https://lodash.com/) function `baseFlatten` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var baseFlatten = require('lodash._baseflatten');
```
-See the [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash._baseflatten) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash._baseflatten) for more details.
diff --git a/deps/npm/node_modules/lodash.union/node_modules/lodash._baseflatten/index.js b/deps/npm/node_modules/lodash.union/node_modules/lodash._baseflatten/index.js
index 0daaa01622..de0df103f4 100644
--- a/deps/npm/node_modules/lodash.union/node_modules/lodash._baseflatten/index.js
+++ b/deps/npm/node_modules/lodash.union/node_modules/lodash._baseflatten/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.2.0 (Custom Build) <https://lodash.com/>
+ * lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license>
@@ -89,7 +89,7 @@ function baseFlatten(array, depth, predicate, isStrict, result) {
*
* @private
* @param {string} key The key of the property to get.
- * @returns {Function} Returns the new function.
+ * @returns {Function} Returns the new accessor function.
*/
function baseProperty(key) {
return function(object) {
@@ -118,7 +118,7 @@ var getLength = baseProperty('length');
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
*/
function isFlattenable(value) {
- return isArrayLikeObject(value) && (isArray(value) || isArguments(value));
+ return isArray(value) || isArguments(value);
}
/**
diff --git a/deps/npm/node_modules/lodash.union/node_modules/lodash._baseflatten/package.json b/deps/npm/node_modules/lodash.union/node_modules/lodash._baseflatten/package.json
index cf8df940c5..cd710c8b3a 100644
--- a/deps/npm/node_modules/lodash.union/node_modules/lodash._baseflatten/package.json
+++ b/deps/npm/node_modules/lodash.union/node_modules/lodash._baseflatten/package.json
@@ -6,20 +6,20 @@
]
],
"_from": "lodash._baseflatten@>=4.2.0 <4.3.0",
- "_id": "lodash._baseflatten@4.2.0",
+ "_id": "lodash._baseflatten@4.2.1",
"_inCache": true,
"_installable": true,
"_location": "/lodash.union/lodash._baseflatten",
"_nodeVersion": "5.5.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/lodash._baseflatten-4.2.0.tgz_1460126652696_0.20245859795249999"
+ "tmp": "tmp/lodash._baseflatten-4.2.1.tgz_1463062009548_0.7446099303197116"
},
"_npmUser": {
"email": "john.david.dalton@gmail.com",
"name": "jdalton"
},
- "_npmVersion": "2.15.3",
+ "_npmVersion": "2.15.5",
"_phantomChildren": {},
"_requested": {
"name": "lodash._baseflatten",
@@ -32,8 +32,8 @@
"_requiredBy": [
"/lodash.union"
],
- "_resolved": "https://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-4.2.0.tgz",
- "_shasum": "66b4fa38645051392d4c0393ff41a3c7e2295f64",
+ "_resolved": "https://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-4.2.1.tgz",
+ "_shasum": "54acad5e6ef53532a5b8269c0ad725470cfd9208",
"_shrinkwrap": null,
"_spec": "lodash._baseflatten@~4.2.0",
"_where": "/Users/rebecca/code/npm/node_modules/lodash.union",
@@ -67,8 +67,8 @@
"devDependencies": {},
"directories": {},
"dist": {
- "shasum": "66b4fa38645051392d4c0393ff41a3c7e2295f64",
- "tarball": "https://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-4.2.0.tgz"
+ "shasum": "54acad5e6ef53532a5b8269c0ad725470cfd9208",
+ "tarball": "https://registry.npmjs.org/lodash._baseflatten/-/lodash._baseflatten-4.2.1.tgz"
},
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -97,5 +97,5 @@
"scripts": {
"test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
},
- "version": "4.2.0"
+ "version": "4.2.1"
}
diff --git a/deps/npm/node_modules/lodash.union/node_modules/lodash.rest/README.md b/deps/npm/node_modules/lodash.union/node_modules/lodash.rest/README.md
index 5f1febeff5..5342ca4452 100644
--- a/deps/npm/node_modules/lodash.union/node_modules/lodash.rest/README.md
+++ b/deps/npm/node_modules/lodash.union/node_modules/lodash.rest/README.md
@@ -1,4 +1,4 @@
-# lodash.rest v4.0.2
+# lodash.rest v4.0.3
The [lodash](https://lodash.com/) method `_.rest` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var rest = require('lodash.rest');
```
-See the [documentation](https://lodash.com/docs#rest) or [package source](https://github.com/lodash/lodash/blob/4.0.2-npm-packages/lodash.rest) for more details.
+See the [documentation](https://lodash.com/docs#rest) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.rest) for more details.
diff --git a/deps/npm/node_modules/lodash.union/node_modules/lodash.rest/index.js b/deps/npm/node_modules/lodash.union/node_modules/lodash.rest/index.js
index 4e1cdb99ba..2315786410 100644
--- a/deps/npm/node_modules/lodash.union/node_modules/lodash.rest/index.js
+++ b/deps/npm/node_modules/lodash.union/node_modules/lodash.rest/index.js
@@ -1,5 +1,5 @@
/**
- * lodash 4.0.2 (Custom Build) <https://lodash.com/>
+ * lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license>
@@ -42,7 +42,7 @@ var freeParseInt = parseInt;
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
- * @param {...*} args The arguments to invoke `func` with.
+ * @param {Array} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
@@ -60,7 +60,8 @@ function apply(func, thisArg, args) {
var objectProto = Object.prototype;
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
@@ -149,8 +150,9 @@ function isFunction(value) {
}
/**
- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
@@ -229,6 +231,41 @@ function isSymbol(value) {
}
/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted number.
+ * @example
+ *
+ * _.toFinite(3.2);
+ * // => 3.2
+ *
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
+ *
+ * _.toFinite(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toFinite('3.2');
+ * // => 3.2
+ */
+function toFinite(value) {
+ if (!value) {
+ return value === 0 ? value : 0;
+ }
+ value = toNumber(value);
+ if (value === INFINITY || value === -INFINITY) {
+ var sign = (value < 0 ? -1 : 1);
+ return sign * MAX_INTEGER;
+ }
+ return value === value ? value : 0;
+}
+
+/**
* Converts `value` to an integer.
*
* **Note:** This function is loosely based on
@@ -242,7 +279,7 @@ function isSymbol(value) {
* @returns {number} Returns the converted integer.
* @example
*
- * _.toInteger(3);
+ * _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
@@ -251,20 +288,14 @@ function isSymbol(value) {
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
- * _.toInteger('3');
+ * _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
- if (!value) {
- return value === 0 ? value : 0;
- }
- value = toNumber(value);
- if (value === INFINITY || value === -INFINITY) {
- var sign = (value < 0 ? -1 : 1);
- return sign * MAX_INTEGER;
- }
- var remainder = value % 1;
- return value === value ? (remainder ? value - remainder : value) : 0;
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
}
/**
@@ -278,8 +309,8 @@ function toInteger(value) {
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -287,8 +318,8 @@ function toInteger(value) {
* _.toNumber(Infinity);
* // => Infinity
*
- * _.toNumber('3');
- * // => 3
+ * _.toNumber('3.2');
+ * // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
diff --git a/deps/npm/node_modules/lodash.union/node_modules/lodash.rest/package.json b/deps/npm/node_modules/lodash.union/node_modules/lodash.rest/package.json
index 7c79f9509d..416db6c858 100644
--- a/deps/npm/node_modules/lodash.union/node_modules/lodash.rest/package.json
+++ b/deps/npm/node_modules/lodash.union/node_modules/lodash.rest/package.json
@@ -6,20 +6,20 @@
]
],
"_from": "lodash.rest@>=4.0.0 <5.0.0",
- "_id": "lodash.rest@4.0.2",
+ "_id": "lodash.rest@4.0.3",
"_inCache": true,
"_installable": true,
"_location": "/lodash.union/lodash.rest",
- "_nodeVersion": "5.9.1",
+ "_nodeVersion": "5.5.0",
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/lodash.rest-4.0.2.tgz_1459655529260_0.05724348593503237"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/lodash.rest-4.0.3.tgz_1463062507321_0.6458017621189356"
},
"_npmUser": {
"email": "john.david.dalton@gmail.com",
"name": "jdalton"
},
- "_npmVersion": "2.15.2",
+ "_npmVersion": "2.15.5",
"_phantomChildren": {},
"_requested": {
"name": "lodash.rest",
@@ -32,8 +32,8 @@
"_requiredBy": [
"/lodash.union"
],
- "_resolved": "https://registry.npmjs.org/lodash.rest/-/lodash.rest-4.0.2.tgz",
- "_shasum": "a15a7daa9cbd45e223ef5ba5d38e87dd02eac6bd",
+ "_resolved": "https://registry.npmjs.org/lodash.rest/-/lodash.rest-4.0.3.tgz",
+ "_shasum": "4c1c32c40028087250fabf70d42e0151548f48c5",
"_shrinkwrap": null,
"_spec": "lodash.rest@^4.0.0",
"_where": "/Users/rebecca/code/npm/node_modules/lodash.union",
@@ -67,8 +67,8 @@
"devDependencies": {},
"directories": {},
"dist": {
- "shasum": "a15a7daa9cbd45e223ef5ba5d38e87dd02eac6bd",
- "tarball": "https://registry.npmjs.org/lodash.rest/-/lodash.rest-4.0.2.tgz"
+ "shasum": "4c1c32c40028087250fabf70d42e0151548f48c5",
+ "tarball": "https://registry.npmjs.org/lodash.rest/-/lodash.rest-4.0.3.tgz"
},
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -101,5 +101,5 @@
"scripts": {
"test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
},
- "version": "4.0.2"
+ "version": "4.0.3"
}
diff --git a/deps/npm/node_modules/lodash.union/package.json b/deps/npm/node_modules/lodash.union/package.json
index 41472cc99d..4e89c1da97 100644
--- a/deps/npm/node_modules/lodash.union/package.json
+++ b/deps/npm/node_modules/lodash.union/package.json
@@ -1,41 +1,41 @@
{
"_args": [
[
- "lodash.union@~4.3.0",
+ "lodash.union@latest",
"/Users/rebecca/code/npm"
]
],
- "_from": "lodash.union@>=4.3.0 <4.4.0",
- "_id": "lodash.union@4.3.0",
+ "_from": "lodash.union@latest",
+ "_id": "lodash.union@4.4.0",
"_inCache": true,
"_installable": true,
"_location": "/lodash.union",
"_nodeVersion": "5.5.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/lodash.union-4.3.0.tgz_1460126989680_0.062147664139047265"
+ "tmp": "tmp/lodash.union-4.4.0.tgz_1463062655004_0.2674572637770325"
},
"_npmUser": {
"email": "john.david.dalton@gmail.com",
"name": "jdalton"
},
- "_npmVersion": "2.15.3",
+ "_npmVersion": "2.15.5",
"_phantomChildren": {},
"_requested": {
"name": "lodash.union",
- "raw": "lodash.union@~4.3.0",
- "rawSpec": "~4.3.0",
+ "raw": "lodash.union@latest",
+ "rawSpec": "latest",
"scope": null,
- "spec": ">=4.3.0 <4.4.0",
- "type": "range"
+ "spec": "latest",
+ "type": "tag"
},
"_requiredBy": [
"/"
],
- "_resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.3.0.tgz",
- "_shasum": "9da994773c563838fc4785c459d5a0dbe18305b8",
+ "_resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.4.0.tgz",
+ "_shasum": "22be23b4c84b49d0436e573949ad1d4a48c7fa38",
"_shrinkwrap": null,
- "_spec": "lodash.union@~4.3.0",
+ "_spec": "lodash.union@latest",
"_where": "/Users/rebecca/code/npm",
"author": {
"email": "john.david.dalton@gmail.com",
@@ -64,15 +64,15 @@
],
"dependencies": {
"lodash._baseflatten": "~4.2.0",
- "lodash._baseuniq": "~4.5.0",
+ "lodash._baseuniq": "~4.6.0",
"lodash.rest": "^4.0.0"
},
"description": "The lodash method `_.union` exported as a module.",
"devDependencies": {},
"directories": {},
"dist": {
- "shasum": "9da994773c563838fc4785c459d5a0dbe18305b8",
- "tarball": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.3.0.tgz"
+ "shasum": "22be23b4c84b49d0436e573949ad1d4a48c7fa38",
+ "tarball": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.4.0.tgz"
},
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -105,5 +105,5 @@
"scripts": {
"test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
},
- "version": "4.3.0"
+ "version": "4.4.0"
}
diff --git a/deps/npm/node_modules/lodash.uniq/LICENSE b/deps/npm/node_modules/lodash.uniq/LICENSE
index bcbe13d67a..e0c69d5603 100644
--- a/deps/npm/node_modules/lodash.uniq/LICENSE
+++ b/deps/npm/node_modules/lodash.uniq/LICENSE
@@ -1,23 +1,47 @@
-The MIT License (MIT)
+Copyright jQuery Foundation and other contributors <https://jquery.org/>
-Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/deps/npm/node_modules/lodash.uniq/README.md b/deps/npm/node_modules/lodash.uniq/README.md
index 31e7c591ea..f1d83df5e5 100644
--- a/deps/npm/node_modules/lodash.uniq/README.md
+++ b/deps/npm/node_modules/lodash.uniq/README.md
@@ -1,4 +1,4 @@
-# lodash.uniq v4.2.1
+# lodash.uniq v4.3.0
The [lodash](https://lodash.com/) method `_.uniq` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var uniq = require('lodash.uniq');
```
-See the [documentation](https://lodash.com/docs#uniq) or [package source](https://github.com/lodash/lodash/blob/4.2.1-npm-packages/lodash.uniq) for more details.
+See the [documentation](https://lodash.com/docs#uniq) or [package source](https://github.com/lodash/lodash/blob/4.3.0-npm-packages/lodash.uniq) for more details.
diff --git a/deps/npm/node_modules/lodash.uniq/index.js b/deps/npm/node_modules/lodash.uniq/index.js
index 567c6ece6a..d1a25d8091 100644
--- a/deps/npm/node_modules/lodash.uniq/index.js
+++ b/deps/npm/node_modules/lodash.uniq/index.js
@@ -1,21 +1,22 @@
/**
- * lodash 4.2.1 (Custom Build) <https://lodash.com/>
+ * lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var baseUniq = require('lodash._baseuniq');
/**
* Creates a duplicate-free version of an array, using
* [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons, in which only the first occurrence of each element
- * is kept.
+ * for equality comparisons, in which only the first occurrence of each
+ * element is kept.
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @returns {Array} Returns the new duplicate free array.
diff --git a/deps/npm/node_modules/lodash.uniq/package.json b/deps/npm/node_modules/lodash.uniq/package.json
index 2823bb8d2c..4ee8486f49 100644
--- a/deps/npm/node_modules/lodash.uniq/package.json
+++ b/deps/npm/node_modules/lodash.uniq/package.json
@@ -1,42 +1,42 @@
{
"_args": [
[
- "lodash.uniq@4.2.1",
- "/Users/zkat/Documents/code/npm"
+ "lodash.uniq@latest",
+ "/Users/rebecca/code/npm"
]
],
- "_from": "lodash.uniq@4.2.1",
- "_id": "lodash.uniq@4.2.1",
+ "_from": "lodash.uniq@latest",
+ "_id": "lodash.uniq@4.3.0",
"_inCache": true,
"_installable": true,
"_location": "/lodash.uniq",
"_nodeVersion": "5.5.0",
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/lodash.uniq-4.2.1.tgz_1459310991318_0.029993396950885653"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/lodash.uniq-4.3.0.tgz_1463062659727_0.9107886834535748"
},
"_npmUser": {
"email": "john.david.dalton@gmail.com",
"name": "jdalton"
},
- "_npmVersion": "2.15.1",
+ "_npmVersion": "2.15.5",
"_phantomChildren": {},
"_requested": {
"name": "lodash.uniq",
- "raw": "lodash.uniq@4.2.1",
- "rawSpec": "4.2.1",
+ "raw": "lodash.uniq@latest",
+ "rawSpec": "latest",
"scope": null,
- "spec": "4.2.1",
- "type": "version"
+ "spec": "latest",
+ "type": "tag"
},
"_requiredBy": [
"/"
],
- "_resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.2.1.tgz",
- "_shasum": "4210d4b90647ee24211b469aed0ef84902069743",
+ "_resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.3.0.tgz",
+ "_shasum": "dcad810876841447d8f3ec662323c86a6d938227",
"_shrinkwrap": null,
- "_spec": "lodash.uniq@4.2.1",
- "_where": "/Users/zkat/Documents/code/npm",
+ "_spec": "lodash.uniq@latest",
+ "_where": "/Users/rebecca/code/npm",
"author": {
"email": "john.david.dalton@gmail.com",
"name": "John-David Dalton",
@@ -63,14 +63,14 @@
}
],
"dependencies": {
- "lodash._baseuniq": "~4.5.0"
+ "lodash._baseuniq": "~4.6.0"
},
"description": "The lodash method `_.uniq` exported as a module.",
"devDependencies": {},
"directories": {},
"dist": {
- "shasum": "4210d4b90647ee24211b469aed0ef84902069743",
- "tarball": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.2.1.tgz"
+ "shasum": "dcad810876841447d8f3ec662323c86a6d938227",
+ "tarball": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.3.0.tgz"
},
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -103,5 +103,5 @@
"scripts": {
"test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
},
- "version": "4.2.1"
+ "version": "4.3.0"
}
diff --git a/deps/npm/node_modules/lodash.without/LICENSE b/deps/npm/node_modules/lodash.without/LICENSE
index bcbe13d67a..e0c69d5603 100644
--- a/deps/npm/node_modules/lodash.without/LICENSE
+++ b/deps/npm/node_modules/lodash.without/LICENSE
@@ -1,23 +1,47 @@
-The MIT License (MIT)
+Copyright jQuery Foundation and other contributors <https://jquery.org/>
-Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/deps/npm/node_modules/lodash.without/README.md b/deps/npm/node_modules/lodash.without/README.md
index 3299e4c531..dd02c51c7c 100644
--- a/deps/npm/node_modules/lodash.without/README.md
+++ b/deps/npm/node_modules/lodash.without/README.md
@@ -1,4 +1,4 @@
-# lodash.without v4.1.2
+# lodash.without v4.2.0
The [lodash](https://lodash.com/) method `_.without` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var without = require('lodash.without');
```
-See the [documentation](https://lodash.com/docs#without) or [package source](https://github.com/lodash/lodash/blob/4.1.2-npm-packages/lodash.without) for more details.
+See the [documentation](https://lodash.com/docs#without) or [package source](https://github.com/lodash/lodash/blob/4.2.0-npm-packages/lodash.without) for more details.
diff --git a/deps/npm/node_modules/lodash.without/index.js b/deps/npm/node_modules/lodash.without/index.js
index f9ed54a01c..7c6954106b 100644
--- a/deps/npm/node_modules/lodash.without/index.js
+++ b/deps/npm/node_modules/lodash.without/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.1.2 (Custom Build) <https://lodash.com/>
+ * lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
var baseDifference = require('lodash._basedifference'),
rest = require('lodash.rest');
@@ -20,7 +20,8 @@ var funcTag = '[object Function]',
var objectProto = Object.prototype;
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
@@ -30,7 +31,7 @@ var objectToString = objectProto.toString;
*
* @private
* @param {string} key The key of the property to get.
- * @returns {Function} Returns the new function.
+ * @returns {Function} Returns the new accessor function.
*/
function baseProperty(key) {
return function(object) {
@@ -41,8 +42,9 @@ function baseProperty(key) {
/**
* Gets the "length" property value of `object`.
*
- * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
- * that affects Safari on at least iOS 8.1-8.3 ARM64.
+ * **Note:** This function is used to avoid a
+ * [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) that affects
+ * Safari on at least iOS 8.1-8.3 ARM64.
*
* @private
* @param {Object} object The object to query.
@@ -57,10 +59,12 @@ var getLength = baseProperty('length');
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Array
- * @param {Array} array The array to filter.
+ * @param {Array} array The array to inspect.
* @param {...*} [values] The values to exclude.
* @returns {Array} Returns the new array of filtered values.
+ * @see _.difference, _.xor
* @example
*
* _.without([1, 2, 1, 3], 1, 2);
@@ -79,6 +83,7 @@ var without = rest(function(array, values) {
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
@@ -106,9 +111,11 @@ function isArrayLike(value) {
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.
+ * @returns {boolean} Returns `true` if `value` is an array-like object,
+ * else `false`.
* @example
*
* _.isArrayLikeObject([1, 2, 3]);
@@ -132,9 +139,11 @@ function isArrayLikeObject(value) {
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
* @example
*
* _.isFunction(_);
@@ -154,13 +163,16 @@ function isFunction(value) {
/**
* Checks if `value` is a valid array-like length.
*
- * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
+ * **Note:** This function is loosely based on
+ * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
+ * @returns {boolean} Returns `true` if `value` is a valid length,
+ * else `false`.
* @example
*
* _.isLength(3);
@@ -181,11 +193,13 @@ function isLength(value) {
}
/**
- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
@@ -214,6 +228,7 @@ function isObject(value) {
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
diff --git a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/LICENSE b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/LICENSE
index bcbe13d67a..e0c69d5603 100644
--- a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/LICENSE
+++ b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/LICENSE
@@ -1,23 +1,47 @@
-The MIT License (MIT)
+Copyright jQuery Foundation and other contributors <https://jquery.org/>
-Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/README.md b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/README.md
index 0ff2f16607..7426607e97 100644
--- a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/README.md
+++ b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/README.md
@@ -1,4 +1,4 @@
-# lodash._basedifference v4.4.1
+# lodash._basedifference v4.5.0
The internal [lodash](https://lodash.com/) function `baseDifference` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var baseDifference = require('lodash._basedifference');
```
-See the [package source](https://github.com/lodash/lodash/blob/4.4.1-npm-packages/lodash._basedifference) for more details.
+See the [package source](https://github.com/lodash/lodash/blob/4.5.0-npm-packages/lodash._basedifference) for more details.
diff --git a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/index.js b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/index.js
index 5fa779dfdd..39b916c9be 100644
--- a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/index.js
+++ b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/index.js
@@ -1,12 +1,12 @@
/**
- * lodash 4.4.1 (Custom Build) <https://lodash.com/>
+ * lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
-var SetCache = require('lodash._setcache');
+var root = require('lodash._root');
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
@@ -14,6 +14,19 @@ var LARGE_ARRAY_SIZE = 200;
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
+/** `Object#toString` result references. */
+var funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]';
+
+/**
+ * Used to match `RegExp`
+ * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).
+ */
+var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+
+/** Used to detect host constructors (Safari). */
+var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
/**
* A specialized version of `_.includes` for arrays without support for
* specifying an index to search from.
@@ -97,7 +110,7 @@ function baseIndexOf(array, value, fromIndex) {
*
* @private
* @param {Function} func The function to cap arguments for.
- * @returns {Function} Returns the new function.
+ * @returns {Function} Returns the new capped function.
*/
function baseUnary(func) {
return function(value) {
@@ -106,6 +119,18 @@ function baseUnary(func) {
}
/**
+ * Checks if a cache value for `key` exists.
+ *
+ * @private
+ * @param {Object} cache The cache to query.
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function cacheHas(cache, key) {
+ return cache.has(key);
+}
+
+/**
* Gets the index at which the first occurrence of `NaN` is found in `array`.
*
* @private
@@ -128,27 +153,429 @@ function indexOfNaN(array, fromIndex, fromRight) {
}
/**
- * Checks if `value` is in `cache`.
+ * Checks if `value` is a host object in IE < 9.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
+ */
+function isHostObject(value) {
+ // Many host objects are `Object` objects that can coerce to strings
+ // despite having improperly defined `toString` methods.
+ var result = false;
+ if (value != null && typeof value.toString != 'function') {
+ try {
+ result = !!(value + '');
+ } catch (e) {}
+ }
+ return result;
+}
+
+/** Used for built-in method references. */
+var arrayProto = Array.prototype,
+ objectProto = Object.prototype;
+
+/** Used to resolve the decompiled source of functions. */
+var funcToString = Function.prototype.toString;
+
+/** Used to check objects for own properties. */
+var hasOwnProperty = objectProto.hasOwnProperty;
+
+/**
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * of values.
+ */
+var objectToString = objectProto.toString;
+
+/** Used to detect if a method is native. */
+var reIsNative = RegExp('^' +
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+);
+
+/** Built-in value references. */
+var splice = arrayProto.splice;
+
+/* Built-in method references that are verified to be native. */
+var Map = getNative(root, 'Map'),
+ nativeCreate = getNative(Object, 'create');
+
+/**
+ * Creates a hash object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function Hash(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+/**
+ * Removes all key-value entries from the hash.
*
* @private
- * @param {Object} cache The set cache to search.
+ * @name clear
+ * @memberOf Hash
+ */
+function hashClear() {
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
+}
+
+/**
+ * Removes `key` and its value from the hash.
+ *
+ * @private
+ * @name delete
+ * @memberOf Hash
+ * @param {Object} hash The hash to modify.
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function hashDelete(key) {
+ return this.has(key) && delete this.__data__[key];
+}
+
+/**
+ * Gets the hash value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf Hash
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function hashGet(key) {
+ var data = this.__data__;
+ if (nativeCreate) {
+ var result = data[key];
+ return result === HASH_UNDEFINED ? undefined : result;
+ }
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
+}
+
+/**
+ * Checks if a hash value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf Hash
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function hashHas(key) {
+ var data = this.__data__;
+ return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
+}
+
+/**
+ * Sets the hash `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf Hash
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the hash instance.
+ */
+function hashSet(key, value) {
+ var data = this.__data__;
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
+ return this;
+}
+
+// Add methods to `Hash`.
+Hash.prototype.clear = hashClear;
+Hash.prototype['delete'] = hashDelete;
+Hash.prototype.get = hashGet;
+Hash.prototype.has = hashHas;
+Hash.prototype.set = hashSet;
+
+/**
+ * Creates an list cache object.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function ListCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+/**
+ * Removes all key-value entries from the list cache.
+ *
+ * @private
+ * @name clear
+ * @memberOf ListCache
+ */
+function listCacheClear() {
+ this.__data__ = [];
+}
+
+/**
+ * Removes `key` and its value from the list cache.
+ *
+ * @private
+ * @name delete
+ * @memberOf ListCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function listCacheDelete(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ return false;
+ }
+ var lastIndex = data.length - 1;
+ if (index == lastIndex) {
+ data.pop();
+ } else {
+ splice.call(data, index, 1);
+ }
+ return true;
+}
+
+/**
+ * Gets the list cache value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf ListCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function listCacheGet(key) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ return index < 0 ? undefined : data[index][1];
+}
+
+/**
+ * Checks if a list cache value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf ListCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function listCacheHas(key) {
+ return assocIndexOf(this.__data__, key) > -1;
+}
+
+/**
+ * Sets the list cache `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf ListCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the list cache instance.
+ */
+function listCacheSet(key, value) {
+ var data = this.__data__,
+ index = assocIndexOf(data, key);
+
+ if (index < 0) {
+ data.push([key, value]);
+ } else {
+ data[index][1] = value;
+ }
+ return this;
+}
+
+// Add methods to `ListCache`.
+ListCache.prototype.clear = listCacheClear;
+ListCache.prototype['delete'] = listCacheDelete;
+ListCache.prototype.get = listCacheGet;
+ListCache.prototype.has = listCacheHas;
+ListCache.prototype.set = listCacheSet;
+
+/**
+ * Creates a map cache object to store key-value pairs.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [entries] The key-value pairs to cache.
+ */
+function MapCache(entries) {
+ var index = -1,
+ length = entries ? entries.length : 0;
+
+ this.clear();
+ while (++index < length) {
+ var entry = entries[index];
+ this.set(entry[0], entry[1]);
+ }
+}
+
+/**
+ * Removes all key-value entries from the map.
+ *
+ * @private
+ * @name clear
+ * @memberOf MapCache
+ */
+function mapCacheClear() {
+ this.__data__ = {
+ 'hash': new Hash,
+ 'map': new (Map || ListCache),
+ 'string': new Hash
+ };
+}
+
+/**
+ * Removes `key` and its value from the map.
+ *
+ * @private
+ * @name delete
+ * @memberOf MapCache
+ * @param {string} key The key of the value to remove.
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
+ */
+function mapCacheDelete(key) {
+ return getMapData(this, key)['delete'](key);
+}
+
+/**
+ * Gets the map value for `key`.
+ *
+ * @private
+ * @name get
+ * @memberOf MapCache
+ * @param {string} key The key of the value to get.
+ * @returns {*} Returns the entry value.
+ */
+function mapCacheGet(key) {
+ return getMapData(this, key).get(key);
+}
+
+/**
+ * Checks if a map value for `key` exists.
+ *
+ * @private
+ * @name has
+ * @memberOf MapCache
+ * @param {string} key The key of the entry to check.
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
+ */
+function mapCacheHas(key) {
+ return getMapData(this, key).has(key);
+}
+
+/**
+ * Sets the map `key` to `value`.
+ *
+ * @private
+ * @name set
+ * @memberOf MapCache
+ * @param {string} key The key of the value to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns the map cache instance.
+ */
+function mapCacheSet(key, value) {
+ getMapData(this, key).set(key, value);
+ return this;
+}
+
+// Add methods to `MapCache`.
+MapCache.prototype.clear = mapCacheClear;
+MapCache.prototype['delete'] = mapCacheDelete;
+MapCache.prototype.get = mapCacheGet;
+MapCache.prototype.has = mapCacheHas;
+MapCache.prototype.set = mapCacheSet;
+
+/**
+ *
+ * Creates an array cache object to store unique values.
+ *
+ * @private
+ * @constructor
+ * @param {Array} [values] The values to cache.
+ */
+function SetCache(values) {
+ var index = -1,
+ length = values ? values.length : 0;
+
+ this.__data__ = new MapCache;
+ while (++index < length) {
+ this.add(values[index]);
+ }
+}
+
+/**
+ * Adds `value` to the array cache.
+ *
+ * @private
+ * @name add
+ * @memberOf SetCache
+ * @alias push
+ * @param {*} value The value to cache.
+ * @returns {Object} Returns the cache instance.
+ */
+function setCacheAdd(value) {
+ this.__data__.set(value, HASH_UNDEFINED);
+ return this;
+}
+
+/**
+ * Checks if `value` is in the array cache.
+ *
+ * @private
+ * @name has
+ * @memberOf SetCache
* @param {*} value The value to search for.
* @returns {number} Returns `true` if `value` is found, else `false`.
*/
-function cacheHas(cache, value) {
- var map = cache.__data__;
- if (isKeyable(value)) {
- var data = map.__data__,
- hash = typeof value == 'string' ? data.string : data.hash;
+function setCacheHas(value) {
+ return this.__data__.has(value);
+}
+
+// Add methods to `SetCache`.
+SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
+SetCache.prototype.has = setCacheHas;
- return hash[value] === HASH_UNDEFINED;
+/**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to search.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
}
- return map.has(value);
+ return -1;
}
/**
- * The base implementation of methods like `_.difference` without support for
- * excluding multiple arrays or iteratee shorthands.
+ * The base implementation of methods like `_.difference` without support
+ * for excluding multiple arrays or iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
@@ -185,6 +612,7 @@ function baseDifference(array, values, iteratee, comparator) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
+ value = (comparator || value !== 0) ? value : 0;
if (isCommon && computed === computed) {
var valuesIndex = valuesLength;
while (valuesIndex--) {
@@ -202,6 +630,34 @@ function baseDifference(array, values, iteratee, comparator) {
}
/**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+}
+
+/**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+function getNative(object, key) {
+ var value = object[key];
+ return isNative(value) ? value : undefined;
+}
+
+/**
* Checks if `value` is suitable for use as unique object key.
*
* @private
@@ -210,8 +666,146 @@ function baseDifference(array, values, iteratee, comparator) {
*/
function isKeyable(value) {
var type = typeof value;
- return type == 'number' || type == 'boolean' ||
- (type == 'string' && value != '__proto__') || value == null;
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
+ ? (value !== '__proto__')
+ : (value === null);
+}
+
+/**
+ * Converts `func` to its source code.
+ *
+ * @private
+ * @param {Function} func The function to process.
+ * @returns {string} Returns the source code.
+ */
+function toSource(func) {
+ if (func != null) {
+ try {
+ return funcToString.call(func);
+ } catch (e) {}
+ try {
+ return (func + '');
+ } catch (e) {}
+ }
+ return '';
+}
+
+/**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'user': 'fred' };
+ * var other = { 'user': 'fred' };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+}
+
+/**
+ * Checks if `value` is classified as a `Function` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isFunction(_);
+ * // => true
+ *
+ * _.isFunction(/abc/);
+ * // => false
+ */
+function isFunction(value) {
+ // The use of `Object#toString` avoids issues with the `typeof` operator
+ // in Safari 8 which returns 'object' for typed array and weak map constructors,
+ // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+ var tag = isObject(value) ? objectToString.call(value) : '';
+ return tag == funcTag || tag == genTag;
+}
+
+/**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+}
+
+/**
+ * Checks if `value` is a native function.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a native function,
+ * else `false`.
+ * @example
+ *
+ * _.isNative(Array.prototype.push);
+ * // => true
+ *
+ * _.isNative(_);
+ * // => false
+ */
+function isNative(value) {
+ if (!isObject(value)) {
+ return false;
+ }
+ var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
+ return pattern.test(toSource(value));
}
module.exports = baseDifference;
diff --git a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._setcache/LICENSE b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._root/LICENSE
index bcbe13d67a..bcbe13d67a 100644
--- a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._setcache/LICENSE
+++ b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._root/LICENSE
diff --git a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._root/README.md b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._root/README.md
new file mode 100644
index 0000000000..0329abf23d
--- /dev/null
+++ b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._root/README.md
@@ -0,0 +1,18 @@
+# lodash._root v3.0.1
+
+The internal [lodash](https://lodash.com/) function `root` exported as a [Node.js](https://nodejs.org/) module.
+
+## Installation
+
+Using npm:
+```bash
+$ {sudo -H} npm i -g npm
+$ npm i --save lodash._root
+```
+
+In Node.js:
+```js
+var root = require('lodash._root');
+```
+
+See the [package source](https://github.com/lodash/lodash/blob/3.0.1-npm-packages/lodash._root) for more details.
diff --git a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._root/index.js b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._root/index.js
new file mode 100644
index 0000000000..2d8ba0affc
--- /dev/null
+++ b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._root/index.js
@@ -0,0 +1,59 @@
+/**
+ * lodash 3.0.1 (Custom Build) <https://lodash.com/>
+ * Build: `lodash modularize exports="npm" -o ./`
+ * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
+ * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+ * Available under MIT license <https://lodash.com/license>
+ */
+
+/** Used to determine if values are of the language type `Object`. */
+var objectTypes = {
+ 'function': true,
+ 'object': true
+};
+
+/** Detect free variable `exports`. */
+var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
+ ? exports
+ : undefined;
+
+/** Detect free variable `module`. */
+var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
+ ? module
+ : undefined;
+
+/** Detect free variable `global` from Node.js. */
+var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
+
+/** Detect free variable `self`. */
+var freeSelf = checkGlobal(objectTypes[typeof self] && self);
+
+/** Detect free variable `window`. */
+var freeWindow = checkGlobal(objectTypes[typeof window] && window);
+
+/** Detect `this` as the global object. */
+var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
+
+/**
+ * Used as a reference to the global object.
+ *
+ * The `this` value is used if it's the global object to avoid Greasemonkey's
+ * restricted `window` object, otherwise the `window` object is used.
+ */
+var root = freeGlobal ||
+ ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
+ freeSelf || thisGlobal || Function('return this')();
+
+/**
+ * Checks if `value` is a global object.
+ *
+ * @private
+ * @param {*} value The value to check.
+ * @returns {null|Object} Returns `value` if it's a global object, else `null`.
+ */
+function checkGlobal(value) {
+ return (value && value.Object === Object) ? value : null;
+}
+
+module.exports = root;
diff --git a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._setcache/package.json b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._root/package.json
index 217a0b8d9b..5d911a87e3 100644
--- a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._setcache/package.json
+++ b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._root/package.json
@@ -1,41 +1,41 @@
{
"_args": [
[
- "lodash._setcache@^4.0.0",
+ "lodash._root@~3.0.0",
"/Users/rebecca/code/npm/node_modules/lodash.without/node_modules/lodash._basedifference"
]
],
- "_from": "lodash._setcache@>=4.0.0 <5.0.0",
- "_id": "lodash._setcache@4.1.1",
+ "_from": "lodash._root@>=3.0.0 <3.1.0",
+ "_id": "lodash._root@3.0.1",
"_inCache": true,
"_installable": true,
- "_location": "/lodash.without/lodash._basedifference/lodash._setcache",
+ "_location": "/lodash.without/lodash._basedifference/lodash._root",
"_nodeVersion": "5.5.0",
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/lodash._setcache-4.1.1.tgz_1456896443505_0.39592266851104796"
+ "host": "packages-6-west.internal.npmjs.com",
+ "tmp": "tmp/lodash._root-3.0.1.tgz_1455615057559_0.24128212919458747"
},
"_npmUser": {
"email": "john.david.dalton@gmail.com",
"name": "jdalton"
},
- "_npmVersion": "2.14.17",
+ "_npmVersion": "2.14.18",
"_phantomChildren": {},
"_requested": {
- "name": "lodash._setcache",
- "raw": "lodash._setcache@^4.0.0",
- "rawSpec": "^4.0.0",
+ "name": "lodash._root",
+ "raw": "lodash._root@~3.0.0",
+ "rawSpec": "~3.0.0",
"scope": null,
- "spec": ">=4.0.0 <5.0.0",
+ "spec": ">=3.0.0 <3.1.0",
"type": "range"
},
"_requiredBy": [
"/lodash.without/lodash._basedifference"
],
- "_resolved": "https://registry.npmjs.org/lodash._setcache/-/lodash._setcache-4.1.1.tgz",
- "_shasum": "338f47e49f21ba8bb89e621e7815d781bd4dbd97",
+ "_resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz",
+ "_shasum": "fba1c4524c19ee9a5f8136b4609f017cf4ded692",
"_shrinkwrap": null,
- "_spec": "lodash._setcache@^4.0.0",
+ "_spec": "lodash._root@~3.0.0",
"_where": "/Users/rebecca/code/npm/node_modules/lodash.without/node_modules/lodash._basedifference",
"author": {
"email": "john.david.dalton@gmail.com",
@@ -52,7 +52,7 @@
"url": "http://allyoucanleet.com/"
},
{
- "email": "blaine.bublitz@gmail.com",
+ "email": "blaine@iceddev.com",
"name": "Blaine Bublitz",
"url": "https://github.com/phated"
},
@@ -63,12 +63,12 @@
}
],
"dependencies": {},
- "description": "The internal lodash function `SetCache` exported as a module.",
+ "description": "The internal lodash function `root` exported as a module.",
"devDependencies": {},
"directories": {},
"dist": {
- "shasum": "338f47e49f21ba8bb89e621e7815d781bd4dbd97",
- "tarball": "http://registry.npmjs.org/lodash._setcache/-/lodash._setcache-4.1.1.tgz"
+ "shasum": "fba1c4524c19ee9a5f8136b4609f017cf4ded692",
+ "tarball": "http://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz"
},
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -87,7 +87,7 @@
"name": "phated"
}
],
- "name": "lodash._setcache",
+ "name": "lodash._root",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
@@ -97,5 +97,5 @@
"scripts": {
"test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
},
- "version": "4.1.1"
+ "version": "3.0.1"
}
diff --git a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._setcache/README.md b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._setcache/README.md
deleted file mode 100644
index 696e7cd135..0000000000
--- a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._setcache/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# lodash._setcache v4.1.1
-
-The internal [lodash](https://lodash.com/) function `SetCache` exported as a [Node.js](https://nodejs.org/) module.
-
-## Installation
-
-Using npm:
-```bash
-$ {sudo -H} npm i -g npm
-$ npm i --save lodash._setcache
-```
-
-In Node.js:
-```js
-var SetCache = require('lodash._setcache');
-```
-
-See the [package source](https://github.com/lodash/lodash/blob/4.1.1-npm-packages/lodash._setcache) for more details.
diff --git a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._setcache/index.js b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._setcache/index.js
deleted file mode 100644
index dd96de49f1..0000000000
--- a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/node_modules/lodash._setcache/index.js
+++ /dev/null
@@ -1,588 +0,0 @@
-/**
- * lodash 4.1.1 (Custom Build) <https://lodash.com/>
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-
-/** Used to stand-in for `undefined` hash values. */
-var HASH_UNDEFINED = '__lodash_hash_undefined__';
-
-/** `Object#toString` result references. */
-var funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]';
-
-/** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
-var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
-
-/** Used to detect host constructors (Safari > 5). */
-var reIsHostCtor = /^\[object .+?Constructor\]$/;
-
-/** Used to determine if values are of the language type `Object`. */
-var objectTypes = {
- 'function': true,
- 'object': true
-};
-
-/** Detect free variable `exports`. */
-var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
- ? exports
- : undefined;
-
-/** Detect free variable `module`. */
-var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
- ? module
- : undefined;
-
-/** Detect free variable `global` from Node.js. */
-var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
-
-/** Detect free variable `self`. */
-var freeSelf = checkGlobal(objectTypes[typeof self] && self);
-
-/** Detect free variable `window`. */
-var freeWindow = checkGlobal(objectTypes[typeof window] && window);
-
-/** Detect `this` as the global object. */
-var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
-
-/**
- * Used as a reference to the global object.
- *
- * The `this` value is used if it's the global object to avoid Greasemonkey's
- * restricted `window` object, otherwise the `window` object is used.
- */
-var root = freeGlobal ||
- ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
- freeSelf || thisGlobal || Function('return this')();
-
-/**
- * Checks if `value` is a global object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {null|Object} Returns `value` if it's a global object, else `null`.
- */
-function checkGlobal(value) {
- return (value && value.Object === Object) ? value : null;
-}
-
-/**
- * Checks if `value` is a host object in IE < 9.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
- */
-function isHostObject(value) {
- // Many host objects are `Object` objects that can coerce to strings
- // despite having improperly defined `toString` methods.
- var result = false;
- if (value != null && typeof value.toString != 'function') {
- try {
- result = !!(value + '');
- } catch (e) {}
- }
- return result;
-}
-
-/** Used for built-in method references. */
-var arrayProto = Array.prototype,
- objectProto = Object.prototype;
-
-/** Used to resolve the decompiled source of functions. */
-var funcToString = Function.prototype.toString;
-
-/** Used to check objects for own properties. */
-var hasOwnProperty = objectProto.hasOwnProperty;
-
-/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
-var objectToString = objectProto.toString;
-
-/** Used to detect if a method is native. */
-var reIsNative = RegExp('^' +
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
-);
-
-/** Built-in value references. */
-var splice = arrayProto.splice;
-
-/* Built-in method references that are verified to be native. */
-var Map = getNative(root, 'Map'),
- nativeCreate = getNative(Object, 'create');
-
-/**
- * Creates an hash object.
- *
- * @private
- * @constructor
- * @returns {Object} Returns the new hash object.
- */
-function Hash() {}
-
-/**
- * Removes `key` and its value from the hash.
- *
- * @private
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
-function hashDelete(hash, key) {
- return hashHas(hash, key) && delete hash[key];
-}
-
-/**
- * Gets the hash value for `key`.
- *
- * @private
- * @param {Object} hash The hash to query.
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
-function hashGet(hash, key) {
- if (nativeCreate) {
- var result = hash[key];
- return result === HASH_UNDEFINED ? undefined : result;
- }
- return hasOwnProperty.call(hash, key) ? hash[key] : undefined;
-}
-
-/**
- * Checks if a hash value for `key` exists.
- *
- * @private
- * @param {Object} hash The hash to query.
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function hashHas(hash, key) {
- return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key);
-}
-
-/**
- * Sets the hash `key` to `value`.
- *
- * @private
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- */
-function hashSet(hash, key, value) {
- hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
-}
-
-/**
- * Creates a map cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [values] The values to cache.
- */
-function MapCache(values) {
- var index = -1,
- length = values ? values.length : 0;
-
- this.clear();
- while (++index < length) {
- var entry = values[index];
- this.set(entry[0], entry[1]);
- }
-}
-
-/**
- * Removes all key-value entries from the map.
- *
- * @private
- * @name clear
- * @memberOf MapCache
- */
-function mapClear() {
- this.__data__ = {
- 'hash': new Hash,
- 'map': Map ? new Map : [],
- 'string': new Hash
- };
-}
-
-/**
- * Removes `key` and its value from the map.
- *
- * @private
- * @name delete
- * @memberOf MapCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
-function mapDelete(key) {
- var data = this.__data__;
- if (isKeyable(key)) {
- return hashDelete(typeof key == 'string' ? data.string : data.hash, key);
- }
- return Map ? data.map['delete'](key) : assocDelete(data.map, key);
-}
-
-/**
- * Gets the map value for `key`.
- *
- * @private
- * @name get
- * @memberOf MapCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
-function mapGet(key) {
- var data = this.__data__;
- if (isKeyable(key)) {
- return hashGet(typeof key == 'string' ? data.string : data.hash, key);
- }
- return Map ? data.map.get(key) : assocGet(data.map, key);
-}
-
-/**
- * Checks if a map value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf MapCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function mapHas(key) {
- var data = this.__data__;
- if (isKeyable(key)) {
- return hashHas(typeof key == 'string' ? data.string : data.hash, key);
- }
- return Map ? data.map.has(key) : assocHas(data.map, key);
-}
-
-/**
- * Sets the map `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf MapCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the map cache object.
- */
-function mapSet(key, value) {
- var data = this.__data__;
- if (isKeyable(key)) {
- hashSet(typeof key == 'string' ? data.string : data.hash, key, value);
- } else if (Map) {
- data.map.set(key, value);
- } else {
- assocSet(data.map, key, value);
- }
- return this;
-}
-
-/**
- *
- * Creates a set cache object to store unique values.
- *
- * @private
- * @constructor
- * @param {Array} [values] The values to cache.
- */
-function SetCache(values) {
- var index = -1,
- length = values ? values.length : 0;
-
- this.__data__ = new MapCache;
- while (++index < length) {
- this.push(values[index]);
- }
-}
-
-/**
- * Adds `value` to the set cache.
- *
- * @private
- * @name push
- * @memberOf SetCache
- * @param {*} value The value to cache.
- */
-function cachePush(value) {
- var map = this.__data__;
- if (isKeyable(value)) {
- var data = map.__data__,
- hash = typeof value == 'string' ? data.string : data.hash;
-
- hash[value] = HASH_UNDEFINED;
- }
- else {
- map.set(value, HASH_UNDEFINED);
- }
-}
-
-/**
- * Removes `key` and its value from the associative array.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
-function assocDelete(array, key) {
- var index = assocIndexOf(array, key);
- if (index < 0) {
- return false;
- }
- var lastIndex = array.length - 1;
- if (index == lastIndex) {
- array.pop();
- } else {
- splice.call(array, index, 1);
- }
- return true;
-}
-
-/**
- * Gets the associative array value for `key`.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
-function assocGet(array, key) {
- var index = assocIndexOf(array, key);
- return index < 0 ? undefined : array[index][1];
-}
-
-/**
- * Checks if an associative array value for `key` exists.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
-function assocHas(array, key) {
- return assocIndexOf(array, key) > -1;
-}
-
-/**
- * Gets the index at which the first occurrence of `key` is found in `array`
- * of key-value pairs.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {*} key The key to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
-function assocIndexOf(array, key) {
- var length = array.length;
- while (length--) {
- if (eq(array[length][0], key)) {
- return length;
- }
- }
- return -1;
-}
-
-/**
- * Sets the associative array `key` to `value`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- */
-function assocSet(array, key, value) {
- var index = assocIndexOf(array, key);
- if (index < 0) {
- array.push([key, value]);
- } else {
- array[index][1] = value;
- }
-}
-
-/**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
-function getNative(object, key) {
- var value = object[key];
- return isNative(value) ? value : undefined;
-}
-
-/**
- * Checks if `value` is suitable for use as unique object key.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
- */
-function isKeyable(value) {
- var type = typeof value;
- return type == 'number' || type == 'boolean' ||
- (type == 'string' && value != '__proto__') || value == null;
-}
-
-/**
- * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * comparison between two values to determine if they are equivalent.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'user': 'fred' };
- * var other = { 'user': 'fred' };
- *
- * _.eq(object, object);
- * // => true
- *
- * _.eq(object, other);
- * // => false
- *
- * _.eq('a', 'a');
- * // => true
- *
- * _.eq('a', Object('a'));
- * // => false
- *
- * _.eq(NaN, NaN);
- * // => true
- */
-function eq(value, other) {
- return value === other || (value !== value && other !== other);
-}
-
-/**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
-function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8 which returns 'object' for typed array and weak map constructors,
- // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
- var tag = isObject(value) ? objectToString.call(value) : '';
- return tag == funcTag || tag == genTag;
-}
-
-/**
- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
-function isObject(value) {
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
-}
-
-/**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
-function isObjectLike(value) {
- return !!value && typeof value == 'object';
-}
-
-/**
- * Checks if `value` is a native function.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
- * @example
- *
- * _.isNative(Array.prototype.push);
- * // => true
- *
- * _.isNative(_);
- * // => false
- */
-function isNative(value) {
- if (value == null) {
- return false;
- }
- if (isFunction(value)) {
- return reIsNative.test(funcToString.call(value));
- }
- return isObjectLike(value) &&
- (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
-}
-
-// Avoid inheriting from `Object.prototype` when possible.
-Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto;
-
-// Add functions to the `MapCache`.
-MapCache.prototype.clear = mapClear;
-MapCache.prototype['delete'] = mapDelete;
-MapCache.prototype.get = mapGet;
-MapCache.prototype.has = mapHas;
-MapCache.prototype.set = mapSet;
-
-// Add functions to the `SetCache`.
-SetCache.prototype.push = cachePush;
-
-module.exports = SetCache;
diff --git a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/package.json b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/package.json
index 5442d0abf9..59b0190020 100644
--- a/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/package.json
+++ b/deps/npm/node_modules/lodash.without/node_modules/lodash._basedifference/package.json
@@ -1,42 +1,42 @@
{
"_args": [
[
- "lodash._basedifference@~4.4.0",
- "/Users/zkat/Documents/code/npm/node_modules/lodash.without"
+ "lodash._basedifference@~4.5.0",
+ "/Users/rebecca/code/npm/node_modules/lodash.without"
]
],
- "_from": "lodash._basedifference@>=4.4.0 <4.5.0",
- "_id": "lodash._basedifference@4.4.1",
+ "_from": "lodash._basedifference@>=4.5.0 <4.6.0",
+ "_id": "lodash._basedifference@4.5.0",
"_inCache": true,
"_installable": true,
"_location": "/lodash.without/lodash._basedifference",
"_nodeVersion": "5.5.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/lodash._basedifference-4.4.1.tgz_1459310599651_0.6456912821158767"
+ "tmp": "tmp/lodash._basedifference-4.5.0.tgz_1463061998825_0.9310404139105231"
},
"_npmUser": {
"email": "john.david.dalton@gmail.com",
"name": "jdalton"
},
- "_npmVersion": "2.15.1",
+ "_npmVersion": "2.15.5",
"_phantomChildren": {},
"_requested": {
"name": "lodash._basedifference",
- "raw": "lodash._basedifference@~4.4.0",
- "rawSpec": "~4.4.0",
+ "raw": "lodash._basedifference@~4.5.0",
+ "rawSpec": "~4.5.0",
"scope": null,
- "spec": ">=4.4.0 <4.5.0",
+ "spec": ">=4.5.0 <4.6.0",
"type": "range"
},
"_requiredBy": [
"/lodash.without"
],
- "_resolved": "https://registry.npmjs.org/lodash._basedifference/-/lodash._basedifference-4.4.1.tgz",
- "_shasum": "537bde6fd0f3eeec28e37288dd51459765181b4d",
+ "_resolved": "https://registry.npmjs.org/lodash._basedifference/-/lodash._basedifference-4.5.0.tgz",
+ "_shasum": "56ea7d601367bfa46cd7de115dc3daeb18837938",
"_shrinkwrap": null,
- "_spec": "lodash._basedifference@~4.4.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/lodash.without",
+ "_spec": "lodash._basedifference@~4.5.0",
+ "_where": "/Users/rebecca/code/npm/node_modules/lodash.without",
"author": {
"email": "john.david.dalton@gmail.com",
"name": "John-David Dalton",
@@ -63,14 +63,14 @@
}
],
"dependencies": {
- "lodash._setcache": "~4.1.0"
+ "lodash._root": "~3.0.0"
},
"description": "The internal lodash function `baseDifference` exported as a module.",
"devDependencies": {},
"directories": {},
"dist": {
- "shasum": "537bde6fd0f3eeec28e37288dd51459765181b4d",
- "tarball": "https://registry.npmjs.org/lodash._basedifference/-/lodash._basedifference-4.4.1.tgz"
+ "shasum": "56ea7d601367bfa46cd7de115dc3daeb18837938",
+ "tarball": "https://registry.npmjs.org/lodash._basedifference/-/lodash._basedifference-4.5.0.tgz"
},
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -99,5 +99,5 @@
"scripts": {
"test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
},
- "version": "4.4.1"
+ "version": "4.5.0"
}
diff --git a/deps/npm/node_modules/lodash.without/node_modules/lodash.rest/LICENSE b/deps/npm/node_modules/lodash.without/node_modules/lodash.rest/LICENSE
index b054ca5a3a..e0c69d5603 100644
--- a/deps/npm/node_modules/lodash.without/node_modules/lodash.rest/LICENSE
+++ b/deps/npm/node_modules/lodash.without/node_modules/lodash.rest/LICENSE
@@ -1,7 +1,17 @@
-Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
-Based on Underscore.js, copyright 2009-2016 Jeremy Ashkenas,
+Copyright jQuery Foundation and other contributors <https://jquery.org/>
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
@@ -20,3 +30,18 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
diff --git a/deps/npm/node_modules/lodash.without/node_modules/lodash.rest/README.md b/deps/npm/node_modules/lodash.without/node_modules/lodash.rest/README.md
index 8924e9d7f4..5342ca4452 100644
--- a/deps/npm/node_modules/lodash.without/node_modules/lodash.rest/README.md
+++ b/deps/npm/node_modules/lodash.without/node_modules/lodash.rest/README.md
@@ -1,4 +1,4 @@
-# lodash.rest v4.0.1
+# lodash.rest v4.0.3
The [lodash](https://lodash.com/) method `_.rest` exported as a [Node.js](https://nodejs.org/) module.
@@ -15,4 +15,4 @@ In Node.js:
var rest = require('lodash.rest');
```
-See the [documentation](https://lodash.com/docs#rest) or [package source](https://github.com/lodash/lodash/blob/4.0.1-npm-packages/lodash.rest) for more details.
+See the [documentation](https://lodash.com/docs#rest) or [package source](https://github.com/lodash/lodash/blob/4.0.3-npm-packages/lodash.rest) for more details.
diff --git a/deps/npm/node_modules/lodash.without/node_modules/lodash.rest/index.js b/deps/npm/node_modules/lodash.without/node_modules/lodash.rest/index.js
index 289de31723..2315786410 100644
--- a/deps/npm/node_modules/lodash.without/node_modules/lodash.rest/index.js
+++ b/deps/npm/node_modules/lodash.without/node_modules/lodash.rest/index.js
@@ -1,10 +1,10 @@
/**
- * lodash 4.0.1 (Custom Build) <https://lodash.com/>
+ * lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
- * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
+ * Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
/** Used as the `TypeError` message for "Functions" methods. */
@@ -17,7 +17,8 @@ var INFINITY = 1 / 0,
/** `Object#toString` result references. */
var funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]';
+ genTag = '[object GeneratorFunction]',
+ symbolTag = '[object Symbol]';
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
@@ -41,7 +42,7 @@ var freeParseInt = parseInt;
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
- * @param {...*} args The arguments to invoke `func` with.
+ * @param {Array} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
@@ -59,7 +60,8 @@ function apply(func, thisArg, args) {
var objectProto = Object.prototype;
/**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
+ * Used to resolve the
+ * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
@@ -69,12 +71,15 @@ var nativeMax = Math.max;
/**
* Creates a function that invokes `func` with the `this` binding of the
- * created function and arguments from `start` and beyond provided as an array.
+ * created function and arguments from `start` and beyond provided as
+ * an array.
*
- * **Note:** This method is based on the [rest parameter](https://mdn.io/rest_parameters).
+ * **Note:** This method is based on the
+ * [rest parameter](https://mdn.io/rest_parameters).
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Function
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
@@ -123,9 +128,11 @@ function rest(func, start) {
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
* @example
*
* _.isFunction(_);
@@ -136,18 +143,20 @@ function rest(func, start) {
*/
function isFunction(value) {
// The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8 which returns 'object' for typed array constructors, and
- // PhantomJS 1.9 which returns 'function' for `NodeList` instances.
+ // in Safari 8 which returns 'object' for typed array and weak map constructors,
+ // and PhantomJS 1.9 which returns 'function' for `NodeList` instances.
var tag = isObject(value) ? objectToString.call(value) : '';
return tag == funcTag || tag == genTag;
}
/**
- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
+ * @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
@@ -171,30 +180,80 @@ function isObject(value) {
}
/**
- * Converts `value` to an integer.
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
+ * and has a `typeof` result of "object".
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
+ * @example
+ *
+ * _.isObjectLike({});
+ * // => true
*
- * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ * _.isObjectLike([1, 2, 3]);
+ * // => true
+ *
+ * _.isObjectLike(_.noop);
+ * // => false
+ *
+ * _.isObjectLike(null);
+ * // => false
+ */
+function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+}
+
+/**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
*
* @static
* @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is correctly classified,
+ * else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && objectToString.call(value) == symbolTag);
+}
+
+/**
+ * Converts `value` to a finite number.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.12.0
* @category Lang
* @param {*} value The value to convert.
- * @returns {number} Returns the converted integer.
+ * @returns {number} Returns the converted number.
* @example
*
- * _.toInteger(3);
- * // => 3
+ * _.toFinite(3.2);
+ * // => 3.2
*
- * _.toInteger(Number.MIN_VALUE);
- * // => 0
+ * _.toFinite(Number.MIN_VALUE);
+ * // => 5e-324
*
- * _.toInteger(Infinity);
+ * _.toFinite(Infinity);
* // => 1.7976931348623157e+308
*
- * _.toInteger('3');
- * // => 3
+ * _.toFinite('3.2');
+ * // => 3.2
*/
-function toInteger(value) {
+function toFinite(value) {
if (!value) {
return value === 0 ? value : 0;
}
@@ -203,8 +262,40 @@ function toInteger(value) {
var sign = (value < 0 ? -1 : 1);
return sign * MAX_INTEGER;
}
- var remainder = value % 1;
- return value === value ? (remainder ? value - remainder : value) : 0;
+ return value === value ? value : 0;
+}
+
+/**
+ * Converts `value` to an integer.
+ *
+ * **Note:** This function is loosely based on
+ * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {number} Returns the converted integer.
+ * @example
+ *
+ * _.toInteger(3.2);
+ * // => 3
+ *
+ * _.toInteger(Number.MIN_VALUE);
+ * // => 0
+ *
+ * _.toInteger(Infinity);
+ * // => 1.7976931348623157e+308
+ *
+ * _.toInteger('3.2');
+ * // => 3
+ */
+function toInteger(value) {
+ var result = toFinite(value),
+ remainder = result % 1;
+
+ return result === result ? (remainder ? result - remainder : result) : 0;
}
/**
@@ -212,13 +303,14 @@ function toInteger(value) {
*
* @static
* @memberOf _
+ * @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
* @example
*
- * _.toNumber(3);
- * // => 3
+ * _.toNumber(3.2);
+ * // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
@@ -226,10 +318,16 @@ function toInteger(value) {
* _.toNumber(Infinity);
* // => Infinity
*
- * _.toNumber('3');
- * // => 3
+ * _.toNumber('3.2');
+ * // => 3.2
*/
function toNumber(value) {
+ if (typeof value == 'number') {
+ return value;
+ }
+ if (isSymbol(value)) {
+ return NAN;
+ }
if (isObject(value)) {
var other = isFunction(value.valueOf) ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
diff --git a/deps/npm/node_modules/lodash.without/node_modules/lodash.rest/package.json b/deps/npm/node_modules/lodash.without/node_modules/lodash.rest/package.json
index f368b23412..3564a655cb 100644
--- a/deps/npm/node_modules/lodash.without/node_modules/lodash.rest/package.json
+++ b/deps/npm/node_modules/lodash.without/node_modules/lodash.rest/package.json
@@ -6,20 +6,20 @@
]
],
"_from": "lodash.rest@>=4.0.0 <5.0.0",
- "_id": "lodash.rest@4.0.1",
+ "_id": "lodash.rest@4.0.3",
"_inCache": true,
"_installable": true,
"_location": "/lodash.without/lodash.rest",
- "_nodeVersion": "5.4.0",
+ "_nodeVersion": "5.5.0",
"_npmOperationalInternal": {
- "host": "packages-5-east.internal.npmjs.com",
- "tmp": "tmp/lodash.rest-4.0.1.tgz_1454484670768_0.6682933256961405"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/lodash.rest-4.0.3.tgz_1463062507321_0.6458017621189356"
},
"_npmUser": {
"email": "john.david.dalton@gmail.com",
"name": "jdalton"
},
- "_npmVersion": "2.14.15",
+ "_npmVersion": "2.15.5",
"_phantomChildren": {},
"_requested": {
"name": "lodash.rest",
@@ -32,8 +32,8 @@
"_requiredBy": [
"/lodash.without"
],
- "_resolved": "https://registry.npmjs.org/lodash.rest/-/lodash.rest-4.0.1.tgz",
- "_shasum": "cbecbb84e68e499a1b242baf9b27bb63ef4dd980",
+ "_resolved": "https://registry.npmjs.org/lodash.rest/-/lodash.rest-4.0.3.tgz",
+ "_shasum": "4c1c32c40028087250fabf70d42e0151548f48c5",
"_shrinkwrap": null,
"_spec": "lodash.rest@^4.0.0",
"_where": "/Users/rebecca/code/npm/node_modules/lodash.without",
@@ -47,18 +47,18 @@
},
"contributors": [
{
- "name": "John-David Dalton",
"email": "john.david.dalton@gmail.com",
+ "name": "John-David Dalton",
"url": "http://allyoucanleet.com/"
},
{
+ "email": "blaine.bublitz@gmail.com",
"name": "Blaine Bublitz",
- "email": "blaine@iceddev.com",
"url": "https://github.com/phated"
},
{
- "name": "Mathias Bynens",
"email": "mathias@qiwi.be",
+ "name": "Mathias Bynens",
"url": "https://mathiasbynens.be/"
}
],
@@ -67,8 +67,8 @@
"devDependencies": {},
"directories": {},
"dist": {
- "shasum": "cbecbb84e68e499a1b242baf9b27bb63ef4dd980",
- "tarball": "http://registry.npmjs.org/lodash.rest/-/lodash.rest-4.0.1.tgz"
+ "shasum": "4c1c32c40028087250fabf70d42e0151548f48c5",
+ "tarball": "https://registry.npmjs.org/lodash.rest/-/lodash.rest-4.0.3.tgz"
},
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -79,16 +79,16 @@
"license": "MIT",
"maintainers": [
{
- "name": "jdalton",
- "email": "john.david.dalton@gmail.com"
+ "email": "john.david.dalton@gmail.com",
+ "name": "jdalton"
},
{
- "name": "mathias",
- "email": "mathias@qiwi.be"
+ "email": "mathias@qiwi.be",
+ "name": "mathias"
},
{
- "name": "phated",
- "email": "blaine@iceddev.com"
+ "email": "blaine@iceddev.com",
+ "name": "phated"
}
],
"name": "lodash.rest",
@@ -101,5 +101,5 @@
"scripts": {
"test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
},
- "version": "4.0.1"
+ "version": "4.0.3"
}
diff --git a/deps/npm/node_modules/lodash.without/package.json b/deps/npm/node_modules/lodash.without/package.json
index ac1b49c274..0aac3a5cb6 100644
--- a/deps/npm/node_modules/lodash.without/package.json
+++ b/deps/npm/node_modules/lodash.without/package.json
@@ -1,42 +1,42 @@
{
"_args": [
[
- "lodash.without@4.1.2",
- "/Users/zkat/Documents/code/npm"
+ "lodash.without@latest",
+ "/Users/rebecca/code/npm"
]
],
- "_from": "lodash.without@4.1.2",
- "_id": "lodash.without@4.1.2",
+ "_from": "lodash.without@latest",
+ "_id": "lodash.without@4.2.0",
"_inCache": true,
"_installable": true,
"_location": "/lodash.without",
"_nodeVersion": "5.5.0",
"_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/lodash.without-4.1.2.tgz_1459311008459_0.16177126462571323"
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/lodash.without-4.2.0.tgz_1463062688060_0.9002856267616153"
},
"_npmUser": {
"email": "john.david.dalton@gmail.com",
"name": "jdalton"
},
- "_npmVersion": "2.15.1",
+ "_npmVersion": "2.15.5",
"_phantomChildren": {},
"_requested": {
"name": "lodash.without",
- "raw": "lodash.without@4.1.2",
- "rawSpec": "4.1.2",
+ "raw": "lodash.without@latest",
+ "rawSpec": "latest",
"scope": null,
- "spec": "4.1.2",
- "type": "version"
+ "spec": "latest",
+ "type": "tag"
},
"_requiredBy": [
"/"
],
- "_resolved": "https://registry.npmjs.org/lodash.without/-/lodash.without-4.1.2.tgz",
- "_shasum": "c68b1981e1b001bd87eef7487dba0af267846229",
+ "_resolved": "https://registry.npmjs.org/lodash.without/-/lodash.without-4.2.0.tgz",
+ "_shasum": "f89ec9a8ee2d7ec14f8a9cad72a3f5ee12c5a4a6",
"_shrinkwrap": null,
- "_spec": "lodash.without@4.1.2",
- "_where": "/Users/zkat/Documents/code/npm",
+ "_spec": "lodash.without@latest",
+ "_where": "/Users/rebecca/code/npm",
"author": {
"email": "john.david.dalton@gmail.com",
"name": "John-David Dalton",
@@ -63,15 +63,15 @@
}
],
"dependencies": {
- "lodash._basedifference": "~4.4.0",
+ "lodash._basedifference": "~4.5.0",
"lodash.rest": "^4.0.0"
},
"description": "The lodash method `_.without` exported as a module.",
"devDependencies": {},
"directories": {},
"dist": {
- "shasum": "c68b1981e1b001bd87eef7487dba0af267846229",
- "tarball": "https://registry.npmjs.org/lodash.without/-/lodash.without-4.1.2.tgz"
+ "shasum": "f89ec9a8ee2d7ec14f8a9cad72a3f5ee12c5a4a6",
+ "tarball": "https://registry.npmjs.org/lodash.without/-/lodash.without-4.2.0.tgz"
},
"homepage": "https://lodash.com/",
"icon": "https://lodash.com/icon.svg",
@@ -104,5 +104,5 @@
"scripts": {
"test": "echo \"See https://travis-ci.org/lodash/lodash-cli for testing details.\""
},
- "version": "4.1.2"
+ "version": "4.2.0"
}
diff --git a/deps/npm/node_modules/npm-package-arg/package.json b/deps/npm/node_modules/npm-package-arg/package.json
index 4d544a7939..1044852bcd 100644
--- a/deps/npm/node_modules/npm-package-arg/package.json
+++ b/deps/npm/node_modules/npm-package-arg/package.json
@@ -1,8 +1,8 @@
{
"_args": [
[
- "npm-package-arg@~4.1.0",
- "/Users/rebecca/code/npm"
+ "npm-package-arg@4.1.1",
+ "/Users/zkat/Documents/code/npm"
]
],
"_from": "npm-package-arg@>=4.1.0 <4.2.0",
@@ -23,11 +23,11 @@
"_phantomChildren": {},
"_requested": {
"name": "npm-package-arg",
- "raw": "npm-package-arg@~4.1.0",
- "rawSpec": "~4.1.0",
+ "raw": "npm-package-arg@4.1.1",
+ "rawSpec": "4.1.1",
"scope": null,
- "spec": ">=4.1.0 <4.2.0",
- "type": "range"
+ "spec": "4.1.1",
+ "type": "version"
},
"_requiredBy": [
"/",
@@ -38,8 +38,8 @@
"_resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-4.1.1.tgz",
"_shasum": "86d9dca985b4c5e5d59772dfd5de6919998a495a",
"_shrinkwrap": null,
- "_spec": "npm-package-arg@~4.1.0",
- "_where": "/Users/rebecca/code/npm",
+ "_spec": "npm-package-arg@4.1.1",
+ "_where": "/Users/zkat/Documents/code/npm",
"author": {
"email": "i@izs.me",
"name": "Isaac Z. Schlueter",
diff --git a/deps/npm/node_modules/read-package-tree/package.json b/deps/npm/node_modules/read-package-tree/package.json
index 4691dae1d2..d1acb0ef06 100644
--- a/deps/npm/node_modules/read-package-tree/package.json
+++ b/deps/npm/node_modules/read-package-tree/package.json
@@ -1,10 +1,56 @@
{
- "name": "read-package-tree",
- "version": "5.1.2",
- "description": "Read the contents of node_modules.",
- "main": "rpt.js",
- "directories": {
- "test": "test"
+ "_args": [
+ [
+ {
+ "name": "read-package-tree",
+ "raw": "read-package-tree@~5.1.3",
+ "rawSpec": "~5.1.3",
+ "scope": null,
+ "spec": ">=5.1.3 <5.2.0",
+ "type": "range"
+ },
+ "/Users/rebecca/code/npm"
+ ]
+ ],
+ "_from": "read-package-tree@>=5.1.3 <5.2.0",
+ "_id": "read-package-tree@5.1.4",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/read-package-tree",
+ "_nodeVersion": "4.4.0",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/read-package-tree-5.1.4.tgz_1463682709793_0.6651253618765622"
+ },
+ "_npmUser": {
+ "email": "me@re-becca.org",
+ "name": "iarna"
+ },
+ "_npmVersion": "3.9.2",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "read-package-tree",
+ "raw": "read-package-tree@~5.1.3",
+ "rawSpec": "~5.1.3",
+ "scope": null,
+ "spec": ">=5.1.3 <5.2.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.1.4.tgz",
+ "_shasum": "bb6e465f913d4259a9534c87b1d5c508fe8eb078",
+ "_shrinkwrap": null,
+ "_spec": "read-package-tree@~5.1.3",
+ "_where": "/Users/rebecca/code/npm",
+ "author": {
+ "email": "i@izs.me",
+ "name": "Isaac Z. Schlueter",
+ "url": "http://blog.izs.me/"
+ },
+ "bugs": {
+ "url": "https://github.com/npm/read-package-tree/issues"
},
"dependencies": {
"debuglog": "^1.0.1",
@@ -13,50 +59,42 @@
"read-package-json": "^2.0.0",
"readdir-scoped-modules": "^1.0.0"
},
+ "description": "Read the contents of node_modules.",
"devDependencies": {
"archy": "0",
+ "tacks": "^1.2.1",
"tap": "^1.2.0"
},
- "scripts": {
- "test": "tap test/*.js"
- },
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/read-package-tree.git"
- },
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "license": "ISC",
- "bugs": {
- "url": "https://github.com/npm/read-package-tree/issues"
- },
- "homepage": "https://github.com/npm/read-package-tree",
- "gitHead": "2ed40c4654804f2a5ddb7b0b2c509080731eea6b",
- "_id": "read-package-tree@5.1.2",
- "_shasum": "e3a488792f40cf470819f01a610e719d64f09094",
- "_from": "read-package-tree@>=5.1.2 <5.2.0",
- "_npmVersion": "2.13.3",
- "_nodeVersion": "0.12.7",
- "_npmUser": {
- "name": "iarna",
- "email": "me@re-becca.org"
+ "directories": {
+ "test": "test"
},
"dist": {
- "shasum": "e3a488792f40cf470819f01a610e719d64f09094",
- "tarball": "http://registry.npmjs.org/read-package-tree/-/read-package-tree-5.1.2.tgz"
+ "shasum": "bb6e465f913d4259a9534c87b1d5c508fe8eb078",
+ "tarball": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.1.4.tgz"
},
+ "gitHead": "eb24d2508da745233af93769596ff1d963f801be",
+ "homepage": "https://github.com/npm/read-package-tree",
+ "license": "ISC",
+ "main": "rpt.js",
"maintainers": [
{
- "name": "isaacs",
- "email": "i@izs.me"
+ "email": "i@izs.me",
+ "name": "isaacs"
},
{
- "name": "iarna",
- "email": "me@re-becca.org"
+ "email": "me@re-becca.org",
+ "name": "iarna"
}
],
- "_resolved": "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.1.2.tgz"
+ "name": "read-package-tree",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/npm/read-package-tree.git"
+ },
+ "scripts": {
+ "test": "tap test/*.js"
+ },
+ "version": "5.1.4"
}
diff --git a/deps/npm/node_modules/read-package-tree/rpt.js b/deps/npm/node_modules/read-package-tree/rpt.js
index acd91bd8c0..5229897632 100644
--- a/deps/npm/node_modules/read-package-tree/rpt.js
+++ b/deps/npm/node_modules/read-package-tree/rpt.js
@@ -6,6 +6,23 @@ var once = require('once')
var readdir = require('readdir-scoped-modules')
var debug = require('debuglog')('rpt')
+function asyncForEach (items, todo, done) {
+ var remaining = items.length
+ if (remaining === 0) return done()
+ var seenErr
+ items.forEach(function (item) {
+ todo(item, handleComplete)
+ })
+ function handleComplete (err) {
+ if (seenErr) return
+ if (err) {
+ seenErr = true
+ return done(err)
+ }
+ if (--remaining === 0) done()
+ }
+}
+
function dpath (p) {
if (!p) return ''
if (p.indexOf(process.cwd()) === 0) {
@@ -77,30 +94,47 @@ Link.prototype.realpath = ''
function loadNode (logical, physical, cache, cb) {
debug('loadNode', dpath(logical))
- fs.realpath(physical, function (er, real) {
+ return fs.realpath(physical, thenReadPackageJson)
+
+ var realpath
+ function thenReadPackageJson (er, real) {
if (er) return cb(er)
debug('realpath l=%j p=%j real=%j', dpath(logical), dpath(physical), dpath(real))
- var pj = path.resolve(real, 'package.json')
- rpj(pj, function (er, pkg) {
- pkg = pkg || null
- var node
- if (physical === real) {
- node = new Node(pkg, logical, physical, er, cache)
- } else {
- node = new Link(pkg, logical, physical, real, er, cache)
- }
-
- cb(null, node)
- })
- })
+ var pj = path.join(real, 'package.json')
+ realpath = real
+ return rpj(pj, thenCreateNode)
+ }
+ function thenCreateNode (er, pkg) {
+ pkg = pkg || null
+ var node
+ if (physical === realpath) {
+ node = new Node(pkg, logical, physical, er, cache)
+ } else {
+ node = new Link(pkg, logical, physical, realpath, er, cache)
+ }
+
+ cb(null, node)
+ }
}
function loadChildren (node, cache, filterWith, cb) {
debug('loadChildren', dpath(node.path))
- // don't let it be called more than once
+ // needed 'cause we process all kids async-like and errors
+ // short circuit, so we have to be sure that after an error
+ // the cbs from other kids don't result in calling cb a second
+ // (or more) time.
cb = once(cb)
- var nm = path.resolve(node.path, 'node_modules')
- readdir(nm, function (er, kids) {
+ var nm = path.join(node.path, 'node_modules')
+ var rm
+ return fs.realpath(path.join(node.path, 'node_modules'), thenReaddir)
+
+ function thenReaddir (er, real_nm) {
+ if (er) return cb(null, node)
+ rm = real_nm
+ readdir(nm, thenLoadKids)
+ }
+
+ function thenLoadKids (er, kids) {
// If there are no children, that's fine, just return
if (er) return cb(null, node)
@@ -108,26 +142,25 @@ function loadChildren (node, cache, filterWith, cb) {
return kid[0] !== '.' && (!filterWith || filterWith(node, kid))
})
- var l = kids . length
- if (l === 0) return cb(null, node)
-
- kids.forEach(function (kid) {
- var kidPath = path.resolve(nm, kid)
- var kidRealPath = path.resolve(node.realpath,'node_modules',kid)
- loadNode(kidPath, kidRealPath, cache, then)
- })
-
- function then (er, kid) {
- if (er) return cb(er)
-
+ asyncForEach(kids, thenLoadNode, thenSortChildren)
+ }
+ function thenLoadNode (kid, done) {
+ var kidPath = path.join(nm, kid)
+ var kidRealPath = path.join(rm, kid)
+ loadNode(kidPath, kidRealPath, cache, andAddNode(done))
+ }
+ function andAddNode (done) {
+ return function (er, kid) {
+ if (er) return done(er)
node.children.push(kid)
kid.parent = node
- if (--l === 0) {
- sortChildren(node)
- return cb(null, node)
- }
+ done()
}
- })
+ }
+ function thenSortChildren (er) {
+ sortChildren(node)
+ cb(er, node)
+ }
}
function sortChildren (node) {
@@ -147,27 +180,25 @@ function loadTree (node, did, cache, filterWith, cb) {
did[node.realpath] = true
+ // needed 'cause we process all kids async-like and errors
+ // short circuit, so we have to be sure that after an error
+ // the cbs from other kids don't result in calling cb a second
+ // (or more) time.
cb = once(cb)
- loadChildren(node, cache, filterWith, function (er, node) {
+ return loadChildren(node, cache, filterWith, thenProcessChildren)
+
+ function thenProcessChildren (er, node) {
if (er) return cb(er)
var kids = node.children.filter(function (kid) {
return !did[kid.realpath]
})
- var l = kids.length
- if (l === 0) return cb(null, node)
-
- kids.forEach(function (kid, index) {
- loadTree(kid, did, cache, filterWith, then)
- })
-
- function then (er, kid) {
- if (er) return cb(er)
-
- if (--l === 0) cb(null, node)
- }
- })
+ return asyncForEach(kids, loadTreeForKid, cb)
+ }
+ function loadTreeForKid (kid, done) {
+ loadTree(kid, did, cache, filterWith, done)
+ }
}
function rpt (root, filterWith, cb) {
@@ -175,16 +206,27 @@ function rpt (root, filterWith, cb) {
cb = filterWith
filterWith = null
}
- fs.realpath(root, function (er, realRoot) {
+ var cache = Object.create(null)
+ var topErr
+ var tree
+ return fs.realpath(root, thenLoadNode)
+
+ function thenLoadNode (er, realRoot) {
if (er) return cb(er)
debug('rpt', dpath(realRoot))
- var cache = Object.create(null)
- loadNode(root, realRoot, cache, function (er, node) {
- // if there's an error, it's fine, as long as we got a node
- if (!node) return cb(er)
- loadTree(node, {}, cache, filterWith, function (lter, tree) {
- cb(er && er.code !== 'ENOENT' ? er : lter, tree)
- })
- })
- })
+ loadNode(root, realRoot, cache, thenLoadTree)
+ }
+ function thenLoadTree(er, node) {
+ // even if there's an error, it's fine, as long as we got a node
+ if (node) {
+ topErr = er
+ tree = node
+ loadTree(node, {}, cache, filterWith, thenHandleErrors)
+ } else {
+ cb(er)
+ }
+ }
+ function thenHandleErrors (er) {
+ cb(topErr && topErr.code !== 'ENOENT' ? topErr : er, tree)
+ }
}
diff --git a/deps/npm/node_modules/read-package-tree/test/symlinked-node-modules.js b/deps/npm/node_modules/read-package-tree/test/symlinked-node-modules.js
new file mode 100644
index 0000000000..31149240bd
--- /dev/null
+++ b/deps/npm/node_modules/read-package-tree/test/symlinked-node-modules.js
@@ -0,0 +1,70 @@
+'use strict'
+var path = require('path')
+var test = require('tap').test
+var rpt = require('../rpt.js')
+var Tacks = require('tacks')
+var File = Tacks.File
+var Symlink = Tacks.Symlink
+var Dir = Tacks.Dir
+
+var workdir = path.join(__dirname, path.basename(__filename, '.js'))
+var fixture = new Tacks(Dir({
+ bar: Dir({
+ 'package.json': File({
+ name: 'bar',
+ version: '1.0.0'
+ })
+ }),
+ 'linked-node-modules': Dir({
+ bar: Symlink('../bar'),
+ foo: Dir({
+ 'package.json': File({
+ name: 'foo',
+ version: '1.0.0'
+ })
+ })
+ }),
+ example: Dir({
+ node_modules: Symlink('../linked-node-modules/'),
+ 'package.json': File({
+ name: 'example',
+ version: '1.0.0',
+ })
+ })
+}))
+
+function setup () {
+ cleanup()
+ fixture.create(workdir)
+}
+
+function cleanup () {
+ fixture.remove(workdir)
+}
+
+test('setup', function (t) {
+ setup()
+ t.done()
+})
+test('symlinked-node-modules', function (t) {
+ rpt(path.join(workdir, 'example'), function (err, tree) {
+ t.ifError(err)
+ t.is(tree.children.length, 2)
+ var childrenShouldBe = {
+ 'foo': {isLink: false},
+ 'bar': {isLink: true}
+ }
+ tree.children.forEach(function (child) {
+ var name = child.package.name
+ t.is(child.isLink, childrenShouldBe[name].isLink,
+ 'is' + (childrenShouldBe[name].isLink ? '' : 'Not') + 'Link ' +
+ path.relative(workdir, child.path) + " + " +
+ path.relative(workdir, child.realpath))
+ })
+ t.done()
+ })
+})
+test('cleanup', function (t) {
+ cleanup()
+ t.done()
+}) \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/README.md b/deps/npm/node_modules/readable-stream/README.md
index c4e4a34a7a..ae9e3363c8 100644
--- a/deps/npm/node_modules/readable-stream/README.md
+++ b/deps/npm/node_modules/readable-stream/README.md
@@ -1,6 +1,6 @@
# readable-stream
-***Node-core v5.9.1 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
+***Node-core v6.1.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)
[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
@@ -16,7 +16,7 @@ npm install --save readable-stream
***Node-core streams for userland***
This package is a mirror of the Streams2 and Streams3 implementations in
-Node-core, including [documentation](doc/stream.markdown).
+Node-core, including [documentation](doc/stream.md).
If you want to guarantee a stable streams base, regardless of what version of
Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/base.css b/deps/npm/node_modules/readable-stream/coverage/lcov-report/base.css
new file mode 100644
index 0000000000..417c7adc95
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/coverage/lcov-report/base.css
@@ -0,0 +1,212 @@
+body, html {
+ margin:0; padding: 0;
+ height: 100%;
+}
+body {
+ font-family: Helvetica Neue, Helvetica, Arial;
+ font-size: 14px;
+ color:#333;
+}
+.small { font-size: 12px; }
+*, *:after, *:before {
+ -webkit-box-sizing:border-box;
+ -moz-box-sizing:border-box;
+ box-sizing:border-box;
+ }
+h1 { font-size: 20px; margin: 0;}
+h2 { font-size: 14px; }
+pre {
+ font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
+ margin: 0;
+ padding: 0;
+ -moz-tab-size: 2;
+ -o-tab-size: 2;
+ tab-size: 2;
+}
+a { color:#0074D9; text-decoration:none; }
+a:hover { text-decoration:underline; }
+.strong { font-weight: bold; }
+.space-top1 { padding: 10px 0 0 0; }
+.pad2y { padding: 20px 0; }
+.pad1y { padding: 10px 0; }
+.pad2x { padding: 0 20px; }
+.pad2 { padding: 20px; }
+.pad1 { padding: 10px; }
+.space-left2 { padding-left:55px; }
+.space-right2 { padding-right:20px; }
+.center { text-align:center; }
+.clearfix { display:block; }
+.clearfix:after {
+ content:'';
+ display:block;
+ height:0;
+ clear:both;
+ visibility:hidden;
+ }
+.fl { float: left; }
+@media only screen and (max-width:640px) {
+ .col3 { width:100%; max-width:100%; }
+ .hide-mobile { display:none!important; }
+}
+
+.quiet {
+ color: #7f7f7f;
+ color: rgba(0,0,0,0.5);
+}
+.quiet a { opacity: 0.7; }
+
+.fraction {
+ font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
+ font-size: 10px;
+ color: #555;
+ background: #E8E8E8;
+ padding: 4px 5px;
+ border-radius: 3px;
+ vertical-align: middle;
+}
+
+div.path a:link, div.path a:visited { color: #333; }
+table.coverage {
+ border-collapse: collapse;
+ margin: 10px 0 0 0;
+ padding: 0;
+}
+
+table.coverage td {
+ margin: 0;
+ padding: 0;
+ vertical-align: top;
+}
+table.coverage td.line-count {
+ text-align: right;
+ padding: 0 5px 0 20px;
+}
+table.coverage td.line-coverage {
+ text-align: right;
+ padding-right: 10px;
+ min-width:20px;
+}
+
+table.coverage td span.cline-any {
+ display: inline-block;
+ padding: 0 5px;
+ width: 100%;
+}
+.missing-if-branch {
+ display: inline-block;
+ margin-right: 5px;
+ border-radius: 3px;
+ position: relative;
+ padding: 0 4px;
+ background: #333;
+ color: yellow;
+}
+
+.skip-if-branch {
+ display: none;
+ margin-right: 10px;
+ position: relative;
+ padding: 0 4px;
+ background: #ccc;
+ color: white;
+}
+.missing-if-branch .typ, .skip-if-branch .typ {
+ color: inherit !important;
+}
+.coverage-summary {
+ border-collapse: collapse;
+ width: 100%;
+}
+.coverage-summary tr { border-bottom: 1px solid #bbb; }
+.keyline-all { border: 1px solid #ddd; }
+.coverage-summary td, .coverage-summary th { padding: 10px; }
+.coverage-summary tbody { border: 1px solid #bbb; }
+.coverage-summary td { border-right: 1px solid #bbb; }
+.coverage-summary td:last-child { border-right: none; }
+.coverage-summary th {
+ text-align: left;
+ font-weight: normal;
+ white-space: nowrap;
+}
+.coverage-summary th.file { border-right: none !important; }
+.coverage-summary th.pct { }
+.coverage-summary th.pic,
+.coverage-summary th.abs,
+.coverage-summary td.pct,
+.coverage-summary td.abs { text-align: right; }
+.coverage-summary td.file { white-space: nowrap; }
+.coverage-summary td.pic { min-width: 120px !important; }
+.coverage-summary tfoot td { }
+
+.coverage-summary .sorter {
+ height: 10px;
+ width: 7px;
+ display: inline-block;
+ margin-left: 0.5em;
+ background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
+}
+.coverage-summary .sorted .sorter {
+ background-position: 0 -20px;
+}
+.coverage-summary .sorted-desc .sorter {
+ background-position: 0 -10px;
+}
+.status-line { height: 10px; }
+/* dark red */
+.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
+.low .chart { border:1px solid #C21F39 }
+/* medium red */
+.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
+/* light red */
+.low, .cline-no { background:#FCE1E5 }
+/* light green */
+.high, .cline-yes { background:rgb(230,245,208) }
+/* medium green */
+.cstat-yes { background:rgb(161,215,106) }
+/* dark green */
+.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
+.high .chart { border:1px solid rgb(77,146,33) }
+
+
+.medium .chart { border:1px solid #666; }
+.medium .cover-fill { background: #666; }
+
+.cbranch-no { background: yellow !important; color: #111; }
+
+.cstat-skip { background: #ddd; color: #111; }
+.fstat-skip { background: #ddd; color: #111 !important; }
+.cbranch-skip { background: #ddd !important; color: #111; }
+
+span.cline-neutral { background: #eaeaea; }
+.medium { background: #eaeaea; }
+
+.cover-fill, .cover-empty {
+ display:inline-block;
+ height: 12px;
+}
+.chart {
+ line-height: 0;
+}
+.cover-empty {
+ background: white;
+}
+.cover-full {
+ border-right: none !important;
+}
+pre.prettyprint {
+ border: none !important;
+ padding: 0 !important;
+ margin: 0 !important;
+}
+.com { color: #999 !important; }
+.ignore-none { color: #999; font-weight: normal; }
+
+.wrapper {
+ min-height: 100%;
+ height: auto !important;
+ height: 100%;
+ margin: 0 auto -48px;
+}
+.footer, .push {
+ height: 48px;
+}
diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/index.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/index.html
new file mode 100644
index 0000000000..a812194c17
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/coverage/lcov-report/index.html
@@ -0,0 +1,93 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>Code coverage report for All files</title>
+ <meta charset="utf-8" />
+ <link rel="stylesheet" href="prettify.css" />
+ <link rel="stylesheet" href="base.css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <style type='text/css'>
+ .coverage-summary .sorter {
+ background-image: url(sort-arrow-sprite.png);
+ }
+ </style>
+</head>
+<body>
+<div class='wrapper'>
+ <div class='pad1'>
+ <h1>
+ /
+ </h1>
+ <div class='clearfix'>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">90.63% </span>
+ <span class="quiet">Statements</span>
+ <span class='fraction'>851/939</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">87.94% </span>
+ <span class="quiet">Branches</span>
+ <span class='fraction'>496/564</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">86.54% </span>
+ <span class="quiet">Functions</span>
+ <span class='fraction'>90/104</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">92.73% </span>
+ <span class="quiet">Lines</span>
+ <span class='fraction'>765/825</span>
+ </div>
+ </div>
+ </div>
+ <div class='status-line high'></div>
+<div class="pad1">
+<table class="coverage-summary">
+<thead>
+<tr>
+ <th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
+ <th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
+ <th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
+ <th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
+ <th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
+ <th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
+ <th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
+ <th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
+ <th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
+ <th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
+</tr>
+</thead>
+<tbody><tr>
+ <td class="file high" data-value="lib/"><a href="lib/index.html">lib/</a></td>
+ <td data-value="90.63" class="pic high"><div class="chart"><div class="cover-fill" style="width: 90%;"></div><div class="cover-empty" style="width:10%;"></div></div></td>
+ <td data-value="90.63" class="pct high">90.63%</td>
+ <td data-value="939" class="abs high">851/939</td>
+ <td data-value="87.94" class="pct high">87.94%</td>
+ <td data-value="564" class="abs high">496/564</td>
+ <td data-value="86.54" class="pct high">86.54%</td>
+ <td data-value="104" class="abs high">90/104</td>
+ <td data-value="92.73" class="pct high">92.73%</td>
+ <td data-value="825" class="abs high">765/825</td>
+ </tr>
+
+</tbody>
+</table>
+</div><div class='push'></div><!-- for sticky footer -->
+</div><!-- /wrapper -->
+<div class='footer quiet pad2 space-top1 center small'>
+ Code coverage
+ generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed May 18 2016 10:10:05 GMT-0400 (EDT)
+</div>
+</div>
+<script src="prettify.js"></script>
+<script>
+window.onload = function () {
+ if (typeof prettyPrint === 'function') {
+ prettyPrint();
+ }
+};
+</script>
+<script src="sorter.js"></script>
+</body>
+</html>
diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_duplex.js.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_duplex.js.html
new file mode 100644
index 0000000000..a3f1208b41
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_duplex.js.html
@@ -0,0 +1,287 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>Code coverage report for lib/_stream_duplex.js</title>
+ <meta charset="utf-8" />
+ <link rel="stylesheet" href="../prettify.css" />
+ <link rel="stylesheet" href="../base.css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <style type='text/css'>
+ .coverage-summary .sorter {
+ background-image: url(../sort-arrow-sprite.png);
+ }
+ </style>
+</head>
+<body>
+<div class='wrapper'>
+ <div class='pad1'>
+ <h1>
+ <a href="../index.html">all files</a> / <a href="index.html">lib/</a> _stream_duplex.js
+ </h1>
+ <div class='clearfix'>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">69.23% </span>
+ <span class="quiet">Statements</span>
+ <span class='fraction'>27/39</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">68.18% </span>
+ <span class="quiet">Branches</span>
+ <span class='fraction'>15/22</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">40% </span>
+ <span class="quiet">Functions</span>
+ <span class='fraction'>2/5</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">75.76% </span>
+ <span class="quiet">Lines</span>
+ <span class='fraction'>25/33</span>
+ </div>
+ </div>
+ </div>
+ <div class='status-line medium'></div>
+<pre><table class="coverage">
+<tr><td class="line-count quiet">1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">392×</span>
+<span class="cline-any cline-yes">392×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">25×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">25×</span>
+<span class="cline-any cline-yes">25×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">25×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">25×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">25×</span>
+<span class="cline-any cline-yes">25×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">25×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">18×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// a duplex stream is just a stream that is both readable and writable.
+// Since JS doesn't have multiple prototypal inheritance, this class
+// prototypally inherits from Readable, and then parasitically from
+// Writable.
+&nbsp;
+'use strict';
+&nbsp;
+/*&lt;replacement&gt;*/
+&nbsp;
+var objectKeys = Object.keys || <span class="fstat-no" title="function not covered" ><span class="branch-1 cbranch-no" title="branch not covered" >function (obj) {</span></span>
+<span class="cstat-no" title="statement not covered" > var keys = [];</span>
+<span class="cstat-no" title="statement not covered" > for (var key in obj) {</span>
+<span class="cstat-no" title="statement not covered" > keys.push(key);</span>
+ }<span class="cstat-no" title="statement not covered" >return keys;</span>
+};
+/*&lt;/replacement&gt;*/
+&nbsp;
+module.exports = Duplex;
+&nbsp;
+/*&lt;replacement&gt;*/
+var processNextTick = require('process-nextick-args');
+/*&lt;/replacement&gt;*/
+&nbsp;
+/*&lt;replacement&gt;*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*&lt;/replacement&gt;*/
+&nbsp;
+var Readable = require('./_stream_readable');
+var Writable = require('./_stream_writable');
+&nbsp;
+util.inherits(Duplex, Readable);
+&nbsp;
+var keys = objectKeys(Writable.prototype);
+for (var v = 0; v &lt; keys.length; v++) {
+ var method = keys[v];
+ if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
+}
+&nbsp;
+function Duplex(options) {
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (!(this instanceof Duplex)) <span class="cstat-no" title="statement not covered" >return new Duplex(options);</span>
+&nbsp;
+ Readable.call(this, options);
+ Writable.call(this, options);
+&nbsp;
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (options &amp;&amp; options.readable === false) <span class="cstat-no" title="statement not covered" >this.readable = false;</span>
+&nbsp;
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (options &amp;&amp; options.writable === false) <span class="cstat-no" title="statement not covered" >this.writable = false;</span>
+&nbsp;
+ this.allowHalfOpen = true;
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (options &amp;&amp; options.allowHalfOpen === false) <span class="cstat-no" title="statement not covered" >this.allowHalfOpen = false;</span>
+&nbsp;
+ this.once('end', onend);
+}
+&nbsp;
+// the no-half-open enforcer
+function onend() {
+ // if we allow half-open state, or if the writable side ended,
+ // then we're ok.
+ <span class="missing-if-branch" title="else path not taken" >E</span>if (this.allowHalfOpen || <span class="branch-1 cbranch-no" title="branch not covered" >this._writableState.ended)</span> return;
+&nbsp;
+ // no more data can be written.
+ // But allow more writes to happen in this tick.
+<span class="cstat-no" title="statement not covered" > processNextTick(onEndNT, this);</span>
+}
+&nbsp;
+<span class="fstat-no" title="function not covered" >function onEndNT(self) {</span>
+<span class="cstat-no" title="statement not covered" > self.end();</span>
+}
+&nbsp;
+<span class="fstat-no" title="function not covered" >function forEach(xs, f) {</span>
+<span class="cstat-no" title="statement not covered" > for (var i = 0, l = xs.length; i &lt; l; i++) {</span>
+<span class="cstat-no" title="statement not covered" > f(xs[i], i);</span>
+ }
+}</pre></td></tr>
+</table></pre>
+<div class='push'></div><!-- for sticky footer -->
+</div><!-- /wrapper -->
+<div class='footer quiet pad2 space-top1 center small'>
+ Code coverage
+ generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed May 18 2016 10:10:05 GMT-0400 (EDT)
+</div>
+</div>
+<script src="../prettify.js"></script>
+<script>
+window.onload = function () {
+ if (typeof prettyPrint === 'function') {
+ prettyPrint();
+ }
+};
+</script>
+<script src="../sorter.js"></script>
+</body>
+</html>
diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_passthrough.js.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_passthrough.js.html
new file mode 100644
index 0000000000..3ca02ae767
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_passthrough.js.html
@@ -0,0 +1,140 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>Code coverage report for lib/_stream_passthrough.js</title>
+ <meta charset="utf-8" />
+ <link rel="stylesheet" href="../prettify.css" />
+ <link rel="stylesheet" href="../base.css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <style type='text/css'>
+ .coverage-summary .sorter {
+ background-image: url(../sort-arrow-sprite.png);
+ }
+ </style>
+</head>
+<body>
+<div class='wrapper'>
+ <div class='pad1'>
+ <h1>
+ <a href="../index.html">all files</a> / <a href="index.html">lib/</a> _stream_passthrough.js
+ </h1>
+ <div class='clearfix'>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">90.91% </span>
+ <span class="quiet">Statements</span>
+ <span class='fraction'>10/11</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">50% </span>
+ <span class="quiet">Branches</span>
+ <span class='fraction'>1/2</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">100% </span>
+ <span class="quiet">Functions</span>
+ <span class='fraction'>2/2</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">100% </span>
+ <span class="quiet">Lines</span>
+ <span class='fraction'>10/10</span>
+ </div>
+ </div>
+ </div>
+ <div class='status-line high'></div>
+<pre><table class="coverage">
+<tr><td class="line-count quiet">1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">8×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">8×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">59×</span>
+<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// a passthrough stream.
+// basically just the most minimal sort of Transform stream.
+// Every written chunk gets output as-is.
+&nbsp;
+'use strict';
+&nbsp;
+module.exports = PassThrough;
+&nbsp;
+var Transform = require('./_stream_transform');
+&nbsp;
+/*&lt;replacement&gt;*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*&lt;/replacement&gt;*/
+&nbsp;
+util.inherits(PassThrough, Transform);
+&nbsp;
+function PassThrough(options) {
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (!(this instanceof PassThrough)) <span class="cstat-no" title="statement not covered" >return new PassThrough(options);</span>
+&nbsp;
+ Transform.call(this, options);
+}
+&nbsp;
+PassThrough.prototype._transform = function (chunk, encoding, cb) {
+ cb(null, chunk);
+};</pre></td></tr>
+</table></pre>
+<div class='push'></div><!-- for sticky footer -->
+</div><!-- /wrapper -->
+<div class='footer quiet pad2 space-top1 center small'>
+ Code coverage
+ generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed May 18 2016 10:10:05 GMT-0400 (EDT)
+</div>
+</div>
+<script src="../prettify.js"></script>
+<script>
+window.onload = function () {
+ if (typeof prettyPrint === 'function') {
+ prettyPrint();
+ }
+};
+</script>
+<script src="../sorter.js"></script>
+</body>
+</html>
diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_readable.js.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_readable.js.html
new file mode 100644
index 0000000000..fb9f1d0cbe
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_readable.js.html
@@ -0,0 +1,2741 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>Code coverage report for lib/_stream_readable.js</title>
+ <meta charset="utf-8" />
+ <link rel="stylesheet" href="../prettify.css" />
+ <link rel="stylesheet" href="../base.css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <style type='text/css'>
+ .coverage-summary .sorter {
+ background-image: url(../sort-arrow-sprite.png);
+ }
+ </style>
+</head>
+<body>
+<div class='wrapper'>
+ <div class='pad1'>
+ <h1>
+ <a href="../index.html">all files</a> / <a href="index.html">lib/</a> _stream_readable.js
+ </h1>
+ <div class='clearfix'>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">89.29% </span>
+ <span class="quiet">Statements</span>
+ <span class='fraction'>467/523</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">87.22% </span>
+ <span class="quiet">Branches</span>
+ <span class='fraction'>307/352</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">86.79% </span>
+ <span class="quiet">Functions</span>
+ <span class='fraction'>46/53</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">90.73% </span>
+ <span class="quiet">Lines</span>
+ <span class='fraction'>411/453</span>
+ </div>
+ </div>
+ </div>
+ <div class='status-line high'></div>
+<pre><table class="coverage">
+<tr><td class="line-count quiet">1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">269×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-yes">10×</span>
+<span class="cline-any cline-yes">10×</span>
+<span class="cline-any cline-yes">10×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">84×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">84×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">82×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">276927×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">276927×</span>
+<span class="cline-any cline-yes">37×</span>
+<span class="cline-any cline-yes">37×</span>
+<span class="cline-any cline-yes">10×</span>
+<span class="cline-any cline-yes">10×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">276927×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">41×</span>
+<span class="cline-any cline-yes">41×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">4×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">276968×</span>
+<span class="cline-any cline-yes">276968×</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-yes">276968×</span>
+<span class="cline-any cline-yes">67×</span>
+<span class="cline-any cline-yes">67×</span>
+<span class="cline-any cline-yes">276901×</span>
+<span class="cline-any cline-yes">276883×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-yes">276882×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">276881×</span>
+<span class="cline-any cline-yes">276881×</span>
+<span class="cline-any cline-yes">23×</span>
+<span class="cline-any cline-yes">23×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">276881×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">276881×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">276875×</span>
+<span class="cline-any cline-yes">108×</span>
+<span class="cline-any cline-yes">108×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">276767×</span>
+<span class="cline-any cline-yes">276767×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">276767×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">276881×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">18×</span>
+<span class="cline-any cline-yes">9×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">276966×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">276966×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">5×</span>
+<span class="cline-any cline-yes">5×</span>
+<span class="cline-any cline-yes">5×</span>
+<span class="cline-any cline-yes">5×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">4×</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4×</span>
+<span class="cline-any cline-yes">4×</span>
+<span class="cline-any cline-yes">4×</span>
+<span class="cline-any cline-yes">4×</span>
+<span class="cline-any cline-yes">4×</span>
+<span class="cline-any cline-yes">4×</span>
+<span class="cline-any cline-yes">4×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">554235×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">553951×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">553860×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">421×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">553439×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">2087×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">2087×</span>
+<span class="cline-any cline-yes">1711×</span>
+<span class="cline-any cline-yes">1697×</span>
+<span class="cline-any cline-yes">1697×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">14×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">376×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">277657×</span>
+<span class="cline-any cline-yes">277657×</span>
+<span class="cline-any cline-yes">277657×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">277657×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">277657×</span>
+<span class="cline-any cline-yes">6×</span>
+<span class="cline-any cline-yes">6×</span>
+<span class="cline-any cline-yes">6×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">277651×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">277651×</span>
+<span class="cline-any cline-yes">279×</span>
+<span class="cline-any cline-yes">279×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">277372×</span>
+<span class="cline-any cline-yes">277372×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">277372×</span>
+<span class="cline-any cline-yes">277365×</span>
+<span class="cline-any cline-yes">277365×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">277372×</span>
+<span class="cline-any cline-yes">556×</span>
+<span class="cline-any cline-yes">556×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">277372×</span>
+<span class="cline-any cline-yes">276809×</span>
+<span class="cline-any cline-yes">276809×</span>
+<span class="cline-any cline-yes">276809×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">276809×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">276809×</span>
+<span class="cline-any cline-yes">276809×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">277372×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">277372×</span>
+<span class="cline-any cline-yes">277372×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">277372×</span>
+<span class="cline-any cline-yes">276627×</span>
+<span class="cline-any cline-yes">276627×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">277372×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">277372×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">277372×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">277372×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">277372×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">276968×</span>
+<span class="cline-any cline-yes">276968×</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">276968×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">67×</span>
+<span class="cline-any cline-yes">59×</span>
+<span class="cline-any cline-yes">14×</span>
+<span class="cline-any cline-yes">14×</span>
+<span class="cline-any cline-yes">4×</span>
+<span class="cline-any cline-yes">4×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">59×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">59×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">276722×</span>
+<span class="cline-any cline-yes">276722×</span>
+<span class="cline-any cline-yes">276722×</span>
+<span class="cline-any cline-yes">1123×</span>
+<span class="cline-any cline-yes">1123×</span>
+<span class="cline-any cline-yes">1123×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">1123×</span>
+<span class="cline-any cline-yes">1123×</span>
+<span class="cline-any cline-yes">1123×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">276881×</span>
+<span class="cline-any cline-yes">225×</span>
+<span class="cline-any cline-yes">225×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">225×</span>
+<span class="cline-any cline-yes">225×</span>
+<span class="cline-any cline-yes">275597×</span>
+<span class="cline-any cline-yes">275597×</span>
+<span class="cline-any cline-yes">275597×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">275571×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">225×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">37×</span>
+<span class="cline-any cline-yes">37×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">25×</span>
+<span class="cline-any cline-yes">25×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">12×</span>
+<span class="cline-any cline-yes">12×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">395×</span>
+<span class="cline-any cline-yes">395×</span>
+<span class="cline-any cline-yes">395×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">264×</span>
+<span class="cline-any cline-yes">263×</span>
+<span class="cline-any cline-yes">263×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">264×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">5×</span>
+<span class="cline-any cline-yes">5×</span>
+<span class="cline-any cline-yes">5×</span>
+<span class="cline-any cline-yes">5×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">6×</span>
+<span class="cline-any cline-yes">6×</span>
+<span class="cline-any cline-yes">6×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">11×</span>
+<span class="cline-any cline-yes">11×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-yes">12×</span>
+<span class="cline-any cline-yes">12×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-yes">265×</span>
+<span class="cline-any cline-yes">265×</span>
+<span class="cline-any cline-yes">265×</span>
+<span class="cline-any cline-yes">265×</span>
+<span class="cline-any cline-yes">263×</span>
+<span class="cline-any cline-yes">263×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">27×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">27×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">226×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">226×</span>
+<span class="cline-any cline-yes">36×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">226×</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-yes">28×</span>
+<span class="cline-any cline-yes">28×</span>
+<span class="cline-any cline-yes">28×</span>
+<span class="cline-any cline-yes">28×</span>
+<span class="cline-any cline-yes">25×</span>
+<span class="cline-any cline-yes">3×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">226×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">25×</span>
+<span class="cline-any cline-yes">25×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">57×</span>
+<span class="cline-any cline-yes">57×</span>
+<span class="cline-any cline-yes">56×</span>
+<span class="cline-any cline-yes">56×</span>
+<span class="cline-any cline-yes">56×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">57×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">56×</span>
+<span class="cline-any cline-yes">42×</span>
+<span class="cline-any cline-yes">42×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">42×</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-yes">38×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">42×</span>
+<span class="cline-any cline-yes">42×</span>
+<span class="cline-any cline-yes">42×</span>
+<span class="cline-any cline-yes">42×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">272×</span>
+<span class="cline-any cline-yes">272×</span>
+<span class="cline-any cline-yes">270×</span>
+<span class="cline-any cline-yes">270×</span>
+<span class="cline-any cline-yes">270×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">272×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">1428×</span>
+<span class="cline-any cline-yes">1428×</span>
+<span class="cline-any cline-yes">1428×</span>
+<span class="cline-any cline-yes">345×</span>
+<span class="cline-any cline-yes">395×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-yes">16×</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-yes">5×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">757×</span>
+<span class="cline-any cline-yes">757×</span>
+<span class="cline-any cline-yes">757×</span>
+<span class="cline-any cline-yes">757×</span>
+<span class="cline-any cline-yes">757×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">757×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">753×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">280×</span>
+<span class="cline-any cline-yes">280×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">434×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">114×</span>
+<span class="cline-any cline-yes">114×</span>
+<span class="cline-any cline-yes">114×</span>
+<span class="cline-any cline-yes">320×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">264×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">56×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">56×</span>
+<span class="cline-any cline-yes">56×</span>
+<span class="cline-any cline-yes">186×</span>
+<span class="cline-any cline-yes">186×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">186×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">186×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">186×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">753×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">316×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">316×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">316×</span>
+<span class="cline-any cline-yes">314×</span>
+<span class="cline-any cline-yes">314×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">314×</span>
+<span class="cline-any cline-yes">54×</span>
+<span class="cline-any cline-yes">54×</span>
+<span class="cline-any cline-yes">54×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-yes">5×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">2×</span>
+<span class="cline-any cline-yes">3×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">'use strict';
+&nbsp;
+module.exports = Readable;
+&nbsp;
+/*&lt;replacement&gt;*/
+var processNextTick = require('process-nextick-args');
+/*&lt;/replacement&gt;*/
+&nbsp;
+/*&lt;replacement&gt;*/
+var isArray = require('isarray');
+/*&lt;/replacement&gt;*/
+&nbsp;
+Readable.ReadableState = ReadableState;
+&nbsp;
+/*&lt;replacement&gt;*/
+var EE = require('events').EventEmitter;
+&nbsp;
+var EElistenerCount = function (emitter, type) {
+ return emitter.listeners(type).length;
+};
+/*&lt;/replacement&gt;*/
+&nbsp;
+/*&lt;replacement&gt;*/
+var Stream;
+(function () {
+ try {
+ Stream = require('st' + 'ream');
+ } catch (_) {} finally {
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (!Stream) <span class="cstat-no" title="statement not covered" >Stream = require('events').EventEmitter;</span>
+ }
+})();
+/*&lt;/replacement&gt;*/
+&nbsp;
+var Buffer = require('buffer').Buffer;
+/*&lt;replacement&gt;*/
+var bufferShim = require('buffer-shims');
+/*&lt;/replacement&gt;*/
+&nbsp;
+/*&lt;replacement&gt;*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*&lt;/replacement&gt;*/
+&nbsp;
+/*&lt;replacement&gt;*/
+var debugUtil = require('util');
+var debug = void 0;
+<span class="missing-if-branch" title="else path not taken" >E</span>if (debugUtil &amp;&amp; debugUtil.debuglog) {
+ debug = debugUtil.debuglog('stream');
+} else {
+<span class="cstat-no" title="statement not covered" > debug = <span class="fstat-no" title="function not covered" >function () {</span>};</span>
+}
+/*&lt;/replacement&gt;*/
+&nbsp;
+var StringDecoder;
+&nbsp;
+util.inherits(Readable, Stream);
+&nbsp;
+var hasPrependListener = typeof EE.prototype.prependListener === 'function';
+&nbsp;
+function prependListener(emitter, event, fn) {
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (hasPrependListener) <span class="cstat-no" title="statement not covered" >return emitter.prependListener(event, fn);</span>
+&nbsp;
+ // This is a brutally ugly hack to make sure that our error handler
+ // is attached before any userland ones. NEVER DO THIS. This is here
+ // only because this code needs to continue to work with older versions
+ // of Node.js that do not include the prependListener() method. The goal
+ // is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else <span class="missing-if-branch" title="if path not taken" >I</span>if (isArray(emitter._events[event])) <span class="cstat-no" title="statement not covered" >emitter._events[event].unshift(fn);e</span>lse emitter._events[event] = [fn, emitter._events[event]];
+}
+&nbsp;
+var Duplex;
+function ReadableState(options, stream) {
+ Duplex = Duplex || <span class="branch-1 cbranch-no" title="branch not covered" >require('./_stream_duplex');</span>
+&nbsp;
+ options = options || {};
+&nbsp;
+ // object stream flag. Used to make read(n) ignore n and to
+ // make all the buffer merging and length checks go away
+ this.objectMode = !!options.objectMode;
+&nbsp;
+ if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode;
+&nbsp;
+ // the point at which it stops calling _read() to fill the buffer
+ // Note: 0 is a valid value, means "don't call _read preemptively ever"
+ var hwm = options.highWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
+&nbsp;
+ // cast to ints.
+ this.highWaterMark = ~ ~this.highWaterMark;
+&nbsp;
+ this.buffer = [];
+ this.length = 0;
+ this.pipes = null;
+ this.pipesCount = 0;
+ this.flowing = null;
+ this.ended = false;
+ this.endEmitted = false;
+ this.reading = false;
+&nbsp;
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+&nbsp;
+ // whenever we return null, then we set a flag to say
+ // that we're awaiting a 'readable' event emission.
+ this.needReadable = false;
+ this.emittedReadable = false;
+ this.readableListening = false;
+ this.resumeScheduled = false;
+&nbsp;
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+&nbsp;
+ // when piping, we only care about 'readable' events that happen
+ // after read()ing all the bytes and not getting any pushback.
+ this.ranOut = false;
+&nbsp;
+ // the number of writers that are awaiting a drain event in .pipe()s
+ this.awaitDrain = 0;
+&nbsp;
+ // if true, a maybeReadMore has been scheduled
+ this.readingMore = false;
+&nbsp;
+ this.decoder = null;
+ this.encoding = null;
+ if (options.encoding) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this.decoder = new StringDecoder(options.encoding);
+ this.encoding = options.encoding;
+ }
+}
+&nbsp;
+var Duplex;
+function Readable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+&nbsp;
+ if (!(this instanceof Readable)) return new Readable(options);
+&nbsp;
+ this._readableState = new ReadableState(options, this);
+&nbsp;
+ // legacy
+ this.readable = true;
+&nbsp;
+ if (options &amp;&amp; typeof options.read === 'function') this._read = options.read;
+&nbsp;
+ Stream.call(this);
+}
+&nbsp;
+// Manually shove something into the read() buffer.
+// This returns true if the highWaterMark has not been hit yet,
+// similar to how Writable.write() returns true if you should
+// write() some more.
+Readable.prototype.push = function (chunk, encoding) {
+ var state = this._readableState;
+&nbsp;
+ if (!state.objectMode &amp;&amp; typeof chunk === 'string') {
+ encoding = encoding || state.defaultEncoding;
+ if (encoding !== state.encoding) {
+ chunk = bufferShim.from(chunk, encoding);
+ encoding = '';
+ }
+ }
+&nbsp;
+ return readableAddChunk(this, state, chunk, encoding, false);
+};
+&nbsp;
+// Unshift should *always* be something directly out of read()
+Readable.prototype.unshift = function (chunk) {
+ var state = this._readableState;
+ return readableAddChunk(this, state, chunk, '', true);
+};
+&nbsp;
+Readable.prototype.isPaused = function () {
+ return this._readableState.flowing === false;
+};
+&nbsp;
+function readableAddChunk(stream, state, chunk, encoding, addToFront) {
+ var er = chunkInvalid(state, chunk);
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (er) {
+<span class="cstat-no" title="statement not covered" > stream.emit('error', er);</span>
+ } else if (chunk === null) {
+ state.reading = false;
+ onEofChunk(stream, state);
+ } else if (state.objectMode || chunk &amp;&amp; chunk.length &gt; 0) {
+ if (state.ended &amp;&amp; !addToFront) {
+ var e = new Error('stream.push() after EOF');
+ stream.emit('error', e);
+ } else if (state.endEmitted &amp;&amp; addToFront) {
+ var _e = new Error('stream.unshift() after end event');
+ stream.emit('error', _e);
+ } else {
+ var skipAdd;
+ if (state.decoder &amp;&amp; !addToFront &amp;&amp; !encoding) {
+ chunk = state.decoder.write(chunk);
+ skipAdd = !state.objectMode &amp;&amp; chunk.length === 0;
+ }
+&nbsp;
+ if (!addToFront) state.reading = false;
+&nbsp;
+ // Don't add to the buffer if we've decoded to an empty string chunk and
+ // we're not in object mode
+ if (!skipAdd) {
+ // if we want the data now, just emit it.
+ if (state.flowing &amp;&amp; state.length === 0 &amp;&amp; !state.sync) {
+ stream.emit('data', chunk);
+ stream.read(0);
+ } else {
+ // update the buffer info.
+ state.length += state.objectMode ? 1 : chunk.length;
+ if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
+&nbsp;
+ if (state.needReadable) emitReadable(stream);
+ }
+ }
+&nbsp;
+ maybeReadMore(stream, state);
+ }
+ } else if (!addToFront) {
+ state.reading = false;
+ }
+&nbsp;
+ return needMoreData(state);
+}
+&nbsp;
+// if it's past the high water mark, we can push in some more.
+// Also, if we have no data yet, we can stand some
+// more bytes. This is to work around cases where hwm=0,
+// such as the repl. Also, if the push() triggered a
+// readable event, and the user called read(largeNumber) such that
+// needReadable was set, then we ought to push more, so that another
+// 'readable' event will be triggered.
+function needMoreData(state) {
+ return !state.ended &amp;&amp; (state.needReadable || state.length &lt; state.highWaterMark || state.length === 0);
+}
+&nbsp;
+// backwards compatibility.
+Readable.prototype.setEncoding = function (enc) {
+ if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
+ this._readableState.decoder = new StringDecoder(enc);
+ this._readableState.encoding = enc;
+ return this;
+};
+&nbsp;
+// Don't raise the hwm &gt; 8MB
+var MAX_HWM = 0x800000;
+function computeNewHighWaterMark(n) {
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (n &gt;= MAX_HWM) {
+<span class="cstat-no" title="statement not covered" > n = MAX_HWM;</span>
+ } else {
+ // Get the next highest power of 2
+ n--;
+ n |= n &gt;&gt;&gt; 1;
+ n |= n &gt;&gt;&gt; 2;
+ n |= n &gt;&gt;&gt; 4;
+ n |= n &gt;&gt;&gt; 8;
+ n |= n &gt;&gt;&gt; 16;
+ n++;
+ }
+ return n;
+}
+&nbsp;
+function howMuchToRead(n, state) {
+ if (state.length === 0 &amp;&amp; state.ended) return 0;
+&nbsp;
+ if (state.objectMode) return n === 0 ? 0 : 1;
+&nbsp;
+ if (n === null || isNaN(n)) {
+ // only flow one buffer at a time
+ if (state.flowing &amp;&amp; state.buffer.length) return state.buffer[0].length;else return state.length;
+ }
+&nbsp;
+ if (n &lt;= 0) return 0;
+&nbsp;
+ // If we're asking for more than the target buffer level,
+ // then raise the water mark. Bump up to the next highest
+ // power of 2, to prevent increasing it excessively in tiny
+ // amounts.
+ if (n &gt; state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
+&nbsp;
+ // don't have that much. return null, unless we've ended.
+ if (n &gt; state.length) {
+ if (!state.ended) {
+ state.needReadable = true;
+ return 0;
+ } else {
+ return state.length;
+ }
+ }
+&nbsp;
+ return n;
+}
+&nbsp;
+// you can override either this method, or the async _read(n) below.
+Readable.prototype.read = function (n) {
+ debug('read', n);
+ var state = this._readableState;
+ var nOrig = n;
+&nbsp;
+ if (typeof n !== 'number' || n &gt; 0) state.emittedReadable = false;
+&nbsp;
+ // if we're doing read(0) to trigger a readable event, but we
+ // already have a bunch of data in the buffer, then just trigger
+ // the 'readable' event and move on.
+ if (n === 0 &amp;&amp; state.needReadable &amp;&amp; (state.length &gt;= state.highWaterMark || state.ended)) {
+ debug('read: emitReadable', state.length, state.ended);
+ if (state.length === 0 &amp;&amp; state.ended) endReadable(this);else emitReadable(this);
+ return null;
+ }
+&nbsp;
+ n = howMuchToRead(n, state);
+&nbsp;
+ // if we've ended, and we're now clear, then finish it up.
+ if (n === 0 &amp;&amp; state.ended) {
+ if (state.length === 0) endReadable(this);
+ return null;
+ }
+&nbsp;
+ // All the actual chunk generation logic needs to be
+ // *below* the call to _read. The reason is that in certain
+ // synthetic stream cases, such as passthrough streams, _read
+ // may be a completely synchronous operation which may change
+ // the state of the read buffer, providing enough data when
+ // before there was *not* enough.
+ //
+ // So, the steps are:
+ // 1. Figure out what the state of things will be after we do
+ // a read from the buffer.
+ //
+ // 2. If that resulting state will trigger a _read, then call _read.
+ // Note that this may be asynchronous, or synchronous. Yes, it is
+ // deeply ugly to write APIs this way, but that still doesn't mean
+ // that the Readable class should behave improperly, as streams are
+ // designed to be sync/async agnostic.
+ // Take note if the _read call is sync or async (ie, if the read call
+ // has returned yet), so that we know whether or not it's safe to emit
+ // 'readable' etc.
+ //
+ // 3. Actually pull the requested chunks out of the buffer and return.
+&nbsp;
+ // if we need a readable event, then we need to do some reading.
+ var doRead = state.needReadable;
+ debug('need readable', doRead);
+&nbsp;
+ // if we currently have less than the highWaterMark, then also read some
+ if (state.length === 0 || state.length - n &lt; state.highWaterMark) {
+ doRead = true;
+ debug('length less than watermark', doRead);
+ }
+&nbsp;
+ // however, if we've ended, then there's no point, and if we're already
+ // reading, then it's unnecessary.
+ if (state.ended || state.reading) {
+ doRead = false;
+ debug('reading or ended', doRead);
+ }
+&nbsp;
+ if (doRead) {
+ debug('do read');
+ state.reading = true;
+ state.sync = true;
+ // if the length is currently zero, then we *need* a readable event.
+ if (state.length === 0) state.needReadable = true;
+ // call internal read method
+ this._read(state.highWaterMark);
+ state.sync = false;
+ }
+&nbsp;
+ // If _read pushed data synchronously, then `reading` will be false,
+ // and we need to re-evaluate how much data we can return to the user.
+ if (doRead &amp;&amp; !state.reading) n = howMuchToRead(nOrig, state);
+&nbsp;
+ var ret;
+ if (n &gt; 0) ret = fromList(n, state);else ret = null;
+&nbsp;
+ if (ret === null) {
+ state.needReadable = true;
+ n = 0;
+ }
+&nbsp;
+ state.length -= n;
+&nbsp;
+ // If we have nothing in the buffer, then we want to know
+ // as soon as we *do* get something into the buffer.
+ if (state.length === 0 &amp;&amp; !state.ended) state.needReadable = true;
+&nbsp;
+ // If we tried to read() past the EOF, then emit end on the next tick.
+ if (nOrig !== n &amp;&amp; state.ended &amp;&amp; state.length === 0) endReadable(this);
+&nbsp;
+ if (ret !== null) this.emit('data', ret);
+&nbsp;
+ return ret;
+};
+&nbsp;
+function chunkInvalid(state, chunk) {
+ var er = null;
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (!Buffer.isBuffer(chunk) &amp;&amp; typeof chunk !== 'string' &amp;&amp; chunk !== null &amp;&amp; chunk !== undefined &amp;&amp; !state.objectMode) {
+<span class="cstat-no" title="statement not covered" > er = new TypeError('Invalid non-string/buffer chunk');</span>
+ }
+ return er;
+}
+&nbsp;
+function onEofChunk(stream, state) {
+ if (state.ended) return;
+ if (state.decoder) {
+ var chunk = state.decoder.end();
+ if (chunk &amp;&amp; chunk.length) {
+ state.buffer.push(chunk);
+ state.length += state.objectMode ? <span class="branch-0 cbranch-no" title="branch not covered" >1 </span>: chunk.length;
+ }
+ }
+ state.ended = true;
+&nbsp;
+ // emit 'readable' now to make sure it gets picked up.
+ emitReadable(stream);
+}
+&nbsp;
+// Don't emit readable right away in sync mode, because this can trigger
+// another read() call =&gt; stack overflow. This way, it might trigger
+// a nextTick recursion warning, but that's not so bad.
+function emitReadable(stream) {
+ var state = stream._readableState;
+ state.needReadable = false;
+ if (!state.emittedReadable) {
+ debug('emitReadable', state.flowing);
+ state.emittedReadable = true;
+ if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream);
+ }
+}
+&nbsp;
+function emitReadable_(stream) {
+ debug('emit readable');
+ stream.emit('readable');
+ flow(stream);
+}
+&nbsp;
+// at this point, the user has presumably seen the 'readable' event,
+// and called read() to consume some data. that may have triggered
+// in turn another _read(n) call, in which case reading = true if
+// it's in progress.
+// However, if we're not ended, or reading, and the length &lt; hwm,
+// then go ahead and try to read some more preemptively.
+function maybeReadMore(stream, state) {
+ if (!state.readingMore) {
+ state.readingMore = true;
+ processNextTick(maybeReadMore_, stream, state);
+ }
+}
+&nbsp;
+function maybeReadMore_(stream, state) {
+ var len = state.length;
+ while (!state.reading &amp;&amp; !state.flowing &amp;&amp; !state.ended &amp;&amp; state.length &lt; state.highWaterMark) {
+ debug('maybeReadMore read 0');
+ stream.read(0);
+ if (len === state.length)
+ // didn't get any data, stop spinning.
+ break;else len = state.length;
+ }
+ state.readingMore = false;
+}
+&nbsp;
+// abstract method. to be overridden in specific implementation classes.
+// call cb(er, data) where data is &lt;= n in length.
+// for virtual (non-string, non-buffer) streams, "length" is somewhat
+// arbitrary, and perhaps not very meaningful.
+Readable.prototype._read = <span class="fstat-no" title="function not covered" >function (n) {</span>
+<span class="cstat-no" title="statement not covered" > this.emit('error', new Error('not implemented'));</span>
+};
+&nbsp;
+Readable.prototype.pipe = function (dest, pipeOpts) {
+ var src = this;
+ var state = this._readableState;
+&nbsp;
+ switch (state.pipesCount) {
+ case 0:
+ state.pipes = dest;
+ break;
+ case 1:
+ state.pipes = [state.pipes, dest];
+ break;
+<span class="branch-2 cbranch-no" title="branch not covered" > default:</span>
+<span class="cstat-no" title="statement not covered" > state.pipes.push(dest);</span>
+<span class="cstat-no" title="statement not covered" > break;</span>
+ }
+ state.pipesCount += 1;
+ debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
+&nbsp;
+ var doEnd = (!pipeOpts || pipeOpts.end !== false) &amp;&amp; dest !== process.stdout &amp;&amp; dest !== process.stderr;
+&nbsp;
+ var endFn = doEnd ? onend : cleanup;
+ if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn);
+&nbsp;
+ dest.on('unpipe', onunpipe);
+ function onunpipe(readable) {
+ debug('onunpipe');
+ if (readable === src) {
+ cleanup();
+ }
+ }
+&nbsp;
+ function onend() {
+ debug('onend');
+ dest.end();
+ }
+&nbsp;
+ // when the dest drains, it reduces the awaitDrain counter
+ // on the source. This would be more elegant with a .once()
+ // handler in flow(), but adding and removing repeatedly is
+ // too slow.
+ var ondrain = pipeOnDrain(src);
+ dest.on('drain', ondrain);
+&nbsp;
+ var cleanedUp = false;
+ function cleanup() {
+ debug('cleanup');
+ // cleanup event handlers once the pipe is broken
+ dest.removeListener('close', onclose);
+ dest.removeListener('finish', onfinish);
+ dest.removeListener('drain', ondrain);
+ dest.removeListener('error', onerror);
+ dest.removeListener('unpipe', onunpipe);
+ src.removeListener('end', onend);
+ src.removeListener('end', cleanup);
+ src.removeListener('data', ondata);
+&nbsp;
+ cleanedUp = true;
+&nbsp;
+ // if the reader is waiting for a drain event from this
+ // specific writer, then it would cause it to never start
+ // flowing again.
+ // So, if this is awaiting a drain, then we just call it now.
+ // If we don't know, then assume that we are waiting for one.
+ if (state.awaitDrain &amp;&amp; (!dest._writableState || dest._writableState.needDrain)) ondrain();
+ }
+&nbsp;
+ src.on('data', ondata);
+ function ondata(chunk) {
+ debug('ondata');
+ var ret = dest.write(chunk);
+ if (false === ret) {
+ // If the user unpiped during `dest.write()`, it is possible
+ // to get stuck in a permanently paused state if that write
+ // also returned false.
+ // =&gt; Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 &amp;&amp; state.pipes === dest || state.pipesCount &gt; 1 &amp;&amp; indexOf(state.pipes, dest) !== -1) &amp;&amp; !cleanedUp) {
+ debug('false write response, pause', src._readableState.awaitDrain);
+ src._readableState.awaitDrain++;
+ }
+ src.pause();
+ }
+ }
+&nbsp;
+ // if the dest has an error, then stop piping into it.
+ // however, don't suppress the throwing behavior for this.
+ function onerror(er) {
+ debug('onerror', er);
+ unpipe();
+ dest.removeListener('error', onerror);
+ if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
+ }
+&nbsp;
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
+&nbsp;
+ // Both close and finish should trigger unpipe, but only once.
+<span class="fstat-no" title="function not covered" > function onclose() {</span>
+<span class="cstat-no" title="statement not covered" > dest.removeListener('finish', onfinish);</span>
+<span class="cstat-no" title="statement not covered" > unpipe();</span>
+ }
+ dest.once('close', onclose);
+ function onfinish() {
+ debug('onfinish');
+ dest.removeListener('close', onclose);
+ unpipe();
+ }
+ dest.once('finish', onfinish);
+&nbsp;
+ function unpipe() {
+ debug('unpipe');
+ src.unpipe(dest);
+ }
+&nbsp;
+ // tell the dest that it's being piped to
+ dest.emit('pipe', src);
+&nbsp;
+ // start the flow if it hasn't been started already.
+ if (!state.flowing) {
+ debug('pipe resume');
+ src.resume();
+ }
+&nbsp;
+ return dest;
+};
+&nbsp;
+function pipeOnDrain(src) {
+ return function () {
+ var state = src._readableState;
+ debug('pipeOnDrain', state.awaitDrain);
+ if (state.awaitDrain) state.awaitDrain--;
+ if (state.awaitDrain === 0 &amp;&amp; EElistenerCount(src, 'data')) {
+ state.flowing = true;
+ flow(src);
+ }
+ };
+}
+&nbsp;
+Readable.prototype.unpipe = function (dest) {
+ var state = this._readableState;
+&nbsp;
+ // if we're not piping anywhere, then do nothing.
+ if (state.pipesCount === 0) return this;
+&nbsp;
+ // just one destination. most common case.
+ <span class="missing-if-branch" title="else path not taken" >E</span>if (state.pipesCount === 1) {
+ // passed in one, but it's not the right one.
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (dest &amp;&amp; dest !== state.pipes) <span class="cstat-no" title="statement not covered" >return this;</span>
+&nbsp;
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (!dest) <span class="cstat-no" title="statement not covered" >dest = state.pipes;</span>
+&nbsp;
+ // got a match.
+ state.pipes = null;
+ state.pipesCount = 0;
+ state.flowing = false;
+ <span class="missing-if-branch" title="else path not taken" >E</span>if (dest) dest.emit('unpipe', this);
+ return this;
+ }
+&nbsp;
+ // slow case. multiple pipe destinations.
+&nbsp;
+<span class="cstat-no" title="statement not covered" > if (!dest) {</span>
+ // remove all.
+<span class="cstat-no" title="statement not covered" > var dests = state.pipes;</span>
+<span class="cstat-no" title="statement not covered" > var len = state.pipesCount;</span>
+<span class="cstat-no" title="statement not covered" > state.pipes = null;</span>
+<span class="cstat-no" title="statement not covered" > state.pipesCount = 0;</span>
+<span class="cstat-no" title="statement not covered" > state.flowing = false;</span>
+&nbsp;
+<span class="cstat-no" title="statement not covered" > for (var _i = 0; _i &lt; len; _i++) {</span>
+<span class="cstat-no" title="statement not covered" > dests[_i].emit('unpipe', this);</span>
+ }<span class="cstat-no" title="statement not covered" >return this;</span>
+ }
+&nbsp;
+ // try to find the right one.
+<span class="cstat-no" title="statement not covered" > var i = indexOf(state.pipes, dest);</span>
+<span class="cstat-no" title="statement not covered" > if (i === -1) <span class="cstat-no" title="statement not covered" >return this;</span></span>
+&nbsp;
+<span class="cstat-no" title="statement not covered" > state.pipes.splice(i, 1);</span>
+<span class="cstat-no" title="statement not covered" > state.pipesCount -= 1;</span>
+<span class="cstat-no" title="statement not covered" > if (state.pipesCount === 1) <span class="cstat-no" title="statement not covered" >state.pipes = state.pipes[0];</span></span>
+&nbsp;
+<span class="cstat-no" title="statement not covered" > dest.emit('unpipe', this);</span>
+&nbsp;
+<span class="cstat-no" title="statement not covered" > return this;</span>
+};
+&nbsp;
+// set up data events if they are asked for
+// Ensure readable listeners eventually get something
+Readable.prototype.on = function (ev, fn) {
+ var res = Stream.prototype.on.call(this, ev, fn);
+&nbsp;
+ // If listening to data, and it has not explicitly been paused,
+ // then call resume to start the flow of data on the next tick.
+ if (ev === 'data' &amp;&amp; false !== this._readableState.flowing) {
+ this.resume();
+ }
+&nbsp;
+ if (ev === 'readable' &amp;&amp; !this._readableState.endEmitted) {
+ var state = this._readableState;
+ if (!state.readableListening) {
+ state.readableListening = true;
+ state.emittedReadable = false;
+ state.needReadable = true;
+ if (!state.reading) {
+ processNextTick(nReadingNextTick, this);
+ } else if (state.length) {
+ emitReadable(this, state);
+ }
+ }
+ }
+&nbsp;
+ return res;
+};
+Readable.prototype.addListener = Readable.prototype.on;
+&nbsp;
+function nReadingNextTick(self) {
+ debug('readable nexttick read 0');
+ self.read(0);
+}
+&nbsp;
+// pause() and resume() are remnants of the legacy readable stream API
+// If the user uses them, then switch into old mode.
+Readable.prototype.resume = function () {
+ var state = this._readableState;
+ if (!state.flowing) {
+ debug('resume');
+ state.flowing = true;
+ resume(this, state);
+ }
+ return this;
+};
+&nbsp;
+function resume(stream, state) {
+ if (!state.resumeScheduled) {
+ state.resumeScheduled = true;
+ processNextTick(resume_, stream, state);
+ }
+}
+&nbsp;
+function resume_(stream, state) {
+ if (!state.reading) {
+ debug('resume read 0');
+ stream.read(0);
+ }
+&nbsp;
+ state.resumeScheduled = false;
+ stream.emit('resume');
+ flow(stream);
+ if (state.flowing &amp;&amp; !state.reading) stream.read(0);
+}
+&nbsp;
+Readable.prototype.pause = function () {
+ debug('call pause flowing=%j', this._readableState.flowing);
+ if (false !== this._readableState.flowing) {
+ debug('pause');
+ this._readableState.flowing = false;
+ this.emit('pause');
+ }
+ return this;
+};
+&nbsp;
+function flow(stream) {
+ var state = stream._readableState;
+ debug('flow', state.flowing);
+ if (state.flowing) {
+ do {
+ var chunk = stream.read();
+ } while (null !== chunk &amp;&amp; state.flowing);
+ }
+}
+&nbsp;
+// wrap an old-style stream as the async data source.
+// This is *not* part of the readable stream interface.
+// It is an ugly unfortunate mess of history.
+Readable.prototype.wrap = function (stream) {
+ var state = this._readableState;
+ var paused = false;
+&nbsp;
+ var self = this;
+ stream.on('end', function () {
+ debug('wrapped end');
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (state.decoder &amp;&amp; <span class="branch-1 cbranch-no" title="branch not covered" >!state.ended)</span> {
+<span class="cstat-no" title="statement not covered" > var chunk = state.decoder.end();</span>
+<span class="cstat-no" title="statement not covered" > if (chunk &amp;&amp; chunk.length) <span class="cstat-no" title="statement not covered" >self.push(chunk);</span></span>
+ }
+&nbsp;
+ self.push(null);
+ });
+&nbsp;
+ stream.on('data', <span class="fstat-no" title="function not covered" >function (chunk) {</span>
+<span class="cstat-no" title="statement not covered" > debug('wrapped data');</span>
+<span class="cstat-no" title="statement not covered" > if (state.decoder) <span class="cstat-no" title="statement not covered" >chunk = state.decoder.write(chunk);</span></span>
+&nbsp;
+ // don't skip over falsy values in objectMode
+<span class="cstat-no" title="statement not covered" > if (state.objectMode &amp;&amp; (chunk === null || chunk === undefined)) <span class="cstat-no" title="statement not covered" >return;e</span>lse <span class="cstat-no" title="statement not covered" >if (!state.objectMode &amp;&amp; (!chunk || !chunk.length)) <span class="cstat-no" title="statement not covered" >return;</span></span></span>
+&nbsp;
+<span class="cstat-no" title="statement not covered" > var ret = self.push(chunk);</span>
+<span class="cstat-no" title="statement not covered" > if (!ret) {</span>
+<span class="cstat-no" title="statement not covered" > paused = true;</span>
+<span class="cstat-no" title="statement not covered" > stream.pause();</span>
+ }
+ });
+&nbsp;
+ // proxy all the other methods.
+ // important when wrapping filters and duplexes.
+ for (var i in stream) {
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (this[i] === undefined &amp;&amp; typeof stream[i] === 'function') {
+<span class="cstat-no" title="statement not covered" > this[i] = <span class="fstat-no" title="function not covered" >function (method) {</span></span>
+<span class="cstat-no" title="statement not covered" > return <span class="fstat-no" title="function not covered" >function () {</span></span>
+<span class="cstat-no" title="statement not covered" > return stream[method].apply(stream, arguments);</span>
+ };
+ }(i);
+ }
+ }
+&nbsp;
+ // proxy certain important events.
+ var events = ['error', 'close', 'destroy', 'pause', 'resume'];
+ forEach(events, function (ev) {
+ stream.on(ev, self.emit.bind(self, ev));
+ });
+&nbsp;
+ // when we try to consume some more bytes, simply unpause the
+ // underlying stream.
+ self._read = <span class="fstat-no" title="function not covered" >function (n) {</span>
+<span class="cstat-no" title="statement not covered" > debug('wrapped _read', n);</span>
+<span class="cstat-no" title="statement not covered" > if (paused) {</span>
+<span class="cstat-no" title="statement not covered" > paused = false;</span>
+<span class="cstat-no" title="statement not covered" > stream.resume();</span>
+ }
+ };
+&nbsp;
+ return self;
+};
+&nbsp;
+// exposed for testing purposes only.
+Readable._fromList = fromList;
+&nbsp;
+// Pluck off n bytes from an array of buffers.
+// Length is the combined lengths of all the buffers in the list.
+function fromList(n, state) {
+ var list = state.buffer;
+ var length = state.length;
+ var stringMode = !!state.decoder;
+ var objectMode = !!state.objectMode;
+ var ret;
+&nbsp;
+ // nothing in the list, definitely empty.
+ if (list.length === 0) return null;
+&nbsp;
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (length === 0) <span class="cstat-no" title="statement not covered" >ret = null;e</span>lse if (objectMode) ret = list.shift();else if (!n || n &gt;= length) {
+ // read it all, truncate the array.
+ if (stringMode) ret = list.join('');else if (list.length === 1) ret = list[0];else ret = Buffer.concat(list, length);
+ list.length = 0;
+ } else {
+ // read just some of it.
+ if (n &lt; list[0].length) {
+ // just take a part of the first list item.
+ // slice is the same for buffers and strings.
+ var buf = list[0];
+ ret = buf.slice(0, n);
+ list[0] = buf.slice(n);
+ } else if (n === list[0].length) {
+ // first list is a perfect match
+ ret = list.shift();
+ } else {
+ // complex case.
+ // we have enough to cover it, but it spans past the first buffer.
+ if (stringMode) ret = '';else ret = bufferShim.allocUnsafe(n);
+&nbsp;
+ var c = 0;
+ for (var i = 0, l = list.length; i &lt; l &amp;&amp; c &lt; n; i++) {
+ var _buf = list[0];
+ var cpy = Math.min(n - c, _buf.length);
+&nbsp;
+ if (stringMode) ret += _buf.slice(0, cpy);else _buf.copy(ret, c, 0, cpy);
+&nbsp;
+ if (cpy &lt; _buf.length) list[0] = _buf.slice(cpy);else list.shift();
+&nbsp;
+ c += cpy;
+ }
+ }
+ }
+&nbsp;
+ return ret;
+}
+&nbsp;
+function endReadable(stream) {
+ var state = stream._readableState;
+&nbsp;
+ // If we get here before consuming all the bytes, then that is a
+ // bug in node. Should never happen.
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (state.length &gt; 0) <span class="cstat-no" title="statement not covered" >throw new Error('"endReadable()" called on non-empty stream');</span>
+&nbsp;
+ if (!state.endEmitted) {
+ state.ended = true;
+ processNextTick(endReadableNT, state, stream);
+ }
+}
+&nbsp;
+function endReadableNT(state, stream) {
+ // Check that we didn't get one last unshift.
+ if (!state.endEmitted &amp;&amp; state.length === 0) {
+ state.endEmitted = true;
+ stream.readable = false;
+ stream.emit('end');
+ }
+}
+&nbsp;
+function forEach(xs, f) {
+ for (var i = 0, l = xs.length; i &lt; l; i++) {
+ f(xs[i], i);
+ }
+}
+&nbsp;
+function indexOf(xs, x) {
+ for (var i = 0, l = xs.length; i &lt; l; i++) {
+ if (xs[i] === x) return i;
+ }
+<span class="cstat-no" title="statement not covered" > return -1;</span>
+}</pre></td></tr>
+</table></pre>
+<div class='push'></div><!-- for sticky footer -->
+</div><!-- /wrapper -->
+<div class='footer quiet pad2 space-top1 center small'>
+ Code coverage
+ generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed May 18 2016 10:10:05 GMT-0400 (EDT)
+</div>
+</div>
+<script src="../prettify.js"></script>
+<script>
+window.onload = function () {
+ if (typeof prettyPrint === 'function') {
+ prettyPrint();
+ }
+};
+</script>
+<script src="../sorter.js"></script>
+</body>
+</html>
diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_transform.js.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_transform.js.html
new file mode 100644
index 0000000000..3542da4f63
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_transform.js.html
@@ -0,0 +1,602 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>Code coverage report for lib/_stream_transform.js</title>
+ <meta charset="utf-8" />
+ <link rel="stylesheet" href="../prettify.css" />
+ <link rel="stylesheet" href="../base.css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <style type='text/css'>
+ .coverage-summary .sorter {
+ background-image: url(../sort-arrow-sprite.png);
+ }
+ </style>
+</head>
+<body>
+<div class='wrapper'>
+ <div class='pad1'>
+ <h1>
+ <a href="../index.html">all files</a> / <a href="index.html">lib/</a> _stream_transform.js
+ </h1>
+ <div class='clearfix'>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">92.11% </span>
+ <span class="quiet">Statements</span>
+ <span class='fraction'>70/76</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">84.21% </span>
+ <span class="quiet">Branches</span>
+ <span class='fraction'>32/38</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">90.91% </span>
+ <span class="quiet">Functions</span>
+ <span class='fraction'>10/11</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">98.48% </span>
+ <span class="quiet">Lines</span>
+ <span class='fraction'>65/66</span>
+ </div>
+ </div>
+ </div>
+ <div class='status-line high'></div>
+<pre><table class="coverage">
+<tr><td class="line-count quiet">1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">116×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">116×</span>
+<span class="cline-any cline-yes">116×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">116×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">116×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">116×</span>
+<span class="cline-any cline-yes">116×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">116×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">116×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">116×</span>
+<span class="cline-any cline-yes">116×</span>
+<span class="cline-any cline-yes">116×</span>
+<span class="cline-any cline-yes">113×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">13×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">13×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">24×</span>
+<span class="cline-any cline-yes">19×</span>
+<span class="cline-any cline-yes">2×</span>
+<span class="cline-any cline-yes">17×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">127×</span>
+<span class="cline-any cline-yes">127×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">117×</span>
+<span class="cline-any cline-yes">117×</span>
+<span class="cline-any cline-yes">117×</span>
+<span class="cline-any cline-yes">117×</span>
+<span class="cline-any cline-yes">117×</span>
+<span class="cline-any cline-yes">117×</span>
+<span class="cline-any cline-yes">117×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">310×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">310×</span>
+<span class="cline-any cline-yes">116×</span>
+<span class="cline-any cline-yes">116×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">194×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">19×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">19×</span>
+<span class="cline-any cline-yes">19×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">19×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">19×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">19×</span>
+<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// a transform stream is a readable/writable stream where you do
+// something with the data. Sometimes it's called a "filter",
+// but that's not a great name for it, since that implies a thing where
+// some bits pass through, and others are simply ignored. (That would
+// be a valid example of a transform, of course.)
+//
+// While the output is causally related to the input, it's not a
+// necessarily symmetric or synchronous transformation. For example,
+// a zlib stream might take multiple plain-text writes(), and then
+// emit a single compressed chunk some time in the future.
+//
+// Here's how this works:
+//
+// The Transform stream has all the aspects of the readable and writable
+// stream classes. When you write(chunk), that calls _write(chunk,cb)
+// internally, and returns false if there's a lot of pending writes
+// buffered up. When you call read(), that calls _read(n) until
+// there's enough pending readable data buffered up.
+//
+// In a transform stream, the written data is placed in a buffer. When
+// _read(n) is called, it transforms the queued up data, calling the
+// buffered _write cb's as it consumes chunks. If consuming a single
+// written chunk would result in multiple output chunks, then the first
+// outputted bit calls the readcb, and subsequent chunks just go into
+// the read buffer, and will cause it to emit 'readable' if necessary.
+//
+// This way, back-pressure is actually determined by the reading side,
+// since _read has to be called to start processing a new chunk. However,
+// a pathological inflate type of transform can cause excessive buffering
+// here. For example, imagine a stream where every byte of input is
+// interpreted as an integer from 0-255, and then results in that many
+// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
+// 1kb of data being output. In this case, you could write a very small
+// amount of input, and end up with a very large amount of output. In
+// such a pathological inflating mechanism, there'd be no way to tell
+// the system to stop doing the transform. A single 4MB write could
+// cause the system to run out of memory.
+//
+// However, even in such a pathological case, only a single written chunk
+// would be consumed, and then the rest would wait (un-transformed) until
+// the results of the previous transformed chunk were consumed.
+&nbsp;
+'use strict';
+&nbsp;
+module.exports = Transform;
+&nbsp;
+var Duplex = require('./_stream_duplex');
+&nbsp;
+/*&lt;replacement&gt;*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*&lt;/replacement&gt;*/
+&nbsp;
+util.inherits(Transform, Duplex);
+&nbsp;
+function TransformState(stream) {
+ this.afterTransform = function (er, data) {
+ return afterTransform(stream, er, data);
+ };
+&nbsp;
+ this.needTransform = false;
+ this.transforming = false;
+ this.writecb = null;
+ this.writechunk = null;
+ this.writeencoding = null;
+}
+&nbsp;
+function afterTransform(stream, er, data) {
+ var ts = stream._transformState;
+ ts.transforming = false;
+&nbsp;
+ var cb = ts.writecb;
+&nbsp;
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (!cb) <span class="cstat-no" title="statement not covered" >return stream.emit('error', new Error('no writecb in Transform class'));</span>
+&nbsp;
+ ts.writechunk = null;
+ ts.writecb = null;
+&nbsp;
+ if (data !== null &amp;&amp; data !== undefined) stream.push(data);
+&nbsp;
+ cb(er);
+&nbsp;
+ var rs = stream._readableState;
+ rs.reading = false;
+ if (rs.needReadable || rs.length &lt; rs.highWaterMark) {
+ stream._read(rs.highWaterMark);
+ }
+}
+&nbsp;
+function Transform(options) {
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (!(this instanceof Transform)) <span class="cstat-no" title="statement not covered" >return new Transform(options);</span>
+&nbsp;
+ Duplex.call(this, options);
+&nbsp;
+ this._transformState = new TransformState(this);
+&nbsp;
+ // when the writable side finishes, then flush out anything remaining.
+ var stream = this;
+&nbsp;
+ // start out asking for a readable event once data is transformed.
+ this._readableState.needReadable = true;
+&nbsp;
+ // we have implemented the _read method, and done the other things
+ // that Readable wants before the first _read call, so unset the
+ // sync guard flag.
+ this._readableState.sync = false;
+&nbsp;
+ if (options) {
+ if (typeof options.transform === 'function') this._transform = options.transform;
+&nbsp;
+ if (typeof options.flush === 'function') this._flush = options.flush;
+ }
+&nbsp;
+ this.once('prefinish', function () {
+ if (typeof this._flush === 'function') this._flush(function (er) {
+ done(stream, er);
+ });else done(stream);
+ });
+}
+&nbsp;
+Transform.prototype.push = function (chunk, encoding) {
+ this._transformState.needTransform = false;
+ return Duplex.prototype.push.call(this, chunk, encoding);
+};
+&nbsp;
+// This is the part where you do stuff!
+// override this function in implementation classes.
+// 'chunk' is an input chunk.
+//
+// Call `push(newChunk)` to pass along transformed output
+// to the readable side. You may call 'push' zero or more times.
+//
+// Call `cb(err)` when you are done with this chunk. If you pass
+// an error, then that'll put the hurt on the whole operation. If you
+// never call cb(), then you'll never get another chunk.
+Transform.prototype._transform = <span class="fstat-no" title="function not covered" >function (chunk, encoding, cb) {</span>
+<span class="cstat-no" title="statement not covered" > throw new Error('Not implemented');</span>
+};
+&nbsp;
+Transform.prototype._write = function (chunk, encoding, cb) {
+ var ts = this._transformState;
+ ts.writecb = cb;
+ ts.writechunk = chunk;
+ ts.writeencoding = encoding;
+ <span class="missing-if-branch" title="else path not taken" >E</span>if (!ts.transforming) {
+ var rs = this._readableState;
+ if (ts.needTransform || rs.needReadable || rs.length &lt; rs.highWaterMark) this._read(rs.highWaterMark);
+ }
+};
+&nbsp;
+// Doesn't matter what the args are here.
+// _transform does all the work.
+// That we got here means that the readable side wants more data.
+Transform.prototype._read = function (n) {
+ var ts = this._transformState;
+&nbsp;
+ if (ts.writechunk !== null &amp;&amp; ts.writecb &amp;&amp; !ts.transforming) {
+ ts.transforming = true;
+ this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
+ } else {
+ // mark that we need a transform, so that any data that comes in
+ // will get processed, now that we've asked for it.
+ ts.needTransform = true;
+ }
+};
+&nbsp;
+function done(stream, er) {
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (er) <span class="cstat-no" title="statement not covered" >return stream.emit('error', er);</span>
+&nbsp;
+ // if there's nothing in the write buffer, then that means
+ // that nothing more will ever be provided
+ var ws = stream._writableState;
+ var ts = stream._transformState;
+&nbsp;
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (ws.length) <span class="cstat-no" title="statement not covered" >throw new Error('Calling transform done when ws.length != 0');</span>
+&nbsp;
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (ts.transforming) <span class="cstat-no" title="statement not covered" >throw new Error('Calling transform done when still transforming');</span>
+&nbsp;
+ return stream.push(null);
+}</pre></td></tr>
+</table></pre>
+<div class='push'></div><!-- for sticky footer -->
+</div><!-- /wrapper -->
+<div class='footer quiet pad2 space-top1 center small'>
+ Code coverage
+ generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed May 18 2016 10:10:05 GMT-0400 (EDT)
+</div>
+</div>
+<script src="../prettify.js"></script>
+<script>
+window.onload = function () {
+ if (typeof prettyPrint === 'function') {
+ prettyPrint();
+ }
+};
+</script>
+<script src="../sorter.js"></script>
+</body>
+</html>
diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_writable.js.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_writable.js.html
new file mode 100644
index 0000000000..0b200c9e09
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_writable.js.html
@@ -0,0 +1,1640 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>Code coverage report for lib/_stream_writable.js</title>
+ <meta charset="utf-8" />
+ <link rel="stylesheet" href="../prettify.css" />
+ <link rel="stylesheet" href="../base.css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <style type='text/css'>
+ .coverage-summary .sorter {
+ background-image: url(../sort-arrow-sprite.png);
+ }
+ </style>
+</head>
+<body>
+<div class='wrapper'>
+ <div class='pad1'>
+ <h1>
+ <a href="../index.html">all files</a> / <a href="index.html">lib/</a> _stream_writable.js
+ </h1>
+ <div class='clearfix'>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">95.52% </span>
+ <span class="quiet">Statements</span>
+ <span class='fraction'>277/290</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">94% </span>
+ <span class="quiet">Branches</span>
+ <span class='fraction'>141/150</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">90.91% </span>
+ <span class="quiet">Functions</span>
+ <span class='fraction'>30/33</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">96.58% </span>
+ <span class="quiet">Lines</span>
+ <span class='fraction'>254/263</span>
+ </div>
+ </div>
+ </div>
+ <div class='status-line high'></div>
+<pre><table class="coverage">
+<tr><td class="line-count quiet">1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526</td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">2305×</span>
+<span class="cline-any cline-yes">2305×</span>
+<span class="cline-any cline-yes">2305×</span>
+<span class="cline-any cline-yes">2305×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-yes">4574×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-yes">5×</span>
+<span class="cline-any cline-yes">5×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">97×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">97×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-yes">50×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">50×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">96×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">4625×</span>
+<span class="cline-any cline-yes">4625×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4625×</span>
+<span class="cline-any cline-yes">2×</span>
+<span class="cline-any cline-yes">4623×</span>
+<span class="cline-any cline-yes">2×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4625×</span>
+<span class="cline-any cline-yes">4×</span>
+<span class="cline-any cline-yes">2×</span>
+<span class="cline-any cline-yes">2×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4623×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">4626×</span>
+<span class="cline-any cline-yes">4626×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4626×</span>
+<span class="cline-any cline-yes">59×</span>
+<span class="cline-any cline-yes">59×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4626×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4626×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4626×</span>
+<span class="cline-any cline-yes">4621×</span>
+<span class="cline-any cline-yes">4621×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4624×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">13×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">13×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">13×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">13×</span>
+<span class="cline-any cline-yes">13×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">13×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">3×</span>
+<span class="cline-any cline-yes">3×</span>
+<span class="cline-any cline-yes">2×</span>
+<span class="cline-any cline-yes">2×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">4621×</span>
+<span class="cline-any cline-yes">2273×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4621×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">4621×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4621×</span>
+<span class="cline-any cline-yes">4621×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4621×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4621×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4621×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4621×</span>
+<span class="cline-any cline-yes">2305×</span>
+<span class="cline-any cline-yes">2305×</span>
+<span class="cline-any cline-yes">2305×</span>
+<span class="cline-any cline-yes">2265×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">40×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">2305×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">2316×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4621×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">4582×</span>
+<span class="cline-any cline-yes">4582×</span>
+<span class="cline-any cline-yes">4582×</span>
+<span class="cline-any cline-yes">4582×</span>
+<span class="cline-any cline-yes">4582×</span>
+<span class="cline-any cline-yes">4582×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">4574×</span>
+<span class="cline-any cline-yes">4574×</span>
+<span class="cline-any cline-yes">4574×</span>
+<span class="cline-any cline-yes">4574×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">4574×</span>
+<span class="cline-any cline-yes">4574×</span>
+<span class="cline-any cline-yes">4574×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4574×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4574×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4574×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4574×</span>
+<span class="cline-any cline-yes">2254×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4574×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">2230×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">2344×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">4574×</span>
+<span class="cline-any cline-yes">4574×</span>
+<span class="cline-any cline-yes">4574×</span>
+<span class="cline-any cline-yes">4574×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">4557×</span>
+<span class="cline-any cline-yes">27×</span>
+<span class="cline-any cline-yes">27×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">2263×</span>
+<span class="cline-any cline-yes">2263×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">2263×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">9×</span>
+<span class="cline-any cline-yes">9×</span>
+<span class="cline-any cline-yes">9×</span>
+<span class="cline-any cline-yes">9×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">9×</span>
+<span class="cline-any cline-yes">9×</span>
+<span class="cline-any cline-yes">42×</span>
+<span class="cline-any cline-yes">42×</span>
+<span class="cline-any cline-yes">42×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">9×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">9×</span>
+<span class="cline-any cline-yes">9×</span>
+<span class="cline-any cline-yes">9×</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">9×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">2254×</span>
+<span class="cline-any cline-yes">2257×</span>
+<span class="cline-any cline-yes">2257×</span>
+<span class="cline-any cline-yes">2257×</span>
+<span class="cline-any cline-yes">2257×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">2257×</span>
+<span class="cline-any cline-yes">2257×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">2257×</span>
+<span class="cline-any cline-yes">2252×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">2254×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">2263×</span>
+<span class="cline-any cline-yes">2263×</span>
+<span class="cline-any cline-yes">2263×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">65×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">65×</span>
+<span class="cline-any cline-yes">11×</span>
+<span class="cline-any cline-yes">11×</span>
+<span class="cline-any cline-yes">11×</span>
+<span class="cline-any cline-yes">54×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-yes">1×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">65×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">65×</span>
+<span class="cline-any cline-yes">5×</span>
+<span class="cline-any cline-yes">5×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">65×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">9209×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">125×</span>
+<span class="cline-any cline-yes">57×</span>
+<span class="cline-any cline-yes">57×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">4635×</span>
+<span class="cline-any cline-yes">4635×</span>
+<span class="cline-any cline-yes">125×</span>
+<span class="cline-any cline-yes">57×</span>
+<span class="cline-any cline-yes">57×</span>
+<span class="cline-any cline-yes">57×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">68×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">4635×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">61×</span>
+<span class="cline-any cline-yes">61×</span>
+<span class="cline-any cline-yes">61×</span>
+<span class="cline-any cline-yes">13×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">61×</span>
+<span class="cline-any cline-yes">61×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">49×</span>
+<span class="cline-any cline-yes">105×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">105×</span>
+<span class="cline-any cline-yes">105×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">105×</span>
+<span class="cline-any cline-yes">8×</span>
+<span class="cline-any cline-yes">8×</span>
+<span class="cline-any cline-yes">8×</span>
+<span class="cline-any cline-yes">40×</span>
+<span class="cline-any cline-yes">40×</span>
+<span class="cline-any cline-yes">40×</span>
+<span class="cline-any cline-yes">40×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-yes">8×</span>
+<span class="cline-any cline-yes">8×</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-no">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span>
+<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">// A bit simpler than readable streams.
+// Implement an async ._write(chunk, encoding, cb), and it'll handle all
+// the drain event emission and buffering.
+&nbsp;
+'use strict';
+&nbsp;
+module.exports = Writable;
+&nbsp;
+/*&lt;replacement&gt;*/
+var processNextTick = require('process-nextick-args');
+/*&lt;/replacement&gt;*/
+&nbsp;
+/*&lt;replacement&gt;*/
+var asyncWrite = !process.browser &amp;&amp; ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) &gt; -1 ? <span class="branch-0 cbranch-no" title="branch not covered" >setImmediate </span>: processNextTick;
+/*&lt;/replacement&gt;*/
+&nbsp;
+Writable.WritableState = WritableState;
+&nbsp;
+/*&lt;replacement&gt;*/
+var util = require('core-util-is');
+util.inherits = require('inherits');
+/*&lt;/replacement&gt;*/
+&nbsp;
+/*&lt;replacement&gt;*/
+var internalUtil = {
+ deprecate: require('util-deprecate')
+};
+/*&lt;/replacement&gt;*/
+&nbsp;
+/*&lt;replacement&gt;*/
+var Stream;
+(function () {
+ try {
+ Stream = require('st' + 'ream');
+ } catch (_) {} finally {
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (!Stream) <span class="cstat-no" title="statement not covered" >Stream = require('events').EventEmitter;</span>
+ }
+})();
+/*&lt;/replacement&gt;*/
+&nbsp;
+var Buffer = require('buffer').Buffer;
+/*&lt;replacement&gt;*/
+var bufferShim = require('buffer-shims');
+/*&lt;/replacement&gt;*/
+&nbsp;
+util.inherits(Writable, Stream);
+&nbsp;
+function nop() {}
+&nbsp;
+function WriteReq(chunk, encoding, cb) {
+ this.chunk = chunk;
+ this.encoding = encoding;
+ this.callback = cb;
+ this.next = null;
+}
+&nbsp;
+var Duplex;
+function WritableState(options, stream) {
+ Duplex = Duplex || <span class="branch-1 cbranch-no" title="branch not covered" >require('./_stream_duplex');</span>
+&nbsp;
+ options = options || {};
+&nbsp;
+ // object stream flag to indicate whether or not this stream
+ // contains buffers or objects.
+ this.objectMode = !!options.objectMode;
+&nbsp;
+ if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode;
+&nbsp;
+ // the point at which write() starts returning false
+ // Note: 0 is a valid value, means that we always return false if
+ // the entire buffer is not flushed immediately on write()
+ var hwm = options.highWaterMark;
+ var defaultHwm = this.objectMode ? 16 : 16 * 1024;
+ this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
+&nbsp;
+ // cast to ints.
+ this.highWaterMark = ~ ~this.highWaterMark;
+&nbsp;
+ this.needDrain = false;
+ // at the start of calling end()
+ this.ending = false;
+ // when end() has been called, and returned
+ this.ended = false;
+ // when 'finish' is emitted
+ this.finished = false;
+&nbsp;
+ // should we decode strings into buffers before passing to _write?
+ // this is here so that some node-core streams can optimize string
+ // handling at a lower level.
+ var noDecode = options.decodeStrings === false;
+ this.decodeStrings = !noDecode;
+&nbsp;
+ // Crypto is kind of old and crusty. Historically, its default string
+ // encoding is 'binary' so we have to make this configurable.
+ // Everything else in the universe uses 'utf8', though.
+ this.defaultEncoding = options.defaultEncoding || 'utf8';
+&nbsp;
+ // not an actual buffer we keep track of, but a measurement
+ // of how much we're waiting to get pushed to some underlying
+ // socket or file.
+ this.length = 0;
+&nbsp;
+ // a flag to see when we're in the middle of a write.
+ this.writing = false;
+&nbsp;
+ // when true all writes will be buffered until .uncork() call
+ this.corked = 0;
+&nbsp;
+ // a flag to be able to tell if the onwrite cb is called immediately,
+ // or on a later tick. We set this to true at first, because any
+ // actions that shouldn't happen until "later" should generally also
+ // not happen before the first write call.
+ this.sync = true;
+&nbsp;
+ // a flag to know if we're processing previously buffered items, which
+ // may call the _write() callback in the same tick, so that we don't
+ // end up in an overlapped onwrite situation.
+ this.bufferProcessing = false;
+&nbsp;
+ // the callback that's passed to _write(chunk,cb)
+ this.onwrite = function (er) {
+ onwrite(stream, er);
+ };
+&nbsp;
+ // the callback that the user supplies to write(chunk,encoding,cb)
+ this.writecb = null;
+&nbsp;
+ // the amount that is being written when _write is called.
+ this.writelen = 0;
+&nbsp;
+ this.bufferedRequest = null;
+ this.lastBufferedRequest = null;
+&nbsp;
+ // number of pending user-supplied write callbacks
+ // this must be 0 before 'finish' can be emitted
+ this.pendingcb = 0;
+&nbsp;
+ // emit prefinish if the only thing we're waiting for is _write cbs
+ // This is relevant for synchronous Transform streams
+ this.prefinished = false;
+&nbsp;
+ // True if the error was already emitted and should not be thrown again
+ this.errorEmitted = false;
+&nbsp;
+ // count buffered requests
+ this.bufferedRequestCount = 0;
+&nbsp;
+ // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
+ this.corkedRequestsFree = new CorkedRequest(this);
+}
+&nbsp;
+WritableState.prototype.getBuffer = function writableStateGetBuffer() {
+ var current = this.bufferedRequest;
+ var out = [];
+ while (current) {
+ out.push(current);
+ current = current.next;
+ }
+ return out;
+};
+&nbsp;
+(function () {
+ try {
+ Object.defineProperty(WritableState.prototype, 'buffer', {
+ get: internalUtil.deprecate(<span class="fstat-no" title="function not covered" >function () {</span>
+<span class="cstat-no" title="statement not covered" > return this.getBuffer();</span>
+ }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.')
+ });
+ } catch (_) {}
+})();
+&nbsp;
+var Duplex;
+function Writable(options) {
+ Duplex = Duplex || require('./_stream_duplex');
+&nbsp;
+ // Writable ctor is applied to Duplexes, though they're not
+ // instanceof Writable, they're instanceof Readable.
+ if (!(this instanceof Writable) &amp;&amp; !(this instanceof Duplex)) return new Writable(options);
+&nbsp;
+ this._writableState = new WritableState(options, this);
+&nbsp;
+ // legacy.
+ this.writable = true;
+&nbsp;
+ if (options) {
+ if (typeof options.write === 'function') this._write = options.write;
+&nbsp;
+ if (typeof options.writev === 'function') this._writev = options.writev;
+ }
+&nbsp;
+ Stream.call(this);
+}
+&nbsp;
+// Otherwise people can pipe Writable streams, which is just wrong.
+Writable.prototype.pipe = function () {
+ this.emit('error', new Error('Cannot pipe, not readable'));
+};
+&nbsp;
+function writeAfterEnd(stream, cb) {
+ var er = new Error('write after end');
+ // TODO: defer error events consistently everywhere, not just the cb
+ stream.emit('error', er);
+ processNextTick(cb, er);
+}
+&nbsp;
+// If we get something that is not a buffer, string, null, or undefined,
+// and we're not in objectMode, then that's an error.
+// Otherwise stream chunks are all considered to be of length=1, and the
+// watermarks determine how many objects to keep in the buffer, rather than
+// how many bytes or characters.
+function validChunk(stream, state, chunk, cb) {
+ var valid = true;
+ var er = false;
+ // Always throw error if a null is written
+ // if we are not in object mode then throw
+ // if it is not a buffer, string, or undefined.
+ if (chunk === null) {
+ er = new TypeError('May not write null values to stream');
+ } else if (!Buffer.isBuffer(chunk) &amp;&amp; typeof chunk !== 'string' &amp;&amp; chunk !== undefined &amp;&amp; !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ if (er) {
+ stream.emit('error', er);
+ processNextTick(cb, er);
+ valid = false;
+ }
+ return valid;
+}
+&nbsp;
+Writable.prototype.write = function (chunk, encoding, cb) {
+ var state = this._writableState;
+ var ret = false;
+&nbsp;
+ if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+&nbsp;
+ if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+&nbsp;
+ if (typeof cb !== 'function') cb = nop;
+&nbsp;
+ if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {
+ state.pendingcb++;
+ ret = writeOrBuffer(this, state, chunk, encoding, cb);
+ }
+&nbsp;
+ return ret;
+};
+&nbsp;
+Writable.prototype.cork = function () {
+ var state = this._writableState;
+&nbsp;
+ state.corked++;
+};
+&nbsp;
+Writable.prototype.uncork = function () {
+ var state = this._writableState;
+&nbsp;
+ <span class="missing-if-branch" title="else path not taken" >E</span>if (state.corked) {
+ state.corked--;
+&nbsp;
+ if (!state.writing &amp;&amp; !state.corked &amp;&amp; !state.finished &amp;&amp; !state.bufferProcessing &amp;&amp; state.bufferedRequest) clearBuffer(this, state);
+ }
+};
+&nbsp;
+Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
+ // node::ParseEncoding() requires lower case.
+ if (typeof encoding === 'string') encoding = encoding.toLowerCase();
+ if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) &gt; -1)) throw new TypeError('Unknown encoding: ' + encoding);
+ this._writableState.defaultEncoding = encoding;
+ return this;
+};
+&nbsp;
+function decodeChunk(state, chunk, encoding) {
+ if (!state.objectMode &amp;&amp; state.decodeStrings !== false &amp;&amp; typeof chunk === 'string') {
+ chunk = bufferShim.from(chunk, encoding);
+ }
+ return chunk;
+}
+&nbsp;
+// if we're already writing something, then just put this
+// in the queue, and wait our turn. Otherwise, call _write
+// If we return false, then we need a drain event, so set that flag.
+function writeOrBuffer(stream, state, chunk, encoding, cb) {
+ chunk = decodeChunk(state, chunk, encoding);
+&nbsp;
+ if (Buffer.isBuffer(chunk)) encoding = 'buffer';
+ var len = state.objectMode ? 1 : chunk.length;
+&nbsp;
+ state.length += len;
+&nbsp;
+ var ret = state.length &lt; state.highWaterMark;
+ // we must ensure that previous needDrain will not be reset to false.
+ if (!ret) state.needDrain = true;
+&nbsp;
+ if (state.writing || state.corked) {
+ var last = state.lastBufferedRequest;
+ state.lastBufferedRequest = new WriteReq(chunk, encoding, cb);
+ if (last) {
+ last.next = state.lastBufferedRequest;
+ } else {
+ state.bufferedRequest = state.lastBufferedRequest;
+ }
+ state.bufferedRequestCount += 1;
+ } else {
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ }
+&nbsp;
+ return ret;
+}
+&nbsp;
+function doWrite(stream, state, writev, len, chunk, encoding, cb) {
+ state.writelen = len;
+ state.writecb = cb;
+ state.writing = true;
+ state.sync = true;
+ if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
+ state.sync = false;
+}
+&nbsp;
+<span class="fstat-no" title="function not covered" >function onwriteError(stream, state, sync, er, cb) {</span>
+<span class="cstat-no" title="statement not covered" > --state.pendingcb;</span>
+<span class="cstat-no" title="statement not covered" > if (sync) <span class="cstat-no" title="statement not covered" >processNextTick(cb, er);e</span>lse <span class="cstat-no" title="statement not covered" >cb(er);</span></span>
+&nbsp;
+<span class="cstat-no" title="statement not covered" > stream._writableState.errorEmitted = true;</span>
+<span class="cstat-no" title="statement not covered" > stream.emit('error', er);</span>
+}
+&nbsp;
+function onwriteStateUpdate(state) {
+ state.writing = false;
+ state.writecb = null;
+ state.length -= state.writelen;
+ state.writelen = 0;
+}
+&nbsp;
+function onwrite(stream, er) {
+ var state = stream._writableState;
+ var sync = state.sync;
+ var cb = state.writecb;
+&nbsp;
+ onwriteStateUpdate(state);
+&nbsp;
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (er) <span class="cstat-no" title="statement not covered" >onwriteError(stream, state, sync, er, cb);e</span>lse {
+ // Check if we're actually ready to finish, but don't emit yet
+ var finished = needFinish(state);
+&nbsp;
+ if (!finished &amp;&amp; !state.corked &amp;&amp; !state.bufferProcessing &amp;&amp; state.bufferedRequest) {
+ clearBuffer(stream, state);
+ }
+&nbsp;
+ if (sync) {
+ /*&lt;replacement&gt;*/
+ asyncWrite(afterWrite, stream, state, finished, cb);
+ /*&lt;/replacement&gt;*/
+ } else {
+ afterWrite(stream, state, finished, cb);
+ }
+ }
+}
+&nbsp;
+function afterWrite(stream, state, finished, cb) {
+ if (!finished) onwriteDrain(stream, state);
+ state.pendingcb--;
+ cb();
+ finishMaybe(stream, state);
+}
+&nbsp;
+// Must force callback to be called on nextTick, so that we don't
+// emit 'drain' before the write() consumer gets the 'false' return
+// value, and has a chance to attach a 'drain' listener.
+function onwriteDrain(stream, state) {
+ if (state.length === 0 &amp;&amp; state.needDrain) {
+ state.needDrain = false;
+ stream.emit('drain');
+ }
+}
+&nbsp;
+// if there's something in the buffer waiting, then process it
+function clearBuffer(stream, state) {
+ state.bufferProcessing = true;
+ var entry = state.bufferedRequest;
+&nbsp;
+ if (stream._writev &amp;&amp; entry &amp;&amp; entry.next) {
+ // Fast case, write everything using _writev()
+ var l = state.bufferedRequestCount;
+ var buffer = new Array(l);
+ var holder = state.corkedRequestsFree;
+ holder.entry = entry;
+&nbsp;
+ var count = 0;
+ while (entry) {
+ buffer[count] = entry;
+ entry = entry.next;
+ count += 1;
+ }
+&nbsp;
+ doWrite(stream, state, true, state.length, buffer, '', holder.finish);
+&nbsp;
+ // doWrite is almost always async, defer these to save a bit of time
+ // as the hot path ends with doWrite
+ state.pendingcb++;
+ state.lastBufferedRequest = null;
+ <span class="missing-if-branch" title="if path not taken" >I</span>if (holder.next) {
+<span class="cstat-no" title="statement not covered" > state.corkedRequestsFree = holder.next;</span>
+<span class="cstat-no" title="statement not covered" > holder.next = null;</span>
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
+ } else {
+ // Slow case, write chunks one-by-one
+ while (entry) {
+ var chunk = entry.chunk;
+ var encoding = entry.encoding;
+ var cb = entry.callback;
+ var len = state.objectMode ? 1 : chunk.length;
+&nbsp;
+ doWrite(stream, state, false, len, chunk, encoding, cb);
+ entry = entry.next;
+ // if we didn't call the onwrite immediately, then
+ // it means that we need to wait until it does.
+ // also, that means that the chunk and cb are currently
+ // being processed, so move the buffer counter past them.
+ if (state.writing) {
+ break;
+ }
+ }
+&nbsp;
+ if (entry === null) state.lastBufferedRequest = null;
+ }
+&nbsp;
+ state.bufferedRequestCount = 0;
+ state.bufferedRequest = entry;
+ state.bufferProcessing = false;
+}
+&nbsp;
+Writable.prototype._write = <span class="fstat-no" title="function not covered" >function (chunk, encoding, cb) {</span>
+<span class="cstat-no" title="statement not covered" > cb(new Error('not implemented'));</span>
+};
+&nbsp;
+Writable.prototype._writev = null;
+&nbsp;
+Writable.prototype.end = function (chunk, encoding, cb) {
+ var state = this._writableState;
+&nbsp;
+ if (typeof chunk === 'function') {
+ cb = chunk;
+ chunk = null;
+ encoding = null;
+ } else if (typeof encoding === 'function') {
+ cb = encoding;
+ encoding = null;
+ }
+&nbsp;
+ if (chunk !== null &amp;&amp; chunk !== undefined) this.write(chunk, encoding);
+&nbsp;
+ // .end() fully uncorks
+ if (state.corked) {
+ state.corked = 1;
+ this.uncork();
+ }
+&nbsp;
+ // ignore unnecessary end() calls.
+ if (!state.ending &amp;&amp; !state.finished) endWritable(this, state, cb);
+};
+&nbsp;
+function needFinish(state) {
+ return state.ending &amp;&amp; state.length === 0 &amp;&amp; state.bufferedRequest === null &amp;&amp; !state.finished &amp;&amp; !state.writing;
+}
+&nbsp;
+function prefinish(stream, state) {
+ if (!state.prefinished) {
+ state.prefinished = true;
+ stream.emit('prefinish');
+ }
+}
+&nbsp;
+function finishMaybe(stream, state) {
+ var need = needFinish(state);
+ if (need) {
+ if (state.pendingcb === 0) {
+ prefinish(stream, state);
+ state.finished = true;
+ stream.emit('finish');
+ } else {
+ prefinish(stream, state);
+ }
+ }
+ return need;
+}
+&nbsp;
+function endWritable(stream, state, cb) {
+ state.ending = true;
+ finishMaybe(stream, state);
+ if (cb) {
+ if (state.finished) processNextTick(cb);else stream.once('finish', cb);
+ }
+ state.ended = true;
+ stream.writable = false;
+}
+&nbsp;
+// It seems a linked list but it is not
+// there will be only 2 of these for each stream
+function CorkedRequest(state) {
+ var _this = this;
+&nbsp;
+ this.next = null;
+ this.entry = null;
+&nbsp;
+ this.finish = function (err) {
+ var entry = _this.entry;
+ _this.entry = null;
+ while (entry) {
+ var cb = entry.callback;
+ state.pendingcb--;
+ cb(err);
+ entry = entry.next;
+ }
+ <span class="missing-if-branch" title="else path not taken" >E</span>if (state.corkedRequestsFree) {
+ state.corkedRequestsFree.next = _this;
+ } else {
+<span class="cstat-no" title="statement not covered" > state.corkedRequestsFree = _this;</span>
+ }
+ };
+}</pre></td></tr>
+</table></pre>
+<div class='push'></div><!-- for sticky footer -->
+</div><!-- /wrapper -->
+<div class='footer quiet pad2 space-top1 center small'>
+ Code coverage
+ generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed May 18 2016 10:10:05 GMT-0400 (EDT)
+</div>
+</div>
+<script src="../prettify.js"></script>
+<script>
+window.onload = function () {
+ if (typeof prettyPrint === 'function') {
+ prettyPrint();
+ }
+};
+</script>
+<script src="../sorter.js"></script>
+</body>
+</html>
diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/index.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/index.html
new file mode 100644
index 0000000000..5240d877ea
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/index.html
@@ -0,0 +1,145 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>Code coverage report for lib/</title>
+ <meta charset="utf-8" />
+ <link rel="stylesheet" href="../prettify.css" />
+ <link rel="stylesheet" href="../base.css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <style type='text/css'>
+ .coverage-summary .sorter {
+ background-image: url(../sort-arrow-sprite.png);
+ }
+ </style>
+</head>
+<body>
+<div class='wrapper'>
+ <div class='pad1'>
+ <h1>
+ <a href="../index.html">all files</a> lib/
+ </h1>
+ <div class='clearfix'>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">90.63% </span>
+ <span class="quiet">Statements</span>
+ <span class='fraction'>851/939</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">87.94% </span>
+ <span class="quiet">Branches</span>
+ <span class='fraction'>496/564</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">86.54% </span>
+ <span class="quiet">Functions</span>
+ <span class='fraction'>90/104</span>
+ </div>
+ <div class='fl pad1y space-right2'>
+ <span class="strong">92.73% </span>
+ <span class="quiet">Lines</span>
+ <span class='fraction'>765/825</span>
+ </div>
+ </div>
+ </div>
+ <div class='status-line high'></div>
+<div class="pad1">
+<table class="coverage-summary">
+<thead>
+<tr>
+ <th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
+ <th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
+ <th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
+ <th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
+ <th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
+ <th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
+ <th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
+ <th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
+ <th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
+ <th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
+</tr>
+</thead>
+<tbody><tr>
+ <td class="file medium" data-value="_stream_duplex.js"><a href="_stream_duplex.js.html">_stream_duplex.js</a></td>
+ <td data-value="69.23" class="pic medium"><div class="chart"><div class="cover-fill" style="width: 69%;"></div><div class="cover-empty" style="width:31%;"></div></div></td>
+ <td data-value="69.23" class="pct medium">69.23%</td>
+ <td data-value="39" class="abs medium">27/39</td>
+ <td data-value="68.18" class="pct medium">68.18%</td>
+ <td data-value="22" class="abs medium">15/22</td>
+ <td data-value="40" class="pct low">40%</td>
+ <td data-value="5" class="abs low">2/5</td>
+ <td data-value="75.76" class="pct medium">75.76%</td>
+ <td data-value="33" class="abs medium">25/33</td>
+ </tr>
+
+<tr>
+ <td class="file high" data-value="_stream_passthrough.js"><a href="_stream_passthrough.js.html">_stream_passthrough.js</a></td>
+ <td data-value="90.91" class="pic high"><div class="chart"><div class="cover-fill" style="width: 90%;"></div><div class="cover-empty" style="width:10%;"></div></div></td>
+ <td data-value="90.91" class="pct high">90.91%</td>
+ <td data-value="11" class="abs high">10/11</td>
+ <td data-value="50" class="pct medium">50%</td>
+ <td data-value="2" class="abs medium">1/2</td>
+ <td data-value="100" class="pct high">100%</td>
+ <td data-value="2" class="abs high">2/2</td>
+ <td data-value="100" class="pct high">100%</td>
+ <td data-value="10" class="abs high">10/10</td>
+ </tr>
+
+<tr>
+ <td class="file high" data-value="_stream_readable.js"><a href="_stream_readable.js.html">_stream_readable.js</a></td>
+ <td data-value="89.29" class="pic high"><div class="chart"><div class="cover-fill" style="width: 89%;"></div><div class="cover-empty" style="width:11%;"></div></div></td>
+ <td data-value="89.29" class="pct high">89.29%</td>
+ <td data-value="523" class="abs high">467/523</td>
+ <td data-value="87.22" class="pct high">87.22%</td>
+ <td data-value="352" class="abs high">307/352</td>
+ <td data-value="86.79" class="pct high">86.79%</td>
+ <td data-value="53" class="abs high">46/53</td>
+ <td data-value="90.73" class="pct high">90.73%</td>
+ <td data-value="453" class="abs high">411/453</td>
+ </tr>
+
+<tr>
+ <td class="file high" data-value="_stream_transform.js"><a href="_stream_transform.js.html">_stream_transform.js</a></td>
+ <td data-value="92.11" class="pic high"><div class="chart"><div class="cover-fill" style="width: 92%;"></div><div class="cover-empty" style="width:8%;"></div></div></td>
+ <td data-value="92.11" class="pct high">92.11%</td>
+ <td data-value="76" class="abs high">70/76</td>
+ <td data-value="84.21" class="pct high">84.21%</td>
+ <td data-value="38" class="abs high">32/38</td>
+ <td data-value="90.91" class="pct high">90.91%</td>
+ <td data-value="11" class="abs high">10/11</td>
+ <td data-value="98.48" class="pct high">98.48%</td>
+ <td data-value="66" class="abs high">65/66</td>
+ </tr>
+
+<tr>
+ <td class="file high" data-value="_stream_writable.js"><a href="_stream_writable.js.html">_stream_writable.js</a></td>
+ <td data-value="95.52" class="pic high"><div class="chart"><div class="cover-fill" style="width: 95%;"></div><div class="cover-empty" style="width:5%;"></div></div></td>
+ <td data-value="95.52" class="pct high">95.52%</td>
+ <td data-value="290" class="abs high">277/290</td>
+ <td data-value="94" class="pct high">94%</td>
+ <td data-value="150" class="abs high">141/150</td>
+ <td data-value="90.91" class="pct high">90.91%</td>
+ <td data-value="33" class="abs high">30/33</td>
+ <td data-value="96.58" class="pct high">96.58%</td>
+ <td data-value="263" class="abs high">254/263</td>
+ </tr>
+
+</tbody>
+</table>
+</div><div class='push'></div><!-- for sticky footer -->
+</div><!-- /wrapper -->
+<div class='footer quiet pad2 space-top1 center small'>
+ Code coverage
+ generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed May 18 2016 10:10:05 GMT-0400 (EDT)
+</div>
+</div>
+<script src="../prettify.js"></script>
+<script>
+window.onload = function () {
+ if (typeof prettyPrint === 'function') {
+ prettyPrint();
+ }
+};
+</script>
+<script src="../sorter.js"></script>
+</body>
+</html>
diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.css b/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.css
new file mode 100644
index 0000000000..b317a7cda3
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.css
@@ -0,0 +1 @@
+.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.js b/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.js
new file mode 100644
index 0000000000..ef51e03866
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/coverage/lcov-report/prettify.js
@@ -0,0 +1 @@
+window.PR_SHOULD_USE_CONTINUATION=true;(function(){var h=["break,continue,do,else,for,if,return,while"];var u=[h,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"];var p=[u,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"];var l=[p,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"];var x=[p,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"];var R=[x,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];var r="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes";var w=[p,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"];var s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END";var I=[h,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"];var f=[h,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"];var H=[h,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"];var A=[l,R,w,s+I,f,H];var e=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;var C="str";var z="kwd";var j="com";var O="typ";var G="lit";var L="pun";var F="pln";var m="tag";var E="dec";var J="src";var P="atn";var n="atv";var N="nocode";var M="(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function k(Z){var ad=0;var S=false;var ac=false;for(var V=0,U=Z.length;V<U;++V){var ae=Z[V];if(ae.ignoreCase){ac=true}else{if(/[a-z]/i.test(ae.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){S=true;ac=false;break}}}var Y={b:8,t:9,n:10,v:11,f:12,r:13};function ab(ah){var ag=ah.charCodeAt(0);if(ag!==92){return ag}var af=ah.charAt(1);ag=Y[af];if(ag){return ag}else{if("0"<=af&&af<="7"){return parseInt(ah.substring(1),8)}else{if(af==="u"||af==="x"){return parseInt(ah.substring(2),16)}else{return ah.charCodeAt(1)}}}}function T(af){if(af<32){return(af<16?"\\x0":"\\x")+af.toString(16)}var ag=String.fromCharCode(af);if(ag==="\\"||ag==="-"||ag==="["||ag==="]"){ag="\\"+ag}return ag}function X(am){var aq=am.substring(1,am.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g"));var ak=[];var af=[];var ao=aq[0]==="^";for(var ar=ao?1:0,aj=aq.length;ar<aj;++ar){var ah=aq[ar];if(/\\[bdsw]/i.test(ah)){ak.push(ah)}else{var ag=ab(ah);var al;if(ar+2<aj&&"-"===aq[ar+1]){al=ab(aq[ar+2]);ar+=2}else{al=ag}af.push([ag,al]);if(!(al<65||ag>122)){if(!(al<65||ag>90)){af.push([Math.max(65,ag)|32,Math.min(al,90)|32])}if(!(al<97||ag>122)){af.push([Math.max(97,ag)&~32,Math.min(al,122)&~32])}}}}af.sort(function(av,au){return(av[0]-au[0])||(au[1]-av[1])});var ai=[];var ap=[NaN,NaN];for(var ar=0;ar<af.length;++ar){var at=af[ar];if(at[0]<=ap[1]+1){ap[1]=Math.max(ap[1],at[1])}else{ai.push(ap=at)}}var an=["["];if(ao){an.push("^")}an.push.apply(an,ak);for(var ar=0;ar<ai.length;++ar){var at=ai[ar];an.push(T(at[0]));if(at[1]>at[0]){if(at[1]+1>at[0]){an.push("-")}an.push(T(at[1]))}}an.push("]");return an.join("")}function W(al){var aj=al.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g"));var ah=aj.length;var an=[];for(var ak=0,am=0;ak<ah;++ak){var ag=aj[ak];if(ag==="("){++am}else{if("\\"===ag.charAt(0)){var af=+ag.substring(1);if(af&&af<=am){an[af]=-1}}}}for(var ak=1;ak<an.length;++ak){if(-1===an[ak]){an[ak]=++ad}}for(var ak=0,am=0;ak<ah;++ak){var ag=aj[ak];if(ag==="("){++am;if(an[am]===undefined){aj[ak]="(?:"}}else{if("\\"===ag.charAt(0)){var af=+ag.substring(1);if(af&&af<=am){aj[ak]="\\"+an[am]}}}}for(var ak=0,am=0;ak<ah;++ak){if("^"===aj[ak]&&"^"!==aj[ak+1]){aj[ak]=""}}if(al.ignoreCase&&S){for(var ak=0;ak<ah;++ak){var ag=aj[ak];var ai=ag.charAt(0);if(ag.length>=2&&ai==="["){aj[ak]=X(ag)}else{if(ai!=="\\"){aj[ak]=ag.replace(/[a-zA-Z]/g,function(ao){var ap=ao.charCodeAt(0);return"["+String.fromCharCode(ap&~32,ap|32)+"]"})}}}}return aj.join("")}var aa=[];for(var V=0,U=Z.length;V<U;++V){var ae=Z[V];if(ae.global||ae.multiline){throw new Error(""+ae)}aa.push("(?:"+W(ae)+")")}return new RegExp(aa.join("|"),ac?"gi":"g")}function a(V){var U=/(?:^|\s)nocode(?:\s|$)/;var X=[];var T=0;var Z=[];var W=0;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=document.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Y=S&&"pre"===S.substring(0,3);function aa(ab){switch(ab.nodeType){case 1:if(U.test(ab.className)){return}for(var ae=ab.firstChild;ae;ae=ae.nextSibling){aa(ae)}var ad=ab.nodeName;if("BR"===ad||"LI"===ad){X[W]="\n";Z[W<<1]=T++;Z[(W++<<1)|1]=ab}break;case 3:case 4:var ac=ab.nodeValue;if(ac.length){if(!Y){ac=ac.replace(/[ \t\r\n]+/g," ")}else{ac=ac.replace(/\r\n?/g,"\n")}X[W]=ac;Z[W<<1]=T;T+=ac.length;Z[(W++<<1)|1]=ab}break}}aa(V);return{sourceCode:X.join("").replace(/\n$/,""),spans:Z}}function B(S,U,W,T){if(!U){return}var V={sourceCode:U,basePos:S};W(V);T.push.apply(T,V.decorations)}var v=/\S/;function o(S){var V=undefined;for(var U=S.firstChild;U;U=U.nextSibling){var T=U.nodeType;V=(T===1)?(V?S:U):(T===3)?(v.test(U.nodeValue)?S:V):V}return V===S?undefined:V}function g(U,T){var S={};var V;(function(){var ad=U.concat(T);var ah=[];var ag={};for(var ab=0,Z=ad.length;ab<Z;++ab){var Y=ad[ab];var ac=Y[3];if(ac){for(var ae=ac.length;--ae>=0;){S[ac.charAt(ae)]=Y}}var af=Y[1];var aa=""+af;if(!ag.hasOwnProperty(aa)){ah.push(af);ag[aa]=null}}ah.push(/[\0-\uffff]/);V=k(ah)})();var X=T.length;var W=function(ah){var Z=ah.sourceCode,Y=ah.basePos;var ad=[Y,F];var af=0;var an=Z.match(V)||[];var aj={};for(var ae=0,aq=an.length;ae<aq;++ae){var ag=an[ae];var ap=aj[ag];var ai=void 0;var am;if(typeof ap==="string"){am=false}else{var aa=S[ag.charAt(0)];if(aa){ai=ag.match(aa[1]);ap=aa[0]}else{for(var ao=0;ao<X;++ao){aa=T[ao];ai=ag.match(aa[1]);if(ai){ap=aa[0];break}}if(!ai){ap=F}}am=ap.length>=5&&"lang-"===ap.substring(0,5);if(am&&!(ai&&typeof ai[1]==="string")){am=false;ap=J}if(!am){aj[ag]=ap}}var ab=af;af+=ag.length;if(!am){ad.push(Y+ab,ap)}else{var al=ai[1];var ak=ag.indexOf(al);var ac=ak+al.length;if(ai[2]){ac=ag.length-ai[2].length;ak=ac-al.length}var ar=ap.substring(5);B(Y+ab,ag.substring(0,ak),W,ad);B(Y+ab+ak,al,q(ar,al),ad);B(Y+ab+ac,ag.substring(ac),W,ad)}}ah.decorations=ad};return W}function i(T){var W=[],S=[];if(T.tripleQuotedStrings){W.push([C,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""])}else{if(T.multiLineStrings){W.push([C,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"])}else{W.push([C,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"])}}if(T.verbatimStrings){S.push([C,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null])}var Y=T.hashComments;if(Y){if(T.cStyleComments){if(Y>1){W.push([j,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"])}else{W.push([j,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"])}S.push([C,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])}else{W.push([j,/^#[^\r\n]*/,null,"#"])}}if(T.cStyleComments){S.push([j,/^\/\/[^\r\n]*/,null]);S.push([j,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}if(T.regexLiterals){var X=("/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/");S.push(["lang-regex",new RegExp("^"+M+"("+X+")")])}var V=T.types;if(V){S.push([O,V])}var U=(""+T.keywords).replace(/^ | $/g,"");if(U.length){S.push([z,new RegExp("^(?:"+U.replace(/[\s,]+/g,"|")+")\\b"),null])}W.push([F,/^\s+/,null," \r\n\t\xA0"]);S.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[O,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[F,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[F,/^\\[\s\S]?/,null],[L,/^.[^\s\w\.$@\'\"\`\/\#\\]*/,null]);return g(W,S)}var K=i({keywords:A,hashComments:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true});function Q(V,ag){var U=/(?:^|\s)nocode(?:\s|$)/;var ab=/\r\n?|\n/;var ac=V.ownerDocument;var S;if(V.currentStyle){S=V.currentStyle.whiteSpace}else{if(window.getComputedStyle){S=ac.defaultView.getComputedStyle(V,null).getPropertyValue("white-space")}}var Z=S&&"pre"===S.substring(0,3);var af=ac.createElement("LI");while(V.firstChild){af.appendChild(V.firstChild)}var W=[af];function ae(al){switch(al.nodeType){case 1:if(U.test(al.className)){break}if("BR"===al.nodeName){ad(al);if(al.parentNode){al.parentNode.removeChild(al)}}else{for(var an=al.firstChild;an;an=an.nextSibling){ae(an)}}break;case 3:case 4:if(Z){var am=al.nodeValue;var aj=am.match(ab);if(aj){var ai=am.substring(0,aj.index);al.nodeValue=ai;var ah=am.substring(aj.index+aj[0].length);if(ah){var ak=al.parentNode;ak.insertBefore(ac.createTextNode(ah),al.nextSibling)}ad(al);if(!ai){al.parentNode.removeChild(al)}}}break}}function ad(ak){while(!ak.nextSibling){ak=ak.parentNode;if(!ak){return}}function ai(al,ar){var aq=ar?al.cloneNode(false):al;var ao=al.parentNode;if(ao){var ap=ai(ao,1);var an=al.nextSibling;ap.appendChild(aq);for(var am=an;am;am=an){an=am.nextSibling;ap.appendChild(am)}}return aq}var ah=ai(ak.nextSibling,0);for(var aj;(aj=ah.parentNode)&&aj.nodeType===1;){ah=aj}W.push(ah)}for(var Y=0;Y<W.length;++Y){ae(W[Y])}if(ag===(ag|0)){W[0].setAttribute("value",ag)}var aa=ac.createElement("OL");aa.className="linenums";var X=Math.max(0,((ag-1))|0)||0;for(var Y=0,T=W.length;Y<T;++Y){af=W[Y];af.className="L"+((Y+X)%10);if(!af.firstChild){af.appendChild(ac.createTextNode("\xA0"))}aa.appendChild(af)}V.appendChild(aa)}function D(ac){var aj=/\bMSIE\b/.test(navigator.userAgent);var am=/\n/g;var al=ac.sourceCode;var an=al.length;var V=0;var aa=ac.spans;var T=aa.length;var ah=0;var X=ac.decorations;var Y=X.length;var Z=0;X[Y]=an;var ar,aq;for(aq=ar=0;aq<Y;){if(X[aq]!==X[aq+2]){X[ar++]=X[aq++];X[ar++]=X[aq++]}else{aq+=2}}Y=ar;for(aq=ar=0;aq<Y;){var at=X[aq];var ab=X[aq+1];var W=aq+2;while(W+2<=Y&&X[W+1]===ab){W+=2}X[ar++]=at;X[ar++]=ab;aq=W}Y=X.length=ar;var ae=null;while(ah<T){var af=aa[ah];var S=aa[ah+2]||an;var ag=X[Z];var ap=X[Z+2]||an;var W=Math.min(S,ap);var ak=aa[ah+1];var U;if(ak.nodeType!==1&&(U=al.substring(V,W))){if(aj){U=U.replace(am,"\r")}ak.nodeValue=U;var ai=ak.ownerDocument;var ao=ai.createElement("SPAN");ao.className=X[Z+1];var ad=ak.parentNode;ad.replaceChild(ao,ak);ao.appendChild(ak);if(V<S){aa[ah+1]=ak=ai.createTextNode(al.substring(W,S));ad.insertBefore(ak,ao.nextSibling)}}V=W;if(V>=S){ah+=2}if(V>=ap){Z+=2}}}var t={};function c(U,V){for(var S=V.length;--S>=0;){var T=V[S];if(!t.hasOwnProperty(T)){t[T]=U}else{if(window.console){console.warn("cannot override language handler %s",T)}}}}function q(T,S){if(!(T&&t.hasOwnProperty(T))){T=/^\s*</.test(S)?"default-markup":"default-code"}return t[T]}c(K,["default-code"]);c(g([],[[F,/^[^<?]+/],[E,/^<!\w[^>]*(?:>|$)/],[j,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[L,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);c(g([[F,/^[\s]+/,null," \t\r\n"],[n,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[[m,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[L,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]);c(g([],[[n,/^[\s\S]+/]]),["uq.val"]);c(i({keywords:l,hashComments:true,cStyleComments:true,types:e}),["c","cc","cpp","cxx","cyc","m"]);c(i({keywords:"null,true,false"}),["json"]);c(i({keywords:R,hashComments:true,cStyleComments:true,verbatimStrings:true,types:e}),["cs"]);c(i({keywords:x,cStyleComments:true}),["java"]);c(i({keywords:H,hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);c(i({keywords:I,hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);c(i({keywords:s,hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);c(i({keywords:f,hashComments:true,multiLineStrings:true,regexLiterals:true}),["rb"]);c(i({keywords:w,cStyleComments:true,regexLiterals:true}),["js"]);c(i({keywords:r,hashComments:3,cStyleComments:true,multilineStrings:true,tripleQuotedStrings:true,regexLiterals:true}),["coffee"]);c(g([],[[C,/^[\s\S]+/]]),["regex"]);function d(V){var U=V.langExtension;try{var S=a(V.sourceNode);var T=S.sourceCode;V.sourceCode=T;V.spans=S.spans;V.basePos=0;q(U,T)(V);D(V)}catch(W){if("console" in window){console.log(W&&W.stack?W.stack:W)}}}function y(W,V,U){var S=document.createElement("PRE");S.innerHTML=W;if(U){Q(S,U)}var T={langExtension:V,numberLines:U,sourceNode:S};d(T);return S.innerHTML}function b(ad){function Y(af){return document.getElementsByTagName(af)}var ac=[Y("pre"),Y("code"),Y("xmp")];var T=[];for(var aa=0;aa<ac.length;++aa){for(var Z=0,V=ac[aa].length;Z<V;++Z){T.push(ac[aa][Z])}}ac=null;var W=Date;if(!W.now){W={now:function(){return +(new Date)}}}var X=0;var S;var ab=/\blang(?:uage)?-([\w.]+)(?!\S)/;var ae=/\bprettyprint\b/;function U(){var ag=(window.PR_SHOULD_USE_CONTINUATION?W.now()+250:Infinity);for(;X<T.length&&W.now()<ag;X++){var aj=T[X];var ai=aj.className;if(ai.indexOf("prettyprint")>=0){var ah=ai.match(ab);var am;if(!ah&&(am=o(aj))&&"CODE"===am.tagName){ah=am.className.match(ab)}if(ah){ah=ah[1]}var al=false;for(var ak=aj.parentNode;ak;ak=ak.parentNode){if((ak.tagName==="pre"||ak.tagName==="code"||ak.tagName==="xmp")&&ak.className&&ak.className.indexOf("prettyprint")>=0){al=true;break}}if(!al){var af=aj.className.match(/\blinenums\b(?::(\d+))?/);af=af?af[1]&&af[1].length?+af[1]:true:false;if(af){Q(aj,af)}S={langExtension:ah,sourceNode:aj,numberLines:af};d(S)}}}if(X<T.length){setTimeout(U,250)}else{if(ad){ad()}}}U()}window.prettyPrintOne=y;window.prettyPrint=b;window.PR={createSimpleLexer:g,registerLangHandler:c,sourceDecorator:i,PR_ATTRIB_NAME:P,PR_ATTRIB_VALUE:n,PR_COMMENT:j,PR_DECLARATION:E,PR_KEYWORD:z,PR_LITERAL:G,PR_NOCODE:N,PR_PLAIN:F,PR_PUNCTUATION:L,PR_SOURCE:J,PR_STRING:C,PR_TAG:m,PR_TYPE:O}})();PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_DECLARATION,/^<!\w[^>]*(?:>|$)/],[PR.PR_COMMENT,/^<\!--[\s\S]*?(?:-\->|$)/],[PR.PR_PUNCTUATION,/^(?:<[%?]|[%?]>)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-handlebars",/^<script\b[^>]*type\s*=\s*['"]?text\/x-handlebars-template['"]?\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i],[PR.PR_DECLARATION,/^{{[#^>/]?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{&?\s*[\w.][^}]*}}/],[PR.PR_DECLARATION,/^{{{>?\s*[\w.][^}]*}}}/],[PR.PR_COMMENT,/^{{![^}]*}}/]]),["handlebars","hbs"]);PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[ \t\r\n\f]+/,null," \t\r\n\f"]],[[PR.PR_STRING,/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],[PR.PR_STRING,/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],[PR.PR_KEYWORD,/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],[PR.PR_COMMENT,/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],[PR.PR_COMMENT,/^(?:<!--|-->)/],[PR.PR_LITERAL,/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],[PR.PR_LITERAL,/^#(?:[0-9a-f]{3}){1,2}/i],[PR.PR_PLAIN,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],[PR.PR_PUNCTUATION,/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_KEYWORD,/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[[PR.PR_STRING,/^[^\)\"\']+/]]),["css-str"]);
diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/sort-arrow-sprite.png b/deps/npm/node_modules/readable-stream/coverage/lcov-report/sort-arrow-sprite.png
new file mode 100644
index 0000000000..03f704a609
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/coverage/lcov-report/sort-arrow-sprite.png
Binary files differ
diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/sorter.js b/deps/npm/node_modules/readable-stream/coverage/lcov-report/sorter.js
new file mode 100644
index 0000000000..6c5034e403
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/coverage/lcov-report/sorter.js
@@ -0,0 +1,158 @@
+var addSorting = (function () {
+ "use strict";
+ var cols,
+ currentSort = {
+ index: 0,
+ desc: false
+ };
+
+ // returns the summary table element
+ function getTable() { return document.querySelector('.coverage-summary'); }
+ // returns the thead element of the summary table
+ function getTableHeader() { return getTable().querySelector('thead tr'); }
+ // returns the tbody element of the summary table
+ function getTableBody() { return getTable().querySelector('tbody'); }
+ // returns the th element for nth column
+ function getNthColumn(n) { return getTableHeader().querySelectorAll('th')[n]; }
+
+ // loads all columns
+ function loadColumns() {
+ var colNodes = getTableHeader().querySelectorAll('th'),
+ colNode,
+ cols = [],
+ col,
+ i;
+
+ for (i = 0; i < colNodes.length; i += 1) {
+ colNode = colNodes[i];
+ col = {
+ key: colNode.getAttribute('data-col'),
+ sortable: !colNode.getAttribute('data-nosort'),
+ type: colNode.getAttribute('data-type') || 'string'
+ };
+ cols.push(col);
+ if (col.sortable) {
+ col.defaultDescSort = col.type === 'number';
+ colNode.innerHTML = colNode.innerHTML + '<span class="sorter"></span>';
+ }
+ }
+ return cols;
+ }
+ // attaches a data attribute to every tr element with an object
+ // of data values keyed by column name
+ function loadRowData(tableRow) {
+ var tableCols = tableRow.querySelectorAll('td'),
+ colNode,
+ col,
+ data = {},
+ i,
+ val;
+ for (i = 0; i < tableCols.length; i += 1) {
+ colNode = tableCols[i];
+ col = cols[i];
+ val = colNode.getAttribute('data-value');
+ if (col.type === 'number') {
+ val = Number(val);
+ }
+ data[col.key] = val;
+ }
+ return data;
+ }
+ // loads all row data
+ function loadData() {
+ var rows = getTableBody().querySelectorAll('tr'),
+ i;
+
+ for (i = 0; i < rows.length; i += 1) {
+ rows[i].data = loadRowData(rows[i]);
+ }
+ }
+ // sorts the table using the data for the ith column
+ function sortByIndex(index, desc) {
+ var key = cols[index].key,
+ sorter = function (a, b) {
+ a = a.data[key];
+ b = b.data[key];
+ return a < b ? -1 : a > b ? 1 : 0;
+ },
+ finalSorter = sorter,
+ tableBody = document.querySelector('.coverage-summary tbody'),
+ rowNodes = tableBody.querySelectorAll('tr'),
+ rows = [],
+ i;
+
+ if (desc) {
+ finalSorter = function (a, b) {
+ return -1 * sorter(a, b);
+ };
+ }
+
+ for (i = 0; i < rowNodes.length; i += 1) {
+ rows.push(rowNodes[i]);
+ tableBody.removeChild(rowNodes[i]);
+ }
+
+ rows.sort(finalSorter);
+
+ for (i = 0; i < rows.length; i += 1) {
+ tableBody.appendChild(rows[i]);
+ }
+ }
+ // removes sort indicators for current column being sorted
+ function removeSortIndicators() {
+ var col = getNthColumn(currentSort.index),
+ cls = col.className;
+
+ cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
+ col.className = cls;
+ }
+ // adds sort indicators for current column being sorted
+ function addSortIndicators() {
+ getNthColumn(currentSort.index).className += currentSort.desc ? ' sorted-desc' : ' sorted';
+ }
+ // adds event listeners for all sorter widgets
+ function enableUI() {
+ var i,
+ el,
+ ithSorter = function ithSorter(i) {
+ var col = cols[i];
+
+ return function () {
+ var desc = col.defaultDescSort;
+
+ if (currentSort.index === i) {
+ desc = !currentSort.desc;
+ }
+ sortByIndex(i, desc);
+ removeSortIndicators();
+ currentSort.index = i;
+ currentSort.desc = desc;
+ addSortIndicators();
+ };
+ };
+ for (i =0 ; i < cols.length; i += 1) {
+ if (cols[i].sortable) {
+ // add the click event handler on the th so users
+ // dont have to click on those tiny arrows
+ el = getNthColumn(i).querySelector('.sorter').parentElement;
+ if (el.addEventListener) {
+ el.addEventListener('click', ithSorter(i));
+ } else {
+ el.attachEvent('onclick', ithSorter(i));
+ }
+ }
+ }
+ }
+ // adds sorting functionality to the UI
+ return function () {
+ if (!getTable()) {
+ return;
+ }
+ cols = loadColumns();
+ loadData(cols);
+ addSortIndicators();
+ enableUI();
+ };
+})();
+
+window.addEventListener('load', addSorting);
diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov.info b/deps/npm/node_modules/readable-stream/coverage/lcov.info
new file mode 100644
index 0000000000..d0012ea3cb
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/coverage/lcov.info
@@ -0,0 +1,1642 @@
+TN:
+SF:/Users/cmetcalf/projects/readable-stream/lib/_stream_readable.js
+FN:18,(anonymous_1)
+FN:25,(anonymous_2)
+FN:50,(anonymous_3)
+FN:60,prependListener
+FN:72,ReadableState
+FN:139,Readable
+FN:158,(anonymous_7)
+FN:173,(anonymous_8)
+FN:178,(anonymous_9)
+FN:182,readableAddChunk
+FN:237,needMoreData
+FN:242,(anonymous_12)
+FN:251,computeNewHighWaterMark
+FN:267,howMuchToRead
+FN:299,(anonymous_15)
+FN:399,chunkInvalid
+FN:407,onEofChunk
+FN:425,emitReadable
+FN:435,emitReadable_
+FN:447,maybeReadMore
+FN:454,maybeReadMore_
+FN:470,(anonymous_22)
+FN:474,(anonymous_23)
+FN:498,onunpipe
+FN:505,onend
+FN:518,cleanup
+FN:541,ondata
+FN:559,onerror
+FN:570,onclose
+FN:575,onfinish
+FN:582,unpipe
+FN:599,pipeOnDrain
+FN:600,(anonymous_33)
+FN:611,(anonymous_34)
+FN:662,(anonymous_35)
+FN:689,nReadingNextTick
+FN:696,(anonymous_37)
+FN:706,resume
+FN:713,resume_
+FN:725,(anonymous_40)
+FN:735,flow
+FN:748,(anonymous_42)
+FN:753,(anonymous_43)
+FN:763,(anonymous_44)
+FN:781,(anonymous_45)
+FN:782,(anonymous_46)
+FN:791,(anonymous_47)
+FN:797,(anonymous_48)
+FN:813,fromList
+FN:860,endReadable
+FN:873,endReadableNT
+FN:882,forEach
+FN:888,indexOf
+FNF:53
+FNH:46
+FNDA:269,(anonymous_1)
+FNDA:49,(anonymous_2)
+FNDA:0,(anonymous_3)
+FNDA:38,prependListener
+FNDA:82,ReadableState
+FNDA:84,Readable
+FNDA:276927,(anonymous_7)
+FNDA:41,(anonymous_8)
+FNDA:4,(anonymous_9)
+FNDA:276968,readableAddChunk
+FNDA:276966,needMoreData
+FNDA:5,(anonymous_12)
+FNDA:4,computeNewHighWaterMark
+FNDA:554235,howMuchToRead
+FNDA:277657,(anonymous_15)
+FNDA:276968,chunkInvalid
+FNDA:67,onEofChunk
+FNDA:276722,emitReadable
+FNDA:1123,emitReadable_
+FNDA:276881,maybeReadMore
+FNDA:225,maybeReadMore_
+FNDA:0,(anonymous_22)
+FNDA:38,(anonymous_23)
+FNDA:25,onunpipe
+FNDA:12,onend
+FNDA:24,cleanup
+FNDA:395,ondata
+FNDA:5,onerror
+FNDA:0,onclose
+FNDA:6,onfinish
+FNDA:11,unpipe
+FNDA:38,pipeOnDrain
+FNDA:265,(anonymous_33)
+FNDA:27,(anonymous_34)
+FNDA:226,(anonymous_35)
+FNDA:25,nReadingNextTick
+FNDA:57,(anonymous_37)
+FNDA:56,resume
+FNDA:42,resume_
+FNDA:272,(anonymous_40)
+FNDA:1428,flow
+FNDA:1,(anonymous_42)
+FNDA:1,(anonymous_43)
+FNDA:0,(anonymous_44)
+FNDA:0,(anonymous_45)
+FNDA:0,(anonymous_46)
+FNDA:5,(anonymous_47)
+FNDA:0,(anonymous_48)
+FNDA:757,fromList
+FNDA:316,endReadable
+FNDA:314,endReadableNT
+FNDA:1,forEach
+FNDA:2,indexOf
+DA:3,49
+DA:6,49
+DA:10,49
+DA:13,49
+DA:16,49
+DA:18,49
+DA:19,269
+DA:24,49
+DA:25,49
+DA:26,49
+DA:27,49
+DA:29,49
+DA:34,49
+DA:36,49
+DA:40,49
+DA:41,49
+DA:45,49
+DA:46,49
+DA:47,49
+DA:48,49
+DA:50,0
+DA:54,49
+DA:56,49
+DA:58,49
+DA:60,49
+DA:61,38
+DA:68,38
+DA:71,49
+DA:72,49
+DA:73,82
+DA:75,82
+DA:79,82
+DA:81,82
+DA:85,82
+DA:86,82
+DA:87,82
+DA:90,82
+DA:92,82
+DA:93,82
+DA:94,82
+DA:95,82
+DA:96,82
+DA:97,82
+DA:98,82
+DA:99,82
+DA:105,82
+DA:109,82
+DA:110,82
+DA:111,82
+DA:112,82
+DA:117,82
+DA:121,82
+DA:124,82
+DA:127,82
+DA:129,82
+DA:130,82
+DA:131,82
+DA:132,10
+DA:133,10
+DA:134,10
+DA:138,49
+DA:139,49
+DA:140,84
+DA:142,84
+DA:144,82
+DA:147,82
+DA:149,82
+DA:151,82
+DA:158,49
+DA:159,276927
+DA:161,276927
+DA:162,37
+DA:163,37
+DA:164,10
+DA:165,10
+DA:169,276927
+DA:173,49
+DA:174,41
+DA:175,41
+DA:178,49
+DA:179,4
+DA:182,49
+DA:183,276968
+DA:184,276968
+DA:185,0
+DA:186,276968
+DA:187,67
+DA:188,67
+DA:189,276901
+DA:190,276883
+DA:191,1
+DA:192,1
+DA:193,276882
+DA:194,1
+DA:195,1
+DA:197,276881
+DA:198,276881
+DA:199,23
+DA:200,23
+DA:203,276881
+DA:207,276881
+DA:209,276875
+DA:210,108
+DA:211,108
+DA:214,276767
+DA:215,276767
+DA:217,276767
+DA:221,276881
+DA:223,18
+DA:224,9
+DA:227,276966
+DA:237,49
+DA:238,276966
+DA:242,49
+DA:243,5
+DA:244,5
+DA:245,5
+DA:246,5
+DA:250,49
+DA:251,49
+DA:252,4
+DA:253,0
+DA:256,4
+DA:257,4
+DA:258,4
+DA:259,4
+DA:260,4
+DA:261,4
+DA:262,4
+DA:264,4
+DA:267,49
+DA:268,554235
+DA:270,553951
+DA:272,553860
+DA:274,421
+DA:277,553439
+DA:283,2087
+DA:286,2087
+DA:287,1711
+DA:288,1697
+DA:289,1697
+DA:291,14
+DA:295,376
+DA:299,49
+DA:300,277657
+DA:301,277657
+DA:302,277657
+DA:304,277657
+DA:309,277657
+DA:310,6
+DA:311,6
+DA:312,6
+DA:315,277651
+DA:318,277651
+DA:319,279
+DA:320,279
+DA:346,277372
+DA:347,277372
+DA:350,277372
+DA:351,277365
+DA:352,277365
+DA:357,277372
+DA:358,556
+DA:359,556
+DA:362,277372
+DA:363,276809
+DA:364,276809
+DA:365,276809
+DA:367,276809
+DA:369,276809
+DA:370,276809
+DA:375,277372
+DA:377,277372
+DA:378,277372
+DA:380,277372
+DA:381,276627
+DA:382,276627
+DA:385,277372
+DA:389,277372
+DA:392,277372
+DA:394,277372
+DA:396,277372
+DA:399,49
+DA:400,276968
+DA:401,276968
+DA:402,0
+DA:404,276968
+DA:407,49
+DA:408,67
+DA:409,59
+DA:410,14
+DA:411,14
+DA:412,4
+DA:413,4
+DA:416,59
+DA:419,59
+DA:425,49
+DA:426,276722
+DA:427,276722
+DA:428,276722
+DA:429,1123
+DA:430,1123
+DA:431,1123
+DA:435,49
+DA:436,1123
+DA:437,1123
+DA:438,1123
+DA:447,49
+DA:448,276881
+DA:449,225
+DA:450,225
+DA:454,49
+DA:455,225
+DA:456,225
+DA:457,275597
+DA:458,275597
+DA:459,275597
+DA:461,275571
+DA:463,225
+DA:470,49
+DA:471,0
+DA:474,49
+DA:475,38
+DA:476,38
+DA:478,38
+DA:480,37
+DA:481,37
+DA:483,1
+DA:484,1
+DA:486,0
+DA:487,0
+DA:489,38
+DA:490,38
+DA:492,38
+DA:494,38
+DA:495,38
+DA:497,38
+DA:498,49
+DA:499,25
+DA:500,25
+DA:501,24
+DA:505,49
+DA:506,12
+DA:507,12
+DA:514,38
+DA:515,38
+DA:517,38
+DA:518,49
+DA:519,24
+DA:521,24
+DA:522,24
+DA:523,24
+DA:524,24
+DA:525,24
+DA:526,24
+DA:527,24
+DA:528,24
+DA:530,24
+DA:537,24
+DA:540,38
+DA:541,49
+DA:542,395
+DA:543,395
+DA:544,395
+DA:549,264
+DA:550,263
+DA:551,263
+DA:553,264
+DA:559,49
+DA:560,5
+DA:561,5
+DA:562,5
+DA:563,5
+DA:567,38
+DA:570,49
+DA:571,0
+DA:572,0
+DA:574,38
+DA:575,49
+DA:576,6
+DA:577,6
+DA:578,6
+DA:580,38
+DA:582,49
+DA:583,11
+DA:584,11
+DA:588,38
+DA:591,38
+DA:592,12
+DA:593,12
+DA:596,38
+DA:599,49
+DA:600,38
+DA:601,265
+DA:602,265
+DA:603,265
+DA:604,265
+DA:605,263
+DA:606,263
+DA:611,49
+DA:612,27
+DA:615,27
+DA:618,24
+DA:620,24
+DA:622,24
+DA:625,24
+DA:626,24
+DA:627,24
+DA:628,24
+DA:629,24
+DA:634,0
+DA:636,0
+DA:637,0
+DA:638,0
+DA:639,0
+DA:640,0
+DA:642,0
+DA:643,0
+DA:644,0
+DA:648,0
+DA:649,0
+DA:651,0
+DA:652,0
+DA:653,0
+DA:655,0
+DA:657,0
+DA:662,49
+DA:663,226
+DA:667,226
+DA:668,36
+DA:671,226
+DA:672,38
+DA:673,38
+DA:674,28
+DA:675,28
+DA:676,28
+DA:677,28
+DA:678,25
+DA:679,3
+DA:680,1
+DA:685,226
+DA:687,49
+DA:689,49
+DA:690,25
+DA:691,25
+DA:696,49
+DA:697,57
+DA:698,57
+DA:699,56
+DA:700,56
+DA:701,56
+DA:703,57
+DA:706,49
+DA:707,56
+DA:708,42
+DA:709,42
+DA:713,49
+DA:714,42
+DA:715,38
+DA:716,38
+DA:719,42
+DA:720,42
+DA:721,42
+DA:722,42
+DA:725,49
+DA:726,272
+DA:727,272
+DA:728,270
+DA:729,270
+DA:730,270
+DA:732,272
+DA:735,49
+DA:736,1428
+DA:737,1428
+DA:738,1428
+DA:739,345
+DA:740,395
+DA:748,49
+DA:749,1
+DA:750,1
+DA:752,1
+DA:753,1
+DA:754,1
+DA:755,1
+DA:756,0
+DA:757,0
+DA:760,1
+DA:763,1
+DA:764,0
+DA:765,0
+DA:768,0
+DA:770,0
+DA:771,0
+DA:772,0
+DA:773,0
+DA:779,1
+DA:780,16
+DA:781,0
+DA:782,0
+DA:783,0
+DA:790,1
+DA:791,1
+DA:792,5
+DA:797,1
+DA:798,0
+DA:799,0
+DA:800,0
+DA:801,0
+DA:805,1
+DA:809,49
+DA:813,49
+DA:814,757
+DA:815,757
+DA:816,757
+DA:817,757
+DA:818,757
+DA:821,757
+DA:823,753
+DA:825,280
+DA:826,280
+DA:829,434
+DA:832,114
+DA:833,114
+DA:834,114
+DA:835,320
+DA:837,264
+DA:841,56
+DA:843,56
+DA:844,56
+DA:845,186
+DA:846,186
+DA:848,186
+DA:850,186
+DA:852,186
+DA:857,753
+DA:860,49
+DA:861,316
+DA:865,316
+DA:867,316
+DA:868,314
+DA:869,314
+DA:873,49
+DA:875,314
+DA:876,54
+DA:877,54
+DA:878,54
+DA:882,49
+DA:883,1
+DA:884,5
+DA:888,49
+DA:889,2
+DA:890,3
+DA:892,0
+LF:453
+LH:411
+BRDA:29,1,0,0
+BRDA:29,1,1,49
+BRDA:47,2,0,49
+BRDA:47,2,1,0
+BRDA:47,3,0,49
+BRDA:47,3,1,49
+BRDA:61,4,0,0
+BRDA:61,4,1,38
+BRDA:68,5,0,33
+BRDA:68,5,1,5
+BRDA:68,6,0,38
+BRDA:68,6,1,38
+BRDA:68,7,0,0
+BRDA:68,7,1,5
+BRDA:73,8,0,82
+BRDA:73,8,1,0
+BRDA:75,9,0,82
+BRDA:75,9,1,40
+BRDA:81,10,0,25
+BRDA:81,10,1,57
+BRDA:81,11,0,25
+BRDA:81,11,1,17
+BRDA:86,12,0,19
+BRDA:86,12,1,63
+BRDA:87,13,0,15
+BRDA:87,13,1,67
+BRDA:87,14,0,82
+BRDA:87,14,1,67
+BRDA:117,15,0,82
+BRDA:117,15,1,82
+BRDA:131,16,0,10
+BRDA:131,16,1,72
+BRDA:132,17,0,6
+BRDA:132,17,1,4
+BRDA:140,18,0,84
+BRDA:140,18,1,39
+BRDA:142,19,0,2
+BRDA:142,19,1,82
+BRDA:149,20,0,1
+BRDA:149,20,1,81
+BRDA:149,21,0,82
+BRDA:149,21,1,42
+BRDA:161,22,0,37
+BRDA:161,22,1,276890
+BRDA:161,23,0,276927
+BRDA:161,23,1,276819
+BRDA:162,24,0,37
+BRDA:162,24,1,37
+BRDA:163,25,0,10
+BRDA:163,25,1,27
+BRDA:184,26,0,0
+BRDA:184,26,1,276968
+BRDA:186,27,0,67
+BRDA:186,27,1,276901
+BRDA:189,28,0,276883
+BRDA:189,28,1,18
+BRDA:189,29,0,276901
+BRDA:189,29,1,276810
+BRDA:189,29,2,276810
+BRDA:190,30,0,1
+BRDA:190,30,1,276882
+BRDA:190,31,0,276883
+BRDA:190,31,1,3
+BRDA:193,32,0,1
+BRDA:193,32,1,276881
+BRDA:193,33,0,276882
+BRDA:193,33,1,1
+BRDA:198,34,0,23
+BRDA:198,34,1,276858
+BRDA:198,35,0,276881
+BRDA:198,35,1,50
+BRDA:198,35,2,50
+BRDA:200,36,0,23
+BRDA:200,36,1,23
+BRDA:203,37,0,276850
+BRDA:203,37,1,31
+BRDA:207,38,0,276875
+BRDA:207,38,1,6
+BRDA:209,39,0,108
+BRDA:209,39,1,276767
+BRDA:209,40,0,276875
+BRDA:209,40,1,152
+BRDA:209,40,2,143
+BRDA:214,41,0,51
+BRDA:214,41,1,276716
+BRDA:215,42,0,31
+BRDA:215,42,1,276736
+BRDA:217,43,0,276660
+BRDA:217,43,1,107
+BRDA:223,44,0,9
+BRDA:223,44,1,9
+BRDA:238,45,0,276966
+BRDA:238,45,1,276896
+BRDA:238,45,2,276704
+BRDA:238,45,3,64
+BRDA:243,46,0,1
+BRDA:243,46,1,4
+BRDA:252,47,0,0
+BRDA:252,47,1,4
+BRDA:268,48,0,284
+BRDA:268,48,1,553951
+BRDA:268,49,0,554235
+BRDA:268,49,1,715
+BRDA:270,50,0,91
+BRDA:270,50,1,553860
+BRDA:270,51,0,46
+BRDA:270,51,1,45
+BRDA:272,52,0,421
+BRDA:272,52,1,553439
+BRDA:272,53,0,553860
+BRDA:272,53,1,553860
+BRDA:274,54,0,304
+BRDA:274,54,1,117
+BRDA:274,55,0,421
+BRDA:274,55,1,353
+BRDA:277,56,0,551352
+BRDA:277,56,1,2087
+BRDA:283,57,0,4
+BRDA:283,57,1,2083
+BRDA:286,58,0,1711
+BRDA:286,58,1,376
+BRDA:287,59,0,1697
+BRDA:287,59,1,14
+BRDA:304,60,0,1859
+BRDA:304,60,1,275798
+BRDA:304,61,0,277657
+BRDA:304,61,1,277162
+BRDA:309,62,0,6
+BRDA:309,62,1,277651
+BRDA:309,63,0,277657
+BRDA:309,63,1,275798
+BRDA:309,63,2,275735
+BRDA:309,63,3,275734
+BRDA:311,64,0,4
+BRDA:311,64,1,2
+BRDA:311,65,0,6
+BRDA:311,65,1,4
+BRDA:318,66,0,279
+BRDA:318,66,1,277372
+BRDA:318,67,0,277651
+BRDA:318,67,1,277088
+BRDA:319,68,0,277
+BRDA:319,68,1,2
+BRDA:350,69,0,277365
+BRDA:350,69,1,7
+BRDA:350,70,0,277372
+BRDA:350,70,1,276947
+BRDA:357,71,0,556
+BRDA:357,71,1,276816
+BRDA:357,72,0,277372
+BRDA:357,72,1,277056
+BRDA:362,73,0,276809
+BRDA:362,73,1,563
+BRDA:367,74,0,349
+BRDA:367,74,1,276460
+BRDA:375,75,0,276584
+BRDA:375,75,1,788
+BRDA:375,76,0,277372
+BRDA:375,76,1,276809
+BRDA:378,77,0,749
+BRDA:378,77,1,276623
+BRDA:380,78,0,276627
+BRDA:380,78,1,745
+BRDA:389,79,0,454
+BRDA:389,79,1,276918
+BRDA:389,80,0,277372
+BRDA:389,80,1,492
+BRDA:392,81,0,35
+BRDA:392,81,1,277337
+BRDA:392,82,0,277372
+BRDA:392,82,1,1242
+BRDA:392,82,2,307
+BRDA:394,83,0,745
+BRDA:394,83,1,276627
+BRDA:401,84,0,0
+BRDA:401,84,1,276968
+BRDA:401,85,0,276968
+BRDA:401,85,1,185
+BRDA:401,85,2,131
+BRDA:401,85,3,64
+BRDA:401,85,4,64
+BRDA:408,86,0,8
+BRDA:408,86,1,59
+BRDA:409,87,0,14
+BRDA:409,87,1,45
+BRDA:411,88,0,4
+BRDA:411,88,1,10
+BRDA:411,89,0,14
+BRDA:411,89,1,4
+BRDA:413,90,0,0
+BRDA:413,90,1,4
+BRDA:428,91,0,1123
+BRDA:428,91,1,275599
+BRDA:431,92,0,1003
+BRDA:431,92,1,120
+BRDA:448,93,0,225
+BRDA:448,93,1,276656
+BRDA:456,94,0,275796
+BRDA:456,94,1,275697
+BRDA:456,94,2,275647
+BRDA:456,94,3,275626
+BRDA:459,95,0,26
+BRDA:459,95,1,275571
+BRDA:478,96,0,37
+BRDA:478,96,1,1
+BRDA:478,96,2,0
+BRDA:492,97,0,38
+BRDA:492,97,1,1
+BRDA:492,97,2,37
+BRDA:492,97,3,36
+BRDA:494,98,0,36
+BRDA:494,98,1,2
+BRDA:495,99,0,1
+BRDA:495,99,1,37
+BRDA:500,100,0,24
+BRDA:500,100,1,1
+BRDA:537,101,0,1
+BRDA:537,101,1,23
+BRDA:537,102,0,24
+BRDA:537,102,1,1
+BRDA:537,102,2,1
+BRDA:544,103,0,264
+BRDA:544,103,1,131
+BRDA:549,104,0,263
+BRDA:549,104,1,1
+BRDA:549,105,0,264
+BRDA:549,105,1,262
+BRDA:549,105,2,3
+BRDA:549,105,3,2
+BRDA:549,105,4,263
+BRDA:563,106,0,2
+BRDA:563,106,1,3
+BRDA:591,107,0,12
+BRDA:591,107,1,26
+BRDA:603,108,0,261
+BRDA:603,108,1,4
+BRDA:604,109,0,263
+BRDA:604,109,1,2
+BRDA:604,110,0,265
+BRDA:604,110,1,264
+BRDA:615,111,0,3
+BRDA:615,111,1,24
+BRDA:618,112,0,24
+BRDA:618,112,1,0
+BRDA:620,113,0,0
+BRDA:620,113,1,24
+BRDA:620,114,0,24
+BRDA:620,114,1,24
+BRDA:622,115,0,0
+BRDA:622,115,1,24
+BRDA:628,116,0,24
+BRDA:628,116,1,0
+BRDA:634,117,0,0
+BRDA:634,117,1,0
+BRDA:649,118,0,0
+BRDA:649,118,1,0
+BRDA:653,119,0,0
+BRDA:653,119,1,0
+BRDA:667,120,0,36
+BRDA:667,120,1,190
+BRDA:667,121,0,226
+BRDA:667,121,1,48
+BRDA:671,122,0,38
+BRDA:671,122,1,188
+BRDA:671,123,0,226
+BRDA:671,123,1,38
+BRDA:673,124,0,28
+BRDA:673,124,1,10
+BRDA:677,125,0,25
+BRDA:677,125,1,3
+BRDA:679,126,0,1
+BRDA:679,126,1,2
+BRDA:698,127,0,56
+BRDA:698,127,1,1
+BRDA:707,128,0,42
+BRDA:707,128,1,14
+BRDA:714,129,0,38
+BRDA:714,129,1,4
+BRDA:722,130,0,12
+BRDA:722,130,1,30
+BRDA:722,131,0,42
+BRDA:722,131,1,27
+BRDA:727,132,0,270
+BRDA:727,132,1,2
+BRDA:738,133,0,345
+BRDA:738,133,1,1083
+BRDA:741,134,0,395
+BRDA:741,134,1,310
+BRDA:755,135,0,0
+BRDA:755,135,1,1
+BRDA:755,136,0,1
+BRDA:755,136,1,0
+BRDA:757,137,0,0
+BRDA:757,137,1,0
+BRDA:757,138,0,0
+BRDA:757,138,1,0
+BRDA:765,139,0,0
+BRDA:765,139,1,0
+BRDA:768,140,0,0
+BRDA:768,140,1,0
+BRDA:768,141,0,0
+BRDA:768,141,1,0
+BRDA:768,141,2,0
+BRDA:768,142,0,0
+BRDA:768,142,1,0
+BRDA:768,143,0,0
+BRDA:768,143,1,0
+BRDA:768,143,2,0
+BRDA:771,144,0,0
+BRDA:771,144,1,0
+BRDA:780,145,0,0
+BRDA:780,145,1,16
+BRDA:780,146,0,16
+BRDA:780,146,1,1
+BRDA:799,147,0,0
+BRDA:799,147,1,0
+BRDA:821,148,0,4
+BRDA:821,148,1,753
+BRDA:823,149,0,0
+BRDA:823,149,1,753
+BRDA:823,150,0,39
+BRDA:823,150,1,714
+BRDA:823,151,0,280
+BRDA:823,151,1,434
+BRDA:823,152,0,714
+BRDA:823,152,1,714
+BRDA:825,153,0,21
+BRDA:825,153,1,259
+BRDA:825,154,0,66
+BRDA:825,154,1,193
+BRDA:829,155,0,114
+BRDA:829,155,1,320
+BRDA:835,156,0,264
+BRDA:835,156,1,56
+BRDA:841,157,0,1
+BRDA:841,157,1,55
+BRDA:844,158,0,242
+BRDA:844,158,1,219
+BRDA:848,159,0,2
+BRDA:848,159,1,184
+BRDA:850,160,0,39
+BRDA:850,160,1,147
+BRDA:865,161,0,0
+BRDA:865,161,1,316
+BRDA:867,162,0,314
+BRDA:867,162,1,2
+BRDA:875,163,0,54
+BRDA:875,163,1,260
+BRDA:875,164,0,314
+BRDA:875,164,1,54
+BRDA:890,165,0,2
+BRDA:890,165,1,1
+BRF:352
+BRH:307
+end_of_record
+TN:
+SF:/Users/cmetcalf/projects/readable-stream/lib/_stream_writable.js
+FN:32,(anonymous_1)
+FN:48,nop
+FN:50,WriteReq
+FN:58,WritableState
+FN:121,(anonymous_5)
+FN:153,writableStateGetBuffer
+FN:163,(anonymous_7)
+FN:166,(anonymous_8)
+FN:174,Writable
+FN:196,(anonymous_10)
+FN:200,writeAfterEnd
+FN:212,validChunk
+FN:231,(anonymous_13)
+FN:252,(anonymous_14)
+FN:258,(anonymous_15)
+FN:268,setDefaultEncoding
+FN:276,decodeChunk
+FN:286,writeOrBuffer
+FN:314,doWrite
+FN:323,onwriteError
+FN:331,onwriteStateUpdate
+FN:338,onwrite
+FN:363,afterWrite
+FN:373,onwriteDrain
+FN:381,clearBuffer
+FN:438,(anonymous_26)
+FN:444,(anonymous_27)
+FN:468,needFinish
+FN:472,prefinish
+FN:479,finishMaybe
+FN:493,endWritable
+FN:505,CorkedRequest
+FN:511,(anonymous_33)
+FNF:33
+FNH:30
+FNDA:49,(anonymous_1)
+FNDA:2512,nop
+FNDA:2305,WriteReq
+FNDA:96,WritableState
+FNDA:4574,(anonymous_5)
+FNDA:1,writableStateGetBuffer
+FNDA:49,(anonymous_7)
+FNDA:0,(anonymous_8)
+FNDA:97,Writable
+FNDA:1,(anonymous_10)
+FNDA:1,writeAfterEnd
+FNDA:4625,validChunk
+FNDA:4626,(anonymous_13)
+FNDA:13,(anonymous_14)
+FNDA:13,(anonymous_15)
+FNDA:3,setDefaultEncoding
+FNDA:4621,decodeChunk
+FNDA:4621,writeOrBuffer
+FNDA:4582,doWrite
+FNDA:0,onwriteError
+FNDA:4574,onwriteStateUpdate
+FNDA:4574,onwrite
+FNDA:4574,afterWrite
+FNDA:4557,onwriteDrain
+FNDA:2263,clearBuffer
+FNDA:0,(anonymous_26)
+FNDA:65,(anonymous_27)
+FNDA:9209,needFinish
+FNDA:125,prefinish
+FNDA:4635,finishMaybe
+FNDA:61,endWritable
+FNDA:105,CorkedRequest
+FNDA:8,(anonymous_33)
+DA:7,49
+DA:10,49
+DA:14,49
+DA:17,49
+DA:20,49
+DA:21,49
+DA:25,49
+DA:31,49
+DA:32,49
+DA:33,49
+DA:34,49
+DA:36,49
+DA:41,49
+DA:43,49
+DA:46,49
+DA:48,49
+DA:50,49
+DA:51,2305
+DA:52,2305
+DA:53,2305
+DA:54,2305
+DA:57,49
+DA:58,49
+DA:59,96
+DA:61,96
+DA:65,96
+DA:67,96
+DA:72,96
+DA:73,96
+DA:74,96
+DA:77,96
+DA:79,96
+DA:81,96
+DA:83,96
+DA:85,96
+DA:90,96
+DA:91,96
+DA:96,96
+DA:101,96
+DA:104,96
+DA:107,96
+DA:113,96
+DA:118,96
+DA:121,96
+DA:122,4574
+DA:126,96
+DA:129,96
+DA:131,96
+DA:132,96
+DA:136,96
+DA:140,96
+DA:143,96
+DA:146,96
+DA:150,96
+DA:153,49
+DA:154,1
+DA:155,1
+DA:156,1
+DA:157,5
+DA:158,5
+DA:160,1
+DA:163,49
+DA:164,49
+DA:165,49
+DA:167,0
+DA:173,49
+DA:174,49
+DA:175,97
+DA:179,97
+DA:181,96
+DA:184,96
+DA:186,96
+DA:187,50
+DA:189,50
+DA:192,96
+DA:196,49
+DA:197,1
+DA:200,49
+DA:201,1
+DA:203,1
+DA:204,1
+DA:212,49
+DA:213,4625
+DA:214,4625
+DA:218,4625
+DA:219,2
+DA:220,4623
+DA:221,2
+DA:223,4625
+DA:224,4
+DA:225,2
+DA:226,2
+DA:228,4623
+DA:231,49
+DA:232,4626
+DA:233,4626
+DA:235,4626
+DA:236,59
+DA:237,59
+DA:240,4626
+DA:242,4626
+DA:244,4626
+DA:245,4621
+DA:246,4621
+DA:249,4624
+DA:252,49
+DA:253,13
+DA:255,13
+DA:258,49
+DA:259,13
+DA:261,13
+DA:262,13
+DA:264,13
+DA:268,49
+DA:270,3
+DA:271,3
+DA:272,2
+DA:273,2
+DA:276,49
+DA:277,4621
+DA:278,2273
+DA:280,4621
+DA:286,49
+DA:287,4621
+DA:289,4621
+DA:290,4621
+DA:292,4621
+DA:294,4621
+DA:296,4621
+DA:298,4621
+DA:299,2305
+DA:300,2305
+DA:301,2305
+DA:302,2265
+DA:304,40
+DA:306,2305
+DA:308,2316
+DA:311,4621
+DA:314,49
+DA:315,4582
+DA:316,4582
+DA:317,4582
+DA:318,4582
+DA:319,4582
+DA:320,4582
+DA:323,49
+DA:324,0
+DA:325,0
+DA:327,0
+DA:328,0
+DA:331,49
+DA:332,4574
+DA:333,4574
+DA:334,4574
+DA:335,4574
+DA:338,49
+DA:339,4574
+DA:340,4574
+DA:341,4574
+DA:343,4574
+DA:345,4574
+DA:347,4574
+DA:349,4574
+DA:350,2254
+DA:353,4574
+DA:355,2230
+DA:358,2344
+DA:363,49
+DA:364,4574
+DA:365,4574
+DA:366,4574
+DA:367,4574
+DA:373,49
+DA:374,4557
+DA:375,27
+DA:376,27
+DA:381,49
+DA:382,2263
+DA:383,2263
+DA:385,2263
+DA:387,9
+DA:388,9
+DA:389,9
+DA:390,9
+DA:392,9
+DA:393,9
+DA:394,42
+DA:395,42
+DA:396,42
+DA:399,9
+DA:403,9
+DA:404,9
+DA:405,9
+DA:406,0
+DA:407,0
+DA:409,9
+DA:413,2254
+DA:414,2257
+DA:415,2257
+DA:416,2257
+DA:417,2257
+DA:419,2257
+DA:420,2257
+DA:425,2257
+DA:426,2252
+DA:430,2254
+DA:433,2263
+DA:434,2263
+DA:435,2263
+DA:438,49
+DA:439,0
+DA:442,49
+DA:444,49
+DA:445,65
+DA:447,65
+DA:448,11
+DA:449,11
+DA:450,11
+DA:451,54
+DA:452,1
+DA:453,1
+DA:456,65
+DA:459,65
+DA:460,5
+DA:461,5
+DA:465,65
+DA:468,49
+DA:469,9209
+DA:472,49
+DA:473,125
+DA:474,57
+DA:475,57
+DA:479,49
+DA:480,4635
+DA:481,4635
+DA:482,125
+DA:483,57
+DA:484,57
+DA:485,57
+DA:487,68
+DA:490,4635
+DA:493,49
+DA:494,61
+DA:495,61
+DA:496,61
+DA:497,13
+DA:499,61
+DA:500,61
+DA:505,49
+DA:506,105
+DA:508,105
+DA:509,105
+DA:511,105
+DA:512,8
+DA:513,8
+DA:514,8
+DA:515,40
+DA:516,40
+DA:517,40
+DA:518,40
+DA:520,8
+DA:521,8
+DA:523,0
+LF:263
+LH:254
+BRDA:14,1,0,0
+BRDA:14,1,1,49
+BRDA:14,2,0,49
+BRDA:14,2,1,49
+BRDA:36,3,0,0
+BRDA:36,3,1,49
+BRDA:59,4,0,96
+BRDA:59,4,1,0
+BRDA:61,5,0,96
+BRDA:61,5,1,46
+BRDA:67,6,0,25
+BRDA:67,6,1,71
+BRDA:67,7,0,25
+BRDA:67,7,1,17
+BRDA:73,8,0,23
+BRDA:73,8,1,73
+BRDA:74,9,0,8
+BRDA:74,9,1,88
+BRDA:74,10,0,96
+BRDA:74,10,1,88
+BRDA:96,11,0,96
+BRDA:96,11,1,96
+BRDA:175,12,0,97
+BRDA:175,12,1,28
+BRDA:179,13,0,1
+BRDA:179,13,1,96
+BRDA:179,14,0,97
+BRDA:179,14,1,26
+BRDA:186,15,0,50
+BRDA:186,15,1,46
+BRDA:187,16,0,1
+BRDA:187,16,1,49
+BRDA:189,17,0,1
+BRDA:189,17,1,49
+BRDA:218,18,0,2
+BRDA:218,18,1,4623
+BRDA:220,19,0,2
+BRDA:220,19,1,4621
+BRDA:220,20,0,4623
+BRDA:220,20,1,2425
+BRDA:220,20,2,61
+BRDA:220,20,3,61
+BRDA:223,21,0,4
+BRDA:223,21,1,4621
+BRDA:235,22,0,59
+BRDA:235,22,1,4567
+BRDA:240,23,0,2198
+BRDA:240,23,1,2428
+BRDA:240,24,0,2301
+BRDA:240,24,1,127
+BRDA:242,25,0,2527
+BRDA:242,25,1,2099
+BRDA:244,26,0,1
+BRDA:244,26,1,4625
+BRDA:244,27,0,4621
+BRDA:244,27,1,2
+BRDA:261,28,0,13
+BRDA:261,28,1,0
+BRDA:264,29,0,9
+BRDA:264,29,1,4
+BRDA:264,30,0,13
+BRDA:264,30,1,13
+BRDA:264,30,2,9
+BRDA:264,30,3,9
+BRDA:264,30,4,9
+BRDA:270,31,0,2
+BRDA:270,31,1,1
+BRDA:271,32,0,1
+BRDA:271,32,1,2
+BRDA:277,33,0,2273
+BRDA:277,33,1,2348
+BRDA:277,34,0,4621
+BRDA:277,34,1,4547
+BRDA:277,34,2,4467
+BRDA:289,35,0,4471
+BRDA:289,35,1,150
+BRDA:290,36,0,74
+BRDA:290,36,1,4547
+BRDA:296,37,0,177
+BRDA:296,37,1,4444
+BRDA:298,38,0,2305
+BRDA:298,38,1,2316
+BRDA:298,39,0,4621
+BRDA:298,39,1,2358
+BRDA:301,40,0,2265
+BRDA:301,40,1,40
+BRDA:319,41,0,9
+BRDA:319,41,1,4573
+BRDA:325,42,0,0
+BRDA:325,42,1,0
+BRDA:345,43,0,0
+BRDA:345,43,1,4574
+BRDA:349,44,0,2254
+BRDA:349,44,1,2320
+BRDA:349,45,0,4574
+BRDA:349,45,1,4557
+BRDA:349,45,2,4557
+BRDA:349,45,3,4544
+BRDA:353,46,0,2230
+BRDA:353,46,1,2344
+BRDA:364,47,0,4557
+BRDA:364,47,1,17
+BRDA:374,48,0,27
+BRDA:374,48,1,4530
+BRDA:374,49,0,4557
+BRDA:374,49,1,2302
+BRDA:385,50,0,9
+BRDA:385,50,1,2254
+BRDA:385,51,0,2263
+BRDA:385,51,1,9
+BRDA:385,51,2,9
+BRDA:405,52,0,0
+BRDA:405,52,1,9
+BRDA:417,53,0,4
+BRDA:417,53,1,2253
+BRDA:425,54,0,2252
+BRDA:425,54,1,5
+BRDA:430,55,0,29
+BRDA:430,55,1,2225
+BRDA:447,56,0,11
+BRDA:447,56,1,54
+BRDA:451,57,0,1
+BRDA:451,57,1,53
+BRDA:456,58,0,10
+BRDA:456,58,1,55
+BRDA:456,59,0,65
+BRDA:456,59,1,54
+BRDA:459,60,0,5
+BRDA:459,60,1,60
+BRDA:465,61,0,61
+BRDA:465,61,1,4
+BRDA:465,62,0,65
+BRDA:465,62,1,61
+BRDA:469,63,0,9209
+BRDA:469,63,1,420
+BRDA:469,63,2,149
+BRDA:469,63,3,146
+BRDA:469,63,4,145
+BRDA:473,64,0,57
+BRDA:473,64,1,68
+BRDA:481,65,0,125
+BRDA:481,65,1,4510
+BRDA:482,66,0,57
+BRDA:482,66,1,68
+BRDA:496,67,0,13
+BRDA:496,67,1,48
+BRDA:497,68,0,1
+BRDA:497,68,1,12
+BRDA:520,69,0,8
+BRDA:520,69,1,0
+BRF:150
+BRH:141
+end_of_record
+TN:
+SF:/Users/cmetcalf/projects/readable-stream/lib/_stream_duplex.js
+FN:10,(anonymous_1)
+FN:40,Duplex
+FN:57,onend
+FN:67,onEndNT
+FN:71,forEach
+FNF:5
+FNH:2
+FNDA:0,(anonymous_1)
+FNDA:25,Duplex
+FNDA:18,onend
+FNDA:0,onEndNT
+FNDA:0,forEach
+DA:10,49
+DA:11,0
+DA:12,0
+DA:13,0
+DA:14,0
+DA:18,49
+DA:21,49
+DA:25,49
+DA:26,49
+DA:29,49
+DA:30,49
+DA:32,49
+DA:34,49
+DA:35,49
+DA:36,392
+DA:37,392
+DA:40,49
+DA:41,25
+DA:43,25
+DA:44,25
+DA:46,25
+DA:48,25
+DA:50,25
+DA:51,25
+DA:53,25
+DA:57,49
+DA:60,18
+DA:64,0
+DA:67,49
+DA:68,0
+DA:71,49
+DA:72,0
+DA:73,0
+LF:33
+LH:25
+BRDA:10,1,0,49
+BRDA:10,1,1,0
+BRDA:37,2,0,343
+BRDA:37,2,1,49
+BRDA:41,3,0,0
+BRDA:41,3,1,25
+BRDA:46,4,0,0
+BRDA:46,4,1,25
+BRDA:46,5,0,25
+BRDA:46,5,1,13
+BRDA:48,6,0,0
+BRDA:48,6,1,25
+BRDA:48,7,0,25
+BRDA:48,7,1,13
+BRDA:51,8,0,0
+BRDA:51,8,1,25
+BRDA:51,9,0,25
+BRDA:51,9,1,13
+BRDA:60,10,0,18
+BRDA:60,10,1,0
+BRDA:60,11,0,18
+BRDA:60,11,1,0
+BRF:22
+BRH:15
+end_of_record
+TN:
+SF:/Users/cmetcalf/projects/readable-stream/lib/_stream_transform.js
+FN:56,TransformState
+FN:57,(anonymous_2)
+FN:68,afterTransform
+FN:90,Transform
+FN:114,(anonymous_5)
+FN:115,(anonymous_6)
+FN:121,(anonymous_7)
+FN:136,(anonymous_8)
+FN:140,(anonymous_9)
+FN:154,(anonymous_10)
+FN:167,done
+FNF:11
+FNH:10
+FNDA:24,TransformState
+FNDA:116,(anonymous_2)
+FNDA:116,afterTransform
+FNDA:24,Transform
+FNDA:19,(anonymous_5)
+FNDA:2,(anonymous_6)
+FNDA:127,(anonymous_7)
+FNDA:0,(anonymous_8)
+FNDA:117,(anonymous_9)
+FNDA:310,(anonymous_10)
+FNDA:19,done
+DA:45,49
+DA:47,49
+DA:50,49
+DA:51,49
+DA:54,49
+DA:56,49
+DA:57,24
+DA:58,116
+DA:61,24
+DA:62,24
+DA:63,24
+DA:64,24
+DA:65,24
+DA:68,49
+DA:69,116
+DA:70,116
+DA:72,116
+DA:74,116
+DA:76,116
+DA:77,116
+DA:79,116
+DA:81,116
+DA:83,116
+DA:84,116
+DA:85,116
+DA:86,113
+DA:90,49
+DA:91,24
+DA:93,24
+DA:95,24
+DA:98,24
+DA:101,24
+DA:106,24
+DA:108,24
+DA:109,13
+DA:111,13
+DA:114,24
+DA:115,19
+DA:116,2
+DA:117,17
+DA:121,49
+DA:122,127
+DA:123,127
+DA:136,49
+DA:137,0
+DA:140,49
+DA:141,117
+DA:142,117
+DA:143,117
+DA:144,117
+DA:145,117
+DA:146,117
+DA:147,117
+DA:154,49
+DA:155,310
+DA:157,310
+DA:158,116
+DA:159,116
+DA:163,194
+DA:167,49
+DA:168,19
+DA:172,19
+DA:173,19
+DA:175,19
+DA:177,19
+DA:179,19
+LF:66
+LH:65
+BRDA:74,1,0,0
+BRDA:74,1,1,116
+BRDA:79,2,0,61
+BRDA:79,2,1,55
+BRDA:79,3,0,116
+BRDA:79,3,1,116
+BRDA:85,4,0,113
+BRDA:85,4,1,3
+BRDA:85,5,0,116
+BRDA:85,5,1,55
+BRDA:91,6,0,0
+BRDA:91,6,1,24
+BRDA:108,7,0,13
+BRDA:108,7,1,11
+BRDA:109,8,0,1
+BRDA:109,8,1,12
+BRDA:111,9,0,1
+BRDA:111,9,1,12
+BRDA:115,10,0,2
+BRDA:115,10,1,17
+BRDA:145,11,0,117
+BRDA:145,11,1,0
+BRDA:147,12,0,116
+BRDA:147,12,1,1
+BRDA:147,13,0,117
+BRDA:147,13,1,33
+BRDA:147,13,2,11
+BRDA:157,14,0,116
+BRDA:157,14,1,194
+BRDA:157,15,0,310
+BRDA:157,15,1,152
+BRDA:157,15,2,152
+BRDA:168,16,0,0
+BRDA:168,16,1,19
+BRDA:175,17,0,0
+BRDA:175,17,1,19
+BRDA:177,18,0,0
+BRDA:177,18,1,19
+BRF:38
+BRH:32
+end_of_record
+TN:
+SF:/Users/cmetcalf/projects/readable-stream/lib/_stream_passthrough.js
+FN:18,PassThrough
+FN:24,(anonymous_2)
+FNF:2
+FNH:2
+FNDA:8,PassThrough
+FNDA:59,(anonymous_2)
+DA:7,49
+DA:9,49
+DA:12,49
+DA:13,49
+DA:16,49
+DA:18,49
+DA:19,8
+DA:21,8
+DA:24,49
+DA:25,59
+LF:10
+LH:10
+BRDA:19,1,0,0
+BRDA:19,1,1,8
+BRF:2
+BRH:1
+end_of_record
diff --git a/deps/npm/node_modules/readable-stream/doc/stream.markdown b/deps/npm/node_modules/readable-stream/doc/stream.md
index ecf997a3f5..c907ca0e7b 100644
--- a/deps/npm/node_modules/readable-stream/doc/stream.markdown
+++ b/deps/npm/node_modules/readable-stream/doc/stream.md
@@ -160,7 +160,8 @@ Emitted when the stream and any of its underlying resources (a file
descriptor, for example) have been closed. The event indicates that
no more events will be emitted, and no further computation will occur.
-Not all streams will emit the `'close'` event.
+Not all streams will emit the `'close'` event as the `'close'` event is
+optional.
#### Event: 'data'
@@ -201,7 +202,7 @@ readable.on('end', () => {
#### Event: 'error'
-* {Error Object}
+* {Error}
Emitted if there was an error receiving data.
@@ -490,7 +491,7 @@ function parseHeader(stream, callback) {
var split = str.split(/\n\n/);
header += split.shift();
var remaining = split.join('\n\n');
- var buf = new Buffer(remaining, 'utf8');
+ var buf = Buffer.from(remaining, 'utf8');
if (buf.length)
stream.unshift(buf);
stream.removeListener('error', callback);
@@ -573,6 +574,15 @@ Examples of writable streams include:
* [child process stdin][]
* [`process.stdout`][], [`process.stderr`][]
+#### Event: 'close'
+
+Emitted when the stream and any of its underlying resources (a file descriptor,
+for example) have been closed. The event indicates that no more events will be
+emitted, and no further computation will occur.
+
+Not all streams will emit the `'close'` event as the `'close'` event is
+optional.
+
#### Event: 'drain'
If a [`stream.write(chunk)`][stream-write] call returns `false`, then the
@@ -695,6 +705,7 @@ file.end('world!');
#### writable.setDefaultEncoding(encoding)
* `encoding` {String} The new default encoding
+* Return: `this`
Sets the default encoding for a writable stream.
@@ -985,7 +996,7 @@ Counter.prototype._read = function() {
this.push(null);
else {
var str = '' + i;
- var buf = new Buffer(str, 'ascii');
+ var buf = Buffer.from(str, 'ascii');
this.push(buf);
}
};
@@ -1717,30 +1728,30 @@ horribly wrong.
[`'end'`]: #stream_event_end
[`'finish'`]: #stream_event_finish
[`'readable'`]: #stream_event_readable
-[`buf.toString(encoding)`]: https://nodejs.org/docs/v5.9.1/api/buffer.html#buffer_buf_tostring_encoding_start_end
-[`EventEmitter`]: https://nodejs.org/docs/v5.9.1/api/events.html#events_class_eventemitter
-[`process.stderr`]: https://nodejs.org/docs/v5.9.1/api/process.html#process_process_stderr
-[`process.stdin`]: https://nodejs.org/docs/v5.9.1/api/process.html#process_process_stdin
-[`process.stdout`]: https://nodejs.org/docs/v5.9.1/api/process.html#process_process_stdout
+[`buf.toString(encoding)`]: https://nodejs.org/docs/v6.1.0/api/buffer.html#buffer_buf_tostring_encoding_start_end
+[`EventEmitter`]: https://nodejs.org/docs/v6.1.0/api/events.html#events_class_eventemitter
+[`process.stderr`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stderr
+[`process.stdin`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stdin
+[`process.stdout`]: https://nodejs.org/docs/v6.1.0/api/process.html#process_process_stdout
[`stream.cork()`]: #stream_writable_cork
[`stream.pipe()`]: #stream_readable_pipe_destination_options
[`stream.uncork()`]: #stream_writable_uncork
[`stream.unpipe()`]: #stream_readable_unpipe_destination
[`stream.wrap()`]: #stream_readable_wrap_stream
-[`tls.CryptoStream`]: https://nodejs.org/docs/v5.9.1/api/tls.html#tls_class_cryptostream
-[`util.inherits()`]: https://nodejs.org/docs/v5.9.1/api/util.html#util_util_inherits_constructor_superconstructor
+[`tls.CryptoStream`]: https://nodejs.org/docs/v6.1.0/api/tls.html#tls_class_cryptostream
+[`util.inherits()`]: https://nodejs.org/docs/v6.1.0/api/util.html#util_util_inherits_constructor_superconstructor
[API for Stream Consumers]: #stream_api_for_stream_consumers
[API for Stream Implementors]: #stream_api_for_stream_implementors
-[child process stdin]: https://nodejs.org/docs/v5.9.1/api/child_process.html#child_process_child_stdin
-[child process stdout and stderr]: https://nodejs.org/docs/v5.9.1/api/child_process.html#child_process_child_stdout
+[child process stdin]: https://nodejs.org/docs/v6.1.0/api/child_process.html#child_process_child_stdin
+[child process stdout and stderr]: https://nodejs.org/docs/v6.1.0/api/child_process.html#child_process_child_stdout
[Compatibility]: #stream_compatibility_with_older_node_js_versions
[crypto]: crypto.html
[Duplex]: #stream_class_stream_duplex
-[fs read streams]: https://nodejs.org/docs/v5.9.1/api/fs.html#fs_class_fs_readstream
-[fs write streams]: https://nodejs.org/docs/v5.9.1/api/fs.html#fs_class_fs_writestream
-[HTTP requests, on the client]: https://nodejs.org/docs/v5.9.1/api/http.html#http_class_http_clientrequest
-[HTTP responses, on the server]: https://nodejs.org/docs/v5.9.1/api/http.html#http_class_http_serverresponse
-[http-incoming-message]: https://nodejs.org/docs/v5.9.1/api/http.html#http_class_http_incomingmessage
+[fs read streams]: https://nodejs.org/docs/v6.1.0/api/fs.html#fs_class_fs_readstream
+[fs write streams]: https://nodejs.org/docs/v6.1.0/api/fs.html#fs_class_fs_writestream
+[HTTP requests, on the client]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_clientrequest
+[HTTP responses, on the server]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_serverresponse
+[http-incoming-message]: https://nodejs.org/docs/v6.1.0/api/http.html#http_class_http_incomingmessage
[Object mode]: #stream_object_mode
[Readable]: #stream_class_stream_readable
[SimpleProtocol v2]: #stream_example_simpleprotocol_parser_v2
@@ -1755,7 +1766,7 @@ horribly wrong.
[stream-read]: #stream_readable_read_size
[stream-resume]: #stream_readable_resume
[stream-write]: #stream_writable_write_chunk_encoding_callback
-[TCP sockets]: https://nodejs.org/docs/v5.9.1/api/net.html#net_class_net_socket
+[TCP sockets]: https://nodejs.org/docs/v6.1.0/api/net.html#net_class_net_socket
[Transform]: #stream_class_stream_transform
[Writable]: #stream_class_stream_writable
[zlib]: zlib.html
diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js
index 54a9d5c553..79914fa684 100644
--- a/deps/npm/node_modules/readable-stream/lib/_stream_readable.js
+++ b/deps/npm/node_modules/readable-stream/lib/_stream_readable.js
@@ -10,15 +10,11 @@ var processNextTick = require('process-nextick-args');
var isArray = require('isarray');
/*</replacement>*/
-/*<replacement>*/
-var Buffer = require('buffer').Buffer;
-/*</replacement>*/
-
Readable.ReadableState = ReadableState;
-var EE = require('events');
-
/*<replacement>*/
+var EE = require('events').EventEmitter;
+
var EElistenerCount = function (emitter, type) {
return emitter.listeners(type).length;
};
@@ -36,6 +32,9 @@ var Stream;
/*</replacement>*/
var Buffer = require('buffer').Buffer;
+/*<replacement>*/
+var bufferShim = require('buffer-shims');
+/*</replacement>*/
/*<replacement>*/
var util = require('core-util-is');
@@ -44,7 +43,7 @@ util.inherits = require('inherits');
/*<replacement>*/
var debugUtil = require('util');
-var debug = undefined;
+var debug = void 0;
if (debugUtil && debugUtil.debuglog) {
debug = debugUtil.debuglog('stream');
} else {
@@ -56,6 +55,19 @@ var StringDecoder;
util.inherits(Readable, Stream);
+var hasPrependListener = typeof EE.prototype.prependListener === 'function';
+
+function prependListener(emitter, event, fn) {
+ if (hasPrependListener) return emitter.prependListener(event, fn);
+
+ // This is a brutally ugly hack to make sure that our error handler
+ // is attached before any userland ones. NEVER DO THIS. This is here
+ // only because this code needs to continue to work with older versions
+ // of Node.js that do not include the prependListener() method. The goal
+ // is to eventually remove this hack.
+ if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
+}
+
var Duplex;
function ReadableState(options, stream) {
Duplex = Duplex || require('./_stream_duplex');
@@ -149,7 +161,7 @@ Readable.prototype.push = function (chunk, encoding) {
if (!state.objectMode && typeof chunk === 'string') {
encoding = encoding || state.defaultEncoding;
if (encoding !== state.encoding) {
- chunk = new Buffer(chunk, encoding);
+ chunk = bufferShim.from(chunk, encoding);
encoding = '';
}
}
@@ -179,8 +191,8 @@ function readableAddChunk(stream, state, chunk, encoding, addToFront) {
var e = new Error('stream.push() after EOF');
stream.emit('error', e);
} else if (state.endEmitted && addToFront) {
- var e = new Error('stream.unshift() after end event');
- stream.emit('error', e);
+ var _e = new Error('stream.unshift() after end event');
+ stream.emit('error', _e);
} else {
var skipAdd;
if (state.decoder && !addToFront && !encoding) {
@@ -533,7 +545,8 @@ Readable.prototype.pipe = function (dest, pipeOpts) {
// If the user unpiped during `dest.write()`, it is possible
// to get stuck in a permanently paused state if that write
// also returned false.
- if (state.pipesCount === 1 && state.pipes[0] === dest && src.listenerCount('data') === 1 && !cleanedUp) {
+ // => Check whether `dest` is still a piping destination.
+ if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
debug('false write response, pause', src._readableState.awaitDrain);
src._readableState.awaitDrain++;
}
@@ -549,9 +562,9 @@ Readable.prototype.pipe = function (dest, pipeOpts) {
dest.removeListener('error', onerror);
if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
}
- // This is a brutally ugly hack to make sure that our error handler
- // is attached before any userland ones. NEVER DO THIS.
- if (!dest._events || !dest._events.error) dest.on('error', onerror);else if (isArray(dest._events.error)) dest._events.error.unshift(onerror);else dest._events.error = [onerror, dest._events.error];
+
+ // Make sure our error handler is attached before userland ones.
+ prependListener(dest, 'error', onerror);
// Both close and finish should trigger unpipe, but only once.
function onclose() {
@@ -825,16 +838,16 @@ function fromList(n, state) {
} else {
// complex case.
// we have enough to cover it, but it spans past the first buffer.
- if (stringMode) ret = '';else ret = new Buffer(n);
+ if (stringMode) ret = '';else ret = bufferShim.allocUnsafe(n);
var c = 0;
for (var i = 0, l = list.length; i < l && c < n; i++) {
- var buf = list[0];
- var cpy = Math.min(n - c, buf.length);
+ var _buf = list[0];
+ var cpy = Math.min(n - c, _buf.length);
- if (stringMode) ret += buf.slice(0, cpy);else buf.copy(ret, c, 0, cpy);
+ if (stringMode) ret += _buf.slice(0, cpy);else _buf.copy(ret, c, 0, cpy);
- if (cpy < buf.length) list[0] = buf.slice(cpy);else list.shift();
+ if (cpy < _buf.length) list[0] = _buf.slice(cpy);else list.shift();
c += cpy;
}
@@ -849,7 +862,7 @@ function endReadable(stream) {
// If we get here before consuming all the bytes, then that is a
// bug in node. Should never happen.
- if (state.length > 0) throw new Error('endReadable called on non-empty stream');
+ if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream');
if (!state.endEmitted) {
state.ended = true;
diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/readable-stream/lib/_stream_transform.js
index 625cdc1769..dbc996ede6 100644
--- a/deps/npm/node_modules/readable-stream/lib/_stream_transform.js
+++ b/deps/npm/node_modules/readable-stream/lib/_stream_transform.js
@@ -134,7 +134,7 @@ Transform.prototype.push = function (chunk, encoding) {
// an error, then that'll put the hurt on the whole operation. If you
// never call cb(), then you'll never get another chunk.
Transform.prototype._transform = function (chunk, encoding, cb) {
- throw new Error('not implemented');
+ throw new Error('Not implemented');
};
Transform.prototype._write = function (chunk, encoding, cb) {
@@ -172,9 +172,9 @@ function done(stream, er) {
var ws = stream._writableState;
var ts = stream._transformState;
- if (ws.length) throw new Error('calling transform done when ws.length != 0');
+ if (ws.length) throw new Error('Calling transform done when ws.length != 0');
- if (ts.transforming) throw new Error('calling transform done when still transforming');
+ if (ts.transforming) throw new Error('Calling transform done when still transforming');
return stream.push(null);
} \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js
index 95916c992a..ed5efcbd20 100644
--- a/deps/npm/node_modules/readable-stream/lib/_stream_writable.js
+++ b/deps/npm/node_modules/readable-stream/lib/_stream_writable.js
@@ -14,10 +14,6 @@ var processNextTick = require('process-nextick-args');
var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick;
/*</replacement>*/
-/*<replacement>*/
-var Buffer = require('buffer').Buffer;
-/*</replacement>*/
-
Writable.WritableState = WritableState;
/*<replacement>*/
@@ -43,6 +39,9 @@ var Stream;
/*</replacement>*/
var Buffer = require('buffer').Buffer;
+/*<replacement>*/
+var bufferShim = require('buffer-shims');
+/*</replacement>*/
util.inherits(Writable, Stream);
@@ -146,10 +145,9 @@ function WritableState(options, stream) {
// count buffered requests
this.bufferedRequestCount = 0;
- // create the two objects needed to store the corked requests
- // they are not a linked list, as no new elements are inserted in there
+ // allocate the first CorkedRequest, there is always
+ // one allocated and free to use, and we maintain at most two
this.corkedRequestsFree = new CorkedRequest(this);
- this.corkedRequestsFree.next = new CorkedRequest(this);
}
WritableState.prototype.getBuffer = function writableStateGetBuffer() {
@@ -196,7 +194,7 @@ function Writable(options) {
// Otherwise people can pipe Writable streams, which is just wrong.
Writable.prototype.pipe = function () {
- this.emit('error', new Error('Cannot pipe. Not readable.'));
+ this.emit('error', new Error('Cannot pipe, not readable'));
};
function writeAfterEnd(stream, cb) {
@@ -213,9 +211,16 @@ function writeAfterEnd(stream, cb) {
// how many bytes or characters.
function validChunk(stream, state, chunk, cb) {
var valid = true;
-
- if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) {
- var er = new TypeError('Invalid non-string/buffer chunk');
+ var er = false;
+ // Always throw error if a null is written
+ // if we are not in object mode then throw
+ // if it is not a buffer, string, or undefined.
+ if (chunk === null) {
+ er = new TypeError('May not write null values to stream');
+ } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ er = new TypeError('Invalid non-string/buffer chunk');
+ }
+ if (er) {
stream.emit('error', er);
processNextTick(cb, er);
valid = false;
@@ -265,11 +270,12 @@ Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
if (typeof encoding === 'string') encoding = encoding.toLowerCase();
if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding);
this._writableState.defaultEncoding = encoding;
+ return this;
};
function decodeChunk(state, chunk, encoding) {
if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
- chunk = new Buffer(chunk, encoding);
+ chunk = bufferShim.from(chunk, encoding);
}
return chunk;
}
@@ -392,12 +398,16 @@ function clearBuffer(stream, state) {
doWrite(stream, state, true, state.length, buffer, '', holder.finish);
- // doWrite is always async, defer these to save a bit of time
+ // doWrite is almost always async, defer these to save a bit of time
// as the hot path ends with doWrite
state.pendingcb++;
state.lastBufferedRequest = null;
- state.corkedRequestsFree = holder.next;
- holder.next = null;
+ if (holder.next) {
+ state.corkedRequestsFree = holder.next;
+ holder.next = null;
+ } else {
+ state.corkedRequestsFree = new CorkedRequest(state);
+ }
} else {
// Slow case, write chunks one-by-one
while (entry) {
diff --git a/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/index.js b/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/index.js
new file mode 100644
index 0000000000..1cab4c05e1
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/index.js
@@ -0,0 +1,108 @@
+'use strict';
+
+var buffer = require('buffer');
+var Buffer = buffer.Buffer;
+var SlowBuffer = buffer.SlowBuffer;
+var MAX_LEN = buffer.kMaxLength || 2147483647;
+exports.alloc = function alloc(size, fill, encoding) {
+ if (typeof Buffer.alloc === 'function') {
+ return Buffer.alloc(size, fill, encoding);
+ }
+ if (typeof encoding === 'number') {
+ throw new TypeError('encoding must not be number');
+ }
+ if (typeof size !== 'number') {
+ throw new TypeError('size must be a number');
+ }
+ if (size > MAX_LEN) {
+ throw new RangeError('size is too large');
+ }
+ var enc = encoding;
+ var _fill = fill;
+ if (_fill === undefined) {
+ enc = undefined;
+ _fill = 0;
+ }
+ var buf = new Buffer(size);
+ if (typeof _fill === 'string') {
+ var fillBuf = new Buffer(_fill, enc);
+ var flen = fillBuf.length;
+ var i = -1;
+ while (++i < size) {
+ buf[i] = fillBuf[i % flen];
+ }
+ } else {
+ buf.fill(_fill);
+ }
+ return buf;
+}
+exports.allocUnsafe = function allocUnsafe(size) {
+ if (typeof Buffer.allocUnsafe === 'function') {
+ return Buffer.allocUnsafe(size);
+ }
+ if (typeof size !== 'number') {
+ throw new TypeError('size must be a number');
+ }
+ if (size > MAX_LEN) {
+ throw new RangeError('size is too large');
+ }
+ return new Buffer(size);
+}
+exports.from = function from(value, encodingOrOffset, length) {
+ if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) {
+ return Buffer.from(value, encodingOrOffset, length);
+ }
+ if (typeof value === 'number') {
+ throw new TypeError('"value" argument must not be a number');
+ }
+ if (typeof value === 'string') {
+ return new Buffer(value, encodingOrOffset);
+ }
+ if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
+ var offset = encodingOrOffset;
+ if (arguments.length === 1) {
+ return new Buffer(value);
+ }
+ if (typeof offset === 'undefined') {
+ offset = 0;
+ }
+ var len = length;
+ if (typeof len === 'undefined') {
+ len = value.byteLength - offset;
+ }
+ if (offset >= value.byteLength) {
+ throw new RangeError('\'offset\' is out of bounds');
+ }
+ if (len > value.byteLength - offset) {
+ throw new RangeError('\'length\' is out of bounds');
+ }
+ return new Buffer(value.slice(offset, offset + len));
+ }
+ if (Buffer.isBuffer(value)) {
+ var out = new Buffer(value.length);
+ value.copy(out, 0, 0, value.length);
+ return out;
+ }
+ if (value) {
+ if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) {
+ return new Buffer(value);
+ }
+ if (value.type === 'Buffer' && Array.isArray(value.data)) {
+ return new Buffer(value.data);
+ }
+ }
+
+ throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.');
+}
+exports.allocUnsafeSlow = function allocUnsafeSlow(size) {
+ if (typeof Buffer.allocUnsafeSlow === 'function') {
+ return Buffer.allocUnsafeSlow(size);
+ }
+ if (typeof size !== 'number') {
+ throw new TypeError('size must be a number');
+ }
+ if (size >= MAX_LEN) {
+ throw new RangeError('size is too large');
+ }
+ return new SlowBuffer(size);
+}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/LICENCE b/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/license.md
index 1a14b437e8..01cfaefe2f 100644
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/LICENCE
+++ b/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/license.md
@@ -1,4 +1,4 @@
-Copyright (c) 2012-2014 Raynos.
+# Copyright (c) 2016 Calvin Metcalf
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -7,13 +7,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.**
diff --git a/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/package.json b/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/package.json
new file mode 100644
index 0000000000..1a9a8e0aee
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/package.json
@@ -0,0 +1,84 @@
+{
+ "_args": [
+ [
+ {
+ "name": "buffer-shims",
+ "raw": "buffer-shims@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "/Users/zkat/Documents/code/npm/node_modules/readable-stream"
+ ]
+ ],
+ "_from": "buffer-shims@>=1.0.0 <2.0.0",
+ "_id": "buffer-shims@1.0.0",
+ "_inCache": true,
+ "_installable": true,
+ "_location": "/readable-stream/buffer-shims",
+ "_nodeVersion": "5.11.0",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/buffer-shims-1.0.0.tgz_1462560889323_0.8640750856138766"
+ },
+ "_npmUser": {
+ "email": "calvin.metcalf@gmail.com",
+ "name": "cwmma"
+ },
+ "_npmVersion": "3.8.6",
+ "_phantomChildren": {},
+ "_requested": {
+ "name": "buffer-shims",
+ "raw": "buffer-shims@^1.0.0",
+ "rawSpec": "^1.0.0",
+ "scope": null,
+ "spec": ">=1.0.0 <2.0.0",
+ "type": "range"
+ },
+ "_requiredBy": [
+ "/readable-stream"
+ ],
+ "_resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz",
+ "_shasum": "9978ce317388c649ad8793028c3477ef044a8b51",
+ "_shrinkwrap": null,
+ "_spec": "buffer-shims@^1.0.0",
+ "_where": "/Users/zkat/Documents/code/npm/node_modules/readable-stream",
+ "bugs": {
+ "url": "https://github.com/calvinmetcalf/buffer-shims/issues"
+ },
+ "dependencies": {},
+ "description": "some shims for node buffers",
+ "devDependencies": {
+ "tape": "^4.5.1"
+ },
+ "directories": {},
+ "dist": {
+ "shasum": "9978ce317388c649ad8793028c3477ef044a8b51",
+ "tarball": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz"
+ },
+ "files": [
+ "index.js"
+ ],
+ "gitHead": "ea89b3857ab5b8203957922a84e9a48cf4c47e0a",
+ "homepage": "https://github.com/calvinmetcalf/buffer-shims#readme",
+ "license": "MIT",
+ "main": "index.js",
+ "maintainers": [
+ {
+ "email": "calvin.metcalf@gmail.com",
+ "name": "cwmma"
+ }
+ ],
+ "name": "buffer-shims",
+ "optionalDependencies": {},
+ "readme": "ERROR: No README data found!",
+ "repository": {
+ "type": "git",
+ "url": "git+ssh://git@github.com/calvinmetcalf/buffer-shims.git"
+ },
+ "scripts": {
+ "test": "tape test/*.js"
+ },
+ "version": "1.0.0"
+}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/readme.md b/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/readme.md
new file mode 100644
index 0000000000..7ea6475e28
--- /dev/null
+++ b/deps/npm/node_modules/readable-stream/node_modules/buffer-shims/readme.md
@@ -0,0 +1,21 @@
+buffer-shims
+===
+
+functions to make sure the new buffer methods work in older browsers.
+
+```js
+var bufferShim = require('buffer-shims');
+bufferShim.from('foo');
+bufferShim.alloc(9, 'cafeface', 'hex');
+bufferShim.allocUnsafe(15);
+bufferShim.allocUnsafeSlow(21);
+```
+
+should just use the original in newer nodes and on older nodes uses fallbacks.
+
+Known Issues
+===
+- this does not patch the buffer object, only the constructor stuff
+- it's actually a polyfill
+
+![](https://i.imgur.com/zxII3jJ.gif)
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/index.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/index.js
deleted file mode 100644
index c1fb0077e9..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/index.js
+++ /dev/null
@@ -1,37 +0,0 @@
-'use strict';
-var through = require('through2');
-var falafel = require('falafel');
-
-module.exports = apply;
-var regex = /process\s*\.\s*browser/;
-function apply() {
- var buffers = [];
-
- return through(function(chunk, enc, next) {
- buffers.push(chunk);
- next();
- }, function(next) {
- var string = Buffer.concat(buffers).toString();
- if (!string.match(regex)) {
- this.push(string);
- return next();
- }
- var resp = falafel(string, {
- ecmaVersion: 6,
- allowReturnOutsideFunction: true
- }, function (node) {
-
- if (
- node.type === 'MemberExpression' &&
- node.object && node.property &&
- node.object.name === 'process'
- && node.property.name === 'browser' &&
- !(node.parent ? node.parent.operator === '=' && node.parent.left === node : true)
- ) {
- node.update('true');
- }
- });
- this.push(resp.toString());
- next();
- });
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/.travis.yml b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/.travis.yml
deleted file mode 100644
index eba42c8b2d..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: node_js
-node_js:
- - 0.12
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/example/array.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/example/array.js
deleted file mode 100644
index c805d5192f..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/example/array.js
+++ /dev/null
@@ -1,14 +0,0 @@
-var falafel = require('../');
-
-var src = '(' + function () {
- var xs = [ 1, 2, [ 3, 4 ] ];
- var ys = [ 5, 6 ];
- console.dir([ xs, ys ]);
-} + ')()';
-
-var output = falafel(src, function (node) {
- if (node.type === 'ArrayExpression') {
- node.update('fn(' + node.source() + ')');
- }
-});
-console.log(output);
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/example/keyword.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/example/keyword.js
deleted file mode 100644
index b7cdd4a544..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/example/keyword.js
+++ /dev/null
@@ -1,16 +0,0 @@
-var falafel = require('../');
-var src = 'console.log(beep "boop", "BOOP");';
-
-function isKeyword (id) {
- if (id === 'beep') return true;
-}
-
-var output = falafel(src, { isKeyword: isKeyword }, function (node) {
- if (node.type === 'UnaryExpression'
- && node.operator === 'beep') {
- node.update(
- 'String(' + node.argument.source() + ').toUpperCase()'
- );
- }
-});
-console.log(output);
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/example/prompt.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/example/prompt.js
deleted file mode 100644
index a1062a03f4..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/example/prompt.js
+++ /dev/null
@@ -1,49 +0,0 @@
-var falafel = require('../');
-var vm = require('vm');
-
-var termExps = [
- 'Identifier',
- 'CallExpression',
- 'BinaryExpression',
- 'UpdateExpression',
- 'UnaryExpression'
-].reduce(function (acc, key) { acc[key] = true; return acc }, {});
-
-function terminated (node) {
- for (var p = node; p.parent; p = p.parent) {
- if (termExps[p.type]) return true;
- }
- return false;
-}
-
-var src = '{"a":[2,~9,prompt(":d")],"b":4,"c":prompt("beep"),"d":6}';
-
-var offsets = [];
-var output = falafel('(' + src + ')', function (node) {
- var isLeaf = node.parent
- && !terminated(node.parent) && terminated(node)
- ;
-
- if (isLeaf) {
- var s = node.source();
- var prompted = false;
- var res = vm.runInNewContext('(' + s + ')', {
- prompt : function (x) {
- setTimeout(function () {
- node.update(x.toUpperCase());
- }, Math.random() * 50);
- prompted = true;
- }
- });
- if (!prompted) {
- var s_ = JSON.stringify(res);
- node.update(s_);
- }
- }
-});
-
-setTimeout(function () {
- console.log(src);
- console.log('---');
- console.log(output);
-}, 200);
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/index.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/index.js
deleted file mode 100644
index 5fd572f773..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/index.js
+++ /dev/null
@@ -1,79 +0,0 @@
-var parse = require('acorn').parse;
-var isArray = require('isarray');
-var objectKeys = require('object-keys');
-var forEach = require('foreach');
-
-module.exports = function (src, opts, fn) {
- if (typeof opts === 'function') {
- fn = opts;
- opts = {};
- }
- if (src && typeof src === 'object' && src.constructor.name === 'Buffer') {
- src = src.toString();
- }
- else if (src && typeof src === 'object') {
- opts = src;
- src = opts.source;
- delete opts.source;
- }
- src = src === undefined ? opts.source : src;
- if (typeof src !== 'string') src = String(src);
- if (opts.parser) parse = opts.parser.parse;
- var ast = parse(src, opts);
-
- var result = {
- chunks : src.split(''),
- toString : function () { return result.chunks.join('') },
- inspect : function () { return result.toString() }
- };
- var index = 0;
-
- (function walk (node, parent) {
- insertHelpers(node, parent, result.chunks);
-
- forEach(objectKeys(node), function (key) {
- if (key === 'parent') return;
-
- var child = node[key];
- if (isArray(child)) {
- forEach(child, function (c) {
- if (c && typeof c.type === 'string') {
- walk(c, node);
- }
- });
- }
- else if (child && typeof child.type === 'string') {
- walk(child, node);
- }
- });
- fn(node);
- })(ast, undefined);
-
- return result;
-};
-
-function insertHelpers (node, parent, chunks) {
- node.parent = parent;
-
- node.source = function () {
- return chunks.slice(node.start, node.end).join('');
- };
-
- if (node.update && typeof node.update === 'object') {
- var prev = node.update;
- forEach(objectKeys(prev), function (key) {
- update[key] = prev[key];
- });
- node.update = update;
- }
- else {
- node.update = update;
- }
-
- function update (s) {
- chunks[node.start] = s;
- for (var i = node.start + 1; i < node.end; i++) {
- chunks[i] = '';
- }
- }
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.editorconfig b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.editorconfig
deleted file mode 100644
index c14d5c67b4..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.editorconfig
+++ /dev/null
@@ -1,7 +0,0 @@
-root = true
-
-[*]
-indent_style = space
-indent_size = 2
-end_of_line = lf
-insert_final_newline = true
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.gitattributes b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.gitattributes
deleted file mode 100644
index fcadb2cf97..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
-* text eol=lf
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.npmignore b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.npmignore
deleted file mode 100644
index ecba2911d2..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/.tern-port
-/test
-/local
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.tern-project b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.tern-project
deleted file mode 100644
index 9e26dfeeb6..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.tern-project
+++ /dev/null
@@ -1 +0,0 @@
-{} \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.travis.yml b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.travis.yml
deleted file mode 100644
index ffb9f710ac..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/.travis.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-language: node_js
-node_js: '0.10'
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/AUTHORS b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/AUTHORS
deleted file mode 100644
index 0fb284bb55..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/AUTHORS
+++ /dev/null
@@ -1,38 +0,0 @@
-List of Acorn contributors. Updated before every release.
-
-Adrian Rakovsky
-Alistair Braidwood
-Andres Suarez
-Aparajita Fishman
-Arian Stolwijk
-Artem Govorov
-Brandon Mills
-Charles Hughes
-Conrad Irwin
-David Bonnet
-Forbes Lindesay
-Gilad Peleg
-impinball
-Ingvar Stepanyan
-Jiaxing Wang
-Johannes Herr
-Jürg Lehni
-keeyipchan
-krator
-Marijn Haverbeke
-Martin Carlberg
-Mathias Bynens
-Mathieu 'p01' Henri
-Max Schaefer
-Max Zerzouri
-Mihai Bazon
-Mike Rennie
-Nick Fitzgerald
-Oskar Schöldström
-Paul Harper
-Peter Rust
-PlNG
-r-e-d
-Rich Harris
-Sebastian McKenzie
-zsjforcn
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/LICENSE b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/LICENSE
deleted file mode 100644
index d4c7fc5838..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (C) 2012-2014 by various contributors (see AUTHORS)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/README.md b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/README.md
deleted file mode 100644
index ce1ec34770..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/README.md
+++ /dev/null
@@ -1,377 +0,0 @@
-# Acorn
-
-[![Build Status](https://travis-ci.org/marijnh/acorn.svg?branch=master)](https://travis-ci.org/marijnh/acorn)
-[![NPM version](https://img.shields.io/npm/v/acorn.svg)](https://www.npmjs.org/package/acorn)
-[Author funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png?force)](https://marijnhaverbeke.nl/fund/)
-
-A tiny, fast JavaScript parser, written completely in JavaScript.
-
-## Installation
-
-The easiest way to install acorn is with [`npm`][npm].
-
-[npm]: http://npmjs.org
-
-```sh
-npm install acorn
-```
-
-Alternately, download the source.
-
-```sh
-git clone https://github.com/marijnh/acorn.git
-```
-
-## Components
-
-When run in a CommonJS (node.js) or AMD environment, exported values
-appear in the interfaces exposed by the individual files, as usual.
-When loaded in the browser (Acorn works in any JS-enabled browser more
-recent than IE5) without any kind of module management, a single
-global object `acorn` will be defined, and all the exported properties
-will be added to that.
-
-### Main parser
-
-This is implemented in `dist/acorn.js`, and is what you get when you
-`require("acorn")` in node.js.
-
-**parse**`(input, options)` is used to parse a JavaScript program.
-The `input` parameter is a string, `options` can be undefined or an
-object setting some of the options listed below. The return value will
-be an abstract syntax tree object as specified by the
-[Mozilla Parser API][mozapi].
-
-When encountering a syntax error, the parser will raise a
-`SyntaxError` object with a meaningful message. The error object will
-have a `pos` property that indicates the character offset at which the
-error occurred, and a `loc` object that contains a `{line, column}`
-object referring to that same position.
-
-[mozapi]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
-
-- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
- either 3, 5, or 6. This influences support for strict mode, the set
- of reserved words, and support for new syntax features. Default is 5.
-
-- **sourceType**: Indicate the mode the code should be parsed in. Can be
- either `"script"` or `"module"`.
-
-- **onInsertedSemicolon**: If given a callback, that callback will be
- called whenever a missing semicolon is inserted by the parser. The
- callback will be given the character offset of the point where the
- semicolon is inserted as argument, and if `locations` is on, also a
- `{line, column}` object representing this position.
-
-- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing
- commas.
-
-- **allowReserved**: If `false`, using a reserved word will generate
- an error. Defaults to `true`. When given the value `"never"`,
- reserved words and keywords can also not be used as property names
- (as in Internet Explorer's old parser).
-
-- **allowReturnOutsideFunction**: By default, a return statement at
- the top level raises an error. Set this to `true` to accept such
- code.
-
-- **allowImportExportEverywhere**: By default, `import` and `export`
- declarations can only appear at a program's top level. Setting this
- option to `true` allows them anywhere where a statement is allowed.
-
-- **allowHashBang**: When this is enabled (off by default), if the
- code starts with the characters `#!` (as in a shellscript), the
- first line will be treated as a comment.
-
-- **locations**: When `true`, each node has a `loc` object attached
- with `start` and `end` subobjects, each of which contains the
- one-based line and zero-based column numbers in `{line, column}`
- form. Default is `false`.
-
-- **onToken**: If a function is passed for this option, each found
- token will be passed in same format as `tokenize()` returns.
-
- If array is passed, each found token is pushed to it.
-
- Note that you are not allowed to call the parser from the
- callback—that will corrupt its internal state.
-
-- **onComment**: If a function is passed for this option, whenever a
- comment is encountered the function will be called with the
- following parameters:
-
- - `block`: `true` if the comment is a block comment, false if it
- is a line comment.
- - `text`: The content of the comment.
- - `start`: Character offset of the start of the comment.
- - `end`: Character offset of the end of the comment.
-
- When the `locations` options is on, the `{line, column}` locations
- of the comment’s start and end are passed as two additional
- parameters.
-
- If array is passed for this option, each found comment is pushed
- to it as object in Esprima format:
-
- ```javascript
- {
- "type": "Line" | "Block",
- "value": "comment text",
- "range": ...,
- "loc": ...
- }
- ```
-
- Note that you are not allowed to call the parser from the
- callback—that will corrupt its internal state.
-
-- **ranges**: Nodes have their start and end characters offsets
- recorded in `start` and `end` properties (directly on the node,
- rather than the `loc` object, which holds line/column data. To also
- add a [semi-standardized][range] "range" property holding a
- `[start, end]` array with the same numbers, set the `ranges` option
- to `true`.
-
-- **program**: It is possible to parse multiple files into a single
- AST by passing the tree produced by parsing the first file as the
- `program` option in subsequent parses. This will add the toplevel
- forms of the parsed file to the "Program" (top) node of an existing
- parse tree.
-
-- **sourceFile**: When the `locations` option is `true`, you can pass
- this option to add a `source` attribute in every node’s `loc`
- object. Note that the contents of this option are not examined or
- processed in any way; you are free to use whatever format you
- choose.
-
-- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property
- will be added directly to the nodes, rather than the `loc` object.
-
-- **preserveParens**: If this option is `true`, parenthesized expressions
- are represented by (non-standard) `ParenthesizedExpression` nodes
- that have a single `expression` property containing the expression
- inside parentheses.
-
-[range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
-
-**parseExpressionAt**`(input, offset, options)` will parse a single
-expression in a string, and return its AST. It will not complain if
-there is more of the string left after the expression.
-
-**getLineInfo**`(input, offset)` can be used to get a `{line,
-column}` object for a given program string and character offset.
-
-**tokenizer**`(input, options)` returns an object with a `getToken`
-method that can be called repeatedly to get the next token, a `{start,
-end, type, value}` object (with added `loc` property when the
-`locations` option is enabled and `range` property when the `ranges`
-option is enabled). When the token's type is `tokTypes.eof`, you
-should stop calling the method, since it will keep returning that same
-token forever.
-
-In ES6 environment, returned result can be used as any other
-protocol-compliant iterable:
-
-```javascript
-for (let token of acorn.tokenize(str)) {
- // iterate over the tokens
-}
-
-// transform code to array of tokens:
-var tokens = [...acorn.tokenize(str)];
-```
-
-**tokTypes** holds an object mapping names to the token type objects
-that end up in the `type` properties of tokens.
-
-#### Note on using with [Escodegen][escodegen]
-
-Escodegen supports generating comments from AST, attached in
-Esprima-specific format. In order to simulate same format in
-Acorn, consider following example:
-
-```javascript
-var comments = [], tokens = [];
-
-var ast = acorn.parse('var x = 42; // answer', {
- // collect ranges for each node
- ranges: true,
- // collect comments in Esprima's format
- onComment: comments,
- // collect token ranges
- onToken: tokens
-});
-
-// attach comments using collected information
-escodegen.attachComments(ast, comments, tokens);
-
-// generate code
-console.log(escodegen.generate(ast, {comment: true}));
-// > 'var x = 42; // answer'
-```
-
-[escodegen]: https://github.com/Constellation/escodegen
-
-#### Using Acorn in an environment with a Content Security Policy
-
-Some contexts, such as Chrome Web Apps, disallow run-time code evaluation.
-Acorn uses `new Function` to generate fast functions that test whether
-a word is in a given set, and will trigger a security error when used
-in a context with such a
-[Content Security Policy](http://www.html5rocks.com/en/tutorials/security/content-security-policy/#eval-too)
-(see [#90](https://github.com/marijnh/acorn/issues/90) and
-[#123](https://github.com/marijnh/acorn/issues/123)).
-
-The `dist/acorn_csp.js` file in the distribution (which is built
-by the `bin/without_eval` script) has the generated code inlined, and
-can thus run without evaluating anything.
-
-### dist/acorn_loose.js ###
-
-This file implements an error-tolerant parser. It exposes a single
-function.
-
-**parse_dammit**`(input, options)` takes the same arguments and
-returns the same syntax tree as the `parse` function in `acorn.js`,
-but never raises an error, and will do its best to parse syntactically
-invalid code in as meaningful a way as it can. It'll insert identifier
-nodes with name `"✖"` as placeholders in places where it can't make
-sense of the input. Depends on `acorn.js`, because it uses the same
-tokenizer.
-
-### dist/walk.js ###
-
-Implements an abstract syntax tree walker. Will store its interface in
-`acorn.walk` when loaded without a module system.
-
-**simple**`(node, visitors, base, state)` does a 'simple' walk over
-a tree. `node` should be the AST node to walk, and `visitors` an
-object with properties whose names correspond to node types in the
-[Mozilla Parser API][mozapi]. The properties should contain functions
-that will be called with the node object and, if applicable the state
-at that point. The last two arguments are optional. `base` is a walker
-algorithm, and `state` is a start state. The default walker will
-simply visit all statements and expressions and not produce a
-meaningful state. (An example of a use of state it to track scope at
-each point in the tree.)
-
-**ancestor**`(node, visitors, base, state)` does a 'simple' walk over
-a tree, building up an array of ancestor nodes (including the current node)
-and passing the array to callbacks in the `state` parameter.
-
-**recursive**`(node, state, functions, base)` does a 'recursive'
-walk, where the walker functions are responsible for continuing the
-walk on the child nodes of their target node. `state` is the start
-state, and `functions` should contain an object that maps node types
-to walker functions. Such functions are called with `(node, state, c)`
-arguments, and can cause the walk to continue on a sub-node by calling
-the `c` argument on it with `(node, state)` arguments. The optional
-`base` argument provides the fallback walker functions for node types
-that aren't handled in the `functions` object. If not given, the
-default walkers will be used.
-
-**make**`(functions, base)` builds a new walker object by using the
-walker functions in `functions` and filling in the missing ones by
-taking defaults from `base`.
-
-**findNodeAt**`(node, start, end, test, base, state)` tries to
-locate a node in a tree at the given start and/or end offsets, which
-satisfies the predicate `test`. `start` end `end` can be either `null`
-(as wildcard) or a number. `test` may be a string (indicating a node
-type) or a function that takes `(nodeType, node)` arguments and
-returns a boolean indicating whether this node is interesting. `base`
-and `state` are optional, and can be used to specify a custom walker.
-Nodes are tested from inner to outer, so if two nodes match the
-boundaries, the inner one will be preferred.
-
-**findNodeAround**`(node, pos, test, base, state)` is a lot like
-`findNodeAt`, but will match any node that exists 'around' (spanning)
-the given position.
-
-**findNodeAfter**`(node, pos, test, base, state)` is similar to
-`findNodeAround`, but will match all nodes *after* the given position
-(testing outer nodes before inner nodes).
-
-## Command line interface
-
-The `bin/acorn` utility can be used to parse a file from the command
-line. It accepts as arguments its input file and the following
-options:
-
-- `--ecma3|--ecma5|--ecma6`: Sets the ECMAScript version to parse. Default is
- version 5.
-
-- `--locations`: Attaches a "loc" object to each node with "start" and
- "end" subobjects, each of which contains the one-based line and
- zero-based column numbers in `{line, column}` form.
-
-- `--allow-hash-bang`: If the code starts with the characters #! (as in a shellscript), the first line will be treated as a comment.
-
-- `--compact`: No whitespace is used in the AST output.
-
-- `--silent`: Do not output the AST, just return the exit status.
-
-- `--help`: Print the usage information and quit.
-
-The utility spits out the syntax tree as JSON data.
-
-## Build system
-
-Acorn is written in ECMAScript 6, as a set of small modules, in the
-project's `src` directory, and compiled down to bigger ECMAScript 3
-files in `dist` using [Browserify](http://browserify.org) and
-[Babel](http://babeljs.io/). If you are already using Babel, you can
-consider including the modules directly.
-
-The command-line test runner (`npm test`) uses the ES6 modules. The
-browser-based test page (`test/index.html`) uses the compiled modules.
-The `bin/build-acorn.js` script builds the latter from the former.
-
-If you are working on Acorn, you'll probably want to try the code out
-directly, without an intermediate build step. In your scripts, you can
-register the Babel require shim like this:
-
- require("babelify/node_modules/babel-core/register")
-
-That will allow you to directly `require` the ES6 modules.
-
-## Plugins
-
-Acorn is designed support allow plugins which, within reasonable
-bounds, redefine the way the parser works. Plugins can add new token
-types and new tokenizer contexts (if necessary), and extend methods in
-the parser object. This is not a clean, elegant API—using it requires
-an understanding of Acorn's internals, and plugins are likely to break
-whenever those internals are significantly changed. But still, it is
-_possible_, in this way, to create parsers for JavaScript dialects
-without forking all of Acorn. And in principle it is even possible to
-combine such plugins, so that if you have, for example, a plugin for
-parsing types and a plugin for parsing JSX-style XML literals, you
-could load them both and parse code with both JSX tags and types.
-
-A plugin should register itself by adding a property to
-`acorn.plugins`, which holds a function. Calling `acorn.parse`, a
-`plugin` option can be passed, holding an object mapping plugin names
-to configuration values (or just `true` for plugins that don't take
-options). After the parser object has been created, the initialization
-functions for the chosen plugins are called with `(parser,
-configValue)` arguments. They are expected to use the `parser.extend`
-method to extend parser methods. For example, the `readToken` method
-could be extended like this:
-
-```javascript
-parser.extend("readToken", function(nextMethod) {
- return function(code) {
- console.log("Reading a token!")
- return nextMethod.call(this, code)
- }
-})
-```
-
-The `nextMethod` argument passed to `extend`'s second argument is the
-previous value of this method, and should usually be called through to
-whenever the extended method does not handle the call itself.
-
-There is a proof-of-concept JSX plugin in the [`jsx`
-branch](https://github.com/marijnh/acorn/tree/jsx) branch of the
-Github repository.
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/acorn b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/acorn
deleted file mode 100755
index 76d8178b27..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/acorn
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env node
-
-var path = require("path");
-var fs = require("fs");
-var acorn = require("../dist/acorn.js");
-
-var infile, parsed, tokens, options = {}, silent = false, compact = false, tokenize = false;
-
-function help(status) {
- var print = (status == 0) ? console.log : console.error;
- print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6]");
- print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--help] [--] infile");
- process.exit(status);
-}
-
-for (var i = 2; i < process.argv.length; ++i) {
- var arg = process.argv[i];
- if (arg[0] != "-" && !infile) infile = arg;
- else if (arg == "--" && !infile && i + 2 == process.argv.length) infile = process.argv[++i];
- else if (arg == "--ecma3") options.ecmaVersion = 3;
- else if (arg == "--ecma5") options.ecmaVersion = 5;
- else if (arg == "--ecma6") options.ecmaVersion = 6;
- else if (arg == "--ecma7") options.ecmaVersion = 7;
- else if (arg == "--locations") options.locations = true;
- else if (arg == "--allow-hash-bang") options.allowHashBang = true;
- else if (arg == "--silent") silent = true;
- else if (arg == "--compact") compact = true;
- else if (arg == "--help") help(0);
- else if (arg == "--tokenize") tokenize = true;
- else help(1);
-}
-
-try {
- var code = fs.readFileSync(infile, "utf8");
-
- if (!tokenize)
- parsed = acorn.parse(code, options);
- else {
- var get = acorn.tokenize(code, options);
- tokens = [];
- while (true) {
- var token = get();
- tokens.push(token);
- if (token.type.type == "eof")
- break;
- }
- }
-} catch(e) {
- console.log(e.message);
- process.exit(1);
-}
-
-if (!silent)
- console.log(JSON.stringify(tokenize ? tokens : parsed, null, compact ? null : 2));
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/build-acorn.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/build-acorn.js
deleted file mode 100644
index a97b757541..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/build-acorn.js
+++ /dev/null
@@ -1,51 +0,0 @@
-var fs = require("fs"), path = require("path")
-var stream = require("stream")
-
-var browserify = require("browserify")
-var babelify = require("babelify").configure({loose: "all"})
-
-process.chdir(path.resolve(__dirname, ".."))
-
-browserify({standalone: "acorn"})
- .plugin(require('browserify-derequire'))
- .transform(babelify)
- .require("./src/index.js", {entry: true})
- .bundle()
- .on("error", function (err) { console.log("Error: " + err.message) })
- .pipe(fs.createWriteStream("dist/acorn.js"))
-
-function acornShim(file) {
- var tr = new stream.Transform
- if (file == path.resolve(__dirname, "../src/index.js")) {
- var sent = false
- tr._transform = function(chunk, _, callback) {
- if (!sent) {
- sent = true
- callback(null, "module.exports = typeof acorn != 'undefined' ? acorn : _dereq_(\"./acorn\")")
- } else {
- callback()
- }
- }
- } else {
- tr._transform = function(chunk, _, callback) { callback(null, chunk) }
- }
- return tr
-}
-
-browserify({standalone: "acorn.loose"})
- .plugin(require('browserify-derequire'))
- .transform(acornShim)
- .transform(babelify)
- .require("./src/loose/index.js", {entry: true})
- .bundle()
- .on("error", function (err) { console.log("Error: " + err.message) })
- .pipe(fs.createWriteStream("dist/acorn_loose.js"))
-
-browserify({standalone: "acorn.walk"})
- .plugin(require('browserify-derequire'))
- .transform(acornShim)
- .transform(babelify)
- .require("./src/walk/index.js", {entry: true})
- .bundle()
- .on("error", function (err) { console.log("Error: " + err.message) })
- .pipe(fs.createWriteStream("dist/walk.js"))
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/generate-identifier-regex.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/generate-identifier-regex.js
deleted file mode 100644
index 0d7c50fc38..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/generate-identifier-regex.js
+++ /dev/null
@@ -1,47 +0,0 @@
-// Note: run `npm install unicode-7.0.0` first.
-
-// Which Unicode version should be used?
-var version = '7.0.0';
-
-var start = require('unicode-' + version + '/properties/ID_Start/code-points')
- .filter(function(ch) { return ch > 127; });
-var cont = [0x200c, 0x200d].concat(require('unicode-' + version + '/properties/ID_Continue/code-points')
- .filter(function(ch) { return ch > 127 && start.indexOf(ch) == -1; }));
-
-function pad(str, width) {
- while (str.length < width) str = "0" + str;
- return str;
-}
-
-function esc(code) {
- var hex = code.toString(16);
- if (hex.length <= 2) return "\\x" + pad(hex, 2);
- else return "\\u" + pad(hex, 4);
-}
-
-function generate(chars) {
- var astral = [], re = "";
- for (var i = 0, at = 0x10000; i < chars.length; i++) {
- var from = chars[i], to = from;
- while (i < chars.length - 1 && chars[i + 1] == to + 1) {
- i++;
- to++;
- }
- if (to <= 0xffff) {
- if (from == to) re += esc(from);
- else if (from + 1 == to) re += esc(from) + esc(to);
- else re += esc(from) + "-" + esc(to);
- } else {
- astral.push(from - at, to - from);
- at = to;
- }
- }
- return {nonASCII: re, astral: astral};
-}
-
-var startData = generate(start), contData = generate(cont);
-
-console.log(" var nonASCIIidentifierStartChars = \"" + startData.nonASCII + "\";");
-console.log(" var nonASCIIidentifierChars = \"" + contData.nonASCII + "\";");
-console.log(" var astralIdentifierStartCodes = " + JSON.stringify(startData.astral) + ";");
-console.log(" var astralIdentifierCodes = " + JSON.stringify(contData.astral) + ";");
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/prepublish.sh b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/prepublish.sh
deleted file mode 100755
index 879834da67..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/prepublish.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-node bin/build-acorn.js
-node bin/without_eval > dist/acorn_csp.js
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/update_authors.sh b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/update_authors.sh
deleted file mode 100755
index 466c8db586..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/update_authors.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-# Combine existing list of authors with everyone known in git, sort, add header.
-tail --lines=+3 AUTHORS > AUTHORS.tmp
-git log --format='%aN' | grep -v abraidwood >> AUTHORS.tmp
-echo -e "List of Acorn contributors. Updated before every release.\n" > AUTHORS
-sort -u AUTHORS.tmp >> AUTHORS
-rm -f AUTHORS.tmp
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/without_eval b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/without_eval
deleted file mode 100755
index 4331e7070c..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/bin/without_eval
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env node
-
-var fs = require("fs")
-
-var acornSrc = fs.readFileSync(require.resolve("../dist/acorn"), "utf8")
-var acorn = require("../dist/acorn"), walk = require("../dist/walk")
-
-var ast = acorn.parse(acornSrc)
-var touchups = [], uses = []
-
-var makePred
-
-walk.simple(ast, {
- FunctionDeclaration: function(node) {
- if (node.id.name == "makePredicate") {
- makePred = node
- touchups.push({text: "// Removed to create an eval-free library", from: node.start, to: node.end})
- }
- },
- ObjectExpression: function(node) {
- node.properties.forEach(function(prop) {
- if (prop.value.type == "CallExpression" &&
- prop.value.callee.name == "makePredicate")
- uses.push(prop.value)
- })
- }
-})
-
-var results = []
-var dryRun = acornSrc.slice(0, makePred.end) + "; makePredicate = (function(mp) {" +
- "return function(words) { var r = mp(words); predicates.push(r); return r }})(makePredicate);" +
- acornSrc.slice(makePred.end)
-;(new Function("predicates", dryRun))(results)
-
-uses.forEach(function (node, i) {
- touchups.push({text: results[i].toString(), from: node.start, to: node.end})
-})
-
-var result = "", pos = 0
-touchups.sort(function(a, b) { return a.from - b.from })
-touchups.forEach(function(touchup) {
- result += acornSrc.slice(pos, touchup.from)
- result += touchup.text
- pos = touchup.to
-})
-result += acornSrc.slice(pos)
-
-process.stdout.write(result)
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/.keep b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/.keep
deleted file mode 100644
index e69de29bb2..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/.keep
+++ /dev/null
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/acorn.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/acorn.js
deleted file mode 100644
index 1f1b6f2432..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/acorn.js
+++ /dev/null
@@ -1,4014 +0,0 @@
-(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.acorn = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
-
-
-// The main exported interface (under `self.acorn` when in the
-// browser) is a `parse` function that takes a code string and
-// returns an abstract syntax tree as specified by [Mozilla parser
-// API][api].
-//
-// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
-
-"use strict";
-
-exports.parse = parse;
-
-// This function tries to parse a single expression at a given
-// offset in a string. Useful for parsing mixed-language formats
-// that embed JavaScript expressions.
-
-exports.parseExpressionAt = parseExpressionAt;
-
-// Acorn is organized as a tokenizer and a recursive-descent parser.
-// The `tokenize` export provides an interface to the tokenizer.
-
-exports.tokenizer = tokenizer;
-exports.__esModule = true;
-// Acorn is a tiny, fast JavaScript parser written in JavaScript.
-//
-// Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and
-// various contributors and released under an MIT license.
-//
-// Git repositories for Acorn are available at
-//
-// http://marijnhaverbeke.nl/git/acorn
-// https://github.com/marijnh/acorn.git
-//
-// Please use the [github bug tracker][ghbt] to report issues.
-//
-// [ghbt]: https://github.com/marijnh/acorn/issues
-//
-// This file defines the main parser interface. The library also comes
-// with a [error-tolerant parser][dammit] and an
-// [abstract syntax tree walker][walk], defined in other files.
-//
-// [dammit]: acorn_loose.js
-// [walk]: util/walk.js
-
-var _state = _dereq_("./state");
-
-var Parser = _state.Parser;
-
-var _options = _dereq_("./options");
-
-var getOptions = _options.getOptions;
-
-_dereq_("./parseutil");
-
-_dereq_("./statement");
-
-_dereq_("./lval");
-
-_dereq_("./expression");
-
-exports.Parser = _state.Parser;
-exports.plugins = _state.plugins;
-exports.defaultOptions = _options.defaultOptions;
-
-var _location = _dereq_("./location");
-
-exports.SourceLocation = _location.SourceLocation;
-exports.getLineInfo = _location.getLineInfo;
-exports.Node = _dereq_("./node").Node;
-
-var _tokentype = _dereq_("./tokentype");
-
-exports.TokenType = _tokentype.TokenType;
-exports.tokTypes = _tokentype.types;
-
-var _tokencontext = _dereq_("./tokencontext");
-
-exports.TokContext = _tokencontext.TokContext;
-exports.tokContexts = _tokencontext.types;
-
-var _identifier = _dereq_("./identifier");
-
-exports.isIdentifierChar = _identifier.isIdentifierChar;
-exports.isIdentifierStart = _identifier.isIdentifierStart;
-exports.Token = _dereq_("./tokenize").Token;
-
-var _whitespace = _dereq_("./whitespace");
-
-exports.isNewLine = _whitespace.isNewLine;
-exports.lineBreak = _whitespace.lineBreak;
-exports.lineBreakG = _whitespace.lineBreakG;
-var version = "1.2.2";exports.version = version;
-
-function parse(input, options) {
- var p = parser(options, input);
- var startPos = p.pos,
- startLoc = p.options.locations && p.curPosition();
- p.nextToken();
- return p.parseTopLevel(p.options.program || p.startNodeAt(startPos, startLoc));
-}
-
-function parseExpressionAt(input, pos, options) {
- var p = parser(options, input, pos);
- p.nextToken();
- return p.parseExpression();
-}
-
-function tokenizer(input, options) {
- return parser(options, input);
-}
-
-function parser(options, input) {
- return new Parser(getOptions(options), String(input));
-}
-
-},{"./expression":6,"./identifier":7,"./location":8,"./lval":9,"./node":10,"./options":11,"./parseutil":12,"./state":13,"./statement":14,"./tokencontext":15,"./tokenize":16,"./tokentype":17,"./whitespace":19}],2:[function(_dereq_,module,exports){
-if (typeof Object.create === 'function') {
- // implementation from standard node.js 'util' module
- module.exports = function inherits(ctor, superCtor) {
- ctor.super_ = superCtor
- ctor.prototype = Object.create(superCtor.prototype, {
- constructor: {
- value: ctor,
- enumerable: false,
- writable: true,
- configurable: true
- }
- });
- };
-} else {
- // old school shim for old browsers
- module.exports = function inherits(ctor, superCtor) {
- ctor.super_ = superCtor
- var TempCtor = function () {}
- TempCtor.prototype = superCtor.prototype
- ctor.prototype = new TempCtor()
- ctor.prototype.constructor = ctor
- }
-}
-
-},{}],3:[function(_dereq_,module,exports){
-// shim for using process in browser
-
-var process = module.exports = {};
-var queue = [];
-var draining = false;
-
-function drainQueue() {
- if (draining) {
- return;
- }
- draining = true;
- var currentQueue;
- var len = queue.length;
- while(len) {
- currentQueue = queue;
- queue = [];
- var i = -1;
- while (++i < len) {
- currentQueue[i]();
- }
- len = queue.length;
- }
- draining = false;
-}
-process.nextTick = function (fun) {
- queue.push(fun);
- if (!draining) {
- setTimeout(drainQueue, 0);
- }
-};
-
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-process.version = ''; // empty string to avoid regexp issues
-process.versions = {};
-
-function noop() {}
-
-process.on = noop;
-process.addListener = noop;
-process.once = noop;
-process.off = noop;
-process.removeListener = noop;
-process.removeAllListeners = noop;
-process.emit = noop;
-
-process.binding = function (name) {
- throw new Error('process.binding is not supported');
-};
-
-// TODO(shtylman)
-process.cwd = function () { return '/' };
-process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
-};
-process.umask = function() { return 0; };
-
-},{}],4:[function(_dereq_,module,exports){
-module.exports = function isBuffer(arg) {
- return arg && typeof arg === 'object'
- && typeof arg.copy === 'function'
- && typeof arg.fill === 'function'
- && typeof arg.readUInt8 === 'function';
-}
-},{}],5:[function(_dereq_,module,exports){
-(function (process,global){
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-var formatRegExp = /%[sdj%]/g;
-exports.format = function(f) {
- if (!isString(f)) {
- var objects = [];
- for (var i = 0; i < arguments.length; i++) {
- objects.push(inspect(arguments[i]));
- }
- return objects.join(' ');
- }
-
- var i = 1;
- var args = arguments;
- var len = args.length;
- var str = String(f).replace(formatRegExp, function(x) {
- if (x === '%%') return '%';
- if (i >= len) return x;
- switch (x) {
- case '%s': return String(args[i++]);
- case '%d': return Number(args[i++]);
- case '%j':
- try {
- return JSON.stringify(args[i++]);
- } catch (_) {
- return '[Circular]';
- }
- default:
- return x;
- }
- });
- for (var x = args[i]; i < len; x = args[++i]) {
- if (isNull(x) || !isObject(x)) {
- str += ' ' + x;
- } else {
- str += ' ' + inspect(x);
- }
- }
- return str;
-};
-
-
-// Mark that a method should not be used.
-// Returns a modified function which warns once by default.
-// If --no-deprecation is set, then it is a no-op.
-exports.deprecate = function(fn, msg) {
- // Allow for deprecating things in the process of starting up.
- if (isUndefined(global.process)) {
- return function() {
- return exports.deprecate(fn, msg).apply(this, arguments);
- };
- }
-
- if (process.noDeprecation === true) {
- return fn;
- }
-
- var warned = false;
- function deprecated() {
- if (!warned) {
- if (process.throwDeprecation) {
- throw new Error(msg);
- } else if (process.traceDeprecation) {
- console.trace(msg);
- } else {
- console.error(msg);
- }
- warned = true;
- }
- return fn.apply(this, arguments);
- }
-
- return deprecated;
-};
-
-
-var debugs = {};
-var debugEnviron;
-exports.debuglog = function(set) {
- if (isUndefined(debugEnviron))
- debugEnviron = process.env.NODE_DEBUG || '';
- set = set.toUpperCase();
- if (!debugs[set]) {
- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
- var pid = process.pid;
- debugs[set] = function() {
- var msg = exports.format.apply(exports, arguments);
- console.error('%s %d: %s', set, pid, msg);
- };
- } else {
- debugs[set] = function() {};
- }
- }
- return debugs[set];
-};
-
-
-/**
- * Echos the value of a value. Trys to print the value out
- * in the best way possible given the different types.
- *
- * @param {Object} obj The object to print out.
- * @param {Object} opts Optional options object that alters the output.
- */
-/* legacy: obj, showHidden, depth, colors*/
-function inspect(obj, opts) {
- // default options
- var ctx = {
- seen: [],
- stylize: stylizeNoColor
- };
- // legacy...
- if (arguments.length >= 3) ctx.depth = arguments[2];
- if (arguments.length >= 4) ctx.colors = arguments[3];
- if (isBoolean(opts)) {
- // legacy...
- ctx.showHidden = opts;
- } else if (opts) {
- // got an "options" object
- exports._extend(ctx, opts);
- }
- // set default options
- if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
- if (isUndefined(ctx.depth)) ctx.depth = 2;
- if (isUndefined(ctx.colors)) ctx.colors = false;
- if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
- if (ctx.colors) ctx.stylize = stylizeWithColor;
- return formatValue(ctx, obj, ctx.depth);
-}
-exports.inspect = inspect;
-
-
-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
-inspect.colors = {
- 'bold' : [1, 22],
- 'italic' : [3, 23],
- 'underline' : [4, 24],
- 'inverse' : [7, 27],
- 'white' : [37, 39],
- 'grey' : [90, 39],
- 'black' : [30, 39],
- 'blue' : [34, 39],
- 'cyan' : [36, 39],
- 'green' : [32, 39],
- 'magenta' : [35, 39],
- 'red' : [31, 39],
- 'yellow' : [33, 39]
-};
-
-// Don't use 'blue' not visible on cmd.exe
-inspect.styles = {
- 'special': 'cyan',
- 'number': 'yellow',
- 'boolean': 'yellow',
- 'undefined': 'grey',
- 'null': 'bold',
- 'string': 'green',
- 'date': 'magenta',
- // "name": intentionally not styling
- 'regexp': 'red'
-};
-
-
-function stylizeWithColor(str, styleType) {
- var style = inspect.styles[styleType];
-
- if (style) {
- return '\u001b[' + inspect.colors[style][0] + 'm' + str +
- '\u001b[' + inspect.colors[style][1] + 'm';
- } else {
- return str;
- }
-}
-
-
-function stylizeNoColor(str, styleType) {
- return str;
-}
-
-
-function arrayToHash(array) {
- var hash = {};
-
- array.forEach(function(val, idx) {
- hash[val] = true;
- });
-
- return hash;
-}
-
-
-function formatValue(ctx, value, recurseTimes) {
- // Provide a hook for user-specified inspect functions.
- // Check that value is an object with an inspect function on it
- if (ctx.customInspect &&
- value &&
- isFunction(value.inspect) &&
- // Filter out the util module, it's inspect function is special
- value.inspect !== exports.inspect &&
- // Also filter out any prototype objects using the circular check.
- !(value.constructor && value.constructor.prototype === value)) {
- var ret = value.inspect(recurseTimes, ctx);
- if (!isString(ret)) {
- ret = formatValue(ctx, ret, recurseTimes);
- }
- return ret;
- }
-
- // Primitive types cannot have properties
- var primitive = formatPrimitive(ctx, value);
- if (primitive) {
- return primitive;
- }
-
- // Look up the keys of the object.
- var keys = Object.keys(value);
- var visibleKeys = arrayToHash(keys);
-
- if (ctx.showHidden) {
- keys = Object.getOwnPropertyNames(value);
- }
-
- // IE doesn't make error fields non-enumerable
- // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
- if (isError(value)
- && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
- return formatError(value);
- }
-
- // Some type of object without properties can be shortcutted.
- if (keys.length === 0) {
- if (isFunction(value)) {
- var name = value.name ? ': ' + value.name : '';
- return ctx.stylize('[Function' + name + ']', 'special');
- }
- if (isRegExp(value)) {
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
- }
- if (isDate(value)) {
- return ctx.stylize(Date.prototype.toString.call(value), 'date');
- }
- if (isError(value)) {
- return formatError(value);
- }
- }
-
- var base = '', array = false, braces = ['{', '}'];
-
- // Make Array say that they are Array
- if (isArray(value)) {
- array = true;
- braces = ['[', ']'];
- }
-
- // Make functions say that they are functions
- if (isFunction(value)) {
- var n = value.name ? ': ' + value.name : '';
- base = ' [Function' + n + ']';
- }
-
- // Make RegExps say that they are RegExps
- if (isRegExp(value)) {
- base = ' ' + RegExp.prototype.toString.call(value);
- }
-
- // Make dates with properties first say the date
- if (isDate(value)) {
- base = ' ' + Date.prototype.toUTCString.call(value);
- }
-
- // Make error with message first say the error
- if (isError(value)) {
- base = ' ' + formatError(value);
- }
-
- if (keys.length === 0 && (!array || value.length == 0)) {
- return braces[0] + base + braces[1];
- }
-
- if (recurseTimes < 0) {
- if (isRegExp(value)) {
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
- } else {
- return ctx.stylize('[Object]', 'special');
- }
- }
-
- ctx.seen.push(value);
-
- var output;
- if (array) {
- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
- } else {
- output = keys.map(function(key) {
- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
- });
- }
-
- ctx.seen.pop();
-
- return reduceToSingleString(output, base, braces);
-}
-
-
-function formatPrimitive(ctx, value) {
- if (isUndefined(value))
- return ctx.stylize('undefined', 'undefined');
- if (isString(value)) {
- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
- .replace(/'/g, "\\'")
- .replace(/\\"/g, '"') + '\'';
- return ctx.stylize(simple, 'string');
- }
- if (isNumber(value))
- return ctx.stylize('' + value, 'number');
- if (isBoolean(value))
- return ctx.stylize('' + value, 'boolean');
- // For some reason typeof null is "object", so special case here.
- if (isNull(value))
- return ctx.stylize('null', 'null');
-}
-
-
-function formatError(value) {
- return '[' + Error.prototype.toString.call(value) + ']';
-}
-
-
-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
- var output = [];
- for (var i = 0, l = value.length; i < l; ++i) {
- if (hasOwnProperty(value, String(i))) {
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
- String(i), true));
- } else {
- output.push('');
- }
- }
- keys.forEach(function(key) {
- if (!key.match(/^\d+$/)) {
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
- key, true));
- }
- });
- return output;
-}
-
-
-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
- var name, str, desc;
- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
- if (desc.get) {
- if (desc.set) {
- str = ctx.stylize('[Getter/Setter]', 'special');
- } else {
- str = ctx.stylize('[Getter]', 'special');
- }
- } else {
- if (desc.set) {
- str = ctx.stylize('[Setter]', 'special');
- }
- }
- if (!hasOwnProperty(visibleKeys, key)) {
- name = '[' + key + ']';
- }
- if (!str) {
- if (ctx.seen.indexOf(desc.value) < 0) {
- if (isNull(recurseTimes)) {
- str = formatValue(ctx, desc.value, null);
- } else {
- str = formatValue(ctx, desc.value, recurseTimes - 1);
- }
- if (str.indexOf('\n') > -1) {
- if (array) {
- str = str.split('\n').map(function(line) {
- return ' ' + line;
- }).join('\n').substr(2);
- } else {
- str = '\n' + str.split('\n').map(function(line) {
- return ' ' + line;
- }).join('\n');
- }
- }
- } else {
- str = ctx.stylize('[Circular]', 'special');
- }
- }
- if (isUndefined(name)) {
- if (array && key.match(/^\d+$/)) {
- return str;
- }
- name = JSON.stringify('' + key);
- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
- name = name.substr(1, name.length - 2);
- name = ctx.stylize(name, 'name');
- } else {
- name = name.replace(/'/g, "\\'")
- .replace(/\\"/g, '"')
- .replace(/(^"|"$)/g, "'");
- name = ctx.stylize(name, 'string');
- }
- }
-
- return name + ': ' + str;
-}
-
-
-function reduceToSingleString(output, base, braces) {
- var numLinesEst = 0;
- var length = output.reduce(function(prev, cur) {
- numLinesEst++;
- if (cur.indexOf('\n') >= 0) numLinesEst++;
- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
- }, 0);
-
- if (length > 60) {
- return braces[0] +
- (base === '' ? '' : base + '\n ') +
- ' ' +
- output.join(',\n ') +
- ' ' +
- braces[1];
- }
-
- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
-}
-
-
-// NOTE: These type checking functions intentionally don't use `instanceof`
-// because it is fragile and can be easily faked with `Object.create()`.
-function isArray(ar) {
- return Array.isArray(ar);
-}
-exports.isArray = isArray;
-
-function isBoolean(arg) {
- return typeof arg === 'boolean';
-}
-exports.isBoolean = isBoolean;
-
-function isNull(arg) {
- return arg === null;
-}
-exports.isNull = isNull;
-
-function isNullOrUndefined(arg) {
- return arg == null;
-}
-exports.isNullOrUndefined = isNullOrUndefined;
-
-function isNumber(arg) {
- return typeof arg === 'number';
-}
-exports.isNumber = isNumber;
-
-function isString(arg) {
- return typeof arg === 'string';
-}
-exports.isString = isString;
-
-function isSymbol(arg) {
- return typeof arg === 'symbol';
-}
-exports.isSymbol = isSymbol;
-
-function isUndefined(arg) {
- return arg === void 0;
-}
-exports.isUndefined = isUndefined;
-
-function isRegExp(re) {
- return isObject(re) && objectToString(re) === '[object RegExp]';
-}
-exports.isRegExp = isRegExp;
-
-function isObject(arg) {
- return typeof arg === 'object' && arg !== null;
-}
-exports.isObject = isObject;
-
-function isDate(d) {
- return isObject(d) && objectToString(d) === '[object Date]';
-}
-exports.isDate = isDate;
-
-function isError(e) {
- return isObject(e) &&
- (objectToString(e) === '[object Error]' || e instanceof Error);
-}
-exports.isError = isError;
-
-function isFunction(arg) {
- return typeof arg === 'function';
-}
-exports.isFunction = isFunction;
-
-function isPrimitive(arg) {
- return arg === null ||
- typeof arg === 'boolean' ||
- typeof arg === 'number' ||
- typeof arg === 'string' ||
- typeof arg === 'symbol' || // ES6 symbol
- typeof arg === 'undefined';
-}
-exports.isPrimitive = isPrimitive;
-
-exports.isBuffer = _dereq_('./support/isBuffer');
-
-function objectToString(o) {
- return Object.prototype.toString.call(o);
-}
-
-
-function pad(n) {
- return n < 10 ? '0' + n.toString(10) : n.toString(10);
-}
-
-
-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
- 'Oct', 'Nov', 'Dec'];
-
-// 26 Feb 16:19:34
-function timestamp() {
- var d = new Date();
- var time = [pad(d.getHours()),
- pad(d.getMinutes()),
- pad(d.getSeconds())].join(':');
- return [d.getDate(), months[d.getMonth()], time].join(' ');
-}
-
-
-// log is just a thin wrapper to console.log that prepends a timestamp
-exports.log = function() {
- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
-};
-
-
-/**
- * Inherit the prototype methods from one constructor into another.
- *
- * The Function.prototype.inherits from lang.js rewritten as a standalone
- * function (not on Function.prototype). NOTE: If this file is to be loaded
- * during bootstrapping this function needs to be rewritten using some native
- * functions as prototype setup using normal JavaScript does not work as
- * expected during bootstrapping (see mirror.js in r114903).
- *
- * @param {function} ctor Constructor function which needs to inherit the
- * prototype.
- * @param {function} superCtor Constructor function to inherit prototype from.
- */
-exports.inherits = _dereq_('inherits');
-
-exports._extend = function(origin, add) {
- // Don't do anything if add isn't an object
- if (!add || !isObject(add)) return origin;
-
- var keys = Object.keys(add);
- var i = keys.length;
- while (i--) {
- origin[keys[i]] = add[keys[i]];
- }
- return origin;
-};
-
-function hasOwnProperty(obj, prop) {
- return Object.prototype.hasOwnProperty.call(obj, prop);
-}
-
-}).call(this,_dereq_('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./support/isBuffer":4,"_process":3,"inherits":2}],6:[function(_dereq_,module,exports){
-// A recursive descent parser operates by defining functions for all
-// syntactic elements, and recursively calling those, each function
-// advancing the input stream and returning an AST node. Precedence
-// of constructs (for example, the fact that `!x[1]` means `!(x[1])`
-// instead of `(!x)[1]` is handled by the fact that the parser
-// function that parses unary prefix operators is called first, and
-// in turn calls the function that parses `[]` subscripts — that
-// way, it'll receive the node for `x[1]` already parsed, and wraps
-// *that* in the unary operator node.
-//
-// Acorn uses an [operator precedence parser][opp] to handle binary
-// operator precedence, because it is much more compact than using
-// the technique outlined above, which uses different, nesting
-// functions to specify precedence, for all of the ten binary
-// precedence levels that JavaScript defines.
-//
-// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser
-
-"use strict";
-
-var tt = _dereq_("./tokentype").types;
-
-var Parser = _dereq_("./state").Parser;
-
-var reservedWords = _dereq_("./identifier").reservedWords;
-
-var has = _dereq_("./util").has;
-
-var pp = Parser.prototype;
-
-// Check if property name clashes with already added.
-// Object/class getters and setters are not allowed to clash —
-// either with each other or with an init property — and in
-// strict mode, init properties are also not allowed to be repeated.
-
-pp.checkPropClash = function (prop, propHash) {
- if (this.options.ecmaVersion >= 6) return;
- var key = prop.key,
- name = undefined;
- switch (key.type) {
- case "Identifier":
- name = key.name;break;
- case "Literal":
- name = String(key.value);break;
- default:
- return;
- }
- var kind = prop.kind || "init",
- other = undefined;
- if (has(propHash, name)) {
- other = propHash[name];
- var isGetSet = kind !== "init";
- if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raise(key.start, "Redefinition of property");
- } else {
- other = propHash[name] = {
- init: false,
- get: false,
- set: false
- };
- }
- other[kind] = true;
-};
-
-// ### Expression parsing
-
-// These nest, from the most general expression type at the top to
-// 'atomic', nondivisible expression types at the bottom. Most of
-// the functions will simply let the function(s) below them parse,
-// and, *if* the syntactic construct they handle is present, wrap
-// the AST node that the inner parser gave them in another node.
-
-// Parse a full expression. The optional arguments are used to
-// forbid the `in` operator (in for loops initalization expressions)
-// and provide reference for storing '=' operator inside shorthand
-// property assignment in contexts where both object expression
-// and object pattern might appear (so it's possible to raise
-// delayed syntax error at correct position).
-
-pp.parseExpression = function (noIn, refShorthandDefaultPos) {
- var startPos = this.start,
- startLoc = this.startLoc;
- var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos);
- if (this.type === tt.comma) {
- var node = this.startNodeAt(startPos, startLoc);
- node.expressions = [expr];
- while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos));
- return this.finishNode(node, "SequenceExpression");
- }
- return expr;
-};
-
-// Parse an assignment expression. This includes applications of
-// operators like `+=`.
-
-pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) {
- if (this.type == tt._yield && this.inGenerator) return this.parseYield();
-
- var failOnShorthandAssign = undefined;
- if (!refShorthandDefaultPos) {
- refShorthandDefaultPos = { start: 0 };
- failOnShorthandAssign = true;
- } else {
- failOnShorthandAssign = false;
- }
- var startPos = this.start,
- startLoc = this.startLoc;
- if (this.type == tt.parenL || this.type == tt.name) this.potentialArrowAt = this.start;
- var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos);
- if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc);
- if (this.type.isAssign) {
- var node = this.startNodeAt(startPos, startLoc);
- node.operator = this.value;
- node.left = this.type === tt.eq ? this.toAssignable(left) : left;
- refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly
- this.checkLVal(left);
- this.next();
- node.right = this.parseMaybeAssign(noIn);
- return this.finishNode(node, "AssignmentExpression");
- } else if (failOnShorthandAssign && refShorthandDefaultPos.start) {
- this.unexpected(refShorthandDefaultPos.start);
- }
- return left;
-};
-
-// Parse a ternary conditional (`?:`) operator.
-
-pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos) {
- var startPos = this.start,
- startLoc = this.startLoc;
- var expr = this.parseExprOps(noIn, refShorthandDefaultPos);
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
- if (this.eat(tt.question)) {
- var node = this.startNodeAt(startPos, startLoc);
- node.test = expr;
- node.consequent = this.parseMaybeAssign();
- this.expect(tt.colon);
- node.alternate = this.parseMaybeAssign(noIn);
- return this.finishNode(node, "ConditionalExpression");
- }
- return expr;
-};
-
-// Start the precedence parser.
-
-pp.parseExprOps = function (noIn, refShorthandDefaultPos) {
- var startPos = this.start,
- startLoc = this.startLoc;
- var expr = this.parseMaybeUnary(refShorthandDefaultPos);
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
- return this.parseExprOp(expr, startPos, startLoc, -1, noIn);
-};
-
-// Parse binary operators with the operator precedence parsing
-// algorithm. `left` is the left-hand side of the operator.
-// `minPrec` provides context that allows the function to stop and
-// defer further parser to one of its callers when it encounters an
-// operator that has a lower precedence than the set it is parsing.
-
-pp.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) {
- var prec = this.type.binop;
- if (Array.isArray(leftStartPos)) {
- if (this.options.locations && noIn === undefined) {
- // shift arguments to left by one
- noIn = minPrec;
- minPrec = leftStartLoc;
- // flatten leftStartPos
- leftStartLoc = leftStartPos[1];
- leftStartPos = leftStartPos[0];
- }
- }
- if (prec != null && (!noIn || this.type !== tt._in)) {
- if (prec > minPrec) {
- var node = this.startNodeAt(leftStartPos, leftStartLoc);
- node.left = left;
- node.operator = this.value;
- var op = this.type;
- this.next();
- var startPos = this.start,
- startLoc = this.startLoc;
- node.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec, noIn);
- this.finishNode(node, op === tt.logicalOR || op === tt.logicalAND ? "LogicalExpression" : "BinaryExpression");
- return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn);
- }
- }
- return left;
-};
-
-// Parse unary operators, both prefix and postfix.
-
-pp.parseMaybeUnary = function (refShorthandDefaultPos) {
- if (this.type.prefix) {
- var node = this.startNode(),
- update = this.type === tt.incDec;
- node.operator = this.value;
- node.prefix = true;
- this.next();
- node.argument = this.parseMaybeUnary();
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start);
- if (update) this.checkLVal(node.argument);else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") this.raise(node.start, "Deleting local variable in strict mode");
- return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
- }
- var startPos = this.start,
- startLoc = this.startLoc;
- var expr = this.parseExprSubscripts(refShorthandDefaultPos);
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
- while (this.type.postfix && !this.canInsertSemicolon()) {
- var node = this.startNodeAt(startPos, startLoc);
- node.operator = this.value;
- node.prefix = false;
- node.argument = expr;
- this.checkLVal(expr);
- this.next();
- expr = this.finishNode(node, "UpdateExpression");
- }
- return expr;
-};
-
-// Parse call, dot, and `[]`-subscript expressions.
-
-pp.parseExprSubscripts = function (refShorthandDefaultPos) {
- var startPos = this.start,
- startLoc = this.startLoc;
- var expr = this.parseExprAtom(refShorthandDefaultPos);
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
- return this.parseSubscripts(expr, startPos, startLoc);
-};
-
-pp.parseSubscripts = function (base, startPos, startLoc, noCalls) {
- if (Array.isArray(startPos)) {
- if (this.options.locations && noCalls === undefined) {
- // shift arguments to left by one
- noCalls = startLoc;
- // flatten startPos
- startLoc = startPos[1];
- startPos = startPos[0];
- }
- }
- for (;;) {
- if (this.eat(tt.dot)) {
- var node = this.startNodeAt(startPos, startLoc);
- node.object = base;
- node.property = this.parseIdent(true);
- node.computed = false;
- base = this.finishNode(node, "MemberExpression");
- } else if (this.eat(tt.bracketL)) {
- var node = this.startNodeAt(startPos, startLoc);
- node.object = base;
- node.property = this.parseExpression();
- node.computed = true;
- this.expect(tt.bracketR);
- base = this.finishNode(node, "MemberExpression");
- } else if (!noCalls && this.eat(tt.parenL)) {
- var node = this.startNodeAt(startPos, startLoc);
- node.callee = base;
- node.arguments = this.parseExprList(tt.parenR, false);
- base = this.finishNode(node, "CallExpression");
- } else if (this.type === tt.backQuote) {
- var node = this.startNodeAt(startPos, startLoc);
- node.tag = base;
- node.quasi = this.parseTemplate();
- base = this.finishNode(node, "TaggedTemplateExpression");
- } else {
- return base;
- }
- }
-};
-
-// Parse an atomic expression — either a single token that is an
-// expression, an expression started by a keyword like `function` or
-// `new`, or an expression wrapped in punctuation like `()`, `[]`,
-// or `{}`.
-
-pp.parseExprAtom = function (refShorthandDefaultPos) {
- var node = undefined,
- canBeArrow = this.potentialArrowAt == this.start;
- switch (this.type) {
- case tt._this:
- case tt._super:
- var type = this.type === tt._this ? "ThisExpression" : "Super";
- node = this.startNode();
- this.next();
- return this.finishNode(node, type);
-
- case tt._yield:
- if (this.inGenerator) this.unexpected();
-
- case tt.name:
- var startPos = this.start,
- startLoc = this.startLoc;
- var id = this.parseIdent(this.type !== tt.name);
- if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id]);
- return id;
-
- case tt.regexp:
- var value = this.value;
- node = this.parseLiteral(value.value);
- node.regex = { pattern: value.pattern, flags: value.flags };
- return node;
-
- case tt.num:case tt.string:
- return this.parseLiteral(this.value);
-
- case tt._null:case tt._true:case tt._false:
- node = this.startNode();
- node.value = this.type === tt._null ? null : this.type === tt._true;
- node.raw = this.type.keyword;
- this.next();
- return this.finishNode(node, "Literal");
-
- case tt.parenL:
- return this.parseParenAndDistinguishExpression(canBeArrow);
-
- case tt.bracketL:
- node = this.startNode();
- this.next();
- // check whether this is array comprehension or regular array
- if (this.options.ecmaVersion >= 7 && this.type === tt._for) {
- return this.parseComprehension(node, false);
- }
- node.elements = this.parseExprList(tt.bracketR, true, true, refShorthandDefaultPos);
- return this.finishNode(node, "ArrayExpression");
-
- case tt.braceL:
- return this.parseObj(false, refShorthandDefaultPos);
-
- case tt._function:
- node = this.startNode();
- this.next();
- return this.parseFunction(node, false);
-
- case tt._class:
- return this.parseClass(this.startNode(), false);
-
- case tt._new:
- return this.parseNew();
-
- case tt.backQuote:
- return this.parseTemplate();
-
- default:
- this.unexpected();
- }
-};
-
-pp.parseLiteral = function (value) {
- var node = this.startNode();
- node.value = value;
- node.raw = this.input.slice(this.start, this.end);
- this.next();
- return this.finishNode(node, "Literal");
-};
-
-pp.parseParenExpression = function () {
- this.expect(tt.parenL);
- var val = this.parseExpression();
- this.expect(tt.parenR);
- return val;
-};
-
-pp.parseParenAndDistinguishExpression = function (canBeArrow) {
- var startPos = this.start,
- startLoc = this.startLoc,
- val = undefined;
- if (this.options.ecmaVersion >= 6) {
- this.next();
-
- if (this.options.ecmaVersion >= 7 && this.type === tt._for) {
- return this.parseComprehension(this.startNodeAt(startPos, startLoc), true);
- }
-
- var innerStartPos = this.start,
- innerStartLoc = this.startLoc;
- var exprList = [],
- first = true;
- var refShorthandDefaultPos = { start: 0 },
- spreadStart = undefined,
- innerParenStart = undefined;
- while (this.type !== tt.parenR) {
- first ? first = false : this.expect(tt.comma);
- if (this.type === tt.ellipsis) {
- spreadStart = this.start;
- exprList.push(this.parseParenItem(this.parseRest()));
- break;
- } else {
- if (this.type === tt.parenL && !innerParenStart) {
- innerParenStart = this.start;
- }
- exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem));
- }
- }
- var innerEndPos = this.start,
- innerEndLoc = this.startLoc;
- this.expect(tt.parenR);
-
- if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) {
- if (innerParenStart) this.unexpected(innerParenStart);
- return this.parseParenArrowList(startPos, startLoc, exprList);
- }
-
- if (!exprList.length) this.unexpected(this.lastTokStart);
- if (spreadStart) this.unexpected(spreadStart);
- if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start);
-
- if (exprList.length > 1) {
- val = this.startNodeAt(innerStartPos, innerStartLoc);
- val.expressions = exprList;
- this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
- } else {
- val = exprList[0];
- }
- } else {
- val = this.parseParenExpression();
- }
-
- if (this.options.preserveParens) {
- var par = this.startNodeAt(startPos, startLoc);
- par.expression = val;
- return this.finishNode(par, "ParenthesizedExpression");
- } else {
- return val;
- }
-};
-
-pp.parseParenItem = function (item) {
- return item;
-};
-
-pp.parseParenArrowList = function (startPos, startLoc, exprList) {
- return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList);
-};
-
-// New's precedence is slightly tricky. It must allow its argument
-// to be a `[]` or dot subscript expression, but not a call — at
-// least, not without wrapping it in parentheses. Thus, it uses the
-
-var empty = [];
-
-pp.parseNew = function () {
- var node = this.startNode();
- var meta = this.parseIdent(true);
- if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) {
- node.meta = meta;
- node.property = this.parseIdent(true);
- if (node.property.name !== "target") this.raise(node.property.start, "The only valid meta property for new is new.target");
- return this.finishNode(node, "MetaProperty");
- }
- var startPos = this.start,
- startLoc = this.startLoc;
- node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
- if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false);else node.arguments = empty;
- return this.finishNode(node, "NewExpression");
-};
-
-// Parse template expression.
-
-pp.parseTemplateElement = function () {
- var elem = this.startNode();
- elem.value = {
- raw: this.input.slice(this.start, this.end),
- cooked: this.value
- };
- this.next();
- elem.tail = this.type === tt.backQuote;
- return this.finishNode(elem, "TemplateElement");
-};
-
-pp.parseTemplate = function () {
- var node = this.startNode();
- this.next();
- node.expressions = [];
- var curElt = this.parseTemplateElement();
- node.quasis = [curElt];
- while (!curElt.tail) {
- this.expect(tt.dollarBraceL);
- node.expressions.push(this.parseExpression());
- this.expect(tt.braceR);
- node.quasis.push(curElt = this.parseTemplateElement());
- }
- this.next();
- return this.finishNode(node, "TemplateLiteral");
-};
-
-// Parse an object literal or binding pattern.
-
-pp.parseObj = function (isPattern, refShorthandDefaultPos) {
- var node = this.startNode(),
- first = true,
- propHash = {};
- node.properties = [];
- this.next();
- while (!this.eat(tt.braceR)) {
- if (!first) {
- this.expect(tt.comma);
- if (this.afterTrailingComma(tt.braceR)) break;
- } else first = false;
-
- var prop = this.startNode(),
- isGenerator = undefined,
- startPos = undefined,
- startLoc = undefined;
- if (this.options.ecmaVersion >= 6) {
- prop.method = false;
- prop.shorthand = false;
- if (isPattern || refShorthandDefaultPos) {
- startPos = this.start;
- startLoc = this.startLoc;
- }
- if (!isPattern) isGenerator = this.eat(tt.star);
- }
- this.parsePropertyName(prop);
- this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos);
- this.checkPropClash(prop, propHash);
- node.properties.push(this.finishNode(prop, "Property"));
- }
- return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
-};
-
-pp.parsePropertyValue = function (prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos) {
- if (this.eat(tt.colon)) {
- prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos);
- prop.kind = "init";
- } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) {
- if (isPattern) this.unexpected();
- prop.kind = "init";
- prop.method = true;
- prop.value = this.parseMethod(isGenerator);
- } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type != tt.comma && this.type != tt.braceR)) {
- if (isGenerator || isPattern) this.unexpected();
- prop.kind = prop.key.name;
- this.parsePropertyName(prop);
- prop.value = this.parseMethod(false);
- } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
- prop.kind = "init";
- if (isPattern) {
- if (this.isKeyword(prop.key.name) || this.strict && (reservedWords.strictBind(prop.key.name) || reservedWords.strict(prop.key.name)) || !this.options.allowReserved && this.isReservedWord(prop.key.name)) this.raise(prop.key.start, "Binding " + prop.key.name);
- prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);
- } else if (this.type === tt.eq && refShorthandDefaultPos) {
- if (!refShorthandDefaultPos.start) refShorthandDefaultPos.start = this.start;
- prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);
- } else {
- prop.value = prop.key;
- }
- prop.shorthand = true;
- } else this.unexpected();
-};
-
-pp.parsePropertyName = function (prop) {
- if (this.options.ecmaVersion >= 6) {
- if (this.eat(tt.bracketL)) {
- prop.computed = true;
- prop.key = this.parseMaybeAssign();
- this.expect(tt.bracketR);
- return prop.key;
- } else {
- prop.computed = false;
- }
- }
- return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true);
-};
-
-// Initialize empty function node.
-
-pp.initFunction = function (node) {
- node.id = null;
- if (this.options.ecmaVersion >= 6) {
- node.generator = false;
- node.expression = false;
- }
-};
-
-// Parse object or class method.
-
-pp.parseMethod = function (isGenerator) {
- var node = this.startNode();
- this.initFunction(node);
- this.expect(tt.parenL);
- node.params = this.parseBindingList(tt.parenR, false, false);
- var allowExpressionBody = undefined;
- if (this.options.ecmaVersion >= 6) {
- node.generator = isGenerator;
- allowExpressionBody = true;
- } else {
- allowExpressionBody = false;
- }
- this.parseFunctionBody(node, allowExpressionBody);
- return this.finishNode(node, "FunctionExpression");
-};
-
-// Parse arrow function expression with given parameters.
-
-pp.parseArrowExpression = function (node, params) {
- this.initFunction(node);
- node.params = this.toAssignableList(params, true);
- this.parseFunctionBody(node, true);
- return this.finishNode(node, "ArrowFunctionExpression");
-};
-
-// Parse function body and check parameters.
-
-pp.parseFunctionBody = function (node, allowExpression) {
- var isExpression = allowExpression && this.type !== tt.braceL;
-
- if (isExpression) {
- node.body = this.parseMaybeAssign();
- node.expression = true;
- } else {
- // Start a new scope with regard to labels and the `inFunction`
- // flag (restore them to their old value afterwards).
- var oldInFunc = this.inFunction,
- oldInGen = this.inGenerator,
- oldLabels = this.labels;
- this.inFunction = true;this.inGenerator = node.generator;this.labels = [];
- node.body = this.parseBlock(true);
- node.expression = false;
- this.inFunction = oldInFunc;this.inGenerator = oldInGen;this.labels = oldLabels;
- }
-
- // If this is a strict mode function, verify that argument names
- // are not repeated, and it does not try to bind the words `eval`
- // or `arguments`.
- if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) {
- var nameHash = {},
- oldStrict = this.strict;
- this.strict = true;
- if (node.id) this.checkLVal(node.id, true);
- for (var i = 0; i < node.params.length; i++) {
- this.checkLVal(node.params[i], true, nameHash);
- }this.strict = oldStrict;
- }
-};
-
-// Parses a comma-separated list of expressions, and returns them as
-// an array. `close` is the token type that ends the list, and
-// `allowEmpty` can be turned on to allow subsequent commas with
-// nothing in between them to be parsed as `null` (which is needed
-// for array literals).
-
-pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refShorthandDefaultPos) {
- var elts = [],
- first = true;
- while (!this.eat(close)) {
- if (!first) {
- this.expect(tt.comma);
- if (allowTrailingComma && this.afterTrailingComma(close)) break;
- } else first = false;
-
- if (allowEmpty && this.type === tt.comma) {
- elts.push(null);
- } else {
- if (this.type === tt.ellipsis) elts.push(this.parseSpread(refShorthandDefaultPos));else elts.push(this.parseMaybeAssign(false, refShorthandDefaultPos));
- }
- }
- return elts;
-};
-
-// Parse the next token as an identifier. If `liberal` is true (used
-// when parsing properties), it will also convert keywords into
-// identifiers.
-
-pp.parseIdent = function (liberal) {
- var node = this.startNode();
- if (liberal && this.options.allowReserved == "never") liberal = false;
- if (this.type === tt.name) {
- if (!liberal && (!this.options.allowReserved && this.isReservedWord(this.value) || this.strict && reservedWords.strict(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1))) this.raise(this.start, "The keyword '" + this.value + "' is reserved");
- node.name = this.value;
- } else if (liberal && this.type.keyword) {
- node.name = this.type.keyword;
- } else {
- this.unexpected();
- }
- this.next();
- return this.finishNode(node, "Identifier");
-};
-
-// Parses yield expression inside generator.
-
-pp.parseYield = function () {
- var node = this.startNode();
- this.next();
- if (this.type == tt.semi || this.canInsertSemicolon() || this.type != tt.star && !this.type.startsExpr) {
- node.delegate = false;
- node.argument = null;
- } else {
- node.delegate = this.eat(tt.star);
- node.argument = this.parseMaybeAssign();
- }
- return this.finishNode(node, "YieldExpression");
-};
-
-// Parses array and generator comprehensions.
-
-pp.parseComprehension = function (node, isGenerator) {
- node.blocks = [];
- while (this.type === tt._for) {
- var block = this.startNode();
- this.next();
- this.expect(tt.parenL);
- block.left = this.parseBindingAtom();
- this.checkLVal(block.left, true);
- this.expectContextual("of");
- block.right = this.parseExpression();
- this.expect(tt.parenR);
- node.blocks.push(this.finishNode(block, "ComprehensionBlock"));
- }
- node.filter = this.eat(tt._if) ? this.parseParenExpression() : null;
- node.body = this.parseExpression();
- this.expect(isGenerator ? tt.parenR : tt.bracketR);
- node.generator = isGenerator;
- return this.finishNode(node, "ComprehensionExpression");
-};
-
-},{"./identifier":7,"./state":13,"./tokentype":17,"./util":18}],7:[function(_dereq_,module,exports){
-
-
-// Test whether a given character code starts an identifier.
-
-"use strict";
-
-exports.isIdentifierStart = isIdentifierStart;
-
-// Test whether a given character is part of an identifier.
-
-exports.isIdentifierChar = isIdentifierChar;
-exports.__esModule = true;
-// This is a trick taken from Esprima. It turns out that, on
-// non-Chrome browsers, to check whether a string is in a set, a
-// predicate containing a big ugly `switch` statement is faster than
-// a regular expression, and on Chrome the two are about on par.
-// This function uses `eval` (non-lexical) to produce such a
-// predicate from a space-separated string of words.
-//
-// It starts by sorting the words by length.
-
-function makePredicate(words) {
- words = words.split(" ");
- var f = "",
- cats = [];
- out: for (var i = 0; i < words.length; ++i) {
- for (var j = 0; j < cats.length; ++j) {
- if (cats[j][0].length == words[i].length) {
- cats[j].push(words[i]);
- continue out;
- }
- }cats.push([words[i]]);
- }
- function compareTo(arr) {
- if (arr.length == 1) {
- return f += "return str === " + JSON.stringify(arr[0]) + ";";
- }f += "switch(str){";
- for (var i = 0; i < arr.length; ++i) {
- f += "case " + JSON.stringify(arr[i]) + ":";
- }f += "return true}return false;";
- }
-
- // When there are more than three length categories, an outer
- // switch first dispatches on the lengths, to save on comparisons.
-
- if (cats.length > 3) {
- cats.sort(function (a, b) {
- return b.length - a.length;
- });
- f += "switch(str.length){";
- for (var i = 0; i < cats.length; ++i) {
- var cat = cats[i];
- f += "case " + cat[0].length + ":";
- compareTo(cat);
- }
- f += "}"
-
- // Otherwise, simply generate a flat `switch` statement.
-
- ;
- } else {
- compareTo(words);
- }
- return new Function("str", f);
-}
-
-// Reserved word lists for various dialects of the language
-
-var reservedWords = {
- 3: makePredicate("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile"),
- 5: makePredicate("class enum extends super const export import"),
- 6: makePredicate("enum await"),
- strict: makePredicate("implements interface let package private protected public static yield"),
- strictBind: makePredicate("eval arguments")
-};
-
-exports.reservedWords = reservedWords;
-// And the keywords
-
-var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
-
-var keywords = {
- 5: makePredicate(ecma5AndLessKeywords),
- 6: makePredicate(ecma5AndLessKeywords + " let const class extends export import yield super")
-};
-
-exports.keywords = keywords;
-// ## Character categories
-
-// Big ugly regular expressions that match characters in the
-// whitespace, identifier, and identifier-start categories. These
-// are only applied when a character is found to actually have a
-// code point above 128.
-// Generated by `tools/generate-identifier-regex.js`.
-
-var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";
-var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_";
-
-var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
-var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
-
-nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
-
-// These are a run-length and offset encoded representation of the
-// >0xffff code points that are a valid part of identifiers. The
-// offset starts at 0x10000, and each pair of numbers represents an
-// offset to the next range, and then a size of the range. They were
-// generated by tools/generate-identifier-regex.js
-var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 17, 26, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 99, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 98, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 955, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 38, 17, 2, 24, 133, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 32, 4, 287, 47, 21, 1, 2, 0, 185, 46, 82, 47, 21, 0, 60, 42, 502, 63, 32, 0, 449, 56, 1288, 920, 104, 110, 2962, 1070, 13266, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 16481, 1, 3071, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 1340, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 16355, 541];
-var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 16, 9, 83, 11, 168, 11, 6, 9, 8, 2, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 112, 16, 16, 9, 82, 12, 9, 9, 535, 9, 20855, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 4305, 6, 792618, 239];
-
-// This has a complexity linear to the value of the code. The
-// assumption is that looking up astral identifier characters is
-// rare.
-function isInAstralSet(code, set) {
- var pos = 65536;
- for (var i = 0; i < set.length; i += 2) {
- pos += set[i];
- if (pos > code) {
- return false;
- }pos += set[i + 1];
- if (pos >= code) {
- return true;
- }
- }
-}
-function isIdentifierStart(code, astral) {
- if (code < 65) {
- return code === 36;
- }if (code < 91) {
- return true;
- }if (code < 97) {
- return code === 95;
- }if (code < 123) {
- return true;
- }if (code <= 65535) {
- return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code));
- }if (astral === false) {
- return false;
- }return isInAstralSet(code, astralIdentifierStartCodes);
-}
-
-function isIdentifierChar(code, astral) {
- if (code < 48) {
- return code === 36;
- }if (code < 58) {
- return true;
- }if (code < 65) {
- return false;
- }if (code < 91) {
- return true;
- }if (code < 97) {
- return code === 95;
- }if (code < 123) {
- return true;
- }if (code <= 65535) {
- return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code));
- }if (astral === false) {
- return false;
- }return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
-}
-
-},{}],8:[function(_dereq_,module,exports){
-"use strict";
-
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
-
-// The `getLineInfo` function is mostly useful when the
-// `locations` option is off (for performance reasons) and you
-// want to find the line/column position for a given character
-// offset. `input` should be the code string that the offset refers
-// into.
-
-exports.getLineInfo = getLineInfo;
-exports.__esModule = true;
-
-var Parser = _dereq_("./state").Parser;
-
-var lineBreakG = _dereq_("./whitespace").lineBreakG;
-
-var deprecate = _dereq_("util").deprecate;
-
-// These are used when `options.locations` is on, for the
-// `startLoc` and `endLoc` properties.
-
-var Position = exports.Position = (function () {
- function Position(line, col) {
- _classCallCheck(this, Position);
-
- this.line = line;
- this.column = col;
- }
-
- Position.prototype.offset = function offset(n) {
- return new Position(this.line, this.column + n);
- };
-
- return Position;
-})();
-
-var SourceLocation = exports.SourceLocation = function SourceLocation(p, start, end) {
- _classCallCheck(this, SourceLocation);
-
- this.start = start;
- this.end = end;
- if (p.sourceFile !== null) this.source = p.sourceFile;
-};
-
-function getLineInfo(input, offset) {
- for (var line = 1, cur = 0;;) {
- lineBreakG.lastIndex = cur;
- var match = lineBreakG.exec(input);
- if (match && match.index < offset) {
- ++line;
- cur = match.index + match[0].length;
- } else {
- return new Position(line, offset - cur);
- }
- }
-}
-
-var pp = Parser.prototype;
-
-// This function is used to raise exceptions on parse errors. It
-// takes an offset integer (into the current `input`) to indicate
-// the location of the error, attaches the position to the end
-// of the error message, and then raises a `SyntaxError` with that
-// message.
-
-pp.raise = function (pos, message) {
- var loc = getLineInfo(this.input, pos);
- message += " (" + loc.line + ":" + loc.column + ")";
- var err = new SyntaxError(message);
- err.pos = pos;err.loc = loc;err.raisedAt = this.pos;
- throw err;
-};
-
-pp.curPosition = function () {
- return new Position(this.curLine, this.pos - this.lineStart);
-};
-
-pp.markPosition = function () {
- return this.options.locations ? [this.start, this.startLoc] : this.start;
-};
-
-},{"./state":13,"./whitespace":19,"util":5}],9:[function(_dereq_,module,exports){
-"use strict";
-
-var tt = _dereq_("./tokentype").types;
-
-var Parser = _dereq_("./state").Parser;
-
-var reservedWords = _dereq_("./identifier").reservedWords;
-
-var has = _dereq_("./util").has;
-
-var pp = Parser.prototype;
-
-// Convert existing expression atom to assignable pattern
-// if possible.
-
-pp.toAssignable = function (node, isBinding) {
- if (this.options.ecmaVersion >= 6 && node) {
- switch (node.type) {
- case "Identifier":
- case "ObjectPattern":
- case "ArrayPattern":
- case "AssignmentPattern":
- break;
-
- case "ObjectExpression":
- node.type = "ObjectPattern";
- for (var i = 0; i < node.properties.length; i++) {
- var prop = node.properties[i];
- if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter");
- this.toAssignable(prop.value, isBinding);
- }
- break;
-
- case "ArrayExpression":
- node.type = "ArrayPattern";
- this.toAssignableList(node.elements, isBinding);
- break;
-
- case "AssignmentExpression":
- if (node.operator === "=") {
- node.type = "AssignmentPattern";
- } else {
- this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
- }
- break;
-
- case "ParenthesizedExpression":
- node.expression = this.toAssignable(node.expression, isBinding);
- break;
-
- case "MemberExpression":
- if (!isBinding) break;
-
- default:
- this.raise(node.start, "Assigning to rvalue");
- }
- }
- return node;
-};
-
-// Convert list of expression atoms to binding list.
-
-pp.toAssignableList = function (exprList, isBinding) {
- var end = exprList.length;
- if (end) {
- var last = exprList[end - 1];
- if (last && last.type == "RestElement") {
- --end;
- } else if (last && last.type == "SpreadElement") {
- last.type = "RestElement";
- var arg = last.argument;
- this.toAssignable(arg, isBinding);
- if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") this.unexpected(arg.start);
- --end;
- }
- }
- for (var i = 0; i < end; i++) {
- var elt = exprList[i];
- if (elt) this.toAssignable(elt, isBinding);
- }
- return exprList;
-};
-
-// Parses spread element.
-
-pp.parseSpread = function (refShorthandDefaultPos) {
- var node = this.startNode();
- this.next();
- node.argument = this.parseMaybeAssign(refShorthandDefaultPos);
- return this.finishNode(node, "SpreadElement");
-};
-
-pp.parseRest = function () {
- var node = this.startNode();
- this.next();
- node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected();
- return this.finishNode(node, "RestElement");
-};
-
-// Parses lvalue (assignable) atom.
-
-pp.parseBindingAtom = function () {
- if (this.options.ecmaVersion < 6) return this.parseIdent();
- switch (this.type) {
- case tt.name:
- return this.parseIdent();
-
- case tt.bracketL:
- var node = this.startNode();
- this.next();
- node.elements = this.parseBindingList(tt.bracketR, true, true);
- return this.finishNode(node, "ArrayPattern");
-
- case tt.braceL:
- return this.parseObj(true);
-
- default:
- this.unexpected();
- }
-};
-
-pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) {
- var elts = [],
- first = true;
- while (!this.eat(close)) {
- if (first) first = false;else this.expect(tt.comma);
- if (allowEmpty && this.type === tt.comma) {
- elts.push(null);
- } else if (allowTrailingComma && this.afterTrailingComma(close)) {
- break;
- } else if (this.type === tt.ellipsis) {
- var rest = this.parseRest();
- this.parseBindingListItem(rest);
- elts.push(rest);
- this.expect(close);
- break;
- } else {
- var elem = this.parseMaybeDefault(this.start, this.startLoc);
- this.parseBindingListItem(elem);
- elts.push(elem);
- }
- }
- return elts;
-};
-
-pp.parseBindingListItem = function (param) {
- return param;
-};
-
-// Parses assignment pattern around given atom if possible.
-
-pp.parseMaybeDefault = function (startPos, startLoc, left) {
- if (Array.isArray(startPos)) {
- if (this.options.locations && noCalls === undefined) {
- // shift arguments to left by one
- left = startLoc;
- // flatten startPos
- startLoc = startPos[1];
- startPos = startPos[0];
- }
- }
- left = left || this.parseBindingAtom();
- if (!this.eat(tt.eq)) return left;
- var node = this.startNodeAt(startPos, startLoc);
- node.operator = "=";
- node.left = left;
- node.right = this.parseMaybeAssign();
- return this.finishNode(node, "AssignmentPattern");
-};
-
-// Verify that a node is an lval — something that can be assigned
-// to.
-
-pp.checkLVal = function (expr, isBinding, checkClashes) {
- switch (expr.type) {
- case "Identifier":
- if (this.strict && (reservedWords.strictBind(expr.name) || reservedWords.strict(expr.name))) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode");
- if (checkClashes) {
- if (has(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash in strict mode");
- checkClashes[expr.name] = true;
- }
- break;
-
- case "MemberExpression":
- if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression");
- break;
-
- case "ObjectPattern":
- for (var i = 0; i < expr.properties.length; i++) {
- this.checkLVal(expr.properties[i].value, isBinding, checkClashes);
- }break;
-
- case "ArrayPattern":
- for (var i = 0; i < expr.elements.length; i++) {
- var elem = expr.elements[i];
- if (elem) this.checkLVal(elem, isBinding, checkClashes);
- }
- break;
-
- case "AssignmentPattern":
- this.checkLVal(expr.left, isBinding, checkClashes);
- break;
-
- case "RestElement":
- this.checkLVal(expr.argument, isBinding, checkClashes);
- break;
-
- case "ParenthesizedExpression":
- this.checkLVal(expr.expression, isBinding, checkClashes);
- break;
-
- default:
- this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue");
- }
-};
-
-},{"./identifier":7,"./state":13,"./tokentype":17,"./util":18}],10:[function(_dereq_,module,exports){
-"use strict";
-
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
-
-exports.__esModule = true;
-
-var Parser = _dereq_("./state").Parser;
-
-var SourceLocation = _dereq_("./location").SourceLocation;
-
-// Start an AST node, attaching a start offset.
-
-var pp = Parser.prototype;
-
-var Node = exports.Node = function Node() {
- _classCallCheck(this, Node);
-};
-
-pp.startNode = function () {
- var node = new Node();
- node.start = this.start;
- if (this.options.locations) node.loc = new SourceLocation(this, this.startLoc);
- if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile;
- if (this.options.ranges) node.range = [this.start, 0];
- return node;
-};
-
-pp.startNodeAt = function (pos, loc) {
- var node = new Node();
- if (Array.isArray(pos)) {
- if (this.options.locations && loc === undefined) {
- // flatten pos
- loc = pos[1];
- pos = pos[0];
- }
- }
- node.start = pos;
- if (this.options.locations) node.loc = new SourceLocation(this, loc);
- if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile;
- if (this.options.ranges) node.range = [pos, 0];
- return node;
-};
-
-// Finish an AST node, adding `type` and `end` properties.
-
-pp.finishNode = function (node, type) {
- node.type = type;
- node.end = this.lastTokEnd;
- if (this.options.locations) node.loc.end = this.lastTokEndLoc;
- if (this.options.ranges) node.range[1] = this.lastTokEnd;
- return node;
-};
-
-// Finish node at given position
-
-pp.finishNodeAt = function (node, type, pos, loc) {
- node.type = type;
- if (Array.isArray(pos)) {
- if (this.options.locations && loc === undefined) {
- // flatten pos
- loc = pos[1];
- pos = pos[0];
- }
- }
- node.end = pos;
- if (this.options.locations) node.loc.end = loc;
- if (this.options.ranges) node.range[1] = pos;
- return node;
-};
-
-},{"./location":8,"./state":13}],11:[function(_dereq_,module,exports){
-
-
-// Interpret and default an options object
-
-"use strict";
-
-exports.getOptions = getOptions;
-exports.__esModule = true;
-
-var _util = _dereq_("./util");
-
-var has = _util.has;
-var isArray = _util.isArray;
-
-var SourceLocation = _dereq_("./location").SourceLocation;
-
-// A second optional argument can be given to further configure
-// the parser process. These options are recognized:
-
-var defaultOptions = {
- // `ecmaVersion` indicates the ECMAScript version to parse. Must
- // be either 3, or 5, or 6. This influences support for strict
- // mode, the set of reserved words, support for getters and
- // setters and other features.
- ecmaVersion: 5,
- // Source type ("script" or "module") for different semantics
- sourceType: "script",
- // `onInsertedSemicolon` can be a callback that will be called
- // when a semicolon is automatically inserted. It will be passed
- // th position of the comma as an offset, and if `locations` is
- // enabled, it is given the location as a `{line, column}` object
- // as second argument.
- onInsertedSemicolon: null,
- // `onTrailingComma` is similar to `onInsertedSemicolon`, but for
- // trailing commas.
- onTrailingComma: null,
- // By default, reserved words are not enforced. Disable
- // `allowReserved` to enforce them. When this option has the
- // value "never", reserved words and keywords can also not be
- // used as property names.
- allowReserved: true,
- // When enabled, a return at the top level is not considered an
- // error.
- allowReturnOutsideFunction: false,
- // When enabled, import/export statements are not constrained to
- // appearing at the top of the program.
- allowImportExportEverywhere: false,
- // When enabled, hashbang directive in the beginning of file
- // is allowed and treated as a line comment.
- allowHashBang: false,
- // When `locations` is on, `loc` properties holding objects with
- // `start` and `end` properties in `{line, column}` form (with
- // line being 1-based and column 0-based) will be attached to the
- // nodes.
- locations: false,
- // A function can be passed as `onToken` option, which will
- // cause Acorn to call that function with object in the same
- // format as tokenize() returns. Note that you are not
- // allowed to call the parser from the callback—that will
- // corrupt its internal state.
- onToken: null,
- // A function can be passed as `onComment` option, which will
- // cause Acorn to call that function with `(block, text, start,
- // end)` parameters whenever a comment is skipped. `block` is a
- // boolean indicating whether this is a block (`/* */`) comment,
- // `text` is the content of the comment, and `start` and `end` are
- // character offsets that denote the start and end of the comment.
- // When the `locations` option is on, two more parameters are
- // passed, the full `{line, column}` locations of the start and
- // end of the comments. Note that you are not allowed to call the
- // parser from the callback—that will corrupt its internal state.
- onComment: null,
- // Nodes have their start and end characters offsets recorded in
- // `start` and `end` properties (directly on the node, rather than
- // the `loc` object, which holds line/column data. To also add a
- // [semi-standardized][range] `range` property holding a `[start,
- // end]` array with the same numbers, set the `ranges` option to
- // `true`.
- //
- // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
- ranges: false,
- // It is possible to parse multiple files into a single AST by
- // passing the tree produced by parsing the first file as
- // `program` option in subsequent parses. This will add the
- // toplevel forms of the parsed file to the `Program` (top) node
- // of an existing parse tree.
- program: null,
- // When `locations` is on, you can pass this to record the source
- // file in every node's `loc` object.
- sourceFile: null,
- // This value, if given, is stored in every node, whether
- // `locations` is on or off.
- directSourceFile: null,
- // When enabled, parenthesized expressions are represented by
- // (non-standard) ParenthesizedExpression nodes
- preserveParens: false,
- plugins: {}
-};exports.defaultOptions = defaultOptions;
-
-function getOptions(opts) {
- var options = {};
- for (var opt in defaultOptions) {
- options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt];
- }if (isArray(options.onToken)) {
- (function () {
- var tokens = options.onToken;
- options.onToken = function (token) {
- return tokens.push(token);
- };
- })();
- }
- if (isArray(options.onComment)) options.onComment = pushComment(options, options.onComment);
-
- return options;
-}
-
-function pushComment(options, array) {
- return function (block, text, start, end, startLoc, endLoc) {
- var comment = {
- type: block ? "Block" : "Line",
- value: text,
- start: start,
- end: end
- };
- if (options.locations) comment.loc = new SourceLocation(this, startLoc, endLoc);
- if (options.ranges) comment.range = [start, end];
- array.push(comment);
- };
-}
-
-},{"./location":8,"./util":18}],12:[function(_dereq_,module,exports){
-"use strict";
-
-var tt = _dereq_("./tokentype").types;
-
-var Parser = _dereq_("./state").Parser;
-
-var lineBreak = _dereq_("./whitespace").lineBreak;
-
-var pp = Parser.prototype;
-
-// ## Parser utilities
-
-// Test whether a statement node is the string literal `"use strict"`.
-
-pp.isUseStrict = function (stmt) {
- return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.value === "use strict";
-};
-
-// Predicate that tests whether the next token is of the given
-// type, and if yes, consumes it as a side effect.
-
-pp.eat = function (type) {
- if (this.type === type) {
- this.next();
- return true;
- } else {
- return false;
- }
-};
-
-// Tests whether parsed token is a contextual keyword.
-
-pp.isContextual = function (name) {
- return this.type === tt.name && this.value === name;
-};
-
-// Consumes contextual keyword if possible.
-
-pp.eatContextual = function (name) {
- return this.value === name && this.eat(tt.name);
-};
-
-// Asserts that following token is given contextual keyword.
-
-pp.expectContextual = function (name) {
- if (!this.eatContextual(name)) this.unexpected();
-};
-
-// Test whether a semicolon can be inserted at the current position.
-
-pp.canInsertSemicolon = function () {
- return this.type === tt.eof || this.type === tt.braceR || lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
-};
-
-pp.insertSemicolon = function () {
- if (this.canInsertSemicolon()) {
- if (this.options.onInsertedSemicolon) this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc);
- return true;
- }
-};
-
-// Consume a semicolon, or, failing that, see if we are allowed to
-// pretend that there is a semicolon at this position.
-
-pp.semicolon = function () {
- if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected();
-};
-
-pp.afterTrailingComma = function (tokType) {
- if (this.type == tokType) {
- if (this.options.onTrailingComma) this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc);
- this.next();
- return true;
- }
-};
-
-// Expect a token of a given type. If found, consume it, otherwise,
-// raise an unexpected token error.
-
-pp.expect = function (type) {
- this.eat(type) || this.unexpected();
-};
-
-// Raise an unexpected token error.
-
-pp.unexpected = function (pos) {
- this.raise(pos != null ? pos : this.start, "Unexpected token");
-};
-
-},{"./state":13,"./tokentype":17,"./whitespace":19}],13:[function(_dereq_,module,exports){
-"use strict";
-
-exports.Parser = Parser;
-exports.__esModule = true;
-
-var _identifier = _dereq_("./identifier");
-
-var reservedWords = _identifier.reservedWords;
-var keywords = _identifier.keywords;
-
-var tt = _dereq_("./tokentype").types;
-
-var lineBreak = _dereq_("./whitespace").lineBreak;
-
-function Parser(options, input, startPos) {
- this.options = options;
- this.sourceFile = this.options.sourceFile || null;
- this.isKeyword = keywords[this.options.ecmaVersion >= 6 ? 6 : 5];
- this.isReservedWord = reservedWords[this.options.ecmaVersion];
- this.input = input;
-
- // Load plugins
- this.loadPlugins(this.options.plugins);
-
- // Set up token state
-
- // The current position of the tokenizer in the input.
- if (startPos) {
- this.pos = startPos;
- this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos));
- this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;
- } else {
- this.pos = this.lineStart = 0;
- this.curLine = 1;
- }
-
- // Properties of the current token:
- // Its type
- this.type = tt.eof;
- // For tokens that include more information than their type, the value
- this.value = null;
- // Its start and end offset
- this.start = this.end = this.pos;
- // And, if locations are used, the {line, column} object
- // corresponding to those offsets
- this.startLoc = this.endLoc = null;
-
- // Position information for the previous token
- this.lastTokEndLoc = this.lastTokStartLoc = null;
- this.lastTokStart = this.lastTokEnd = this.pos;
-
- // The context stack is used to superficially track syntactic
- // context to predict whether a regular expression is allowed in a
- // given position.
- this.context = this.initialContext();
- this.exprAllowed = true;
-
- // Figure out if it's a module code.
- this.strict = this.inModule = this.options.sourceType === "module";
-
- // Used to signify the start of a potential arrow function
- this.potentialArrowAt = -1;
-
- // Flags to track whether we are in a function, a generator.
- this.inFunction = this.inGenerator = false;
- // Labels in scope.
- this.labels = [];
-
- // If enabled, skip leading hashbang line.
- if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2);
-}
-
-Parser.prototype.extend = function (name, f) {
- this[name] = f(this[name]);
-};
-
-// Registered plugins
-
-var plugins = {};
-
-exports.plugins = plugins;
-Parser.prototype.loadPlugins = function (plugins) {
- for (var _name in plugins) {
- var plugin = exports.plugins[_name];
- if (!plugin) throw new Error("Plugin '" + _name + "' not found");
- plugin(this, plugins[_name]);
- }
-};
-
-},{"./identifier":7,"./tokentype":17,"./whitespace":19}],14:[function(_dereq_,module,exports){
-"use strict";
-
-var tt = _dereq_("./tokentype").types;
-
-var Parser = _dereq_("./state").Parser;
-
-var lineBreak = _dereq_("./whitespace").lineBreak;
-
-var pp = Parser.prototype;
-
-// ### Statement parsing
-
-// Parse a program. Initializes the parser, reads any number of
-// statements, and wraps them in a Program node. Optionally takes a
-// `program` argument. If present, the statements will be appended
-// to its body instead of creating a new node.
-
-pp.parseTopLevel = function (node) {
- var first = true;
- if (!node.body) node.body = [];
- while (this.type !== tt.eof) {
- var stmt = this.parseStatement(true, true);
- node.body.push(stmt);
- if (first && this.isUseStrict(stmt)) this.setStrict(true);
- first = false;
- }
- this.next();
- if (this.options.ecmaVersion >= 6) {
- node.sourceType = this.options.sourceType;
- }
- return this.finishNode(node, "Program");
-};
-
-var loopLabel = { kind: "loop" },
- switchLabel = { kind: "switch" };
-
-// Parse a single statement.
-//
-// If expecting a statement and finding a slash operator, parse a
-// regular expression literal. This is to handle cases like
-// `if (foo) /blah/.exec(foo)`, where looking at the previous token
-// does not help.
-
-pp.parseStatement = function (declaration, topLevel) {
- var starttype = this.type,
- node = this.startNode();
-
- // Most types of statements are recognized by the keyword they
- // start with. Many are trivial to parse, some require a bit of
- // complexity.
-
- switch (starttype) {
- case tt._break:case tt._continue:
- return this.parseBreakContinueStatement(node, starttype.keyword);
- case tt._debugger:
- return this.parseDebuggerStatement(node);
- case tt._do:
- return this.parseDoStatement(node);
- case tt._for:
- return this.parseForStatement(node);
- case tt._function:
- if (!declaration && this.options.ecmaVersion >= 6) this.unexpected();
- return this.parseFunctionStatement(node);
- case tt._class:
- if (!declaration) this.unexpected();
- return this.parseClass(node, true);
- case tt._if:
- return this.parseIfStatement(node);
- case tt._return:
- return this.parseReturnStatement(node);
- case tt._switch:
- return this.parseSwitchStatement(node);
- case tt._throw:
- return this.parseThrowStatement(node);
- case tt._try:
- return this.parseTryStatement(node);
- case tt._let:case tt._const:
- if (!declaration) this.unexpected(); // NOTE: falls through to _var
- case tt._var:
- return this.parseVarStatement(node, starttype);
- case tt._while:
- return this.parseWhileStatement(node);
- case tt._with:
- return this.parseWithStatement(node);
- case tt.braceL:
- return this.parseBlock();
- case tt.semi:
- return this.parseEmptyStatement(node);
- case tt._export:
- case tt._import:
- if (!this.options.allowImportExportEverywhere) {
- if (!topLevel) this.raise(this.start, "'import' and 'export' may only appear at the top level");
- if (!this.inModule) this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
- }
- return starttype === tt._import ? this.parseImport(node) : this.parseExport(node);
-
- // If the statement does not start with a statement keyword or a
- // brace, it's an ExpressionStatement or LabeledStatement. We
- // simply start parsing an expression, and afterwards, if the
- // next token is a colon and the expression was a simple
- // Identifier node, we switch to interpreting it as a label.
- default:
- var maybeName = this.value,
- expr = this.parseExpression();
- if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) return this.parseLabeledStatement(node, maybeName, expr);else return this.parseExpressionStatement(node, expr);
- }
-};
-
-pp.parseBreakContinueStatement = function (node, keyword) {
- var isBreak = keyword == "break";
- this.next();
- if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null;else if (this.type !== tt.name) this.unexpected();else {
- node.label = this.parseIdent();
- this.semicolon();
- }
-
- // Verify that there is an actual destination to break or
- // continue to.
- for (var i = 0; i < this.labels.length; ++i) {
- var lab = this.labels[i];
- if (node.label == null || lab.name === node.label.name) {
- if (lab.kind != null && (isBreak || lab.kind === "loop")) break;
- if (node.label && isBreak) break;
- }
- }
- if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword);
- return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
-};
-
-pp.parseDebuggerStatement = function (node) {
- this.next();
- this.semicolon();
- return this.finishNode(node, "DebuggerStatement");
-};
-
-pp.parseDoStatement = function (node) {
- this.next();
- this.labels.push(loopLabel);
- node.body = this.parseStatement(false);
- this.labels.pop();
- this.expect(tt._while);
- node.test = this.parseParenExpression();
- if (this.options.ecmaVersion >= 6) this.eat(tt.semi);else this.semicolon();
- return this.finishNode(node, "DoWhileStatement");
-};
-
-// Disambiguating between a `for` and a `for`/`in` or `for`/`of`
-// loop is non-trivial. Basically, we have to parse the init `var`
-// statement or expression, disallowing the `in` operator (see
-// the second parameter to `parseExpression`), and then check
-// whether the next token is `in` or `of`. When there is no init
-// part (semicolon immediately after the opening parenthesis), it
-// is a regular `for` loop.
-
-pp.parseForStatement = function (node) {
- this.next();
- this.labels.push(loopLabel);
- this.expect(tt.parenL);
- if (this.type === tt.semi) return this.parseFor(node, null);
- if (this.type === tt._var || this.type === tt._let || this.type === tt._const) {
- var _init = this.startNode(),
- varKind = this.type;
- this.next();
- this.parseVar(_init, true, varKind);
- this.finishNode(_init, "VariableDeclaration");
- if ((this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(varKind !== tt._var && _init.declarations[0].init)) return this.parseForIn(node, _init);
- return this.parseFor(node, _init);
- }
- var refShorthandDefaultPos = { start: 0 };
- var init = this.parseExpression(true, refShorthandDefaultPos);
- if (this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) {
- this.toAssignable(init);
- this.checkLVal(init);
- return this.parseForIn(node, init);
- } else if (refShorthandDefaultPos.start) {
- this.unexpected(refShorthandDefaultPos.start);
- }
- return this.parseFor(node, init);
-};
-
-pp.parseFunctionStatement = function (node) {
- this.next();
- return this.parseFunction(node, true);
-};
-
-pp.parseIfStatement = function (node) {
- this.next();
- node.test = this.parseParenExpression();
- node.consequent = this.parseStatement(false);
- node.alternate = this.eat(tt._else) ? this.parseStatement(false) : null;
- return this.finishNode(node, "IfStatement");
-};
-
-pp.parseReturnStatement = function (node) {
- if (!this.inFunction && !this.options.allowReturnOutsideFunction) this.raise(this.start, "'return' outside of function");
- this.next();
-
- // In `return` (and `break`/`continue`), the keywords with
- // optional arguments, we eagerly look for a semicolon or the
- // possibility to insert one.
-
- if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null;else {
- node.argument = this.parseExpression();this.semicolon();
- }
- return this.finishNode(node, "ReturnStatement");
-};
-
-pp.parseSwitchStatement = function (node) {
- this.next();
- node.discriminant = this.parseParenExpression();
- node.cases = [];
- this.expect(tt.braceL);
- this.labels.push(switchLabel);
-
- // Statements under must be grouped (by label) in SwitchCase
- // nodes. `cur` is used to keep the node that we are currently
- // adding statements to.
-
- for (var cur, sawDefault; this.type != tt.braceR;) {
- if (this.type === tt._case || this.type === tt._default) {
- var isCase = this.type === tt._case;
- if (cur) this.finishNode(cur, "SwitchCase");
- node.cases.push(cur = this.startNode());
- cur.consequent = [];
- this.next();
- if (isCase) {
- cur.test = this.parseExpression();
- } else {
- if (sawDefault) this.raise(this.lastTokStart, "Multiple default clauses");
- sawDefault = true;
- cur.test = null;
- }
- this.expect(tt.colon);
- } else {
- if (!cur) this.unexpected();
- cur.consequent.push(this.parseStatement(true));
- }
- }
- if (cur) this.finishNode(cur, "SwitchCase");
- this.next(); // Closing brace
- this.labels.pop();
- return this.finishNode(node, "SwitchStatement");
-};
-
-pp.parseThrowStatement = function (node) {
- this.next();
- if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) this.raise(this.lastTokEnd, "Illegal newline after throw");
- node.argument = this.parseExpression();
- this.semicolon();
- return this.finishNode(node, "ThrowStatement");
-};
-
-// Reused empty array added for node fields that are always empty.
-
-var empty = [];
-
-pp.parseTryStatement = function (node) {
- this.next();
- node.block = this.parseBlock();
- node.handler = null;
- if (this.type === tt._catch) {
- var clause = this.startNode();
- this.next();
- this.expect(tt.parenL);
- clause.param = this.parseBindingAtom();
- this.checkLVal(clause.param, true);
- this.expect(tt.parenR);
- clause.guard = null;
- clause.body = this.parseBlock();
- node.handler = this.finishNode(clause, "CatchClause");
- }
- node.guardedHandlers = empty;
- node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null;
- if (!node.handler && !node.finalizer) this.raise(node.start, "Missing catch or finally clause");
- return this.finishNode(node, "TryStatement");
-};
-
-pp.parseVarStatement = function (node, kind) {
- this.next();
- this.parseVar(node, false, kind);
- this.semicolon();
- return this.finishNode(node, "VariableDeclaration");
-};
-
-pp.parseWhileStatement = function (node) {
- this.next();
- node.test = this.parseParenExpression();
- this.labels.push(loopLabel);
- node.body = this.parseStatement(false);
- this.labels.pop();
- return this.finishNode(node, "WhileStatement");
-};
-
-pp.parseWithStatement = function (node) {
- if (this.strict) this.raise(this.start, "'with' in strict mode");
- this.next();
- node.object = this.parseParenExpression();
- node.body = this.parseStatement(false);
- return this.finishNode(node, "WithStatement");
-};
-
-pp.parseEmptyStatement = function (node) {
- this.next();
- return this.finishNode(node, "EmptyStatement");
-};
-
-pp.parseLabeledStatement = function (node, maybeName, expr) {
- for (var i = 0; i < this.labels.length; ++i) {
- if (this.labels[i].name === maybeName) this.raise(expr.start, "Label '" + maybeName + "' is already declared");
- }var kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null;
- this.labels.push({ name: maybeName, kind: kind });
- node.body = this.parseStatement(true);
- this.labels.pop();
- node.label = expr;
- return this.finishNode(node, "LabeledStatement");
-};
-
-pp.parseExpressionStatement = function (node, expr) {
- node.expression = expr;
- this.semicolon();
- return this.finishNode(node, "ExpressionStatement");
-};
-
-// Parse a semicolon-enclosed block of statements, handling `"use
-// strict"` declarations when `allowStrict` is true (used for
-// function bodies).
-
-pp.parseBlock = function (allowStrict) {
- var node = this.startNode(),
- first = true,
- oldStrict = undefined;
- node.body = [];
- this.expect(tt.braceL);
- while (!this.eat(tt.braceR)) {
- var stmt = this.parseStatement(true);
- node.body.push(stmt);
- if (first && allowStrict && this.isUseStrict(stmt)) {
- oldStrict = this.strict;
- this.setStrict(this.strict = true);
- }
- first = false;
- }
- if (oldStrict === false) this.setStrict(false);
- return this.finishNode(node, "BlockStatement");
-};
-
-// Parse a regular `for` loop. The disambiguation code in
-// `parseStatement` will already have parsed the init statement or
-// expression.
-
-pp.parseFor = function (node, init) {
- node.init = init;
- this.expect(tt.semi);
- node.test = this.type === tt.semi ? null : this.parseExpression();
- this.expect(tt.semi);
- node.update = this.type === tt.parenR ? null : this.parseExpression();
- this.expect(tt.parenR);
- node.body = this.parseStatement(false);
- this.labels.pop();
- return this.finishNode(node, "ForStatement");
-};
-
-// Parse a `for`/`in` and `for`/`of` loop, which are almost
-// same from parser's perspective.
-
-pp.parseForIn = function (node, init) {
- var type = this.type === tt._in ? "ForInStatement" : "ForOfStatement";
- this.next();
- node.left = init;
- node.right = this.parseExpression();
- this.expect(tt.parenR);
- node.body = this.parseStatement(false);
- this.labels.pop();
- return this.finishNode(node, type);
-};
-
-// Parse a list of variable declarations.
-
-pp.parseVar = function (node, isFor, kind) {
- node.declarations = [];
- node.kind = kind.keyword;
- for (;;) {
- var decl = this.startNode();
- this.parseVarId(decl);
- if (this.eat(tt.eq)) {
- decl.init = this.parseMaybeAssign(isFor);
- } else if (kind === tt._const && !(this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
- this.unexpected();
- } else if (decl.id.type != "Identifier" && !(isFor && (this.type === tt._in || this.isContextual("of")))) {
- this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value");
- } else {
- decl.init = null;
- }
- node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
- if (!this.eat(tt.comma)) break;
- }
- return node;
-};
-
-pp.parseVarId = function (decl) {
- decl.id = this.parseBindingAtom();
- this.checkLVal(decl.id, true);
-};
-
-// Parse a function declaration or literal (depending on the
-// `isStatement` parameter).
-
-pp.parseFunction = function (node, isStatement, allowExpressionBody) {
- this.initFunction(node);
- if (this.options.ecmaVersion >= 6) node.generator = this.eat(tt.star);
- if (isStatement || this.type === tt.name) node.id = this.parseIdent();
- this.parseFunctionParams(node);
- this.parseFunctionBody(node, allowExpressionBody);
- return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
-};
-
-pp.parseFunctionParams = function (node) {
- this.expect(tt.parenL);
- node.params = this.parseBindingList(tt.parenR, false, false);
-};
-
-// Parse a class declaration or literal (depending on the
-// `isStatement` parameter).
-
-pp.parseClass = function (node, isStatement) {
- this.next();
- this.parseClassId(node, isStatement);
- this.parseClassSuper(node);
- var classBody = this.startNode();
- var hadConstructor = false;
- classBody.body = [];
- this.expect(tt.braceL);
- while (!this.eat(tt.braceR)) {
- if (this.eat(tt.semi)) continue;
- var method = this.startNode();
- var isGenerator = this.eat(tt.star);
- var isMaybeStatic = this.type === tt.name && this.value === "static";
- this.parsePropertyName(method);
- method["static"] = isMaybeStatic && this.type !== tt.parenL;
- if (method["static"]) {
- if (isGenerator) this.unexpected();
- isGenerator = this.eat(tt.star);
- this.parsePropertyName(method);
- }
- method.kind = "method";
- if (!method.computed) {
- var key = method.key;
-
- var isGetSet = false;
- if (!isGenerator && key.type === "Identifier" && this.type !== tt.parenL && (key.name === "get" || key.name === "set")) {
- isGetSet = true;
- method.kind = key.name;
- key = this.parsePropertyName(method);
- }
- if (!method["static"] && (key.type === "Identifier" && key.name === "constructor" || key.type === "Literal" && key.value === "constructor")) {
- if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class");
- if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier");
- if (isGenerator) this.raise(key.start, "Constructor can't be a generator");
- method.kind = "constructor";
- hadConstructor = true;
- }
- }
- this.parseClassMethod(classBody, method, isGenerator);
- }
- node.body = this.finishNode(classBody, "ClassBody");
- return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
-};
-
-pp.parseClassMethod = function (classBody, method, isGenerator) {
- method.value = this.parseMethod(isGenerator);
- classBody.body.push(this.finishNode(method, "MethodDefinition"));
-};
-
-pp.parseClassId = function (node, isStatement) {
- node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null;
-};
-
-pp.parseClassSuper = function (node) {
- node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null;
-};
-
-// Parses module export declaration.
-
-pp.parseExport = function (node) {
- this.next();
- // export * from '...'
- if (this.eat(tt.star)) {
- this.expectContextual("from");
- node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected();
- this.semicolon();
- return this.finishNode(node, "ExportAllDeclaration");
- }
- if (this.eat(tt._default)) {
- // export default ...
- var expr = this.parseMaybeAssign();
- var needsSemi = true;
- if (expr.type == "FunctionExpression" || expr.type == "ClassExpression") {
- needsSemi = false;
- if (expr.id) {
- expr.type = expr.type == "FunctionExpression" ? "FunctionDeclaration" : "ClassDeclaration";
- }
- }
- node.declaration = expr;
- if (needsSemi) this.semicolon();
- return this.finishNode(node, "ExportDefaultDeclaration");
- }
- // export var|const|let|function|class ...
- if (this.shouldParseExportStatement()) {
- node.declaration = this.parseStatement(true);
- node.specifiers = [];
- node.source = null;
- } else {
- // export { x, y as z } [from '...']
- node.declaration = null;
- node.specifiers = this.parseExportSpecifiers();
- if (this.eatContextual("from")) {
- node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected();
- } else {
- node.source = null;
- }
- this.semicolon();
- }
- return this.finishNode(node, "ExportNamedDeclaration");
-};
-
-pp.shouldParseExportStatement = function () {
- return this.type.keyword;
-};
-
-// Parses a comma-separated list of module exports.
-
-pp.parseExportSpecifiers = function () {
- var nodes = [],
- first = true;
- // export { x, y as z } [from '...']
- this.expect(tt.braceL);
- while (!this.eat(tt.braceR)) {
- if (!first) {
- this.expect(tt.comma);
- if (this.afterTrailingComma(tt.braceR)) break;
- } else first = false;
-
- var node = this.startNode();
- node.local = this.parseIdent(this.type === tt._default);
- node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local;
- nodes.push(this.finishNode(node, "ExportSpecifier"));
- }
- return nodes;
-};
-
-// Parses import declaration.
-
-pp.parseImport = function (node) {
- this.next();
- // import '...'
- if (this.type === tt.string) {
- node.specifiers = empty;
- node.source = this.parseExprAtom();
- node.kind = "";
- } else {
- node.specifiers = this.parseImportSpecifiers();
- this.expectContextual("from");
- node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected();
- }
- this.semicolon();
- return this.finishNode(node, "ImportDeclaration");
-};
-
-// Parses a comma-separated list of module imports.
-
-pp.parseImportSpecifiers = function () {
- var nodes = [],
- first = true;
- if (this.type === tt.name) {
- // import defaultObj, { x, y as z } from '...'
- var node = this.startNode();
- node.local = this.parseIdent();
- this.checkLVal(node.local, true);
- nodes.push(this.finishNode(node, "ImportDefaultSpecifier"));
- if (!this.eat(tt.comma)) return nodes;
- }
- if (this.type === tt.star) {
- var node = this.startNode();
- this.next();
- this.expectContextual("as");
- node.local = this.parseIdent();
- this.checkLVal(node.local, true);
- nodes.push(this.finishNode(node, "ImportNamespaceSpecifier"));
- return nodes;
- }
- this.expect(tt.braceL);
- while (!this.eat(tt.braceR)) {
- if (!first) {
- this.expect(tt.comma);
- if (this.afterTrailingComma(tt.braceR)) break;
- } else first = false;
-
- var node = this.startNode();
- node.imported = this.parseIdent(true);
- node.local = this.eatContextual("as") ? this.parseIdent() : node.imported;
- this.checkLVal(node.local, true);
- nodes.push(this.finishNode(node, "ImportSpecifier"));
- }
- return nodes;
-};
-
-},{"./state":13,"./tokentype":17,"./whitespace":19}],15:[function(_dereq_,module,exports){
-"use strict";
-
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
-
-exports.__esModule = true;
-// The algorithm used to determine whether a regexp can appear at a
-// given point in the program is loosely based on sweet.js' approach.
-// See https://github.com/mozilla/sweet.js/wiki/design
-
-var Parser = _dereq_("./state").Parser;
-
-var tt = _dereq_("./tokentype").types;
-
-var lineBreak = _dereq_("./whitespace").lineBreak;
-
-var TokContext = exports.TokContext = function TokContext(token, isExpr, preserveSpace, override) {
- _classCallCheck(this, TokContext);
-
- this.token = token;
- this.isExpr = isExpr;
- this.preserveSpace = preserveSpace;
- this.override = override;
-};
-
-var types = {
- b_stat: new TokContext("{", false),
- b_expr: new TokContext("{", true),
- b_tmpl: new TokContext("${", true),
- p_stat: new TokContext("(", false),
- p_expr: new TokContext("(", true),
- q_tmpl: new TokContext("`", true, true, function (p) {
- return p.readTmplToken();
- }),
- f_expr: new TokContext("function", true)
-};
-
-exports.types = types;
-var pp = Parser.prototype;
-
-pp.initialContext = function () {
- return [types.b_stat];
-};
-
-pp.braceIsBlock = function (prevType) {
- var parent = undefined;
- if (prevType === tt.colon && (parent = this.curContext()).token == "{") return !parent.isExpr;
- if (prevType === tt._return) return lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
- if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof) return true;
- if (prevType == tt.braceL) return this.curContext() === types.b_stat;
- return !this.exprAllowed;
-};
-
-pp.updateContext = function (prevType) {
- var update = undefined,
- type = this.type;
- if (type.keyword && prevType == tt.dot) this.exprAllowed = false;else if (update = type.updateContext) update.call(this, prevType);else this.exprAllowed = type.beforeExpr;
-};
-
-// Token-specific context update code
-
-tt.parenR.updateContext = tt.braceR.updateContext = function () {
- if (this.context.length == 1) {
- this.exprAllowed = true;
- return;
- }
- var out = this.context.pop();
- if (out === types.b_stat && this.curContext() === types.f_expr) {
- this.context.pop();
- this.exprAllowed = false;
- } else if (out === types.b_tmpl) {
- this.exprAllowed = true;
- } else {
- this.exprAllowed = !out.isExpr;
- }
-};
-
-tt.braceL.updateContext = function (prevType) {
- this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr);
- this.exprAllowed = true;
-};
-
-tt.dollarBraceL.updateContext = function () {
- this.context.push(types.b_tmpl);
- this.exprAllowed = true;
-};
-
-tt.parenL.updateContext = function (prevType) {
- var statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while;
- this.context.push(statementParens ? types.p_stat : types.p_expr);
- this.exprAllowed = true;
-};
-
-tt.incDec.updateContext = function () {};
-
-tt._function.updateContext = function () {
- if (this.curContext() !== types.b_stat) this.context.push(types.f_expr);
- this.exprAllowed = false;
-};
-
-tt.backQuote.updateContext = function () {
- if (this.curContext() === types.q_tmpl) this.context.pop();else this.context.push(types.q_tmpl);
- this.exprAllowed = false;
-};
-
-// tokExprAllowed stays unchanged
-
-},{"./state":13,"./tokentype":17,"./whitespace":19}],16:[function(_dereq_,module,exports){
-"use strict";
-
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
-
-exports.__esModule = true;
-
-var _identifier = _dereq_("./identifier");
-
-var isIdentifierStart = _identifier.isIdentifierStart;
-var isIdentifierChar = _identifier.isIdentifierChar;
-
-var _tokentype = _dereq_("./tokentype");
-
-var tt = _tokentype.types;
-var keywordTypes = _tokentype.keywords;
-
-var Parser = _dereq_("./state").Parser;
-
-var SourceLocation = _dereq_("./location").SourceLocation;
-
-var _whitespace = _dereq_("./whitespace");
-
-var lineBreak = _whitespace.lineBreak;
-var lineBreakG = _whitespace.lineBreakG;
-var isNewLine = _whitespace.isNewLine;
-var nonASCIIwhitespace = _whitespace.nonASCIIwhitespace;
-
-// Object type used to represent tokens. Note that normally, tokens
-// simply exist as properties on the parser object. This is only
-// used for the onToken callback and the external tokenizer.
-
-var Token = exports.Token = function Token(p) {
- _classCallCheck(this, Token);
-
- this.type = p.type;
- this.value = p.value;
- this.start = p.start;
- this.end = p.end;
- if (p.options.locations) this.loc = new SourceLocation(p, p.startLoc, p.endLoc);
- if (p.options.ranges) this.range = [p.start, p.end];
-};
-
-// ## Tokenizer
-
-var pp = Parser.prototype;
-
-// Are we running under Rhino?
-var isRhino = typeof Packages !== "undefined";
-
-// Move to the next token
-
-pp.next = function () {
- if (this.options.onToken) this.options.onToken(new Token(this));
-
- this.lastTokEnd = this.end;
- this.lastTokStart = this.start;
- this.lastTokEndLoc = this.endLoc;
- this.lastTokStartLoc = this.startLoc;
- this.nextToken();
-};
-
-pp.getToken = function () {
- this.next();
- return new Token(this);
-};
-
-// If we're in an ES6 environment, make parsers iterable
-if (typeof Symbol !== "undefined") pp[Symbol.iterator] = function () {
- var self = this;
- return { next: function next() {
- var token = self.getToken();
- return {
- done: token.type === tt.eof,
- value: token
- };
- } };
-};
-
-// Toggle strict mode. Re-reads the next number or string to please
-// pedantic tests (`"use strict"; 010;` should fail).
-
-pp.setStrict = function (strict) {
- this.strict = strict;
- if (this.type !== tt.num && this.type !== tt.string) return;
- this.pos = this.start;
- if (this.options.locations) {
- while (this.pos < this.lineStart) {
- this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1;
- --this.curLine;
- }
- }
- this.nextToken();
-};
-
-pp.curContext = function () {
- return this.context[this.context.length - 1];
-};
-
-// Read a single token, updating the parser object's token-related
-// properties.
-
-pp.nextToken = function () {
- var curContext = this.curContext();
- if (!curContext || !curContext.preserveSpace) this.skipSpace();
-
- this.start = this.pos;
- if (this.options.locations) this.startLoc = this.curPosition();
- if (this.pos >= this.input.length) return this.finishToken(tt.eof);
-
- if (curContext.override) return curContext.override(this);else this.readToken(this.fullCharCodeAtPos());
-};
-
-pp.readToken = function (code) {
- // Identifier or keyword. '\uXXXX' sequences are allowed in
- // identifiers, so '\' also dispatches to that.
- if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) return this.readWord();
-
- return this.getTokenFromCode(code);
-};
-
-pp.fullCharCodeAtPos = function () {
- var code = this.input.charCodeAt(this.pos);
- if (code <= 55295 || code >= 57344) return code;
- var next = this.input.charCodeAt(this.pos + 1);
- return (code << 10) + next - 56613888;
-};
-
-pp.skipBlockComment = function () {
- var startLoc = this.options.onComment && this.options.locations && this.curPosition();
- var start = this.pos,
- end = this.input.indexOf("*/", this.pos += 2);
- if (end === -1) this.raise(this.pos - 2, "Unterminated comment");
- this.pos = end + 2;
- if (this.options.locations) {
- lineBreakG.lastIndex = start;
- var match = undefined;
- while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {
- ++this.curLine;
- this.lineStart = match.index + match[0].length;
- }
- }
- if (this.options.onComment) this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.options.locations && this.curPosition());
-};
-
-pp.skipLineComment = function (startSkip) {
- var start = this.pos;
- var startLoc = this.options.onComment && this.options.locations && this.curPosition();
- var ch = this.input.charCodeAt(this.pos += startSkip);
- while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
- ++this.pos;
- ch = this.input.charCodeAt(this.pos);
- }
- if (this.options.onComment) this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.options.locations && this.curPosition());
-};
-
-// Called at the start of the parse and after every token. Skips
-// whitespace and comments, and.
-
-pp.skipSpace = function () {
- while (this.pos < this.input.length) {
- var ch = this.input.charCodeAt(this.pos);
- if (ch === 32) {
- // ' '
- ++this.pos;
- } else if (ch === 13) {
- ++this.pos;
- var next = this.input.charCodeAt(this.pos);
- if (next === 10) {
- ++this.pos;
- }
- if (this.options.locations) {
- ++this.curLine;
- this.lineStart = this.pos;
- }
- } else if (ch === 10 || ch === 8232 || ch === 8233) {
- ++this.pos;
- if (this.options.locations) {
- ++this.curLine;
- this.lineStart = this.pos;
- }
- } else if (ch > 8 && ch < 14) {
- ++this.pos;
- } else if (ch === 47) {
- // '/'
- var next = this.input.charCodeAt(this.pos + 1);
- if (next === 42) {
- // '*'
- this.skipBlockComment();
- } else if (next === 47) {
- // '/'
- this.skipLineComment(2);
- } else break;
- } else if (ch === 160) {
- // '\xa0'
- ++this.pos;
- } else if (ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
- ++this.pos;
- } else {
- break;
- }
- }
-};
-
-// Called at the end of every token. Sets `end`, `val`, and
-// maintains `context` and `exprAllowed`, and skips the space after
-// the token, so that the next one's `start` will point at the
-// right position.
-
-pp.finishToken = function (type, val) {
- this.end = this.pos;
- if (this.options.locations) this.endLoc = this.curPosition();
- var prevType = this.type;
- this.type = type;
- this.value = val;
-
- this.updateContext(prevType);
-};
-
-// ### Token reading
-
-// This is the function that is called to fetch the next token. It
-// is somewhat obscure, because it works in character codes rather
-// than characters, and because operator parsing has been inlined
-// into it.
-//
-// All in the name of speed.
-//
-pp.readToken_dot = function () {
- var next = this.input.charCodeAt(this.pos + 1);
- if (next >= 48 && next <= 57) return this.readNumber(true);
- var next2 = this.input.charCodeAt(this.pos + 2);
- if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) {
- // 46 = dot '.'
- this.pos += 3;
- return this.finishToken(tt.ellipsis);
- } else {
- ++this.pos;
- return this.finishToken(tt.dot);
- }
-};
-
-pp.readToken_slash = function () {
- // '/'
- var next = this.input.charCodeAt(this.pos + 1);
- if (this.exprAllowed) {
- ++this.pos;return this.readRegexp();
- }
- if (next === 61) return this.finishOp(tt.assign, 2);
- return this.finishOp(tt.slash, 1);
-};
-
-pp.readToken_mult_modulo = function (code) {
- // '%*'
- var next = this.input.charCodeAt(this.pos + 1);
- if (next === 61) return this.finishOp(tt.assign, 2);
- return this.finishOp(code === 42 ? tt.star : tt.modulo, 1);
-};
-
-pp.readToken_pipe_amp = function (code) {
- // '|&'
- var next = this.input.charCodeAt(this.pos + 1);
- if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2);
- if (next === 61) return this.finishOp(tt.assign, 2);
- return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1);
-};
-
-pp.readToken_caret = function () {
- // '^'
- var next = this.input.charCodeAt(this.pos + 1);
- if (next === 61) return this.finishOp(tt.assign, 2);
- return this.finishOp(tt.bitwiseXOR, 1);
-};
-
-pp.readToken_plus_min = function (code) {
- // '+-'
- var next = this.input.charCodeAt(this.pos + 1);
- if (next === code) {
- if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) {
- // A `-->` line comment
- this.skipLineComment(3);
- this.skipSpace();
- return this.nextToken();
- }
- return this.finishOp(tt.incDec, 2);
- }
- if (next === 61) return this.finishOp(tt.assign, 2);
- return this.finishOp(tt.plusMin, 1);
-};
-
-pp.readToken_lt_gt = function (code) {
- // '<>'
- var next = this.input.charCodeAt(this.pos + 1);
- var size = 1;
- if (next === code) {
- size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
- if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1);
- return this.finishOp(tt.bitShift, size);
- }
- if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) {
- if (this.inModule) this.unexpected();
- // `<!--`, an XML-style comment that should be interpreted as a line comment
- this.skipLineComment(4);
- this.skipSpace();
- return this.nextToken();
- }
- if (next === 61) size = this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2;
- return this.finishOp(tt.relational, size);
-};
-
-pp.readToken_eq_excl = function (code) {
- // '=!'
- var next = this.input.charCodeAt(this.pos + 1);
- if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2);
- if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) {
- // '=>'
- this.pos += 2;
- return this.finishToken(tt.arrow);
- }
- return this.finishOp(code === 61 ? tt.eq : tt.prefix, 1);
-};
-
-pp.getTokenFromCode = function (code) {
- switch (code) {
- // The interpretation of a dot depends on whether it is followed
- // by a digit or another two dots.
- case 46:
- // '.'
- return this.readToken_dot();
-
- // Punctuation tokens.
- case 40:
- ++this.pos;return this.finishToken(tt.parenL);
- case 41:
- ++this.pos;return this.finishToken(tt.parenR);
- case 59:
- ++this.pos;return this.finishToken(tt.semi);
- case 44:
- ++this.pos;return this.finishToken(tt.comma);
- case 91:
- ++this.pos;return this.finishToken(tt.bracketL);
- case 93:
- ++this.pos;return this.finishToken(tt.bracketR);
- case 123:
- ++this.pos;return this.finishToken(tt.braceL);
- case 125:
- ++this.pos;return this.finishToken(tt.braceR);
- case 58:
- ++this.pos;return this.finishToken(tt.colon);
- case 63:
- ++this.pos;return this.finishToken(tt.question);
-
- case 96:
- // '`'
- if (this.options.ecmaVersion < 6) break;
- ++this.pos;
- return this.finishToken(tt.backQuote);
-
- case 48:
- // '0'
- var next = this.input.charCodeAt(this.pos + 1);
- if (next === 120 || next === 88) return this.readRadixNumber(16); // '0x', '0X' - hex number
- if (this.options.ecmaVersion >= 6) {
- if (next === 111 || next === 79) return this.readRadixNumber(8); // '0o', '0O' - octal number
- if (next === 98 || next === 66) return this.readRadixNumber(2); // '0b', '0B' - binary number
- }
- // Anything else beginning with a digit is an integer, octal
- // number, or float.
- case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:
- // 1-9
- return this.readNumber(false);
-
- // Quotes produce strings.
- case 34:case 39:
- // '"', "'"
- return this.readString(code);
-
- // Operators are parsed inline in tiny state machines. '=' (61) is
- // often referred to. `finishOp` simply skips the amount of
- // characters it is given as second argument, and returns a token
- // of the type given by its first argument.
-
- case 47:
- // '/'
- return this.readToken_slash();
-
- case 37:case 42:
- // '%*'
- return this.readToken_mult_modulo(code);
-
- case 124:case 38:
- // '|&'
- return this.readToken_pipe_amp(code);
-
- case 94:
- // '^'
- return this.readToken_caret();
-
- case 43:case 45:
- // '+-'
- return this.readToken_plus_min(code);
-
- case 60:case 62:
- // '<>'
- return this.readToken_lt_gt(code);
-
- case 61:case 33:
- // '=!'
- return this.readToken_eq_excl(code);
-
- case 126:
- // '~'
- return this.finishOp(tt.prefix, 1);
- }
-
- this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'");
-};
-
-pp.finishOp = function (type, size) {
- var str = this.input.slice(this.pos, this.pos + size);
- this.pos += size;
- return this.finishToken(type, str);
-};
-
-var regexpUnicodeSupport = false;
-try {
- new RegExp("￿", "u");regexpUnicodeSupport = true;
-} catch (e) {}
-
-// Parse a regular expression. Some context-awareness is necessary,
-// since a '/' inside a '[]' set does not end the expression.
-
-pp.readRegexp = function () {
- var escaped = undefined,
- inClass = undefined,
- start = this.pos;
- for (;;) {
- if (this.pos >= this.input.length) this.raise(start, "Unterminated regular expression");
- var ch = this.input.charAt(this.pos);
- if (lineBreak.test(ch)) this.raise(start, "Unterminated regular expression");
- if (!escaped) {
- if (ch === "[") inClass = true;else if (ch === "]" && inClass) inClass = false;else if (ch === "/" && !inClass) break;
- escaped = ch === "\\";
- } else escaped = false;
- ++this.pos;
- }
- var content = this.input.slice(start, this.pos);
- ++this.pos;
- // Need to use `readWord1` because '\uXXXX' sequences are allowed
- // here (don't ask).
- var mods = this.readWord1();
- var tmp = content;
- if (mods) {
- var validFlags = /^[gmsiy]*$/;
- if (this.options.ecmaVersion >= 6) validFlags = /^[gmsiyu]*$/;
- if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag");
- if (mods.indexOf("u") >= 0 && !regexpUnicodeSupport) {
- // Replace each astral symbol and every Unicode escape sequence that
- // possibly represents an astral symbol or a paired surrogate with a
- // single ASCII symbol to avoid throwing on regular expressions that
- // are only valid in combination with the `/u` flag.
- // Note: replacing with the ASCII symbol `x` might cause false
- // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
- // perfectly valid pattern that is equivalent to `[a-b]`, but it would
- // be replaced by `[x-b]` which throws an error.
- tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|\\u\{([0-9a-fA-F]+)\}|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x");
- }
- }
- // Detect invalid regular expressions.
- var value = null;
- // Rhino's regular expression parser is flaky and throws uncatchable exceptions,
- // so don't do detection if we are running under Rhino
- if (!isRhino) {
- try {
- new RegExp(tmp);
- } catch (e) {
- if (e instanceof SyntaxError) this.raise(start, "Error parsing regular expression: " + e.message);
- this.raise(e);
- }
- // Get a regular expression object for this pattern-flag pair, or `null` in
- // case the current environment doesn't support the flags it uses.
- try {
- value = new RegExp(content, mods);
- } catch (err) {}
- }
- return this.finishToken(tt.regexp, { pattern: content, flags: mods, value: value });
-};
-
-// Read an integer in the given radix. Return null if zero digits
-// were read, the integer value otherwise. When `len` is given, this
-// will return `null` unless the integer has exactly `len` digits.
-
-pp.readInt = function (radix, len) {
- var start = this.pos,
- total = 0;
- for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
- var code = this.input.charCodeAt(this.pos),
- val = undefined;
- if (code >= 97) val = code - 97 + 10; // a
- else if (code >= 65) val = code - 65 + 10; // A
- else if (code >= 48 && code <= 57) val = code - 48; // 0-9
- else val = Infinity;
- if (val >= radix) break;
- ++this.pos;
- total = total * radix + val;
- }
- if (this.pos === start || len != null && this.pos - start !== len) return null;
-
- return total;
-};
-
-pp.readRadixNumber = function (radix) {
- this.pos += 2; // 0x
- var val = this.readInt(radix);
- if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix);
- if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number");
- return this.finishToken(tt.num, val);
-};
-
-// Read an integer, octal integer, or floating-point number.
-
-pp.readNumber = function (startsWithDot) {
- var start = this.pos,
- isFloat = false,
- octal = this.input.charCodeAt(this.pos) === 48;
- if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number");
- if (this.input.charCodeAt(this.pos) === 46) {
- ++this.pos;
- this.readInt(10);
- isFloat = true;
- }
- var next = this.input.charCodeAt(this.pos);
- if (next === 69 || next === 101) {
- // 'eE'
- next = this.input.charCodeAt(++this.pos);
- if (next === 43 || next === 45) ++this.pos; // '+-'
- if (this.readInt(10) === null) this.raise(start, "Invalid number");
- isFloat = true;
- }
- if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number");
-
- var str = this.input.slice(start, this.pos),
- val = undefined;
- if (isFloat) val = parseFloat(str);else if (!octal || str.length === 1) val = parseInt(str, 10);else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number");else val = parseInt(str, 8);
- return this.finishToken(tt.num, val);
-};
-
-// Read a string value, interpreting backslash-escapes.
-
-pp.readCodePoint = function () {
- var ch = this.input.charCodeAt(this.pos),
- code = undefined;
-
- if (ch === 123) {
- if (this.options.ecmaVersion < 6) this.unexpected();
- ++this.pos;
- code = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos);
- ++this.pos;
- if (code > 1114111) this.unexpected();
- } else {
- code = this.readHexChar(4);
- }
- return code;
-};
-
-function codePointToString(code) {
- // UTF-16 Decoding
- if (code <= 65535) {
- return String.fromCharCode(code);
- }return String.fromCharCode((code - 65536 >> 10) + 55296, (code - 65536 & 1023) + 56320);
-}
-
-pp.readString = function (quote) {
- var out = "",
- chunkStart = ++this.pos;
- for (;;) {
- if (this.pos >= this.input.length) this.raise(this.start, "Unterminated string constant");
- var ch = this.input.charCodeAt(this.pos);
- if (ch === quote) break;
- if (ch === 92) {
- // '\'
- out += this.input.slice(chunkStart, this.pos);
- out += this.readEscapedChar();
- chunkStart = this.pos;
- } else {
- if (isNewLine(ch)) this.raise(this.start, "Unterminated string constant");
- ++this.pos;
- }
- }
- out += this.input.slice(chunkStart, this.pos++);
- return this.finishToken(tt.string, out);
-};
-
-// Reads template string tokens.
-
-pp.readTmplToken = function () {
- var out = "",
- chunkStart = this.pos;
- for (;;) {
- if (this.pos >= this.input.length) this.raise(this.start, "Unterminated template");
- var ch = this.input.charCodeAt(this.pos);
- if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) {
- // '`', '${'
- if (this.pos === this.start && this.type === tt.template) {
- if (ch === 36) {
- this.pos += 2;
- return this.finishToken(tt.dollarBraceL);
- } else {
- ++this.pos;
- return this.finishToken(tt.backQuote);
- }
- }
- out += this.input.slice(chunkStart, this.pos);
- return this.finishToken(tt.template, out);
- }
- if (ch === 92) {
- // '\'
- out += this.input.slice(chunkStart, this.pos);
- out += this.readEscapedChar();
- chunkStart = this.pos;
- } else if (isNewLine(ch)) {
- out += this.input.slice(chunkStart, this.pos);
- ++this.pos;
- if (ch === 13 && this.input.charCodeAt(this.pos) === 10) {
- ++this.pos;
- out += "\n";
- } else {
- out += String.fromCharCode(ch);
- }
- if (this.options.locations) {
- ++this.curLine;
- this.lineStart = this.pos;
- }
- chunkStart = this.pos;
- } else {
- ++this.pos;
- }
- }
-};
-
-// Used to read escaped characters
-
-pp.readEscapedChar = function () {
- var ch = this.input.charCodeAt(++this.pos);
- var octal = /^[0-7]+/.exec(this.input.slice(this.pos, this.pos + 3));
- if (octal) octal = octal[0];
- while (octal && parseInt(octal, 8) > 255) octal = octal.slice(0, -1);
- if (octal === "0") octal = null;
- ++this.pos;
- if (octal) {
- if (this.strict) this.raise(this.pos - 2, "Octal literal in strict mode");
- this.pos += octal.length - 1;
- return String.fromCharCode(parseInt(octal, 8));
- } else {
- switch (ch) {
- case 110:
- return "\n"; // 'n' -> '\n'
- case 114:
- return "\r"; // 'r' -> '\r'
- case 120:
- return String.fromCharCode(this.readHexChar(2)); // 'x'
- case 117:
- return codePointToString(this.readCodePoint()); // 'u'
- case 116:
- return "\t"; // 't' -> '\t'
- case 98:
- return "\b"; // 'b' -> '\b'
- case 118:
- return "\u000b"; // 'v' -> '\u000b'
- case 102:
- return "\f"; // 'f' -> '\f'
- case 48:
- return "\u0000"; // 0 -> '\0'
- case 13:
- if (this.input.charCodeAt(this.pos) === 10) ++this.pos; // '\r\n'
- case 10:
- // ' \n'
- if (this.options.locations) {
- this.lineStart = this.pos;++this.curLine;
- }
- return "";
- default:
- return String.fromCharCode(ch);
- }
- }
-};
-
-// Used to read character escape sequences ('\x', '\u', '\U').
-
-pp.readHexChar = function (len) {
- var n = this.readInt(16, len);
- if (n === null) this.raise(this.start, "Bad character escape sequence");
- return n;
-};
-
-// Used to signal to callers of `readWord1` whether the word
-// contained any escape sequences. This is needed because words with
-// escape sequences must not be interpreted as keywords.
-
-var containsEsc;
-
-// Read an identifier, and return it as a string. Sets `containsEsc`
-// to whether the word contained a '\u' escape.
-//
-// Incrementally adds only escaped chars, adding other chunks as-is
-// as a micro-optimization.
-
-pp.readWord1 = function () {
- containsEsc = false;
- var word = "",
- first = true,
- chunkStart = this.pos;
- var astral = this.options.ecmaVersion >= 6;
- while (this.pos < this.input.length) {
- var ch = this.fullCharCodeAtPos();
- if (isIdentifierChar(ch, astral)) {
- this.pos += ch <= 65535 ? 1 : 2;
- } else if (ch === 92) {
- // "\"
- containsEsc = true;
- word += this.input.slice(chunkStart, this.pos);
- var escStart = this.pos;
- if (this.input.charCodeAt(++this.pos) != 117) // "u"
- this.raise(this.pos, "Expecting Unicode escape sequence \\uXXXX");
- ++this.pos;
- var esc = this.readCodePoint();
- if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral)) this.raise(escStart, "Invalid Unicode escape");
- word += codePointToString(esc);
- chunkStart = this.pos;
- } else {
- break;
- }
- first = false;
- }
- return word + this.input.slice(chunkStart, this.pos);
-};
-
-// Read an identifier or keyword token. Will check for reserved
-// words when necessary.
-
-pp.readWord = function () {
- var word = this.readWord1();
- var type = tt.name;
- if ((this.options.ecmaVersion >= 6 || !containsEsc) && this.isKeyword(word)) type = keywordTypes[word];
- return this.finishToken(type, word);
-};
-
-},{"./identifier":7,"./location":8,"./state":13,"./tokentype":17,"./whitespace":19}],17:[function(_dereq_,module,exports){
-"use strict";
-
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
-
-exports.__esModule = true;
-// ## Token types
-
-// The assignment of fine-grained, information-carrying type objects
-// allows the tokenizer to store the information it has about a
-// token in a way that is very cheap for the parser to look up.
-
-// All token type variables start with an underscore, to make them
-// easy to recognize.
-
-// The `beforeExpr` property is used to disambiguate between regular
-// expressions and divisions. It is set on all token types that can
-// be followed by an expression (thus, a slash after them would be a
-// regular expression).
-//
-// `isLoop` marks a keyword as starting a loop, which is important
-// to know when parsing a label, in order to allow or disallow
-// continue jumps to that label.
-
-var TokenType = exports.TokenType = function TokenType(label) {
- var conf = arguments[1] === undefined ? {} : arguments[1];
-
- _classCallCheck(this, TokenType);
-
- this.label = label;
- this.keyword = conf.keyword;
- this.beforeExpr = !!conf.beforeExpr;
- this.startsExpr = !!conf.startsExpr;
- this.isLoop = !!conf.isLoop;
- this.isAssign = !!conf.isAssign;
- this.prefix = !!conf.prefix;
- this.postfix = !!conf.postfix;
- this.binop = conf.binop || null;
- this.updateContext = null;
-};
-
-function binop(name, prec) {
- return new TokenType(name, { beforeExpr: true, binop: prec });
-}
-var beforeExpr = { beforeExpr: true },
- startsExpr = { startsExpr: true };
-
-var types = {
- num: new TokenType("num", startsExpr),
- regexp: new TokenType("regexp", startsExpr),
- string: new TokenType("string", startsExpr),
- name: new TokenType("name", startsExpr),
- eof: new TokenType("eof"),
-
- // Punctuation token types.
- bracketL: new TokenType("[", { beforeExpr: true, startsExpr: true }),
- bracketR: new TokenType("]"),
- braceL: new TokenType("{", { beforeExpr: true, startsExpr: true }),
- braceR: new TokenType("}"),
- parenL: new TokenType("(", { beforeExpr: true, startsExpr: true }),
- parenR: new TokenType(")"),
- comma: new TokenType(",", beforeExpr),
- semi: new TokenType(";", beforeExpr),
- colon: new TokenType(":", beforeExpr),
- dot: new TokenType("."),
- question: new TokenType("?", beforeExpr),
- arrow: new TokenType("=>", beforeExpr),
- template: new TokenType("template"),
- ellipsis: new TokenType("...", beforeExpr),
- backQuote: new TokenType("`", startsExpr),
- dollarBraceL: new TokenType("${", { beforeExpr: true, startsExpr: true }),
-
- // Operators. These carry several kinds of properties to help the
- // parser use them properly (the presence of these properties is
- // what categorizes them as operators).
- //
- // `binop`, when present, specifies that this operator is a binary
- // operator, and will refer to its precedence.
- //
- // `prefix` and `postfix` mark the operator as a prefix or postfix
- // unary operator.
- //
- // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
- // binary operators with a very low precedence, that should result
- // in AssignmentExpression nodes.
-
- eq: new TokenType("=", { beforeExpr: true, isAssign: true }),
- assign: new TokenType("_=", { beforeExpr: true, isAssign: true }),
- incDec: new TokenType("++/--", { prefix: true, postfix: true, startsExpr: true }),
- prefix: new TokenType("prefix", { beforeExpr: true, prefix: true, startsExpr: true }),
- logicalOR: binop("||", 1),
- logicalAND: binop("&&", 2),
- bitwiseOR: binop("|", 3),
- bitwiseXOR: binop("^", 4),
- bitwiseAND: binop("&", 5),
- equality: binop("==/!=", 6),
- relational: binop("</>", 7),
- bitShift: binop("<</>>", 8),
- plusMin: new TokenType("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }),
- modulo: binop("%", 10),
- star: binop("*", 10),
- slash: binop("/", 10)
-};
-
-exports.types = types;
-// Map keyword names to token types.
-
-var keywords = {};
-
-exports.keywords = keywords;
-// Succinct definitions of keyword token types
-function kw(name) {
- var options = arguments[1] === undefined ? {} : arguments[1];
-
- options.keyword = name;
- keywords[name] = types["_" + name] = new TokenType(name, options);
-}
-
-kw("break");
-kw("case", beforeExpr);
-kw("catch");
-kw("continue");
-kw("debugger");
-kw("default");
-kw("do", { isLoop: true });
-kw("else", beforeExpr);
-kw("finally");
-kw("for", { isLoop: true });
-kw("function", startsExpr);
-kw("if");
-kw("return", beforeExpr);
-kw("switch");
-kw("throw", beforeExpr);
-kw("try");
-kw("var");
-kw("let");
-kw("const");
-kw("while", { isLoop: true });
-kw("with");
-kw("new", { beforeExpr: true, startsExpr: true });
-kw("this", startsExpr);
-kw("super", startsExpr);
-kw("class");
-kw("extends", beforeExpr);
-kw("export");
-kw("import");
-kw("yield", { beforeExpr: true, startsExpr: true });
-kw("null", startsExpr);
-kw("true", startsExpr);
-kw("false", startsExpr);
-kw("in", { beforeExpr: true, binop: 7 });
-kw("instanceof", { beforeExpr: true, binop: 7 });
-kw("typeof", { beforeExpr: true, prefix: true, startsExpr: true });
-kw("void", { beforeExpr: true, prefix: true, startsExpr: true });
-kw("delete", { beforeExpr: true, prefix: true, startsExpr: true });
-
-},{}],18:[function(_dereq_,module,exports){
-"use strict";
-
-exports.isArray = isArray;
-
-// Checks if an object has a property.
-
-exports.has = has;
-exports.__esModule = true;
-
-function isArray(obj) {
- return Object.prototype.toString.call(obj) === "[object Array]";
-}
-
-function has(obj, propName) {
- return Object.prototype.hasOwnProperty.call(obj, propName);
-}
-
-},{}],19:[function(_dereq_,module,exports){
-"use strict";
-
-exports.isNewLine = isNewLine;
-exports.__esModule = true;
-// Matches a whole line break (where CRLF is considered a single
-// line break). Used to count lines.
-
-var lineBreak = /\r\n?|\n|\u2028|\u2029/;
-exports.lineBreak = lineBreak;
-var lineBreakG = new RegExp(lineBreak.source, "g");
-
-exports.lineBreakG = lineBreakG;
-
-function isNewLine(code) {
- return code === 10 || code === 13 || code === 8232 || code == 8233;
-}
-
-var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
-exports.nonASCIIwhitespace = nonASCIIwhitespace;
-
-},{}]},{},[1])(1)
-}); \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/acorn_csp.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/acorn_csp.js
deleted file mode 100644
index 47ebea4e4f..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/acorn_csp.js
+++ /dev/null
@@ -1,3985 +0,0 @@
-(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.acorn = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
-
-
-// The main exported interface (under `self.acorn` when in the
-// browser) is a `parse` function that takes a code string and
-// returns an abstract syntax tree as specified by [Mozilla parser
-// API][api].
-//
-// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
-
-"use strict";
-
-exports.parse = parse;
-
-// This function tries to parse a single expression at a given
-// offset in a string. Useful for parsing mixed-language formats
-// that embed JavaScript expressions.
-
-exports.parseExpressionAt = parseExpressionAt;
-
-// Acorn is organized as a tokenizer and a recursive-descent parser.
-// The `tokenize` export provides an interface to the tokenizer.
-
-exports.tokenizer = tokenizer;
-exports.__esModule = true;
-// Acorn is a tiny, fast JavaScript parser written in JavaScript.
-//
-// Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and
-// various contributors and released under an MIT license.
-//
-// Git repositories for Acorn are available at
-//
-// http://marijnhaverbeke.nl/git/acorn
-// https://github.com/marijnh/acorn.git
-//
-// Please use the [github bug tracker][ghbt] to report issues.
-//
-// [ghbt]: https://github.com/marijnh/acorn/issues
-//
-// This file defines the main parser interface. The library also comes
-// with a [error-tolerant parser][dammit] and an
-// [abstract syntax tree walker][walk], defined in other files.
-//
-// [dammit]: acorn_loose.js
-// [walk]: util/walk.js
-
-var _state = _dereq_("./state");
-
-var Parser = _state.Parser;
-
-var _options = _dereq_("./options");
-
-var getOptions = _options.getOptions;
-
-_dereq_("./parseutil");
-
-_dereq_("./statement");
-
-_dereq_("./lval");
-
-_dereq_("./expression");
-
-exports.Parser = _state.Parser;
-exports.plugins = _state.plugins;
-exports.defaultOptions = _options.defaultOptions;
-
-var _location = _dereq_("./location");
-
-exports.SourceLocation = _location.SourceLocation;
-exports.getLineInfo = _location.getLineInfo;
-exports.Node = _dereq_("./node").Node;
-
-var _tokentype = _dereq_("./tokentype");
-
-exports.TokenType = _tokentype.TokenType;
-exports.tokTypes = _tokentype.types;
-
-var _tokencontext = _dereq_("./tokencontext");
-
-exports.TokContext = _tokencontext.TokContext;
-exports.tokContexts = _tokencontext.types;
-
-var _identifier = _dereq_("./identifier");
-
-exports.isIdentifierChar = _identifier.isIdentifierChar;
-exports.isIdentifierStart = _identifier.isIdentifierStart;
-exports.Token = _dereq_("./tokenize").Token;
-
-var _whitespace = _dereq_("./whitespace");
-
-exports.isNewLine = _whitespace.isNewLine;
-exports.lineBreak = _whitespace.lineBreak;
-exports.lineBreakG = _whitespace.lineBreakG;
-var version = "1.2.2";exports.version = version;
-
-function parse(input, options) {
- var p = parser(options, input);
- var startPos = p.pos,
- startLoc = p.options.locations && p.curPosition();
- p.nextToken();
- return p.parseTopLevel(p.options.program || p.startNodeAt(startPos, startLoc));
-}
-
-function parseExpressionAt(input, pos, options) {
- var p = parser(options, input, pos);
- p.nextToken();
- return p.parseExpression();
-}
-
-function tokenizer(input, options) {
- return parser(options, input);
-}
-
-function parser(options, input) {
- return new Parser(getOptions(options), String(input));
-}
-
-},{"./expression":6,"./identifier":7,"./location":8,"./lval":9,"./node":10,"./options":11,"./parseutil":12,"./state":13,"./statement":14,"./tokencontext":15,"./tokenize":16,"./tokentype":17,"./whitespace":19}],2:[function(_dereq_,module,exports){
-if (typeof Object.create === 'function') {
- // implementation from standard node.js 'util' module
- module.exports = function inherits(ctor, superCtor) {
- ctor.super_ = superCtor
- ctor.prototype = Object.create(superCtor.prototype, {
- constructor: {
- value: ctor,
- enumerable: false,
- writable: true,
- configurable: true
- }
- });
- };
-} else {
- // old school shim for old browsers
- module.exports = function inherits(ctor, superCtor) {
- ctor.super_ = superCtor
- var TempCtor = function () {}
- TempCtor.prototype = superCtor.prototype
- ctor.prototype = new TempCtor()
- ctor.prototype.constructor = ctor
- }
-}
-
-},{}],3:[function(_dereq_,module,exports){
-// shim for using process in browser
-
-var process = module.exports = {};
-var queue = [];
-var draining = false;
-
-function drainQueue() {
- if (draining) {
- return;
- }
- draining = true;
- var currentQueue;
- var len = queue.length;
- while(len) {
- currentQueue = queue;
- queue = [];
- var i = -1;
- while (++i < len) {
- currentQueue[i]();
- }
- len = queue.length;
- }
- draining = false;
-}
-process.nextTick = function (fun) {
- queue.push(fun);
- if (!draining) {
- setTimeout(drainQueue, 0);
- }
-};
-
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-process.version = ''; // empty string to avoid regexp issues
-process.versions = {};
-
-function noop() {}
-
-process.on = noop;
-process.addListener = noop;
-process.once = noop;
-process.off = noop;
-process.removeListener = noop;
-process.removeAllListeners = noop;
-process.emit = noop;
-
-process.binding = function (name) {
- throw new Error('process.binding is not supported');
-};
-
-// TODO(shtylman)
-process.cwd = function () { return '/' };
-process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
-};
-process.umask = function() { return 0; };
-
-},{}],4:[function(_dereq_,module,exports){
-module.exports = function isBuffer(arg) {
- return arg && typeof arg === 'object'
- && typeof arg.copy === 'function'
- && typeof arg.fill === 'function'
- && typeof arg.readUInt8 === 'function';
-}
-},{}],5:[function(_dereq_,module,exports){
-(function (process,global){
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-var formatRegExp = /%[sdj%]/g;
-exports.format = function(f) {
- if (!isString(f)) {
- var objects = [];
- for (var i = 0; i < arguments.length; i++) {
- objects.push(inspect(arguments[i]));
- }
- return objects.join(' ');
- }
-
- var i = 1;
- var args = arguments;
- var len = args.length;
- var str = String(f).replace(formatRegExp, function(x) {
- if (x === '%%') return '%';
- if (i >= len) return x;
- switch (x) {
- case '%s': return String(args[i++]);
- case '%d': return Number(args[i++]);
- case '%j':
- try {
- return JSON.stringify(args[i++]);
- } catch (_) {
- return '[Circular]';
- }
- default:
- return x;
- }
- });
- for (var x = args[i]; i < len; x = args[++i]) {
- if (isNull(x) || !isObject(x)) {
- str += ' ' + x;
- } else {
- str += ' ' + inspect(x);
- }
- }
- return str;
-};
-
-
-// Mark that a method should not be used.
-// Returns a modified function which warns once by default.
-// If --no-deprecation is set, then it is a no-op.
-exports.deprecate = function(fn, msg) {
- // Allow for deprecating things in the process of starting up.
- if (isUndefined(global.process)) {
- return function() {
- return exports.deprecate(fn, msg).apply(this, arguments);
- };
- }
-
- if (process.noDeprecation === true) {
- return fn;
- }
-
- var warned = false;
- function deprecated() {
- if (!warned) {
- if (process.throwDeprecation) {
- throw new Error(msg);
- } else if (process.traceDeprecation) {
- console.trace(msg);
- } else {
- console.error(msg);
- }
- warned = true;
- }
- return fn.apply(this, arguments);
- }
-
- return deprecated;
-};
-
-
-var debugs = {};
-var debugEnviron;
-exports.debuglog = function(set) {
- if (isUndefined(debugEnviron))
- debugEnviron = process.env.NODE_DEBUG || '';
- set = set.toUpperCase();
- if (!debugs[set]) {
- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
- var pid = process.pid;
- debugs[set] = function() {
- var msg = exports.format.apply(exports, arguments);
- console.error('%s %d: %s', set, pid, msg);
- };
- } else {
- debugs[set] = function() {};
- }
- }
- return debugs[set];
-};
-
-
-/**
- * Echos the value of a value. Trys to print the value out
- * in the best way possible given the different types.
- *
- * @param {Object} obj The object to print out.
- * @param {Object} opts Optional options object that alters the output.
- */
-/* legacy: obj, showHidden, depth, colors*/
-function inspect(obj, opts) {
- // default options
- var ctx = {
- seen: [],
- stylize: stylizeNoColor
- };
- // legacy...
- if (arguments.length >= 3) ctx.depth = arguments[2];
- if (arguments.length >= 4) ctx.colors = arguments[3];
- if (isBoolean(opts)) {
- // legacy...
- ctx.showHidden = opts;
- } else if (opts) {
- // got an "options" object
- exports._extend(ctx, opts);
- }
- // set default options
- if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
- if (isUndefined(ctx.depth)) ctx.depth = 2;
- if (isUndefined(ctx.colors)) ctx.colors = false;
- if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
- if (ctx.colors) ctx.stylize = stylizeWithColor;
- return formatValue(ctx, obj, ctx.depth);
-}
-exports.inspect = inspect;
-
-
-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
-inspect.colors = {
- 'bold' : [1, 22],
- 'italic' : [3, 23],
- 'underline' : [4, 24],
- 'inverse' : [7, 27],
- 'white' : [37, 39],
- 'grey' : [90, 39],
- 'black' : [30, 39],
- 'blue' : [34, 39],
- 'cyan' : [36, 39],
- 'green' : [32, 39],
- 'magenta' : [35, 39],
- 'red' : [31, 39],
- 'yellow' : [33, 39]
-};
-
-// Don't use 'blue' not visible on cmd.exe
-inspect.styles = {
- 'special': 'cyan',
- 'number': 'yellow',
- 'boolean': 'yellow',
- 'undefined': 'grey',
- 'null': 'bold',
- 'string': 'green',
- 'date': 'magenta',
- // "name": intentionally not styling
- 'regexp': 'red'
-};
-
-
-function stylizeWithColor(str, styleType) {
- var style = inspect.styles[styleType];
-
- if (style) {
- return '\u001b[' + inspect.colors[style][0] + 'm' + str +
- '\u001b[' + inspect.colors[style][1] + 'm';
- } else {
- return str;
- }
-}
-
-
-function stylizeNoColor(str, styleType) {
- return str;
-}
-
-
-function arrayToHash(array) {
- var hash = {};
-
- array.forEach(function(val, idx) {
- hash[val] = true;
- });
-
- return hash;
-}
-
-
-function formatValue(ctx, value, recurseTimes) {
- // Provide a hook for user-specified inspect functions.
- // Check that value is an object with an inspect function on it
- if (ctx.customInspect &&
- value &&
- isFunction(value.inspect) &&
- // Filter out the util module, it's inspect function is special
- value.inspect !== exports.inspect &&
- // Also filter out any prototype objects using the circular check.
- !(value.constructor && value.constructor.prototype === value)) {
- var ret = value.inspect(recurseTimes, ctx);
- if (!isString(ret)) {
- ret = formatValue(ctx, ret, recurseTimes);
- }
- return ret;
- }
-
- // Primitive types cannot have properties
- var primitive = formatPrimitive(ctx, value);
- if (primitive) {
- return primitive;
- }
-
- // Look up the keys of the object.
- var keys = Object.keys(value);
- var visibleKeys = arrayToHash(keys);
-
- if (ctx.showHidden) {
- keys = Object.getOwnPropertyNames(value);
- }
-
- // IE doesn't make error fields non-enumerable
- // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
- if (isError(value)
- && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
- return formatError(value);
- }
-
- // Some type of object without properties can be shortcutted.
- if (keys.length === 0) {
- if (isFunction(value)) {
- var name = value.name ? ': ' + value.name : '';
- return ctx.stylize('[Function' + name + ']', 'special');
- }
- if (isRegExp(value)) {
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
- }
- if (isDate(value)) {
- return ctx.stylize(Date.prototype.toString.call(value), 'date');
- }
- if (isError(value)) {
- return formatError(value);
- }
- }
-
- var base = '', array = false, braces = ['{', '}'];
-
- // Make Array say that they are Array
- if (isArray(value)) {
- array = true;
- braces = ['[', ']'];
- }
-
- // Make functions say that they are functions
- if (isFunction(value)) {
- var n = value.name ? ': ' + value.name : '';
- base = ' [Function' + n + ']';
- }
-
- // Make RegExps say that they are RegExps
- if (isRegExp(value)) {
- base = ' ' + RegExp.prototype.toString.call(value);
- }
-
- // Make dates with properties first say the date
- if (isDate(value)) {
- base = ' ' + Date.prototype.toUTCString.call(value);
- }
-
- // Make error with message first say the error
- if (isError(value)) {
- base = ' ' + formatError(value);
- }
-
- if (keys.length === 0 && (!array || value.length == 0)) {
- return braces[0] + base + braces[1];
- }
-
- if (recurseTimes < 0) {
- if (isRegExp(value)) {
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
- } else {
- return ctx.stylize('[Object]', 'special');
- }
- }
-
- ctx.seen.push(value);
-
- var output;
- if (array) {
- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
- } else {
- output = keys.map(function(key) {
- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
- });
- }
-
- ctx.seen.pop();
-
- return reduceToSingleString(output, base, braces);
-}
-
-
-function formatPrimitive(ctx, value) {
- if (isUndefined(value))
- return ctx.stylize('undefined', 'undefined');
- if (isString(value)) {
- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
- .replace(/'/g, "\\'")
- .replace(/\\"/g, '"') + '\'';
- return ctx.stylize(simple, 'string');
- }
- if (isNumber(value))
- return ctx.stylize('' + value, 'number');
- if (isBoolean(value))
- return ctx.stylize('' + value, 'boolean');
- // For some reason typeof null is "object", so special case here.
- if (isNull(value))
- return ctx.stylize('null', 'null');
-}
-
-
-function formatError(value) {
- return '[' + Error.prototype.toString.call(value) + ']';
-}
-
-
-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
- var output = [];
- for (var i = 0, l = value.length; i < l; ++i) {
- if (hasOwnProperty(value, String(i))) {
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
- String(i), true));
- } else {
- output.push('');
- }
- }
- keys.forEach(function(key) {
- if (!key.match(/^\d+$/)) {
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
- key, true));
- }
- });
- return output;
-}
-
-
-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
- var name, str, desc;
- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
- if (desc.get) {
- if (desc.set) {
- str = ctx.stylize('[Getter/Setter]', 'special');
- } else {
- str = ctx.stylize('[Getter]', 'special');
- }
- } else {
- if (desc.set) {
- str = ctx.stylize('[Setter]', 'special');
- }
- }
- if (!hasOwnProperty(visibleKeys, key)) {
- name = '[' + key + ']';
- }
- if (!str) {
- if (ctx.seen.indexOf(desc.value) < 0) {
- if (isNull(recurseTimes)) {
- str = formatValue(ctx, desc.value, null);
- } else {
- str = formatValue(ctx, desc.value, recurseTimes - 1);
- }
- if (str.indexOf('\n') > -1) {
- if (array) {
- str = str.split('\n').map(function(line) {
- return ' ' + line;
- }).join('\n').substr(2);
- } else {
- str = '\n' + str.split('\n').map(function(line) {
- return ' ' + line;
- }).join('\n');
- }
- }
- } else {
- str = ctx.stylize('[Circular]', 'special');
- }
- }
- if (isUndefined(name)) {
- if (array && key.match(/^\d+$/)) {
- return str;
- }
- name = JSON.stringify('' + key);
- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
- name = name.substr(1, name.length - 2);
- name = ctx.stylize(name, 'name');
- } else {
- name = name.replace(/'/g, "\\'")
- .replace(/\\"/g, '"')
- .replace(/(^"|"$)/g, "'");
- name = ctx.stylize(name, 'string');
- }
- }
-
- return name + ': ' + str;
-}
-
-
-function reduceToSingleString(output, base, braces) {
- var numLinesEst = 0;
- var length = output.reduce(function(prev, cur) {
- numLinesEst++;
- if (cur.indexOf('\n') >= 0) numLinesEst++;
- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
- }, 0);
-
- if (length > 60) {
- return braces[0] +
- (base === '' ? '' : base + '\n ') +
- ' ' +
- output.join(',\n ') +
- ' ' +
- braces[1];
- }
-
- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
-}
-
-
-// NOTE: These type checking functions intentionally don't use `instanceof`
-// because it is fragile and can be easily faked with `Object.create()`.
-function isArray(ar) {
- return Array.isArray(ar);
-}
-exports.isArray = isArray;
-
-function isBoolean(arg) {
- return typeof arg === 'boolean';
-}
-exports.isBoolean = isBoolean;
-
-function isNull(arg) {
- return arg === null;
-}
-exports.isNull = isNull;
-
-function isNullOrUndefined(arg) {
- return arg == null;
-}
-exports.isNullOrUndefined = isNullOrUndefined;
-
-function isNumber(arg) {
- return typeof arg === 'number';
-}
-exports.isNumber = isNumber;
-
-function isString(arg) {
- return typeof arg === 'string';
-}
-exports.isString = isString;
-
-function isSymbol(arg) {
- return typeof arg === 'symbol';
-}
-exports.isSymbol = isSymbol;
-
-function isUndefined(arg) {
- return arg === void 0;
-}
-exports.isUndefined = isUndefined;
-
-function isRegExp(re) {
- return isObject(re) && objectToString(re) === '[object RegExp]';
-}
-exports.isRegExp = isRegExp;
-
-function isObject(arg) {
- return typeof arg === 'object' && arg !== null;
-}
-exports.isObject = isObject;
-
-function isDate(d) {
- return isObject(d) && objectToString(d) === '[object Date]';
-}
-exports.isDate = isDate;
-
-function isError(e) {
- return isObject(e) &&
- (objectToString(e) === '[object Error]' || e instanceof Error);
-}
-exports.isError = isError;
-
-function isFunction(arg) {
- return typeof arg === 'function';
-}
-exports.isFunction = isFunction;
-
-function isPrimitive(arg) {
- return arg === null ||
- typeof arg === 'boolean' ||
- typeof arg === 'number' ||
- typeof arg === 'string' ||
- typeof arg === 'symbol' || // ES6 symbol
- typeof arg === 'undefined';
-}
-exports.isPrimitive = isPrimitive;
-
-exports.isBuffer = _dereq_('./support/isBuffer');
-
-function objectToString(o) {
- return Object.prototype.toString.call(o);
-}
-
-
-function pad(n) {
- return n < 10 ? '0' + n.toString(10) : n.toString(10);
-}
-
-
-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
- 'Oct', 'Nov', 'Dec'];
-
-// 26 Feb 16:19:34
-function timestamp() {
- var d = new Date();
- var time = [pad(d.getHours()),
- pad(d.getMinutes()),
- pad(d.getSeconds())].join(':');
- return [d.getDate(), months[d.getMonth()], time].join(' ');
-}
-
-
-// log is just a thin wrapper to console.log that prepends a timestamp
-exports.log = function() {
- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
-};
-
-
-/**
- * Inherit the prototype methods from one constructor into another.
- *
- * The Function.prototype.inherits from lang.js rewritten as a standalone
- * function (not on Function.prototype). NOTE: If this file is to be loaded
- * during bootstrapping this function needs to be rewritten using some native
- * functions as prototype setup using normal JavaScript does not work as
- * expected during bootstrapping (see mirror.js in r114903).
- *
- * @param {function} ctor Constructor function which needs to inherit the
- * prototype.
- * @param {function} superCtor Constructor function to inherit prototype from.
- */
-exports.inherits = _dereq_('inherits');
-
-exports._extend = function(origin, add) {
- // Don't do anything if add isn't an object
- if (!add || !isObject(add)) return origin;
-
- var keys = Object.keys(add);
- var i = keys.length;
- while (i--) {
- origin[keys[i]] = add[keys[i]];
- }
- return origin;
-};
-
-function hasOwnProperty(obj, prop) {
- return Object.prototype.hasOwnProperty.call(obj, prop);
-}
-
-}).call(this,_dereq_('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./support/isBuffer":4,"_process":3,"inherits":2}],6:[function(_dereq_,module,exports){
-// A recursive descent parser operates by defining functions for all
-// syntactic elements, and recursively calling those, each function
-// advancing the input stream and returning an AST node. Precedence
-// of constructs (for example, the fact that `!x[1]` means `!(x[1])`
-// instead of `(!x)[1]` is handled by the fact that the parser
-// function that parses unary prefix operators is called first, and
-// in turn calls the function that parses `[]` subscripts — that
-// way, it'll receive the node for `x[1]` already parsed, and wraps
-// *that* in the unary operator node.
-//
-// Acorn uses an [operator precedence parser][opp] to handle binary
-// operator precedence, because it is much more compact than using
-// the technique outlined above, which uses different, nesting
-// functions to specify precedence, for all of the ten binary
-// precedence levels that JavaScript defines.
-//
-// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser
-
-"use strict";
-
-var tt = _dereq_("./tokentype").types;
-
-var Parser = _dereq_("./state").Parser;
-
-var reservedWords = _dereq_("./identifier").reservedWords;
-
-var has = _dereq_("./util").has;
-
-var pp = Parser.prototype;
-
-// Check if property name clashes with already added.
-// Object/class getters and setters are not allowed to clash —
-// either with each other or with an init property — and in
-// strict mode, init properties are also not allowed to be repeated.
-
-pp.checkPropClash = function (prop, propHash) {
- if (this.options.ecmaVersion >= 6) return;
- var key = prop.key,
- name = undefined;
- switch (key.type) {
- case "Identifier":
- name = key.name;break;
- case "Literal":
- name = String(key.value);break;
- default:
- return;
- }
- var kind = prop.kind || "init",
- other = undefined;
- if (has(propHash, name)) {
- other = propHash[name];
- var isGetSet = kind !== "init";
- if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raise(key.start, "Redefinition of property");
- } else {
- other = propHash[name] = {
- init: false,
- get: false,
- set: false
- };
- }
- other[kind] = true;
-};
-
-// ### Expression parsing
-
-// These nest, from the most general expression type at the top to
-// 'atomic', nondivisible expression types at the bottom. Most of
-// the functions will simply let the function(s) below them parse,
-// and, *if* the syntactic construct they handle is present, wrap
-// the AST node that the inner parser gave them in another node.
-
-// Parse a full expression. The optional arguments are used to
-// forbid the `in` operator (in for loops initalization expressions)
-// and provide reference for storing '=' operator inside shorthand
-// property assignment in contexts where both object expression
-// and object pattern might appear (so it's possible to raise
-// delayed syntax error at correct position).
-
-pp.parseExpression = function (noIn, refShorthandDefaultPos) {
- var startPos = this.start,
- startLoc = this.startLoc;
- var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos);
- if (this.type === tt.comma) {
- var node = this.startNodeAt(startPos, startLoc);
- node.expressions = [expr];
- while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos));
- return this.finishNode(node, "SequenceExpression");
- }
- return expr;
-};
-
-// Parse an assignment expression. This includes applications of
-// operators like `+=`.
-
-pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) {
- if (this.type == tt._yield && this.inGenerator) return this.parseYield();
-
- var failOnShorthandAssign = undefined;
- if (!refShorthandDefaultPos) {
- refShorthandDefaultPos = { start: 0 };
- failOnShorthandAssign = true;
- } else {
- failOnShorthandAssign = false;
- }
- var startPos = this.start,
- startLoc = this.startLoc;
- if (this.type == tt.parenL || this.type == tt.name) this.potentialArrowAt = this.start;
- var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos);
- if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc);
- if (this.type.isAssign) {
- var node = this.startNodeAt(startPos, startLoc);
- node.operator = this.value;
- node.left = this.type === tt.eq ? this.toAssignable(left) : left;
- refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly
- this.checkLVal(left);
- this.next();
- node.right = this.parseMaybeAssign(noIn);
- return this.finishNode(node, "AssignmentExpression");
- } else if (failOnShorthandAssign && refShorthandDefaultPos.start) {
- this.unexpected(refShorthandDefaultPos.start);
- }
- return left;
-};
-
-// Parse a ternary conditional (`?:`) operator.
-
-pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos) {
- var startPos = this.start,
- startLoc = this.startLoc;
- var expr = this.parseExprOps(noIn, refShorthandDefaultPos);
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
- if (this.eat(tt.question)) {
- var node = this.startNodeAt(startPos, startLoc);
- node.test = expr;
- node.consequent = this.parseMaybeAssign();
- this.expect(tt.colon);
- node.alternate = this.parseMaybeAssign(noIn);
- return this.finishNode(node, "ConditionalExpression");
- }
- return expr;
-};
-
-// Start the precedence parser.
-
-pp.parseExprOps = function (noIn, refShorthandDefaultPos) {
- var startPos = this.start,
- startLoc = this.startLoc;
- var expr = this.parseMaybeUnary(refShorthandDefaultPos);
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
- return this.parseExprOp(expr, startPos, startLoc, -1, noIn);
-};
-
-// Parse binary operators with the operator precedence parsing
-// algorithm. `left` is the left-hand side of the operator.
-// `minPrec` provides context that allows the function to stop and
-// defer further parser to one of its callers when it encounters an
-// operator that has a lower precedence than the set it is parsing.
-
-pp.parseExprOp = function (left, leftStartPos, leftStartLoc, minPrec, noIn) {
- var prec = this.type.binop;
- if (Array.isArray(leftStartPos)) {
- if (this.options.locations && noIn === undefined) {
- // shift arguments to left by one
- noIn = minPrec;
- minPrec = leftStartLoc;
- // flatten leftStartPos
- leftStartLoc = leftStartPos[1];
- leftStartPos = leftStartPos[0];
- }
- }
- if (prec != null && (!noIn || this.type !== tt._in)) {
- if (prec > minPrec) {
- var node = this.startNodeAt(leftStartPos, leftStartLoc);
- node.left = left;
- node.operator = this.value;
- var op = this.type;
- this.next();
- var startPos = this.start,
- startLoc = this.startLoc;
- node.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec, noIn);
- this.finishNode(node, op === tt.logicalOR || op === tt.logicalAND ? "LogicalExpression" : "BinaryExpression");
- return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn);
- }
- }
- return left;
-};
-
-// Parse unary operators, both prefix and postfix.
-
-pp.parseMaybeUnary = function (refShorthandDefaultPos) {
- if (this.type.prefix) {
- var node = this.startNode(),
- update = this.type === tt.incDec;
- node.operator = this.value;
- node.prefix = true;
- this.next();
- node.argument = this.parseMaybeUnary();
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start);
- if (update) this.checkLVal(node.argument);else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") this.raise(node.start, "Deleting local variable in strict mode");
- return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
- }
- var startPos = this.start,
- startLoc = this.startLoc;
- var expr = this.parseExprSubscripts(refShorthandDefaultPos);
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
- while (this.type.postfix && !this.canInsertSemicolon()) {
- var node = this.startNodeAt(startPos, startLoc);
- node.operator = this.value;
- node.prefix = false;
- node.argument = expr;
- this.checkLVal(expr);
- this.next();
- expr = this.finishNode(node, "UpdateExpression");
- }
- return expr;
-};
-
-// Parse call, dot, and `[]`-subscript expressions.
-
-pp.parseExprSubscripts = function (refShorthandDefaultPos) {
- var startPos = this.start,
- startLoc = this.startLoc;
- var expr = this.parseExprAtom(refShorthandDefaultPos);
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
- return this.parseSubscripts(expr, startPos, startLoc);
-};
-
-pp.parseSubscripts = function (base, startPos, startLoc, noCalls) {
- if (Array.isArray(startPos)) {
- if (this.options.locations && noCalls === undefined) {
- // shift arguments to left by one
- noCalls = startLoc;
- // flatten startPos
- startLoc = startPos[1];
- startPos = startPos[0];
- }
- }
- for (;;) {
- if (this.eat(tt.dot)) {
- var node = this.startNodeAt(startPos, startLoc);
- node.object = base;
- node.property = this.parseIdent(true);
- node.computed = false;
- base = this.finishNode(node, "MemberExpression");
- } else if (this.eat(tt.bracketL)) {
- var node = this.startNodeAt(startPos, startLoc);
- node.object = base;
- node.property = this.parseExpression();
- node.computed = true;
- this.expect(tt.bracketR);
- base = this.finishNode(node, "MemberExpression");
- } else if (!noCalls && this.eat(tt.parenL)) {
- var node = this.startNodeAt(startPos, startLoc);
- node.callee = base;
- node.arguments = this.parseExprList(tt.parenR, false);
- base = this.finishNode(node, "CallExpression");
- } else if (this.type === tt.backQuote) {
- var node = this.startNodeAt(startPos, startLoc);
- node.tag = base;
- node.quasi = this.parseTemplate();
- base = this.finishNode(node, "TaggedTemplateExpression");
- } else {
- return base;
- }
- }
-};
-
-// Parse an atomic expression — either a single token that is an
-// expression, an expression started by a keyword like `function` or
-// `new`, or an expression wrapped in punctuation like `()`, `[]`,
-// or `{}`.
-
-pp.parseExprAtom = function (refShorthandDefaultPos) {
- var node = undefined,
- canBeArrow = this.potentialArrowAt == this.start;
- switch (this.type) {
- case tt._this:
- case tt._super:
- var type = this.type === tt._this ? "ThisExpression" : "Super";
- node = this.startNode();
- this.next();
- return this.finishNode(node, type);
-
- case tt._yield:
- if (this.inGenerator) this.unexpected();
-
- case tt.name:
- var startPos = this.start,
- startLoc = this.startLoc;
- var id = this.parseIdent(this.type !== tt.name);
- if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id]);
- return id;
-
- case tt.regexp:
- var value = this.value;
- node = this.parseLiteral(value.value);
- node.regex = { pattern: value.pattern, flags: value.flags };
- return node;
-
- case tt.num:case tt.string:
- return this.parseLiteral(this.value);
-
- case tt._null:case tt._true:case tt._false:
- node = this.startNode();
- node.value = this.type === tt._null ? null : this.type === tt._true;
- node.raw = this.type.keyword;
- this.next();
- return this.finishNode(node, "Literal");
-
- case tt.parenL:
- return this.parseParenAndDistinguishExpression(canBeArrow);
-
- case tt.bracketL:
- node = this.startNode();
- this.next();
- // check whether this is array comprehension or regular array
- if (this.options.ecmaVersion >= 7 && this.type === tt._for) {
- return this.parseComprehension(node, false);
- }
- node.elements = this.parseExprList(tt.bracketR, true, true, refShorthandDefaultPos);
- return this.finishNode(node, "ArrayExpression");
-
- case tt.braceL:
- return this.parseObj(false, refShorthandDefaultPos);
-
- case tt._function:
- node = this.startNode();
- this.next();
- return this.parseFunction(node, false);
-
- case tt._class:
- return this.parseClass(this.startNode(), false);
-
- case tt._new:
- return this.parseNew();
-
- case tt.backQuote:
- return this.parseTemplate();
-
- default:
- this.unexpected();
- }
-};
-
-pp.parseLiteral = function (value) {
- var node = this.startNode();
- node.value = value;
- node.raw = this.input.slice(this.start, this.end);
- this.next();
- return this.finishNode(node, "Literal");
-};
-
-pp.parseParenExpression = function () {
- this.expect(tt.parenL);
- var val = this.parseExpression();
- this.expect(tt.parenR);
- return val;
-};
-
-pp.parseParenAndDistinguishExpression = function (canBeArrow) {
- var startPos = this.start,
- startLoc = this.startLoc,
- val = undefined;
- if (this.options.ecmaVersion >= 6) {
- this.next();
-
- if (this.options.ecmaVersion >= 7 && this.type === tt._for) {
- return this.parseComprehension(this.startNodeAt(startPos, startLoc), true);
- }
-
- var innerStartPos = this.start,
- innerStartLoc = this.startLoc;
- var exprList = [],
- first = true;
- var refShorthandDefaultPos = { start: 0 },
- spreadStart = undefined,
- innerParenStart = undefined;
- while (this.type !== tt.parenR) {
- first ? first = false : this.expect(tt.comma);
- if (this.type === tt.ellipsis) {
- spreadStart = this.start;
- exprList.push(this.parseParenItem(this.parseRest()));
- break;
- } else {
- if (this.type === tt.parenL && !innerParenStart) {
- innerParenStart = this.start;
- }
- exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem));
- }
- }
- var innerEndPos = this.start,
- innerEndLoc = this.startLoc;
- this.expect(tt.parenR);
-
- if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) {
- if (innerParenStart) this.unexpected(innerParenStart);
- return this.parseParenArrowList(startPos, startLoc, exprList);
- }
-
- if (!exprList.length) this.unexpected(this.lastTokStart);
- if (spreadStart) this.unexpected(spreadStart);
- if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start);
-
- if (exprList.length > 1) {
- val = this.startNodeAt(innerStartPos, innerStartLoc);
- val.expressions = exprList;
- this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc);
- } else {
- val = exprList[0];
- }
- } else {
- val = this.parseParenExpression();
- }
-
- if (this.options.preserveParens) {
- var par = this.startNodeAt(startPos, startLoc);
- par.expression = val;
- return this.finishNode(par, "ParenthesizedExpression");
- } else {
- return val;
- }
-};
-
-pp.parseParenItem = function (item) {
- return item;
-};
-
-pp.parseParenArrowList = function (startPos, startLoc, exprList) {
- return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList);
-};
-
-// New's precedence is slightly tricky. It must allow its argument
-// to be a `[]` or dot subscript expression, but not a call — at
-// least, not without wrapping it in parentheses. Thus, it uses the
-
-var empty = [];
-
-pp.parseNew = function () {
- var node = this.startNode();
- var meta = this.parseIdent(true);
- if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) {
- node.meta = meta;
- node.property = this.parseIdent(true);
- if (node.property.name !== "target") this.raise(node.property.start, "The only valid meta property for new is new.target");
- return this.finishNode(node, "MetaProperty");
- }
- var startPos = this.start,
- startLoc = this.startLoc;
- node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true);
- if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false);else node.arguments = empty;
- return this.finishNode(node, "NewExpression");
-};
-
-// Parse template expression.
-
-pp.parseTemplateElement = function () {
- var elem = this.startNode();
- elem.value = {
- raw: this.input.slice(this.start, this.end),
- cooked: this.value
- };
- this.next();
- elem.tail = this.type === tt.backQuote;
- return this.finishNode(elem, "TemplateElement");
-};
-
-pp.parseTemplate = function () {
- var node = this.startNode();
- this.next();
- node.expressions = [];
- var curElt = this.parseTemplateElement();
- node.quasis = [curElt];
- while (!curElt.tail) {
- this.expect(tt.dollarBraceL);
- node.expressions.push(this.parseExpression());
- this.expect(tt.braceR);
- node.quasis.push(curElt = this.parseTemplateElement());
- }
- this.next();
- return this.finishNode(node, "TemplateLiteral");
-};
-
-// Parse an object literal or binding pattern.
-
-pp.parseObj = function (isPattern, refShorthandDefaultPos) {
- var node = this.startNode(),
- first = true,
- propHash = {};
- node.properties = [];
- this.next();
- while (!this.eat(tt.braceR)) {
- if (!first) {
- this.expect(tt.comma);
- if (this.afterTrailingComma(tt.braceR)) break;
- } else first = false;
-
- var prop = this.startNode(),
- isGenerator = undefined,
- startPos = undefined,
- startLoc = undefined;
- if (this.options.ecmaVersion >= 6) {
- prop.method = false;
- prop.shorthand = false;
- if (isPattern || refShorthandDefaultPos) {
- startPos = this.start;
- startLoc = this.startLoc;
- }
- if (!isPattern) isGenerator = this.eat(tt.star);
- }
- this.parsePropertyName(prop);
- this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos);
- this.checkPropClash(prop, propHash);
- node.properties.push(this.finishNode(prop, "Property"));
- }
- return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
-};
-
-pp.parsePropertyValue = function (prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos) {
- if (this.eat(tt.colon)) {
- prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos);
- prop.kind = "init";
- } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) {
- if (isPattern) this.unexpected();
- prop.kind = "init";
- prop.method = true;
- prop.value = this.parseMethod(isGenerator);
- } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type != tt.comma && this.type != tt.braceR)) {
- if (isGenerator || isPattern) this.unexpected();
- prop.kind = prop.key.name;
- this.parsePropertyName(prop);
- prop.value = this.parseMethod(false);
- } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
- prop.kind = "init";
- if (isPattern) {
- if (this.isKeyword(prop.key.name) || this.strict && (reservedWords.strictBind(prop.key.name) || reservedWords.strict(prop.key.name)) || !this.options.allowReserved && this.isReservedWord(prop.key.name)) this.raise(prop.key.start, "Binding " + prop.key.name);
- prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);
- } else if (this.type === tt.eq && refShorthandDefaultPos) {
- if (!refShorthandDefaultPos.start) refShorthandDefaultPos.start = this.start;
- prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key);
- } else {
- prop.value = prop.key;
- }
- prop.shorthand = true;
- } else this.unexpected();
-};
-
-pp.parsePropertyName = function (prop) {
- if (this.options.ecmaVersion >= 6) {
- if (this.eat(tt.bracketL)) {
- prop.computed = true;
- prop.key = this.parseMaybeAssign();
- this.expect(tt.bracketR);
- return prop.key;
- } else {
- prop.computed = false;
- }
- }
- return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true);
-};
-
-// Initialize empty function node.
-
-pp.initFunction = function (node) {
- node.id = null;
- if (this.options.ecmaVersion >= 6) {
- node.generator = false;
- node.expression = false;
- }
-};
-
-// Parse object or class method.
-
-pp.parseMethod = function (isGenerator) {
- var node = this.startNode();
- this.initFunction(node);
- this.expect(tt.parenL);
- node.params = this.parseBindingList(tt.parenR, false, false);
- var allowExpressionBody = undefined;
- if (this.options.ecmaVersion >= 6) {
- node.generator = isGenerator;
- allowExpressionBody = true;
- } else {
- allowExpressionBody = false;
- }
- this.parseFunctionBody(node, allowExpressionBody);
- return this.finishNode(node, "FunctionExpression");
-};
-
-// Parse arrow function expression with given parameters.
-
-pp.parseArrowExpression = function (node, params) {
- this.initFunction(node);
- node.params = this.toAssignableList(params, true);
- this.parseFunctionBody(node, true);
- return this.finishNode(node, "ArrowFunctionExpression");
-};
-
-// Parse function body and check parameters.
-
-pp.parseFunctionBody = function (node, allowExpression) {
- var isExpression = allowExpression && this.type !== tt.braceL;
-
- if (isExpression) {
- node.body = this.parseMaybeAssign();
- node.expression = true;
- } else {
- // Start a new scope with regard to labels and the `inFunction`
- // flag (restore them to their old value afterwards).
- var oldInFunc = this.inFunction,
- oldInGen = this.inGenerator,
- oldLabels = this.labels;
- this.inFunction = true;this.inGenerator = node.generator;this.labels = [];
- node.body = this.parseBlock(true);
- node.expression = false;
- this.inFunction = oldInFunc;this.inGenerator = oldInGen;this.labels = oldLabels;
- }
-
- // If this is a strict mode function, verify that argument names
- // are not repeated, and it does not try to bind the words `eval`
- // or `arguments`.
- if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) {
- var nameHash = {},
- oldStrict = this.strict;
- this.strict = true;
- if (node.id) this.checkLVal(node.id, true);
- for (var i = 0; i < node.params.length; i++) {
- this.checkLVal(node.params[i], true, nameHash);
- }this.strict = oldStrict;
- }
-};
-
-// Parses a comma-separated list of expressions, and returns them as
-// an array. `close` is the token type that ends the list, and
-// `allowEmpty` can be turned on to allow subsequent commas with
-// nothing in between them to be parsed as `null` (which is needed
-// for array literals).
-
-pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refShorthandDefaultPos) {
- var elts = [],
- first = true;
- while (!this.eat(close)) {
- if (!first) {
- this.expect(tt.comma);
- if (allowTrailingComma && this.afterTrailingComma(close)) break;
- } else first = false;
-
- if (allowEmpty && this.type === tt.comma) {
- elts.push(null);
- } else {
- if (this.type === tt.ellipsis) elts.push(this.parseSpread(refShorthandDefaultPos));else elts.push(this.parseMaybeAssign(false, refShorthandDefaultPos));
- }
- }
- return elts;
-};
-
-// Parse the next token as an identifier. If `liberal` is true (used
-// when parsing properties), it will also convert keywords into
-// identifiers.
-
-pp.parseIdent = function (liberal) {
- var node = this.startNode();
- if (liberal && this.options.allowReserved == "never") liberal = false;
- if (this.type === tt.name) {
- if (!liberal && (!this.options.allowReserved && this.isReservedWord(this.value) || this.strict && reservedWords.strict(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1))) this.raise(this.start, "The keyword '" + this.value + "' is reserved");
- node.name = this.value;
- } else if (liberal && this.type.keyword) {
- node.name = this.type.keyword;
- } else {
- this.unexpected();
- }
- this.next();
- return this.finishNode(node, "Identifier");
-};
-
-// Parses yield expression inside generator.
-
-pp.parseYield = function () {
- var node = this.startNode();
- this.next();
- if (this.type == tt.semi || this.canInsertSemicolon() || this.type != tt.star && !this.type.startsExpr) {
- node.delegate = false;
- node.argument = null;
- } else {
- node.delegate = this.eat(tt.star);
- node.argument = this.parseMaybeAssign();
- }
- return this.finishNode(node, "YieldExpression");
-};
-
-// Parses array and generator comprehensions.
-
-pp.parseComprehension = function (node, isGenerator) {
- node.blocks = [];
- while (this.type === tt._for) {
- var block = this.startNode();
- this.next();
- this.expect(tt.parenL);
- block.left = this.parseBindingAtom();
- this.checkLVal(block.left, true);
- this.expectContextual("of");
- block.right = this.parseExpression();
- this.expect(tt.parenR);
- node.blocks.push(this.finishNode(block, "ComprehensionBlock"));
- }
- node.filter = this.eat(tt._if) ? this.parseParenExpression() : null;
- node.body = this.parseExpression();
- this.expect(isGenerator ? tt.parenR : tt.bracketR);
- node.generator = isGenerator;
- return this.finishNode(node, "ComprehensionExpression");
-};
-
-},{"./identifier":7,"./state":13,"./tokentype":17,"./util":18}],7:[function(_dereq_,module,exports){
-
-
-// Test whether a given character code starts an identifier.
-
-"use strict";
-
-exports.isIdentifierStart = isIdentifierStart;
-
-// Test whether a given character is part of an identifier.
-
-exports.isIdentifierChar = isIdentifierChar;
-exports.__esModule = true;
-// This is a trick taken from Esprima. It turns out that, on
-// non-Chrome browsers, to check whether a string is in a set, a
-// predicate containing a big ugly `switch` statement is faster than
-// a regular expression, and on Chrome the two are about on par.
-// This function uses `eval` (non-lexical) to produce such a
-// predicate from a space-separated string of words.
-//
-// It starts by sorting the words by length.
-
-// Removed to create an eval-free library
-
-// Reserved word lists for various dialects of the language
-
-var reservedWords = {
- 3: function anonymous(str) {
-switch(str.length){case 6:switch(str){case "double":case "export":case "import":case "native":case "public":case "static":case "throws":return true}return false;case 4:switch(str){case "byte":case "char":case "enum":case "goto":case "long":return true}return false;case 5:switch(str){case "class":case "final":case "float":case "short":case "super":return true}return false;case 7:switch(str){case "boolean":case "extends":case "package":case "private":return true}return false;case 9:switch(str){case "interface":case "protected":case "transient":return true}return false;case 8:switch(str){case "abstract":case "volatile":return true}return false;case 10:return str === "implements";case 3:return str === "int";case 12:return str === "synchronized";}
-},
- 5: function anonymous(str) {
-switch(str.length){case 5:switch(str){case "class":case "super":case "const":return true}return false;case 6:switch(str){case "export":case "import":return true}return false;case 4:return str === "enum";case 7:return str === "extends";}
-},
- 6: function anonymous(str) {
-switch(str){case "enum":case "await":return true}return false;
-},
- strict: function anonymous(str) {
-switch(str.length){case 9:switch(str){case "interface":case "protected":return true}return false;case 7:switch(str){case "package":case "private":return true}return false;case 6:switch(str){case "public":case "static":return true}return false;case 10:return str === "implements";case 3:return str === "let";case 5:return str === "yield";}
-},
- strictBind: function anonymous(str) {
-switch(str){case "eval":case "arguments":return true}return false;
-}
-};
-
-exports.reservedWords = reservedWords;
-// And the keywords
-
-var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
-
-var keywords = {
- 5: function anonymous(str) {
-switch(str.length){case 4:switch(str){case "case":case "else":case "with":case "null":case "true":case "void":case "this":return true}return false;case 5:switch(str){case "break":case "catch":case "throw":case "while":case "false":return true}return false;case 3:switch(str){case "for":case "try":case "var":case "new":return true}return false;case 6:switch(str){case "return":case "switch":case "typeof":case "delete":return true}return false;case 8:switch(str){case "continue":case "debugger":case "function":return true}return false;case 2:switch(str){case "do":case "if":case "in":return true}return false;case 7:switch(str){case "default":case "finally":return true}return false;case 10:return str === "instanceof";}
-},
- 6: function anonymous(str) {
-switch(str.length){case 5:switch(str){case "break":case "catch":case "throw":case "while":case "false":case "const":case "class":case "yield":case "super":return true}return false;case 4:switch(str){case "case":case "else":case "with":case "null":case "true":case "void":case "this":return true}return false;case 6:switch(str){case "return":case "switch":case "typeof":case "delete":case "export":case "import":return true}return false;case 3:switch(str){case "for":case "try":case "var":case "new":case "let":return true}return false;case 8:switch(str){case "continue":case "debugger":case "function":return true}return false;case 7:switch(str){case "default":case "finally":case "extends":return true}return false;case 2:switch(str){case "do":case "if":case "in":return true}return false;case 10:return str === "instanceof";}
-}
-};
-
-exports.keywords = keywords;
-// ## Character categories
-
-// Big ugly regular expressions that match characters in the
-// whitespace, identifier, and identifier-start categories. These
-// are only applied when a character is found to actually have a
-// code point above 128.
-// Generated by `tools/generate-identifier-regex.js`.
-
-var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";
-var nonASCIIidentifierChars = "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_";
-
-var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
-var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
-
-nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
-
-// These are a run-length and offset encoded representation of the
-// >0xffff code points that are a valid part of identifiers. The
-// offset starts at 0x10000, and each pair of numbers represents an
-// offset to the next range, and then a size of the range. They were
-// generated by tools/generate-identifier-regex.js
-var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 17, 26, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 99, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 98, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 955, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 38, 17, 2, 24, 133, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 32, 4, 287, 47, 21, 1, 2, 0, 185, 46, 82, 47, 21, 0, 60, 42, 502, 63, 32, 0, 449, 56, 1288, 920, 104, 110, 2962, 1070, 13266, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 16481, 1, 3071, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 1340, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 16355, 541];
-var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 16, 9, 83, 11, 168, 11, 6, 9, 8, 2, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 112, 16, 16, 9, 82, 12, 9, 9, 535, 9, 20855, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 4305, 6, 792618, 239];
-
-// This has a complexity linear to the value of the code. The
-// assumption is that looking up astral identifier characters is
-// rare.
-function isInAstralSet(code, set) {
- var pos = 65536;
- for (var i = 0; i < set.length; i += 2) {
- pos += set[i];
- if (pos > code) {
- return false;
- }pos += set[i + 1];
- if (pos >= code) {
- return true;
- }
- }
-}
-function isIdentifierStart(code, astral) {
- if (code < 65) {
- return code === 36;
- }if (code < 91) {
- return true;
- }if (code < 97) {
- return code === 95;
- }if (code < 123) {
- return true;
- }if (code <= 65535) {
- return code >= 170 && nonASCIIidentifierStart.test(String.fromCharCode(code));
- }if (astral === false) {
- return false;
- }return isInAstralSet(code, astralIdentifierStartCodes);
-}
-
-function isIdentifierChar(code, astral) {
- if (code < 48) {
- return code === 36;
- }if (code < 58) {
- return true;
- }if (code < 65) {
- return false;
- }if (code < 91) {
- return true;
- }if (code < 97) {
- return code === 95;
- }if (code < 123) {
- return true;
- }if (code <= 65535) {
- return code >= 170 && nonASCIIidentifier.test(String.fromCharCode(code));
- }if (astral === false) {
- return false;
- }return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
-}
-
-},{}],8:[function(_dereq_,module,exports){
-"use strict";
-
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
-
-// The `getLineInfo` function is mostly useful when the
-// `locations` option is off (for performance reasons) and you
-// want to find the line/column position for a given character
-// offset. `input` should be the code string that the offset refers
-// into.
-
-exports.getLineInfo = getLineInfo;
-exports.__esModule = true;
-
-var Parser = _dereq_("./state").Parser;
-
-var lineBreakG = _dereq_("./whitespace").lineBreakG;
-
-var deprecate = _dereq_("util").deprecate;
-
-// These are used when `options.locations` is on, for the
-// `startLoc` and `endLoc` properties.
-
-var Position = exports.Position = (function () {
- function Position(line, col) {
- _classCallCheck(this, Position);
-
- this.line = line;
- this.column = col;
- }
-
- Position.prototype.offset = function offset(n) {
- return new Position(this.line, this.column + n);
- };
-
- return Position;
-})();
-
-var SourceLocation = exports.SourceLocation = function SourceLocation(p, start, end) {
- _classCallCheck(this, SourceLocation);
-
- this.start = start;
- this.end = end;
- if (p.sourceFile !== null) this.source = p.sourceFile;
-};
-
-function getLineInfo(input, offset) {
- for (var line = 1, cur = 0;;) {
- lineBreakG.lastIndex = cur;
- var match = lineBreakG.exec(input);
- if (match && match.index < offset) {
- ++line;
- cur = match.index + match[0].length;
- } else {
- return new Position(line, offset - cur);
- }
- }
-}
-
-var pp = Parser.prototype;
-
-// This function is used to raise exceptions on parse errors. It
-// takes an offset integer (into the current `input`) to indicate
-// the location of the error, attaches the position to the end
-// of the error message, and then raises a `SyntaxError` with that
-// message.
-
-pp.raise = function (pos, message) {
- var loc = getLineInfo(this.input, pos);
- message += " (" + loc.line + ":" + loc.column + ")";
- var err = new SyntaxError(message);
- err.pos = pos;err.loc = loc;err.raisedAt = this.pos;
- throw err;
-};
-
-pp.curPosition = function () {
- return new Position(this.curLine, this.pos - this.lineStart);
-};
-
-pp.markPosition = function () {
- return this.options.locations ? [this.start, this.startLoc] : this.start;
-};
-
-},{"./state":13,"./whitespace":19,"util":5}],9:[function(_dereq_,module,exports){
-"use strict";
-
-var tt = _dereq_("./tokentype").types;
-
-var Parser = _dereq_("./state").Parser;
-
-var reservedWords = _dereq_("./identifier").reservedWords;
-
-var has = _dereq_("./util").has;
-
-var pp = Parser.prototype;
-
-// Convert existing expression atom to assignable pattern
-// if possible.
-
-pp.toAssignable = function (node, isBinding) {
- if (this.options.ecmaVersion >= 6 && node) {
- switch (node.type) {
- case "Identifier":
- case "ObjectPattern":
- case "ArrayPattern":
- case "AssignmentPattern":
- break;
-
- case "ObjectExpression":
- node.type = "ObjectPattern";
- for (var i = 0; i < node.properties.length; i++) {
- var prop = node.properties[i];
- if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter");
- this.toAssignable(prop.value, isBinding);
- }
- break;
-
- case "ArrayExpression":
- node.type = "ArrayPattern";
- this.toAssignableList(node.elements, isBinding);
- break;
-
- case "AssignmentExpression":
- if (node.operator === "=") {
- node.type = "AssignmentPattern";
- } else {
- this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
- }
- break;
-
- case "ParenthesizedExpression":
- node.expression = this.toAssignable(node.expression, isBinding);
- break;
-
- case "MemberExpression":
- if (!isBinding) break;
-
- default:
- this.raise(node.start, "Assigning to rvalue");
- }
- }
- return node;
-};
-
-// Convert list of expression atoms to binding list.
-
-pp.toAssignableList = function (exprList, isBinding) {
- var end = exprList.length;
- if (end) {
- var last = exprList[end - 1];
- if (last && last.type == "RestElement") {
- --end;
- } else if (last && last.type == "SpreadElement") {
- last.type = "RestElement";
- var arg = last.argument;
- this.toAssignable(arg, isBinding);
- if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") this.unexpected(arg.start);
- --end;
- }
- }
- for (var i = 0; i < end; i++) {
- var elt = exprList[i];
- if (elt) this.toAssignable(elt, isBinding);
- }
- return exprList;
-};
-
-// Parses spread element.
-
-pp.parseSpread = function (refShorthandDefaultPos) {
- var node = this.startNode();
- this.next();
- node.argument = this.parseMaybeAssign(refShorthandDefaultPos);
- return this.finishNode(node, "SpreadElement");
-};
-
-pp.parseRest = function () {
- var node = this.startNode();
- this.next();
- node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected();
- return this.finishNode(node, "RestElement");
-};
-
-// Parses lvalue (assignable) atom.
-
-pp.parseBindingAtom = function () {
- if (this.options.ecmaVersion < 6) return this.parseIdent();
- switch (this.type) {
- case tt.name:
- return this.parseIdent();
-
- case tt.bracketL:
- var node = this.startNode();
- this.next();
- node.elements = this.parseBindingList(tt.bracketR, true, true);
- return this.finishNode(node, "ArrayPattern");
-
- case tt.braceL:
- return this.parseObj(true);
-
- default:
- this.unexpected();
- }
-};
-
-pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) {
- var elts = [],
- first = true;
- while (!this.eat(close)) {
- if (first) first = false;else this.expect(tt.comma);
- if (allowEmpty && this.type === tt.comma) {
- elts.push(null);
- } else if (allowTrailingComma && this.afterTrailingComma(close)) {
- break;
- } else if (this.type === tt.ellipsis) {
- var rest = this.parseRest();
- this.parseBindingListItem(rest);
- elts.push(rest);
- this.expect(close);
- break;
- } else {
- var elem = this.parseMaybeDefault(this.start, this.startLoc);
- this.parseBindingListItem(elem);
- elts.push(elem);
- }
- }
- return elts;
-};
-
-pp.parseBindingListItem = function (param) {
- return param;
-};
-
-// Parses assignment pattern around given atom if possible.
-
-pp.parseMaybeDefault = function (startPos, startLoc, left) {
- if (Array.isArray(startPos)) {
- if (this.options.locations && noCalls === undefined) {
- // shift arguments to left by one
- left = startLoc;
- // flatten startPos
- startLoc = startPos[1];
- startPos = startPos[0];
- }
- }
- left = left || this.parseBindingAtom();
- if (!this.eat(tt.eq)) return left;
- var node = this.startNodeAt(startPos, startLoc);
- node.operator = "=";
- node.left = left;
- node.right = this.parseMaybeAssign();
- return this.finishNode(node, "AssignmentPattern");
-};
-
-// Verify that a node is an lval — something that can be assigned
-// to.
-
-pp.checkLVal = function (expr, isBinding, checkClashes) {
- switch (expr.type) {
- case "Identifier":
- if (this.strict && (reservedWords.strictBind(expr.name) || reservedWords.strict(expr.name))) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode");
- if (checkClashes) {
- if (has(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash in strict mode");
- checkClashes[expr.name] = true;
- }
- break;
-
- case "MemberExpression":
- if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression");
- break;
-
- case "ObjectPattern":
- for (var i = 0; i < expr.properties.length; i++) {
- this.checkLVal(expr.properties[i].value, isBinding, checkClashes);
- }break;
-
- case "ArrayPattern":
- for (var i = 0; i < expr.elements.length; i++) {
- var elem = expr.elements[i];
- if (elem) this.checkLVal(elem, isBinding, checkClashes);
- }
- break;
-
- case "AssignmentPattern":
- this.checkLVal(expr.left, isBinding, checkClashes);
- break;
-
- case "RestElement":
- this.checkLVal(expr.argument, isBinding, checkClashes);
- break;
-
- case "ParenthesizedExpression":
- this.checkLVal(expr.expression, isBinding, checkClashes);
- break;
-
- default:
- this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue");
- }
-};
-
-},{"./identifier":7,"./state":13,"./tokentype":17,"./util":18}],10:[function(_dereq_,module,exports){
-"use strict";
-
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
-
-exports.__esModule = true;
-
-var Parser = _dereq_("./state").Parser;
-
-var SourceLocation = _dereq_("./location").SourceLocation;
-
-// Start an AST node, attaching a start offset.
-
-var pp = Parser.prototype;
-
-var Node = exports.Node = function Node() {
- _classCallCheck(this, Node);
-};
-
-pp.startNode = function () {
- var node = new Node();
- node.start = this.start;
- if (this.options.locations) node.loc = new SourceLocation(this, this.startLoc);
- if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile;
- if (this.options.ranges) node.range = [this.start, 0];
- return node;
-};
-
-pp.startNodeAt = function (pos, loc) {
- var node = new Node();
- if (Array.isArray(pos)) {
- if (this.options.locations && loc === undefined) {
- // flatten pos
- loc = pos[1];
- pos = pos[0];
- }
- }
- node.start = pos;
- if (this.options.locations) node.loc = new SourceLocation(this, loc);
- if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile;
- if (this.options.ranges) node.range = [pos, 0];
- return node;
-};
-
-// Finish an AST node, adding `type` and `end` properties.
-
-pp.finishNode = function (node, type) {
- node.type = type;
- node.end = this.lastTokEnd;
- if (this.options.locations) node.loc.end = this.lastTokEndLoc;
- if (this.options.ranges) node.range[1] = this.lastTokEnd;
- return node;
-};
-
-// Finish node at given position
-
-pp.finishNodeAt = function (node, type, pos, loc) {
- node.type = type;
- if (Array.isArray(pos)) {
- if (this.options.locations && loc === undefined) {
- // flatten pos
- loc = pos[1];
- pos = pos[0];
- }
- }
- node.end = pos;
- if (this.options.locations) node.loc.end = loc;
- if (this.options.ranges) node.range[1] = pos;
- return node;
-};
-
-},{"./location":8,"./state":13}],11:[function(_dereq_,module,exports){
-
-
-// Interpret and default an options object
-
-"use strict";
-
-exports.getOptions = getOptions;
-exports.__esModule = true;
-
-var _util = _dereq_("./util");
-
-var has = _util.has;
-var isArray = _util.isArray;
-
-var SourceLocation = _dereq_("./location").SourceLocation;
-
-// A second optional argument can be given to further configure
-// the parser process. These options are recognized:
-
-var defaultOptions = {
- // `ecmaVersion` indicates the ECMAScript version to parse. Must
- // be either 3, or 5, or 6. This influences support for strict
- // mode, the set of reserved words, support for getters and
- // setters and other features.
- ecmaVersion: 5,
- // Source type ("script" or "module") for different semantics
- sourceType: "script",
- // `onInsertedSemicolon` can be a callback that will be called
- // when a semicolon is automatically inserted. It will be passed
- // th position of the comma as an offset, and if `locations` is
- // enabled, it is given the location as a `{line, column}` object
- // as second argument.
- onInsertedSemicolon: null,
- // `onTrailingComma` is similar to `onInsertedSemicolon`, but for
- // trailing commas.
- onTrailingComma: null,
- // By default, reserved words are not enforced. Disable
- // `allowReserved` to enforce them. When this option has the
- // value "never", reserved words and keywords can also not be
- // used as property names.
- allowReserved: true,
- // When enabled, a return at the top level is not considered an
- // error.
- allowReturnOutsideFunction: false,
- // When enabled, import/export statements are not constrained to
- // appearing at the top of the program.
- allowImportExportEverywhere: false,
- // When enabled, hashbang directive in the beginning of file
- // is allowed and treated as a line comment.
- allowHashBang: false,
- // When `locations` is on, `loc` properties holding objects with
- // `start` and `end` properties in `{line, column}` form (with
- // line being 1-based and column 0-based) will be attached to the
- // nodes.
- locations: false,
- // A function can be passed as `onToken` option, which will
- // cause Acorn to call that function with object in the same
- // format as tokenize() returns. Note that you are not
- // allowed to call the parser from the callback—that will
- // corrupt its internal state.
- onToken: null,
- // A function can be passed as `onComment` option, which will
- // cause Acorn to call that function with `(block, text, start,
- // end)` parameters whenever a comment is skipped. `block` is a
- // boolean indicating whether this is a block (`/* */`) comment,
- // `text` is the content of the comment, and `start` and `end` are
- // character offsets that denote the start and end of the comment.
- // When the `locations` option is on, two more parameters are
- // passed, the full `{line, column}` locations of the start and
- // end of the comments. Note that you are not allowed to call the
- // parser from the callback—that will corrupt its internal state.
- onComment: null,
- // Nodes have their start and end characters offsets recorded in
- // `start` and `end` properties (directly on the node, rather than
- // the `loc` object, which holds line/column data. To also add a
- // [semi-standardized][range] `range` property holding a `[start,
- // end]` array with the same numbers, set the `ranges` option to
- // `true`.
- //
- // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
- ranges: false,
- // It is possible to parse multiple files into a single AST by
- // passing the tree produced by parsing the first file as
- // `program` option in subsequent parses. This will add the
- // toplevel forms of the parsed file to the `Program` (top) node
- // of an existing parse tree.
- program: null,
- // When `locations` is on, you can pass this to record the source
- // file in every node's `loc` object.
- sourceFile: null,
- // This value, if given, is stored in every node, whether
- // `locations` is on or off.
- directSourceFile: null,
- // When enabled, parenthesized expressions are represented by
- // (non-standard) ParenthesizedExpression nodes
- preserveParens: false,
- plugins: {}
-};exports.defaultOptions = defaultOptions;
-
-function getOptions(opts) {
- var options = {};
- for (var opt in defaultOptions) {
- options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt];
- }if (isArray(options.onToken)) {
- (function () {
- var tokens = options.onToken;
- options.onToken = function (token) {
- return tokens.push(token);
- };
- })();
- }
- if (isArray(options.onComment)) options.onComment = pushComment(options, options.onComment);
-
- return options;
-}
-
-function pushComment(options, array) {
- return function (block, text, start, end, startLoc, endLoc) {
- var comment = {
- type: block ? "Block" : "Line",
- value: text,
- start: start,
- end: end
- };
- if (options.locations) comment.loc = new SourceLocation(this, startLoc, endLoc);
- if (options.ranges) comment.range = [start, end];
- array.push(comment);
- };
-}
-
-},{"./location":8,"./util":18}],12:[function(_dereq_,module,exports){
-"use strict";
-
-var tt = _dereq_("./tokentype").types;
-
-var Parser = _dereq_("./state").Parser;
-
-var lineBreak = _dereq_("./whitespace").lineBreak;
-
-var pp = Parser.prototype;
-
-// ## Parser utilities
-
-// Test whether a statement node is the string literal `"use strict"`.
-
-pp.isUseStrict = function (stmt) {
- return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.value === "use strict";
-};
-
-// Predicate that tests whether the next token is of the given
-// type, and if yes, consumes it as a side effect.
-
-pp.eat = function (type) {
- if (this.type === type) {
- this.next();
- return true;
- } else {
- return false;
- }
-};
-
-// Tests whether parsed token is a contextual keyword.
-
-pp.isContextual = function (name) {
- return this.type === tt.name && this.value === name;
-};
-
-// Consumes contextual keyword if possible.
-
-pp.eatContextual = function (name) {
- return this.value === name && this.eat(tt.name);
-};
-
-// Asserts that following token is given contextual keyword.
-
-pp.expectContextual = function (name) {
- if (!this.eatContextual(name)) this.unexpected();
-};
-
-// Test whether a semicolon can be inserted at the current position.
-
-pp.canInsertSemicolon = function () {
- return this.type === tt.eof || this.type === tt.braceR || lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
-};
-
-pp.insertSemicolon = function () {
- if (this.canInsertSemicolon()) {
- if (this.options.onInsertedSemicolon) this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc);
- return true;
- }
-};
-
-// Consume a semicolon, or, failing that, see if we are allowed to
-// pretend that there is a semicolon at this position.
-
-pp.semicolon = function () {
- if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected();
-};
-
-pp.afterTrailingComma = function (tokType) {
- if (this.type == tokType) {
- if (this.options.onTrailingComma) this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc);
- this.next();
- return true;
- }
-};
-
-// Expect a token of a given type. If found, consume it, otherwise,
-// raise an unexpected token error.
-
-pp.expect = function (type) {
- this.eat(type) || this.unexpected();
-};
-
-// Raise an unexpected token error.
-
-pp.unexpected = function (pos) {
- this.raise(pos != null ? pos : this.start, "Unexpected token");
-};
-
-},{"./state":13,"./tokentype":17,"./whitespace":19}],13:[function(_dereq_,module,exports){
-"use strict";
-
-exports.Parser = Parser;
-exports.__esModule = true;
-
-var _identifier = _dereq_("./identifier");
-
-var reservedWords = _identifier.reservedWords;
-var keywords = _identifier.keywords;
-
-var tt = _dereq_("./tokentype").types;
-
-var lineBreak = _dereq_("./whitespace").lineBreak;
-
-function Parser(options, input, startPos) {
- this.options = options;
- this.sourceFile = this.options.sourceFile || null;
- this.isKeyword = keywords[this.options.ecmaVersion >= 6 ? 6 : 5];
- this.isReservedWord = reservedWords[this.options.ecmaVersion];
- this.input = input;
-
- // Load plugins
- this.loadPlugins(this.options.plugins);
-
- // Set up token state
-
- // The current position of the tokenizer in the input.
- if (startPos) {
- this.pos = startPos;
- this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos));
- this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length;
- } else {
- this.pos = this.lineStart = 0;
- this.curLine = 1;
- }
-
- // Properties of the current token:
- // Its type
- this.type = tt.eof;
- // For tokens that include more information than their type, the value
- this.value = null;
- // Its start and end offset
- this.start = this.end = this.pos;
- // And, if locations are used, the {line, column} object
- // corresponding to those offsets
- this.startLoc = this.endLoc = null;
-
- // Position information for the previous token
- this.lastTokEndLoc = this.lastTokStartLoc = null;
- this.lastTokStart = this.lastTokEnd = this.pos;
-
- // The context stack is used to superficially track syntactic
- // context to predict whether a regular expression is allowed in a
- // given position.
- this.context = this.initialContext();
- this.exprAllowed = true;
-
- // Figure out if it's a module code.
- this.strict = this.inModule = this.options.sourceType === "module";
-
- // Used to signify the start of a potential arrow function
- this.potentialArrowAt = -1;
-
- // Flags to track whether we are in a function, a generator.
- this.inFunction = this.inGenerator = false;
- // Labels in scope.
- this.labels = [];
-
- // If enabled, skip leading hashbang line.
- if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2);
-}
-
-Parser.prototype.extend = function (name, f) {
- this[name] = f(this[name]);
-};
-
-// Registered plugins
-
-var plugins = {};
-
-exports.plugins = plugins;
-Parser.prototype.loadPlugins = function (plugins) {
- for (var _name in plugins) {
- var plugin = exports.plugins[_name];
- if (!plugin) throw new Error("Plugin '" + _name + "' not found");
- plugin(this, plugins[_name]);
- }
-};
-
-},{"./identifier":7,"./tokentype":17,"./whitespace":19}],14:[function(_dereq_,module,exports){
-"use strict";
-
-var tt = _dereq_("./tokentype").types;
-
-var Parser = _dereq_("./state").Parser;
-
-var lineBreak = _dereq_("./whitespace").lineBreak;
-
-var pp = Parser.prototype;
-
-// ### Statement parsing
-
-// Parse a program. Initializes the parser, reads any number of
-// statements, and wraps them in a Program node. Optionally takes a
-// `program` argument. If present, the statements will be appended
-// to its body instead of creating a new node.
-
-pp.parseTopLevel = function (node) {
- var first = true;
- if (!node.body) node.body = [];
- while (this.type !== tt.eof) {
- var stmt = this.parseStatement(true, true);
- node.body.push(stmt);
- if (first && this.isUseStrict(stmt)) this.setStrict(true);
- first = false;
- }
- this.next();
- if (this.options.ecmaVersion >= 6) {
- node.sourceType = this.options.sourceType;
- }
- return this.finishNode(node, "Program");
-};
-
-var loopLabel = { kind: "loop" },
- switchLabel = { kind: "switch" };
-
-// Parse a single statement.
-//
-// If expecting a statement and finding a slash operator, parse a
-// regular expression literal. This is to handle cases like
-// `if (foo) /blah/.exec(foo)`, where looking at the previous token
-// does not help.
-
-pp.parseStatement = function (declaration, topLevel) {
- var starttype = this.type,
- node = this.startNode();
-
- // Most types of statements are recognized by the keyword they
- // start with. Many are trivial to parse, some require a bit of
- // complexity.
-
- switch (starttype) {
- case tt._break:case tt._continue:
- return this.parseBreakContinueStatement(node, starttype.keyword);
- case tt._debugger:
- return this.parseDebuggerStatement(node);
- case tt._do:
- return this.parseDoStatement(node);
- case tt._for:
- return this.parseForStatement(node);
- case tt._function:
- if (!declaration && this.options.ecmaVersion >= 6) this.unexpected();
- return this.parseFunctionStatement(node);
- case tt._class:
- if (!declaration) this.unexpected();
- return this.parseClass(node, true);
- case tt._if:
- return this.parseIfStatement(node);
- case tt._return:
- return this.parseReturnStatement(node);
- case tt._switch:
- return this.parseSwitchStatement(node);
- case tt._throw:
- return this.parseThrowStatement(node);
- case tt._try:
- return this.parseTryStatement(node);
- case tt._let:case tt._const:
- if (!declaration) this.unexpected(); // NOTE: falls through to _var
- case tt._var:
- return this.parseVarStatement(node, starttype);
- case tt._while:
- return this.parseWhileStatement(node);
- case tt._with:
- return this.parseWithStatement(node);
- case tt.braceL:
- return this.parseBlock();
- case tt.semi:
- return this.parseEmptyStatement(node);
- case tt._export:
- case tt._import:
- if (!this.options.allowImportExportEverywhere) {
- if (!topLevel) this.raise(this.start, "'import' and 'export' may only appear at the top level");
- if (!this.inModule) this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
- }
- return starttype === tt._import ? this.parseImport(node) : this.parseExport(node);
-
- // If the statement does not start with a statement keyword or a
- // brace, it's an ExpressionStatement or LabeledStatement. We
- // simply start parsing an expression, and afterwards, if the
- // next token is a colon and the expression was a simple
- // Identifier node, we switch to interpreting it as a label.
- default:
- var maybeName = this.value,
- expr = this.parseExpression();
- if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) return this.parseLabeledStatement(node, maybeName, expr);else return this.parseExpressionStatement(node, expr);
- }
-};
-
-pp.parseBreakContinueStatement = function (node, keyword) {
- var isBreak = keyword == "break";
- this.next();
- if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null;else if (this.type !== tt.name) this.unexpected();else {
- node.label = this.parseIdent();
- this.semicolon();
- }
-
- // Verify that there is an actual destination to break or
- // continue to.
- for (var i = 0; i < this.labels.length; ++i) {
- var lab = this.labels[i];
- if (node.label == null || lab.name === node.label.name) {
- if (lab.kind != null && (isBreak || lab.kind === "loop")) break;
- if (node.label && isBreak) break;
- }
- }
- if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword);
- return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
-};
-
-pp.parseDebuggerStatement = function (node) {
- this.next();
- this.semicolon();
- return this.finishNode(node, "DebuggerStatement");
-};
-
-pp.parseDoStatement = function (node) {
- this.next();
- this.labels.push(loopLabel);
- node.body = this.parseStatement(false);
- this.labels.pop();
- this.expect(tt._while);
- node.test = this.parseParenExpression();
- if (this.options.ecmaVersion >= 6) this.eat(tt.semi);else this.semicolon();
- return this.finishNode(node, "DoWhileStatement");
-};
-
-// Disambiguating between a `for` and a `for`/`in` or `for`/`of`
-// loop is non-trivial. Basically, we have to parse the init `var`
-// statement or expression, disallowing the `in` operator (see
-// the second parameter to `parseExpression`), and then check
-// whether the next token is `in` or `of`. When there is no init
-// part (semicolon immediately after the opening parenthesis), it
-// is a regular `for` loop.
-
-pp.parseForStatement = function (node) {
- this.next();
- this.labels.push(loopLabel);
- this.expect(tt.parenL);
- if (this.type === tt.semi) return this.parseFor(node, null);
- if (this.type === tt._var || this.type === tt._let || this.type === tt._const) {
- var _init = this.startNode(),
- varKind = this.type;
- this.next();
- this.parseVar(_init, true, varKind);
- this.finishNode(_init, "VariableDeclaration");
- if ((this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(varKind !== tt._var && _init.declarations[0].init)) return this.parseForIn(node, _init);
- return this.parseFor(node, _init);
- }
- var refShorthandDefaultPos = { start: 0 };
- var init = this.parseExpression(true, refShorthandDefaultPos);
- if (this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) {
- this.toAssignable(init);
- this.checkLVal(init);
- return this.parseForIn(node, init);
- } else if (refShorthandDefaultPos.start) {
- this.unexpected(refShorthandDefaultPos.start);
- }
- return this.parseFor(node, init);
-};
-
-pp.parseFunctionStatement = function (node) {
- this.next();
- return this.parseFunction(node, true);
-};
-
-pp.parseIfStatement = function (node) {
- this.next();
- node.test = this.parseParenExpression();
- node.consequent = this.parseStatement(false);
- node.alternate = this.eat(tt._else) ? this.parseStatement(false) : null;
- return this.finishNode(node, "IfStatement");
-};
-
-pp.parseReturnStatement = function (node) {
- if (!this.inFunction && !this.options.allowReturnOutsideFunction) this.raise(this.start, "'return' outside of function");
- this.next();
-
- // In `return` (and `break`/`continue`), the keywords with
- // optional arguments, we eagerly look for a semicolon or the
- // possibility to insert one.
-
- if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null;else {
- node.argument = this.parseExpression();this.semicolon();
- }
- return this.finishNode(node, "ReturnStatement");
-};
-
-pp.parseSwitchStatement = function (node) {
- this.next();
- node.discriminant = this.parseParenExpression();
- node.cases = [];
- this.expect(tt.braceL);
- this.labels.push(switchLabel);
-
- // Statements under must be grouped (by label) in SwitchCase
- // nodes. `cur` is used to keep the node that we are currently
- // adding statements to.
-
- for (var cur, sawDefault; this.type != tt.braceR;) {
- if (this.type === tt._case || this.type === tt._default) {
- var isCase = this.type === tt._case;
- if (cur) this.finishNode(cur, "SwitchCase");
- node.cases.push(cur = this.startNode());
- cur.consequent = [];
- this.next();
- if (isCase) {
- cur.test = this.parseExpression();
- } else {
- if (sawDefault) this.raise(this.lastTokStart, "Multiple default clauses");
- sawDefault = true;
- cur.test = null;
- }
- this.expect(tt.colon);
- } else {
- if (!cur) this.unexpected();
- cur.consequent.push(this.parseStatement(true));
- }
- }
- if (cur) this.finishNode(cur, "SwitchCase");
- this.next(); // Closing brace
- this.labels.pop();
- return this.finishNode(node, "SwitchStatement");
-};
-
-pp.parseThrowStatement = function (node) {
- this.next();
- if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) this.raise(this.lastTokEnd, "Illegal newline after throw");
- node.argument = this.parseExpression();
- this.semicolon();
- return this.finishNode(node, "ThrowStatement");
-};
-
-// Reused empty array added for node fields that are always empty.
-
-var empty = [];
-
-pp.parseTryStatement = function (node) {
- this.next();
- node.block = this.parseBlock();
- node.handler = null;
- if (this.type === tt._catch) {
- var clause = this.startNode();
- this.next();
- this.expect(tt.parenL);
- clause.param = this.parseBindingAtom();
- this.checkLVal(clause.param, true);
- this.expect(tt.parenR);
- clause.guard = null;
- clause.body = this.parseBlock();
- node.handler = this.finishNode(clause, "CatchClause");
- }
- node.guardedHandlers = empty;
- node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null;
- if (!node.handler && !node.finalizer) this.raise(node.start, "Missing catch or finally clause");
- return this.finishNode(node, "TryStatement");
-};
-
-pp.parseVarStatement = function (node, kind) {
- this.next();
- this.parseVar(node, false, kind);
- this.semicolon();
- return this.finishNode(node, "VariableDeclaration");
-};
-
-pp.parseWhileStatement = function (node) {
- this.next();
- node.test = this.parseParenExpression();
- this.labels.push(loopLabel);
- node.body = this.parseStatement(false);
- this.labels.pop();
- return this.finishNode(node, "WhileStatement");
-};
-
-pp.parseWithStatement = function (node) {
- if (this.strict) this.raise(this.start, "'with' in strict mode");
- this.next();
- node.object = this.parseParenExpression();
- node.body = this.parseStatement(false);
- return this.finishNode(node, "WithStatement");
-};
-
-pp.parseEmptyStatement = function (node) {
- this.next();
- return this.finishNode(node, "EmptyStatement");
-};
-
-pp.parseLabeledStatement = function (node, maybeName, expr) {
- for (var i = 0; i < this.labels.length; ++i) {
- if (this.labels[i].name === maybeName) this.raise(expr.start, "Label '" + maybeName + "' is already declared");
- }var kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null;
- this.labels.push({ name: maybeName, kind: kind });
- node.body = this.parseStatement(true);
- this.labels.pop();
- node.label = expr;
- return this.finishNode(node, "LabeledStatement");
-};
-
-pp.parseExpressionStatement = function (node, expr) {
- node.expression = expr;
- this.semicolon();
- return this.finishNode(node, "ExpressionStatement");
-};
-
-// Parse a semicolon-enclosed block of statements, handling `"use
-// strict"` declarations when `allowStrict` is true (used for
-// function bodies).
-
-pp.parseBlock = function (allowStrict) {
- var node = this.startNode(),
- first = true,
- oldStrict = undefined;
- node.body = [];
- this.expect(tt.braceL);
- while (!this.eat(tt.braceR)) {
- var stmt = this.parseStatement(true);
- node.body.push(stmt);
- if (first && allowStrict && this.isUseStrict(stmt)) {
- oldStrict = this.strict;
- this.setStrict(this.strict = true);
- }
- first = false;
- }
- if (oldStrict === false) this.setStrict(false);
- return this.finishNode(node, "BlockStatement");
-};
-
-// Parse a regular `for` loop. The disambiguation code in
-// `parseStatement` will already have parsed the init statement or
-// expression.
-
-pp.parseFor = function (node, init) {
- node.init = init;
- this.expect(tt.semi);
- node.test = this.type === tt.semi ? null : this.parseExpression();
- this.expect(tt.semi);
- node.update = this.type === tt.parenR ? null : this.parseExpression();
- this.expect(tt.parenR);
- node.body = this.parseStatement(false);
- this.labels.pop();
- return this.finishNode(node, "ForStatement");
-};
-
-// Parse a `for`/`in` and `for`/`of` loop, which are almost
-// same from parser's perspective.
-
-pp.parseForIn = function (node, init) {
- var type = this.type === tt._in ? "ForInStatement" : "ForOfStatement";
- this.next();
- node.left = init;
- node.right = this.parseExpression();
- this.expect(tt.parenR);
- node.body = this.parseStatement(false);
- this.labels.pop();
- return this.finishNode(node, type);
-};
-
-// Parse a list of variable declarations.
-
-pp.parseVar = function (node, isFor, kind) {
- node.declarations = [];
- node.kind = kind.keyword;
- for (;;) {
- var decl = this.startNode();
- this.parseVarId(decl);
- if (this.eat(tt.eq)) {
- decl.init = this.parseMaybeAssign(isFor);
- } else if (kind === tt._const && !(this.type === tt._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
- this.unexpected();
- } else if (decl.id.type != "Identifier" && !(isFor && (this.type === tt._in || this.isContextual("of")))) {
- this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value");
- } else {
- decl.init = null;
- }
- node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
- if (!this.eat(tt.comma)) break;
- }
- return node;
-};
-
-pp.parseVarId = function (decl) {
- decl.id = this.parseBindingAtom();
- this.checkLVal(decl.id, true);
-};
-
-// Parse a function declaration or literal (depending on the
-// `isStatement` parameter).
-
-pp.parseFunction = function (node, isStatement, allowExpressionBody) {
- this.initFunction(node);
- if (this.options.ecmaVersion >= 6) node.generator = this.eat(tt.star);
- if (isStatement || this.type === tt.name) node.id = this.parseIdent();
- this.parseFunctionParams(node);
- this.parseFunctionBody(node, allowExpressionBody);
- return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
-};
-
-pp.parseFunctionParams = function (node) {
- this.expect(tt.parenL);
- node.params = this.parseBindingList(tt.parenR, false, false);
-};
-
-// Parse a class declaration or literal (depending on the
-// `isStatement` parameter).
-
-pp.parseClass = function (node, isStatement) {
- this.next();
- this.parseClassId(node, isStatement);
- this.parseClassSuper(node);
- var classBody = this.startNode();
- var hadConstructor = false;
- classBody.body = [];
- this.expect(tt.braceL);
- while (!this.eat(tt.braceR)) {
- if (this.eat(tt.semi)) continue;
- var method = this.startNode();
- var isGenerator = this.eat(tt.star);
- var isMaybeStatic = this.type === tt.name && this.value === "static";
- this.parsePropertyName(method);
- method["static"] = isMaybeStatic && this.type !== tt.parenL;
- if (method["static"]) {
- if (isGenerator) this.unexpected();
- isGenerator = this.eat(tt.star);
- this.parsePropertyName(method);
- }
- method.kind = "method";
- if (!method.computed) {
- var key = method.key;
-
- var isGetSet = false;
- if (!isGenerator && key.type === "Identifier" && this.type !== tt.parenL && (key.name === "get" || key.name === "set")) {
- isGetSet = true;
- method.kind = key.name;
- key = this.parsePropertyName(method);
- }
- if (!method["static"] && (key.type === "Identifier" && key.name === "constructor" || key.type === "Literal" && key.value === "constructor")) {
- if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class");
- if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier");
- if (isGenerator) this.raise(key.start, "Constructor can't be a generator");
- method.kind = "constructor";
- hadConstructor = true;
- }
- }
- this.parseClassMethod(classBody, method, isGenerator);
- }
- node.body = this.finishNode(classBody, "ClassBody");
- return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
-};
-
-pp.parseClassMethod = function (classBody, method, isGenerator) {
- method.value = this.parseMethod(isGenerator);
- classBody.body.push(this.finishNode(method, "MethodDefinition"));
-};
-
-pp.parseClassId = function (node, isStatement) {
- node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null;
-};
-
-pp.parseClassSuper = function (node) {
- node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null;
-};
-
-// Parses module export declaration.
-
-pp.parseExport = function (node) {
- this.next();
- // export * from '...'
- if (this.eat(tt.star)) {
- this.expectContextual("from");
- node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected();
- this.semicolon();
- return this.finishNode(node, "ExportAllDeclaration");
- }
- if (this.eat(tt._default)) {
- // export default ...
- var expr = this.parseMaybeAssign();
- var needsSemi = true;
- if (expr.type == "FunctionExpression" || expr.type == "ClassExpression") {
- needsSemi = false;
- if (expr.id) {
- expr.type = expr.type == "FunctionExpression" ? "FunctionDeclaration" : "ClassDeclaration";
- }
- }
- node.declaration = expr;
- if (needsSemi) this.semicolon();
- return this.finishNode(node, "ExportDefaultDeclaration");
- }
- // export var|const|let|function|class ...
- if (this.shouldParseExportStatement()) {
- node.declaration = this.parseStatement(true);
- node.specifiers = [];
- node.source = null;
- } else {
- // export { x, y as z } [from '...']
- node.declaration = null;
- node.specifiers = this.parseExportSpecifiers();
- if (this.eatContextual("from")) {
- node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected();
- } else {
- node.source = null;
- }
- this.semicolon();
- }
- return this.finishNode(node, "ExportNamedDeclaration");
-};
-
-pp.shouldParseExportStatement = function () {
- return this.type.keyword;
-};
-
-// Parses a comma-separated list of module exports.
-
-pp.parseExportSpecifiers = function () {
- var nodes = [],
- first = true;
- // export { x, y as z } [from '...']
- this.expect(tt.braceL);
- while (!this.eat(tt.braceR)) {
- if (!first) {
- this.expect(tt.comma);
- if (this.afterTrailingComma(tt.braceR)) break;
- } else first = false;
-
- var node = this.startNode();
- node.local = this.parseIdent(this.type === tt._default);
- node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local;
- nodes.push(this.finishNode(node, "ExportSpecifier"));
- }
- return nodes;
-};
-
-// Parses import declaration.
-
-pp.parseImport = function (node) {
- this.next();
- // import '...'
- if (this.type === tt.string) {
- node.specifiers = empty;
- node.source = this.parseExprAtom();
- node.kind = "";
- } else {
- node.specifiers = this.parseImportSpecifiers();
- this.expectContextual("from");
- node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected();
- }
- this.semicolon();
- return this.finishNode(node, "ImportDeclaration");
-};
-
-// Parses a comma-separated list of module imports.
-
-pp.parseImportSpecifiers = function () {
- var nodes = [],
- first = true;
- if (this.type === tt.name) {
- // import defaultObj, { x, y as z } from '...'
- var node = this.startNode();
- node.local = this.parseIdent();
- this.checkLVal(node.local, true);
- nodes.push(this.finishNode(node, "ImportDefaultSpecifier"));
- if (!this.eat(tt.comma)) return nodes;
- }
- if (this.type === tt.star) {
- var node = this.startNode();
- this.next();
- this.expectContextual("as");
- node.local = this.parseIdent();
- this.checkLVal(node.local, true);
- nodes.push(this.finishNode(node, "ImportNamespaceSpecifier"));
- return nodes;
- }
- this.expect(tt.braceL);
- while (!this.eat(tt.braceR)) {
- if (!first) {
- this.expect(tt.comma);
- if (this.afterTrailingComma(tt.braceR)) break;
- } else first = false;
-
- var node = this.startNode();
- node.imported = this.parseIdent(true);
- node.local = this.eatContextual("as") ? this.parseIdent() : node.imported;
- this.checkLVal(node.local, true);
- nodes.push(this.finishNode(node, "ImportSpecifier"));
- }
- return nodes;
-};
-
-},{"./state":13,"./tokentype":17,"./whitespace":19}],15:[function(_dereq_,module,exports){
-"use strict";
-
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
-
-exports.__esModule = true;
-// The algorithm used to determine whether a regexp can appear at a
-// given point in the program is loosely based on sweet.js' approach.
-// See https://github.com/mozilla/sweet.js/wiki/design
-
-var Parser = _dereq_("./state").Parser;
-
-var tt = _dereq_("./tokentype").types;
-
-var lineBreak = _dereq_("./whitespace").lineBreak;
-
-var TokContext = exports.TokContext = function TokContext(token, isExpr, preserveSpace, override) {
- _classCallCheck(this, TokContext);
-
- this.token = token;
- this.isExpr = isExpr;
- this.preserveSpace = preserveSpace;
- this.override = override;
-};
-
-var types = {
- b_stat: new TokContext("{", false),
- b_expr: new TokContext("{", true),
- b_tmpl: new TokContext("${", true),
- p_stat: new TokContext("(", false),
- p_expr: new TokContext("(", true),
- q_tmpl: new TokContext("`", true, true, function (p) {
- return p.readTmplToken();
- }),
- f_expr: new TokContext("function", true)
-};
-
-exports.types = types;
-var pp = Parser.prototype;
-
-pp.initialContext = function () {
- return [types.b_stat];
-};
-
-pp.braceIsBlock = function (prevType) {
- var parent = undefined;
- if (prevType === tt.colon && (parent = this.curContext()).token == "{") return !parent.isExpr;
- if (prevType === tt._return) return lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
- if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof) return true;
- if (prevType == tt.braceL) return this.curContext() === types.b_stat;
- return !this.exprAllowed;
-};
-
-pp.updateContext = function (prevType) {
- var update = undefined,
- type = this.type;
- if (type.keyword && prevType == tt.dot) this.exprAllowed = false;else if (update = type.updateContext) update.call(this, prevType);else this.exprAllowed = type.beforeExpr;
-};
-
-// Token-specific context update code
-
-tt.parenR.updateContext = tt.braceR.updateContext = function () {
- if (this.context.length == 1) {
- this.exprAllowed = true;
- return;
- }
- var out = this.context.pop();
- if (out === types.b_stat && this.curContext() === types.f_expr) {
- this.context.pop();
- this.exprAllowed = false;
- } else if (out === types.b_tmpl) {
- this.exprAllowed = true;
- } else {
- this.exprAllowed = !out.isExpr;
- }
-};
-
-tt.braceL.updateContext = function (prevType) {
- this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr);
- this.exprAllowed = true;
-};
-
-tt.dollarBraceL.updateContext = function () {
- this.context.push(types.b_tmpl);
- this.exprAllowed = true;
-};
-
-tt.parenL.updateContext = function (prevType) {
- var statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while;
- this.context.push(statementParens ? types.p_stat : types.p_expr);
- this.exprAllowed = true;
-};
-
-tt.incDec.updateContext = function () {};
-
-tt._function.updateContext = function () {
- if (this.curContext() !== types.b_stat) this.context.push(types.f_expr);
- this.exprAllowed = false;
-};
-
-tt.backQuote.updateContext = function () {
- if (this.curContext() === types.q_tmpl) this.context.pop();else this.context.push(types.q_tmpl);
- this.exprAllowed = false;
-};
-
-// tokExprAllowed stays unchanged
-
-},{"./state":13,"./tokentype":17,"./whitespace":19}],16:[function(_dereq_,module,exports){
-"use strict";
-
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
-
-exports.__esModule = true;
-
-var _identifier = _dereq_("./identifier");
-
-var isIdentifierStart = _identifier.isIdentifierStart;
-var isIdentifierChar = _identifier.isIdentifierChar;
-
-var _tokentype = _dereq_("./tokentype");
-
-var tt = _tokentype.types;
-var keywordTypes = _tokentype.keywords;
-
-var Parser = _dereq_("./state").Parser;
-
-var SourceLocation = _dereq_("./location").SourceLocation;
-
-var _whitespace = _dereq_("./whitespace");
-
-var lineBreak = _whitespace.lineBreak;
-var lineBreakG = _whitespace.lineBreakG;
-var isNewLine = _whitespace.isNewLine;
-var nonASCIIwhitespace = _whitespace.nonASCIIwhitespace;
-
-// Object type used to represent tokens. Note that normally, tokens
-// simply exist as properties on the parser object. This is only
-// used for the onToken callback and the external tokenizer.
-
-var Token = exports.Token = function Token(p) {
- _classCallCheck(this, Token);
-
- this.type = p.type;
- this.value = p.value;
- this.start = p.start;
- this.end = p.end;
- if (p.options.locations) this.loc = new SourceLocation(p, p.startLoc, p.endLoc);
- if (p.options.ranges) this.range = [p.start, p.end];
-};
-
-// ## Tokenizer
-
-var pp = Parser.prototype;
-
-// Are we running under Rhino?
-var isRhino = typeof Packages !== "undefined";
-
-// Move to the next token
-
-pp.next = function () {
- if (this.options.onToken) this.options.onToken(new Token(this));
-
- this.lastTokEnd = this.end;
- this.lastTokStart = this.start;
- this.lastTokEndLoc = this.endLoc;
- this.lastTokStartLoc = this.startLoc;
- this.nextToken();
-};
-
-pp.getToken = function () {
- this.next();
- return new Token(this);
-};
-
-// If we're in an ES6 environment, make parsers iterable
-if (typeof Symbol !== "undefined") pp[Symbol.iterator] = function () {
- var self = this;
- return { next: function next() {
- var token = self.getToken();
- return {
- done: token.type === tt.eof,
- value: token
- };
- } };
-};
-
-// Toggle strict mode. Re-reads the next number or string to please
-// pedantic tests (`"use strict"; 010;` should fail).
-
-pp.setStrict = function (strict) {
- this.strict = strict;
- if (this.type !== tt.num && this.type !== tt.string) return;
- this.pos = this.start;
- if (this.options.locations) {
- while (this.pos < this.lineStart) {
- this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1;
- --this.curLine;
- }
- }
- this.nextToken();
-};
-
-pp.curContext = function () {
- return this.context[this.context.length - 1];
-};
-
-// Read a single token, updating the parser object's token-related
-// properties.
-
-pp.nextToken = function () {
- var curContext = this.curContext();
- if (!curContext || !curContext.preserveSpace) this.skipSpace();
-
- this.start = this.pos;
- if (this.options.locations) this.startLoc = this.curPosition();
- if (this.pos >= this.input.length) return this.finishToken(tt.eof);
-
- if (curContext.override) return curContext.override(this);else this.readToken(this.fullCharCodeAtPos());
-};
-
-pp.readToken = function (code) {
- // Identifier or keyword. '\uXXXX' sequences are allowed in
- // identifiers, so '\' also dispatches to that.
- if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) return this.readWord();
-
- return this.getTokenFromCode(code);
-};
-
-pp.fullCharCodeAtPos = function () {
- var code = this.input.charCodeAt(this.pos);
- if (code <= 55295 || code >= 57344) return code;
- var next = this.input.charCodeAt(this.pos + 1);
- return (code << 10) + next - 56613888;
-};
-
-pp.skipBlockComment = function () {
- var startLoc = this.options.onComment && this.options.locations && this.curPosition();
- var start = this.pos,
- end = this.input.indexOf("*/", this.pos += 2);
- if (end === -1) this.raise(this.pos - 2, "Unterminated comment");
- this.pos = end + 2;
- if (this.options.locations) {
- lineBreakG.lastIndex = start;
- var match = undefined;
- while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {
- ++this.curLine;
- this.lineStart = match.index + match[0].length;
- }
- }
- if (this.options.onComment) this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.options.locations && this.curPosition());
-};
-
-pp.skipLineComment = function (startSkip) {
- var start = this.pos;
- var startLoc = this.options.onComment && this.options.locations && this.curPosition();
- var ch = this.input.charCodeAt(this.pos += startSkip);
- while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
- ++this.pos;
- ch = this.input.charCodeAt(this.pos);
- }
- if (this.options.onComment) this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.options.locations && this.curPosition());
-};
-
-// Called at the start of the parse and after every token. Skips
-// whitespace and comments, and.
-
-pp.skipSpace = function () {
- while (this.pos < this.input.length) {
- var ch = this.input.charCodeAt(this.pos);
- if (ch === 32) {
- // ' '
- ++this.pos;
- } else if (ch === 13) {
- ++this.pos;
- var next = this.input.charCodeAt(this.pos);
- if (next === 10) {
- ++this.pos;
- }
- if (this.options.locations) {
- ++this.curLine;
- this.lineStart = this.pos;
- }
- } else if (ch === 10 || ch === 8232 || ch === 8233) {
- ++this.pos;
- if (this.options.locations) {
- ++this.curLine;
- this.lineStart = this.pos;
- }
- } else if (ch > 8 && ch < 14) {
- ++this.pos;
- } else if (ch === 47) {
- // '/'
- var next = this.input.charCodeAt(this.pos + 1);
- if (next === 42) {
- // '*'
- this.skipBlockComment();
- } else if (next === 47) {
- // '/'
- this.skipLineComment(2);
- } else break;
- } else if (ch === 160) {
- // '\xa0'
- ++this.pos;
- } else if (ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
- ++this.pos;
- } else {
- break;
- }
- }
-};
-
-// Called at the end of every token. Sets `end`, `val`, and
-// maintains `context` and `exprAllowed`, and skips the space after
-// the token, so that the next one's `start` will point at the
-// right position.
-
-pp.finishToken = function (type, val) {
- this.end = this.pos;
- if (this.options.locations) this.endLoc = this.curPosition();
- var prevType = this.type;
- this.type = type;
- this.value = val;
-
- this.updateContext(prevType);
-};
-
-// ### Token reading
-
-// This is the function that is called to fetch the next token. It
-// is somewhat obscure, because it works in character codes rather
-// than characters, and because operator parsing has been inlined
-// into it.
-//
-// All in the name of speed.
-//
-pp.readToken_dot = function () {
- var next = this.input.charCodeAt(this.pos + 1);
- if (next >= 48 && next <= 57) return this.readNumber(true);
- var next2 = this.input.charCodeAt(this.pos + 2);
- if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) {
- // 46 = dot '.'
- this.pos += 3;
- return this.finishToken(tt.ellipsis);
- } else {
- ++this.pos;
- return this.finishToken(tt.dot);
- }
-};
-
-pp.readToken_slash = function () {
- // '/'
- var next = this.input.charCodeAt(this.pos + 1);
- if (this.exprAllowed) {
- ++this.pos;return this.readRegexp();
- }
- if (next === 61) return this.finishOp(tt.assign, 2);
- return this.finishOp(tt.slash, 1);
-};
-
-pp.readToken_mult_modulo = function (code) {
- // '%*'
- var next = this.input.charCodeAt(this.pos + 1);
- if (next === 61) return this.finishOp(tt.assign, 2);
- return this.finishOp(code === 42 ? tt.star : tt.modulo, 1);
-};
-
-pp.readToken_pipe_amp = function (code) {
- // '|&'
- var next = this.input.charCodeAt(this.pos + 1);
- if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2);
- if (next === 61) return this.finishOp(tt.assign, 2);
- return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1);
-};
-
-pp.readToken_caret = function () {
- // '^'
- var next = this.input.charCodeAt(this.pos + 1);
- if (next === 61) return this.finishOp(tt.assign, 2);
- return this.finishOp(tt.bitwiseXOR, 1);
-};
-
-pp.readToken_plus_min = function (code) {
- // '+-'
- var next = this.input.charCodeAt(this.pos + 1);
- if (next === code) {
- if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) {
- // A `-->` line comment
- this.skipLineComment(3);
- this.skipSpace();
- return this.nextToken();
- }
- return this.finishOp(tt.incDec, 2);
- }
- if (next === 61) return this.finishOp(tt.assign, 2);
- return this.finishOp(tt.plusMin, 1);
-};
-
-pp.readToken_lt_gt = function (code) {
- // '<>'
- var next = this.input.charCodeAt(this.pos + 1);
- var size = 1;
- if (next === code) {
- size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
- if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1);
- return this.finishOp(tt.bitShift, size);
- }
- if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) {
- if (this.inModule) this.unexpected();
- // `<!--`, an XML-style comment that should be interpreted as a line comment
- this.skipLineComment(4);
- this.skipSpace();
- return this.nextToken();
- }
- if (next === 61) size = this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2;
- return this.finishOp(tt.relational, size);
-};
-
-pp.readToken_eq_excl = function (code) {
- // '=!'
- var next = this.input.charCodeAt(this.pos + 1);
- if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2);
- if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) {
- // '=>'
- this.pos += 2;
- return this.finishToken(tt.arrow);
- }
- return this.finishOp(code === 61 ? tt.eq : tt.prefix, 1);
-};
-
-pp.getTokenFromCode = function (code) {
- switch (code) {
- // The interpretation of a dot depends on whether it is followed
- // by a digit or another two dots.
- case 46:
- // '.'
- return this.readToken_dot();
-
- // Punctuation tokens.
- case 40:
- ++this.pos;return this.finishToken(tt.parenL);
- case 41:
- ++this.pos;return this.finishToken(tt.parenR);
- case 59:
- ++this.pos;return this.finishToken(tt.semi);
- case 44:
- ++this.pos;return this.finishToken(tt.comma);
- case 91:
- ++this.pos;return this.finishToken(tt.bracketL);
- case 93:
- ++this.pos;return this.finishToken(tt.bracketR);
- case 123:
- ++this.pos;return this.finishToken(tt.braceL);
- case 125:
- ++this.pos;return this.finishToken(tt.braceR);
- case 58:
- ++this.pos;return this.finishToken(tt.colon);
- case 63:
- ++this.pos;return this.finishToken(tt.question);
-
- case 96:
- // '`'
- if (this.options.ecmaVersion < 6) break;
- ++this.pos;
- return this.finishToken(tt.backQuote);
-
- case 48:
- // '0'
- var next = this.input.charCodeAt(this.pos + 1);
- if (next === 120 || next === 88) return this.readRadixNumber(16); // '0x', '0X' - hex number
- if (this.options.ecmaVersion >= 6) {
- if (next === 111 || next === 79) return this.readRadixNumber(8); // '0o', '0O' - octal number
- if (next === 98 || next === 66) return this.readRadixNumber(2); // '0b', '0B' - binary number
- }
- // Anything else beginning with a digit is an integer, octal
- // number, or float.
- case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:
- // 1-9
- return this.readNumber(false);
-
- // Quotes produce strings.
- case 34:case 39:
- // '"', "'"
- return this.readString(code);
-
- // Operators are parsed inline in tiny state machines. '=' (61) is
- // often referred to. `finishOp` simply skips the amount of
- // characters it is given as second argument, and returns a token
- // of the type given by its first argument.
-
- case 47:
- // '/'
- return this.readToken_slash();
-
- case 37:case 42:
- // '%*'
- return this.readToken_mult_modulo(code);
-
- case 124:case 38:
- // '|&'
- return this.readToken_pipe_amp(code);
-
- case 94:
- // '^'
- return this.readToken_caret();
-
- case 43:case 45:
- // '+-'
- return this.readToken_plus_min(code);
-
- case 60:case 62:
- // '<>'
- return this.readToken_lt_gt(code);
-
- case 61:case 33:
- // '=!'
- return this.readToken_eq_excl(code);
-
- case 126:
- // '~'
- return this.finishOp(tt.prefix, 1);
- }
-
- this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'");
-};
-
-pp.finishOp = function (type, size) {
- var str = this.input.slice(this.pos, this.pos + size);
- this.pos += size;
- return this.finishToken(type, str);
-};
-
-var regexpUnicodeSupport = false;
-try {
- new RegExp("￿", "u");regexpUnicodeSupport = true;
-} catch (e) {}
-
-// Parse a regular expression. Some context-awareness is necessary,
-// since a '/' inside a '[]' set does not end the expression.
-
-pp.readRegexp = function () {
- var escaped = undefined,
- inClass = undefined,
- start = this.pos;
- for (;;) {
- if (this.pos >= this.input.length) this.raise(start, "Unterminated regular expression");
- var ch = this.input.charAt(this.pos);
- if (lineBreak.test(ch)) this.raise(start, "Unterminated regular expression");
- if (!escaped) {
- if (ch === "[") inClass = true;else if (ch === "]" && inClass) inClass = false;else if (ch === "/" && !inClass) break;
- escaped = ch === "\\";
- } else escaped = false;
- ++this.pos;
- }
- var content = this.input.slice(start, this.pos);
- ++this.pos;
- // Need to use `readWord1` because '\uXXXX' sequences are allowed
- // here (don't ask).
- var mods = this.readWord1();
- var tmp = content;
- if (mods) {
- var validFlags = /^[gmsiy]*$/;
- if (this.options.ecmaVersion >= 6) validFlags = /^[gmsiyu]*$/;
- if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag");
- if (mods.indexOf("u") >= 0 && !regexpUnicodeSupport) {
- // Replace each astral symbol and every Unicode escape sequence that
- // possibly represents an astral symbol or a paired surrogate with a
- // single ASCII symbol to avoid throwing on regular expressions that
- // are only valid in combination with the `/u` flag.
- // Note: replacing with the ASCII symbol `x` might cause false
- // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
- // perfectly valid pattern that is equivalent to `[a-b]`, but it would
- // be replaced by `[x-b]` which throws an error.
- tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|\\u\{([0-9a-fA-F]+)\}|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x");
- }
- }
- // Detect invalid regular expressions.
- var value = null;
- // Rhino's regular expression parser is flaky and throws uncatchable exceptions,
- // so don't do detection if we are running under Rhino
- if (!isRhino) {
- try {
- new RegExp(tmp);
- } catch (e) {
- if (e instanceof SyntaxError) this.raise(start, "Error parsing regular expression: " + e.message);
- this.raise(e);
- }
- // Get a regular expression object for this pattern-flag pair, or `null` in
- // case the current environment doesn't support the flags it uses.
- try {
- value = new RegExp(content, mods);
- } catch (err) {}
- }
- return this.finishToken(tt.regexp, { pattern: content, flags: mods, value: value });
-};
-
-// Read an integer in the given radix. Return null if zero digits
-// were read, the integer value otherwise. When `len` is given, this
-// will return `null` unless the integer has exactly `len` digits.
-
-pp.readInt = function (radix, len) {
- var start = this.pos,
- total = 0;
- for (var i = 0, e = len == null ? Infinity : len; i < e; ++i) {
- var code = this.input.charCodeAt(this.pos),
- val = undefined;
- if (code >= 97) val = code - 97 + 10; // a
- else if (code >= 65) val = code - 65 + 10; // A
- else if (code >= 48 && code <= 57) val = code - 48; // 0-9
- else val = Infinity;
- if (val >= radix) break;
- ++this.pos;
- total = total * radix + val;
- }
- if (this.pos === start || len != null && this.pos - start !== len) return null;
-
- return total;
-};
-
-pp.readRadixNumber = function (radix) {
- this.pos += 2; // 0x
- var val = this.readInt(radix);
- if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix);
- if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number");
- return this.finishToken(tt.num, val);
-};
-
-// Read an integer, octal integer, or floating-point number.
-
-pp.readNumber = function (startsWithDot) {
- var start = this.pos,
- isFloat = false,
- octal = this.input.charCodeAt(this.pos) === 48;
- if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number");
- if (this.input.charCodeAt(this.pos) === 46) {
- ++this.pos;
- this.readInt(10);
- isFloat = true;
- }
- var next = this.input.charCodeAt(this.pos);
- if (next === 69 || next === 101) {
- // 'eE'
- next = this.input.charCodeAt(++this.pos);
- if (next === 43 || next === 45) ++this.pos; // '+-'
- if (this.readInt(10) === null) this.raise(start, "Invalid number");
- isFloat = true;
- }
- if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number");
-
- var str = this.input.slice(start, this.pos),
- val = undefined;
- if (isFloat) val = parseFloat(str);else if (!octal || str.length === 1) val = parseInt(str, 10);else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number");else val = parseInt(str, 8);
- return this.finishToken(tt.num, val);
-};
-
-// Read a string value, interpreting backslash-escapes.
-
-pp.readCodePoint = function () {
- var ch = this.input.charCodeAt(this.pos),
- code = undefined;
-
- if (ch === 123) {
- if (this.options.ecmaVersion < 6) this.unexpected();
- ++this.pos;
- code = this.readHexChar(this.input.indexOf("}", this.pos) - this.pos);
- ++this.pos;
- if (code > 1114111) this.unexpected();
- } else {
- code = this.readHexChar(4);
- }
- return code;
-};
-
-function codePointToString(code) {
- // UTF-16 Decoding
- if (code <= 65535) {
- return String.fromCharCode(code);
- }return String.fromCharCode((code - 65536 >> 10) + 55296, (code - 65536 & 1023) + 56320);
-}
-
-pp.readString = function (quote) {
- var out = "",
- chunkStart = ++this.pos;
- for (;;) {
- if (this.pos >= this.input.length) this.raise(this.start, "Unterminated string constant");
- var ch = this.input.charCodeAt(this.pos);
- if (ch === quote) break;
- if (ch === 92) {
- // '\'
- out += this.input.slice(chunkStart, this.pos);
- out += this.readEscapedChar();
- chunkStart = this.pos;
- } else {
- if (isNewLine(ch)) this.raise(this.start, "Unterminated string constant");
- ++this.pos;
- }
- }
- out += this.input.slice(chunkStart, this.pos++);
- return this.finishToken(tt.string, out);
-};
-
-// Reads template string tokens.
-
-pp.readTmplToken = function () {
- var out = "",
- chunkStart = this.pos;
- for (;;) {
- if (this.pos >= this.input.length) this.raise(this.start, "Unterminated template");
- var ch = this.input.charCodeAt(this.pos);
- if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) {
- // '`', '${'
- if (this.pos === this.start && this.type === tt.template) {
- if (ch === 36) {
- this.pos += 2;
- return this.finishToken(tt.dollarBraceL);
- } else {
- ++this.pos;
- return this.finishToken(tt.backQuote);
- }
- }
- out += this.input.slice(chunkStart, this.pos);
- return this.finishToken(tt.template, out);
- }
- if (ch === 92) {
- // '\'
- out += this.input.slice(chunkStart, this.pos);
- out += this.readEscapedChar();
- chunkStart = this.pos;
- } else if (isNewLine(ch)) {
- out += this.input.slice(chunkStart, this.pos);
- ++this.pos;
- if (ch === 13 && this.input.charCodeAt(this.pos) === 10) {
- ++this.pos;
- out += "\n";
- } else {
- out += String.fromCharCode(ch);
- }
- if (this.options.locations) {
- ++this.curLine;
- this.lineStart = this.pos;
- }
- chunkStart = this.pos;
- } else {
- ++this.pos;
- }
- }
-};
-
-// Used to read escaped characters
-
-pp.readEscapedChar = function () {
- var ch = this.input.charCodeAt(++this.pos);
- var octal = /^[0-7]+/.exec(this.input.slice(this.pos, this.pos + 3));
- if (octal) octal = octal[0];
- while (octal && parseInt(octal, 8) > 255) octal = octal.slice(0, -1);
- if (octal === "0") octal = null;
- ++this.pos;
- if (octal) {
- if (this.strict) this.raise(this.pos - 2, "Octal literal in strict mode");
- this.pos += octal.length - 1;
- return String.fromCharCode(parseInt(octal, 8));
- } else {
- switch (ch) {
- case 110:
- return "\n"; // 'n' -> '\n'
- case 114:
- return "\r"; // 'r' -> '\r'
- case 120:
- return String.fromCharCode(this.readHexChar(2)); // 'x'
- case 117:
- return codePointToString(this.readCodePoint()); // 'u'
- case 116:
- return "\t"; // 't' -> '\t'
- case 98:
- return "\b"; // 'b' -> '\b'
- case 118:
- return "\u000b"; // 'v' -> '\u000b'
- case 102:
- return "\f"; // 'f' -> '\f'
- case 48:
- return "\u0000"; // 0 -> '\0'
- case 13:
- if (this.input.charCodeAt(this.pos) === 10) ++this.pos; // '\r\n'
- case 10:
- // ' \n'
- if (this.options.locations) {
- this.lineStart = this.pos;++this.curLine;
- }
- return "";
- default:
- return String.fromCharCode(ch);
- }
- }
-};
-
-// Used to read character escape sequences ('\x', '\u', '\U').
-
-pp.readHexChar = function (len) {
- var n = this.readInt(16, len);
- if (n === null) this.raise(this.start, "Bad character escape sequence");
- return n;
-};
-
-// Used to signal to callers of `readWord1` whether the word
-// contained any escape sequences. This is needed because words with
-// escape sequences must not be interpreted as keywords.
-
-var containsEsc;
-
-// Read an identifier, and return it as a string. Sets `containsEsc`
-// to whether the word contained a '\u' escape.
-//
-// Incrementally adds only escaped chars, adding other chunks as-is
-// as a micro-optimization.
-
-pp.readWord1 = function () {
- containsEsc = false;
- var word = "",
- first = true,
- chunkStart = this.pos;
- var astral = this.options.ecmaVersion >= 6;
- while (this.pos < this.input.length) {
- var ch = this.fullCharCodeAtPos();
- if (isIdentifierChar(ch, astral)) {
- this.pos += ch <= 65535 ? 1 : 2;
- } else if (ch === 92) {
- // "\"
- containsEsc = true;
- word += this.input.slice(chunkStart, this.pos);
- var escStart = this.pos;
- if (this.input.charCodeAt(++this.pos) != 117) // "u"
- this.raise(this.pos, "Expecting Unicode escape sequence \\uXXXX");
- ++this.pos;
- var esc = this.readCodePoint();
- if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral)) this.raise(escStart, "Invalid Unicode escape");
- word += codePointToString(esc);
- chunkStart = this.pos;
- } else {
- break;
- }
- first = false;
- }
- return word + this.input.slice(chunkStart, this.pos);
-};
-
-// Read an identifier or keyword token. Will check for reserved
-// words when necessary.
-
-pp.readWord = function () {
- var word = this.readWord1();
- var type = tt.name;
- if ((this.options.ecmaVersion >= 6 || !containsEsc) && this.isKeyword(word)) type = keywordTypes[word];
- return this.finishToken(type, word);
-};
-
-},{"./identifier":7,"./location":8,"./state":13,"./tokentype":17,"./whitespace":19}],17:[function(_dereq_,module,exports){
-"use strict";
-
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
-
-exports.__esModule = true;
-// ## Token types
-
-// The assignment of fine-grained, information-carrying type objects
-// allows the tokenizer to store the information it has about a
-// token in a way that is very cheap for the parser to look up.
-
-// All token type variables start with an underscore, to make them
-// easy to recognize.
-
-// The `beforeExpr` property is used to disambiguate between regular
-// expressions and divisions. It is set on all token types that can
-// be followed by an expression (thus, a slash after them would be a
-// regular expression).
-//
-// `isLoop` marks a keyword as starting a loop, which is important
-// to know when parsing a label, in order to allow or disallow
-// continue jumps to that label.
-
-var TokenType = exports.TokenType = function TokenType(label) {
- var conf = arguments[1] === undefined ? {} : arguments[1];
-
- _classCallCheck(this, TokenType);
-
- this.label = label;
- this.keyword = conf.keyword;
- this.beforeExpr = !!conf.beforeExpr;
- this.startsExpr = !!conf.startsExpr;
- this.isLoop = !!conf.isLoop;
- this.isAssign = !!conf.isAssign;
- this.prefix = !!conf.prefix;
- this.postfix = !!conf.postfix;
- this.binop = conf.binop || null;
- this.updateContext = null;
-};
-
-function binop(name, prec) {
- return new TokenType(name, { beforeExpr: true, binop: prec });
-}
-var beforeExpr = { beforeExpr: true },
- startsExpr = { startsExpr: true };
-
-var types = {
- num: new TokenType("num", startsExpr),
- regexp: new TokenType("regexp", startsExpr),
- string: new TokenType("string", startsExpr),
- name: new TokenType("name", startsExpr),
- eof: new TokenType("eof"),
-
- // Punctuation token types.
- bracketL: new TokenType("[", { beforeExpr: true, startsExpr: true }),
- bracketR: new TokenType("]"),
- braceL: new TokenType("{", { beforeExpr: true, startsExpr: true }),
- braceR: new TokenType("}"),
- parenL: new TokenType("(", { beforeExpr: true, startsExpr: true }),
- parenR: new TokenType(")"),
- comma: new TokenType(",", beforeExpr),
- semi: new TokenType(";", beforeExpr),
- colon: new TokenType(":", beforeExpr),
- dot: new TokenType("."),
- question: new TokenType("?", beforeExpr),
- arrow: new TokenType("=>", beforeExpr),
- template: new TokenType("template"),
- ellipsis: new TokenType("...", beforeExpr),
- backQuote: new TokenType("`", startsExpr),
- dollarBraceL: new TokenType("${", { beforeExpr: true, startsExpr: true }),
-
- // Operators. These carry several kinds of properties to help the
- // parser use them properly (the presence of these properties is
- // what categorizes them as operators).
- //
- // `binop`, when present, specifies that this operator is a binary
- // operator, and will refer to its precedence.
- //
- // `prefix` and `postfix` mark the operator as a prefix or postfix
- // unary operator.
- //
- // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
- // binary operators with a very low precedence, that should result
- // in AssignmentExpression nodes.
-
- eq: new TokenType("=", { beforeExpr: true, isAssign: true }),
- assign: new TokenType("_=", { beforeExpr: true, isAssign: true }),
- incDec: new TokenType("++/--", { prefix: true, postfix: true, startsExpr: true }),
- prefix: new TokenType("prefix", { beforeExpr: true, prefix: true, startsExpr: true }),
- logicalOR: binop("||", 1),
- logicalAND: binop("&&", 2),
- bitwiseOR: binop("|", 3),
- bitwiseXOR: binop("^", 4),
- bitwiseAND: binop("&", 5),
- equality: binop("==/!=", 6),
- relational: binop("</>", 7),
- bitShift: binop("<</>>", 8),
- plusMin: new TokenType("+/-", { beforeExpr: true, binop: 9, prefix: true, startsExpr: true }),
- modulo: binop("%", 10),
- star: binop("*", 10),
- slash: binop("/", 10)
-};
-
-exports.types = types;
-// Map keyword names to token types.
-
-var keywords = {};
-
-exports.keywords = keywords;
-// Succinct definitions of keyword token types
-function kw(name) {
- var options = arguments[1] === undefined ? {} : arguments[1];
-
- options.keyword = name;
- keywords[name] = types["_" + name] = new TokenType(name, options);
-}
-
-kw("break");
-kw("case", beforeExpr);
-kw("catch");
-kw("continue");
-kw("debugger");
-kw("default");
-kw("do", { isLoop: true });
-kw("else", beforeExpr);
-kw("finally");
-kw("for", { isLoop: true });
-kw("function", startsExpr);
-kw("if");
-kw("return", beforeExpr);
-kw("switch");
-kw("throw", beforeExpr);
-kw("try");
-kw("var");
-kw("let");
-kw("const");
-kw("while", { isLoop: true });
-kw("with");
-kw("new", { beforeExpr: true, startsExpr: true });
-kw("this", startsExpr);
-kw("super", startsExpr);
-kw("class");
-kw("extends", beforeExpr);
-kw("export");
-kw("import");
-kw("yield", { beforeExpr: true, startsExpr: true });
-kw("null", startsExpr);
-kw("true", startsExpr);
-kw("false", startsExpr);
-kw("in", { beforeExpr: true, binop: 7 });
-kw("instanceof", { beforeExpr: true, binop: 7 });
-kw("typeof", { beforeExpr: true, prefix: true, startsExpr: true });
-kw("void", { beforeExpr: true, prefix: true, startsExpr: true });
-kw("delete", { beforeExpr: true, prefix: true, startsExpr: true });
-
-},{}],18:[function(_dereq_,module,exports){
-"use strict";
-
-exports.isArray = isArray;
-
-// Checks if an object has a property.
-
-exports.has = has;
-exports.__esModule = true;
-
-function isArray(obj) {
- return Object.prototype.toString.call(obj) === "[object Array]";
-}
-
-function has(obj, propName) {
- return Object.prototype.hasOwnProperty.call(obj, propName);
-}
-
-},{}],19:[function(_dereq_,module,exports){
-"use strict";
-
-exports.isNewLine = isNewLine;
-exports.__esModule = true;
-// Matches a whole line break (where CRLF is considered a single
-// line break). Used to count lines.
-
-var lineBreak = /\r\n?|\n|\u2028|\u2029/;
-exports.lineBreak = lineBreak;
-var lineBreakG = new RegExp(lineBreak.source, "g");
-
-exports.lineBreakG = lineBreakG;
-
-function isNewLine(code) {
- return code === 10 || code === 13 || code === 8232 || code == 8233;
-}
-
-var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;
-exports.nonASCIIwhitespace = nonASCIIwhitespace;
-
-},{}]},{},[1])(1)
-}); \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/acorn_loose.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/acorn_loose.js
deleted file mode 100644
index 521e280576..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/acorn_loose.js
+++ /dev/null
@@ -1,1298 +0,0 @@
-(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}(g.acorn || (g.acorn = {})).loose = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
-"use strict";
-
-var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { "default": obj }; };
-
-exports.parse_dammit = parse_dammit;
-exports.__esModule = true;
-// Acorn: Loose parser
-//
-// This module provides an alternative parser (`parse_dammit`) that
-// exposes that same interface as `parse`, but will try to parse
-// anything as JavaScript, repairing syntax error the best it can.
-// There are circumstances in which it will raise an error and give
-// up, but they are very rare. The resulting AST will be a mostly
-// valid JavaScript AST (as per the [Mozilla parser API][api], except
-// that:
-//
-// - Return outside functions is allowed
-//
-// - Label consistency (no conflicts, break only to existing labels)
-// is not enforced.
-//
-// - Bogus Identifier nodes with a name of `"✖"` are inserted whenever
-// the parser got too confused to return anything meaningful.
-//
-// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
-//
-// The expected use for this is to *first* try `acorn.parse`, and only
-// if that fails switch to `parse_dammit`. The loose parser might
-// parse badly indented code incorrectly, so **don't** use it as
-// your default parser.
-//
-// Quite a lot of acorn.js is duplicated here. The alternative was to
-// add a *lot* of extra cruft to that file, making it less readable
-// and slower. Copying and editing the code allowed me to make
-// invasive changes and simplifications without creating a complicated
-// tangle.
-
-var acorn = _interopRequireWildcard(_dereq_(".."));
-
-var _state = _dereq_("./state");
-
-var LooseParser = _state.LooseParser;
-
-_dereq_("./tokenize");
-
-_dereq_("./parseutil");
-
-_dereq_("./statement");
-
-_dereq_("./expression");
-
-exports.LooseParser = _state.LooseParser;
-
-acorn.defaultOptions.tabSize = 4;
-
-function parse_dammit(input, options) {
- var p = new LooseParser(input, options);
- p.next();
- return p.parseTopLevel();
-}
-
-acorn.parse_dammit = parse_dammit;
-acorn.LooseParser = LooseParser;
-
-},{"..":2,"./expression":3,"./parseutil":4,"./state":5,"./statement":6,"./tokenize":7}],2:[function(_dereq_,module,exports){
-"use strict";
-
-module.exports = typeof acorn != "undefined" ? acorn : _dereq_("./acorn");
-
-},{}],3:[function(_dereq_,module,exports){
-"use strict";
-
-var LooseParser = _dereq_("./state").LooseParser;
-
-var isDummy = _dereq_("./parseutil").isDummy;
-
-var tt = _dereq_("..").tokTypes;
-
-var lp = LooseParser.prototype;
-
-lp.checkLVal = function (expr, binding) {
- if (!expr) return expr;
- switch (expr.type) {
- case "Identifier":
- return expr;
-
- case "MemberExpression":
- return binding ? this.dummyIdent() : expr;
-
- case "ParenthesizedExpression":
- expr.expression = this.checkLVal(expr.expression, binding);
- return expr;
-
- // FIXME recursively check contents
- case "ObjectPattern":
- case "ArrayPattern":
- case "RestElement":
- case "AssignmentPattern":
- if (this.options.ecmaVersion >= 6) return expr;
-
- default:
- return this.dummyIdent();
- }
-};
-
-lp.parseExpression = function (noIn) {
- var start = this.storeCurrentPos();
- var expr = this.parseMaybeAssign(noIn);
- if (this.tok.type === tt.comma) {
- var node = this.startNodeAt(start);
- node.expressions = [expr];
- while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn));
- return this.finishNode(node, "SequenceExpression");
- }
- return expr;
-};
-
-lp.parseParenExpression = function () {
- this.pushCx();
- this.expect(tt.parenL);
- var val = this.parseExpression();
- this.popCx();
- this.expect(tt.parenR);
- return val;
-};
-
-lp.parseMaybeAssign = function (noIn) {
- var start = this.storeCurrentPos();
- var left = this.parseMaybeConditional(noIn);
- if (this.tok.type.isAssign) {
- var node = this.startNodeAt(start);
- node.operator = this.tok.value;
- node.left = this.tok.type === tt.eq ? this.toAssignable(left) : this.checkLVal(left);
- this.next();
- node.right = this.parseMaybeAssign(noIn);
- return this.finishNode(node, "AssignmentExpression");
- }
- return left;
-};
-
-lp.parseMaybeConditional = function (noIn) {
- var start = this.storeCurrentPos();
- var expr = this.parseExprOps(noIn);
- if (this.eat(tt.question)) {
- var node = this.startNodeAt(start);
- node.test = expr;
- node.consequent = this.parseMaybeAssign();
- node.alternate = this.expect(tt.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent();
- return this.finishNode(node, "ConditionalExpression");
- }
- return expr;
-};
-
-lp.parseExprOps = function (noIn) {
- var start = this.storeCurrentPos();
- var indent = this.curIndent,
- line = this.curLineStart;
- return this.parseExprOp(this.parseMaybeUnary(noIn), start, -1, noIn, indent, line);
-};
-
-lp.parseExprOp = function (left, start, minPrec, noIn, indent, line) {
- if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) return left;
- var prec = this.tok.type.binop;
- if (prec != null && (!noIn || this.tok.type !== tt._in)) {
- if (prec > minPrec) {
- var node = this.startNodeAt(start);
- node.left = left;
- node.operator = this.tok.value;
- this.next();
- if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) {
- node.right = this.dummyIdent();
- } else {
- var rightStart = this.storeCurrentPos();
- node.right = this.parseExprOp(this.parseMaybeUnary(noIn), rightStart, prec, noIn, indent, line);
- }
- this.finishNode(node, /&&|\|\|/.test(node.operator) ? "LogicalExpression" : "BinaryExpression");
- return this.parseExprOp(node, start, minPrec, noIn, indent, line);
- }
- }
- return left;
-};
-
-lp.parseMaybeUnary = function (noIn) {
- if (this.tok.type.prefix) {
- var node = this.startNode(),
- update = this.tok.type === tt.incDec;
- node.operator = this.tok.value;
- node.prefix = true;
- this.next();
- node.argument = this.parseMaybeUnary(noIn);
- if (update) node.argument = this.checkLVal(node.argument);
- return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
- } else if (this.tok.type === tt.ellipsis) {
- var node = this.startNode();
- this.next();
- node.argument = this.parseMaybeUnary(noIn);
- return this.finishNode(node, "SpreadElement");
- }
- var start = this.storeCurrentPos();
- var expr = this.parseExprSubscripts();
- while (this.tok.type.postfix && !this.canInsertSemicolon()) {
- var node = this.startNodeAt(start);
- node.operator = this.tok.value;
- node.prefix = false;
- node.argument = this.checkLVal(expr);
- this.next();
- expr = this.finishNode(node, "UpdateExpression");
- }
- return expr;
-};
-
-lp.parseExprSubscripts = function () {
- var start = this.storeCurrentPos();
- return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart);
-};
-
-lp.parseSubscripts = function (base, start, noCalls, startIndent, line) {
- for (;;) {
- if (this.curLineStart != line && this.curIndent <= startIndent && this.tokenStartsLine()) {
- if (this.tok.type == tt.dot && this.curIndent == startIndent) --startIndent;else return base;
- }
-
- if (this.eat(tt.dot)) {
- var node = this.startNodeAt(start);
- node.object = base;
- if (this.curLineStart != line && this.curIndent <= startIndent && this.tokenStartsLine()) node.property = this.dummyIdent();else node.property = this.parsePropertyAccessor() || this.dummyIdent();
- node.computed = false;
- base = this.finishNode(node, "MemberExpression");
- } else if (this.tok.type == tt.bracketL) {
- this.pushCx();
- this.next();
- var node = this.startNodeAt(start);
- node.object = base;
- node.property = this.parseExpression();
- node.computed = true;
- this.popCx();
- this.expect(tt.bracketR);
- base = this.finishNode(node, "MemberExpression");
- } else if (!noCalls && this.tok.type == tt.parenL) {
- var node = this.startNodeAt(start);
- node.callee = base;
- node.arguments = this.parseExprList(tt.parenR);
- base = this.finishNode(node, "CallExpression");
- } else if (this.tok.type == tt.backQuote) {
- var node = this.startNodeAt(start);
- node.tag = base;
- node.quasi = this.parseTemplate();
- base = this.finishNode(node, "TaggedTemplateExpression");
- } else {
- return base;
- }
- }
-};
-
-lp.parseExprAtom = function () {
- var node = undefined;
- switch (this.tok.type) {
- case tt._this:
- case tt._super:
- var type = this.tok.type === tt._this ? "ThisExpression" : "Super";
- node = this.startNode();
- this.next();
- return this.finishNode(node, type);
-
- case tt.name:
- var start = this.storeCurrentPos();
- var id = this.parseIdent();
- return this.eat(tt.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id]) : id;
-
- case tt.regexp:
- node = this.startNode();
- var val = this.tok.value;
- node.regex = { pattern: val.pattern, flags: val.flags };
- node.value = val.value;
- node.raw = this.input.slice(this.tok.start, this.tok.end);
- this.next();
- return this.finishNode(node, "Literal");
-
- case tt.num:case tt.string:
- node = this.startNode();
- node.value = this.tok.value;
- node.raw = this.input.slice(this.tok.start, this.tok.end);
- this.next();
- return this.finishNode(node, "Literal");
-
- case tt._null:case tt._true:case tt._false:
- node = this.startNode();
- node.value = this.tok.type === tt._null ? null : this.tok.type === tt._true;
- node.raw = this.tok.type.keyword;
- this.next();
- return this.finishNode(node, "Literal");
-
- case tt.parenL:
- var parenStart = this.storeCurrentPos();
- this.next();
- var inner = this.parseExpression();
- this.expect(tt.parenR);
- if (this.eat(tt.arrow)) {
- return this.parseArrowExpression(this.startNodeAt(parenStart), inner.expressions || (isDummy(inner) ? [] : [inner]));
- }
- if (this.options.preserveParens) {
- var par = this.startNodeAt(parenStart);
- par.expression = inner;
- inner = this.finishNode(par, "ParenthesizedExpression");
- }
- return inner;
-
- case tt.bracketL:
- node = this.startNode();
- node.elements = this.parseExprList(tt.bracketR, true);
- return this.finishNode(node, "ArrayExpression");
-
- case tt.braceL:
- return this.parseObj();
-
- case tt._class:
- return this.parseClass();
-
- case tt._function:
- node = this.startNode();
- this.next();
- return this.parseFunction(node, false);
-
- case tt._new:
- return this.parseNew();
-
- case tt._yield:
- node = this.startNode();
- this.next();
- if (this.semicolon() || this.canInsertSemicolon() || this.tok.type != tt.star && !this.tok.type.startsExpr) {
- node.delegate = false;
- node.argument = null;
- } else {
- node.delegate = this.eat(tt.star);
- node.argument = this.parseMaybeAssign();
- }
- return this.finishNode(node, "YieldExpression");
-
- case tt.backQuote:
- return this.parseTemplate();
-
- default:
- return this.dummyIdent();
- }
-};
-
-lp.parseNew = function () {
- var node = this.startNode(),
- startIndent = this.curIndent,
- line = this.curLineStart;
- var meta = this.parseIdent(true);
- if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) {
- node.meta = meta;
- node.property = this.parseIdent(true);
- return this.finishNode(node, "MetaProperty");
- }
- var start = this.storeCurrentPos();
- node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line);
- if (this.tok.type == tt.parenL) {
- node.arguments = this.parseExprList(tt.parenR);
- } else {
- node.arguments = [];
- }
- return this.finishNode(node, "NewExpression");
-};
-
-lp.parseTemplateElement = function () {
- var elem = this.startNode();
- elem.value = {
- raw: this.input.slice(this.tok.start, this.tok.end),
- cooked: this.tok.value
- };
- this.next();
- elem.tail = this.tok.type === tt.backQuote;
- return this.finishNode(elem, "TemplateElement");
-};
-
-lp.parseTemplate = function () {
- var node = this.startNode();
- this.next();
- node.expressions = [];
- var curElt = this.parseTemplateElement();
- node.quasis = [curElt];
- while (!curElt.tail) {
- this.next();
- node.expressions.push(this.parseExpression());
- if (this.expect(tt.braceR)) {
- curElt = this.parseTemplateElement();
- } else {
- curElt = this.startNode();
- curElt.value = { cooked: "", raw: "" };
- curElt.tail = true;
- }
- node.quasis.push(curElt);
- }
- this.expect(tt.backQuote);
- return this.finishNode(node, "TemplateLiteral");
-};
-
-lp.parseObj = function () {
- var node = this.startNode();
- node.properties = [];
- this.pushCx();
- var indent = this.curIndent + 1,
- line = this.curLineStart;
- this.eat(tt.braceL);
- if (this.curIndent + 1 < indent) {
- indent = this.curIndent;line = this.curLineStart;
- }
- while (!this.closes(tt.braceR, indent, line)) {
- var prop = this.startNode(),
- isGenerator = undefined,
- start = undefined;
- if (this.options.ecmaVersion >= 6) {
- start = this.storeCurrentPos();
- prop.method = false;
- prop.shorthand = false;
- isGenerator = this.eat(tt.star);
- }
- this.parsePropertyName(prop);
- if (isDummy(prop.key)) {
- if (isDummy(this.parseMaybeAssign())) this.next();this.eat(tt.comma);continue;
- }
- if (this.eat(tt.colon)) {
- prop.kind = "init";
- prop.value = this.parseMaybeAssign();
- } else if (this.options.ecmaVersion >= 6 && (this.tok.type === tt.parenL || this.tok.type === tt.braceL)) {
- prop.kind = "init";
- prop.method = true;
- prop.value = this.parseMethod(isGenerator);
- } else if (this.options.ecmaVersion >= 5 && prop.key.type === "Identifier" && !prop.computed && (prop.key.name === "get" || prop.key.name === "set") && (this.tok.type != tt.comma && this.tok.type != tt.braceR)) {
- prop.kind = prop.key.name;
- this.parsePropertyName(prop);
- prop.value = this.parseMethod(false);
- } else {
- prop.kind = "init";
- if (this.options.ecmaVersion >= 6) {
- if (this.eat(tt.eq)) {
- var assign = this.startNodeAt(start);
- assign.operator = "=";
- assign.left = prop.key;
- assign.right = this.parseMaybeAssign();
- prop.value = this.finishNode(assign, "AssignmentExpression");
- } else {
- prop.value = prop.key;
- }
- } else {
- prop.value = this.dummyIdent();
- }
- prop.shorthand = true;
- }
- node.properties.push(this.finishNode(prop, "Property"));
- this.eat(tt.comma);
- }
- this.popCx();
- if (!this.eat(tt.braceR)) {
- // If there is no closing brace, make the node span to the start
- // of the next token (this is useful for Tern)
- this.last.end = this.tok.start;
- if (this.options.locations) this.last.loc.end = this.tok.loc.start;
- }
- return this.finishNode(node, "ObjectExpression");
-};
-
-lp.parsePropertyName = function (prop) {
- if (this.options.ecmaVersion >= 6) {
- if (this.eat(tt.bracketL)) {
- prop.computed = true;
- prop.key = this.parseExpression();
- this.expect(tt.bracketR);
- return;
- } else {
- prop.computed = false;
- }
- }
- var key = this.tok.type === tt.num || this.tok.type === tt.string ? this.parseExprAtom() : this.parseIdent();
- prop.key = key || this.dummyIdent();
-};
-
-lp.parsePropertyAccessor = function () {
- if (this.tok.type === tt.name || this.tok.type.keyword) return this.parseIdent();
-};
-
-lp.parseIdent = function () {
- var name = this.tok.type === tt.name ? this.tok.value : this.tok.type.keyword;
- if (!name) return this.dummyIdent();
- var node = this.startNode();
- this.next();
- node.name = name;
- return this.finishNode(node, "Identifier");
-};
-
-lp.initFunction = function (node) {
- node.id = null;
- node.params = [];
- if (this.options.ecmaVersion >= 6) {
- node.generator = false;
- node.expression = false;
- }
-};
-
-// Convert existing expression atom to assignable pattern
-// if possible.
-
-lp.toAssignable = function (node, binding) {
- if (this.options.ecmaVersion >= 6 && node) {
- switch (node.type) {
- case "ObjectExpression":
- node.type = "ObjectPattern";
- var props = node.properties;
- for (var i = 0; i < props.length; i++) {
- this.toAssignable(props[i].value, binding);
- }break;
-
- case "ArrayExpression":
- node.type = "ArrayPattern";
- this.toAssignableList(node.elements, binding);
- break;
-
- case "SpreadElement":
- node.type = "RestElement";
- node.argument = this.toAssignable(node.argument, binding);
- break;
-
- case "AssignmentExpression":
- node.type = "AssignmentPattern";
- break;
- }
- }
- return this.checkLVal(node, binding);
-};
-
-lp.toAssignableList = function (exprList, binding) {
- for (var i = 0; i < exprList.length; i++) {
- exprList[i] = this.toAssignable(exprList[i], binding);
- }return exprList;
-};
-
-lp.parseFunctionParams = function (params) {
- params = this.parseExprList(tt.parenR);
- return this.toAssignableList(params, true);
-};
-
-lp.parseMethod = function (isGenerator) {
- var node = this.startNode();
- this.initFunction(node);
- node.params = this.parseFunctionParams();
- node.generator = isGenerator || false;
- node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== tt.braceL;
- node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock();
- return this.finishNode(node, "FunctionExpression");
-};
-
-lp.parseArrowExpression = function (node, params) {
- this.initFunction(node);
- node.params = this.toAssignableList(params, true);
- node.expression = this.tok.type !== tt.braceL;
- node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock();
- return this.finishNode(node, "ArrowFunctionExpression");
-};
-
-lp.parseExprList = function (close, allowEmpty) {
- this.pushCx();
- var indent = this.curIndent,
- line = this.curLineStart,
- elts = [];
- this.next(); // Opening bracket
- while (!this.closes(close, indent + 1, line)) {
- if (this.eat(tt.comma)) {
- elts.push(allowEmpty ? null : this.dummyIdent());
- continue;
- }
- var elt = this.parseMaybeAssign();
- if (isDummy(elt)) {
- if (this.closes(close, indent, line)) break;
- this.next();
- } else {
- elts.push(elt);
- }
- this.eat(tt.comma);
- }
- this.popCx();
- if (!this.eat(close)) {
- // If there is no closing brace, make the node span to the start
- // of the next token (this is useful for Tern)
- this.last.end = this.tok.start;
- if (this.options.locations) this.last.loc.end = this.tok.loc.start;
- }
- return elts;
-};
-
-},{"..":2,"./parseutil":4,"./state":5}],4:[function(_dereq_,module,exports){
-"use strict";
-
-exports.isDummy = isDummy;
-exports.__esModule = true;
-
-var LooseParser = _dereq_("./state").LooseParser;
-
-var _ = _dereq_("..");
-
-var Node = _.Node;
-var SourceLocation = _.SourceLocation;
-var lineBreak = _.lineBreak;
-var isNewLine = _.isNewLine;
-var tt = _.tokTypes;
-
-var lp = LooseParser.prototype;
-
-lp.startNode = function () {
- var node = new Node();
- node.start = this.tok.start;
- if (this.options.locations) node.loc = new SourceLocation(this.toks, this.tok.loc.start);
- if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile;
- if (this.options.ranges) node.range = [this.tok.start, 0];
- return node;
-};
-
-lp.storeCurrentPos = function () {
- return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start;
-};
-
-lp.startNodeAt = function (pos) {
- var node = new Node();
- if (this.options.locations) {
- node.start = pos[0];
- node.loc = new SourceLocation(this.toks, pos[1]);
- pos = pos[0];
- } else {
- node.start = pos;
- }
- if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile;
- if (this.options.ranges) node.range = [pos, 0];
- return node;
-};
-
-lp.finishNode = function (node, type) {
- node.type = type;
- node.end = this.last.end;
- if (this.options.locations) node.loc.end = this.last.loc.end;
- if (this.options.ranges) node.range[1] = this.last.end;
- return node;
-};
-
-lp.dummyIdent = function () {
- var dummy = this.startNode();
- dummy.name = "✖";
- return this.finishNode(dummy, "Identifier");
-};
-
-function isDummy(node) {
- return node.name == "✖";
-}
-
-lp.eat = function (type) {
- if (this.tok.type === type) {
- this.next();
- return true;
- } else {
- return false;
- }
-};
-
-lp.isContextual = function (name) {
- return this.tok.type === tt.name && this.tok.value === name;
-};
-
-lp.eatContextual = function (name) {
- return this.tok.value === name && this.eat(tt.name);
-};
-
-lp.canInsertSemicolon = function () {
- return this.tok.type === tt.eof || this.tok.type === tt.braceR || lineBreak.test(this.input.slice(this.last.end, this.tok.start));
-};
-
-lp.semicolon = function () {
- return this.eat(tt.semi);
-};
-
-lp.expect = function (type) {
- if (this.eat(type)) return true;
- for (var i = 1; i <= 2; i++) {
- if (this.lookAhead(i).type == type) {
- for (var j = 0; j < i; j++) {
- this.next();
- }return true;
- }
- }
-};
-
-lp.pushCx = function () {
- this.context.push(this.curIndent);
-};
-lp.popCx = function () {
- this.curIndent = this.context.pop();
-};
-
-lp.lineEnd = function (pos) {
- while (pos < this.input.length && !isNewLine(this.input.charCodeAt(pos))) ++pos;
- return pos;
-};
-
-lp.indentationAfter = function (pos) {
- for (var count = 0;; ++pos) {
- var ch = this.input.charCodeAt(pos);
- if (ch === 32) ++count;else if (ch === 9) count += this.options.tabSize;else return count;
- }
-};
-
-lp.closes = function (closeTok, indent, line, blockHeuristic) {
- if (this.tok.type === closeTok || this.tok.type === tt.eof) return true;
- return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() && (!blockHeuristic || this.nextLineStart >= this.input.length || this.indentationAfter(this.nextLineStart) < indent);
-};
-
-lp.tokenStartsLine = function () {
- for (var p = this.tok.start - 1; p >= this.curLineStart; --p) {
- var ch = this.input.charCodeAt(p);
- if (ch !== 9 && ch !== 32) return false;
- }
- return true;
-};
-
-},{"..":2,"./state":5}],5:[function(_dereq_,module,exports){
-"use strict";
-
-exports.LooseParser = LooseParser;
-exports.__esModule = true;
-
-var _ = _dereq_("..");
-
-var tokenizer = _.tokenizer;
-var SourceLocation = _.SourceLocation;
-var tt = _.tokTypes;
-
-function LooseParser(input, options) {
- this.toks = tokenizer(input, options);
- this.options = this.toks.options;
- this.input = this.toks.input;
- this.tok = this.last = { type: tt.eof, start: 0, end: 0 };
- if (this.options.locations) {
- var here = this.toks.curPosition();
- this.tok.loc = new SourceLocation(this.toks, here, here);
- }
- this.ahead = []; // Tokens ahead
- this.context = []; // Indentation contexted
- this.curIndent = 0;
- this.curLineStart = 0;
- this.nextLineStart = this.lineEnd(this.curLineStart) + 1;
-}
-
-},{"..":2}],6:[function(_dereq_,module,exports){
-"use strict";
-
-var LooseParser = _dereq_("./state").LooseParser;
-
-var isDummy = _dereq_("./parseutil").isDummy;
-
-var _ = _dereq_("..");
-
-var getLineInfo = _.getLineInfo;
-var tt = _.tokTypes;
-
-var lp = LooseParser.prototype;
-
-lp.parseTopLevel = function () {
- var node = this.startNodeAt(this.options.locations ? [0, getLineInfo(this.input, 0)] : 0);
- node.body = [];
- while (this.tok.type !== tt.eof) node.body.push(this.parseStatement());
- this.last = this.tok;
- if (this.options.ecmaVersion >= 6) {
- node.sourceType = this.options.sourceType;
- }
- return this.finishNode(node, "Program");
-};
-
-lp.parseStatement = function () {
- var starttype = this.tok.type,
- node = this.startNode();
-
- switch (starttype) {
- case tt._break:case tt._continue:
- this.next();
- var isBreak = starttype === tt._break;
- if (this.semicolon() || this.canInsertSemicolon()) {
- node.label = null;
- } else {
- node.label = this.tok.type === tt.name ? this.parseIdent() : null;
- this.semicolon();
- }
- return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
-
- case tt._debugger:
- this.next();
- this.semicolon();
- return this.finishNode(node, "DebuggerStatement");
-
- case tt._do:
- this.next();
- node.body = this.parseStatement();
- node.test = this.eat(tt._while) ? this.parseParenExpression() : this.dummyIdent();
- this.semicolon();
- return this.finishNode(node, "DoWhileStatement");
-
- case tt._for:
- this.next();
- this.pushCx();
- this.expect(tt.parenL);
- if (this.tok.type === tt.semi) return this.parseFor(node, null);
- if (this.tok.type === tt._var || this.tok.type === tt._let || this.tok.type === tt._const) {
- var _init = this.parseVar(true);
- if (_init.declarations.length === 1 && (this.tok.type === tt._in || this.isContextual("of"))) {
- return this.parseForIn(node, _init);
- }
- return this.parseFor(node, _init);
- }
- var init = this.parseExpression(true);
- if (this.tok.type === tt._in || this.isContextual("of")) return this.parseForIn(node, this.toAssignable(init));
- return this.parseFor(node, init);
-
- case tt._function:
- this.next();
- return this.parseFunction(node, true);
-
- case tt._if:
- this.next();
- node.test = this.parseParenExpression();
- node.consequent = this.parseStatement();
- node.alternate = this.eat(tt._else) ? this.parseStatement() : null;
- return this.finishNode(node, "IfStatement");
-
- case tt._return:
- this.next();
- if (this.eat(tt.semi) || this.canInsertSemicolon()) node.argument = null;else {
- node.argument = this.parseExpression();this.semicolon();
- }
- return this.finishNode(node, "ReturnStatement");
-
- case tt._switch:
- var blockIndent = this.curIndent,
- line = this.curLineStart;
- this.next();
- node.discriminant = this.parseParenExpression();
- node.cases = [];
- this.pushCx();
- this.expect(tt.braceL);
-
- var cur = undefined;
- while (!this.closes(tt.braceR, blockIndent, line, true)) {
- if (this.tok.type === tt._case || this.tok.type === tt._default) {
- var isCase = this.tok.type === tt._case;
- if (cur) this.finishNode(cur, "SwitchCase");
- node.cases.push(cur = this.startNode());
- cur.consequent = [];
- this.next();
- if (isCase) cur.test = this.parseExpression();else cur.test = null;
- this.expect(tt.colon);
- } else {
- if (!cur) {
- node.cases.push(cur = this.startNode());
- cur.consequent = [];
- cur.test = null;
- }
- cur.consequent.push(this.parseStatement());
- }
- }
- if (cur) this.finishNode(cur, "SwitchCase");
- this.popCx();
- this.eat(tt.braceR);
- return this.finishNode(node, "SwitchStatement");
-
- case tt._throw:
- this.next();
- node.argument = this.parseExpression();
- this.semicolon();
- return this.finishNode(node, "ThrowStatement");
-
- case tt._try:
- this.next();
- node.block = this.parseBlock();
- node.handler = null;
- if (this.tok.type === tt._catch) {
- var clause = this.startNode();
- this.next();
- this.expect(tt.parenL);
- clause.param = this.toAssignable(this.parseExprAtom(), true);
- this.expect(tt.parenR);
- clause.guard = null;
- clause.body = this.parseBlock();
- node.handler = this.finishNode(clause, "CatchClause");
- }
- node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null;
- if (!node.handler && !node.finalizer) return node.block;
- return this.finishNode(node, "TryStatement");
-
- case tt._var:
- case tt._let:
- case tt._const:
- return this.parseVar();
-
- case tt._while:
- this.next();
- node.test = this.parseParenExpression();
- node.body = this.parseStatement();
- return this.finishNode(node, "WhileStatement");
-
- case tt._with:
- this.next();
- node.object = this.parseParenExpression();
- node.body = this.parseStatement();
- return this.finishNode(node, "WithStatement");
-
- case tt.braceL:
- return this.parseBlock();
-
- case tt.semi:
- this.next();
- return this.finishNode(node, "EmptyStatement");
-
- case tt._class:
- return this.parseClass(true);
-
- case tt._import:
- return this.parseImport();
-
- case tt._export:
- return this.parseExport();
-
- default:
- var expr = this.parseExpression();
- if (isDummy(expr)) {
- this.next();
- if (this.tok.type === tt.eof) return this.finishNode(node, "EmptyStatement");
- return this.parseStatement();
- } else if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) {
- node.body = this.parseStatement();
- node.label = expr;
- return this.finishNode(node, "LabeledStatement");
- } else {
- node.expression = expr;
- this.semicolon();
- return this.finishNode(node, "ExpressionStatement");
- }
- }
-};
-
-lp.parseBlock = function () {
- var node = this.startNode();
- this.pushCx();
- this.expect(tt.braceL);
- var blockIndent = this.curIndent,
- line = this.curLineStart;
- node.body = [];
- while (!this.closes(tt.braceR, blockIndent, line, true)) node.body.push(this.parseStatement());
- this.popCx();
- this.eat(tt.braceR);
- return this.finishNode(node, "BlockStatement");
-};
-
-lp.parseFor = function (node, init) {
- node.init = init;
- node.test = node.update = null;
- if (this.eat(tt.semi) && this.tok.type !== tt.semi) node.test = this.parseExpression();
- if (this.eat(tt.semi) && this.tok.type !== tt.parenR) node.update = this.parseExpression();
- this.popCx();
- this.expect(tt.parenR);
- node.body = this.parseStatement();
- return this.finishNode(node, "ForStatement");
-};
-
-lp.parseForIn = function (node, init) {
- var type = this.tok.type === tt._in ? "ForInStatement" : "ForOfStatement";
- this.next();
- node.left = init;
- node.right = this.parseExpression();
- this.popCx();
- this.expect(tt.parenR);
- node.body = this.parseStatement();
- return this.finishNode(node, type);
-};
-
-lp.parseVar = function (noIn) {
- var node = this.startNode();
- node.kind = this.tok.type.keyword;
- this.next();
- node.declarations = [];
- do {
- var decl = this.startNode();
- decl.id = this.options.ecmaVersion >= 6 ? this.toAssignable(this.parseExprAtom(), true) : this.parseIdent();
- decl.init = this.eat(tt.eq) ? this.parseMaybeAssign(noIn) : null;
- node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
- } while (this.eat(tt.comma));
- if (!node.declarations.length) {
- var decl = this.startNode();
- decl.id = this.dummyIdent();
- node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
- }
- if (!noIn) this.semicolon();
- return this.finishNode(node, "VariableDeclaration");
-};
-
-lp.parseClass = function (isStatement) {
- var node = this.startNode();
- this.next();
- if (this.tok.type === tt.name) node.id = this.parseIdent();else if (isStatement) node.id = this.dummyIdent();else node.id = null;
- node.superClass = this.eat(tt._extends) ? this.parseExpression() : null;
- node.body = this.startNode();
- node.body.body = [];
- this.pushCx();
- var indent = this.curIndent + 1,
- line = this.curLineStart;
- this.eat(tt.braceL);
- if (this.curIndent + 1 < indent) {
- indent = this.curIndent;line = this.curLineStart;
- }
- while (!this.closes(tt.braceR, indent, line)) {
- if (this.semicolon()) continue;
- var method = this.startNode(),
- isGenerator = undefined;
- if (this.options.ecmaVersion >= 6) {
- method["static"] = false;
- isGenerator = this.eat(tt.star);
- }
- this.parsePropertyName(method);
- if (isDummy(method.key)) {
- if (isDummy(this.parseMaybeAssign())) this.next();this.eat(tt.comma);continue;
- }
- if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" && (this.tok.type != tt.parenL && this.tok.type != tt.braceL)) {
- method["static"] = true;
- isGenerator = this.eat(tt.star);
- this.parsePropertyName(method);
- } else {
- method["static"] = false;
- }
- if (this.options.ecmaVersion >= 5 && method.key.type === "Identifier" && !method.computed && (method.key.name === "get" || method.key.name === "set") && this.tok.type !== tt.parenL && this.tok.type !== tt.braceL) {
- method.kind = method.key.name;
- this.parsePropertyName(method);
- method.value = this.parseMethod(false);
- } else {
- if (!method.computed && !method["static"] && !isGenerator && (method.key.type === "Identifier" && method.key.name === "constructor" || method.key.type === "Literal" && method.key.value === "constructor")) {
- method.kind = "constructor";
- } else {
- method.kind = "method";
- }
- method.value = this.parseMethod(isGenerator);
- }
- node.body.body.push(this.finishNode(method, "MethodDefinition"));
- }
- this.popCx();
- if (!this.eat(tt.braceR)) {
- // If there is no closing brace, make the node span to the start
- // of the next token (this is useful for Tern)
- this.last.end = this.tok.start;
- if (this.options.locations) this.last.loc.end = this.tok.loc.start;
- }
- this.semicolon();
- this.finishNode(node.body, "ClassBody");
- return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
-};
-
-lp.parseFunction = function (node, isStatement) {
- this.initFunction(node);
- if (this.options.ecmaVersion >= 6) {
- node.generator = this.eat(tt.star);
- }
- if (this.tok.type === tt.name) node.id = this.parseIdent();else if (isStatement) node.id = this.dummyIdent();
- node.params = this.parseFunctionParams();
- node.body = this.parseBlock();
- return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
-};
-
-lp.parseExport = function () {
- var node = this.startNode();
- this.next();
- if (this.eat(tt.star)) {
- node.source = this.eatContextual("from") ? this.parseExprAtom() : null;
- return this.finishNode(node, "ExportAllDeclaration");
- }
- if (this.eat(tt._default)) {
- var expr = this.parseMaybeAssign();
- if (expr.id) {
- switch (expr.type) {
- case "FunctionExpression":
- expr.type = "FunctionDeclaration";break;
- case "ClassExpression":
- expr.type = "ClassDeclaration";break;
- }
- }
- node.declaration = expr;
- this.semicolon();
- return this.finishNode(node, "ExportDefaultDeclaration");
- }
- if (this.tok.type.keyword) {
- node.declaration = this.parseStatement();
- node.specifiers = [];
- node.source = null;
- } else {
- node.declaration = null;
- node.specifiers = this.parseExportSpecifierList();
- node.source = this.eatContextual("from") ? this.parseExprAtom() : null;
- this.semicolon();
- }
- return this.finishNode(node, "ExportNamedDeclaration");
-};
-
-lp.parseImport = function () {
- var node = this.startNode();
- this.next();
- if (this.tok.type === tt.string) {
- node.specifiers = [];
- node.source = this.parseExprAtom();
- node.kind = "";
- } else {
- var elt = undefined;
- if (this.tok.type === tt.name && this.tok.value !== "from") {
- elt = this.startNode();
- elt.local = this.parseIdent();
- this.finishNode(elt, "ImportDefaultSpecifier");
- this.eat(tt.comma);
- }
- node.specifiers = this.parseImportSpecifierList();
- node.source = this.eatContextual("from") ? this.parseExprAtom() : null;
- if (elt) node.specifiers.unshift(elt);
- }
- this.semicolon();
- return this.finishNode(node, "ImportDeclaration");
-};
-
-lp.parseImportSpecifierList = function () {
- var elts = [];
- if (this.tok.type === tt.star) {
- var elt = this.startNode();
- this.next();
- if (this.eatContextual("as")) elt.local = this.parseIdent();
- elts.push(this.finishNode(elt, "ImportNamespaceSpecifier"));
- } else {
- var indent = this.curIndent,
- line = this.curLineStart,
- continuedLine = this.nextLineStart;
- this.pushCx();
- this.eat(tt.braceL);
- if (this.curLineStart > continuedLine) continuedLine = this.curLineStart;
- while (!this.closes(tt.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
- var elt = this.startNode();
- if (this.eat(tt.star)) {
- if (this.eatContextual("as")) elt.local = this.parseIdent();
- this.finishNode(elt, "ImportNamespaceSpecifier");
- } else {
- if (this.isContextual("from")) break;
- elt.imported = this.parseIdent();
- elt.local = this.eatContextual("as") ? this.parseIdent() : elt.imported;
- this.finishNode(elt, "ImportSpecifier");
- }
- elts.push(elt);
- this.eat(tt.comma);
- }
- this.eat(tt.braceR);
- this.popCx();
- }
- return elts;
-};
-
-lp.parseExportSpecifierList = function () {
- var elts = [];
- var indent = this.curIndent,
- line = this.curLineStart,
- continuedLine = this.nextLineStart;
- this.pushCx();
- this.eat(tt.braceL);
- if (this.curLineStart > continuedLine) continuedLine = this.curLineStart;
- while (!this.closes(tt.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
- if (this.isContextual("from")) break;
- var elt = this.startNode();
- elt.local = this.parseIdent();
- elt.exported = this.eatContextual("as") ? this.parseIdent() : elt.local;
- this.finishNode(elt, "ExportSpecifier");
- elts.push(elt);
- this.eat(tt.comma);
- }
- this.eat(tt.braceR);
- this.popCx();
- return elts;
-};
-
-},{"..":2,"./parseutil":4,"./state":5}],7:[function(_dereq_,module,exports){
-"use strict";
-
-var _ = _dereq_("..");
-
-var tt = _.tokTypes;
-var Token = _.Token;
-var isNewLine = _.isNewLine;
-var SourceLocation = _.SourceLocation;
-var getLineInfo = _.getLineInfo;
-var lineBreakG = _.lineBreakG;
-
-var LooseParser = _dereq_("./state").LooseParser;
-
-var lp = LooseParser.prototype;
-
-function isSpace(ch) {
- return ch < 14 && ch > 8 || ch === 32 || ch === 160 || isNewLine(ch);
-}
-
-lp.next = function () {
- this.last = this.tok;
- if (this.ahead.length) this.tok = this.ahead.shift();else this.tok = this.readToken();
-
- if (this.tok.start >= this.nextLineStart) {
- while (this.tok.start >= this.nextLineStart) {
- this.curLineStart = this.nextLineStart;
- this.nextLineStart = this.lineEnd(this.curLineStart) + 1;
- }
- this.curIndent = this.indentationAfter(this.curLineStart);
- }
-};
-
-lp.readToken = function () {
- for (;;) {
- try {
- this.toks.next();
- if (this.toks.type === tt.dot && this.input.substr(this.toks.end, 1) === "." && this.options.ecmaVersion >= 6) {
- this.toks.end++;
- this.toks.type = tt.ellipsis;
- }
- return new Token(this.toks);
- } catch (e) {
- if (!(e instanceof SyntaxError)) throw e;
-
- // Try to skip some text, based on the error message, and then continue
- var msg = e.message,
- pos = e.raisedAt,
- replace = true;
- if (/unterminated/i.test(msg)) {
- pos = this.lineEnd(e.pos + 1);
- if (/string/.test(msg)) {
- replace = { start: e.pos, end: pos, type: tt.string, value: this.input.slice(e.pos + 1, pos) };
- } else if (/regular expr/i.test(msg)) {
- var re = this.input.slice(e.pos, pos);
- try {
- re = new RegExp(re);
- } catch (e) {}
- replace = { start: e.pos, end: pos, type: tt.regexp, value: re };
- } else if (/template/.test(msg)) {
- replace = { start: e.pos, end: pos,
- type: tt.template,
- value: this.input.slice(e.pos, pos) };
- } else {
- replace = false;
- }
- } else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(msg)) {
- while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) ++pos;
- } else if (/character escape|expected hexadecimal/i.test(msg)) {
- while (pos < this.input.length) {
- var ch = this.input.charCodeAt(pos++);
- if (ch === 34 || ch === 39 || isNewLine(ch)) break;
- }
- } else if (/unexpected character/i.test(msg)) {
- pos++;
- replace = false;
- } else if (/regular expression/i.test(msg)) {
- replace = true;
- } else {
- throw e;
- }
- this.resetTo(pos);
- if (replace === true) replace = { start: pos, end: pos, type: tt.name, value: "✖" };
- if (replace) {
- if (this.options.locations) replace.loc = new SourceLocation(this.toks, getLineInfo(this.input, replace.start), getLineInfo(this.input, replace.end));
- return replace;
- }
- }
- }
-};
-
-lp.resetTo = function (pos) {
- this.toks.pos = pos;
- var ch = this.input.charAt(pos - 1);
- this.toks.exprAllowed = !ch || /[\[\{\(,;:?\/*=+\-~!|&%^<>]/.test(ch) || /[enwfd]/.test(ch) && /\b(keywords|case|else|return|throw|new|in|(instance|type)of|delete|void)$/.test(this.input.slice(pos - 10, pos));
-
- if (this.options.locations) {
- this.toks.curLine = 1;
- this.toks.lineStart = lineBreakG.lastIndex = 0;
- var match = undefined;
- while ((match = lineBreakG.exec(this.input)) && match.index < pos) {
- ++this.toks.curLine;
- this.toks.lineStart = match.index + match[0].length;
- }
- }
-};
-
-lp.lookAhead = function (n) {
- while (n > this.ahead.length) this.ahead.push(this.readToken());
- return this.ahead[n - 1];
-};
-
-},{"..":2,"./state":5}]},{},[1])(1)
-}); \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/walk.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/walk.js
deleted file mode 100644
index 66540c92a8..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/dist/walk.js
+++ /dev/null
@@ -1,342 +0,0 @@
-(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}(g.acorn || (g.acorn = {})).walk = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
-"use strict";
-
-var _classCallCheck = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } };
-
-// AST walker module for Mozilla Parser API compatible trees
-
-// A simple walk is one where you simply specify callbacks to be
-// called on specific nodes. The last two arguments are optional. A
-// simple use would be
-//
-// walk.simple(myTree, {
-// Expression: function(node) { ... }
-// });
-//
-// to do something with all expressions. All Parser API node types
-// can be used to identify node types, as well as Expression,
-// Statement, and ScopeBody, which denote categories of nodes.
-//
-// The base argument can be used to pass a custom (recursive)
-// walker, and state can be used to give this walked an initial
-// state.
-
-exports.simple = simple;
-
-// An ancestor walk builds up an array of ancestor nodes (including
-// the current node) and passes them to the callback as the state parameter.
-exports.ancestor = ancestor;
-
-// A recursive walk is one where your functions override the default
-// walkers. They can modify and replace the state parameter that's
-// threaded through the walk, and can opt how and whether to walk
-// their child nodes (by calling their third argument on these
-// nodes).
-exports.recursive = recursive;
-
-// Find a node with a given start, end, and type (all are optional,
-// null can be used as wildcard). Returns a {node, state} object, or
-// undefined when it doesn't find a matching node.
-exports.findNodeAt = findNodeAt;
-
-// Find the innermost node of a given type that contains the given
-// position. Interface similar to findNodeAt.
-exports.findNodeAround = findNodeAround;
-
-// Find the outermost matching node after a given position.
-exports.findNodeAfter = findNodeAfter;
-
-// Find the outermost matching node before a given position.
-exports.findNodeBefore = findNodeBefore;
-
-// Used to create a custom walker. Will fill in all missing node
-// type properties with the defaults.
-exports.make = make;
-exports.__esModule = true;
-
-function simple(node, visitors, base, state) {
- if (!base) base = exports.base;(function c(node, st, override) {
- var type = override || node.type,
- found = visitors[type];
- base[type](node, st, c);
- if (found) found(node, st);
- })(node, state);
-}
-
-function ancestor(node, visitors, base, state) {
- if (!base) base = exports.base;
- if (!state) state = [];(function c(node, st, override) {
- var type = override || node.type,
- found = visitors[type];
- if (node != st[st.length - 1]) {
- st = st.slice();
- st.push(node);
- }
- base[type](node, st, c);
- if (found) found(node, st);
- })(node, state);
-}
-
-function recursive(node, state, funcs, base) {
- var visitor = funcs ? exports.make(funcs, base) : base;(function c(node, st, override) {
- visitor[override || node.type](node, st, c);
- })(node, state);
-}
-
-function makeTest(test) {
- if (typeof test == "string") {
- return function (type) {
- return type == test;
- };
- } else if (!test) {
- return function () {
- return true;
- };
- } else {
- return test;
- }
-}
-
-var Found = function Found(node, state) {
- _classCallCheck(this, Found);
-
- this.node = node;this.state = state;
-};
-
-function findNodeAt(node, start, end, test, base, state) {
- test = makeTest(test);
- if (!base) base = exports.base;
- try {
- ;(function c(node, st, override) {
- var type = override || node.type;
- if ((start == null || node.start <= start) && (end == null || node.end >= end)) base[type](node, st, c);
- if (test(type, node) && (start == null || node.start == start) && (end == null || node.end == end)) throw new Found(node, st);
- })(node, state);
- } catch (e) {
- if (e instanceof Found) {
- return e;
- }throw e;
- }
-}
-
-function findNodeAround(node, pos, test, base, state) {
- test = makeTest(test);
- if (!base) base = exports.base;
- try {
- ;(function c(node, st, override) {
- var type = override || node.type;
- if (node.start > pos || node.end < pos) {
- return;
- }base[type](node, st, c);
- if (test(type, node)) throw new Found(node, st);
- })(node, state);
- } catch (e) {
- if (e instanceof Found) {
- return e;
- }throw e;
- }
-}
-
-function findNodeAfter(node, pos, test, base, state) {
- test = makeTest(test);
- if (!base) base = exports.base;
- try {
- ;(function c(node, st, override) {
- if (node.end < pos) {
- return;
- }var type = override || node.type;
- if (node.start >= pos && test(type, node)) throw new Found(node, st);
- base[type](node, st, c);
- })(node, state);
- } catch (e) {
- if (e instanceof Found) {
- return e;
- }throw e;
- }
-}
-
-function findNodeBefore(node, pos, test, base, state) {
- test = makeTest(test);
- if (!base) base = exports.base;
- var max = undefined;(function c(node, st, override) {
- if (node.start > pos) {
- return;
- }var type = override || node.type;
- if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node)) max = new Found(node, st);
- base[type](node, st, c);
- })(node, state);
- return max;
-}
-
-function make(funcs, base) {
- if (!base) base = exports.base;
- var visitor = {};
- for (var type in base) visitor[type] = base[type];
- for (var type in funcs) visitor[type] = funcs[type];
- return visitor;
-}
-
-function skipThrough(node, st, c) {
- c(node, st);
-}
-function ignore(_node, _st, _c) {}
-
-// Node walkers.
-
-var base = {};
-
-exports.base = base;
-base.Program = base.BlockStatement = function (node, st, c) {
- for (var i = 0; i < node.body.length; ++i) {
- c(node.body[i], st, "Statement");
- }
-};
-base.Statement = skipThrough;
-base.EmptyStatement = ignore;
-base.ExpressionStatement = base.ParenthesizedExpression = function (node, st, c) {
- return c(node.expression, st, "Expression");
-};
-base.IfStatement = function (node, st, c) {
- c(node.test, st, "Expression");
- c(node.consequent, st, "Statement");
- if (node.alternate) c(node.alternate, st, "Statement");
-};
-base.LabeledStatement = function (node, st, c) {
- return c(node.body, st, "Statement");
-};
-base.BreakStatement = base.ContinueStatement = ignore;
-base.WithStatement = function (node, st, c) {
- c(node.object, st, "Expression");
- c(node.body, st, "Statement");
-};
-base.SwitchStatement = function (node, st, c) {
- c(node.discriminant, st, "Expression");
- for (var i = 0; i < node.cases.length; ++i) {
- var cs = node.cases[i];
- if (cs.test) c(cs.test, st, "Expression");
- for (var j = 0; j < cs.consequent.length; ++j) {
- c(cs.consequent[j], st, "Statement");
- }
- }
-};
-base.ReturnStatement = base.YieldExpression = function (node, st, c) {
- if (node.argument) c(node.argument, st, "Expression");
-};
-base.ThrowStatement = base.SpreadElement = base.RestElement = function (node, st, c) {
- return c(node.argument, st, "Expression");
-};
-base.TryStatement = function (node, st, c) {
- c(node.block, st, "Statement");
- if (node.handler) c(node.handler.body, st, "ScopeBody");
- if (node.finalizer) c(node.finalizer, st, "Statement");
-};
-base.WhileStatement = base.DoWhileStatement = function (node, st, c) {
- c(node.test, st, "Expression");
- c(node.body, st, "Statement");
-};
-base.ForStatement = function (node, st, c) {
- if (node.init) c(node.init, st, "ForInit");
- if (node.test) c(node.test, st, "Expression");
- if (node.update) c(node.update, st, "Expression");
- c(node.body, st, "Statement");
-};
-base.ForInStatement = base.ForOfStatement = function (node, st, c) {
- c(node.left, st, "ForInit");
- c(node.right, st, "Expression");
- c(node.body, st, "Statement");
-};
-base.ForInit = function (node, st, c) {
- if (node.type == "VariableDeclaration") c(node, st);else c(node, st, "Expression");
-};
-base.DebuggerStatement = ignore;
-
-base.FunctionDeclaration = function (node, st, c) {
- return c(node, st, "Function");
-};
-base.VariableDeclaration = function (node, st, c) {
- for (var i = 0; i < node.declarations.length; ++i) {
- var decl = node.declarations[i];
- if (decl.init) c(decl.init, st, "Expression");
- }
-};
-
-base.Function = function (node, st, c) {
- return c(node.body, st, "ScopeBody");
-};
-base.ScopeBody = function (node, st, c) {
- return c(node, st, "Statement");
-};
-
-base.Expression = skipThrough;
-base.ThisExpression = base.Super = base.MetaProperty = ignore;
-base.ArrayExpression = base.ArrayPattern = function (node, st, c) {
- for (var i = 0; i < node.elements.length; ++i) {
- var elt = node.elements[i];
- if (elt) c(elt, st, "Expression");
- }
-};
-base.ObjectExpression = base.ObjectPattern = function (node, st, c) {
- for (var i = 0; i < node.properties.length; ++i) {
- c(node.properties[i], st);
- }
-};
-base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration;
-base.SequenceExpression = base.TemplateLiteral = function (node, st, c) {
- for (var i = 0; i < node.expressions.length; ++i) {
- c(node.expressions[i], st, "Expression");
- }
-};
-base.UnaryExpression = base.UpdateExpression = function (node, st, c) {
- c(node.argument, st, "Expression");
-};
-base.BinaryExpression = base.AssignmentExpression = base.AssignmentPattern = base.LogicalExpression = function (node, st, c) {
- c(node.left, st, "Expression");
- c(node.right, st, "Expression");
-};
-base.ConditionalExpression = function (node, st, c) {
- c(node.test, st, "Expression");
- c(node.consequent, st, "Expression");
- c(node.alternate, st, "Expression");
-};
-base.NewExpression = base.CallExpression = function (node, st, c) {
- c(node.callee, st, "Expression");
- if (node.arguments) for (var i = 0; i < node.arguments.length; ++i) {
- c(node.arguments[i], st, "Expression");
- }
-};
-base.MemberExpression = function (node, st, c) {
- c(node.object, st, "Expression");
- if (node.computed) c(node.property, st, "Expression");
-};
-base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) {
- return c(node.declaration, st);
-};
-base.ImportDeclaration = function (node, st, c) {
- for (var i = 0; i < node.specifiers.length; i++) {
- c(node.specifiers[i], st);
- }
-};
-base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore;
-
-base.TaggedTemplateExpression = function (node, st, c) {
- c(node.tag, st, "Expression");
- c(node.quasi, st);
-};
-base.ClassDeclaration = base.ClassExpression = function (node, st, c) {
- if (node.superClass) c(node.superClass, st, "Expression");
- for (var i = 0; i < node.body.body.length; i++) {
- c(node.body.body[i], st);
- }
-};
-base.MethodDefinition = base.Property = function (node, st, c) {
- if (node.computed) c(node.key, st, "Expression");
- c(node.value, st, "Expression");
-};
-base.ComprehensionExpression = function (node, st, c) {
- for (var i = 0; i < node.blocks.length; i++) {
- c(node.blocks[i].right, st, "Expression");
- }c(node.body, st, "Expression");
-};
-
-},{}]},{},[1])(1)
-}); \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/package.json b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/package.json
deleted file mode 100644
index 56ca51216e..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/package.json
+++ /dev/null
@@ -1,192 +0,0 @@
-{
- "_args": [
- [
- "acorn@^1.0.3",
- "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel"
- ]
- ],
- "_from": "acorn@>=1.0.3 <2.0.0",
- "_id": "acorn@1.2.2",
- "_inCache": true,
- "_installable": true,
- "_location": "/readable-stream/inline-process-browser/falafel/acorn",
- "_npmUser": {
- "email": "marijnh@gmail.com",
- "name": "marijn"
- },
- "_npmVersion": "1.4.21",
- "_phantomChildren": {},
- "_requested": {
- "name": "acorn",
- "raw": "acorn@^1.0.3",
- "rawSpec": "^1.0.3",
- "scope": null,
- "spec": ">=1.0.3 <2.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/readable-stream/inline-process-browser/falafel"
- ],
- "_resolved": "https://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz",
- "_shasum": "c8ce27de0acc76d896d2b1fad3df588d9e82f014",
- "_shrinkwrap": null,
- "_spec": "acorn@^1.0.3",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel",
- "bin": {
- "acorn": "./bin/acorn"
- },
- "bugs": {
- "url": "https://github.com/marijnh/acorn/issues"
- },
- "contributors": [
- {
- "name": "List of Acorn contributors. Updated before every release."
- },
- {
- "name": "Adrian Rakovsky"
- },
- {
- "name": "Alistair Braidwood"
- },
- {
- "name": "Andres Suarez"
- },
- {
- "name": "Aparajita Fishman"
- },
- {
- "name": "Arian Stolwijk"
- },
- {
- "name": "Artem Govorov"
- },
- {
- "name": "Brandon Mills"
- },
- {
- "name": "Charles Hughes"
- },
- {
- "name": "Conrad Irwin"
- },
- {
- "name": "David Bonnet"
- },
- {
- "name": "Forbes Lindesay"
- },
- {
- "name": "Gilad Peleg"
- },
- {
- "name": "impinball"
- },
- {
- "name": "Ingvar Stepanyan"
- },
- {
- "name": "Jiaxing Wang"
- },
- {
- "name": "Johannes Herr"
- },
- {
- "name": "Jürg Lehni"
- },
- {
- "name": "keeyipchan"
- },
- {
- "name": "krator"
- },
- {
- "name": "Marijn Haverbeke"
- },
- {
- "name": "Martin Carlberg"
- },
- {
- "name": "Mathias Bynens"
- },
- {
- "name": "Mathieu 'p01' Henri"
- },
- {
- "name": "Max Schaefer"
- },
- {
- "name": "Max Zerzouri"
- },
- {
- "name": "Mihai Bazon"
- },
- {
- "name": "Mike Rennie"
- },
- {
- "name": "Nick Fitzgerald"
- },
- {
- "name": "Oskar Schöldström"
- },
- {
- "name": "Paul Harper"
- },
- {
- "name": "Peter Rust"
- },
- {
- "name": "PlNG"
- },
- {
- "name": "r-e-d"
- },
- {
- "name": "Rich Harris"
- },
- {
- "name": "Sebastian McKenzie"
- },
- {
- "name": "zsjforcn"
- }
- ],
- "dependencies": {},
- "description": "ECMAScript parser",
- "devDependencies": {
- "babelify": "^5.0.4",
- "browserify": "^9.0.3",
- "browserify-derequire": "^0.9.4",
- "unicode-7.0.0": "~0.1.5"
- },
- "directories": {},
- "dist": {
- "shasum": "c8ce27de0acc76d896d2b1fad3df588d9e82f014",
- "tarball": "http://registry.npmjs.org/acorn/-/acorn-1.2.2.tgz"
- },
- "engines": {
- "node": ">=0.4.0"
- },
- "gitHead": "0857d8bb9c3c05e6c8fac9e83fddaefc4f43816f",
- "homepage": "https://github.com/marijnh/acorn",
- "license": "MIT",
- "main": "dist/acorn.js",
- "maintainers": [
- {
- "email": "marijnh@gmail.com",
- "name": "marijn"
- }
- ],
- "name": "acorn",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/marijnh/acorn.git"
- },
- "scripts": {
- "prepublish": "bin/prepublish.sh",
- "test": "node test/run.js"
- },
- "version": "1.2.2"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/expression.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/expression.js
deleted file mode 100755
index 843c77ca60..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/expression.js
+++ /dev/null
@@ -1,697 +0,0 @@
-// A recursive descent parser operates by defining functions for all
-// syntactic elements, and recursively calling those, each function
-// advancing the input stream and returning an AST node. Precedence
-// of constructs (for example, the fact that `!x[1]` means `!(x[1])`
-// instead of `(!x)[1]` is handled by the fact that the parser
-// function that parses unary prefix operators is called first, and
-// in turn calls the function that parses `[]` subscripts — that
-// way, it'll receive the node for `x[1]` already parsed, and wraps
-// *that* in the unary operator node.
-//
-// Acorn uses an [operator precedence parser][opp] to handle binary
-// operator precedence, because it is much more compact than using
-// the technique outlined above, which uses different, nesting
-// functions to specify precedence, for all of the ten binary
-// precedence levels that JavaScript defines.
-//
-// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser
-
-import {types as tt} from "./tokentype"
-import {Parser} from "./state"
-import {reservedWords} from "./identifier"
-import {has} from "./util"
-
-const pp = Parser.prototype
-
-// Check if property name clashes with already added.
-// Object/class getters and setters are not allowed to clash —
-// either with each other or with an init property — and in
-// strict mode, init properties are also not allowed to be repeated.
-
-pp.checkPropClash = function(prop, propHash) {
- if (this.options.ecmaVersion >= 6) return
- let key = prop.key, name
- switch (key.type) {
- case "Identifier": name = key.name; break
- case "Literal": name = String(key.value); break
- default: return
- }
- let kind = prop.kind || "init", other
- if (has(propHash, name)) {
- other = propHash[name]
- let isGetSet = kind !== "init"
- if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init))
- this.raise(key.start, "Redefinition of property")
- } else {
- other = propHash[name] = {
- init: false,
- get: false,
- set: false
- }
- }
- other[kind] = true
-}
-
-// ### Expression parsing
-
-// These nest, from the most general expression type at the top to
-// 'atomic', nondivisible expression types at the bottom. Most of
-// the functions will simply let the function(s) below them parse,
-// and, *if* the syntactic construct they handle is present, wrap
-// the AST node that the inner parser gave them in another node.
-
-// Parse a full expression. The optional arguments are used to
-// forbid the `in` operator (in for loops initalization expressions)
-// and provide reference for storing '=' operator inside shorthand
-// property assignment in contexts where both object expression
-// and object pattern might appear (so it's possible to raise
-// delayed syntax error at correct position).
-
-pp.parseExpression = function(noIn, refShorthandDefaultPos) {
- let startPos = this.start, startLoc = this.startLoc
- let expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos)
- if (this.type === tt.comma) {
- let node = this.startNodeAt(startPos, startLoc)
- node.expressions = [expr]
- while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos))
- return this.finishNode(node, "SequenceExpression")
- }
- return expr
-}
-
-// Parse an assignment expression. This includes applications of
-// operators like `+=`.
-
-pp.parseMaybeAssign = function(noIn, refShorthandDefaultPos, afterLeftParse) {
- if (this.type == tt._yield && this.inGenerator) return this.parseYield()
-
- let failOnShorthandAssign
- if (!refShorthandDefaultPos) {
- refShorthandDefaultPos = {start: 0}
- failOnShorthandAssign = true
- } else {
- failOnShorthandAssign = false
- }
- let startPos = this.start, startLoc = this.startLoc
- if (this.type == tt.parenL || this.type == tt.name)
- this.potentialArrowAt = this.start
- let left = this.parseMaybeConditional(noIn, refShorthandDefaultPos)
- if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc)
- if (this.type.isAssign) {
- let node = this.startNodeAt(startPos, startLoc)
- node.operator = this.value
- node.left = this.type === tt.eq ? this.toAssignable(left) : left
- refShorthandDefaultPos.start = 0 // reset because shorthand default was used correctly
- this.checkLVal(left)
- this.next()
- node.right = this.parseMaybeAssign(noIn)
- return this.finishNode(node, "AssignmentExpression")
- } else if (failOnShorthandAssign && refShorthandDefaultPos.start) {
- this.unexpected(refShorthandDefaultPos.start)
- }
- return left
-}
-
-// Parse a ternary conditional (`?:`) operator.
-
-pp.parseMaybeConditional = function(noIn, refShorthandDefaultPos) {
- let startPos = this.start, startLoc = this.startLoc
- let expr = this.parseExprOps(noIn, refShorthandDefaultPos)
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr
- if (this.eat(tt.question)) {
- let node = this.startNodeAt(startPos, startLoc)
- node.test = expr
- node.consequent = this.parseMaybeAssign()
- this.expect(tt.colon)
- node.alternate = this.parseMaybeAssign(noIn)
- return this.finishNode(node, "ConditionalExpression")
- }
- return expr
-}
-
-// Start the precedence parser.
-
-pp.parseExprOps = function(noIn, refShorthandDefaultPos) {
- let startPos = this.start, startLoc = this.startLoc
- let expr = this.parseMaybeUnary(refShorthandDefaultPos)
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr
- return this.parseExprOp(expr, startPos, startLoc, -1, noIn)
-}
-
-// Parse binary operators with the operator precedence parsing
-// algorithm. `left` is the left-hand side of the operator.
-// `minPrec` provides context that allows the function to stop and
-// defer further parser to one of its callers when it encounters an
-// operator that has a lower precedence than the set it is parsing.
-
-pp.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) {
- let prec = this.type.binop
- if (Array.isArray(leftStartPos)){
- if (this.options.locations && noIn === undefined) {
- // shift arguments to left by one
- noIn = minPrec
- minPrec = leftStartLoc
- // flatten leftStartPos
- leftStartLoc = leftStartPos[1]
- leftStartPos = leftStartPos[0]
- }
- }
- if (prec != null && (!noIn || this.type !== tt._in)) {
- if (prec > minPrec) {
- let node = this.startNodeAt(leftStartPos, leftStartLoc)
- node.left = left
- node.operator = this.value
- let op = this.type
- this.next()
- let startPos = this.start, startLoc = this.startLoc
- node.right = this.parseExprOp(this.parseMaybeUnary(), startPos, startLoc, prec, noIn)
- this.finishNode(node, (op === tt.logicalOR || op === tt.logicalAND) ? "LogicalExpression" : "BinaryExpression")
- return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn)
- }
- }
- return left
-}
-
-// Parse unary operators, both prefix and postfix.
-
-pp.parseMaybeUnary = function(refShorthandDefaultPos) {
- if (this.type.prefix) {
- let node = this.startNode(), update = this.type === tt.incDec
- node.operator = this.value
- node.prefix = true
- this.next()
- node.argument = this.parseMaybeUnary()
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start)
- if (update) this.checkLVal(node.argument)
- else if (this.strict && node.operator === "delete" &&
- node.argument.type === "Identifier")
- this.raise(node.start, "Deleting local variable in strict mode")
- return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
- }
- let startPos = this.start, startLoc = this.startLoc
- let expr = this.parseExprSubscripts(refShorthandDefaultPos)
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr
- while (this.type.postfix && !this.canInsertSemicolon()) {
- let node = this.startNodeAt(startPos, startLoc)
- node.operator = this.value
- node.prefix = false
- node.argument = expr
- this.checkLVal(expr)
- this.next()
- expr = this.finishNode(node, "UpdateExpression")
- }
- return expr
-}
-
-// Parse call, dot, and `[]`-subscript expressions.
-
-pp.parseExprSubscripts = function(refShorthandDefaultPos) {
- let startPos = this.start, startLoc = this.startLoc
- let expr = this.parseExprAtom(refShorthandDefaultPos)
- if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr
- return this.parseSubscripts(expr, startPos, startLoc)
-}
-
-pp.parseSubscripts = function(base, startPos, startLoc, noCalls) {
- if (Array.isArray(startPos)){
- if (this.options.locations && noCalls === undefined) {
- // shift arguments to left by one
- noCalls = startLoc
- // flatten startPos
- startLoc = startPos[1]
- startPos = startPos[0]
- }
- }
- for (;;) {
- if (this.eat(tt.dot)) {
- let node = this.startNodeAt(startPos, startLoc)
- node.object = base
- node.property = this.parseIdent(true)
- node.computed = false
- base = this.finishNode(node, "MemberExpression")
- } else if (this.eat(tt.bracketL)) {
- let node = this.startNodeAt(startPos, startLoc)
- node.object = base
- node.property = this.parseExpression()
- node.computed = true
- this.expect(tt.bracketR)
- base = this.finishNode(node, "MemberExpression")
- } else if (!noCalls && this.eat(tt.parenL)) {
- let node = this.startNodeAt(startPos, startLoc)
- node.callee = base
- node.arguments = this.parseExprList(tt.parenR, false)
- base = this.finishNode(node, "CallExpression")
- } else if (this.type === tt.backQuote) {
- let node = this.startNodeAt(startPos, startLoc)
- node.tag = base
- node.quasi = this.parseTemplate()
- base = this.finishNode(node, "TaggedTemplateExpression")
- } else {
- return base
- }
- }
-}
-
-// Parse an atomic expression — either a single token that is an
-// expression, an expression started by a keyword like `function` or
-// `new`, or an expression wrapped in punctuation like `()`, `[]`,
-// or `{}`.
-
-pp.parseExprAtom = function(refShorthandDefaultPos) {
- let node, canBeArrow = this.potentialArrowAt == this.start
- switch (this.type) {
- case tt._this:
- case tt._super:
- let type = this.type === tt._this ? "ThisExpression" : "Super"
- node = this.startNode()
- this.next()
- return this.finishNode(node, type)
-
- case tt._yield:
- if (this.inGenerator) this.unexpected()
-
- case tt.name:
- let startPos = this.start, startLoc = this.startLoc
- let id = this.parseIdent(this.type !== tt.name)
- if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow))
- return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id])
- return id
-
- case tt.regexp:
- let value = this.value
- node = this.parseLiteral(value.value)
- node.regex = {pattern: value.pattern, flags: value.flags}
- return node
-
- case tt.num: case tt.string:
- return this.parseLiteral(this.value)
-
- case tt._null: case tt._true: case tt._false:
- node = this.startNode()
- node.value = this.type === tt._null ? null : this.type === tt._true
- node.raw = this.type.keyword
- this.next()
- return this.finishNode(node, "Literal")
-
- case tt.parenL:
- return this.parseParenAndDistinguishExpression(canBeArrow)
-
- case tt.bracketL:
- node = this.startNode()
- this.next()
- // check whether this is array comprehension or regular array
- if (this.options.ecmaVersion >= 7 && this.type === tt._for) {
- return this.parseComprehension(node, false)
- }
- node.elements = this.parseExprList(tt.bracketR, true, true, refShorthandDefaultPos)
- return this.finishNode(node, "ArrayExpression")
-
- case tt.braceL:
- return this.parseObj(false, refShorthandDefaultPos)
-
- case tt._function:
- node = this.startNode()
- this.next()
- return this.parseFunction(node, false)
-
- case tt._class:
- return this.parseClass(this.startNode(), false)
-
- case tt._new:
- return this.parseNew()
-
- case tt.backQuote:
- return this.parseTemplate()
-
- default:
- this.unexpected()
- }
-}
-
-pp.parseLiteral = function(value) {
- let node = this.startNode()
- node.value = value
- node.raw = this.input.slice(this.start, this.end)
- this.next()
- return this.finishNode(node, "Literal")
-}
-
-pp.parseParenExpression = function() {
- this.expect(tt.parenL)
- let val = this.parseExpression()
- this.expect(tt.parenR)
- return val
-}
-
-pp.parseParenAndDistinguishExpression = function(canBeArrow) {
- let startPos = this.start, startLoc = this.startLoc, val
- if (this.options.ecmaVersion >= 6) {
- this.next()
-
- if (this.options.ecmaVersion >= 7 && this.type === tt._for) {
- return this.parseComprehension(this.startNodeAt(startPos, startLoc), true)
- }
-
- let innerStartPos = this.start, innerStartLoc = this.startLoc
- let exprList = [], first = true
- let refShorthandDefaultPos = {start: 0}, spreadStart, innerParenStart
- while (this.type !== tt.parenR) {
- first ? first = false : this.expect(tt.comma)
- if (this.type === tt.ellipsis) {
- spreadStart = this.start
- exprList.push(this.parseParenItem(this.parseRest()))
- break
- } else {
- if (this.type === tt.parenL && !innerParenStart) {
- innerParenStart = this.start
- }
- exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem))
- }
- }
- let innerEndPos = this.start, innerEndLoc = this.startLoc
- this.expect(tt.parenR)
-
- if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) {
- if (innerParenStart) this.unexpected(innerParenStart)
- return this.parseParenArrowList(startPos, startLoc, exprList)
- }
-
- if (!exprList.length) this.unexpected(this.lastTokStart)
- if (spreadStart) this.unexpected(spreadStart)
- if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start)
-
- if (exprList.length > 1) {
- val = this.startNodeAt(innerStartPos, innerStartLoc)
- val.expressions = exprList
- this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc)
- } else {
- val = exprList[0]
- }
- } else {
- val = this.parseParenExpression()
- }
-
- if (this.options.preserveParens) {
- let par = this.startNodeAt(startPos, startLoc)
- par.expression = val
- return this.finishNode(par, "ParenthesizedExpression")
- } else {
- return val
- }
-}
-
-pp.parseParenItem = function(item) {
- return item
-}
-
-pp.parseParenArrowList = function(startPos, startLoc, exprList) {
- return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList)
-}
-
-// New's precedence is slightly tricky. It must allow its argument
-// to be a `[]` or dot subscript expression, but not a call — at
-// least, not without wrapping it in parentheses. Thus, it uses the
-
-const empty = []
-
-pp.parseNew = function() {
- let node = this.startNode()
- let meta = this.parseIdent(true)
- if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) {
- node.meta = meta
- node.property = this.parseIdent(true)
- if (node.property.name !== "target")
- this.raise(node.property.start, "The only valid meta property for new is new.target")
- return this.finishNode(node, "MetaProperty")
- }
- let startPos = this.start, startLoc = this.startLoc
- node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true)
- if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, false)
- else node.arguments = empty
- return this.finishNode(node, "NewExpression")
-}
-
-// Parse template expression.
-
-pp.parseTemplateElement = function() {
- let elem = this.startNode()
- elem.value = {
- raw: this.input.slice(this.start, this.end),
- cooked: this.value
- }
- this.next()
- elem.tail = this.type === tt.backQuote
- return this.finishNode(elem, "TemplateElement")
-}
-
-pp.parseTemplate = function() {
- let node = this.startNode()
- this.next()
- node.expressions = []
- let curElt = this.parseTemplateElement()
- node.quasis = [curElt]
- while (!curElt.tail) {
- this.expect(tt.dollarBraceL)
- node.expressions.push(this.parseExpression())
- this.expect(tt.braceR)
- node.quasis.push(curElt = this.parseTemplateElement())
- }
- this.next()
- return this.finishNode(node, "TemplateLiteral")
-}
-
-// Parse an object literal or binding pattern.
-
-pp.parseObj = function(isPattern, refShorthandDefaultPos) {
- let node = this.startNode(), first = true, propHash = {}
- node.properties = []
- this.next()
- while (!this.eat(tt.braceR)) {
- if (!first) {
- this.expect(tt.comma)
- if (this.afterTrailingComma(tt.braceR)) break
- } else first = false
-
- let prop = this.startNode(), isGenerator, startPos, startLoc
- if (this.options.ecmaVersion >= 6) {
- prop.method = false
- prop.shorthand = false
- if (isPattern || refShorthandDefaultPos) {
- startPos = this.start
- startLoc = this.startLoc
- }
- if (!isPattern)
- isGenerator = this.eat(tt.star)
- }
- this.parsePropertyName(prop)
- this.parsePropertyValue(prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos)
- this.checkPropClash(prop, propHash)
- node.properties.push(this.finishNode(prop, "Property"))
- }
- return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression")
-}
-
-pp.parsePropertyValue = function(prop, isPattern, isGenerator, startPos, startLoc, refShorthandDefaultPos) {
- if (this.eat(tt.colon)) {
- prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refShorthandDefaultPos)
- prop.kind = "init"
- } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) {
- if (isPattern) this.unexpected()
- prop.kind = "init"
- prop.method = true
- prop.value = this.parseMethod(isGenerator)
- } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" &&
- (prop.key.name === "get" || prop.key.name === "set") &&
- (this.type != tt.comma && this.type != tt.braceR)) {
- if (isGenerator || isPattern) this.unexpected()
- prop.kind = prop.key.name
- this.parsePropertyName(prop)
- prop.value = this.parseMethod(false)
- } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
- prop.kind = "init"
- if (isPattern) {
- if (this.isKeyword(prop.key.name) ||
- (this.strict && (reservedWords.strictBind(prop.key.name) || reservedWords.strict(prop.key.name))) ||
- (!this.options.allowReserved && this.isReservedWord(prop.key.name)))
- this.raise(prop.key.start, "Binding " + prop.key.name)
- prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)
- } else if (this.type === tt.eq && refShorthandDefaultPos) {
- if (!refShorthandDefaultPos.start)
- refShorthandDefaultPos.start = this.start
- prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key)
- } else {
- prop.value = prop.key
- }
- prop.shorthand = true
- } else this.unexpected()
-}
-
-pp.parsePropertyName = function(prop) {
- if (this.options.ecmaVersion >= 6) {
- if (this.eat(tt.bracketL)) {
- prop.computed = true
- prop.key = this.parseMaybeAssign()
- this.expect(tt.bracketR)
- return prop.key
- } else {
- prop.computed = false
- }
- }
- return prop.key = (this.type === tt.num || this.type === tt.string) ? this.parseExprAtom() : this.parseIdent(true)
-}
-
-// Initialize empty function node.
-
-pp.initFunction = function(node) {
- node.id = null
- if (this.options.ecmaVersion >= 6) {
- node.generator = false
- node.expression = false
- }
-}
-
-// Parse object or class method.
-
-pp.parseMethod = function(isGenerator) {
- let node = this.startNode()
- this.initFunction(node)
- this.expect(tt.parenL)
- node.params = this.parseBindingList(tt.parenR, false, false)
- let allowExpressionBody
- if (this.options.ecmaVersion >= 6) {
- node.generator = isGenerator
- allowExpressionBody = true
- } else {
- allowExpressionBody = false
- }
- this.parseFunctionBody(node, allowExpressionBody)
- return this.finishNode(node, "FunctionExpression")
-}
-
-// Parse arrow function expression with given parameters.
-
-pp.parseArrowExpression = function(node, params) {
- this.initFunction(node)
- node.params = this.toAssignableList(params, true)
- this.parseFunctionBody(node, true)
- return this.finishNode(node, "ArrowFunctionExpression")
-}
-
-// Parse function body and check parameters.
-
-pp.parseFunctionBody = function(node, allowExpression) {
- let isExpression = allowExpression && this.type !== tt.braceL
-
- if (isExpression) {
- node.body = this.parseMaybeAssign()
- node.expression = true
- } else {
- // Start a new scope with regard to labels and the `inFunction`
- // flag (restore them to their old value afterwards).
- let oldInFunc = this.inFunction, oldInGen = this.inGenerator, oldLabels = this.labels
- this.inFunction = true; this.inGenerator = node.generator; this.labels = []
- node.body = this.parseBlock(true)
- node.expression = false
- this.inFunction = oldInFunc; this.inGenerator = oldInGen; this.labels = oldLabels
- }
-
- // If this is a strict mode function, verify that argument names
- // are not repeated, and it does not try to bind the words `eval`
- // or `arguments`.
- if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) {
- let nameHash = {}, oldStrict = this.strict
- this.strict = true
- if (node.id)
- this.checkLVal(node.id, true)
- for (let i = 0; i < node.params.length; i++)
- this.checkLVal(node.params[i], true, nameHash)
- this.strict = oldStrict
- }
-}
-
-// Parses a comma-separated list of expressions, and returns them as
-// an array. `close` is the token type that ends the list, and
-// `allowEmpty` can be turned on to allow subsequent commas with
-// nothing in between them to be parsed as `null` (which is needed
-// for array literals).
-
-pp.parseExprList = function(close, allowTrailingComma, allowEmpty, refShorthandDefaultPos) {
- let elts = [], first = true
- while (!this.eat(close)) {
- if (!first) {
- this.expect(tt.comma)
- if (allowTrailingComma && this.afterTrailingComma(close)) break
- } else first = false
-
- if (allowEmpty && this.type === tt.comma) {
- elts.push(null)
- } else {
- if (this.type === tt.ellipsis)
- elts.push(this.parseSpread(refShorthandDefaultPos))
- else
- elts.push(this.parseMaybeAssign(false, refShorthandDefaultPos))
- }
- }
- return elts
-}
-
-// Parse the next token as an identifier. If `liberal` is true (used
-// when parsing properties), it will also convert keywords into
-// identifiers.
-
-pp.parseIdent = function(liberal) {
- let node = this.startNode()
- if (liberal && this.options.allowReserved == "never") liberal = false
- if (this.type === tt.name) {
- if (!liberal &&
- ((!this.options.allowReserved && this.isReservedWord(this.value)) ||
- (this.strict && reservedWords.strict(this.value)) &&
- (this.options.ecmaVersion >= 6 ||
- this.input.slice(this.start, this.end).indexOf("\\") == -1)))
- this.raise(this.start, "The keyword '" + this.value + "' is reserved")
- node.name = this.value
- } else if (liberal && this.type.keyword) {
- node.name = this.type.keyword
- } else {
- this.unexpected()
- }
- this.next()
- return this.finishNode(node, "Identifier")
-}
-
-// Parses yield expression inside generator.
-
-pp.parseYield = function() {
- let node = this.startNode()
- this.next()
- if (this.type == tt.semi || this.canInsertSemicolon() || (this.type != tt.star && !this.type.startsExpr)) {
- node.delegate = false
- node.argument = null
- } else {
- node.delegate = this.eat(tt.star)
- node.argument = this.parseMaybeAssign()
- }
- return this.finishNode(node, "YieldExpression")
-}
-
-// Parses array and generator comprehensions.
-
-pp.parseComprehension = function(node, isGenerator) {
- node.blocks = []
- while (this.type === tt._for) {
- let block = this.startNode()
- this.next()
- this.expect(tt.parenL)
- block.left = this.parseBindingAtom()
- this.checkLVal(block.left, true)
- this.expectContextual("of")
- block.right = this.parseExpression()
- this.expect(tt.parenR)
- node.blocks.push(this.finishNode(block, "ComprehensionBlock"))
- }
- node.filter = this.eat(tt._if) ? this.parseParenExpression() : null
- node.body = this.parseExpression()
- this.expect(isGenerator ? tt.parenR : tt.bracketR)
- node.generator = isGenerator
- return this.finishNode(node, "ComprehensionExpression")
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/identifier.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/identifier.js
deleted file mode 100644
index ad2fe03935..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/identifier.js
+++ /dev/null
@@ -1,129 +0,0 @@
-// This is a trick taken from Esprima. It turns out that, on
-// non-Chrome browsers, to check whether a string is in a set, a
-// predicate containing a big ugly `switch` statement is faster than
-// a regular expression, and on Chrome the two are about on par.
-// This function uses `eval` (non-lexical) to produce such a
-// predicate from a space-separated string of words.
-//
-// It starts by sorting the words by length.
-
-function makePredicate(words) {
- words = words.split(" ")
- let f = "", cats = []
- out: for (let i = 0; i < words.length; ++i) {
- for (let j = 0; j < cats.length; ++j)
- if (cats[j][0].length == words[i].length) {
- cats[j].push(words[i])
- continue out
- }
- cats.push([words[i]])
- }
- function compareTo(arr) {
- if (arr.length == 1) return f += "return str === " + JSON.stringify(arr[0]) + ";"
- f += "switch(str){"
- for (let i = 0; i < arr.length; ++i) f += "case " + JSON.stringify(arr[i]) + ":"
- f += "return true}return false;"
- }
-
- // When there are more than three length categories, an outer
- // switch first dispatches on the lengths, to save on comparisons.
-
- if (cats.length > 3) {
- cats.sort((a, b) => b.length - a.length)
- f += "switch(str.length){"
- for (let i = 0; i < cats.length; ++i) {
- let cat = cats[i]
- f += "case " + cat[0].length + ":"
- compareTo(cat)
- }
- f += "}"
-
- // Otherwise, simply generate a flat `switch` statement.
-
- } else {
- compareTo(words)
- }
- return new Function("str", f)
-}
-
-// Reserved word lists for various dialects of the language
-
-export const reservedWords = {
- 3: makePredicate("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile"),
- 5: makePredicate("class enum extends super const export import"),
- 6: makePredicate("enum await"),
- strict: makePredicate("implements interface let package private protected public static yield"),
- strictBind: makePredicate("eval arguments")
-}
-
-// And the keywords
-
-var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"
-
-export const keywords = {
- 5: makePredicate(ecma5AndLessKeywords),
- 6: makePredicate(ecma5AndLessKeywords + " let const class extends export import yield super")
-}
-
-// ## Character categories
-
-// Big ugly regular expressions that match characters in the
-// whitespace, identifier, and identifier-start categories. These
-// are only applied when a character is found to actually have a
-// code point above 128.
-// Generated by `tools/generate-identifier-regex.js`.
-
-let nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b2\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua7ad\ua7b0\ua7b1\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab5f\uab64\uab65\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"
-let nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2d\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"
-
-const nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]")
-const nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]")
-
-nonASCIIidentifierStartChars = nonASCIIidentifierChars = null
-
-// These are a run-length and offset encoded representation of the
-// >0xffff code points that are a valid part of identifiers. The
-// offset starts at 0x10000, and each pair of numbers represents an
-// offset to the next range, and then a size of the range. They were
-// generated by tools/generate-identifier-regex.js
-var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,99,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,98,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,955,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,38,17,2,24,133,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,32,4,287,47,21,1,2,0,185,46,82,47,21,0,60,42,502,63,32,0,449,56,1288,920,104,110,2962,1070,13266,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,16481,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,1340,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,16355,541]
-var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,16,9,83,11,168,11,6,9,8,2,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,316,19,13,9,214,6,3,8,112,16,16,9,82,12,9,9,535,9,20855,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,4305,6,792618,239]
-
-// This has a complexity linear to the value of the code. The
-// assumption is that looking up astral identifier characters is
-// rare.
-function isInAstralSet(code, set) {
- let pos = 0x10000
- for (let i = 0; i < set.length; i += 2) {
- pos += set[i]
- if (pos > code) return false
- pos += set[i + 1]
- if (pos >= code) return true
- }
-}
-
-// Test whether a given character code starts an identifier.
-
-export function isIdentifierStart(code, astral) {
- if (code < 65) return code === 36
- if (code < 91) return true
- if (code < 97) return code === 95
- if (code < 123) return true
- if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code))
- if (astral === false) return false
- return isInAstralSet(code, astralIdentifierStartCodes)
-}
-
-// Test whether a given character is part of an identifier.
-
-export function isIdentifierChar(code, astral) {
- if (code < 48) return code === 36
- if (code < 58) return true
- if (code < 65) return false
- if (code < 91) return true
- if (code < 97) return code === 95
- if (code < 123) return true
- if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code))
- if (astral === false) return false
- return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes)
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/index.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/index.js
deleted file mode 100644
index 8604b74aa6..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/index.js
+++ /dev/null
@@ -1,75 +0,0 @@
-// Acorn is a tiny, fast JavaScript parser written in JavaScript.
-//
-// Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and
-// various contributors and released under an MIT license.
-//
-// Git repositories for Acorn are available at
-//
-// http://marijnhaverbeke.nl/git/acorn
-// https://github.com/marijnh/acorn.git
-//
-// Please use the [github bug tracker][ghbt] to report issues.
-//
-// [ghbt]: https://github.com/marijnh/acorn/issues
-//
-// This file defines the main parser interface. The library also comes
-// with a [error-tolerant parser][dammit] and an
-// [abstract syntax tree walker][walk], defined in other files.
-//
-// [dammit]: acorn_loose.js
-// [walk]: util/walk.js
-
-import {Parser} from "./state"
-import {getOptions} from "./options"
-import "./parseutil"
-import "./statement"
-import "./lval"
-import "./expression"
-
-export {Parser, plugins} from "./state"
-export {defaultOptions} from "./options"
-export {SourceLocation} from "./location"
-export {getLineInfo} from "./location"
-export {Node} from "./node"
-export {TokenType, types as tokTypes} from "./tokentype"
-export {TokContext, types as tokContexts} from "./tokencontext"
-export {isIdentifierChar, isIdentifierStart} from "./identifier"
-export {Token} from "./tokenize"
-export {isNewLine, lineBreak, lineBreakG} from "./whitespace"
-
-export const version = "1.2.2"
-
-// The main exported interface (under `self.acorn` when in the
-// browser) is a `parse` function that takes a code string and
-// returns an abstract syntax tree as specified by [Mozilla parser
-// API][api].
-//
-// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
-
-export function parse(input, options) {
- let p = parser(options, input)
- let startPos = p.pos, startLoc = p.options.locations && p.curPosition()
- p.nextToken()
- return p.parseTopLevel(p.options.program || p.startNodeAt(startPos, startLoc))
-}
-
-// This function tries to parse a single expression at a given
-// offset in a string. Useful for parsing mixed-language formats
-// that embed JavaScript expressions.
-
-export function parseExpressionAt(input, pos, options) {
- let p = parser(options, input, pos)
- p.nextToken()
- return p.parseExpression()
-}
-
-// Acorn is organized as a tokenizer and a recursive-descent parser.
-// The `tokenize` export provides an interface to the tokenizer.
-
-export function tokenizer(input, options) {
- return parser(options, input)
-}
-
-function parser(options, input) {
- return new Parser(getOptions(options), String(input))
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/location.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/location.js
deleted file mode 100755
index b813fbc7b3..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/location.js
+++ /dev/null
@@ -1,68 +0,0 @@
-import {Parser} from "./state"
-import {lineBreakG} from "./whitespace"
-import {deprecate} from "util"
-
-// These are used when `options.locations` is on, for the
-// `startLoc` and `endLoc` properties.
-
-export class Position {
- constructor(line, col) {
- this.line = line
- this.column = col
- }
-
- offset(n) {
- return new Position(this.line, this.column + n)
- }
-}
-
-export class SourceLocation {
- constructor(p, start, end) {
- this.start = start
- this.end = end
- if (p.sourceFile !== null) this.source = p.sourceFile
- }
-}
-
-// The `getLineInfo` function is mostly useful when the
-// `locations` option is off (for performance reasons) and you
-// want to find the line/column position for a given character
-// offset. `input` should be the code string that the offset refers
-// into.
-
-export function getLineInfo(input, offset) {
- for (let line = 1, cur = 0;;) {
- lineBreakG.lastIndex = cur
- let match = lineBreakG.exec(input)
- if (match && match.index < offset) {
- ++line
- cur = match.index + match[0].length
- } else {
- return new Position(line, offset - cur)
- }
- }
-}
-
-const pp = Parser.prototype
-
-// This function is used to raise exceptions on parse errors. It
-// takes an offset integer (into the current `input`) to indicate
-// the location of the error, attaches the position to the end
-// of the error message, and then raises a `SyntaxError` with that
-// message.
-
-pp.raise = function(pos, message) {
- let loc = getLineInfo(this.input, pos)
- message += " (" + loc.line + ":" + loc.column + ")"
- let err = new SyntaxError(message)
- err.pos = pos; err.loc = loc; err.raisedAt = this.pos
- throw err
-}
-
-pp.curPosition = function() {
- return new Position(this.curLine, this.pos - this.lineStart)
-}
-
-pp.markPosition = function() {
- return this.options.locations ? [this.start, this.startLoc] : this.start
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/acorn_loose.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/acorn_loose.js
deleted file mode 100644
index e69de29bb2..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/acorn_loose.js
+++ /dev/null
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/expression.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/expression.js
deleted file mode 100644
index 85b2fb4e36..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/expression.js
+++ /dev/null
@@ -1,511 +0,0 @@
-import {LooseParser} from "./state"
-import {isDummy} from "./parseutil"
-import {tokTypes as tt} from ".."
-
-const lp = LooseParser.prototype
-
-lp.checkLVal = function(expr, binding) {
- if (!expr) return expr
- switch (expr.type) {
- case "Identifier":
- return expr
-
- case "MemberExpression":
- return binding ? this.dummyIdent() : expr
-
- case "ParenthesizedExpression":
- expr.expression = this.checkLVal(expr.expression, binding)
- return expr
-
- // FIXME recursively check contents
- case "ObjectPattern":
- case "ArrayPattern":
- case "RestElement":
- case "AssignmentPattern":
- if (this.options.ecmaVersion >= 6) return expr
-
- default:
- return this.dummyIdent()
- }
-}
-
-lp.parseExpression = function(noIn) {
- let start = this.storeCurrentPos()
- let expr = this.parseMaybeAssign(noIn)
- if (this.tok.type === tt.comma) {
- let node = this.startNodeAt(start)
- node.expressions = [expr]
- while (this.eat(tt.comma)) node.expressions.push(this.parseMaybeAssign(noIn))
- return this.finishNode(node, "SequenceExpression")
- }
- return expr
-}
-
-lp.parseParenExpression = function() {
- this.pushCx()
- this.expect(tt.parenL)
- let val = this.parseExpression()
- this.popCx()
- this.expect(tt.parenR)
- return val
-}
-
-lp.parseMaybeAssign = function(noIn) {
- let start = this.storeCurrentPos()
- let left = this.parseMaybeConditional(noIn)
- if (this.tok.type.isAssign) {
- let node = this.startNodeAt(start)
- node.operator = this.tok.value
- node.left = this.tok.type === tt.eq ? this.toAssignable(left) : this.checkLVal(left)
- this.next()
- node.right = this.parseMaybeAssign(noIn)
- return this.finishNode(node, "AssignmentExpression")
- }
- return left
-}
-
-lp.parseMaybeConditional = function(noIn) {
- let start = this.storeCurrentPos()
- let expr = this.parseExprOps(noIn)
- if (this.eat(tt.question)) {
- let node = this.startNodeAt(start)
- node.test = expr
- node.consequent = this.parseMaybeAssign()
- node.alternate = this.expect(tt.colon) ? this.parseMaybeAssign(noIn) : this.dummyIdent()
- return this.finishNode(node, "ConditionalExpression")
- }
- return expr
-}
-
-lp.parseExprOps = function(noIn) {
- let start = this.storeCurrentPos()
- let indent = this.curIndent, line = this.curLineStart
- return this.parseExprOp(this.parseMaybeUnary(noIn), start, -1, noIn, indent, line)
-}
-
-lp.parseExprOp = function(left, start, minPrec, noIn, indent, line) {
- if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) return left
- let prec = this.tok.type.binop
- if (prec != null && (!noIn || this.tok.type !== tt._in)) {
- if (prec > minPrec) {
- let node = this.startNodeAt(start)
- node.left = left
- node.operator = this.tok.value
- this.next()
- if (this.curLineStart != line && this.curIndent < indent && this.tokenStartsLine()) {
- node.right = this.dummyIdent()
- } else {
- let rightStart = this.storeCurrentPos()
- node.right = this.parseExprOp(this.parseMaybeUnary(noIn), rightStart, prec, noIn, indent, line)
- }
- this.finishNode(node, /&&|\|\|/.test(node.operator) ? "LogicalExpression" : "BinaryExpression")
- return this.parseExprOp(node, start, minPrec, noIn, indent, line)
- }
- }
- return left
-}
-
-lp.parseMaybeUnary = function(noIn) {
- if (this.tok.type.prefix) {
- let node = this.startNode(), update = this.tok.type === tt.incDec
- node.operator = this.tok.value
- node.prefix = true
- this.next()
- node.argument = this.parseMaybeUnary(noIn)
- if (update) node.argument = this.checkLVal(node.argument)
- return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression")
- } else if (this.tok.type === tt.ellipsis) {
- let node = this.startNode()
- this.next()
- node.argument = this.parseMaybeUnary(noIn)
- return this.finishNode(node, "SpreadElement")
- }
- let start = this.storeCurrentPos()
- let expr = this.parseExprSubscripts()
- while (this.tok.type.postfix && !this.canInsertSemicolon()) {
- let node = this.startNodeAt(start)
- node.operator = this.tok.value
- node.prefix = false
- node.argument = this.checkLVal(expr)
- this.next()
- expr = this.finishNode(node, "UpdateExpression")
- }
- return expr
-}
-
-lp.parseExprSubscripts = function() {
- let start = this.storeCurrentPos()
- return this.parseSubscripts(this.parseExprAtom(), start, false, this.curIndent, this.curLineStart)
-}
-
-lp.parseSubscripts = function(base, start, noCalls, startIndent, line) {
- for (;;) {
- if (this.curLineStart != line && this.curIndent <= startIndent && this.tokenStartsLine()) {
- if (this.tok.type == tt.dot && this.curIndent == startIndent)
- --startIndent
- else
- return base
- }
-
- if (this.eat(tt.dot)) {
- let node = this.startNodeAt(start)
- node.object = base
- if (this.curLineStart != line && this.curIndent <= startIndent && this.tokenStartsLine())
- node.property = this.dummyIdent()
- else
- node.property = this.parsePropertyAccessor() || this.dummyIdent()
- node.computed = false
- base = this.finishNode(node, "MemberExpression")
- } else if (this.tok.type == tt.bracketL) {
- this.pushCx()
- this.next()
- let node = this.startNodeAt(start)
- node.object = base
- node.property = this.parseExpression()
- node.computed = true
- this.popCx()
- this.expect(tt.bracketR)
- base = this.finishNode(node, "MemberExpression")
- } else if (!noCalls && this.tok.type == tt.parenL) {
- let node = this.startNodeAt(start)
- node.callee = base
- node.arguments = this.parseExprList(tt.parenR)
- base = this.finishNode(node, "CallExpression")
- } else if (this.tok.type == tt.backQuote) {
- let node = this.startNodeAt(start)
- node.tag = base
- node.quasi = this.parseTemplate()
- base = this.finishNode(node, "TaggedTemplateExpression")
- } else {
- return base
- }
- }
-}
-
-lp.parseExprAtom = function() {
- let node
- switch (this.tok.type) {
- case tt._this:
- case tt._super:
- let type = this.tok.type === tt._this ? "ThisExpression" : "Super"
- node = this.startNode()
- this.next()
- return this.finishNode(node, type)
-
- case tt.name:
- let start = this.storeCurrentPos()
- let id = this.parseIdent()
- return this.eat(tt.arrow) ? this.parseArrowExpression(this.startNodeAt(start), [id]) : id
-
- case tt.regexp:
- node = this.startNode()
- let val = this.tok.value
- node.regex = {pattern: val.pattern, flags: val.flags}
- node.value = val.value
- node.raw = this.input.slice(this.tok.start, this.tok.end)
- this.next()
- return this.finishNode(node, "Literal")
-
- case tt.num: case tt.string:
- node = this.startNode()
- node.value = this.tok.value
- node.raw = this.input.slice(this.tok.start, this.tok.end)
- this.next()
- return this.finishNode(node, "Literal")
-
- case tt._null: case tt._true: case tt._false:
- node = this.startNode()
- node.value = this.tok.type === tt._null ? null : this.tok.type === tt._true
- node.raw = this.tok.type.keyword
- this.next()
- return this.finishNode(node, "Literal")
-
- case tt.parenL:
- let parenStart = this.storeCurrentPos()
- this.next()
- let inner = this.parseExpression()
- this.expect(tt.parenR)
- if (this.eat(tt.arrow)) {
- return this.parseArrowExpression(this.startNodeAt(parenStart), inner.expressions || (isDummy(inner) ? [] : [inner]))
- }
- if (this.options.preserveParens) {
- let par = this.startNodeAt(parenStart)
- par.expression = inner
- inner = this.finishNode(par, "ParenthesizedExpression")
- }
- return inner
-
- case tt.bracketL:
- node = this.startNode()
- node.elements = this.parseExprList(tt.bracketR, true)
- return this.finishNode(node, "ArrayExpression")
-
- case tt.braceL:
- return this.parseObj()
-
- case tt._class:
- return this.parseClass()
-
- case tt._function:
- node = this.startNode()
- this.next()
- return this.parseFunction(node, false)
-
- case tt._new:
- return this.parseNew()
-
- case tt._yield:
- node = this.startNode()
- this.next()
- if (this.semicolon() || this.canInsertSemicolon() || (this.tok.type != tt.star && !this.tok.type.startsExpr)) {
- node.delegate = false
- node.argument = null
- } else {
- node.delegate = this.eat(tt.star)
- node.argument = this.parseMaybeAssign()
- }
- return this.finishNode(node, "YieldExpression")
-
- case tt.backQuote:
- return this.parseTemplate()
-
- default:
- return this.dummyIdent()
- }
-}
-
-lp.parseNew = function() {
- let node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart
- let meta = this.parseIdent(true)
- if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) {
- node.meta = meta
- node.property = this.parseIdent(true)
- return this.finishNode(node, "MetaProperty")
- }
- let start = this.storeCurrentPos()
- node.callee = this.parseSubscripts(this.parseExprAtom(), start, true, startIndent, line)
- if (this.tok.type == tt.parenL) {
- node.arguments = this.parseExprList(tt.parenR)
- } else {
- node.arguments = []
- }
- return this.finishNode(node, "NewExpression")
-}
-
-lp.parseTemplateElement = function() {
- let elem = this.startNode()
- elem.value = {
- raw: this.input.slice(this.tok.start, this.tok.end),
- cooked: this.tok.value
- }
- this.next()
- elem.tail = this.tok.type === tt.backQuote
- return this.finishNode(elem, "TemplateElement")
-}
-
-lp.parseTemplate = function() {
- let node = this.startNode()
- this.next()
- node.expressions = []
- let curElt = this.parseTemplateElement()
- node.quasis = [curElt]
- while (!curElt.tail) {
- this.next()
- node.expressions.push(this.parseExpression())
- if (this.expect(tt.braceR)) {
- curElt = this.parseTemplateElement()
- } else {
- curElt = this.startNode()
- curElt.value = {cooked: '', raw: ''}
- curElt.tail = true
- }
- node.quasis.push(curElt)
- }
- this.expect(tt.backQuote)
- return this.finishNode(node, "TemplateLiteral")
-}
-
-lp.parseObj = function() {
- let node = this.startNode()
- node.properties = []
- this.pushCx()
- let indent = this.curIndent + 1, line = this.curLineStart
- this.eat(tt.braceL)
- if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
- while (!this.closes(tt.braceR, indent, line)) {
- let prop = this.startNode(), isGenerator, start
- if (this.options.ecmaVersion >= 6) {
- start = this.storeCurrentPos()
- prop.method = false
- prop.shorthand = false
- isGenerator = this.eat(tt.star)
- }
- this.parsePropertyName(prop)
- if (isDummy(prop.key)) { if (isDummy(this.parseMaybeAssign())) this.next(); this.eat(tt.comma); continue }
- if (this.eat(tt.colon)) {
- prop.kind = "init"
- prop.value = this.parseMaybeAssign()
- } else if (this.options.ecmaVersion >= 6 && (this.tok.type === tt.parenL || this.tok.type === tt.braceL)) {
- prop.kind = "init"
- prop.method = true
- prop.value = this.parseMethod(isGenerator)
- } else if (this.options.ecmaVersion >= 5 && prop.key.type === "Identifier" &&
- !prop.computed && (prop.key.name === "get" || prop.key.name === "set") &&
- (this.tok.type != tt.comma && this.tok.type != tt.braceR)) {
- prop.kind = prop.key.name
- this.parsePropertyName(prop)
- prop.value = this.parseMethod(false)
- } else {
- prop.kind = "init"
- if (this.options.ecmaVersion >= 6) {
- if (this.eat(tt.eq)) {
- let assign = this.startNodeAt(start)
- assign.operator = "="
- assign.left = prop.key
- assign.right = this.parseMaybeAssign()
- prop.value = this.finishNode(assign, "AssignmentExpression")
- } else {
- prop.value = prop.key
- }
- } else {
- prop.value = this.dummyIdent()
- }
- prop.shorthand = true
- }
- node.properties.push(this.finishNode(prop, "Property"))
- this.eat(tt.comma)
- }
- this.popCx()
- if (!this.eat(tt.braceR)) {
- // If there is no closing brace, make the node span to the start
- // of the next token (this is useful for Tern)
- this.last.end = this.tok.start
- if (this.options.locations) this.last.loc.end = this.tok.loc.start
- }
- return this.finishNode(node, "ObjectExpression")
-}
-
-lp.parsePropertyName = function(prop) {
- if (this.options.ecmaVersion >= 6) {
- if (this.eat(tt.bracketL)) {
- prop.computed = true
- prop.key = this.parseExpression()
- this.expect(tt.bracketR)
- return
- } else {
- prop.computed = false
- }
- }
- let key = (this.tok.type === tt.num || this.tok.type === tt.string) ? this.parseExprAtom() : this.parseIdent()
- prop.key = key || this.dummyIdent()
-}
-
-lp.parsePropertyAccessor = function() {
- if (this.tok.type === tt.name || this.tok.type.keyword) return this.parseIdent()
-}
-
-lp.parseIdent = function() {
- let name = this.tok.type === tt.name ? this.tok.value : this.tok.type.keyword
- if (!name) return this.dummyIdent()
- let node = this.startNode()
- this.next()
- node.name = name
- return this.finishNode(node, "Identifier")
-}
-
-lp.initFunction = function(node) {
- node.id = null
- node.params = []
- if (this.options.ecmaVersion >= 6) {
- node.generator = false
- node.expression = false
- }
-}
-
-// Convert existing expression atom to assignable pattern
-// if possible.
-
-lp.toAssignable = function(node, binding) {
- if (this.options.ecmaVersion >= 6 && node) {
- switch (node.type) {
- case "ObjectExpression":
- node.type = "ObjectPattern"
- let props = node.properties
- for (let i = 0; i < props.length; i++)
- this.toAssignable(props[i].value, binding)
- break
-
- case "ArrayExpression":
- node.type = "ArrayPattern"
- this.toAssignableList(node.elements, binding)
- break
-
- case "SpreadElement":
- node.type = "RestElement"
- node.argument = this.toAssignable(node.argument, binding)
- break
-
- case "AssignmentExpression":
- node.type = "AssignmentPattern"
- break
- }
- }
- return this.checkLVal(node, binding)
-}
-
-lp.toAssignableList = function(exprList, binding) {
- for (let i = 0; i < exprList.length; i++)
- exprList[i] = this.toAssignable(exprList[i], binding)
- return exprList
-}
-
-lp.parseFunctionParams = function(params) {
- params = this.parseExprList(tt.parenR)
- return this.toAssignableList(params, true)
-}
-
-lp.parseMethod = function(isGenerator) {
- let node = this.startNode()
- this.initFunction(node)
- node.params = this.parseFunctionParams()
- node.generator = isGenerator || false
- node.expression = this.options.ecmaVersion >= 6 && this.tok.type !== tt.braceL
- node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
- return this.finishNode(node, "FunctionExpression")
-}
-
-lp.parseArrowExpression = function(node, params) {
- this.initFunction(node)
- node.params = this.toAssignableList(params, true)
- node.expression = this.tok.type !== tt.braceL
- node.body = node.expression ? this.parseMaybeAssign() : this.parseBlock()
- return this.finishNode(node, "ArrowFunctionExpression")
-}
-
-lp.parseExprList = function(close, allowEmpty) {
- this.pushCx()
- let indent = this.curIndent, line = this.curLineStart, elts = []
- this.next(); // Opening bracket
- while (!this.closes(close, indent + 1, line)) {
- if (this.eat(tt.comma)) {
- elts.push(allowEmpty ? null : this.dummyIdent())
- continue
- }
- let elt = this.parseMaybeAssign()
- if (isDummy(elt)) {
- if (this.closes(close, indent, line)) break
- this.next()
- } else {
- elts.push(elt)
- }
- this.eat(tt.comma)
- }
- this.popCx()
- if (!this.eat(close)) {
- // If there is no closing brace, make the node span to the start
- // of the next token (this is useful for Tern)
- this.last.end = this.tok.start
- if (this.options.locations) this.last.loc.end = this.tok.loc.start
- }
- return elts
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/index.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/index.js
deleted file mode 100644
index acbea8a6c3..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/index.js
+++ /dev/null
@@ -1,50 +0,0 @@
-// Acorn: Loose parser
-//
-// This module provides an alternative parser (`parse_dammit`) that
-// exposes that same interface as `parse`, but will try to parse
-// anything as JavaScript, repairing syntax error the best it can.
-// There are circumstances in which it will raise an error and give
-// up, but they are very rare. The resulting AST will be a mostly
-// valid JavaScript AST (as per the [Mozilla parser API][api], except
-// that:
-//
-// - Return outside functions is allowed
-//
-// - Label consistency (no conflicts, break only to existing labels)
-// is not enforced.
-//
-// - Bogus Identifier nodes with a name of `"✖"` are inserted whenever
-// the parser got too confused to return anything meaningful.
-//
-// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
-//
-// The expected use for this is to *first* try `acorn.parse`, and only
-// if that fails switch to `parse_dammit`. The loose parser might
-// parse badly indented code incorrectly, so **don't** use it as
-// your default parser.
-//
-// Quite a lot of acorn.js is duplicated here. The alternative was to
-// add a *lot* of extra cruft to that file, making it less readable
-// and slower. Copying and editing the code allowed me to make
-// invasive changes and simplifications without creating a complicated
-// tangle.
-
-import * as acorn from ".."
-import {LooseParser} from "./state"
-import "./tokenize"
-import "./parseutil"
-import "./statement"
-import "./expression"
-
-export {LooseParser} from "./state"
-
-acorn.defaultOptions.tabSize = 4
-
-export function parse_dammit(input, options) {
- let p = new LooseParser(input, options)
- p.next()
- return p.parseTopLevel()
-}
-
-acorn.parse_dammit = parse_dammit
-acorn.LooseParser = LooseParser
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/parseutil.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/parseutil.js
deleted file mode 100644
index 3e2c80418f..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/parseutil.js
+++ /dev/null
@@ -1,126 +0,0 @@
-import {LooseParser} from "./state"
-import {Node, SourceLocation, lineBreak, isNewLine, tokTypes as tt} from ".."
-
-const lp = LooseParser.prototype
-
-lp.startNode = function() {
- let node = new Node
- node.start = this.tok.start
- if (this.options.locations)
- node.loc = new SourceLocation(this.toks, this.tok.loc.start)
- if (this.options.directSourceFile)
- node.sourceFile = this.options.directSourceFile
- if (this.options.ranges)
- node.range = [this.tok.start, 0]
- return node
-}
-
-lp.storeCurrentPos = function() {
- return this.options.locations ? [this.tok.start, this.tok.loc.start] : this.tok.start
-}
-
-lp.startNodeAt = function(pos) {
- let node = new Node
- if (this.options.locations) {
- node.start = pos[0]
- node.loc = new SourceLocation(this.toks, pos[1])
- pos = pos[0]
- } else {
- node.start = pos
- }
- if (this.options.directSourceFile)
- node.sourceFile = this.options.directSourceFile
- if (this.options.ranges)
- node.range = [pos, 0]
- return node
-}
-
-lp.finishNode = function(node, type) {
- node.type = type
- node.end = this.last.end
- if (this.options.locations)
- node.loc.end = this.last.loc.end
- if (this.options.ranges)
- node.range[1] = this.last.end
- return node
-}
-
-lp.dummyIdent = function() {
- let dummy = this.startNode()
- dummy.name = "✖"
- return this.finishNode(dummy, "Identifier")
-}
-
-export function isDummy(node) { return node.name == "✖" }
-
-lp.eat = function(type) {
- if (this.tok.type === type) {
- this.next()
- return true
- } else {
- return false
- }
-}
-
-lp.isContextual = function(name) {
- return this.tok.type === tt.name && this.tok.value === name
-}
-
-lp.eatContextual = function(name) {
- return this.tok.value === name && this.eat(tt.name)
-}
-
-lp.canInsertSemicolon = function() {
- return this.tok.type === tt.eof || this.tok.type === tt.braceR ||
- lineBreak.test(this.input.slice(this.last.end, this.tok.start))
-}
-
-lp.semicolon = function() {
- return this.eat(tt.semi)
-}
-
-lp.expect = function(type) {
- if (this.eat(type)) return true
- for (let i = 1; i <= 2; i++) {
- if (this.lookAhead(i).type == type) {
- for (let j = 0; j < i; j++) this.next()
- return true
- }
- }
-}
-
-lp.pushCx = function() {
- this.context.push(this.curIndent)
-}
-lp.popCx = function() {
- this.curIndent = this.context.pop()
-}
-
-lp.lineEnd = function(pos) {
- while (pos < this.input.length && !isNewLine(this.input.charCodeAt(pos))) ++pos
- return pos
-}
-
-lp.indentationAfter = function(pos) {
- for (let count = 0;; ++pos) {
- let ch = this.input.charCodeAt(pos)
- if (ch === 32) ++count
- else if (ch === 9) count += this.options.tabSize
- else return count
- }
-}
-
-lp.closes = function(closeTok, indent, line, blockHeuristic) {
- if (this.tok.type === closeTok || this.tok.type === tt.eof) return true
- return line != this.curLineStart && this.curIndent < indent && this.tokenStartsLine() &&
- (!blockHeuristic || this.nextLineStart >= this.input.length ||
- this.indentationAfter(this.nextLineStart) < indent)
-}
-
-lp.tokenStartsLine = function() {
- for (let p = this.tok.start - 1; p >= this.curLineStart; --p) {
- let ch = this.input.charCodeAt(p)
- if (ch !== 9 && ch !== 32) return false
- }
- return true
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/state.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/state.js
deleted file mode 100644
index fbf1227ab3..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/state.js
+++ /dev/null
@@ -1,17 +0,0 @@
-import {tokenizer, SourceLocation, tokTypes as tt} from ".."
-
-export function LooseParser(input, options) {
- this.toks = tokenizer(input, options)
- this.options = this.toks.options
- this.input = this.toks.input
- this.tok = this.last = {type: tt.eof, start: 0, end: 0}
- if (this.options.locations) {
- let here = this.toks.curPosition()
- this.tok.loc = new SourceLocation(this.toks, here, here)
- }
- this.ahead = []; // Tokens ahead
- this.context = []; // Indentation contexted
- this.curIndent = 0
- this.curLineStart = 0
- this.nextLineStart = this.lineEnd(this.curLineStart) + 1
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/statement.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/statement.js
deleted file mode 100644
index d2f9177a25..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/statement.js
+++ /dev/null
@@ -1,419 +0,0 @@
-import {LooseParser} from "./state"
-import {isDummy} from "./parseutil"
-import {getLineInfo, tokTypes as tt} from ".."
-
-const lp = LooseParser.prototype
-
-lp.parseTopLevel = function() {
- let node = this.startNodeAt(this.options.locations ? [0, getLineInfo(this.input, 0)] : 0)
- node.body = []
- while (this.tok.type !== tt.eof) node.body.push(this.parseStatement())
- this.last = this.tok
- if (this.options.ecmaVersion >= 6) {
- node.sourceType = this.options.sourceType
- }
- return this.finishNode(node, "Program")
-}
-
-lp.parseStatement = function() {
- let starttype = this.tok.type, node = this.startNode()
-
- switch (starttype) {
- case tt._break: case tt._continue:
- this.next()
- let isBreak = starttype === tt._break
- if (this.semicolon() || this.canInsertSemicolon()) {
- node.label = null
- } else {
- node.label = this.tok.type === tt.name ? this.parseIdent() : null
- this.semicolon()
- }
- return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
-
- case tt._debugger:
- this.next()
- this.semicolon()
- return this.finishNode(node, "DebuggerStatement")
-
- case tt._do:
- this.next()
- node.body = this.parseStatement()
- node.test = this.eat(tt._while) ? this.parseParenExpression() : this.dummyIdent()
- this.semicolon()
- return this.finishNode(node, "DoWhileStatement")
-
- case tt._for:
- this.next()
- this.pushCx()
- this.expect(tt.parenL)
- if (this.tok.type === tt.semi) return this.parseFor(node, null)
- if (this.tok.type === tt._var || this.tok.type === tt._let || this.tok.type === tt._const) {
- let init = this.parseVar(true)
- if (init.declarations.length === 1 && (this.tok.type === tt._in || this.isContextual("of"))) {
- return this.parseForIn(node, init)
- }
- return this.parseFor(node, init)
- }
- let init = this.parseExpression(true)
- if (this.tok.type === tt._in || this.isContextual("of"))
- return this.parseForIn(node, this.toAssignable(init))
- return this.parseFor(node, init)
-
- case tt._function:
- this.next()
- return this.parseFunction(node, true)
-
- case tt._if:
- this.next()
- node.test = this.parseParenExpression()
- node.consequent = this.parseStatement()
- node.alternate = this.eat(tt._else) ? this.parseStatement() : null
- return this.finishNode(node, "IfStatement")
-
- case tt._return:
- this.next()
- if (this.eat(tt.semi) || this.canInsertSemicolon()) node.argument = null
- else { node.argument = this.parseExpression(); this.semicolon() }
- return this.finishNode(node, "ReturnStatement")
-
- case tt._switch:
- let blockIndent = this.curIndent, line = this.curLineStart
- this.next()
- node.discriminant = this.parseParenExpression()
- node.cases = []
- this.pushCx()
- this.expect(tt.braceL)
-
- let cur
- while (!this.closes(tt.braceR, blockIndent, line, true)) {
- if (this.tok.type === tt._case || this.tok.type === tt._default) {
- let isCase = this.tok.type === tt._case
- if (cur) this.finishNode(cur, "SwitchCase")
- node.cases.push(cur = this.startNode())
- cur.consequent = []
- this.next()
- if (isCase) cur.test = this.parseExpression()
- else cur.test = null
- this.expect(tt.colon)
- } else {
- if (!cur) {
- node.cases.push(cur = this.startNode())
- cur.consequent = []
- cur.test = null
- }
- cur.consequent.push(this.parseStatement())
- }
- }
- if (cur) this.finishNode(cur, "SwitchCase")
- this.popCx()
- this.eat(tt.braceR)
- return this.finishNode(node, "SwitchStatement")
-
- case tt._throw:
- this.next()
- node.argument = this.parseExpression()
- this.semicolon()
- return this.finishNode(node, "ThrowStatement")
-
- case tt._try:
- this.next()
- node.block = this.parseBlock()
- node.handler = null
- if (this.tok.type === tt._catch) {
- let clause = this.startNode()
- this.next()
- this.expect(tt.parenL)
- clause.param = this.toAssignable(this.parseExprAtom(), true)
- this.expect(tt.parenR)
- clause.guard = null
- clause.body = this.parseBlock()
- node.handler = this.finishNode(clause, "CatchClause")
- }
- node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null
- if (!node.handler && !node.finalizer) return node.block
- return this.finishNode(node, "TryStatement")
-
- case tt._var:
- case tt._let:
- case tt._const:
- return this.parseVar()
-
- case tt._while:
- this.next()
- node.test = this.parseParenExpression()
- node.body = this.parseStatement()
- return this.finishNode(node, "WhileStatement")
-
- case tt._with:
- this.next()
- node.object = this.parseParenExpression()
- node.body = this.parseStatement()
- return this.finishNode(node, "WithStatement")
-
- case tt.braceL:
- return this.parseBlock()
-
- case tt.semi:
- this.next()
- return this.finishNode(node, "EmptyStatement")
-
- case tt._class:
- return this.parseClass(true)
-
- case tt._import:
- return this.parseImport()
-
- case tt._export:
- return this.parseExport()
-
- default:
- let expr = this.parseExpression()
- if (isDummy(expr)) {
- this.next()
- if (this.tok.type === tt.eof) return this.finishNode(node, "EmptyStatement")
- return this.parseStatement()
- } else if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) {
- node.body = this.parseStatement()
- node.label = expr
- return this.finishNode(node, "LabeledStatement")
- } else {
- node.expression = expr
- this.semicolon()
- return this.finishNode(node, "ExpressionStatement")
- }
- }
-}
-
-lp.parseBlock = function() {
- let node = this.startNode()
- this.pushCx()
- this.expect(tt.braceL)
- let blockIndent = this.curIndent, line = this.curLineStart
- node.body = []
- while (!this.closes(tt.braceR, blockIndent, line, true))
- node.body.push(this.parseStatement())
- this.popCx()
- this.eat(tt.braceR)
- return this.finishNode(node, "BlockStatement")
-}
-
-lp.parseFor = function(node, init) {
- node.init = init
- node.test = node.update = null
- if (this.eat(tt.semi) && this.tok.type !== tt.semi) node.test = this.parseExpression()
- if (this.eat(tt.semi) && this.tok.type !== tt.parenR) node.update = this.parseExpression()
- this.popCx()
- this.expect(tt.parenR)
- node.body = this.parseStatement()
- return this.finishNode(node, "ForStatement")
-}
-
-lp.parseForIn = function(node, init) {
- let type = this.tok.type === tt._in ? "ForInStatement" : "ForOfStatement"
- this.next()
- node.left = init
- node.right = this.parseExpression()
- this.popCx()
- this.expect(tt.parenR)
- node.body = this.parseStatement()
- return this.finishNode(node, type)
-}
-
-lp.parseVar = function(noIn) {
- let node = this.startNode()
- node.kind = this.tok.type.keyword
- this.next()
- node.declarations = []
- do {
- let decl = this.startNode()
- decl.id = this.options.ecmaVersion >= 6 ? this.toAssignable(this.parseExprAtom(), true) : this.parseIdent()
- decl.init = this.eat(tt.eq) ? this.parseMaybeAssign(noIn) : null
- node.declarations.push(this.finishNode(decl, "VariableDeclarator"))
- } while (this.eat(tt.comma))
- if (!node.declarations.length) {
- let decl = this.startNode()
- decl.id = this.dummyIdent()
- node.declarations.push(this.finishNode(decl, "VariableDeclarator"))
- }
- if (!noIn) this.semicolon()
- return this.finishNode(node, "VariableDeclaration")
-}
-
-lp.parseClass = function(isStatement) {
- let node = this.startNode()
- this.next()
- if (this.tok.type === tt.name) node.id = this.parseIdent()
- else if (isStatement) node.id = this.dummyIdent()
- else node.id = null
- node.superClass = this.eat(tt._extends) ? this.parseExpression() : null
- node.body = this.startNode()
- node.body.body = []
- this.pushCx()
- let indent = this.curIndent + 1, line = this.curLineStart
- this.eat(tt.braceL)
- if (this.curIndent + 1 < indent) { indent = this.curIndent; line = this.curLineStart }
- while (!this.closes(tt.braceR, indent, line)) {
- if (this.semicolon()) continue
- let method = this.startNode(), isGenerator
- if (this.options.ecmaVersion >= 6) {
- method.static = false
- isGenerator = this.eat(tt.star)
- }
- this.parsePropertyName(method)
- if (isDummy(method.key)) { if (isDummy(this.parseMaybeAssign())) this.next(); this.eat(tt.comma); continue }
- if (method.key.type === "Identifier" && !method.computed && method.key.name === "static" &&
- (this.tok.type != tt.parenL && this.tok.type != tt.braceL)) {
- method.static = true
- isGenerator = this.eat(tt.star)
- this.parsePropertyName(method)
- } else {
- method.static = false
- }
- if (this.options.ecmaVersion >= 5 && method.key.type === "Identifier" &&
- !method.computed && (method.key.name === "get" || method.key.name === "set") &&
- this.tok.type !== tt.parenL && this.tok.type !== tt.braceL) {
- method.kind = method.key.name
- this.parsePropertyName(method)
- method.value = this.parseMethod(false)
- } else {
- if (!method.computed && !method.static && !isGenerator && (
- method.key.type === "Identifier" && method.key.name === "constructor" ||
- method.key.type === "Literal" && method.key.value === "constructor")) {
- method.kind = "constructor"
- } else {
- method.kind = "method"
- }
- method.value = this.parseMethod(isGenerator)
- }
- node.body.body.push(this.finishNode(method, "MethodDefinition"))
- }
- this.popCx()
- if (!this.eat(tt.braceR)) {
- // If there is no closing brace, make the node span to the start
- // of the next token (this is useful for Tern)
- this.last.end = this.tok.start
- if (this.options.locations) this.last.loc.end = this.tok.loc.start
- }
- this.semicolon()
- this.finishNode(node.body, "ClassBody")
- return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
-}
-
-lp.parseFunction = function(node, isStatement) {
- this.initFunction(node)
- if (this.options.ecmaVersion >= 6) {
- node.generator = this.eat(tt.star)
- }
- if (this.tok.type === tt.name) node.id = this.parseIdent()
- else if (isStatement) node.id = this.dummyIdent()
- node.params = this.parseFunctionParams()
- node.body = this.parseBlock()
- return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
-}
-
-lp.parseExport = function() {
- let node = this.startNode()
- this.next()
- if (this.eat(tt.star)) {
- node.source = this.eatContextual("from") ? this.parseExprAtom() : null
- return this.finishNode(node, "ExportAllDeclaration")
- }
- if (this.eat(tt._default)) {
- let expr = this.parseMaybeAssign()
- if (expr.id) {
- switch (expr.type) {
- case "FunctionExpression": expr.type = "FunctionDeclaration"; break
- case "ClassExpression": expr.type = "ClassDeclaration"; break
- }
- }
- node.declaration = expr
- this.semicolon()
- return this.finishNode(node, "ExportDefaultDeclaration")
- }
- if (this.tok.type.keyword) {
- node.declaration = this.parseStatement()
- node.specifiers = []
- node.source = null
- } else {
- node.declaration = null
- node.specifiers = this.parseExportSpecifierList()
- node.source = this.eatContextual("from") ? this.parseExprAtom() : null
- this.semicolon()
- }
- return this.finishNode(node, "ExportNamedDeclaration")
-}
-
-lp.parseImport = function() {
- let node = this.startNode()
- this.next()
- if (this.tok.type === tt.string) {
- node.specifiers = []
- node.source = this.parseExprAtom()
- node.kind = ''
- } else {
- let elt
- if (this.tok.type === tt.name && this.tok.value !== "from") {
- elt = this.startNode()
- elt.local = this.parseIdent()
- this.finishNode(elt, "ImportDefaultSpecifier")
- this.eat(tt.comma)
- }
- node.specifiers = this.parseImportSpecifierList()
- node.source = this.eatContextual("from") ? this.parseExprAtom() : null
- if (elt) node.specifiers.unshift(elt)
- }
- this.semicolon()
- return this.finishNode(node, "ImportDeclaration")
-}
-
-lp.parseImportSpecifierList = function() {
- let elts = []
- if (this.tok.type === tt.star) {
- let elt = this.startNode()
- this.next()
- if (this.eatContextual("as")) elt.local = this.parseIdent()
- elts.push(this.finishNode(elt, "ImportNamespaceSpecifier"))
- } else {
- let indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart
- this.pushCx()
- this.eat(tt.braceL)
- if (this.curLineStart > continuedLine) continuedLine = this.curLineStart
- while (!this.closes(tt.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
- let elt = this.startNode()
- if (this.eat(tt.star)) {
- if (this.eatContextual("as")) elt.local = this.parseIdent()
- this.finishNode(elt, "ImportNamespaceSpecifier")
- } else {
- if (this.isContextual("from")) break
- elt.imported = this.parseIdent()
- elt.local = this.eatContextual("as") ? this.parseIdent() : elt.imported
- this.finishNode(elt, "ImportSpecifier")
- }
- elts.push(elt)
- this.eat(tt.comma)
- }
- this.eat(tt.braceR)
- this.popCx()
- }
- return elts
-}
-
-lp.parseExportSpecifierList = function() {
- let elts = []
- let indent = this.curIndent, line = this.curLineStart, continuedLine = this.nextLineStart
- this.pushCx()
- this.eat(tt.braceL)
- if (this.curLineStart > continuedLine) continuedLine = this.curLineStart
- while (!this.closes(tt.braceR, indent + (this.curLineStart <= continuedLine ? 1 : 0), line)) {
- if (this.isContextual("from")) break
- let elt = this.startNode()
- elt.local = this.parseIdent()
- elt.exported = this.eatContextual("as") ? this.parseIdent() : elt.local
- this.finishNode(elt, "ExportSpecifier")
- elts.push(elt)
- this.eat(tt.comma)
- }
- this.eat(tt.braceR)
- this.popCx()
- return elts
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/tokenize.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/tokenize.js
deleted file mode 100644
index c20db22467..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/loose/tokenize.js
+++ /dev/null
@@ -1,108 +0,0 @@
-import {tokTypes as tt, Token, isNewLine, SourceLocation, getLineInfo, lineBreakG} from ".."
-import {LooseParser} from "./state"
-
-const lp = LooseParser.prototype
-
-function isSpace(ch) {
- return (ch < 14 && ch > 8) || ch === 32 || ch === 160 || isNewLine(ch)
-}
-
-lp.next = function() {
- this.last = this.tok
- if (this.ahead.length)
- this.tok = this.ahead.shift()
- else
- this.tok = this.readToken()
-
- if (this.tok.start >= this.nextLineStart) {
- while (this.tok.start >= this.nextLineStart) {
- this.curLineStart = this.nextLineStart
- this.nextLineStart = this.lineEnd(this.curLineStart) + 1
- }
- this.curIndent = this.indentationAfter(this.curLineStart)
- }
-}
-
-lp.readToken = function() {
- for (;;) {
- try {
- this.toks.next()
- if (this.toks.type === tt.dot &&
- this.input.substr(this.toks.end, 1) === "." &&
- this.options.ecmaVersion >= 6) {
- this.toks.end++
- this.toks.type = tt.ellipsis
- }
- return new Token(this.toks)
- } catch(e) {
- if (!(e instanceof SyntaxError)) throw e
-
- // Try to skip some text, based on the error message, and then continue
- let msg = e.message, pos = e.raisedAt, replace = true
- if (/unterminated/i.test(msg)) {
- pos = this.lineEnd(e.pos + 1)
- if (/string/.test(msg)) {
- replace = {start: e.pos, end: pos, type: tt.string, value: this.input.slice(e.pos + 1, pos)}
- } else if (/regular expr/i.test(msg)) {
- let re = this.input.slice(e.pos, pos)
- try { re = new RegExp(re) } catch(e) {}
- replace = {start: e.pos, end: pos, type: tt.regexp, value: re}
- } else if (/template/.test(msg)) {
- replace = {start: e.pos, end: pos,
- type: tt.template,
- value: this.input.slice(e.pos, pos)}
- } else {
- replace = false
- }
- } else if (/invalid (unicode|regexp|number)|expecting unicode|octal literal|is reserved|directly after number|expected number in radix/i.test(msg)) {
- while (pos < this.input.length && !isSpace(this.input.charCodeAt(pos))) ++pos
- } else if (/character escape|expected hexadecimal/i.test(msg)) {
- while (pos < this.input.length) {
- let ch = this.input.charCodeAt(pos++)
- if (ch === 34 || ch === 39 || isNewLine(ch)) break
- }
- } else if (/unexpected character/i.test(msg)) {
- pos++
- replace = false
- } else if (/regular expression/i.test(msg)) {
- replace = true
- } else {
- throw e
- }
- this.resetTo(pos)
- if (replace === true) replace = {start: pos, end: pos, type: tt.name, value: "✖"}
- if (replace) {
- if (this.options.locations)
- replace.loc = new SourceLocation(
- this.toks,
- getLineInfo(this.input, replace.start),
- getLineInfo(this.input, replace.end))
- return replace
- }
- }
- }
-}
-
-lp.resetTo = function(pos) {
- this.toks.pos = pos
- let ch = this.input.charAt(pos - 1)
- this.toks.exprAllowed = !ch || /[\[\{\(,;:?\/*=+\-~!|&%^<>]/.test(ch) ||
- /[enwfd]/.test(ch) &&
- /\b(keywords|case|else|return|throw|new|in|(instance|type)of|delete|void)$/.test(this.input.slice(pos - 10, pos))
-
- if (this.options.locations) {
- this.toks.curLine = 1
- this.toks.lineStart = lineBreakG.lastIndex = 0
- let match
- while ((match = lineBreakG.exec(this.input)) && match.index < pos) {
- ++this.toks.curLine
- this.toks.lineStart = match.index + match[0].length
- }
- }
-}
-
-lp.lookAhead = function(n) {
- while (n > this.ahead.length)
- this.ahead.push(this.readToken())
- return this.ahead[n - 1]
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/lval.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/lval.js
deleted file mode 100755
index fbbc38bbcb..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/lval.js
+++ /dev/null
@@ -1,213 +0,0 @@
-import {types as tt} from "./tokentype"
-import {Parser} from "./state"
-import {reservedWords} from "./identifier"
-import {has} from "./util"
-
-const pp = Parser.prototype
-
-// Convert existing expression atom to assignable pattern
-// if possible.
-
-pp.toAssignable = function(node, isBinding) {
- if (this.options.ecmaVersion >= 6 && node) {
- switch (node.type) {
- case "Identifier":
- case "ObjectPattern":
- case "ArrayPattern":
- case "AssignmentPattern":
- break
-
- case "ObjectExpression":
- node.type = "ObjectPattern"
- for (let i = 0; i < node.properties.length; i++) {
- let prop = node.properties[i]
- if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter")
- this.toAssignable(prop.value, isBinding)
- }
- break
-
- case "ArrayExpression":
- node.type = "ArrayPattern"
- this.toAssignableList(node.elements, isBinding)
- break
-
- case "AssignmentExpression":
- if (node.operator === "=") {
- node.type = "AssignmentPattern"
- } else {
- this.raise(node.left.end, "Only '=' operator can be used for specifying default value.")
- }
- break
-
- case "ParenthesizedExpression":
- node.expression = this.toAssignable(node.expression, isBinding)
- break
-
- case "MemberExpression":
- if (!isBinding) break
-
- default:
- this.raise(node.start, "Assigning to rvalue")
- }
- }
- return node
-}
-
-// Convert list of expression atoms to binding list.
-
-pp.toAssignableList = function(exprList, isBinding) {
- let end = exprList.length
- if (end) {
- let last = exprList[end - 1]
- if (last && last.type == "RestElement") {
- --end
- } else if (last && last.type == "SpreadElement") {
- last.type = "RestElement"
- let arg = last.argument
- this.toAssignable(arg, isBinding)
- if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern")
- this.unexpected(arg.start)
- --end
- }
- }
- for (let i = 0; i < end; i++) {
- let elt = exprList[i]
- if (elt) this.toAssignable(elt, isBinding)
- }
- return exprList
-}
-
-// Parses spread element.
-
-pp.parseSpread = function(refShorthandDefaultPos) {
- let node = this.startNode()
- this.next()
- node.argument = this.parseMaybeAssign(refShorthandDefaultPos)
- return this.finishNode(node, "SpreadElement")
-}
-
-pp.parseRest = function() {
- let node = this.startNode()
- this.next()
- node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected()
- return this.finishNode(node, "RestElement")
-}
-
-// Parses lvalue (assignable) atom.
-
-pp.parseBindingAtom = function() {
- if (this.options.ecmaVersion < 6) return this.parseIdent()
- switch (this.type) {
- case tt.name:
- return this.parseIdent()
-
- case tt.bracketL:
- let node = this.startNode()
- this.next()
- node.elements = this.parseBindingList(tt.bracketR, true, true)
- return this.finishNode(node, "ArrayPattern")
-
- case tt.braceL:
- return this.parseObj(true)
-
- default:
- this.unexpected()
- }
-}
-
-pp.parseBindingList = function(close, allowEmpty, allowTrailingComma) {
- let elts = [], first = true
- while (!this.eat(close)) {
- if (first) first = false
- else this.expect(tt.comma)
- if (allowEmpty && this.type === tt.comma) {
- elts.push(null)
- } else if (allowTrailingComma && this.afterTrailingComma(close)) {
- break
- } else if (this.type === tt.ellipsis) {
- let rest = this.parseRest()
- this.parseBindingListItem(rest)
- elts.push(rest)
- this.expect(close)
- break
- } else {
- let elem = this.parseMaybeDefault(this.start, this.startLoc)
- this.parseBindingListItem(elem)
- elts.push(elem)
- }
- }
- return elts
-}
-
-pp.parseBindingListItem = function(param) {
- return param
-}
-
-// Parses assignment pattern around given atom if possible.
-
-pp.parseMaybeDefault = function(startPos, startLoc, left) {
- if (Array.isArray(startPos)){
- if (this.options.locations && noCalls === undefined) {
- // shift arguments to left by one
- left = startLoc
- // flatten startPos
- startLoc = startPos[1]
- startPos = startPos[0]
- }
- }
- left = left || this.parseBindingAtom()
- if (!this.eat(tt.eq)) return left
- let node = this.startNodeAt(startPos, startLoc)
- node.operator = "="
- node.left = left
- node.right = this.parseMaybeAssign()
- return this.finishNode(node, "AssignmentPattern")
-}
-
-// Verify that a node is an lval — something that can be assigned
-// to.
-
-pp.checkLVal = function(expr, isBinding, checkClashes) {
- switch (expr.type) {
- case "Identifier":
- if (this.strict && (reservedWords.strictBind(expr.name) || reservedWords.strict(expr.name)))
- this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode")
- if (checkClashes) {
- if (has(checkClashes, expr.name))
- this.raise(expr.start, "Argument name clash in strict mode")
- checkClashes[expr.name] = true
- }
- break
-
- case "MemberExpression":
- if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression")
- break
-
- case "ObjectPattern":
- for (let i = 0; i < expr.properties.length; i++)
- this.checkLVal(expr.properties[i].value, isBinding, checkClashes)
- break
-
- case "ArrayPattern":
- for (let i = 0; i < expr.elements.length; i++) {
- let elem = expr.elements[i]
- if (elem) this.checkLVal(elem, isBinding, checkClashes)
- }
- break
-
- case "AssignmentPattern":
- this.checkLVal(expr.left, isBinding, checkClashes)
- break
-
- case "RestElement":
- this.checkLVal(expr.argument, isBinding, checkClashes)
- break
-
- case "ParenthesizedExpression":
- this.checkLVal(expr.expression, isBinding, checkClashes)
- break
-
- default:
- this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue")
- }
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/node.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/node.js
deleted file mode 100755
index 24db1c2690..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/node.js
+++ /dev/null
@@ -1,70 +0,0 @@
-import {Parser} from "./state"
-import {SourceLocation} from "./location"
-
-// Start an AST node, attaching a start offset.
-
-const pp = Parser.prototype
-
-export class Node {}
-
-pp.startNode = function() {
- let node = new Node
- node.start = this.start
- if (this.options.locations)
- node.loc = new SourceLocation(this, this.startLoc)
- if (this.options.directSourceFile)
- node.sourceFile = this.options.directSourceFile
- if (this.options.ranges)
- node.range = [this.start, 0]
- return node
-}
-
-pp.startNodeAt = function(pos, loc) {
- let node = new Node
- if (Array.isArray(pos)){
- if (this.options.locations && loc === undefined) {
- // flatten pos
- loc = pos[1]
- pos = pos[0]
- }
- }
- node.start = pos
- if (this.options.locations)
- node.loc = new SourceLocation(this, loc)
- if (this.options.directSourceFile)
- node.sourceFile = this.options.directSourceFile
- if (this.options.ranges)
- node.range = [pos, 0]
- return node
-}
-
-// Finish an AST node, adding `type` and `end` properties.
-
-pp.finishNode = function(node, type) {
- node.type = type
- node.end = this.lastTokEnd
- if (this.options.locations)
- node.loc.end = this.lastTokEndLoc
- if (this.options.ranges)
- node.range[1] = this.lastTokEnd
- return node
-}
-
-// Finish node at given position
-
-pp.finishNodeAt = function(node, type, pos, loc) {
- node.type = type
- if (Array.isArray(pos)){
- if (this.options.locations && loc === undefined) {
- // flatten pos
- loc = pos[1]
- pos = pos[0]
- }
- }
- node.end = pos
- if (this.options.locations)
- node.loc.end = loc
- if (this.options.ranges)
- node.range[1] = pos
- return node
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/options.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/options.js
deleted file mode 100644
index 4f0a173a26..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/options.js
+++ /dev/null
@@ -1,118 +0,0 @@
-import {has, isArray} from "./util"
-import {SourceLocation} from "./location"
-
-// A second optional argument can be given to further configure
-// the parser process. These options are recognized:
-
-export const defaultOptions = {
- // `ecmaVersion` indicates the ECMAScript version to parse. Must
- // be either 3, or 5, or 6. This influences support for strict
- // mode, the set of reserved words, support for getters and
- // setters and other features.
- ecmaVersion: 5,
- // Source type ("script" or "module") for different semantics
- sourceType: "script",
- // `onInsertedSemicolon` can be a callback that will be called
- // when a semicolon is automatically inserted. It will be passed
- // th position of the comma as an offset, and if `locations` is
- // enabled, it is given the location as a `{line, column}` object
- // as second argument.
- onInsertedSemicolon: null,
- // `onTrailingComma` is similar to `onInsertedSemicolon`, but for
- // trailing commas.
- onTrailingComma: null,
- // By default, reserved words are not enforced. Disable
- // `allowReserved` to enforce them. When this option has the
- // value "never", reserved words and keywords can also not be
- // used as property names.
- allowReserved: true,
- // When enabled, a return at the top level is not considered an
- // error.
- allowReturnOutsideFunction: false,
- // When enabled, import/export statements are not constrained to
- // appearing at the top of the program.
- allowImportExportEverywhere: false,
- // When enabled, hashbang directive in the beginning of file
- // is allowed and treated as a line comment.
- allowHashBang: false,
- // When `locations` is on, `loc` properties holding objects with
- // `start` and `end` properties in `{line, column}` form (with
- // line being 1-based and column 0-based) will be attached to the
- // nodes.
- locations: false,
- // A function can be passed as `onToken` option, which will
- // cause Acorn to call that function with object in the same
- // format as tokenize() returns. Note that you are not
- // allowed to call the parser from the callback—that will
- // corrupt its internal state.
- onToken: null,
- // A function can be passed as `onComment` option, which will
- // cause Acorn to call that function with `(block, text, start,
- // end)` parameters whenever a comment is skipped. `block` is a
- // boolean indicating whether this is a block (`/* */`) comment,
- // `text` is the content of the comment, and `start` and `end` are
- // character offsets that denote the start and end of the comment.
- // When the `locations` option is on, two more parameters are
- // passed, the full `{line, column}` locations of the start and
- // end of the comments. Note that you are not allowed to call the
- // parser from the callback—that will corrupt its internal state.
- onComment: null,
- // Nodes have their start and end characters offsets recorded in
- // `start` and `end` properties (directly on the node, rather than
- // the `loc` object, which holds line/column data. To also add a
- // [semi-standardized][range] `range` property holding a `[start,
- // end]` array with the same numbers, set the `ranges` option to
- // `true`.
- //
- // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
- ranges: false,
- // It is possible to parse multiple files into a single AST by
- // passing the tree produced by parsing the first file as
- // `program` option in subsequent parses. This will add the
- // toplevel forms of the parsed file to the `Program` (top) node
- // of an existing parse tree.
- program: null,
- // When `locations` is on, you can pass this to record the source
- // file in every node's `loc` object.
- sourceFile: null,
- // This value, if given, is stored in every node, whether
- // `locations` is on or off.
- directSourceFile: null,
- // When enabled, parenthesized expressions are represented by
- // (non-standard) ParenthesizedExpression nodes
- preserveParens: false,
- plugins: {}
-}
-
-// Interpret and default an options object
-
-export function getOptions(opts) {
- let options = {}
- for (let opt in defaultOptions)
- options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt]
-
- if (isArray(options.onToken)) {
- let tokens = options.onToken
- options.onToken = (token) => tokens.push(token)
- }
- if (isArray(options.onComment))
- options.onComment = pushComment(options, options.onComment)
-
- return options
-}
-
-function pushComment(options, array) {
- return function (block, text, start, end, startLoc, endLoc) {
- let comment = {
- type: block ? 'Block' : 'Line',
- value: text,
- start: start,
- end: end
- }
- if (options.locations)
- comment.loc = new SourceLocation(this, startLoc, endLoc)
- if (options.ranges)
- comment.range = [start, end]
- array.push(comment)
- }
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/parseutil.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/parseutil.js
deleted file mode 100644
index 3d464a22dc..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/parseutil.js
+++ /dev/null
@@ -1,89 +0,0 @@
-import {types as tt} from "./tokentype"
-import {Parser} from "./state"
-import {lineBreak} from "./whitespace"
-
-const pp = Parser.prototype
-
-// ## Parser utilities
-
-// Test whether a statement node is the string literal `"use strict"`.
-
-pp.isUseStrict = function(stmt) {
- return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" &&
- stmt.expression.type === "Literal" && stmt.expression.value === "use strict"
-}
-
-// Predicate that tests whether the next token is of the given
-// type, and if yes, consumes it as a side effect.
-
-pp.eat = function(type) {
- if (this.type === type) {
- this.next()
- return true
- } else {
- return false
- }
-}
-
-// Tests whether parsed token is a contextual keyword.
-
-pp.isContextual = function(name) {
- return this.type === tt.name && this.value === name
-}
-
-// Consumes contextual keyword if possible.
-
-pp.eatContextual = function(name) {
- return this.value === name && this.eat(tt.name)
-}
-
-// Asserts that following token is given contextual keyword.
-
-pp.expectContextual = function(name) {
- if (!this.eatContextual(name)) this.unexpected()
-}
-
-// Test whether a semicolon can be inserted at the current position.
-
-pp.canInsertSemicolon = function() {
- return this.type === tt.eof ||
- this.type === tt.braceR ||
- lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
-}
-
-pp.insertSemicolon = function() {
- if (this.canInsertSemicolon()) {
- if (this.options.onInsertedSemicolon)
- this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc)
- return true
- }
-}
-
-// Consume a semicolon, or, failing that, see if we are allowed to
-// pretend that there is a semicolon at this position.
-
-pp.semicolon = function() {
- if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected()
-}
-
-pp.afterTrailingComma = function(tokType) {
- if (this.type == tokType) {
- if (this.options.onTrailingComma)
- this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc)
- this.next()
- return true
- }
-}
-
-// Expect a token of a given type. If found, consume it, otherwise,
-// raise an unexpected token error.
-
-pp.expect = function(type) {
- this.eat(type) || this.unexpected()
-}
-
-// Raise an unexpected token error.
-
-pp.unexpected = function(pos) {
- this.raise(pos != null ? pos : this.start, "Unexpected token")
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/state.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/state.js
deleted file mode 100644
index 25ea298183..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/state.js
+++ /dev/null
@@ -1,78 +0,0 @@
-import {reservedWords, keywords} from "./identifier"
-import {types as tt} from "./tokentype"
-import {lineBreak} from "./whitespace"
-
-export function Parser(options, input, startPos) {
- this.options = options
- this.sourceFile = this.options.sourceFile || null
- this.isKeyword = keywords[this.options.ecmaVersion >= 6 ? 6 : 5]
- this.isReservedWord = reservedWords[this.options.ecmaVersion]
- this.input = input
-
- // Load plugins
- this.loadPlugins(this.options.plugins)
-
- // Set up token state
-
- // The current position of the tokenizer in the input.
- if (startPos) {
- this.pos = startPos
- this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos))
- this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length
- } else {
- this.pos = this.lineStart = 0
- this.curLine = 1
- }
-
- // Properties of the current token:
- // Its type
- this.type = tt.eof
- // For tokens that include more information than their type, the value
- this.value = null
- // Its start and end offset
- this.start = this.end = this.pos
- // And, if locations are used, the {line, column} object
- // corresponding to those offsets
- this.startLoc = this.endLoc = null
-
- // Position information for the previous token
- this.lastTokEndLoc = this.lastTokStartLoc = null
- this.lastTokStart = this.lastTokEnd = this.pos
-
- // The context stack is used to superficially track syntactic
- // context to predict whether a regular expression is allowed in a
- // given position.
- this.context = this.initialContext()
- this.exprAllowed = true
-
- // Figure out if it's a module code.
- this.strict = this.inModule = this.options.sourceType === "module"
-
- // Used to signify the start of a potential arrow function
- this.potentialArrowAt = -1
-
- // Flags to track whether we are in a function, a generator.
- this.inFunction = this.inGenerator = false
- // Labels in scope.
- this.labels = []
-
- // If enabled, skip leading hashbang line.
- if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === '#!')
- this.skipLineComment(2)
-}
-
-Parser.prototype.extend = function(name, f) {
- this[name] = f(this[name])
-}
-
-// Registered plugins
-
-export const plugins = {}
-
-Parser.prototype.loadPlugins = function(plugins) {
- for (let name in plugins) {
- let plugin = exports.plugins[name]
- if (!plugin) throw new Error("Plugin '" + name + "' not found")
- plugin(this, plugins[name])
- }
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/statement.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/statement.js
deleted file mode 100644
index 7a6952b969..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/statement.js
+++ /dev/null
@@ -1,594 +0,0 @@
-import {types as tt} from "./tokentype"
-import {Parser} from "./state"
-import {lineBreak} from "./whitespace"
-
-const pp = Parser.prototype
-
-// ### Statement parsing
-
-// Parse a program. Initializes the parser, reads any number of
-// statements, and wraps them in a Program node. Optionally takes a
-// `program` argument. If present, the statements will be appended
-// to its body instead of creating a new node.
-
-pp.parseTopLevel = function(node) {
- let first = true
- if (!node.body) node.body = []
- while (this.type !== tt.eof) {
- let stmt = this.parseStatement(true, true)
- node.body.push(stmt)
- if (first && this.isUseStrict(stmt)) this.setStrict(true)
- first = false
- }
- this.next()
- if (this.options.ecmaVersion >= 6) {
- node.sourceType = this.options.sourceType
- }
- return this.finishNode(node, "Program")
-}
-
-const loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}
-
-// Parse a single statement.
-//
-// If expecting a statement and finding a slash operator, parse a
-// regular expression literal. This is to handle cases like
-// `if (foo) /blah/.exec(foo)`, where looking at the previous token
-// does not help.
-
-pp.parseStatement = function(declaration, topLevel) {
- let starttype = this.type, node = this.startNode()
-
- // Most types of statements are recognized by the keyword they
- // start with. Many are trivial to parse, some require a bit of
- // complexity.
-
- switch (starttype) {
- case tt._break: case tt._continue: return this.parseBreakContinueStatement(node, starttype.keyword)
- case tt._debugger: return this.parseDebuggerStatement(node)
- case tt._do: return this.parseDoStatement(node)
- case tt._for: return this.parseForStatement(node)
- case tt._function:
- if (!declaration && this.options.ecmaVersion >= 6) this.unexpected()
- return this.parseFunctionStatement(node)
- case tt._class:
- if (!declaration) this.unexpected()
- return this.parseClass(node, true)
- case tt._if: return this.parseIfStatement(node)
- case tt._return: return this.parseReturnStatement(node)
- case tt._switch: return this.parseSwitchStatement(node)
- case tt._throw: return this.parseThrowStatement(node)
- case tt._try: return this.parseTryStatement(node)
- case tt._let: case tt._const: if (!declaration) this.unexpected() // NOTE: falls through to _var
- case tt._var: return this.parseVarStatement(node, starttype)
- case tt._while: return this.parseWhileStatement(node)
- case tt._with: return this.parseWithStatement(node)
- case tt.braceL: return this.parseBlock()
- case tt.semi: return this.parseEmptyStatement(node)
- case tt._export:
- case tt._import:
- if (!this.options.allowImportExportEverywhere) {
- if (!topLevel)
- this.raise(this.start, "'import' and 'export' may only appear at the top level")
- if (!this.inModule)
- this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'")
- }
- return starttype === tt._import ? this.parseImport(node) : this.parseExport(node)
-
- // If the statement does not start with a statement keyword or a
- // brace, it's an ExpressionStatement or LabeledStatement. We
- // simply start parsing an expression, and afterwards, if the
- // next token is a colon and the expression was a simple
- // Identifier node, we switch to interpreting it as a label.
- default:
- let maybeName = this.value, expr = this.parseExpression()
- if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon))
- return this.parseLabeledStatement(node, maybeName, expr)
- else return this.parseExpressionStatement(node, expr)
- }
-}
-
-pp.parseBreakContinueStatement = function(node, keyword) {
- let isBreak = keyword == "break"
- this.next()
- if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null
- else if (this.type !== tt.name) this.unexpected()
- else {
- node.label = this.parseIdent()
- this.semicolon()
- }
-
- // Verify that there is an actual destination to break or
- // continue to.
- for (var i = 0; i < this.labels.length; ++i) {
- let lab = this.labels[i]
- if (node.label == null || lab.name === node.label.name) {
- if (lab.kind != null && (isBreak || lab.kind === "loop")) break
- if (node.label && isBreak) break
- }
- }
- if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword)
- return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement")
-}
-
-pp.parseDebuggerStatement = function(node) {
- this.next()
- this.semicolon()
- return this.finishNode(node, "DebuggerStatement")
-}
-
-pp.parseDoStatement = function(node) {
- this.next()
- this.labels.push(loopLabel)
- node.body = this.parseStatement(false)
- this.labels.pop()
- this.expect(tt._while)
- node.test = this.parseParenExpression()
- if (this.options.ecmaVersion >= 6)
- this.eat(tt.semi)
- else
- this.semicolon()
- return this.finishNode(node, "DoWhileStatement")
-}
-
-// Disambiguating between a `for` and a `for`/`in` or `for`/`of`
-// loop is non-trivial. Basically, we have to parse the init `var`
-// statement or expression, disallowing the `in` operator (see
-// the second parameter to `parseExpression`), and then check
-// whether the next token is `in` or `of`. When there is no init
-// part (semicolon immediately after the opening parenthesis), it
-// is a regular `for` loop.
-
-pp.parseForStatement = function(node) {
- this.next()
- this.labels.push(loopLabel)
- this.expect(tt.parenL)
- if (this.type === tt.semi) return this.parseFor(node, null)
- if (this.type === tt._var || this.type === tt._let || this.type === tt._const) {
- let init = this.startNode(), varKind = this.type
- this.next()
- this.parseVar(init, true, varKind)
- this.finishNode(init, "VariableDeclaration")
- if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init.declarations.length === 1 &&
- !(varKind !== tt._var && init.declarations[0].init))
- return this.parseForIn(node, init)
- return this.parseFor(node, init)
- }
- let refShorthandDefaultPos = {start: 0}
- let init = this.parseExpression(true, refShorthandDefaultPos)
- if (this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
- this.toAssignable(init)
- this.checkLVal(init)
- return this.parseForIn(node, init)
- } else if (refShorthandDefaultPos.start) {
- this.unexpected(refShorthandDefaultPos.start)
- }
- return this.parseFor(node, init)
-}
-
-pp.parseFunctionStatement = function(node) {
- this.next()
- return this.parseFunction(node, true)
-}
-
-pp.parseIfStatement = function(node) {
- this.next()
- node.test = this.parseParenExpression()
- node.consequent = this.parseStatement(false)
- node.alternate = this.eat(tt._else) ? this.parseStatement(false) : null
- return this.finishNode(node, "IfStatement")
-}
-
-pp.parseReturnStatement = function(node) {
- if (!this.inFunction && !this.options.allowReturnOutsideFunction)
- this.raise(this.start, "'return' outside of function")
- this.next()
-
- // In `return` (and `break`/`continue`), the keywords with
- // optional arguments, we eagerly look for a semicolon or the
- // possibility to insert one.
-
- if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null
- else { node.argument = this.parseExpression(); this.semicolon() }
- return this.finishNode(node, "ReturnStatement")
-}
-
-pp.parseSwitchStatement = function(node) {
- this.next()
- node.discriminant = this.parseParenExpression()
- node.cases = []
- this.expect(tt.braceL)
- this.labels.push(switchLabel)
-
- // Statements under must be grouped (by label) in SwitchCase
- // nodes. `cur` is used to keep the node that we are currently
- // adding statements to.
-
- for (var cur, sawDefault; this.type != tt.braceR;) {
- if (this.type === tt._case || this.type === tt._default) {
- let isCase = this.type === tt._case
- if (cur) this.finishNode(cur, "SwitchCase")
- node.cases.push(cur = this.startNode())
- cur.consequent = []
- this.next()
- if (isCase) {
- cur.test = this.parseExpression()
- } else {
- if (sawDefault) this.raise(this.lastTokStart, "Multiple default clauses")
- sawDefault = true
- cur.test = null
- }
- this.expect(tt.colon)
- } else {
- if (!cur) this.unexpected()
- cur.consequent.push(this.parseStatement(true))
- }
- }
- if (cur) this.finishNode(cur, "SwitchCase")
- this.next() // Closing brace
- this.labels.pop()
- return this.finishNode(node, "SwitchStatement")
-}
-
-pp.parseThrowStatement = function(node) {
- this.next()
- if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start)))
- this.raise(this.lastTokEnd, "Illegal newline after throw")
- node.argument = this.parseExpression()
- this.semicolon()
- return this.finishNode(node, "ThrowStatement")
-}
-
-// Reused empty array added for node fields that are always empty.
-
-const empty = []
-
-pp.parseTryStatement = function(node) {
- this.next()
- node.block = this.parseBlock()
- node.handler = null
- if (this.type === tt._catch) {
- let clause = this.startNode()
- this.next()
- this.expect(tt.parenL)
- clause.param = this.parseBindingAtom()
- this.checkLVal(clause.param, true)
- this.expect(tt.parenR)
- clause.guard = null
- clause.body = this.parseBlock()
- node.handler = this.finishNode(clause, "CatchClause")
- }
- node.guardedHandlers = empty
- node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null
- if (!node.handler && !node.finalizer)
- this.raise(node.start, "Missing catch or finally clause")
- return this.finishNode(node, "TryStatement")
-}
-
-pp.parseVarStatement = function(node, kind) {
- this.next()
- this.parseVar(node, false, kind)
- this.semicolon()
- return this.finishNode(node, "VariableDeclaration")
-}
-
-pp.parseWhileStatement = function(node) {
- this.next()
- node.test = this.parseParenExpression()
- this.labels.push(loopLabel)
- node.body = this.parseStatement(false)
- this.labels.pop()
- return this.finishNode(node, "WhileStatement")
-}
-
-pp.parseWithStatement = function(node) {
- if (this.strict) this.raise(this.start, "'with' in strict mode")
- this.next()
- node.object = this.parseParenExpression()
- node.body = this.parseStatement(false)
- return this.finishNode(node, "WithStatement")
-}
-
-pp.parseEmptyStatement = function(node) {
- this.next()
- return this.finishNode(node, "EmptyStatement")
-}
-
-pp.parseLabeledStatement = function(node, maybeName, expr) {
- for (let i = 0; i < this.labels.length; ++i)
- if (this.labels[i].name === maybeName) this.raise(expr.start, "Label '" + maybeName + "' is already declared")
- let kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null
- this.labels.push({name: maybeName, kind: kind})
- node.body = this.parseStatement(true)
- this.labels.pop()
- node.label = expr
- return this.finishNode(node, "LabeledStatement")
-}
-
-pp.parseExpressionStatement = function(node, expr) {
- node.expression = expr
- this.semicolon()
- return this.finishNode(node, "ExpressionStatement")
-}
-
-// Parse a semicolon-enclosed block of statements, handling `"use
-// strict"` declarations when `allowStrict` is true (used for
-// function bodies).
-
-pp.parseBlock = function(allowStrict) {
- let node = this.startNode(), first = true, oldStrict
- node.body = []
- this.expect(tt.braceL)
- while (!this.eat(tt.braceR)) {
- let stmt = this.parseStatement(true)
- node.body.push(stmt)
- if (first && allowStrict && this.isUseStrict(stmt)) {
- oldStrict = this.strict
- this.setStrict(this.strict = true)
- }
- first = false
- }
- if (oldStrict === false) this.setStrict(false)
- return this.finishNode(node, "BlockStatement")
-}
-
-// Parse a regular `for` loop. The disambiguation code in
-// `parseStatement` will already have parsed the init statement or
-// expression.
-
-pp.parseFor = function(node, init) {
- node.init = init
- this.expect(tt.semi)
- node.test = this.type === tt.semi ? null : this.parseExpression()
- this.expect(tt.semi)
- node.update = this.type === tt.parenR ? null : this.parseExpression()
- this.expect(tt.parenR)
- node.body = this.parseStatement(false)
- this.labels.pop()
- return this.finishNode(node, "ForStatement")
-}
-
-// Parse a `for`/`in` and `for`/`of` loop, which are almost
-// same from parser's perspective.
-
-pp.parseForIn = function(node, init) {
- let type = this.type === tt._in ? "ForInStatement" : "ForOfStatement"
- this.next()
- node.left = init
- node.right = this.parseExpression()
- this.expect(tt.parenR)
- node.body = this.parseStatement(false)
- this.labels.pop()
- return this.finishNode(node, type)
-}
-
-// Parse a list of variable declarations.
-
-pp.parseVar = function(node, isFor, kind) {
- node.declarations = []
- node.kind = kind.keyword
- for (;;) {
- let decl = this.startNode()
- this.parseVarId(decl)
- if (this.eat(tt.eq)) {
- decl.init = this.parseMaybeAssign(isFor)
- } else if (kind === tt._const && !(this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of")))) {
- this.unexpected()
- } else if (decl.id.type != "Identifier" && !(isFor && (this.type === tt._in || this.isContextual("of")))) {
- this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value")
- } else {
- decl.init = null
- }
- node.declarations.push(this.finishNode(decl, "VariableDeclarator"))
- if (!this.eat(tt.comma)) break
- }
- return node
-}
-
-pp.parseVarId = function(decl) {
- decl.id = this.parseBindingAtom()
- this.checkLVal(decl.id, true)
-}
-
-// Parse a function declaration or literal (depending on the
-// `isStatement` parameter).
-
-pp.parseFunction = function(node, isStatement, allowExpressionBody) {
- this.initFunction(node)
- if (this.options.ecmaVersion >= 6)
- node.generator = this.eat(tt.star)
- if (isStatement || this.type === tt.name)
- node.id = this.parseIdent()
- this.parseFunctionParams(node)
- this.parseFunctionBody(node, allowExpressionBody)
- return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression")
-}
-
-pp.parseFunctionParams = function(node) {
- this.expect(tt.parenL)
- node.params = this.parseBindingList(tt.parenR, false, false)
-}
-
-// Parse a class declaration or literal (depending on the
-// `isStatement` parameter).
-
-pp.parseClass = function(node, isStatement) {
- this.next()
- this.parseClassId(node, isStatement)
- this.parseClassSuper(node)
- let classBody = this.startNode()
- let hadConstructor = false
- classBody.body = []
- this.expect(tt.braceL)
- while (!this.eat(tt.braceR)) {
- if (this.eat(tt.semi)) continue
- let method = this.startNode()
- let isGenerator = this.eat(tt.star)
- let isMaybeStatic = this.type === tt.name && this.value === "static"
- this.parsePropertyName(method)
- method.static = isMaybeStatic && this.type !== tt.parenL
- if (method.static) {
- if (isGenerator) this.unexpected()
- isGenerator = this.eat(tt.star)
- this.parsePropertyName(method)
- }
- method.kind = "method"
- if (!method.computed) {
- let {key} = method
- let isGetSet = false
- if (!isGenerator && key.type === "Identifier" && this.type !== tt.parenL && (key.name === "get" || key.name === "set")) {
- isGetSet = true
- method.kind = key.name
- key = this.parsePropertyName(method)
- }
- if (!method.static && (key.type === "Identifier" && key.name === "constructor" ||
- key.type === "Literal" && key.value === "constructor")) {
- if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class")
- if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier")
- if (isGenerator) this.raise(key.start, "Constructor can't be a generator")
- method.kind = "constructor"
- hadConstructor = true
- }
- }
- this.parseClassMethod(classBody, method, isGenerator)
- }
- node.body = this.finishNode(classBody, "ClassBody")
- return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression")
-}
-
-pp.parseClassMethod = function(classBody, method, isGenerator) {
- method.value = this.parseMethod(isGenerator)
- classBody.body.push(this.finishNode(method, "MethodDefinition"))
-}
-
-pp.parseClassId = function(node, isStatement) {
- node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null
-}
-
-pp.parseClassSuper = function(node) {
- node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null
-}
-
-// Parses module export declaration.
-
-pp.parseExport = function(node) {
- this.next()
- // export * from '...'
- if (this.eat(tt.star)) {
- this.expectContextual("from")
- node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
- this.semicolon()
- return this.finishNode(node, "ExportAllDeclaration")
- }
- if (this.eat(tt._default)) { // export default ...
- let expr = this.parseMaybeAssign()
- let needsSemi = true
- if (expr.type == "FunctionExpression" ||
- expr.type == "ClassExpression") {
- needsSemi = false
- if (expr.id) {
- expr.type = expr.type == "FunctionExpression"
- ? "FunctionDeclaration"
- : "ClassDeclaration"
- }
- }
- node.declaration = expr
- if (needsSemi) this.semicolon()
- return this.finishNode(node, "ExportDefaultDeclaration")
- }
- // export var|const|let|function|class ...
- if (this.shouldParseExportStatement()) {
- node.declaration = this.parseStatement(true)
- node.specifiers = []
- node.source = null
- } else { // export { x, y as z } [from '...']
- node.declaration = null
- node.specifiers = this.parseExportSpecifiers()
- if (this.eatContextual("from")) {
- node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
- } else {
- node.source = null
- }
- this.semicolon()
- }
- return this.finishNode(node, "ExportNamedDeclaration")
-}
-
-pp.shouldParseExportStatement = function() {
- return this.type.keyword
-}
-
-// Parses a comma-separated list of module exports.
-
-pp.parseExportSpecifiers = function() {
- let nodes = [], first = true
- // export { x, y as z } [from '...']
- this.expect(tt.braceL)
- while (!this.eat(tt.braceR)) {
- if (!first) {
- this.expect(tt.comma)
- if (this.afterTrailingComma(tt.braceR)) break
- } else first = false
-
- let node = this.startNode()
- node.local = this.parseIdent(this.type === tt._default)
- node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local
- nodes.push(this.finishNode(node, "ExportSpecifier"))
- }
- return nodes
-}
-
-// Parses import declaration.
-
-pp.parseImport = function(node) {
- this.next()
- // import '...'
- if (this.type === tt.string) {
- node.specifiers = empty
- node.source = this.parseExprAtom()
- node.kind = ""
- } else {
- node.specifiers = this.parseImportSpecifiers()
- this.expectContextual("from")
- node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected()
- }
- this.semicolon()
- return this.finishNode(node, "ImportDeclaration")
-}
-
-// Parses a comma-separated list of module imports.
-
-pp.parseImportSpecifiers = function() {
- let nodes = [], first = true
- if (this.type === tt.name) {
- // import defaultObj, { x, y as z } from '...'
- let node = this.startNode()
- node.local = this.parseIdent()
- this.checkLVal(node.local, true)
- nodes.push(this.finishNode(node, "ImportDefaultSpecifier"))
- if (!this.eat(tt.comma)) return nodes
- }
- if (this.type === tt.star) {
- let node = this.startNode()
- this.next()
- this.expectContextual("as")
- node.local = this.parseIdent()
- this.checkLVal(node.local, true)
- nodes.push(this.finishNode(node, "ImportNamespaceSpecifier"))
- return nodes
- }
- this.expect(tt.braceL)
- while (!this.eat(tt.braceR)) {
- if (!first) {
- this.expect(tt.comma)
- if (this.afterTrailingComma(tt.braceR)) break
- } else first = false
-
- let node = this.startNode()
- node.imported = this.parseIdent(true)
- node.local = this.eatContextual("as") ? this.parseIdent() : node.imported
- this.checkLVal(node.local, true)
- nodes.push(this.finishNode(node, "ImportSpecifier"))
- }
- return nodes
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/tokencontext.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/tokencontext.js
deleted file mode 100644
index f1cb36e7b8..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/tokencontext.js
+++ /dev/null
@@ -1,107 +0,0 @@
-// The algorithm used to determine whether a regexp can appear at a
-// given point in the program is loosely based on sweet.js' approach.
-// See https://github.com/mozilla/sweet.js/wiki/design
-
-import {Parser} from "./state"
-import {types as tt} from "./tokentype"
-import {lineBreak} from "./whitespace"
-
-export class TokContext {
- constructor(token, isExpr, preserveSpace, override) {
- this.token = token
- this.isExpr = isExpr
- this.preserveSpace = preserveSpace
- this.override = override
- }
-}
-
-export const types = {
- b_stat: new TokContext("{", false),
- b_expr: new TokContext("{", true),
- b_tmpl: new TokContext("${", true),
- p_stat: new TokContext("(", false),
- p_expr: new TokContext("(", true),
- q_tmpl: new TokContext("`", true, true, p => p.readTmplToken()),
- f_expr: new TokContext("function", true)
-}
-
-const pp = Parser.prototype
-
-pp.initialContext = function() {
- return [types.b_stat]
-}
-
-pp.braceIsBlock = function(prevType) {
- let parent
- if (prevType === tt.colon && (parent = this.curContext()).token == "{")
- return !parent.isExpr
- if (prevType === tt._return)
- return lineBreak.test(this.input.slice(this.lastTokEnd, this.start))
- if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof)
- return true
- if (prevType == tt.braceL)
- return this.curContext() === types.b_stat
- return !this.exprAllowed
-}
-
-pp.updateContext = function(prevType) {
- let update, type = this.type
- if (type.keyword && prevType == tt.dot)
- this.exprAllowed = false
- else if (update = type.updateContext)
- update.call(this, prevType)
- else
- this.exprAllowed = type.beforeExpr
-}
-
-// Token-specific context update code
-
-tt.parenR.updateContext = tt.braceR.updateContext = function() {
- if (this.context.length == 1) {
- this.exprAllowed = true
- return
- }
- let out = this.context.pop()
- if (out === types.b_stat && this.curContext() === types.f_expr) {
- this.context.pop()
- this.exprAllowed = false
- } else if (out === types.b_tmpl) {
- this.exprAllowed = true
- } else {
- this.exprAllowed = !out.isExpr
- }
-}
-
-tt.braceL.updateContext = function(prevType) {
- this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr)
- this.exprAllowed = true
-}
-
-tt.dollarBraceL.updateContext = function() {
- this.context.push(types.b_tmpl)
- this.exprAllowed = true
-}
-
-tt.parenL.updateContext = function(prevType) {
- let statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while
- this.context.push(statementParens ? types.p_stat : types.p_expr)
- this.exprAllowed = true
-}
-
-tt.incDec.updateContext = function() {
- // tokExprAllowed stays unchanged
-}
-
-tt._function.updateContext = function() {
- if (this.curContext() !== types.b_stat)
- this.context.push(types.f_expr)
- this.exprAllowed = false
-}
-
-tt.backQuote.updateContext = function() {
- if (this.curContext() === types.q_tmpl)
- this.context.pop()
- else
- this.context.push(types.q_tmpl)
- this.exprAllowed = false
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/tokenize.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/tokenize.js
deleted file mode 100644
index 365ed3cc6b..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/tokenize.js
+++ /dev/null
@@ -1,672 +0,0 @@
-import {isIdentifierStart, isIdentifierChar} from "./identifier"
-import {types as tt, keywords as keywordTypes} from "./tokentype"
-import {Parser} from "./state"
-import {SourceLocation} from "./location"
-import {lineBreak, lineBreakG, isNewLine, nonASCIIwhitespace} from "./whitespace"
-
-// Object type used to represent tokens. Note that normally, tokens
-// simply exist as properties on the parser object. This is only
-// used for the onToken callback and the external tokenizer.
-
-export class Token {
- constructor(p) {
- this.type = p.type
- this.value = p.value
- this.start = p.start
- this.end = p.end
- if (p.options.locations)
- this.loc = new SourceLocation(p, p.startLoc, p.endLoc)
- if (p.options.ranges)
- this.range = [p.start, p.end]
- }
-}
-
-// ## Tokenizer
-
-const pp = Parser.prototype
-
-// Are we running under Rhino?
-const isRhino = typeof Packages !== "undefined"
-
-// Move to the next token
-
-pp.next = function() {
- if (this.options.onToken)
- this.options.onToken(new Token(this))
-
- this.lastTokEnd = this.end
- this.lastTokStart = this.start
- this.lastTokEndLoc = this.endLoc
- this.lastTokStartLoc = this.startLoc
- this.nextToken()
-}
-
-pp.getToken = function() {
- this.next()
- return new Token(this)
-}
-
-// If we're in an ES6 environment, make parsers iterable
-if (typeof Symbol !== "undefined")
- pp[Symbol.iterator] = function () {
- let self = this
- return {next: function () {
- let token = self.getToken()
- return {
- done: token.type === tt.eof,
- value: token
- }
- }}
- }
-
-// Toggle strict mode. Re-reads the next number or string to please
-// pedantic tests (`"use strict"; 010;` should fail).
-
-pp.setStrict = function(strict) {
- this.strict = strict
- if (this.type !== tt.num && this.type !== tt.string) return
- this.pos = this.start
- if (this.options.locations) {
- while (this.pos < this.lineStart) {
- this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1
- --this.curLine
- }
- }
- this.nextToken()
-}
-
-pp.curContext = function() {
- return this.context[this.context.length - 1]
-}
-
-// Read a single token, updating the parser object's token-related
-// properties.
-
-pp.nextToken = function() {
- let curContext = this.curContext()
- if (!curContext || !curContext.preserveSpace) this.skipSpace()
-
- this.start = this.pos
- if (this.options.locations) this.startLoc = this.curPosition()
- if (this.pos >= this.input.length) return this.finishToken(tt.eof)
-
- if (curContext.override) return curContext.override(this)
- else this.readToken(this.fullCharCodeAtPos())
-}
-
-pp.readToken = function(code) {
- // Identifier or keyword. '\uXXXX' sequences are allowed in
- // identifiers, so '\' also dispatches to that.
- if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */)
- return this.readWord()
-
- return this.getTokenFromCode(code)
-}
-
-pp.fullCharCodeAtPos = function() {
- let code = this.input.charCodeAt(this.pos)
- if (code <= 0xd7ff || code >= 0xe000) return code
- let next = this.input.charCodeAt(this.pos + 1)
- return (code << 10) + next - 0x35fdc00
-}
-
-pp.skipBlockComment = function() {
- let startLoc = this.options.onComment && this.options.locations && this.curPosition()
- let start = this.pos, end = this.input.indexOf("*/", this.pos += 2)
- if (end === -1) this.raise(this.pos - 2, "Unterminated comment")
- this.pos = end + 2
- if (this.options.locations) {
- lineBreakG.lastIndex = start
- let match
- while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) {
- ++this.curLine
- this.lineStart = match.index + match[0].length
- }
- }
- if (this.options.onComment)
- this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos,
- startLoc, this.options.locations && this.curPosition())
-}
-
-pp.skipLineComment = function(startSkip) {
- let start = this.pos
- let startLoc = this.options.onComment && this.options.locations && this.curPosition()
- let ch = this.input.charCodeAt(this.pos+=startSkip)
- while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
- ++this.pos
- ch = this.input.charCodeAt(this.pos)
- }
- if (this.options.onComment)
- this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos,
- startLoc, this.options.locations && this.curPosition())
-}
-
-// Called at the start of the parse and after every token. Skips
-// whitespace and comments, and.
-
-pp.skipSpace = function() {
- while (this.pos < this.input.length) {
- let ch = this.input.charCodeAt(this.pos)
- if (ch === 32) { // ' '
- ++this.pos
- } else if (ch === 13) {
- ++this.pos
- let next = this.input.charCodeAt(this.pos)
- if (next === 10) {
- ++this.pos
- }
- if (this.options.locations) {
- ++this.curLine
- this.lineStart = this.pos
- }
- } else if (ch === 10 || ch === 8232 || ch === 8233) {
- ++this.pos
- if (this.options.locations) {
- ++this.curLine
- this.lineStart = this.pos
- }
- } else if (ch > 8 && ch < 14) {
- ++this.pos
- } else if (ch === 47) { // '/'
- let next = this.input.charCodeAt(this.pos + 1)
- if (next === 42) { // '*'
- this.skipBlockComment()
- } else if (next === 47) { // '/'
- this.skipLineComment(2)
- } else break
- } else if (ch === 160) { // '\xa0'
- ++this.pos
- } else if (ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) {
- ++this.pos
- } else {
- break
- }
- }
-}
-
-// Called at the end of every token. Sets `end`, `val`, and
-// maintains `context` and `exprAllowed`, and skips the space after
-// the token, so that the next one's `start` will point at the
-// right position.
-
-pp.finishToken = function(type, val) {
- this.end = this.pos
- if (this.options.locations) this.endLoc = this.curPosition()
- let prevType = this.type
- this.type = type
- this.value = val
-
- this.updateContext(prevType)
-}
-
-// ### Token reading
-
-// This is the function that is called to fetch the next token. It
-// is somewhat obscure, because it works in character codes rather
-// than characters, and because operator parsing has been inlined
-// into it.
-//
-// All in the name of speed.
-//
-pp.readToken_dot = function() {
- let next = this.input.charCodeAt(this.pos + 1)
- if (next >= 48 && next <= 57) return this.readNumber(true)
- let next2 = this.input.charCodeAt(this.pos + 2)
- if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.'
- this.pos += 3
- return this.finishToken(tt.ellipsis)
- } else {
- ++this.pos
- return this.finishToken(tt.dot)
- }
-}
-
-pp.readToken_slash = function() { // '/'
- let next = this.input.charCodeAt(this.pos + 1)
- if (this.exprAllowed) {++this.pos; return this.readRegexp();}
- if (next === 61) return this.finishOp(tt.assign, 2)
- return this.finishOp(tt.slash, 1)
-}
-
-pp.readToken_mult_modulo = function(code) { // '%*'
- let next = this.input.charCodeAt(this.pos + 1)
- if (next === 61) return this.finishOp(tt.assign, 2)
- return this.finishOp(code === 42 ? tt.star : tt.modulo, 1)
-}
-
-pp.readToken_pipe_amp = function(code) { // '|&'
- let next = this.input.charCodeAt(this.pos + 1)
- if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2)
- if (next === 61) return this.finishOp(tt.assign, 2)
- return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1)
-}
-
-pp.readToken_caret = function() { // '^'
- let next = this.input.charCodeAt(this.pos + 1)
- if (next === 61) return this.finishOp(tt.assign, 2)
- return this.finishOp(tt.bitwiseXOR, 1)
-}
-
-pp.readToken_plus_min = function(code) { // '+-'
- let next = this.input.charCodeAt(this.pos + 1)
- if (next === code) {
- if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 &&
- lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) {
- // A `-->` line comment
- this.skipLineComment(3)
- this.skipSpace()
- return this.nextToken()
- }
- return this.finishOp(tt.incDec, 2)
- }
- if (next === 61) return this.finishOp(tt.assign, 2)
- return this.finishOp(tt.plusMin, 1)
-}
-
-pp.readToken_lt_gt = function(code) { // '<>'
- let next = this.input.charCodeAt(this.pos + 1)
- let size = 1
- if (next === code) {
- size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2
- if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1)
- return this.finishOp(tt.bitShift, size)
- }
- if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 &&
- this.input.charCodeAt(this.pos + 3) == 45) {
- if (this.inModule) this.unexpected()
- // `<!--`, an XML-style comment that should be interpreted as a line comment
- this.skipLineComment(4)
- this.skipSpace()
- return this.nextToken()
- }
- if (next === 61)
- size = this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2
- return this.finishOp(tt.relational, size)
-}
-
-pp.readToken_eq_excl = function(code) { // '=!'
- let next = this.input.charCodeAt(this.pos + 1)
- if (next === 61) return this.finishOp(tt.equality, this.input.charCodeAt(this.pos + 2) === 61 ? 3 : 2)
- if (code === 61 && next === 62 && this.options.ecmaVersion >= 6) { // '=>'
- this.pos += 2
- return this.finishToken(tt.arrow)
- }
- return this.finishOp(code === 61 ? tt.eq : tt.prefix, 1)
-}
-
-pp.getTokenFromCode = function(code) {
- switch (code) {
- // The interpretation of a dot depends on whether it is followed
- // by a digit or another two dots.
- case 46: // '.'
- return this.readToken_dot()
-
- // Punctuation tokens.
- case 40: ++this.pos; return this.finishToken(tt.parenL)
- case 41: ++this.pos; return this.finishToken(tt.parenR)
- case 59: ++this.pos; return this.finishToken(tt.semi)
- case 44: ++this.pos; return this.finishToken(tt.comma)
- case 91: ++this.pos; return this.finishToken(tt.bracketL)
- case 93: ++this.pos; return this.finishToken(tt.bracketR)
- case 123: ++this.pos; return this.finishToken(tt.braceL)
- case 125: ++this.pos; return this.finishToken(tt.braceR)
- case 58: ++this.pos; return this.finishToken(tt.colon)
- case 63: ++this.pos; return this.finishToken(tt.question)
-
- case 96: // '`'
- if (this.options.ecmaVersion < 6) break
- ++this.pos
- return this.finishToken(tt.backQuote)
-
- case 48: // '0'
- let next = this.input.charCodeAt(this.pos + 1)
- if (next === 120 || next === 88) return this.readRadixNumber(16); // '0x', '0X' - hex number
- if (this.options.ecmaVersion >= 6) {
- if (next === 111 || next === 79) return this.readRadixNumber(8); // '0o', '0O' - octal number
- if (next === 98 || next === 66) return this.readRadixNumber(2); // '0b', '0B' - binary number
- }
- // Anything else beginning with a digit is an integer, octal
- // number, or float.
- case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: // 1-9
- return this.readNumber(false)
-
- // Quotes produce strings.
- case 34: case 39: // '"', "'"
- return this.readString(code)
-
- // Operators are parsed inline in tiny state machines. '=' (61) is
- // often referred to. `finishOp` simply skips the amount of
- // characters it is given as second argument, and returns a token
- // of the type given by its first argument.
-
- case 47: // '/'
- return this.readToken_slash()
-
- case 37: case 42: // '%*'
- return this.readToken_mult_modulo(code)
-
- case 124: case 38: // '|&'
- return this.readToken_pipe_amp(code)
-
- case 94: // '^'
- return this.readToken_caret()
-
- case 43: case 45: // '+-'
- return this.readToken_plus_min(code)
-
- case 60: case 62: // '<>'
- return this.readToken_lt_gt(code)
-
- case 61: case 33: // '=!'
- return this.readToken_eq_excl(code)
-
- case 126: // '~'
- return this.finishOp(tt.prefix, 1)
- }
-
- this.raise(this.pos, "Unexpected character '" + codePointToString(code) + "'")
-}
-
-pp.finishOp = function(type, size) {
- let str = this.input.slice(this.pos, this.pos + size)
- this.pos += size
- return this.finishToken(type, str)
-}
-
-var regexpUnicodeSupport = false
-try { new RegExp("\uffff", "u"); regexpUnicodeSupport = true }
-catch(e) {}
-
-// Parse a regular expression. Some context-awareness is necessary,
-// since a '/' inside a '[]' set does not end the expression.
-
-pp.readRegexp = function() {
- let escaped, inClass, start = this.pos
- for (;;) {
- if (this.pos >= this.input.length) this.raise(start, "Unterminated regular expression")
- let ch = this.input.charAt(this.pos)
- if (lineBreak.test(ch)) this.raise(start, "Unterminated regular expression")
- if (!escaped) {
- if (ch === "[") inClass = true
- else if (ch === "]" && inClass) inClass = false
- else if (ch === "/" && !inClass) break
- escaped = ch === "\\"
- } else escaped = false
- ++this.pos
- }
- let content = this.input.slice(start, this.pos)
- ++this.pos
- // Need to use `readWord1` because '\uXXXX' sequences are allowed
- // here (don't ask).
- let mods = this.readWord1()
- let tmp = content
- if (mods) {
- let validFlags = /^[gmsiy]*$/
- if (this.options.ecmaVersion >= 6) validFlags = /^[gmsiyu]*$/
- if (!validFlags.test(mods)) this.raise(start, "Invalid regular expression flag")
- if (mods.indexOf('u') >= 0 && !regexpUnicodeSupport) {
- // Replace each astral symbol and every Unicode escape sequence that
- // possibly represents an astral symbol or a paired surrogate with a
- // single ASCII symbol to avoid throwing on regular expressions that
- // are only valid in combination with the `/u` flag.
- // Note: replacing with the ASCII symbol `x` might cause false
- // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a
- // perfectly valid pattern that is equivalent to `[a-b]`, but it would
- // be replaced by `[x-b]` which throws an error.
- tmp = tmp.replace(/\\u([a-fA-F0-9]{4})|\\u\{([0-9a-fA-F]+)\}|[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x")
- }
- }
- // Detect invalid regular expressions.
- let value = null
- // Rhino's regular expression parser is flaky and throws uncatchable exceptions,
- // so don't do detection if we are running under Rhino
- if (!isRhino) {
- try {
- new RegExp(tmp)
- } catch (e) {
- if (e instanceof SyntaxError) this.raise(start, "Error parsing regular expression: " + e.message)
- this.raise(e)
- }
- // Get a regular expression object for this pattern-flag pair, or `null` in
- // case the current environment doesn't support the flags it uses.
- try {
- value = new RegExp(content, mods)
- } catch (err) {}
- }
- return this.finishToken(tt.regexp, {pattern: content, flags: mods, value: value})
-}
-
-// Read an integer in the given radix. Return null if zero digits
-// were read, the integer value otherwise. When `len` is given, this
-// will return `null` unless the integer has exactly `len` digits.
-
-pp.readInt = function(radix, len) {
- let start = this.pos, total = 0
- for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
- let code = this.input.charCodeAt(this.pos), val
- if (code >= 97) val = code - 97 + 10; // a
- else if (code >= 65) val = code - 65 + 10; // A
- else if (code >= 48 && code <= 57) val = code - 48; // 0-9
- else val = Infinity
- if (val >= radix) break
- ++this.pos
- total = total * radix + val
- }
- if (this.pos === start || len != null && this.pos - start !== len) return null
-
- return total
-}
-
-pp.readRadixNumber = function(radix) {
- this.pos += 2; // 0x
- let val = this.readInt(radix)
- if (val == null) this.raise(this.start + 2, "Expected number in radix " + radix)
- if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
- return this.finishToken(tt.num, val)
-}
-
-// Read an integer, octal integer, or floating-point number.
-
-pp.readNumber = function(startsWithDot) {
- let start = this.pos, isFloat = false, octal = this.input.charCodeAt(this.pos) === 48
- if (!startsWithDot && this.readInt(10) === null) this.raise(start, "Invalid number")
- if (this.input.charCodeAt(this.pos) === 46) {
- ++this.pos
- this.readInt(10)
- isFloat = true
- }
- let next = this.input.charCodeAt(this.pos)
- if (next === 69 || next === 101) { // 'eE'
- next = this.input.charCodeAt(++this.pos)
- if (next === 43 || next === 45) ++this.pos; // '+-'
- if (this.readInt(10) === null) this.raise(start, "Invalid number")
- isFloat = true
- }
- if (isIdentifierStart(this.fullCharCodeAtPos())) this.raise(this.pos, "Identifier directly after number")
-
- let str = this.input.slice(start, this.pos), val
- if (isFloat) val = parseFloat(str)
- else if (!octal || str.length === 1) val = parseInt(str, 10)
- else if (/[89]/.test(str) || this.strict) this.raise(start, "Invalid number")
- else val = parseInt(str, 8)
- return this.finishToken(tt.num, val)
-}
-
-// Read a string value, interpreting backslash-escapes.
-
-pp.readCodePoint = function() {
- let ch = this.input.charCodeAt(this.pos), code
-
- if (ch === 123) {
- if (this.options.ecmaVersion < 6) this.unexpected()
- ++this.pos
- code = this.readHexChar(this.input.indexOf('}', this.pos) - this.pos)
- ++this.pos
- if (code > 0x10FFFF) this.unexpected()
- } else {
- code = this.readHexChar(4)
- }
- return code
-}
-
-function codePointToString(code) {
- // UTF-16 Decoding
- if (code <= 0xFFFF) return String.fromCharCode(code)
- return String.fromCharCode(((code - 0x10000) >> 10) + 0xD800,
- ((code - 0x10000) & 1023) + 0xDC00)
-}
-
-pp.readString = function(quote) {
- let out = "", chunkStart = ++this.pos
- for (;;) {
- if (this.pos >= this.input.length) this.raise(this.start, "Unterminated string constant")
- let ch = this.input.charCodeAt(this.pos)
- if (ch === quote) break
- if (ch === 92) { // '\'
- out += this.input.slice(chunkStart, this.pos)
- out += this.readEscapedChar()
- chunkStart = this.pos
- } else {
- if (isNewLine(ch)) this.raise(this.start, "Unterminated string constant")
- ++this.pos
- }
- }
- out += this.input.slice(chunkStart, this.pos++)
- return this.finishToken(tt.string, out)
-}
-
-// Reads template string tokens.
-
-pp.readTmplToken = function() {
- let out = "", chunkStart = this.pos
- for (;;) {
- if (this.pos >= this.input.length) this.raise(this.start, "Unterminated template")
- let ch = this.input.charCodeAt(this.pos)
- if (ch === 96 || ch === 36 && this.input.charCodeAt(this.pos + 1) === 123) { // '`', '${'
- if (this.pos === this.start && this.type === tt.template) {
- if (ch === 36) {
- this.pos += 2
- return this.finishToken(tt.dollarBraceL)
- } else {
- ++this.pos
- return this.finishToken(tt.backQuote)
- }
- }
- out += this.input.slice(chunkStart, this.pos)
- return this.finishToken(tt.template, out)
- }
- if (ch === 92) { // '\'
- out += this.input.slice(chunkStart, this.pos)
- out += this.readEscapedChar()
- chunkStart = this.pos
- } else if (isNewLine(ch)) {
- out += this.input.slice(chunkStart, this.pos)
- ++this.pos
- if (ch === 13 && this.input.charCodeAt(this.pos) === 10) {
- ++this.pos
- out += "\n"
- } else {
- out += String.fromCharCode(ch)
- }
- if (this.options.locations) {
- ++this.curLine
- this.lineStart = this.pos
- }
- chunkStart = this.pos
- } else {
- ++this.pos
- }
- }
-}
-
-// Used to read escaped characters
-
-pp.readEscapedChar = function() {
- let ch = this.input.charCodeAt(++this.pos)
- let octal = /^[0-7]+/.exec(this.input.slice(this.pos, this.pos + 3))
- if (octal) octal = octal[0]
- while (octal && parseInt(octal, 8) > 255) octal = octal.slice(0, -1)
- if (octal === "0") octal = null
- ++this.pos
- if (octal) {
- if (this.strict) this.raise(this.pos - 2, "Octal literal in strict mode")
- this.pos += octal.length - 1
- return String.fromCharCode(parseInt(octal, 8))
- } else {
- switch (ch) {
- case 110: return "\n"; // 'n' -> '\n'
- case 114: return "\r"; // 'r' -> '\r'
- case 120: return String.fromCharCode(this.readHexChar(2)); // 'x'
- case 117: return codePointToString(this.readCodePoint()); // 'u'
- case 116: return "\t"; // 't' -> '\t'
- case 98: return "\b"; // 'b' -> '\b'
- case 118: return "\u000b"; // 'v' -> '\u000b'
- case 102: return "\f"; // 'f' -> '\f'
- case 48: return "\0"; // 0 -> '\0'
- case 13: if (this.input.charCodeAt(this.pos) === 10) ++this.pos; // '\r\n'
- case 10: // ' \n'
- if (this.options.locations) { this.lineStart = this.pos; ++this.curLine }
- return ""
- default: return String.fromCharCode(ch)
- }
- }
-}
-
-// Used to read character escape sequences ('\x', '\u', '\U').
-
-pp.readHexChar = function(len) {
- let n = this.readInt(16, len)
- if (n === null) this.raise(this.start, "Bad character escape sequence")
- return n
-}
-
-// Used to signal to callers of `readWord1` whether the word
-// contained any escape sequences. This is needed because words with
-// escape sequences must not be interpreted as keywords.
-
-var containsEsc
-
-// Read an identifier, and return it as a string. Sets `containsEsc`
-// to whether the word contained a '\u' escape.
-//
-// Incrementally adds only escaped chars, adding other chunks as-is
-// as a micro-optimization.
-
-pp.readWord1 = function() {
- containsEsc = false
- let word = "", first = true, chunkStart = this.pos
- let astral = this.options.ecmaVersion >= 6
- while (this.pos < this.input.length) {
- let ch = this.fullCharCodeAtPos()
- if (isIdentifierChar(ch, astral)) {
- this.pos += ch <= 0xffff ? 1 : 2
- } else if (ch === 92) { // "\"
- containsEsc = true
- word += this.input.slice(chunkStart, this.pos)
- let escStart = this.pos
- if (this.input.charCodeAt(++this.pos) != 117) // "u"
- this.raise(this.pos, "Expecting Unicode escape sequence \\uXXXX")
- ++this.pos
- let esc = this.readCodePoint()
- if (!(first ? isIdentifierStart : isIdentifierChar)(esc, astral))
- this.raise(escStart, "Invalid Unicode escape")
- word += codePointToString(esc)
- chunkStart = this.pos
- } else {
- break
- }
- first = false
- }
- return word + this.input.slice(chunkStart, this.pos)
-}
-
-// Read an identifier or keyword token. Will check for reserved
-// words when necessary.
-
-pp.readWord = function() {
- let word = this.readWord1()
- let type = tt.name
- if ((this.options.ecmaVersion >= 6 || !containsEsc) && this.isKeyword(word))
- type = keywordTypes[word]
- return this.finishToken(type, word)
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/tokentype.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/tokentype.js
deleted file mode 100644
index 93aef8bea1..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/tokentype.js
+++ /dev/null
@@ -1,142 +0,0 @@
-// ## Token types
-
-// The assignment of fine-grained, information-carrying type objects
-// allows the tokenizer to store the information it has about a
-// token in a way that is very cheap for the parser to look up.
-
-// All token type variables start with an underscore, to make them
-// easy to recognize.
-
-// The `beforeExpr` property is used to disambiguate between regular
-// expressions and divisions. It is set on all token types that can
-// be followed by an expression (thus, a slash after them would be a
-// regular expression).
-//
-// `isLoop` marks a keyword as starting a loop, which is important
-// to know when parsing a label, in order to allow or disallow
-// continue jumps to that label.
-
-export class TokenType {
- constructor(label, conf = {}) {
- this.label = label
- this.keyword = conf.keyword
- this.beforeExpr = !!conf.beforeExpr
- this.startsExpr = !!conf.startsExpr
- this.isLoop = !!conf.isLoop
- this.isAssign = !!conf.isAssign
- this.prefix = !!conf.prefix
- this.postfix = !!conf.postfix
- this.binop = conf.binop || null
- this.updateContext = null
- }
-}
-
-function binop(name, prec) {
- return new TokenType(name, {beforeExpr: true, binop: prec})
-}
-const beforeExpr = {beforeExpr: true}, startsExpr = {startsExpr: true}
-
-export const types = {
- num: new TokenType("num", startsExpr),
- regexp: new TokenType("regexp", startsExpr),
- string: new TokenType("string", startsExpr),
- name: new TokenType("name", startsExpr),
- eof: new TokenType("eof"),
-
- // Punctuation token types.
- bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}),
- bracketR: new TokenType("]"),
- braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}),
- braceR: new TokenType("}"),
- parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}),
- parenR: new TokenType(")"),
- comma: new TokenType(",", beforeExpr),
- semi: new TokenType(";", beforeExpr),
- colon: new TokenType(":", beforeExpr),
- dot: new TokenType("."),
- question: new TokenType("?", beforeExpr),
- arrow: new TokenType("=>", beforeExpr),
- template: new TokenType("template"),
- ellipsis: new TokenType("...", beforeExpr),
- backQuote: new TokenType("`", startsExpr),
- dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}),
-
- // Operators. These carry several kinds of properties to help the
- // parser use them properly (the presence of these properties is
- // what categorizes them as operators).
- //
- // `binop`, when present, specifies that this operator is a binary
- // operator, and will refer to its precedence.
- //
- // `prefix` and `postfix` mark the operator as a prefix or postfix
- // unary operator.
- //
- // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as
- // binary operators with a very low precedence, that should result
- // in AssignmentExpression nodes.
-
- eq: new TokenType("=", {beforeExpr: true, isAssign: true}),
- assign: new TokenType("_=", {beforeExpr: true, isAssign: true}),
- incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}),
- prefix: new TokenType("prefix", {beforeExpr: true, prefix: true, startsExpr: true}),
- logicalOR: binop("||", 1),
- logicalAND: binop("&&", 2),
- bitwiseOR: binop("|", 3),
- bitwiseXOR: binop("^", 4),
- bitwiseAND: binop("&", 5),
- equality: binop("==/!=", 6),
- relational: binop("</>", 7),
- bitShift: binop("<</>>", 8),
- plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}),
- modulo: binop("%", 10),
- star: binop("*", 10),
- slash: binop("/", 10)
-}
-
-// Map keyword names to token types.
-
-export const keywords = {}
-
-// Succinct definitions of keyword token types
-function kw(name, options = {}) {
- options.keyword = name
- keywords[name] = types["_" + name] = new TokenType(name, options)
-}
-
-kw("break")
-kw("case", beforeExpr)
-kw("catch")
-kw("continue")
-kw("debugger")
-kw("default")
-kw("do", {isLoop: true})
-kw("else", beforeExpr)
-kw("finally")
-kw("for", {isLoop: true})
-kw("function", startsExpr)
-kw("if")
-kw("return", beforeExpr)
-kw("switch")
-kw("throw", beforeExpr)
-kw("try")
-kw("var")
-kw("let")
-kw("const")
-kw("while", {isLoop: true})
-kw("with")
-kw("new", {beforeExpr: true, startsExpr: true})
-kw("this", startsExpr)
-kw("super", startsExpr)
-kw("class")
-kw("extends", beforeExpr)
-kw("export")
-kw("import")
-kw("yield", {beforeExpr: true, startsExpr: true})
-kw("null", startsExpr)
-kw("true", startsExpr)
-kw("false", startsExpr)
-kw("in", {beforeExpr: true, binop: 7})
-kw("instanceof", {beforeExpr: true, binop: 7})
-kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true})
-kw("void", {beforeExpr: true, prefix: true, startsExpr: true})
-kw("delete", {beforeExpr: true, prefix: true, startsExpr: true})
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/util.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/util.js
deleted file mode 100644
index 3517f8d212..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/util.js
+++ /dev/null
@@ -1,9 +0,0 @@
-export function isArray(obj) {
- return Object.prototype.toString.call(obj) === "[object Array]"
-}
-
-// Checks if an object has a property.
-
-export function has(obj, propName) {
- return Object.prototype.hasOwnProperty.call(obj, propName)
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/walk/index.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/walk/index.js
deleted file mode 100644
index 493b664b28..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/walk/index.js
+++ /dev/null
@@ -1,291 +0,0 @@
-// AST walker module for Mozilla Parser API compatible trees
-
-// A simple walk is one where you simply specify callbacks to be
-// called on specific nodes. The last two arguments are optional. A
-// simple use would be
-//
-// walk.simple(myTree, {
-// Expression: function(node) { ... }
-// });
-//
-// to do something with all expressions. All Parser API node types
-// can be used to identify node types, as well as Expression,
-// Statement, and ScopeBody, which denote categories of nodes.
-//
-// The base argument can be used to pass a custom (recursive)
-// walker, and state can be used to give this walked an initial
-// state.
-
-export function simple(node, visitors, base, state) {
- if (!base) base = exports.base
- ;(function c(node, st, override) {
- let type = override || node.type, found = visitors[type]
- base[type](node, st, c)
- if (found) found(node, st)
- })(node, state)
-}
-
-// An ancestor walk builds up an array of ancestor nodes (including
-// the current node) and passes them to the callback as the state parameter.
-export function ancestor(node, visitors, base, state) {
- if (!base) base = exports.base
- if (!state) state = []
- ;(function c(node, st, override) {
- let type = override || node.type, found = visitors[type]
- if (node != st[st.length - 1]) {
- st = st.slice()
- st.push(node)
- }
- base[type](node, st, c)
- if (found) found(node, st)
- })(node, state)
-}
-
-// A recursive walk is one where your functions override the default
-// walkers. They can modify and replace the state parameter that's
-// threaded through the walk, and can opt how and whether to walk
-// their child nodes (by calling their third argument on these
-// nodes).
-export function recursive(node, state, funcs, base) {
- let visitor = funcs ? exports.make(funcs, base) : base
- ;(function c(node, st, override) {
- visitor[override || node.type](node, st, c)
- })(node, state)
-}
-
-function makeTest(test) {
- if (typeof test == "string")
- return type => type == test
- else if (!test)
- return () => true
- else
- return test
-}
-
-class Found {
- constructor(node, state) { this.node = node; this.state = state }
-}
-
-// Find a node with a given start, end, and type (all are optional,
-// null can be used as wildcard). Returns a {node, state} object, or
-// undefined when it doesn't find a matching node.
-export function findNodeAt(node, start, end, test, base, state) {
- test = makeTest(test)
- if (!base) base = exports.base
- try {
- ;(function c(node, st, override) {
- let type = override || node.type
- if ((start == null || node.start <= start) &&
- (end == null || node.end >= end))
- base[type](node, st, c)
- if (test(type, node) &&
- (start == null || node.start == start) &&
- (end == null || node.end == end))
- throw new Found(node, st)
- })(node, state)
- } catch (e) {
- if (e instanceof Found) return e
- throw e
- }
-}
-
-// Find the innermost node of a given type that contains the given
-// position. Interface similar to findNodeAt.
-export function findNodeAround(node, pos, test, base, state) {
- test = makeTest(test)
- if (!base) base = exports.base
- try {
- ;(function c(node, st, override) {
- let type = override || node.type
- if (node.start > pos || node.end < pos) return
- base[type](node, st, c)
- if (test(type, node)) throw new Found(node, st)
- })(node, state)
- } catch (e) {
- if (e instanceof Found) return e
- throw e
- }
-}
-
-// Find the outermost matching node after a given position.
-export function findNodeAfter(node, pos, test, base, state) {
- test = makeTest(test)
- if (!base) base = exports.base
- try {
- ;(function c(node, st, override) {
- if (node.end < pos) return
- let type = override || node.type
- if (node.start >= pos && test(type, node)) throw new Found(node, st)
- base[type](node, st, c)
- })(node, state)
- } catch (e) {
- if (e instanceof Found) return e
- throw e
- }
-}
-
-// Find the outermost matching node before a given position.
-export function findNodeBefore(node, pos, test, base, state) {
- test = makeTest(test)
- if (!base) base = exports.base
- let max
- ;(function c(node, st, override) {
- if (node.start > pos) return
- let type = override || node.type
- if (node.end <= pos && (!max || max.node.end < node.end) && test(type, node))
- max = new Found(node, st)
- base[type](node, st, c)
- })(node, state)
- return max
-}
-
-// Used to create a custom walker. Will fill in all missing node
-// type properties with the defaults.
-export function make(funcs, base) {
- if (!base) base = exports.base
- let visitor = {}
- for (var type in base) visitor[type] = base[type]
- for (var type in funcs) visitor[type] = funcs[type]
- return visitor
-}
-
-function skipThrough(node, st, c) { c(node, st) }
-function ignore(_node, _st, _c) {}
-
-// Node walkers.
-
-export const base = {}
-
-base.Program = base.BlockStatement = (node, st, c) => {
- for (let i = 0; i < node.body.length; ++i)
- c(node.body[i], st, "Statement")
-}
-base.Statement = skipThrough
-base.EmptyStatement = ignore
-base.ExpressionStatement = base.ParenthesizedExpression =
- (node, st, c) => c(node.expression, st, "Expression")
-base.IfStatement = (node, st, c) => {
- c(node.test, st, "Expression")
- c(node.consequent, st, "Statement")
- if (node.alternate) c(node.alternate, st, "Statement")
-}
-base.LabeledStatement = (node, st, c) => c(node.body, st, "Statement")
-base.BreakStatement = base.ContinueStatement = ignore
-base.WithStatement = (node, st, c) => {
- c(node.object, st, "Expression")
- c(node.body, st, "Statement")
-}
-base.SwitchStatement = (node, st, c) => {
- c(node.discriminant, st, "Expression")
- for (let i = 0; i < node.cases.length; ++i) {
- let cs = node.cases[i]
- if (cs.test) c(cs.test, st, "Expression")
- for (let j = 0; j < cs.consequent.length; ++j)
- c(cs.consequent[j], st, "Statement")
- }
-}
-base.ReturnStatement = base.YieldExpression = (node, st, c) => {
- if (node.argument) c(node.argument, st, "Expression")
-}
-base.ThrowStatement = base.SpreadElement = base.RestElement =
- (node, st, c) => c(node.argument, st, "Expression")
-base.TryStatement = (node, st, c) => {
- c(node.block, st, "Statement")
- if (node.handler) c(node.handler.body, st, "ScopeBody")
- if (node.finalizer) c(node.finalizer, st, "Statement")
-}
-base.WhileStatement = base.DoWhileStatement = (node, st, c) => {
- c(node.test, st, "Expression")
- c(node.body, st, "Statement")
-}
-base.ForStatement = (node, st, c) => {
- if (node.init) c(node.init, st, "ForInit")
- if (node.test) c(node.test, st, "Expression")
- if (node.update) c(node.update, st, "Expression")
- c(node.body, st, "Statement")
-}
-base.ForInStatement = base.ForOfStatement = (node, st, c) => {
- c(node.left, st, "ForInit")
- c(node.right, st, "Expression")
- c(node.body, st, "Statement")
-}
-base.ForInit = (node, st, c) => {
- if (node.type == "VariableDeclaration") c(node, st)
- else c(node, st, "Expression")
-}
-base.DebuggerStatement = ignore
-
-base.FunctionDeclaration = (node, st, c) => c(node, st, "Function")
-base.VariableDeclaration = (node, st, c) => {
- for (let i = 0; i < node.declarations.length; ++i) {
- let decl = node.declarations[i]
- if (decl.init) c(decl.init, st, "Expression")
- }
-}
-
-base.Function = (node, st, c) => c(node.body, st, "ScopeBody")
-base.ScopeBody = (node, st, c) => c(node, st, "Statement")
-
-base.Expression = skipThrough
-base.ThisExpression = base.Super = base.MetaProperty = ignore
-base.ArrayExpression = base.ArrayPattern = (node, st, c) => {
- for (let i = 0; i < node.elements.length; ++i) {
- let elt = node.elements[i]
- if (elt) c(elt, st, "Expression")
- }
-}
-base.ObjectExpression = base.ObjectPattern = (node, st, c) => {
- for (let i = 0; i < node.properties.length; ++i)
- c(node.properties[i], st)
-}
-base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration
-base.SequenceExpression = base.TemplateLiteral = (node, st, c) => {
- for (let i = 0; i < node.expressions.length; ++i)
- c(node.expressions[i], st, "Expression")
-}
-base.UnaryExpression = base.UpdateExpression = (node, st, c) => {
- c(node.argument, st, "Expression")
-}
-base.BinaryExpression = base.AssignmentExpression = base.AssignmentPattern = base.LogicalExpression = (node, st, c) => {
- c(node.left, st, "Expression")
- c(node.right, st, "Expression")
-}
-base.ConditionalExpression = (node, st, c) => {
- c(node.test, st, "Expression")
- c(node.consequent, st, "Expression")
- c(node.alternate, st, "Expression")
-}
-base.NewExpression = base.CallExpression = (node, st, c) => {
- c(node.callee, st, "Expression")
- if (node.arguments) for (let i = 0; i < node.arguments.length; ++i)
- c(node.arguments[i], st, "Expression")
-}
-base.MemberExpression = (node, st, c) => {
- c(node.object, st, "Expression")
- if (node.computed) c(node.property, st, "Expression")
-}
-base.ExportNamedDeclaration = base.ExportDefaultDeclaration = (node, st, c) => c(node.declaration, st)
-base.ImportDeclaration = (node, st, c) => {
- for (let i = 0; i < node.specifiers.length; i++)
- c(node.specifiers[i], st)
-}
-base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.Literal = ignore
-
-base.TaggedTemplateExpression = (node, st, c) => {
- c(node.tag, st, "Expression")
- c(node.quasi, st)
-}
-base.ClassDeclaration = base.ClassExpression = (node, st, c) => {
- if (node.superClass) c(node.superClass, st, "Expression")
- for (let i = 0; i < node.body.body.length; i++)
- c(node.body.body[i], st)
-}
-base.MethodDefinition = base.Property = (node, st, c) => {
- if (node.computed) c(node.key, st, "Expression")
- c(node.value, st, "Expression")
-}
-base.ComprehensionExpression = (node, st, c) => {
- for (let i = 0; i < node.blocks.length; i++)
- c(node.blocks[i].right, st, "Expression")
- c(node.body, st, "Expression")
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/whitespace.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/whitespace.js
deleted file mode 100644
index 627aa78d41..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/acorn/src/whitespace.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// Matches a whole line break (where CRLF is considered a single
-// line break). Used to count lines.
-
-export const lineBreak = /\r\n?|\n|\u2028|\u2029/
-export const lineBreakG = new RegExp(lineBreak.source, "g")
-
-export function isNewLine(code) {
- return code === 10 || code === 13 || code === 0x2028 || code == 0x2029
-}
-
-export const nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/.npmignore b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/.npmignore
deleted file mode 100644
index d135df67cb..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-node_modules
-components
-build \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/LICENSE b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/LICENSE
deleted file mode 100644
index 3032d6e34c..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/LICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-The MIT License
-
-Copyright (c) 2013 Manuel Stofer
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/Makefile b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/Makefile
deleted file mode 100644
index eae4117866..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-
-build: components
- @component build
-
-components: component.json
- @component install --dev
-
-clean:
- rm -fr build components template.js
-
-.PHONY: clean
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/Readme.md b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/Readme.md
deleted file mode 100644
index 0fe37b02f4..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/Readme.md
+++ /dev/null
@@ -1,29 +0,0 @@
-
-# foreach
-
-Iterate over the key value pairs of either an array-like object or a dictionary like object.
-
-[![browser support][1]][2]
-
-## API
-
-### foreach(object, function, [context])
-
-```js
-var each = require('foreach');
-
-each([1,2,3], function (value, key, array) {
- // value === 1, 2, 3
- // key === 0, 1, 2
- // array === [1, 2, 3]
-});
-
-each({0:1,1:2,2:3}, function (value, key, object) {
- // value === 1, 2, 3
- // key === 0, 1, 2
- // object === {0:1,1:2,2:3}
-});
-```
-
-[1]: https://ci.testling.com/manuelstofer/foreach.png
-[2]: https://ci.testling.com/manuelstofer/foreach
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/component.json b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/component.json
deleted file mode 100644
index 0eeecb513a..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/component.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "name": "foreach",
- "description": "foreach component + npm package",
- "version": "2.0.5",
- "keywords": [],
- "dependencies": {},
- "scripts": [
- "index.js"
- ],
- "repo": "manuelstofer/foreach"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/index.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/index.js
deleted file mode 100644
index 18f66bd9fd..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/index.js
+++ /dev/null
@@ -1,21 +0,0 @@
-
-var hasOwn = Object.prototype.hasOwnProperty;
-var toString = Object.prototype.toString;
-
-module.exports = function forEach (obj, fn, ctx) {
- if (toString.call(fn) !== '[object Function]') {
- throw new TypeError('iterator must be a function');
- }
- var l = obj.length;
- if (l === +l) {
- for (var i = 0; i < l; i++) {
- fn.call(ctx, obj[i], i, obj);
- }
- } else {
- for (var k in obj) {
- if (hasOwn.call(obj, k)) {
- fn.call(ctx, obj[k], k, obj);
- }
- }
- }
-};
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/package.json b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/package.json
deleted file mode 100644
index 7c440ea012..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/package.json
+++ /dev/null
@@ -1,109 +0,0 @@
-{
- "_args": [
- [
- "foreach@^2.0.5",
- "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel"
- ]
- ],
- "_from": "foreach@>=2.0.5 <3.0.0",
- "_id": "foreach@2.0.5",
- "_inCache": true,
- "_installable": true,
- "_location": "/readable-stream/inline-process-browser/falafel/foreach",
- "_npmUser": {
- "email": "manuel@takimata.ch",
- "name": "manuelstofer"
- },
- "_npmVersion": "1.4.9",
- "_phantomChildren": {},
- "_requested": {
- "name": "foreach",
- "raw": "foreach@^2.0.5",
- "rawSpec": "^2.0.5",
- "scope": null,
- "spec": ">=2.0.5 <3.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/readable-stream/inline-process-browser/falafel"
- ],
- "_resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
- "_shasum": "0bee005018aeb260d0a3af3ae658dd0136ec1b99",
- "_shrinkwrap": null,
- "_spec": "foreach@^2.0.5",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel",
- "author": {
- "email": "manuel@takimata.ch",
- "name": "Manuel Stofer"
- },
- "bugs": {
- "url": "https://github.com/manuelstofer/foreach/issues"
- },
- "contributors": [
- {
- "name": "Manuel Stofer"
- },
- {
- "name": "Jordan Harband",
- "url": "https://github.com/ljharb"
- }
- ],
- "dependencies": {},
- "description": "foreach component + npm package",
- "devDependencies": {
- "covert": "*",
- "tape": "*"
- },
- "directories": {},
- "dist": {
- "shasum": "0bee005018aeb260d0a3af3ae658dd0136ec1b99",
- "tarball": "http://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz"
- },
- "homepage": "https://github.com/manuelstofer/foreach",
- "keywords": [
- "shim",
- "Array.prototype.forEach",
- "forEach",
- "Array#forEach",
- "each"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "email": "manuel@takimata.ch",
- "name": "manuelstofer"
- }
- ],
- "name": "foreach",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/manuelstofer/foreach.git"
- },
- "scripts": {
- "coverage": "covert test.js",
- "coverage-quiet": "covert --quiet test.js",
- "test": "node test.js"
- },
- "testling": {
- "browsers": [
- "iexplore/6.0..latest",
- "firefox/3.0",
- "firefox/15.0..latest",
- "firefox/nightly",
- "chrome/4.0",
- "chrome/22.0..latest",
- "chrome/canary",
- "opera/10.0..latest",
- "opera/next",
- "safari/5.0.5..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest",
- "android-browser/4.2"
- ],
- "files": "test.js"
- },
- "version": "2.0.5"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/test.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/test.js
deleted file mode 100644
index 39f8d63a4c..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/foreach/test.js
+++ /dev/null
@@ -1,152 +0,0 @@
-var test = require('tape');
-var forEach = require('./index.js');
-
-
-test('second argument: iterator', function (t) {
- var arr = [];
- t.throws(function () { forEach(arr); }, TypeError, 'undefined is not a function');
- t.throws(function () { forEach(arr, null); }, TypeError, 'null is not a function');
- t.throws(function () { forEach(arr, ''); }, TypeError, 'string is not a function');
- t.throws(function () { forEach(arr, /a/); }, TypeError, 'regex is not a function');
- t.throws(function () { forEach(arr, true); }, TypeError, 'true is not a function');
- t.throws(function () { forEach(arr, false); }, TypeError, 'false is not a function');
- t.throws(function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function');
- t.throws(function () { forEach(arr, 42); }, TypeError, '42 is not a function');
- t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function');
- t.end();
-});
-
-test('array', function (t) {
- var arr = [1, 2, 3];
-
- t.test('iterates over every item', function (st) {
- var index = 0;
- forEach(arr, function () { index += 1; });
- st.equal(index, arr.length, 'iterates ' + arr.length + ' times');
- st.end();
- });
-
- t.test('first iterator argument', function (st) {
- var index = 0;
- st.plan(arr.length);
- forEach(arr, function (item) {
- st.equal(arr[index], item, 'item ' + index + ' is passed as first argument');
- index += 1;
- });
- st.end();
- });
-
- t.test('second iterator argument', function (st) {
- var counter = 0;
- st.plan(arr.length);
- forEach(arr, function (item, index) {
- st.equal(counter, index, 'index ' + index + ' is passed as second argument');
- counter += 1;
- });
- st.end();
- });
-
- t.test('third iterator argument', function (st) {
- st.plan(arr.length);
- forEach(arr, function (item, index, array) {
- st.deepEqual(arr, array, 'array is passed as third argument');
- });
- st.end();
- });
-
- t.test('context argument', function (st) {
- var context = {};
- st.plan(1);
- forEach([1], function () {
- st.equal(this, context, '"this" is the passed context');
- }, context);
- st.end();
- });
-
- t.end();
-});
-
-test('object', function (t) {
- var obj = {
- a: 1,
- b: 2,
- c: 3
- };
- var keys = ['a', 'b', 'c'];
-
- var F = function () {
- this.a = 1;
- this.b = 2;
- };
- F.prototype.c = 3;
- var fKeys = ['a', 'b'];
-
- t.test('iterates over every object literal key', function (st) {
- var counter = 0;
- forEach(obj, function () { counter += 1; });
- st.equal(counter, keys.length, 'iterated ' + counter + ' times');
- st.end();
- });
-
- t.test('iterates only over own keys', function (st) {
- var counter = 0;
- forEach(new F(), function () { counter += 1; });
- st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times');
- st.end();
- });
-
- t.test('first iterator argument', function (st) {
- var index = 0;
- st.plan(keys.length);
- forEach(obj, function (item) {
- st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument');
- index += 1;
- });
- st.end();
- });
-
- t.test('second iterator argument', function (st) {
- var counter = 0;
- st.plan(keys.length);
- forEach(obj, function (item, key) {
- st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument');
- counter += 1;
- });
- st.end();
- });
-
- t.test('third iterator argument', function (st) {
- st.plan(keys.length);
- forEach(obj, function (item, key, object) {
- st.deepEqual(obj, object, 'object is passed as third argument');
- });
- st.end();
- });
-
- t.test('context argument', function (st) {
- var context = {};
- st.plan(1);
- forEach({ a: 1 }, function () {
- st.equal(this, context, '"this" is the passed context');
- }, context);
- st.end();
- });
-
- t.end();
-});
-
-
-test('string', function (t) {
- var str = 'str';
- t.test('second iterator argument', function (st) {
- var counter = 0;
- st.plan(str.length * 2 + 1);
- forEach(str, function (item, index) {
- st.equal(counter, index, 'index ' + index + ' is passed as second argument');
- st.equal(str.charAt(index), item);
- counter += 1;
- });
- st.equal(counter, str.length, 'iterates ' + str.length + ' times');
- });
- t.end();
-});
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/README.md b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/README.md
deleted file mode 100644
index 052a62b8d7..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/README.md
+++ /dev/null
@@ -1,54 +0,0 @@
-
-# isarray
-
-`Array#isArray` for older browsers.
-
-## Usage
-
-```js
-var isArray = require('isarray');
-
-console.log(isArray([])); // => true
-console.log(isArray({})); // => false
-```
-
-## Installation
-
-With [npm](http://npmjs.org) do
-
-```bash
-$ npm install isarray
-```
-
-Then bundle for the browser with
-[browserify](https://github.com/substack/browserify).
-
-With [component](http://component.io) do
-
-```bash
-$ component install juliangruber/isarray
-```
-
-## License
-
-(MIT)
-
-Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/build/build.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/build/build.js
deleted file mode 100644
index e1856ef094..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/build/build.js
+++ /dev/null
@@ -1,208 +0,0 @@
-
-/**
- * Require the given path.
- *
- * @param {String} path
- * @return {Object} exports
- * @api public
- */
-
-function require(path, parent, orig) {
- var resolved = require.resolve(path);
-
- // lookup failed
- if (null == resolved) {
- orig = orig || path;
- parent = parent || 'root';
- var err = new Error('Failed to require "' + orig + '" from "' + parent + '"');
- err.path = orig;
- err.parent = parent;
- err.require = true;
- throw err;
- }
-
- var module = require.modules[resolved];
-
- // perform real require()
- // by invoking the module's
- // registered function
- if (!module.exports) {
- module.exports = {};
- module.client = module.component = true;
- module.call(this, module.exports, require.relative(resolved), module);
- }
-
- return module.exports;
-}
-
-/**
- * Registered modules.
- */
-
-require.modules = {};
-
-/**
- * Registered aliases.
- */
-
-require.aliases = {};
-
-/**
- * Resolve `path`.
- *
- * Lookup:
- *
- * - PATH/index.js
- * - PATH.js
- * - PATH
- *
- * @param {String} path
- * @return {String} path or null
- * @api private
- */
-
-require.resolve = function(path) {
- if (path.charAt(0) === '/') path = path.slice(1);
- var index = path + '/index.js';
-
- var paths = [
- path,
- path + '.js',
- path + '.json',
- path + '/index.js',
- path + '/index.json'
- ];
-
- for (var i = 0; i < paths.length; i++) {
- var path = paths[i];
- if (require.modules.hasOwnProperty(path)) return path;
- }
-
- if (require.aliases.hasOwnProperty(index)) {
- return require.aliases[index];
- }
-};
-
-/**
- * Normalize `path` relative to the current path.
- *
- * @param {String} curr
- * @param {String} path
- * @return {String}
- * @api private
- */
-
-require.normalize = function(curr, path) {
- var segs = [];
-
- if ('.' != path.charAt(0)) return path;
-
- curr = curr.split('/');
- path = path.split('/');
-
- for (var i = 0; i < path.length; ++i) {
- if ('..' == path[i]) {
- curr.pop();
- } else if ('.' != path[i] && '' != path[i]) {
- segs.push(path[i]);
- }
- }
-
- return curr.concat(segs).join('/');
-};
-
-/**
- * Register module at `path` with callback `definition`.
- *
- * @param {String} path
- * @param {Function} definition
- * @api private
- */
-
-require.register = function(path, definition) {
- require.modules[path] = definition;
-};
-
-/**
- * Alias a module definition.
- *
- * @param {String} from
- * @param {String} to
- * @api private
- */
-
-require.alias = function(from, to) {
- if (!require.modules.hasOwnProperty(from)) {
- throw new Error('Failed to alias "' + from + '", it does not exist');
- }
- require.aliases[to] = from;
-};
-
-/**
- * Return a require function relative to the `parent` path.
- *
- * @param {String} parent
- * @return {Function}
- * @api private
- */
-
-require.relative = function(parent) {
- var p = require.normalize(parent, '..');
-
- /**
- * lastIndexOf helper.
- */
-
- function lastIndexOf(arr, obj) {
- var i = arr.length;
- while (i--) {
- if (arr[i] === obj) return i;
- }
- return -1;
- }
-
- /**
- * The relative require() itself.
- */
-
- function localRequire(path) {
- var resolved = localRequire.resolve(path);
- return require(resolved, parent, path);
- }
-
- /**
- * Resolve relative to the parent.
- */
-
- localRequire.resolve = function(path) {
- var c = path.charAt(0);
- if ('/' == c) return path.slice(1);
- if ('.' == c) return require.normalize(p, path);
-
- // resolve deps by returning
- // the dep in the nearest "deps"
- // directory
- var segs = parent.split('/');
- var i = lastIndexOf(segs, 'deps') + 1;
- if (!i) i = 0;
- path = segs.slice(0, i + 1).join('/') + '/deps/' + path;
- return path;
- };
-
- /**
- * Check if module is defined at `path`.
- */
-
- localRequire.exists = function(path) {
- return require.modules.hasOwnProperty(localRequire.resolve(path));
- };
-
- return localRequire;
-};
-require.register("isarray/index.js", function(exports, require, module){
-module.exports = Array.isArray || function (arr) {
- return Object.prototype.toString.call(arr) == '[object Array]';
-};
-
-});
-require.alias("isarray/index.js", "isarray/index.js");
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/component.json b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/component.json
deleted file mode 100644
index 9e31b68388..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/component.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name" : "isarray",
- "description" : "Array#isArray for older browsers",
- "version" : "0.0.1",
- "repository" : "juliangruber/isarray",
- "homepage": "https://github.com/juliangruber/isarray",
- "main" : "index.js",
- "scripts" : [
- "index.js"
- ],
- "dependencies" : {},
- "keywords": ["browser","isarray","array"],
- "author": {
- "name": "Julian Gruber",
- "email": "mail@juliangruber.com",
- "url": "http://juliangruber.com"
- },
- "license": "MIT"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/index.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/index.js
deleted file mode 100644
index 5f5ad45d46..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = Array.isArray || function (arr) {
- return Object.prototype.toString.call(arr) == '[object Array]';
-};
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/package.json b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/package.json
deleted file mode 100644
index 82d5c925bc..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/isarray/package.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
- "_args": [
- [
- "isarray@0.0.1",
- "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel"
- ]
- ],
- "_from": "isarray@0.0.1",
- "_id": "isarray@0.0.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/readable-stream/inline-process-browser/falafel/isarray",
- "_npmUser": {
- "email": "julian@juliangruber.com",
- "name": "juliangruber"
- },
- "_npmVersion": "1.2.18",
- "_phantomChildren": {},
- "_requested": {
- "name": "isarray",
- "raw": "isarray@0.0.1",
- "rawSpec": "0.0.1",
- "scope": null,
- "spec": "0.0.1",
- "type": "version"
- },
- "_requiredBy": [
- "/readable-stream/inline-process-browser/falafel"
- ],
- "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
- "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf",
- "_shrinkwrap": null,
- "_spec": "isarray@0.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel",
- "author": {
- "email": "mail@juliangruber.com",
- "name": "Julian Gruber",
- "url": "http://juliangruber.com"
- },
- "bugs": {
- "url": "https://github.com/juliangruber/isarray/issues"
- },
- "dependencies": {},
- "description": "Array#isArray for older browsers",
- "devDependencies": {
- "tap": "*"
- },
- "directories": {},
- "dist": {
- "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf",
- "tarball": "http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
- },
- "homepage": "https://github.com/juliangruber/isarray",
- "keywords": [
- "browser",
- "isarray",
- "array"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "email": "julian@juliangruber.com",
- "name": "juliangruber"
- }
- ],
- "name": "isarray",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/juliangruber/isarray.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "0.0.1"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/.editorconfig b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/.editorconfig
deleted file mode 100644
index 572e9793f0..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/.editorconfig
+++ /dev/null
@@ -1,12 +0,0 @@
-root = true
-
-[*]
-indent_style = tab;
-insert_final_newline = true;
-quote_type = auto;
-space_after_anonymous_functions = true;
-space_after_control_statements = true;
-spaces_around_operators = true;
-trim_trailing_whitespace = true;
-spaces_in_brackets = false;
-end_of_line = lf;
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/.jscs.json b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/.jscs.json
deleted file mode 100644
index 90ca46d115..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/.jscs.json
+++ /dev/null
@@ -1,130 +0,0 @@
-{
- "es3": true,
-
- "additionalRules": [],
-
- "requireSemicolons": true,
-
- "disallowMultipleSpaces": true,
-
- "disallowIdentifierNames": [],
-
- "requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"],
-
- "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"],
-
- "disallowSpaceAfterKeywords": [],
-
- "disallowSpaceBeforeComma": true,
- "disallowSpaceBeforeSemicolon": true,
-
- "disallowNodeTypes": [
- "DebuggerStatement",
- "LabeledStatement",
- "SwitchCase",
- "SwitchStatement",
- "WithStatement"
- ],
-
- "requireObjectKeysOnNewLine": true,
-
- "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true },
- "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true },
- "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true },
- "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true },
- "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true },
-
- "requireSpaceBetweenArguments": true,
-
- "disallowSpacesInsideParentheses": true,
-
- "disallowSpacesInsideArrayBrackets": true,
-
- "disallowQuotedKeysInObjects": "allButReserved",
-
- "disallowSpaceAfterObjectKeys": true,
-
- "requireCommaBeforeLineBreak": true,
-
- "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
- "requireSpaceAfterPrefixUnaryOperators": [],
-
- "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
- "requireSpaceBeforePostfixUnaryOperators": [],
-
- "disallowSpaceBeforeBinaryOperators": [],
- "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
-
- "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="],
- "disallowSpaceAfterBinaryOperators": [],
-
- "disallowImplicitTypeConversion": ["binary", "string"],
-
- "disallowKeywords": ["with", "eval"],
-
- "requireKeywordsOnNewLine": [],
- "disallowKeywordsOnNewLine": ["else"],
-
- "requireLineFeedAtFileEnd": true,
-
- "disallowTrailingWhitespace": true,
-
- "disallowTrailingComma": true,
-
- "excludeFiles": ["node_modules/**", "vendor/**"],
-
- "disallowMultipleLineStrings": true,
-
- "requireDotNotation": true,
-
- "requireParenthesesAroundIIFE": true,
-
- "validateLineBreaks": "LF",
-
- "validateQuoteMarks": {
- "escape": true,
- "mark": "'"
- },
-
- "disallowOperatorBeforeLineBreak": [],
-
- "requireSpaceBeforeKeywords": [
- "do",
- "for",
- "if",
- "else",
- "switch",
- "case",
- "try",
- "catch",
- "finally",
- "while",
- "with",
- "return"
- ],
-
- "validateAlignedFunctionParameters": {
- "lineBreakAfterOpeningBraces": true,
- "lineBreakBeforeClosingBraces": true
- },
-
- "requirePaddingNewLinesBeforeExport": true,
-
- "validateNewlineAfterArrayElements": {
- "maximum": 7
- },
-
- "requirePaddingNewLinesAfterUseStrict": true,
-
- "disallowArrowFunctions": true,
-
- "disallowMultiLineTernary": true,
-
- "validateOrderInObjectKeys": "asc-insensitive",
-
- "disallowIdenticalDestructuringNames": true,
-
- "disallowNestedTernaries": { "maxLevel": 1 },
-
- "requireSpaceAfterComma": true
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/.npmignore b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/.npmignore
deleted file mode 100644
index ab1cfb4ef2..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-test/*
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/.travis.yml b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/.travis.yml
deleted file mode 100644
index 324496cd48..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/.travis.yml
+++ /dev/null
@@ -1,60 +0,0 @@
-language: node_js
-node_js:
- - "4.2"
- - "4.1"
- - "4.0"
- - "iojs-v3.3"
- - "iojs-v3.2"
- - "iojs-v3.1"
- - "iojs-v3.0"
- - "iojs-v2.5"
- - "iojs-v2.4"
- - "iojs-v2.3"
- - "iojs-v2.2"
- - "iojs-v2.1"
- - "iojs-v2.0"
- - "iojs-v1.8"
- - "iojs-v1.7"
- - "iojs-v1.6"
- - "iojs-v1.5"
- - "iojs-v1.4"
- - "iojs-v1.3"
- - "iojs-v1.2"
- - "iojs-v1.1"
- - "iojs-v1.0"
- - "0.12"
- - "0.11"
- - "0.10"
- - "0.9"
- - "0.8"
- - "0.6"
- - "0.4"
-before_install:
- - '[ "${TRAVIS_NODE_VERSION}" = "0.6" ] || npm install -g npm@1.4.28 && npm install -g npm'
-sudo: false
-matrix:
- fast_finish: true
- allow_failures:
- - node_js: "4.1"
- - node_js: "4.0"
- - node_js: "iojs-v3.2"
- - node_js: "iojs-v3.1"
- - node_js: "iojs-v3.0"
- - node_js: "iojs-v2.4"
- - node_js: "iojs-v2.3"
- - node_js: "iojs-v2.2"
- - node_js: "iojs-v2.1"
- - node_js: "iojs-v2.0"
- - node_js: "iojs-v1.7"
- - node_js: "iojs-v1.6"
- - node_js: "iojs-v1.5"
- - node_js: "iojs-v1.4"
- - node_js: "iojs-v1.3"
- - node_js: "iojs-v1.2"
- - node_js: "iojs-v1.1"
- - node_js: "iojs-v1.0"
- - node_js: "0.11"
- - node_js: "0.9"
- - node_js: "0.8"
- - node_js: "0.6"
- - node_js: "0.4"
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/CHANGELOG.md b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/CHANGELOG.md
deleted file mode 100644
index 3c43ab6493..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/CHANGELOG.md
+++ /dev/null
@@ -1,203 +0,0 @@
-1.0.9 / 2015-10-19
-=================
- * [Fix] Blacklist 'frame' property on window (#16, #17)
- * [Dev Deps] update `jscs`, `eslint`, `@ljharb/eslint-config`
-
-1.0.8 / 2015-10-14
-=================
- * [Fix] wrap automation equality bug checking in try/catch, per [es5-shim#327](https://github.com/es-shims/es5-shim/issues/327)
- * [Fix] Blacklist 'window.frameElement' per [es5-shim#322](https://github.com/es-shims/es5-shim/issues/322)
- * [Docs] Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG
- * [Tests] up to `io.js` `v3.3`, `node` `v4.2`
- * [Dev Deps] update `eslint`, `tape`, `@ljharb/eslint-config`, `jscs`
-
-1.0.7 / 2015-07-18
-=================
- * [Fix] A proper fix for 176f03335e90d5c8d0d8125a99f27819c9b9cdad / https://github.com/es-shims/es5-shim/issues/275 that doesn't break dontEnum/constructor fixes in IE 8.
- * [Fix] Remove deprecation message in Chrome by touching deprecated window properties (#15)
- * [Tests] Improve test output for automation equality bugfix
- * [Tests] Test on `io.js` `v2.4`
-
-1.0.6 / 2015-07-09
-=================
- * [Fix] Use an object lookup rather than ES5's `indexOf` (#14)
- * [Tests] ES3 browsers don't have `Array.isArray`
- * [Tests] Fix `no-shadow` rule, as well as an IE 8 bug caused by engine NFE shadowing bugs.
-
-1.0.5 / 2015-07-03
-=================
- * [Fix] Fix a flabbergasting IE 8 bug where `localStorage.constructor.prototype === localStorage` throws
- * [Tests] Test up to `io.js` `v2.3`
- * [Dev Deps] Update `nsp`, `eslint`
-
-1.0.4 / 2015-05-23
-=================
- * Fix a Safari 5.0 bug with `Object.keys` not working with `arguments`
- * Test on latest `node` and `io.js`
- * Update `jscs`, `tape`, `eslint`, `nsp`, `is`, `editorconfig-tools`, `covert`
-
-1.0.3 / 2015-01-06
-=================
- * Revert "Make `object-keys` more robust against later environment tampering" to maintain ES3 compliance
-
-1.0.2 / 2014-12-28
-=================
- * Update lots of dev dependencies
- * Tweaks to README
- * Make `object-keys` more robust against later environment tampering
-
-1.0.1 / 2014-09-03
-=================
- * Update URLs and badges in README
-
-1.0.0 / 2014-08-26
-=================
- * v1.0.0
-
-0.6.1 / 2014-08-25
-=================
- * v0.6.1
- * Updating dependencies (tape, covert, is)
- * Update badges in readme
- * Use separate var statements
-
-0.6.0 / 2014-04-23
-=================
- * v0.6.0
- * Updating dependencies (tape, covert)
- * Make sure boxed primitives, and arguments objects, work properly in ES3 browsers
- * Improve test matrix: test all node versions, but only latest two stables are a failure
- * Remove internal foreach shim.
-
-0.5.1 / 2014-03-09
-=================
- * 0.5.1
- * Updating dependencies (tape, covert, is)
- * Removing forEach from the module (but keeping it in tests)
-
-0.5.0 / 2014-01-30
-=================
- * 0.5.0
- * Explicitly returning the shim, instead of returning native Object.keys when present
- * Adding a changelog.
- * Cleaning up IIFE wrapping
- * Testing on node 0.4 through 0.11
-
-0.4.0 / 2013-08-14
-==================
-
- * v0.4.0
- * In Chrome 4-10 and Safari 4, typeof (new RegExp) === 'function'
- * If it's a string, make sure to use charAt instead of brackets.
- * Only use Function#call if necessary.
- * Making sure the context tests actually run.
- * Better function detection
- * Adding the android browser
- * Fixing testling files
- * Updating tape
- * Removing the "is" dependency.
- * Making an isArguments shim.
- * Adding a local forEach shim and tests.
- * Updating paths.
- * Moving the shim test.
- * v0.3.0
-
-0.3.0 / 2013-05-18
-==================
-
- * README tweak.
- * Fixing constructor enum issue. Fixes [#5](https://github.com/ljharb/object-keys/issues/5).
- * Adding a test for [#5](https://github.com/ljharb/object-keys/issues/5)
- * Updating readme.
- * Updating dependencies.
- * Giving credit to lodash.
- * Make sure that a prototype's constructor property is not enumerable. Fixes [#3](https://github.com/ljharb/object-keys/issues/3).
- * Adding additional tests to handle arguments objects, and to skip "prototype" in functions. Fixes [#2](https://github.com/ljharb/object-keys/issues/2).
- * Fixing a typo on this test for [#3](https://github.com/ljharb/object-keys/issues/3).
- * Adding node 0.10 to travis.
- * Adding an IE < 9 test per [#3](https://github.com/ljharb/object-keys/issues/3)
- * Adding an iOS 5 mobile Safari test per [#2](https://github.com/ljharb/object-keys/issues/2)
- * Moving "indexof" and "is" to be dev dependencies.
- * Making sure the shim works with functions.
- * Flattening the tests.
-
-0.2.0 / 2013-05-10
-==================
-
- * v0.2.0
- * Object.keys should work with arrays.
-
-0.1.8 / 2013-05-10
-==================
-
- * v0.1.8
- * Upgrading dependencies.
- * Using a simpler check.
- * Fixing a bug in hasDontEnumBug browsers.
- * Using the newest tape!
- * Fixing this error test.
- * "undefined" is probably a reserved word in ES3.
- * Better test message.
-
-0.1.7 / 2013-04-17
-==================
-
- * Upgrading "is" once more.
- * The key "null" is breaking some browsers.
-
-0.1.6 / 2013-04-17
-==================
-
- * v0.1.6
- * Upgrading "is"
-
-0.1.5 / 2013-04-14
-==================
-
- * Bumping version.
- * Adding more testling browsers.
- * Updating "is"
-
-0.1.4 / 2013-04-08
-==================
-
- * Using "is" instead of "is-extended".
-
-0.1.3 / 2013-04-07
-==================
-
- * Using "foreach" instead of my own shim.
- * Removing "tap"; I'll just wait for "tape" to fix its node 0.10 bug.
-
-0.1.2 / 2013-04-03
-==================
-
- * Adding dependency status; moving links to an index at the bottom.
- * Upgrading is-extended; version 0.1.2
- * Adding an npm version badge.
-
-0.1.1 / 2013-04-01
-==================
-
- * Adding Travis CI.
- * Bumping the version.
- * Adding indexOf since IE sucks.
- * Adding a forEach shim since older browsers don't have Array#forEach.
- * Upgrading tape - 0.3.2 uses Array#map
- * Using explicit end instead of plan.
- * Can't test with Array.isArray in older browsers.
- * Using is-extended.
- * Fixing testling files.
- * JSHint/JSLint-ing.
- * Removing an unused object.
- * Using strict mode.
-
-0.1.0 / 2013-03-30
-==================
-
- * Changing the exports should have meant a higher version bump.
- * Oops, fixing the repo URL.
- * Adding more tests.
- * 0.0.2
- * Merge branch 'export_one_thing'; closes [#1](https://github.com/ljharb/object-keys/issues/1)
- * Move shim export to a separate file.
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/LICENSE b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/LICENSE
deleted file mode 100644
index 28553fdd06..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (C) 2013 Jordan Harband
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/README.md b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/README.md
deleted file mode 100644
index dbcf1a8c3d..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/README.md
+++ /dev/null
@@ -1,75 +0,0 @@
-#object-keys <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
-
-[![Build Status][travis-svg]][travis-url]
-[![dependency status][deps-svg]][deps-url]
-[![dev dependency status][dev-deps-svg]][dev-deps-url]
-[![License][license-image]][license-url]
-[![Downloads][downloads-image]][downloads-url]
-
-[![npm badge][npm-badge-png]][package-url]
-
-[![browser support][testling-svg]][testling-url]
-
-An Object.keys shim. Invoke its "shim" method to shim Object.keys if it is unavailable.
-
-Most common usage:
-```js
-var keys = Object.keys || require('object-keys');
-```
-
-## Example
-
-```js
-var keys = require('object-keys');
-var assert = require('assert');
-var obj = {
- a: true,
- b: true,
- c: true
-};
-
-assert.deepEqual(keys(obj), ['a', 'b', 'c']);
-```
-
-```js
-var keys = require('object-keys');
-var assert = require('assert');
-/* when Object.keys is not present */
-delete Object.keys;
-var shimmedKeys = keys.shim();
-assert.equal(shimmedKeys, keys);
-assert.deepEqual(Object.keys(obj), keys(obj));
-```
-
-```js
-var keys = require('object-keys');
-var assert = require('assert');
-/* when Object.keys is present */
-var shimmedKeys = keys.shim();
-assert.equal(shimmedKeys, Object.keys);
-assert.deepEqual(Object.keys(obj), keys(obj));
-```
-
-## Source
-Implementation taken directly from [es5-shim][es5-shim-url], with modifications, including from [lodash][lodash-url].
-
-## Tests
-Simply clone the repo, `npm install`, and run `npm test`
-
-[package-url]: https://npmjs.org/package/object-keys
-[npm-version-svg]: http://versionbadg.es/ljharb/object-keys.svg
-[travis-svg]: https://travis-ci.org/ljharb/object-keys.svg
-[travis-url]: https://travis-ci.org/ljharb/object-keys
-[deps-svg]: https://david-dm.org/ljharb/object-keys.svg
-[deps-url]: https://david-dm.org/ljharb/object-keys
-[dev-deps-svg]: https://david-dm.org/ljharb/object-keys/dev-status.svg
-[dev-deps-url]: https://david-dm.org/ljharb/object-keys#info=devDependencies
-[testling-svg]: https://ci.testling.com/ljharb/object-keys.png
-[testling-url]: https://ci.testling.com/ljharb/object-keys
-[es5-shim-url]: https://github.com/es-shims/es5-shim/blob/master/es5-shim.js#L542-589
-[lodash-url]: https://github.com/lodash/lodash
-[npm-badge-png]: https://nodei.co/npm/object-keys.png?downloads=true&stars=true
-[license-image]: http://img.shields.io/npm/l/object-keys.svg
-[license-url]: LICENSE
-[downloads-image]: http://img.shields.io/npm/dm/object-keys.svg
-[downloads-url]: http://npm-stat.com/charts.html?package=object-keys
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/index.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/index.js
deleted file mode 100644
index d3fcaeeb5c..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/index.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-
-// modified from https://github.com/es-shims/es5-shim
-var has = Object.prototype.hasOwnProperty;
-var toStr = Object.prototype.toString;
-var slice = Array.prototype.slice;
-var isArgs = require('./isArguments');
-var hasDontEnumBug = !({ toString: null }).propertyIsEnumerable('toString');
-var hasProtoEnumBug = function () {}.propertyIsEnumerable('prototype');
-var dontEnums = [
- 'toString',
- 'toLocaleString',
- 'valueOf',
- 'hasOwnProperty',
- 'isPrototypeOf',
- 'propertyIsEnumerable',
- 'constructor'
-];
-var equalsConstructorPrototype = function (o) {
- var ctor = o.constructor;
- return ctor && ctor.prototype === o;
-};
-var blacklistedKeys = {
- $console: true,
- $frame: true,
- $frameElement: true,
- $frames: true,
- $parent: true,
- $self: true,
- $webkitIndexedDB: true,
- $webkitStorageInfo: true,
- $window: true
-};
-var hasAutomationEqualityBug = (function () {
- /* global window */
- if (typeof window === 'undefined') { return false; }
- for (var k in window) {
- try {
- if (!blacklistedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
- try {
- equalsConstructorPrototype(window[k]);
- } catch (e) {
- return true;
- }
- }
- } catch (e) {
- return true;
- }
- }
- return false;
-}());
-var equalsConstructorPrototypeIfNotBuggy = function (o) {
- /* global window */
- if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
- return equalsConstructorPrototype(o);
- }
- try {
- return equalsConstructorPrototype(o);
- } catch (e) {
- return false;
- }
-};
-
-var keysShim = function keys(object) {
- var isObject = object !== null && typeof object === 'object';
- var isFunction = toStr.call(object) === '[object Function]';
- var isArguments = isArgs(object);
- var isString = isObject && toStr.call(object) === '[object String]';
- var theKeys = [];
-
- if (!isObject && !isFunction && !isArguments) {
- throw new TypeError('Object.keys called on a non-object');
- }
-
- var skipProto = hasProtoEnumBug && isFunction;
- if (isString && object.length > 0 && !has.call(object, 0)) {
- for (var i = 0; i < object.length; ++i) {
- theKeys.push(String(i));
- }
- }
-
- if (isArguments && object.length > 0) {
- for (var j = 0; j < object.length; ++j) {
- theKeys.push(String(j));
- }
- } else {
- for (var name in object) {
- if (!(skipProto && name === 'prototype') && has.call(object, name)) {
- theKeys.push(String(name));
- }
- }
- }
-
- if (hasDontEnumBug) {
- var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
-
- for (var k = 0; k < dontEnums.length; ++k) {
- if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
- theKeys.push(dontEnums[k]);
- }
- }
- }
- return theKeys;
-};
-
-keysShim.shim = function shimObjectKeys() {
- if (Object.keys) {
- var keysWorksWithArguments = (function () {
- // Safari 5.0 bug
- return (Object.keys(arguments) || '').length === 2;
- }(1, 2));
- if (!keysWorksWithArguments) {
- var originalKeys = Object.keys;
- Object.keys = function keys(object) {
- if (isArgs(object)) {
- return originalKeys(slice.call(object));
- } else {
- return originalKeys(object);
- }
- };
- }
- } else {
- Object.keys = keysShim;
- }
- return Object.keys || keysShim;
-};
-
-module.exports = keysShim;
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/isArguments.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/isArguments.js
deleted file mode 100644
index f2a2a9014d..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/isArguments.js
+++ /dev/null
@@ -1,17 +0,0 @@
-'use strict';
-
-var toStr = Object.prototype.toString;
-
-module.exports = function isArguments(value) {
- var str = toStr.call(value);
- var isArgs = str === '[object Arguments]';
- if (!isArgs) {
- isArgs = str !== '[object Array]' &&
- value !== null &&
- typeof value === 'object' &&
- typeof value.length === 'number' &&
- value.length >= 0 &&
- toStr.call(value.callee) === '[object Function]';
- }
- return isArgs;
-};
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/package.json b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/package.json
deleted file mode 100644
index 689005eab0..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/package.json
+++ /dev/null
@@ -1,141 +0,0 @@
-{
- "_args": [
- [
- "object-keys@^1.0.6",
- "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel"
- ]
- ],
- "_from": "object-keys@>=1.0.6 <2.0.0",
- "_id": "object-keys@1.0.9",
- "_inCache": true,
- "_installable": true,
- "_location": "/readable-stream/inline-process-browser/falafel/object-keys",
- "_nodeVersion": "4.2.1",
- "_npmUser": {
- "email": "ljharb@gmail.com",
- "name": "ljharb"
- },
- "_npmVersion": "2.14.7",
- "_phantomChildren": {},
- "_requested": {
- "name": "object-keys",
- "raw": "object-keys@^1.0.6",
- "rawSpec": "^1.0.6",
- "scope": null,
- "spec": ">=1.0.6 <2.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/readable-stream/inline-process-browser/falafel"
- ],
- "_resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.9.tgz",
- "_shasum": "cabb1202d9a7af29b50edface8094bb46da5ea21",
- "_shrinkwrap": null,
- "_spec": "object-keys@^1.0.6",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel",
- "author": {
- "email": "ljharb@gmail.com",
- "name": "Jordan Harband",
- "url": "http://ljharb.codes"
- },
- "bugs": {
- "url": "https://github.com/ljharb/object-keys/issues"
- },
- "contributors": [
- {
- "email": "ljharb@gmail.com",
- "name": "Jordan Harband",
- "url": "http://ljharb.codes"
- },
- {
- "email": "raynos2@gmail.com",
- "name": "Raynos"
- },
- {
- "email": "nathan@tootallnate.net",
- "name": "Nathan Rajlich"
- },
- {
- "email": "istarkov@gmail.com",
- "name": "Ivan Starkov"
- },
- {
- "email": "git@gkatsev.com",
- "name": "Gary Katsevman"
- }
- ],
- "dependencies": {},
- "description": "An Object.keys replacement, in case Object.keys is not available. From https://github.com/es-shims/es5-shim",
- "devDependencies": {
- "@ljharb/eslint-config": "^1.4.1",
- "covert": "^1.1.0",
- "editorconfig-tools": "^0.1.1",
- "eslint": "^1.7.2",
- "foreach": "^2.0.5",
- "indexof": "^0.0.1",
- "is": "^3.1.0",
- "jscs": "^2.3.4",
- "nsp": "^1.1.0",
- "tape": "^4.2.1"
- },
- "directories": {},
- "dist": {
- "shasum": "cabb1202d9a7af29b50edface8094bb46da5ea21",
- "tarball": "http://registry.npmjs.org/object-keys/-/object-keys-1.0.9.tgz"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "gitHead": "e4331f920ff49824ad999b3449005349e31139f9",
- "homepage": "https://github.com/ljharb/object-keys#readme",
- "keywords": [
- "Object.keys",
- "keys",
- "ES5",
- "shim"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "email": "ljharb@gmail.com",
- "name": "ljharb"
- }
- ],
- "name": "object-keys",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/ljharb/object-keys.git"
- },
- "scripts": {
- "coverage": "covert test/*.js",
- "coverage-quiet": "covert test/*.js --quiet",
- "eccheck": "editorconfig-tools check *.js **/*.js > /dev/null",
- "eslint": "eslint test/*.js *.js",
- "jscs": "jscs test/*.js *.js",
- "lint": "npm run jscs && npm run eslint",
- "security": "nsp package",
- "test": "npm run lint && node test/index.js && npm run security"
- },
- "testling": {
- "browsers": [
- "iexplore/6.0..latest",
- "firefox/3.0..6.0",
- "firefox/15.0..latest",
- "firefox/nightly",
- "chrome/4.0..10.0",
- "chrome/20.0..latest",
- "chrome/canary",
- "opera/10.0..latest",
- "opera/next",
- "safari/4.0..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest",
- "android-browser/4.2"
- ],
- "files": "test/index.js"
- },
- "version": "1.0.9"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/test/index.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/test/index.js
deleted file mode 100644
index 5402465a19..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/node_modules/object-keys/test/index.js
+++ /dev/null
@@ -1,5 +0,0 @@
-'use strict';
-
-require('./isArguments');
-
-require('./shim');
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/package.json b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/package.json
deleted file mode 100644
index f2a729285c..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/package.json
+++ /dev/null
@@ -1,137 +0,0 @@
-{
- "_args": [
- [
- "falafel@^1.0.1",
- "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser"
- ]
- ],
- "_from": "falafel@>=1.0.1 <2.0.0",
- "_id": "falafel@1.2.0",
- "_inCache": true,
- "_installable": true,
- "_location": "/readable-stream/inline-process-browser/falafel",
- "_nodeVersion": "2.0.0",
- "_npmUser": {
- "email": "substack@gmail.com",
- "name": "substack"
- },
- "_npmVersion": "3.0.0",
- "_phantomChildren": {},
- "_requested": {
- "name": "falafel",
- "raw": "falafel@^1.0.1",
- "rawSpec": "^1.0.1",
- "scope": null,
- "spec": ">=1.0.1 <2.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/readable-stream/inline-process-browser"
- ],
- "_resolved": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz",
- "_shasum": "c18d24ef5091174a497f318cd24b026a25cddab4",
- "_shrinkwrap": null,
- "_spec": "falafel@^1.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser",
- "author": {
- "email": "mail@substack.net",
- "name": "James Halliday",
- "url": "http://substack.net"
- },
- "bugs": {
- "url": "https://github.com/substack/node-falafel/issues"
- },
- "dependencies": {
- "acorn": "^1.0.3",
- "foreach": "^2.0.5",
- "isarray": "0.0.1",
- "object-keys": "^1.0.6"
- },
- "description": "transform the ast on a recursive walk",
- "devDependencies": {
- "acorn-jsx": "^2.0.0",
- "covert": "^1.1.0",
- "tape": "^4.0.0"
- },
- "directories": {
- "example": "example",
- "test": "test"
- },
- "dist": {
- "shasum": "c18d24ef5091174a497f318cd24b026a25cddab4",
- "tarball": "https://registry.npmjs.org/falafel/-/falafel-1.2.0.tgz"
- },
- "engines": {
- "node": ">=0.4.0"
- },
- "gitHead": "75c91298fbc94d22b225f2d0866d14395faf5986",
- "homepage": "https://github.com/substack/node-falafel#readme",
- "keywords": [
- "ast",
- "burrito",
- "source",
- "syntax",
- "traversal",
- "tree"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "email": "mail@substack.net",
- "name": "substack"
- },
- {
- "email": "npm@0x7f.us",
- "name": "bobthecow"
- },
- {
- "email": "nanodeath@gmail.com",
- "name": "nanodeath"
- },
- {
- "email": "tom@alltom.com",
- "name": "alltom"
- },
- {
- "email": "eugene@noblesamurai.com",
- "name": "eugeneware"
- }
- ],
- "name": "falafel",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/substack/node-falafel.git"
- },
- "scripts": {
- "coverage": "covert test/*.js",
- "test": "node --harmony test/bin/run.js test/*.js"
- },
- "testling": {
- "browsers": {
- "chrome": [
- "20.0"
- ],
- "firefox": [
- "10.0",
- "15.0"
- ],
- "iexplore": [
- "6.0",
- "7.0",
- "8.0",
- "9.0"
- ],
- "opera": [
- "12.0"
- ],
- "safari": [
- "5.1"
- ]
- },
- "files": "test/*.js"
- },
- "version": "1.2.0"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/readme.markdown b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/readme.markdown
deleted file mode 100644
index 3f58132070..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/readme.markdown
+++ /dev/null
@@ -1,122 +0,0 @@
-# falafel
-
-Transform the [ast](http://en.wikipedia.org/wiki/Abstract_syntax_tree) on a
-recursive walk.
-
-[![browser support](http://ci.testling.com/substack/node-falafel.png)](http://ci.testling.com/substack/node-falafel)
-
-[![build status](https://secure.travis-ci.org/substack/node-falafel.png)](http://travis-ci.org/substack/node-falafel)
-
-This modules uses [acorn](https://npmjs.org/package/acorn) to create an AST from
-source code.
-
-![falafel döner](http://substack.net/images/falafel.png)
-
-# example
-
-## array.js
-
-Put a function wrapper around all array literals.
-
-``` js
-var falafel = require('falafel');
-
-var src = '(' + function () {
- var xs = [ 1, 2, [ 3, 4 ] ];
- var ys = [ 5, 6 ];
- console.dir([ xs, ys ]);
-} + ')()';
-
-var output = falafel(src, function (node) {
- if (node.type === 'ArrayExpression') {
- node.update('fn(' + node.source() + ')');
- }
-});
-console.log(output);
-```
-
-output:
-
-```
-(function () {
- var xs = fn([ 1, 2, fn([ 3, 4 ]) ]);
- var ys = fn([ 5, 6 ]);
- console.dir(fn([ xs, ys ]));
-})()
-```
-
-# methods
-
-``` js
-var falafel = require('falafel')
-```
-
-## falafel(src, opts={}, fn)
-
-Transform the string source `src` with the function `fn`, returning a
-string-like transformed output object.
-
-For every node in the ast, `fn(node)` fires. The recursive walk is a
-pre-traversal, so children get called before their parents.
-
-Performing a pre-traversal makes it easier to write nested transforms since
-transforming parents often requires transforming all its children first.
-
-The return value is string-like (it defines `.toString()` and `.inspect()`) so
-that you can call `node.update()` asynchronously after the function has
-returned and still capture the output.
-
-Instead of passing a `src` you can also use `opts.source`.
-
-All of the `opts` will be passed directly to
-[acorn](https://npmjs.org/package/acorn).
-
-## custom parser
-
-You may pass in an instance of acorn to the opts as `opts.parser` to use that
-version instead of the version of acorn packaged with this library.
-
-```js
-var acorn = require('acorn-jsx');
-
-falafel(src, {parser: acorn, plugins: { jsx: true }}, function(node) {
- // this will parse jsx
-});
-```
-
-# nodes
-
-Aside from the regular [esprima](http://esprima.org) data, you can also call
-some inserted methods on nodes.
-
-Aside from updating the current node, you can also reach into sub-nodes to call
-update functions on children from parent nodes.
-
-## node.source()
-
-Return the source for the given node, including any modifications made to
-children nodes.
-
-## node.update(s)
-
-Transform the source for the present node to the string `s`.
-
-Note that in `'ForStatement'` node types, there is an existing subnode called
-`update`. For those nodes all the properties are copied over onto the
-`node.update()` function.
-
-## node.parent
-
-Reference to the parent element or `null` at the root element.
-
-# install
-
-With [npm](http://npmjs.org) do:
-
-```
-npm install falafel
-```
-
-# license
-
-MIT
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/array.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/array.js
deleted file mode 100644
index b5f7491199..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/array.js
+++ /dev/null
@@ -1,35 +0,0 @@
-var falafel = require('../');
-var test = require('tape');
-
-test('array', function (t) {
- t.plan(5);
-
- var src = '(' + function () {
- var xs = [ 1, 2, [ 3, 4 ] ];
- var ys = [ 5, 6 ];
- g([ xs, ys ]);
- } + ')()';
-
- var output = falafel(src, function (node) {
- if (node.type === 'ArrayExpression') {
- node.update('fn(' + node.source() + ')');
- }
- });
-
- var arrays = [
- [ 3, 4 ],
- [ 1, 2, [ 3, 4 ] ],
- [ 5, 6 ],
- [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ],
- ];
-
- Function(['fn','g'], output)(
- function (xs) {
- t.same(arrays.shift(), xs);
- return xs;
- },
- function (xs) {
- t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]);
- }
- );
-});
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/async.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/async.js
deleted file mode 100644
index 2887894898..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/async.js
+++ /dev/null
@@ -1,42 +0,0 @@
-var falafel = require('../');
-var test = require('tape');
-
-test('array', function (t) {
- t.plan(5);
-
- var src = '(function () {'
- + 'var xs = [ 1, 2, [ 3, 4 ] ];'
- + 'var ys = [ 5, 6 ];'
- + 'g([ xs, ys ]);'
- + '})()';
-
- var pending = 0;
- var output = falafel(src, function (node) {
- if (node.type === 'ArrayExpression') {
- pending ++;
- setTimeout(function () {
- node.update('fn(' + node.source() + ')');
- if (--pending === 0) check();
- }, 50 * pending * 2);
- }
- });
-
- var arrays = [
- [ 3, 4 ],
- [ 1, 2, [ 3, 4 ] ],
- [ 5, 6 ],
- [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ],
- ];
-
- function check () {
- Function([ 'fn', 'g' ], output)(
- function (xs) {
- t.same(arrays.shift(), xs);
- return xs;
- },
- function (xs) {
- t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]);
- }
- );
- }
-});
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/bin/run.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/bin/run.js
deleted file mode 100755
index 0582075564..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/bin/run.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var path = require('path');
-
-for (var i = 2; i < process.argv.length; i++) {
- require(path.resolve(process.cwd(), process.argv[i]));
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/custom-parser.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/custom-parser.js
deleted file mode 100644
index 2ae09eca75..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/custom-parser.js
+++ /dev/null
@@ -1,42 +0,0 @@
-var falafel = require('../');
-var acorn = require('acorn-jsx');
-var test = require('tape');
-
-test('custom parser', function (t) {
-
- var src = '(function() { var f = {a: "b"}; var a = <div {...f} className="test"></div>; })()';
-
- var nodeTypes = [
- 'Identifier',
- 'Identifier',
- 'Literal',
- 'Property',
- 'ObjectExpression',
- 'VariableDeclarator',
- 'VariableDeclaration',
- 'Identifier',
- 'Identifier',
- 'JSXSpreadAttribute',
- 'JSXIdentifier',
- 'Literal',
- 'JSXAttribute',
- 'JSXIdentifier',
- 'JSXOpeningElement',
- 'JSXIdentifier',
- 'JSXClosingElement',
- 'JSXElement',
- 'VariableDeclarator',
- 'VariableDeclaration',
- 'BlockStatement',
- 'FunctionExpression',
- 'CallExpression',
- 'ExpressionStatement',
- 'Program'
- ];
-
- t.plan(nodeTypes.length);
-
- var output = falafel(src, {parser: acorn, ecmaVersion: 6, plugins: { jsx: true }}, function(node) {
- t.equal(node.type, nodeTypes.shift());
- });
-});
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/es6.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/es6.js
deleted file mode 100644
index d9a06dcbfa..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/es6.js
+++ /dev/null
@@ -1,15 +0,0 @@
-var falafel = require('../');
-var test = require('tape');
-
-test('generators', function (t) {
- t.plan(1);
-
- var src = 'console.log((function * () { yield 3 })().next().value)';
- var output = falafel(src, { ecmaVersion: 6 }, function (node) {
- if (node.type === 'Literal') {
- node.update('555');
- }
- });
- Function(['console'],output)({log:log});
- function log (n) { t.equal(n, 555) }
-});
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/for.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/for.js
deleted file mode 100644
index e5e230e137..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/for.js
+++ /dev/null
@@ -1,30 +0,0 @@
-var falafel = require('../');
-var test = require('tape');
-
-test('for loop', function (t) {
- t.plan(7);
-
- var src = '(function () {'
- + 'var sum = 0;'
- + 'for (var i = 0; i < 10; i++)'
- + 'sum += i;'
- + 'if (true)'
- + 'for (var i = 0; i < 10; i++)'
- + 'sum += i;'
- + 'return sum;'
- + '})()';
-
- var output = falafel(src, function (node) {
- if (node.type === 'ForStatement') {
- t.equal(node.update.source(), 'i++');
- t.equal(node.update.type, "UpdateExpression");
- node.update.update('i+=2');
- }
- if (node.type === 'UpdateExpression') {
- t.equal(node.source(), 'i++');
- }
- });
-
- var res = Function('return ' + output)();
- t.equal(res, 2 + 4 + 6 + 8 + 2 + 4 + 6 + 8);
-});
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/inspect.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/inspect.js
deleted file mode 100644
index c385d74f8a..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/inspect.js
+++ /dev/null
@@ -1,36 +0,0 @@
-var falafel = require('../');
-var test = require('tape');
-
-test('inspect', function (t) {
- t.plan(6);
-
- var src = '(function () {'
- + 'var xs = [ 1, 2, [ 3, 4 ] ];'
- + 'var ys = [ 5, 6 ];'
- + 'g([ xs, ys ]);'
- + '})()';
-
- var output = falafel(src, function (node) {
- if (node.type === 'ArrayExpression') {
- node.update('fn(' + node.source() + ')');
- }
- });
- t.equal(output.inspect(), output.toString());
-
- var arrays = [
- [ 3, 4 ],
- [ 1, 2, [ 3, 4 ] ],
- [ 5, 6 ],
- [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ],
- ];
-
- Function(['fn','g'], output)(
- function (xs) {
- t.same(arrays.shift(), xs);
- return xs;
- },
- function (xs) {
- t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]);
- }
- );
-});
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/opts.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/opts.js
deleted file mode 100644
index b10e0cf095..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/opts.js
+++ /dev/null
@@ -1,134 +0,0 @@
-var falafel = require('../');
-var test = require('tape');
-
-test('first opts arg', function (t) {
- t.plan(5);
-
- var src = '(function () {'
- + 'var xs = [ 1, 2, [ 3, 4 ] ];'
- + 'var ys = [ 5, 6 ];'
- + 'g([ xs, ys ]);'
- + '})()';
-
- var output = falafel({ source: src }, function (node) {
- if (node.type === 'ArrayExpression') {
- node.update('fn(' + node.source() + ')');
- }
- });
-
- var arrays = [
- [ 3, 4 ],
- [ 1, 2, [ 3, 4 ] ],
- [ 5, 6 ],
- [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ],
- ];
-
- Function(['fn','g'], output)(
- function (xs) {
- t.same(arrays.shift(), xs);
- return xs;
- },
- function (xs) {
- t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]);
- }
- );
-});
-
-test('opts.source', function (t) {
- t.plan(5);
-
- var src = '(function () {'
- + 'var xs = [ 1, 2, [ 3, 4 ] ];'
- + 'var ys = [ 5, 6 ];'
- + 'g([ xs, ys ]);'
- + '})()';
-
- var output = falafel(undefined, { source: src }, function (node) {
- if (node.type === 'ArrayExpression') {
- node.update('fn(' + node.source() + ')');
- }
- });
-
- var arrays = [
- [ 3, 4 ],
- [ 1, 2, [ 3, 4 ] ],
- [ 5, 6 ],
- [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ],
- ];
-
- Function(['fn','g'], output)(
- function (xs) {
- t.same(arrays.shift(), xs);
- return xs;
- },
- function (xs) {
- t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]);
- }
- );
-});
-
-test('Buffer opts.source', function (t) {
- t.plan(5);
-
- var src = Buffer('(function () {'
- + 'var xs = [ 1, 2, [ 3, 4 ] ];'
- + 'var ys = [ 5, 6 ];'
- + 'g([ xs, ys ]);'
- + '})()');
-
- var output = falafel({ source: src }, function (node) {
- if (node.type === 'ArrayExpression') {
- node.update('fn(' + node.source() + ')');
- }
- });
-
- var arrays = [
- [ 3, 4 ],
- [ 1, 2, [ 3, 4 ] ],
- [ 5, 6 ],
- [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ],
- ];
-
- Function(['fn','g'], output)(
- function (xs) {
- t.same(arrays.shift(), xs);
- return xs;
- },
- function (xs) {
- t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]);
- }
- );
-});
-
-test('Buffer source', function (t) {
- t.plan(5);
-
- var src = Buffer('(function () {'
- + 'var xs = [ 1, 2, [ 3, 4 ] ];'
- + 'var ys = [ 5, 6 ];'
- + 'g([ xs, ys ]);'
- + '})()');
-
- var output = falafel(src, function (node) {
- if (node.type === 'ArrayExpression') {
- node.update('fn(' + node.source() + ')');
- }
- });
-
- var arrays = [
- [ 3, 4 ],
- [ 1, 2, [ 3, 4 ] ],
- [ 5, 6 ],
- [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ],
- ];
-
- Function(['fn','g'], output)(
- function (xs) {
- t.same(arrays.shift(), xs);
- return xs;
- },
- function (xs) {
- t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]);
- }
- );
-});
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/parent.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/parent.js
deleted file mode 100644
index 8e787360ad..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/falafel/test/parent.js
+++ /dev/null
@@ -1,33 +0,0 @@
-var falafel = require('../');
-var test = require('tape');
-
-test('parent', function (t) {
- t.plan(5);
-
- var src = '(function () {'
- + 'var xs = [ 1, 2, 3 ];'
- + 'fn(ys);'
- + '})()';
-
- var output = falafel(src, function (node) {
- if (node.type === 'ArrayExpression') {
- t.equal(node.parent.type, 'VariableDeclarator');
- t.equal(
- ffBracket(node.parent.source()),
- 'xs = [ 1, 2, 3 ]'
- );
- t.equal(node.parent.parent.type, 'VariableDeclaration');
- t.equal(
- ffBracket(node.parent.parent.source()),
- 'var xs = [ 1, 2, 3 ];'
- );
- node.parent.update('ys = 4;');
- }
- });
-
- Function(['fn'], output)(function (x) { t.equal(x, 4) });
-});
-
-function ffBracket (s) {
- return s.replace(/\[\s*/, '[ ').replace(/\s*\]/, ' ]');
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/.npmignore b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/.npmignore
deleted file mode 100644
index 1e1dcab34c..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-test
-.jshintrc
-.travis.yml \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/LICENSE b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/LICENSE
deleted file mode 100644
index f6a0029de1..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/LICENSE
+++ /dev/null
@@ -1,39 +0,0 @@
-Copyright 2013, Rod Vagg (the "Original Author")
-All rights reserved.
-
-MIT +no-false-attribs License
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-Distributions of all or part of the Software intended to be used
-by the recipients as they would use the unmodified Software,
-containing modifications that substantially alter, remove, or
-disable functionality of the Software, outside of the documented
-configuration mechanisms provided by the Software, shall be
-modified such that the Original Author's bug reporting email
-addresses and urls are either replaced with the contact information
-of the parties responsible for the changes, or removed entirely.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-
-Except where noted, this license applies to any and all software
-programs and associated documentation files created by the
-Original Author, when distributed with the Software. \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/README.md b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/README.md
deleted file mode 100644
index 11259a5f71..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/README.md
+++ /dev/null
@@ -1,132 +0,0 @@
-# through2
-
-[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/)
-
-**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**
-
-Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.
-
-Note: A **Streams3** version of through2 is available in npm with the tag `"1.0"` rather than `"latest"` so an `npm install through2` will get you the current Streams2 version (version number is 0.x.x). To use a Streams3 version use `npm install through2@1` to fetch the latest version 1.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**.
-
-```js
-fs.createReadStream('ex.txt')
- .pipe(through2(function (chunk, enc, callback) {
- for (var i = 0; i < chunk.length; i++)
- if (chunk[i] == 97)
- chunk[i] = 122 // swap 'a' for 'z'
-
- this.push(chunk)
-
- callback()
- }))
- .pipe(fs.createWriteStream('out.txt'))
-```
-
-Or object streams:
-
-```js
-var all = []
-
-fs.createReadStream('data.csv')
- .pipe(csv2())
- .pipe(through2.obj(function (chunk, enc, callback) {
- var data = {
- name : chunk[0]
- , address : chunk[3]
- , phone : chunk[10]
- }
- this.push(data)
-
- callback()
- }))
- .on('data', function (data) {
- all.push(data)
- })
- .on('end', function () {
- doSomethingSpecial(all)
- })
-```
-
-Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.
-
-## API
-
-<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>
-
-Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).
-
-### options
-
-The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).
-
-The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:
-
-```js
-fs.createReadStream('/tmp/important.dat')
- .pipe(through2({ objectMode: true, allowHalfOpen: false },
- function (chunk, enc, cb) {
- cb(null, 'wut?') // note we can use the second argument on the callback
- // to provide data as an alternative to this.push('wut?')
- }
- )
- .pipe(fs.createWriteStream('/tmp/wut.txt'))
-```
-
-### transformFunction
-
-The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.
-
-To queue a new chunk, call `this.push(chunk)`&mdash;this can be called as many times as required before the `callback()` if you have multiple pieces to send on.
-
-Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error.
-
-If you **do not provide a `transformFunction`** then you will get a simple pass-through stream.
-
-### flushFunction
-
-The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.
-
-```js
-fs.createReadStream('/tmp/important.dat')
- .pipe(through2(
- function (chunk, enc, cb) { cb(null, chunk) }, // transform is a noop
- function (cb) { // flush function
- this.push('tacking on an extra buffer to the end');
- cb();
- }
- ))
- .pipe(fs.createWriteStream('/tmp/wut.txt'));
-```
-
-<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>
-
-Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.
-
-```js
-var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {
- if (record.temp != null && record.unit = "F") {
- record.temp = ( ( record.temp - 32 ) * 5 ) / 9
- record.unit = "C"
- }
- this.push(record)
- callback()
-})
-
-// Create instances of FToC like so:
-var converter = new FToC()
-// Or:
-var converter = FToC()
-// Or specify/override options when you instantiate, if you prefer:
-var converter = FToC({objectMode: true})
-```
-
-## See Also
-
- - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams.
- - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams.
- - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams.
- - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies.
-
-## License
-
-**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/.npmignore b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/.npmignore
deleted file mode 100644
index 38344f87a6..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/.npmignore
+++ /dev/null
@@ -1,5 +0,0 @@
-build/
-test/
-examples/
-fs.js
-zlib.js \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/LICENSE b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/LICENSE
deleted file mode 100644
index e3d4e695a4..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/LICENSE
+++ /dev/null
@@ -1,18 +0,0 @@
-Copyright Joyent, Inc. and other Node contributors. All rights reserved.
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to
-deal in the Software without restriction, including without limitation the
-rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-sell copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/README.md b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/README.md
deleted file mode 100644
index 5c455f4205..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# readable-stream
-
-***Node-core streams for userland***
-
-[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)
-[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)
-
-This package is a mirror of the Streams2 and Streams3 implementations in Node-core.
-
-If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core.
-
-**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12.
-
-**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"`
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/duplex.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/duplex.js
deleted file mode 100644
index ca807af876..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/duplex.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_duplex.js")
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js
deleted file mode 100644
index b513d61a96..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_duplex.js
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// a duplex stream is just a stream that is both readable and writable.
-// Since JS doesn't have multiple prototypal inheritance, this class
-// prototypally inherits from Readable, and then parasitically from
-// Writable.
-
-module.exports = Duplex;
-
-/*<replacement>*/
-var objectKeys = Object.keys || function (obj) {
- var keys = [];
- for (var key in obj) keys.push(key);
- return keys;
-}
-/*</replacement>*/
-
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-var Readable = require('./_stream_readable');
-var Writable = require('./_stream_writable');
-
-util.inherits(Duplex, Readable);
-
-forEach(objectKeys(Writable.prototype), function(method) {
- if (!Duplex.prototype[method])
- Duplex.prototype[method] = Writable.prototype[method];
-});
-
-function Duplex(options) {
- if (!(this instanceof Duplex))
- return new Duplex(options);
-
- Readable.call(this, options);
- Writable.call(this, options);
-
- if (options && options.readable === false)
- this.readable = false;
-
- if (options && options.writable === false)
- this.writable = false;
-
- this.allowHalfOpen = true;
- if (options && options.allowHalfOpen === false)
- this.allowHalfOpen = false;
-
- this.once('end', onend);
-}
-
-// the no-half-open enforcer
-function onend() {
- // if we allow half-open state, or if the writable side ended,
- // then we're ok.
- if (this.allowHalfOpen || this._writableState.ended)
- return;
-
- // no more data can be written.
- // But allow more writes to happen in this tick.
- process.nextTick(this.end.bind(this));
-}
-
-function forEach (xs, f) {
- for (var i = 0, l = xs.length; i < l; i++) {
- f(xs[i], i);
- }
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js
deleted file mode 100644
index 895ca50a1d..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_passthrough.js
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// a passthrough stream.
-// basically just the most minimal sort of Transform stream.
-// Every written chunk gets output as-is.
-
-module.exports = PassThrough;
-
-var Transform = require('./_stream_transform');
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-util.inherits(PassThrough, Transform);
-
-function PassThrough(options) {
- if (!(this instanceof PassThrough))
- return new PassThrough(options);
-
- Transform.call(this, options);
-}
-
-PassThrough.prototype._transform = function(chunk, encoding, cb) {
- cb(null, chunk);
-};
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js
deleted file mode 100644
index 630722099e..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js
+++ /dev/null
@@ -1,982 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-module.exports = Readable;
-
-/*<replacement>*/
-var isArray = require('isarray');
-/*</replacement>*/
-
-
-/*<replacement>*/
-var Buffer = require('buffer').Buffer;
-/*</replacement>*/
-
-Readable.ReadableState = ReadableState;
-
-var EE = require('events').EventEmitter;
-
-/*<replacement>*/
-if (!EE.listenerCount) EE.listenerCount = function(emitter, type) {
- return emitter.listeners(type).length;
-};
-/*</replacement>*/
-
-var Stream = require('stream');
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-var StringDecoder;
-
-util.inherits(Readable, Stream);
-
-function ReadableState(options, stream) {
- options = options || {};
-
- // the point at which it stops calling _read() to fill the buffer
- // Note: 0 is a valid value, means "don't call _read preemptively ever"
- var hwm = options.highWaterMark;
- this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024;
-
- // cast to ints.
- this.highWaterMark = ~~this.highWaterMark;
-
- this.buffer = [];
- this.length = 0;
- this.pipes = null;
- this.pipesCount = 0;
- this.flowing = false;
- this.ended = false;
- this.endEmitted = false;
- this.reading = false;
-
- // In streams that never have any data, and do push(null) right away,
- // the consumer can miss the 'end' event if they do some I/O before
- // consuming the stream. So, we don't emit('end') until some reading
- // happens.
- this.calledRead = false;
-
- // a flag to be able to tell if the onwrite cb is called immediately,
- // or on a later tick. We set this to true at first, becuase any
- // actions that shouldn't happen until "later" should generally also
- // not happen before the first write call.
- this.sync = true;
-
- // whenever we return null, then we set a flag to say
- // that we're awaiting a 'readable' event emission.
- this.needReadable = false;
- this.emittedReadable = false;
- this.readableListening = false;
-
-
- // object stream flag. Used to make read(n) ignore n and to
- // make all the buffer merging and length checks go away
- this.objectMode = !!options.objectMode;
-
- // Crypto is kind of old and crusty. Historically, its default string
- // encoding is 'binary' so we have to make this configurable.
- // Everything else in the universe uses 'utf8', though.
- this.defaultEncoding = options.defaultEncoding || 'utf8';
-
- // when piping, we only care about 'readable' events that happen
- // after read()ing all the bytes and not getting any pushback.
- this.ranOut = false;
-
- // the number of writers that are awaiting a drain event in .pipe()s
- this.awaitDrain = 0;
-
- // if true, a maybeReadMore has been scheduled
- this.readingMore = false;
-
- this.decoder = null;
- this.encoding = null;
- if (options.encoding) {
- if (!StringDecoder)
- StringDecoder = require('string_decoder/').StringDecoder;
- this.decoder = new StringDecoder(options.encoding);
- this.encoding = options.encoding;
- }
-}
-
-function Readable(options) {
- if (!(this instanceof Readable))
- return new Readable(options);
-
- this._readableState = new ReadableState(options, this);
-
- // legacy
- this.readable = true;
-
- Stream.call(this);
-}
-
-// Manually shove something into the read() buffer.
-// This returns true if the highWaterMark has not been hit yet,
-// similar to how Writable.write() returns true if you should
-// write() some more.
-Readable.prototype.push = function(chunk, encoding) {
- var state = this._readableState;
-
- if (typeof chunk === 'string' && !state.objectMode) {
- encoding = encoding || state.defaultEncoding;
- if (encoding !== state.encoding) {
- chunk = new Buffer(chunk, encoding);
- encoding = '';
- }
- }
-
- return readableAddChunk(this, state, chunk, encoding, false);
-};
-
-// Unshift should *always* be something directly out of read()
-Readable.prototype.unshift = function(chunk) {
- var state = this._readableState;
- return readableAddChunk(this, state, chunk, '', true);
-};
-
-function readableAddChunk(stream, state, chunk, encoding, addToFront) {
- var er = chunkInvalid(state, chunk);
- if (er) {
- stream.emit('error', er);
- } else if (chunk === null || chunk === undefined) {
- state.reading = false;
- if (!state.ended)
- onEofChunk(stream, state);
- } else if (state.objectMode || chunk && chunk.length > 0) {
- if (state.ended && !addToFront) {
- var e = new Error('stream.push() after EOF');
- stream.emit('error', e);
- } else if (state.endEmitted && addToFront) {
- var e = new Error('stream.unshift() after end event');
- stream.emit('error', e);
- } else {
- if (state.decoder && !addToFront && !encoding)
- chunk = state.decoder.write(chunk);
-
- // update the buffer info.
- state.length += state.objectMode ? 1 : chunk.length;
- if (addToFront) {
- state.buffer.unshift(chunk);
- } else {
- state.reading = false;
- state.buffer.push(chunk);
- }
-
- if (state.needReadable)
- emitReadable(stream);
-
- maybeReadMore(stream, state);
- }
- } else if (!addToFront) {
- state.reading = false;
- }
-
- return needMoreData(state);
-}
-
-
-
-// if it's past the high water mark, we can push in some more.
-// Also, if we have no data yet, we can stand some
-// more bytes. This is to work around cases where hwm=0,
-// such as the repl. Also, if the push() triggered a
-// readable event, and the user called read(largeNumber) such that
-// needReadable was set, then we ought to push more, so that another
-// 'readable' event will be triggered.
-function needMoreData(state) {
- return !state.ended &&
- (state.needReadable ||
- state.length < state.highWaterMark ||
- state.length === 0);
-}
-
-// backwards compatibility.
-Readable.prototype.setEncoding = function(enc) {
- if (!StringDecoder)
- StringDecoder = require('string_decoder/').StringDecoder;
- this._readableState.decoder = new StringDecoder(enc);
- this._readableState.encoding = enc;
-};
-
-// Don't raise the hwm > 128MB
-var MAX_HWM = 0x800000;
-function roundUpToNextPowerOf2(n) {
- if (n >= MAX_HWM) {
- n = MAX_HWM;
- } else {
- // Get the next highest power of 2
- n--;
- for (var p = 1; p < 32; p <<= 1) n |= n >> p;
- n++;
- }
- return n;
-}
-
-function howMuchToRead(n, state) {
- if (state.length === 0 && state.ended)
- return 0;
-
- if (state.objectMode)
- return n === 0 ? 0 : 1;
-
- if (n === null || isNaN(n)) {
- // only flow one buffer at a time
- if (state.flowing && state.buffer.length)
- return state.buffer[0].length;
- else
- return state.length;
- }
-
- if (n <= 0)
- return 0;
-
- // If we're asking for more than the target buffer level,
- // then raise the water mark. Bump up to the next highest
- // power of 2, to prevent increasing it excessively in tiny
- // amounts.
- if (n > state.highWaterMark)
- state.highWaterMark = roundUpToNextPowerOf2(n);
-
- // don't have that much. return null, unless we've ended.
- if (n > state.length) {
- if (!state.ended) {
- state.needReadable = true;
- return 0;
- } else
- return state.length;
- }
-
- return n;
-}
-
-// you can override either this method, or the async _read(n) below.
-Readable.prototype.read = function(n) {
- var state = this._readableState;
- state.calledRead = true;
- var nOrig = n;
- var ret;
-
- if (typeof n !== 'number' || n > 0)
- state.emittedReadable = false;
-
- // if we're doing read(0) to trigger a readable event, but we
- // already have a bunch of data in the buffer, then just trigger
- // the 'readable' event and move on.
- if (n === 0 &&
- state.needReadable &&
- (state.length >= state.highWaterMark || state.ended)) {
- emitReadable(this);
- return null;
- }
-
- n = howMuchToRead(n, state);
-
- // if we've ended, and we're now clear, then finish it up.
- if (n === 0 && state.ended) {
- ret = null;
-
- // In cases where the decoder did not receive enough data
- // to produce a full chunk, then immediately received an
- // EOF, state.buffer will contain [<Buffer >, <Buffer 00 ...>].
- // howMuchToRead will see this and coerce the amount to
- // read to zero (because it's looking at the length of the
- // first <Buffer > in state.buffer), and we'll end up here.
- //
- // This can only happen via state.decoder -- no other venue
- // exists for pushing a zero-length chunk into state.buffer
- // and triggering this behavior. In this case, we return our
- // remaining data and end the stream, if appropriate.
- if (state.length > 0 && state.decoder) {
- ret = fromList(n, state);
- state.length -= ret.length;
- }
-
- if (state.length === 0)
- endReadable(this);
-
- return ret;
- }
-
- // All the actual chunk generation logic needs to be
- // *below* the call to _read. The reason is that in certain
- // synthetic stream cases, such as passthrough streams, _read
- // may be a completely synchronous operation which may change
- // the state of the read buffer, providing enough data when
- // before there was *not* enough.
- //
- // So, the steps are:
- // 1. Figure out what the state of things will be after we do
- // a read from the buffer.
- //
- // 2. If that resulting state will trigger a _read, then call _read.
- // Note that this may be asynchronous, or synchronous. Yes, it is
- // deeply ugly to write APIs this way, but that still doesn't mean
- // that the Readable class should behave improperly, as streams are
- // designed to be sync/async agnostic.
- // Take note if the _read call is sync or async (ie, if the read call
- // has returned yet), so that we know whether or not it's safe to emit
- // 'readable' etc.
- //
- // 3. Actually pull the requested chunks out of the buffer and return.
-
- // if we need a readable event, then we need to do some reading.
- var doRead = state.needReadable;
-
- // if we currently have less than the highWaterMark, then also read some
- if (state.length - n <= state.highWaterMark)
- doRead = true;
-
- // however, if we've ended, then there's no point, and if we're already
- // reading, then it's unnecessary.
- if (state.ended || state.reading)
- doRead = false;
-
- if (doRead) {
- state.reading = true;
- state.sync = true;
- // if the length is currently zero, then we *need* a readable event.
- if (state.length === 0)
- state.needReadable = true;
- // call internal read method
- this._read(state.highWaterMark);
- state.sync = false;
- }
-
- // If _read called its callback synchronously, then `reading`
- // will be false, and we need to re-evaluate how much data we
- // can return to the user.
- if (doRead && !state.reading)
- n = howMuchToRead(nOrig, state);
-
- if (n > 0)
- ret = fromList(n, state);
- else
- ret = null;
-
- if (ret === null) {
- state.needReadable = true;
- n = 0;
- }
-
- state.length -= n;
-
- // If we have nothing in the buffer, then we want to know
- // as soon as we *do* get something into the buffer.
- if (state.length === 0 && !state.ended)
- state.needReadable = true;
-
- // If we happened to read() exactly the remaining amount in the
- // buffer, and the EOF has been seen at this point, then make sure
- // that we emit 'end' on the very next tick.
- if (state.ended && !state.endEmitted && state.length === 0)
- endReadable(this);
-
- return ret;
-};
-
-function chunkInvalid(state, chunk) {
- var er = null;
- if (!Buffer.isBuffer(chunk) &&
- 'string' !== typeof chunk &&
- chunk !== null &&
- chunk !== undefined &&
- !state.objectMode) {
- er = new TypeError('Invalid non-string/buffer chunk');
- }
- return er;
-}
-
-
-function onEofChunk(stream, state) {
- if (state.decoder && !state.ended) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length) {
- state.buffer.push(chunk);
- state.length += state.objectMode ? 1 : chunk.length;
- }
- }
- state.ended = true;
-
- // if we've ended and we have some data left, then emit
- // 'readable' now to make sure it gets picked up.
- if (state.length > 0)
- emitReadable(stream);
- else
- endReadable(stream);
-}
-
-// Don't emit readable right away in sync mode, because this can trigger
-// another read() call => stack overflow. This way, it might trigger
-// a nextTick recursion warning, but that's not so bad.
-function emitReadable(stream) {
- var state = stream._readableState;
- state.needReadable = false;
- if (state.emittedReadable)
- return;
-
- state.emittedReadable = true;
- if (state.sync)
- process.nextTick(function() {
- emitReadable_(stream);
- });
- else
- emitReadable_(stream);
-}
-
-function emitReadable_(stream) {
- stream.emit('readable');
-}
-
-
-// at this point, the user has presumably seen the 'readable' event,
-// and called read() to consume some data. that may have triggered
-// in turn another _read(n) call, in which case reading = true if
-// it's in progress.
-// However, if we're not ended, or reading, and the length < hwm,
-// then go ahead and try to read some more preemptively.
-function maybeReadMore(stream, state) {
- if (!state.readingMore) {
- state.readingMore = true;
- process.nextTick(function() {
- maybeReadMore_(stream, state);
- });
- }
-}
-
-function maybeReadMore_(stream, state) {
- var len = state.length;
- while (!state.reading && !state.flowing && !state.ended &&
- state.length < state.highWaterMark) {
- stream.read(0);
- if (len === state.length)
- // didn't get any data, stop spinning.
- break;
- else
- len = state.length;
- }
- state.readingMore = false;
-}
-
-// abstract method. to be overridden in specific implementation classes.
-// call cb(er, data) where data is <= n in length.
-// for virtual (non-string, non-buffer) streams, "length" is somewhat
-// arbitrary, and perhaps not very meaningful.
-Readable.prototype._read = function(n) {
- this.emit('error', new Error('not implemented'));
-};
-
-Readable.prototype.pipe = function(dest, pipeOpts) {
- var src = this;
- var state = this._readableState;
-
- switch (state.pipesCount) {
- case 0:
- state.pipes = dest;
- break;
- case 1:
- state.pipes = [state.pipes, dest];
- break;
- default:
- state.pipes.push(dest);
- break;
- }
- state.pipesCount += 1;
-
- var doEnd = (!pipeOpts || pipeOpts.end !== false) &&
- dest !== process.stdout &&
- dest !== process.stderr;
-
- var endFn = doEnd ? onend : cleanup;
- if (state.endEmitted)
- process.nextTick(endFn);
- else
- src.once('end', endFn);
-
- dest.on('unpipe', onunpipe);
- function onunpipe(readable) {
- if (readable !== src) return;
- cleanup();
- }
-
- function onend() {
- dest.end();
- }
-
- // when the dest drains, it reduces the awaitDrain counter
- // on the source. This would be more elegant with a .once()
- // handler in flow(), but adding and removing repeatedly is
- // too slow.
- var ondrain = pipeOnDrain(src);
- dest.on('drain', ondrain);
-
- function cleanup() {
- // cleanup event handlers once the pipe is broken
- dest.removeListener('close', onclose);
- dest.removeListener('finish', onfinish);
- dest.removeListener('drain', ondrain);
- dest.removeListener('error', onerror);
- dest.removeListener('unpipe', onunpipe);
- src.removeListener('end', onend);
- src.removeListener('end', cleanup);
-
- // if the reader is waiting for a drain event from this
- // specific writer, then it would cause it to never start
- // flowing again.
- // So, if this is awaiting a drain, then we just call it now.
- // If we don't know, then assume that we are waiting for one.
- if (!dest._writableState || dest._writableState.needDrain)
- ondrain();
- }
-
- // if the dest has an error, then stop piping into it.
- // however, don't suppress the throwing behavior for this.
- function onerror(er) {
- unpipe();
- dest.removeListener('error', onerror);
- if (EE.listenerCount(dest, 'error') === 0)
- dest.emit('error', er);
- }
- // This is a brutally ugly hack to make sure that our error handler
- // is attached before any userland ones. NEVER DO THIS.
- if (!dest._events || !dest._events.error)
- dest.on('error', onerror);
- else if (isArray(dest._events.error))
- dest._events.error.unshift(onerror);
- else
- dest._events.error = [onerror, dest._events.error];
-
-
-
- // Both close and finish should trigger unpipe, but only once.
- function onclose() {
- dest.removeListener('finish', onfinish);
- unpipe();
- }
- dest.once('close', onclose);
- function onfinish() {
- dest.removeListener('close', onclose);
- unpipe();
- }
- dest.once('finish', onfinish);
-
- function unpipe() {
- src.unpipe(dest);
- }
-
- // tell the dest that it's being piped to
- dest.emit('pipe', src);
-
- // start the flow if it hasn't been started already.
- if (!state.flowing) {
- // the handler that waits for readable events after all
- // the data gets sucked out in flow.
- // This would be easier to follow with a .once() handler
- // in flow(), but that is too slow.
- this.on('readable', pipeOnReadable);
-
- state.flowing = true;
- process.nextTick(function() {
- flow(src);
- });
- }
-
- return dest;
-};
-
-function pipeOnDrain(src) {
- return function() {
- var dest = this;
- var state = src._readableState;
- state.awaitDrain--;
- if (state.awaitDrain === 0)
- flow(src);
- };
-}
-
-function flow(src) {
- var state = src._readableState;
- var chunk;
- state.awaitDrain = 0;
-
- function write(dest, i, list) {
- var written = dest.write(chunk);
- if (false === written) {
- state.awaitDrain++;
- }
- }
-
- while (state.pipesCount && null !== (chunk = src.read())) {
-
- if (state.pipesCount === 1)
- write(state.pipes, 0, null);
- else
- forEach(state.pipes, write);
-
- src.emit('data', chunk);
-
- // if anyone needs a drain, then we have to wait for that.
- if (state.awaitDrain > 0)
- return;
- }
-
- // if every destination was unpiped, either before entering this
- // function, or in the while loop, then stop flowing.
- //
- // NB: This is a pretty rare edge case.
- if (state.pipesCount === 0) {
- state.flowing = false;
-
- // if there were data event listeners added, then switch to old mode.
- if (EE.listenerCount(src, 'data') > 0)
- emitDataEvents(src);
- return;
- }
-
- // at this point, no one needed a drain, so we just ran out of data
- // on the next readable event, start it over again.
- state.ranOut = true;
-}
-
-function pipeOnReadable() {
- if (this._readableState.ranOut) {
- this._readableState.ranOut = false;
- flow(this);
- }
-}
-
-
-Readable.prototype.unpipe = function(dest) {
- var state = this._readableState;
-
- // if we're not piping anywhere, then do nothing.
- if (state.pipesCount === 0)
- return this;
-
- // just one destination. most common case.
- if (state.pipesCount === 1) {
- // passed in one, but it's not the right one.
- if (dest && dest !== state.pipes)
- return this;
-
- if (!dest)
- dest = state.pipes;
-
- // got a match.
- state.pipes = null;
- state.pipesCount = 0;
- this.removeListener('readable', pipeOnReadable);
- state.flowing = false;
- if (dest)
- dest.emit('unpipe', this);
- return this;
- }
-
- // slow case. multiple pipe destinations.
-
- if (!dest) {
- // remove all.
- var dests = state.pipes;
- var len = state.pipesCount;
- state.pipes = null;
- state.pipesCount = 0;
- this.removeListener('readable', pipeOnReadable);
- state.flowing = false;
-
- for (var i = 0; i < len; i++)
- dests[i].emit('unpipe', this);
- return this;
- }
-
- // try to find the right one.
- var i = indexOf(state.pipes, dest);
- if (i === -1)
- return this;
-
- state.pipes.splice(i, 1);
- state.pipesCount -= 1;
- if (state.pipesCount === 1)
- state.pipes = state.pipes[0];
-
- dest.emit('unpipe', this);
-
- return this;
-};
-
-// set up data events if they are asked for
-// Ensure readable listeners eventually get something
-Readable.prototype.on = function(ev, fn) {
- var res = Stream.prototype.on.call(this, ev, fn);
-
- if (ev === 'data' && !this._readableState.flowing)
- emitDataEvents(this);
-
- if (ev === 'readable' && this.readable) {
- var state = this._readableState;
- if (!state.readableListening) {
- state.readableListening = true;
- state.emittedReadable = false;
- state.needReadable = true;
- if (!state.reading) {
- this.read(0);
- } else if (state.length) {
- emitReadable(this, state);
- }
- }
- }
-
- return res;
-};
-Readable.prototype.addListener = Readable.prototype.on;
-
-// pause() and resume() are remnants of the legacy readable stream API
-// If the user uses them, then switch into old mode.
-Readable.prototype.resume = function() {
- emitDataEvents(this);
- this.read(0);
- this.emit('resume');
-};
-
-Readable.prototype.pause = function() {
- emitDataEvents(this, true);
- this.emit('pause');
-};
-
-function emitDataEvents(stream, startPaused) {
- var state = stream._readableState;
-
- if (state.flowing) {
- // https://github.com/isaacs/readable-stream/issues/16
- throw new Error('Cannot switch to old mode now.');
- }
-
- var paused = startPaused || false;
- var readable = false;
-
- // convert to an old-style stream.
- stream.readable = true;
- stream.pipe = Stream.prototype.pipe;
- stream.on = stream.addListener = Stream.prototype.on;
-
- stream.on('readable', function() {
- readable = true;
-
- var c;
- while (!paused && (null !== (c = stream.read())))
- stream.emit('data', c);
-
- if (c === null) {
- readable = false;
- stream._readableState.needReadable = true;
- }
- });
-
- stream.pause = function() {
- paused = true;
- this.emit('pause');
- };
-
- stream.resume = function() {
- paused = false;
- if (readable)
- process.nextTick(function() {
- stream.emit('readable');
- });
- else
- this.read(0);
- this.emit('resume');
- };
-
- // now make it start, just in case it hadn't already.
- stream.emit('readable');
-}
-
-// wrap an old-style stream as the async data source.
-// This is *not* part of the readable stream interface.
-// It is an ugly unfortunate mess of history.
-Readable.prototype.wrap = function(stream) {
- var state = this._readableState;
- var paused = false;
-
- var self = this;
- stream.on('end', function() {
- if (state.decoder && !state.ended) {
- var chunk = state.decoder.end();
- if (chunk && chunk.length)
- self.push(chunk);
- }
-
- self.push(null);
- });
-
- stream.on('data', function(chunk) {
- if (state.decoder)
- chunk = state.decoder.write(chunk);
-
- // don't skip over falsy values in objectMode
- //if (state.objectMode && util.isNullOrUndefined(chunk))
- if (state.objectMode && (chunk === null || chunk === undefined))
- return;
- else if (!state.objectMode && (!chunk || !chunk.length))
- return;
-
- var ret = self.push(chunk);
- if (!ret) {
- paused = true;
- stream.pause();
- }
- });
-
- // proxy all the other methods.
- // important when wrapping filters and duplexes.
- for (var i in stream) {
- if (typeof stream[i] === 'function' &&
- typeof this[i] === 'undefined') {
- this[i] = function(method) { return function() {
- return stream[method].apply(stream, arguments);
- }}(i);
- }
- }
-
- // proxy certain important events.
- var events = ['error', 'close', 'destroy', 'pause', 'resume'];
- forEach(events, function(ev) {
- stream.on(ev, self.emit.bind(self, ev));
- });
-
- // when we try to consume some more bytes, simply unpause the
- // underlying stream.
- self._read = function(n) {
- if (paused) {
- paused = false;
- stream.resume();
- }
- };
-
- return self;
-};
-
-
-
-// exposed for testing purposes only.
-Readable._fromList = fromList;
-
-// Pluck off n bytes from an array of buffers.
-// Length is the combined lengths of all the buffers in the list.
-function fromList(n, state) {
- var list = state.buffer;
- var length = state.length;
- var stringMode = !!state.decoder;
- var objectMode = !!state.objectMode;
- var ret;
-
- // nothing in the list, definitely empty.
- if (list.length === 0)
- return null;
-
- if (length === 0)
- ret = null;
- else if (objectMode)
- ret = list.shift();
- else if (!n || n >= length) {
- // read it all, truncate the array.
- if (stringMode)
- ret = list.join('');
- else
- ret = Buffer.concat(list, length);
- list.length = 0;
- } else {
- // read just some of it.
- if (n < list[0].length) {
- // just take a part of the first list item.
- // slice is the same for buffers and strings.
- var buf = list[0];
- ret = buf.slice(0, n);
- list[0] = buf.slice(n);
- } else if (n === list[0].length) {
- // first list is a perfect match
- ret = list.shift();
- } else {
- // complex case.
- // we have enough to cover it, but it spans past the first buffer.
- if (stringMode)
- ret = '';
- else
- ret = new Buffer(n);
-
- var c = 0;
- for (var i = 0, l = list.length; i < l && c < n; i++) {
- var buf = list[0];
- var cpy = Math.min(n - c, buf.length);
-
- if (stringMode)
- ret += buf.slice(0, cpy);
- else
- buf.copy(ret, c, 0, cpy);
-
- if (cpy < buf.length)
- list[0] = buf.slice(cpy);
- else
- list.shift();
-
- c += cpy;
- }
- }
- }
-
- return ret;
-}
-
-function endReadable(stream) {
- var state = stream._readableState;
-
- // If we get here before consuming all the bytes, then that is a
- // bug in node. Should never happen.
- if (state.length > 0)
- throw new Error('endReadable called on non-empty stream');
-
- if (!state.endEmitted && state.calledRead) {
- state.ended = true;
- process.nextTick(function() {
- // Check that we didn't get one last unshift.
- if (!state.endEmitted && state.length === 0) {
- state.endEmitted = true;
- stream.readable = false;
- stream.emit('end');
- }
- });
- }
-}
-
-function forEach (xs, f) {
- for (var i = 0, l = xs.length; i < l; i++) {
- f(xs[i], i);
- }
-}
-
-function indexOf (xs, x) {
- for (var i = 0, l = xs.length; i < l; i++) {
- if (xs[i] === x) return i;
- }
- return -1;
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js
deleted file mode 100644
index eb188df3e8..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js
+++ /dev/null
@@ -1,210 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-
-// a transform stream is a readable/writable stream where you do
-// something with the data. Sometimes it's called a "filter",
-// but that's not a great name for it, since that implies a thing where
-// some bits pass through, and others are simply ignored. (That would
-// be a valid example of a transform, of course.)
-//
-// While the output is causally related to the input, it's not a
-// necessarily symmetric or synchronous transformation. For example,
-// a zlib stream might take multiple plain-text writes(), and then
-// emit a single compressed chunk some time in the future.
-//
-// Here's how this works:
-//
-// The Transform stream has all the aspects of the readable and writable
-// stream classes. When you write(chunk), that calls _write(chunk,cb)
-// internally, and returns false if there's a lot of pending writes
-// buffered up. When you call read(), that calls _read(n) until
-// there's enough pending readable data buffered up.
-//
-// In a transform stream, the written data is placed in a buffer. When
-// _read(n) is called, it transforms the queued up data, calling the
-// buffered _write cb's as it consumes chunks. If consuming a single
-// written chunk would result in multiple output chunks, then the first
-// outputted bit calls the readcb, and subsequent chunks just go into
-// the read buffer, and will cause it to emit 'readable' if necessary.
-//
-// This way, back-pressure is actually determined by the reading side,
-// since _read has to be called to start processing a new chunk. However,
-// a pathological inflate type of transform can cause excessive buffering
-// here. For example, imagine a stream where every byte of input is
-// interpreted as an integer from 0-255, and then results in that many
-// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
-// 1kb of data being output. In this case, you could write a very small
-// amount of input, and end up with a very large amount of output. In
-// such a pathological inflating mechanism, there'd be no way to tell
-// the system to stop doing the transform. A single 4MB write could
-// cause the system to run out of memory.
-//
-// However, even in such a pathological case, only a single written chunk
-// would be consumed, and then the rest would wait (un-transformed) until
-// the results of the previous transformed chunk were consumed.
-
-module.exports = Transform;
-
-var Duplex = require('./_stream_duplex');
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-util.inherits(Transform, Duplex);
-
-
-function TransformState(options, stream) {
- this.afterTransform = function(er, data) {
- return afterTransform(stream, er, data);
- };
-
- this.needTransform = false;
- this.transforming = false;
- this.writecb = null;
- this.writechunk = null;
-}
-
-function afterTransform(stream, er, data) {
- var ts = stream._transformState;
- ts.transforming = false;
-
- var cb = ts.writecb;
-
- if (!cb)
- return stream.emit('error', new Error('no writecb in Transform class'));
-
- ts.writechunk = null;
- ts.writecb = null;
-
- if (data !== null && data !== undefined)
- stream.push(data);
-
- if (cb)
- cb(er);
-
- var rs = stream._readableState;
- rs.reading = false;
- if (rs.needReadable || rs.length < rs.highWaterMark) {
- stream._read(rs.highWaterMark);
- }
-}
-
-
-function Transform(options) {
- if (!(this instanceof Transform))
- return new Transform(options);
-
- Duplex.call(this, options);
-
- var ts = this._transformState = new TransformState(options, this);
-
- // when the writable side finishes, then flush out anything remaining.
- var stream = this;
-
- // start out asking for a readable event once data is transformed.
- this._readableState.needReadable = true;
-
- // we have implemented the _read method, and done the other things
- // that Readable wants before the first _read call, so unset the
- // sync guard flag.
- this._readableState.sync = false;
-
- this.once('finish', function() {
- if ('function' === typeof this._flush)
- this._flush(function(er) {
- done(stream, er);
- });
- else
- done(stream);
- });
-}
-
-Transform.prototype.push = function(chunk, encoding) {
- this._transformState.needTransform = false;
- return Duplex.prototype.push.call(this, chunk, encoding);
-};
-
-// This is the part where you do stuff!
-// override this function in implementation classes.
-// 'chunk' is an input chunk.
-//
-// Call `push(newChunk)` to pass along transformed output
-// to the readable side. You may call 'push' zero or more times.
-//
-// Call `cb(err)` when you are done with this chunk. If you pass
-// an error, then that'll put the hurt on the whole operation. If you
-// never call cb(), then you'll never get another chunk.
-Transform.prototype._transform = function(chunk, encoding, cb) {
- throw new Error('not implemented');
-};
-
-Transform.prototype._write = function(chunk, encoding, cb) {
- var ts = this._transformState;
- ts.writecb = cb;
- ts.writechunk = chunk;
- ts.writeencoding = encoding;
- if (!ts.transforming) {
- var rs = this._readableState;
- if (ts.needTransform ||
- rs.needReadable ||
- rs.length < rs.highWaterMark)
- this._read(rs.highWaterMark);
- }
-};
-
-// Doesn't matter what the args are here.
-// _transform does all the work.
-// That we got here means that the readable side wants more data.
-Transform.prototype._read = function(n) {
- var ts = this._transformState;
-
- if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
- ts.transforming = true;
- this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
- } else {
- // mark that we need a transform, so that any data that comes in
- // will get processed, now that we've asked for it.
- ts.needTransform = true;
- }
-};
-
-
-function done(stream, er) {
- if (er)
- return stream.emit('error', er);
-
- // if there's nothing in the write buffer, then that means
- // that nothing more will ever be provided
- var ws = stream._writableState;
- var rs = stream._readableState;
- var ts = stream._transformState;
-
- if (ws.length)
- throw new Error('calling transform done when ws.length != 0');
-
- if (ts.transforming)
- throw new Error('calling transform done when still transforming');
-
- return stream.push(null);
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js
deleted file mode 100644
index 4bdaa4fa49..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js
+++ /dev/null
@@ -1,386 +0,0 @@
-// Copyright Joyent, Inc. and other Node contributors.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to permit
-// persons to whom the Software is furnished to do so, subject to the
-// following conditions:
-//
-// The above copyright notice and this permission notice shall be included
-// in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
-// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
-// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-// USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-// A bit simpler than readable streams.
-// Implement an async ._write(chunk, cb), and it'll handle all
-// the drain event emission and buffering.
-
-module.exports = Writable;
-
-/*<replacement>*/
-var Buffer = require('buffer').Buffer;
-/*</replacement>*/
-
-Writable.WritableState = WritableState;
-
-
-/*<replacement>*/
-var util = require('core-util-is');
-util.inherits = require('inherits');
-/*</replacement>*/
-
-var Stream = require('stream');
-
-util.inherits(Writable, Stream);
-
-function WriteReq(chunk, encoding, cb) {
- this.chunk = chunk;
- this.encoding = encoding;
- this.callback = cb;
-}
-
-function WritableState(options, stream) {
- options = options || {};
-
- // the point at which write() starts returning false
- // Note: 0 is a valid value, means that we always return false if
- // the entire buffer is not flushed immediately on write()
- var hwm = options.highWaterMark;
- this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024;
-
- // object stream flag to indicate whether or not this stream
- // contains buffers or objects.
- this.objectMode = !!options.objectMode;
-
- // cast to ints.
- this.highWaterMark = ~~this.highWaterMark;
-
- this.needDrain = false;
- // at the start of calling end()
- this.ending = false;
- // when end() has been called, and returned
- this.ended = false;
- // when 'finish' is emitted
- this.finished = false;
-
- // should we decode strings into buffers before passing to _write?
- // this is here so that some node-core streams can optimize string
- // handling at a lower level.
- var noDecode = options.decodeStrings === false;
- this.decodeStrings = !noDecode;
-
- // Crypto is kind of old and crusty. Historically, its default string
- // encoding is 'binary' so we have to make this configurable.
- // Everything else in the universe uses 'utf8', though.
- this.defaultEncoding = options.defaultEncoding || 'utf8';
-
- // not an actual buffer we keep track of, but a measurement
- // of how much we're waiting to get pushed to some underlying
- // socket or file.
- this.length = 0;
-
- // a flag to see when we're in the middle of a write.
- this.writing = false;
-
- // a flag to be able to tell if the onwrite cb is called immediately,
- // or on a later tick. We set this to true at first, becuase any
- // actions that shouldn't happen until "later" should generally also
- // not happen before the first write call.
- this.sync = true;
-
- // a flag to know if we're processing previously buffered items, which
- // may call the _write() callback in the same tick, so that we don't
- // end up in an overlapped onwrite situation.
- this.bufferProcessing = false;
-
- // the callback that's passed to _write(chunk,cb)
- this.onwrite = function(er) {
- onwrite(stream, er);
- };
-
- // the callback that the user supplies to write(chunk,encoding,cb)
- this.writecb = null;
-
- // the amount that is being written when _write is called.
- this.writelen = 0;
-
- this.buffer = [];
-
- // True if the error was already emitted and should not be thrown again
- this.errorEmitted = false;
-}
-
-function Writable(options) {
- var Duplex = require('./_stream_duplex');
-
- // Writable ctor is applied to Duplexes, though they're not
- // instanceof Writable, they're instanceof Readable.
- if (!(this instanceof Writable) && !(this instanceof Duplex))
- return new Writable(options);
-
- this._writableState = new WritableState(options, this);
-
- // legacy.
- this.writable = true;
-
- Stream.call(this);
-}
-
-// Otherwise people can pipe Writable streams, which is just wrong.
-Writable.prototype.pipe = function() {
- this.emit('error', new Error('Cannot pipe. Not readable.'));
-};
-
-
-function writeAfterEnd(stream, state, cb) {
- var er = new Error('write after end');
- // TODO: defer error events consistently everywhere, not just the cb
- stream.emit('error', er);
- process.nextTick(function() {
- cb(er);
- });
-}
-
-// If we get something that is not a buffer, string, null, or undefined,
-// and we're not in objectMode, then that's an error.
-// Otherwise stream chunks are all considered to be of length=1, and the
-// watermarks determine how many objects to keep in the buffer, rather than
-// how many bytes or characters.
-function validChunk(stream, state, chunk, cb) {
- var valid = true;
- if (!Buffer.isBuffer(chunk) &&
- 'string' !== typeof chunk &&
- chunk !== null &&
- chunk !== undefined &&
- !state.objectMode) {
- var er = new TypeError('Invalid non-string/buffer chunk');
- stream.emit('error', er);
- process.nextTick(function() {
- cb(er);
- });
- valid = false;
- }
- return valid;
-}
-
-Writable.prototype.write = function(chunk, encoding, cb) {
- var state = this._writableState;
- var ret = false;
-
- if (typeof encoding === 'function') {
- cb = encoding;
- encoding = null;
- }
-
- if (Buffer.isBuffer(chunk))
- encoding = 'buffer';
- else if (!encoding)
- encoding = state.defaultEncoding;
-
- if (typeof cb !== 'function')
- cb = function() {};
-
- if (state.ended)
- writeAfterEnd(this, state, cb);
- else if (validChunk(this, state, chunk, cb))
- ret = writeOrBuffer(this, state, chunk, encoding, cb);
-
- return ret;
-};
-
-function decodeChunk(state, chunk, encoding) {
- if (!state.objectMode &&
- state.decodeStrings !== false &&
- typeof chunk === 'string') {
- chunk = new Buffer(chunk, encoding);
- }
- return chunk;
-}
-
-// if we're already writing something, then just put this
-// in the queue, and wait our turn. Otherwise, call _write
-// If we return false, then we need a drain event, so set that flag.
-function writeOrBuffer(stream, state, chunk, encoding, cb) {
- chunk = decodeChunk(state, chunk, encoding);
- if (Buffer.isBuffer(chunk))
- encoding = 'buffer';
- var len = state.objectMode ? 1 : chunk.length;
-
- state.length += len;
-
- var ret = state.length < state.highWaterMark;
- // we must ensure that previous needDrain will not be reset to false.
- if (!ret)
- state.needDrain = true;
-
- if (state.writing)
- state.buffer.push(new WriteReq(chunk, encoding, cb));
- else
- doWrite(stream, state, len, chunk, encoding, cb);
-
- return ret;
-}
-
-function doWrite(stream, state, len, chunk, encoding, cb) {
- state.writelen = len;
- state.writecb = cb;
- state.writing = true;
- state.sync = true;
- stream._write(chunk, encoding, state.onwrite);
- state.sync = false;
-}
-
-function onwriteError(stream, state, sync, er, cb) {
- if (sync)
- process.nextTick(function() {
- cb(er);
- });
- else
- cb(er);
-
- stream._writableState.errorEmitted = true;
- stream.emit('error', er);
-}
-
-function onwriteStateUpdate(state) {
- state.writing = false;
- state.writecb = null;
- state.length -= state.writelen;
- state.writelen = 0;
-}
-
-function onwrite(stream, er) {
- var state = stream._writableState;
- var sync = state.sync;
- var cb = state.writecb;
-
- onwriteStateUpdate(state);
-
- if (er)
- onwriteError(stream, state, sync, er, cb);
- else {
- // Check if we're actually ready to finish, but don't emit yet
- var finished = needFinish(stream, state);
-
- if (!finished && !state.bufferProcessing && state.buffer.length)
- clearBuffer(stream, state);
-
- if (sync) {
- process.nextTick(function() {
- afterWrite(stream, state, finished, cb);
- });
- } else {
- afterWrite(stream, state, finished, cb);
- }
- }
-}
-
-function afterWrite(stream, state, finished, cb) {
- if (!finished)
- onwriteDrain(stream, state);
- cb();
- if (finished)
- finishMaybe(stream, state);
-}
-
-// Must force callback to be called on nextTick, so that we don't
-// emit 'drain' before the write() consumer gets the 'false' return
-// value, and has a chance to attach a 'drain' listener.
-function onwriteDrain(stream, state) {
- if (state.length === 0 && state.needDrain) {
- state.needDrain = false;
- stream.emit('drain');
- }
-}
-
-
-// if there's something in the buffer waiting, then process it
-function clearBuffer(stream, state) {
- state.bufferProcessing = true;
-
- for (var c = 0; c < state.buffer.length; c++) {
- var entry = state.buffer[c];
- var chunk = entry.chunk;
- var encoding = entry.encoding;
- var cb = entry.callback;
- var len = state.objectMode ? 1 : chunk.length;
-
- doWrite(stream, state, len, chunk, encoding, cb);
-
- // if we didn't call the onwrite immediately, then
- // it means that we need to wait until it does.
- // also, that means that the chunk and cb are currently
- // being processed, so move the buffer counter past them.
- if (state.writing) {
- c++;
- break;
- }
- }
-
- state.bufferProcessing = false;
- if (c < state.buffer.length)
- state.buffer = state.buffer.slice(c);
- else
- state.buffer.length = 0;
-}
-
-Writable.prototype._write = function(chunk, encoding, cb) {
- cb(new Error('not implemented'));
-};
-
-Writable.prototype.end = function(chunk, encoding, cb) {
- var state = this._writableState;
-
- if (typeof chunk === 'function') {
- cb = chunk;
- chunk = null;
- encoding = null;
- } else if (typeof encoding === 'function') {
- cb = encoding;
- encoding = null;
- }
-
- if (typeof chunk !== 'undefined' && chunk !== null)
- this.write(chunk, encoding);
-
- // ignore unnecessary end() calls.
- if (!state.ending && !state.finished)
- endWritable(this, state, cb);
-};
-
-
-function needFinish(stream, state) {
- return (state.ending &&
- state.length === 0 &&
- !state.finished &&
- !state.writing);
-}
-
-function finishMaybe(stream, state) {
- var need = needFinish(stream, state);
- if (need) {
- state.finished = true;
- stream.emit('finish');
- }
- return need;
-}
-
-function endWritable(stream, state, cb) {
- state.ending = true;
- finishMaybe(stream, state);
- if (cb) {
- if (state.finished)
- process.nextTick(cb);
- else
- stream.once('finish', cb);
- }
- state.ended = true;
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/README.md b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/README.md
deleted file mode 100644
index 052a62b8d7..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/README.md
+++ /dev/null
@@ -1,54 +0,0 @@
-
-# isarray
-
-`Array#isArray` for older browsers.
-
-## Usage
-
-```js
-var isArray = require('isarray');
-
-console.log(isArray([])); // => true
-console.log(isArray({})); // => false
-```
-
-## Installation
-
-With [npm](http://npmjs.org) do
-
-```bash
-$ npm install isarray
-```
-
-Then bundle for the browser with
-[browserify](https://github.com/substack/browserify).
-
-With [component](http://component.io) do
-
-```bash
-$ component install juliangruber/isarray
-```
-
-## License
-
-(MIT)
-
-Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/build/build.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/build/build.js
deleted file mode 100644
index e1856ef094..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/build/build.js
+++ /dev/null
@@ -1,208 +0,0 @@
-
-/**
- * Require the given path.
- *
- * @param {String} path
- * @return {Object} exports
- * @api public
- */
-
-function require(path, parent, orig) {
- var resolved = require.resolve(path);
-
- // lookup failed
- if (null == resolved) {
- orig = orig || path;
- parent = parent || 'root';
- var err = new Error('Failed to require "' + orig + '" from "' + parent + '"');
- err.path = orig;
- err.parent = parent;
- err.require = true;
- throw err;
- }
-
- var module = require.modules[resolved];
-
- // perform real require()
- // by invoking the module's
- // registered function
- if (!module.exports) {
- module.exports = {};
- module.client = module.component = true;
- module.call(this, module.exports, require.relative(resolved), module);
- }
-
- return module.exports;
-}
-
-/**
- * Registered modules.
- */
-
-require.modules = {};
-
-/**
- * Registered aliases.
- */
-
-require.aliases = {};
-
-/**
- * Resolve `path`.
- *
- * Lookup:
- *
- * - PATH/index.js
- * - PATH.js
- * - PATH
- *
- * @param {String} path
- * @return {String} path or null
- * @api private
- */
-
-require.resolve = function(path) {
- if (path.charAt(0) === '/') path = path.slice(1);
- var index = path + '/index.js';
-
- var paths = [
- path,
- path + '.js',
- path + '.json',
- path + '/index.js',
- path + '/index.json'
- ];
-
- for (var i = 0; i < paths.length; i++) {
- var path = paths[i];
- if (require.modules.hasOwnProperty(path)) return path;
- }
-
- if (require.aliases.hasOwnProperty(index)) {
- return require.aliases[index];
- }
-};
-
-/**
- * Normalize `path` relative to the current path.
- *
- * @param {String} curr
- * @param {String} path
- * @return {String}
- * @api private
- */
-
-require.normalize = function(curr, path) {
- var segs = [];
-
- if ('.' != path.charAt(0)) return path;
-
- curr = curr.split('/');
- path = path.split('/');
-
- for (var i = 0; i < path.length; ++i) {
- if ('..' == path[i]) {
- curr.pop();
- } else if ('.' != path[i] && '' != path[i]) {
- segs.push(path[i]);
- }
- }
-
- return curr.concat(segs).join('/');
-};
-
-/**
- * Register module at `path` with callback `definition`.
- *
- * @param {String} path
- * @param {Function} definition
- * @api private
- */
-
-require.register = function(path, definition) {
- require.modules[path] = definition;
-};
-
-/**
- * Alias a module definition.
- *
- * @param {String} from
- * @param {String} to
- * @api private
- */
-
-require.alias = function(from, to) {
- if (!require.modules.hasOwnProperty(from)) {
- throw new Error('Failed to alias "' + from + '", it does not exist');
- }
- require.aliases[to] = from;
-};
-
-/**
- * Return a require function relative to the `parent` path.
- *
- * @param {String} parent
- * @return {Function}
- * @api private
- */
-
-require.relative = function(parent) {
- var p = require.normalize(parent, '..');
-
- /**
- * lastIndexOf helper.
- */
-
- function lastIndexOf(arr, obj) {
- var i = arr.length;
- while (i--) {
- if (arr[i] === obj) return i;
- }
- return -1;
- }
-
- /**
- * The relative require() itself.
- */
-
- function localRequire(path) {
- var resolved = localRequire.resolve(path);
- return require(resolved, parent, path);
- }
-
- /**
- * Resolve relative to the parent.
- */
-
- localRequire.resolve = function(path) {
- var c = path.charAt(0);
- if ('/' == c) return path.slice(1);
- if ('.' == c) return require.normalize(p, path);
-
- // resolve deps by returning
- // the dep in the nearest "deps"
- // directory
- var segs = parent.split('/');
- var i = lastIndexOf(segs, 'deps') + 1;
- if (!i) i = 0;
- path = segs.slice(0, i + 1).join('/') + '/deps/' + path;
- return path;
- };
-
- /**
- * Check if module is defined at `path`.
- */
-
- localRequire.exists = function(path) {
- return require.modules.hasOwnProperty(localRequire.resolve(path));
- };
-
- return localRequire;
-};
-require.register("isarray/index.js", function(exports, require, module){
-module.exports = Array.isArray || function (arr) {
- return Object.prototype.toString.call(arr) == '[object Array]';
-};
-
-});
-require.alias("isarray/index.js", "isarray/index.js");
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/component.json b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/component.json
deleted file mode 100644
index 9e31b68388..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/component.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name" : "isarray",
- "description" : "Array#isArray for older browsers",
- "version" : "0.0.1",
- "repository" : "juliangruber/isarray",
- "homepage": "https://github.com/juliangruber/isarray",
- "main" : "index.js",
- "scripts" : [
- "index.js"
- ],
- "dependencies" : {},
- "keywords": ["browser","isarray","array"],
- "author": {
- "name": "Julian Gruber",
- "email": "mail@juliangruber.com",
- "url": "http://juliangruber.com"
- },
- "license": "MIT"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/index.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/index.js
deleted file mode 100644
index 5f5ad45d46..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-module.exports = Array.isArray || function (arr) {
- return Object.prototype.toString.call(arr) == '[object Array]';
-};
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json
deleted file mode 100644
index a026c9d862..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/node_modules/isarray/package.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
- "_args": [
- [
- "isarray@0.0.1",
- "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream"
- ]
- ],
- "_from": "isarray@0.0.1",
- "_id": "isarray@0.0.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/readable-stream/inline-process-browser/through2/readable-stream/isarray",
- "_npmUser": {
- "email": "julian@juliangruber.com",
- "name": "juliangruber"
- },
- "_npmVersion": "1.2.18",
- "_phantomChildren": {},
- "_requested": {
- "name": "isarray",
- "raw": "isarray@0.0.1",
- "rawSpec": "0.0.1",
- "scope": null,
- "spec": "0.0.1",
- "type": "version"
- },
- "_requiredBy": [
- "/readable-stream/inline-process-browser/through2/readable-stream"
- ],
- "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
- "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf",
- "_shrinkwrap": null,
- "_spec": "isarray@0.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream",
- "author": {
- "email": "mail@juliangruber.com",
- "name": "Julian Gruber",
- "url": "http://juliangruber.com"
- },
- "bugs": {
- "url": "https://github.com/juliangruber/isarray/issues"
- },
- "dependencies": {},
- "description": "Array#isArray for older browsers",
- "devDependencies": {
- "tap": "*"
- },
- "directories": {},
- "dist": {
- "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf",
- "tarball": "http://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz"
- },
- "homepage": "https://github.com/juliangruber/isarray",
- "keywords": [
- "browser",
- "isarray",
- "array"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "email": "julian@juliangruber.com",
- "name": "juliangruber"
- }
- ],
- "name": "isarray",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/juliangruber/isarray.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "0.0.1"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/package.json b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/package.json
deleted file mode 100644
index efe0b4fb12..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/package.json
+++ /dev/null
@@ -1,104 +0,0 @@
-{
- "_args": [
- [
- "readable-stream@>=1.0.33-1 <1.1.0-0",
- "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2"
- ]
- ],
- "_from": "readable-stream@>=1.0.33-1 <1.1.0-0",
- "_id": "readable-stream@1.0.34",
- "_inCache": true,
- "_installable": true,
- "_location": "/readable-stream/inline-process-browser/through2/readable-stream",
- "_nodeVersion": "5.10.1",
- "_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/readable-stream-1.0.34.tgz_1460562521506_0.019665231462568045"
- },
- "_npmUser": {
- "email": "calvin.metcalf@gmail.com",
- "name": "cwmma"
- },
- "_npmVersion": "3.8.3",
- "_phantomChildren": {},
- "_requested": {
- "name": "readable-stream",
- "raw": "readable-stream@>=1.0.33-1 <1.1.0-0",
- "rawSpec": ">=1.0.33-1 <1.1.0-0",
- "scope": null,
- "spec": ">=1.0.33-1 <1.1.0-0",
- "type": "range"
- },
- "_requiredBy": [
- "/readable-stream/inline-process-browser/through2"
- ],
- "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
- "_shasum": "125820e34bc842d2f2aaafafe4c2916ee32c157c",
- "_shrinkwrap": null,
- "_spec": "readable-stream@>=1.0.33-1 <1.1.0-0",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2",
- "author": {
- "email": "i@izs.me",
- "name": "Isaac Z. Schlueter",
- "url": "http://blog.izs.me/"
- },
- "browser": {
- "util": false
- },
- "bugs": {
- "url": "https://github.com/isaacs/readable-stream/issues"
- },
- "dependencies": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.1",
- "isarray": "0.0.1",
- "string_decoder": "~0.10.x"
- },
- "description": "Streams2, a user-land copy of the stream library from Node.js v0.10.x",
- "devDependencies": {
- "tap": "~0.2.6"
- },
- "directories": {},
- "dist": {
- "shasum": "125820e34bc842d2f2aaafafe4c2916ee32c157c",
- "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz"
- },
- "gitHead": "1227c7b66deedb1dc5284a89425854d5f7ad9576",
- "homepage": "https://github.com/isaacs/readable-stream#readme",
- "keywords": [
- "readable",
- "stream",
- "pipe"
- ],
- "license": "MIT",
- "main": "readable.js",
- "maintainers": [
- {
- "email": "isaacs@npmjs.com",
- "name": "isaacs"
- },
- {
- "email": "nathan@tootallnate.net",
- "name": "tootallnate"
- },
- {
- "email": "rod@vagg.org",
- "name": "rvagg"
- },
- {
- "email": "calvin.metcalf@gmail.com",
- "name": "cwmma"
- }
- ],
- "name": "readable-stream",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/isaacs/readable-stream.git"
- },
- "scripts": {
- "test": "tap test/simple/*.js"
- },
- "version": "1.0.34"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/passthrough.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/passthrough.js
deleted file mode 100644
index 27e8d8a551..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/passthrough.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_passthrough.js")
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/readable.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/readable.js
deleted file mode 100644
index 26511e87b9..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/readable.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var Stream = require('stream'); // hack to fix a circular dependency issue when used with browserify
-exports = module.exports = require('./lib/_stream_readable.js');
-exports.Stream = Stream;
-exports.Readable = exports;
-exports.Writable = require('./lib/_stream_writable.js');
-exports.Duplex = require('./lib/_stream_duplex.js');
-exports.Transform = require('./lib/_stream_transform.js');
-exports.PassThrough = require('./lib/_stream_passthrough.js');
-if (!process.browser && process.env.READABLE_STREAM === 'disable') {
- module.exports = require('stream');
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/transform.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/transform.js
deleted file mode 100644
index 5d482f0780..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/transform.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_transform.js")
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/writable.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/writable.js
deleted file mode 100644
index e1e9efdf3c..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/readable-stream/writable.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require("./lib/_stream_writable.js")
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/.npmignore b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/.npmignore
deleted file mode 100644
index 3c3629e647..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/.npmignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/Makefile b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/Makefile
deleted file mode 100644
index d583fcf49d..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-browser:
- node ./support/compile
-
-.PHONY: browser \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/README.md b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/README.md
deleted file mode 100644
index 093cb2978e..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/README.md
+++ /dev/null
@@ -1,32 +0,0 @@
-# xtend
-
-[![browser support][3]][4]
-
-[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges)
-
-Extend like a boss
-
-xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence.
-
-## Examples
-
-```js
-var extend = require("xtend")
-
-// extend returns a new object. Does not mutate arguments
-var combination = extend({
- a: "a",
- b: 'c'
-}, {
- b: "b"
-})
-// { a: "a", b: "b" }
-```
-
-## Stability status: Locked
-
-## MIT Licenced
-
-
- [3]: http://ci.testling.com/Raynos/xtend.png
- [4]: http://ci.testling.com/Raynos/xtend
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/immutable.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/immutable.js
deleted file mode 100644
index 94889c9de1..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/immutable.js
+++ /dev/null
@@ -1,19 +0,0 @@
-module.exports = extend
-
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-
-function extend() {
- var target = {}
-
- for (var i = 0; i < arguments.length; i++) {
- var source = arguments[i]
-
- for (var key in source) {
- if (hasOwnProperty.call(source, key)) {
- target[key] = source[key]
- }
- }
- }
-
- return target
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/mutable.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/mutable.js
deleted file mode 100644
index 72debede6c..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/mutable.js
+++ /dev/null
@@ -1,17 +0,0 @@
-module.exports = extend
-
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-
-function extend(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i]
-
- for (var key in source) {
- if (hasOwnProperty.call(source, key)) {
- target[key] = source[key]
- }
- }
- }
-
- return target
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/package.json b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/package.json
deleted file mode 100644
index 6697bd18b2..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/package.json
+++ /dev/null
@@ -1,109 +0,0 @@
-{
- "_args": [
- [
- "xtend@>=4.0.0 <4.1.0-0",
- "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2"
- ]
- ],
- "_from": "xtend@>=4.0.0 <4.1.0-0",
- "_id": "xtend@4.0.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/readable-stream/inline-process-browser/through2/xtend",
- "_nodeVersion": "0.10.32",
- "_npmUser": {
- "email": "raynos2@gmail.com",
- "name": "raynos"
- },
- "_npmVersion": "2.14.1",
- "_phantomChildren": {},
- "_requested": {
- "name": "xtend",
- "raw": "xtend@>=4.0.0 <4.1.0-0",
- "rawSpec": ">=4.0.0 <4.1.0-0",
- "scope": null,
- "spec": ">=4.0.0 <4.1.0-0",
- "type": "range"
- },
- "_requiredBy": [
- "/readable-stream/inline-process-browser/through2"
- ],
- "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
- "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af",
- "_shrinkwrap": null,
- "_spec": "xtend@>=4.0.0 <4.1.0-0",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2",
- "author": {
- "email": "raynos2@gmail.com",
- "name": "Raynos"
- },
- "bugs": {
- "email": "raynos2@gmail.com",
- "url": "https://github.com/Raynos/xtend/issues"
- },
- "contributors": [
- {
- "name": "Jake Verbaten"
- },
- {
- "name": "Matt Esch"
- }
- ],
- "dependencies": {},
- "description": "extend like a boss",
- "devDependencies": {
- "tape": "~1.1.0"
- },
- "directories": {},
- "dist": {
- "shasum": "a5c6d532be656e23db820efb943a1f04998d63af",
- "tarball": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz"
- },
- "engines": {
- "node": ">=0.4"
- },
- "gitHead": "23dc302a89756da89c1897bc732a752317e35390",
- "homepage": "https://github.com/Raynos/xtend",
- "keywords": [
- "extend",
- "merge",
- "options",
- "opts",
- "object",
- "array"
- ],
- "license": "MIT",
- "main": "immutable",
- "maintainers": [
- {
- "email": "raynos2@gmail.com",
- "name": "raynos"
- }
- ],
- "name": "xtend",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/Raynos/xtend.git"
- },
- "scripts": {
- "test": "node test"
- },
- "testling": {
- "browsers": [
- "ie/7..latest",
- "firefox/16..latest",
- "firefox/nightly",
- "chrome/22..latest",
- "chrome/canary",
- "opera/12..latest",
- "opera/next",
- "safari/5.1..latest",
- "ipad/6.0..latest",
- "iphone/6.0..latest"
- ],
- "files": "test.js"
- },
- "version": "4.0.1"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/test.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/test.js
deleted file mode 100644
index 093a2b061e..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/node_modules/xtend/test.js
+++ /dev/null
@@ -1,83 +0,0 @@
-var test = require("tape")
-var extend = require("./")
-var mutableExtend = require("./mutable")
-
-test("merge", function(assert) {
- var a = { a: "foo" }
- var b = { b: "bar" }
-
- assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
- assert.end()
-})
-
-test("replace", function(assert) {
- var a = { a: "foo" }
- var b = { a: "bar" }
-
- assert.deepEqual(extend(a, b), { a: "bar" })
- assert.end()
-})
-
-test("undefined", function(assert) {
- var a = { a: undefined }
- var b = { b: "foo" }
-
- assert.deepEqual(extend(a, b), { a: undefined, b: "foo" })
- assert.deepEqual(extend(b, a), { a: undefined, b: "foo" })
- assert.end()
-})
-
-test("handle 0", function(assert) {
- var a = { a: "default" }
- var b = { a: 0 }
-
- assert.deepEqual(extend(a, b), { a: 0 })
- assert.deepEqual(extend(b, a), { a: "default" })
- assert.end()
-})
-
-test("is immutable", function (assert) {
- var record = {}
-
- extend(record, { foo: "bar" })
- assert.equal(record.foo, undefined)
- assert.end()
-})
-
-test("null as argument", function (assert) {
- var a = { foo: "bar" }
- var b = null
- var c = void 0
-
- assert.deepEqual(extend(b, a, c), { foo: "bar" })
- assert.end()
-})
-
-test("mutable", function (assert) {
- var a = { foo: "bar" }
-
- mutableExtend(a, { bar: "baz" })
-
- assert.equal(a.bar, "baz")
- assert.end()
-})
-
-test("null prototype", function(assert) {
- var a = { a: "foo" }
- var b = Object.create(null)
- b.b = "bar";
-
- assert.deepEqual(extend(a, b), { a: "foo", b: "bar" })
- assert.end()
-})
-
-test("null prototype mutable", function (assert) {
- var a = { foo: "bar" }
- var b = Object.create(null)
- b.bar = "baz";
-
- mutableExtend(a, b)
-
- assert.equal(a.bar, "baz")
- assert.end()
-})
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/package.json b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/package.json
deleted file mode 100644
index b75cbb9ed9..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/package.json
+++ /dev/null
@@ -1,94 +0,0 @@
-{
- "_args": [
- [
- "through2@^0.6.5",
- "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser"
- ]
- ],
- "_from": "through2@>=0.6.5 <0.7.0",
- "_id": "through2@0.6.5",
- "_inCache": true,
- "_installable": true,
- "_location": "/readable-stream/inline-process-browser/through2",
- "_npmUser": {
- "email": "bryce@ravenwall.com",
- "name": "bryce"
- },
- "_npmVersion": "1.4.28",
- "_phantomChildren": {
- "core-util-is": "1.0.2",
- "inherits": "2.0.1",
- "string_decoder": "0.10.31"
- },
- "_requested": {
- "name": "through2",
- "raw": "through2@^0.6.5",
- "rawSpec": "^0.6.5",
- "scope": null,
- "spec": ">=0.6.5 <0.7.0",
- "type": "range"
- },
- "_requiredBy": [
- "/readable-stream/inline-process-browser"
- ],
- "_resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz",
- "_shasum": "41ab9c67b29d57209071410e1d7a7a968cd3ad48",
- "_shrinkwrap": null,
- "_spec": "through2@^0.6.5",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/inline-process-browser",
- "author": {
- "email": "r@va.gg",
- "name": "Rod Vagg",
- "url": "https://github.com/rvagg"
- },
- "bugs": {
- "url": "https://github.com/rvagg/through2/issues"
- },
- "dependencies": {
- "readable-stream": ">=1.0.33-1 <1.1.0-0",
- "xtend": ">=4.0.0 <4.1.0-0"
- },
- "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise",
- "devDependencies": {
- "bl": ">=0.9.0 <0.10.0-0",
- "stream-spigot": ">=3.0.4 <3.1.0-0",
- "tape": ">=2.14.0 <2.15.0-0"
- },
- "directories": {},
- "dist": {
- "shasum": "41ab9c67b29d57209071410e1d7a7a968cd3ad48",
- "tarball": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz"
- },
- "gitHead": "ba4a87875f2c82323c10023e36f4ae4b386c1bf8",
- "homepage": "https://github.com/rvagg/through2",
- "keywords": [
- "stream",
- "streams2",
- "through",
- "transform"
- ],
- "license": "MIT",
- "main": "through2.js",
- "maintainers": [
- {
- "email": "rod@vagg.org",
- "name": "rvagg"
- },
- {
- "email": "bryce@ravenwall.com",
- "name": "bryce"
- }
- ],
- "name": "through2",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/rvagg/through2.git"
- },
- "scripts": {
- "test": "node test/test.js",
- "test-local": "brtapsauce-local test/basic-test.js"
- },
- "version": "0.6.5"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/through2.js b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/through2.js
deleted file mode 100644
index ef13980d7b..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/node_modules/through2/through2.js
+++ /dev/null
@@ -1,96 +0,0 @@
-var Transform = require('readable-stream/transform')
- , inherits = require('util').inherits
- , xtend = require('xtend')
-
-function DestroyableTransform(opts) {
- Transform.call(this, opts)
- this._destroyed = false
-}
-
-inherits(DestroyableTransform, Transform)
-
-DestroyableTransform.prototype.destroy = function(err) {
- if (this._destroyed) return
- this._destroyed = true
-
- var self = this
- process.nextTick(function() {
- if (err)
- self.emit('error', err)
- self.emit('close')
- })
-}
-
-// a noop _transform function
-function noop (chunk, enc, callback) {
- callback(null, chunk)
-}
-
-
-// create a new export function, used by both the main export and
-// the .ctor export, contains common logic for dealing with arguments
-function through2 (construct) {
- return function (options, transform, flush) {
- if (typeof options == 'function') {
- flush = transform
- transform = options
- options = {}
- }
-
- if (typeof transform != 'function')
- transform = noop
-
- if (typeof flush != 'function')
- flush = null
-
- return construct(options, transform, flush)
- }
-}
-
-
-// main export, just make me a transform stream!
-module.exports = through2(function (options, transform, flush) {
- var t2 = new DestroyableTransform(options)
-
- t2._transform = transform
-
- if (flush)
- t2._flush = flush
-
- return t2
-})
-
-
-// make me a reusable prototype that I can `new`, or implicitly `new`
-// with a constructor call
-module.exports.ctor = through2(function (options, transform, flush) {
- function Through2 (override) {
- if (!(this instanceof Through2))
- return new Through2(override)
-
- this.options = xtend(options, override)
-
- DestroyableTransform.call(this, this.options)
- }
-
- inherits(Through2, DestroyableTransform)
-
- Through2.prototype._transform = transform
-
- if (flush)
- Through2.prototype._flush = flush
-
- return Through2
-})
-
-
-module.exports.obj = through2(function (options, transform, flush) {
- var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options))
-
- t2._transform = transform
-
- if (flush)
- t2._flush = flush
-
- return t2
-})
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/package.json b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/package.json
deleted file mode 100644
index 55f93ace3d..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/package.json
+++ /dev/null
@@ -1,86 +0,0 @@
-{
- "_args": [
- [
- "inline-process-browser@~2.0.1",
- "/Users/rebecca/code/npm/node_modules/readable-stream"
- ]
- ],
- "_from": "inline-process-browser@>=2.0.1 <2.1.0",
- "_id": "inline-process-browser@2.0.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/readable-stream/inline-process-browser",
- "_nodeVersion": "5.10.0",
- "_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/inline-process-browser-2.0.1.tgz_1460463904288_0.8437863881699741"
- },
- "_npmUser": {
- "email": "calvin.metcalf@gmail.com",
- "name": "cwmma"
- },
- "_npmVersion": "3.8.3",
- "_phantomChildren": {
- "core-util-is": "1.0.2",
- "inherits": "2.0.1",
- "string_decoder": "0.10.31"
- },
- "_requested": {
- "name": "inline-process-browser",
- "raw": "inline-process-browser@~2.0.1",
- "rawSpec": "~2.0.1",
- "scope": null,
- "spec": ">=2.0.1 <2.1.0",
- "type": "range"
- },
- "_requiredBy": [
- "/readable-stream"
- ],
- "_resolved": "https://registry.npmjs.org/inline-process-browser/-/inline-process-browser-2.0.1.tgz",
- "_shasum": "f697d6f3b48aefb9cc126ce0806043b31736b2b1",
- "_shrinkwrap": null,
- "_spec": "inline-process-browser@~2.0.1",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream",
- "author": {
- "email": "calvin.metcalf@gmail.com",
- "name": "Calvin W. Metcalf"
- },
- "bugs": {
- "url": "https://github.com/calvinmetcalf/inline-process-browser/issues"
- },
- "dependencies": {
- "falafel": "^1.0.1",
- "through2": "^0.6.5"
- },
- "description": "inline process.browser",
- "devDependencies": {},
- "directories": {},
- "dist": {
- "shasum": "f697d6f3b48aefb9cc126ce0806043b31736b2b1",
- "tarball": "https://registry.npmjs.org/inline-process-browser/-/inline-process-browser-2.0.1.tgz"
- },
- "gitHead": "234068293e4896b9a2e133c3c572d616d67482f0",
- "homepage": "https://github.com/calvinmetcalf/inline-process-browser#readme",
- "keywords": [
- "browserify-transform"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "email": "calvin.metcalf@gmail.com",
- "name": "cwmma"
- }
- ],
- "name": "inline-process-browser",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/calvinmetcalf/inline-process-browser.git"
- },
- "scripts": {
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "version": "2.0.1"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/readme.md b/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/readme.md
deleted file mode 100644
index 05dae4dfc4..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/inline-process-browser/readme.md
+++ /dev/null
@@ -1,23 +0,0 @@
-inline-process-browser
-===
-
-Browserify transform which turns any reference to `process.browser` into `true`.
-
-Can remove non-browser code when combined with [unreachable-branch-transform](https://github.com/zertosh/unreachable-branch-transform)
-
-
-turns
-
-```js
-if (process.browser) {
- //something
-}
-```
-
-into
-
-```js
-if (true) {
- //something
-}
-```
diff --git a/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/index.js b/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/index.js
index 571c276783..a4f40f845f 100644
--- a/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/index.js
+++ b/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/index.js
@@ -8,13 +8,36 @@ if (!process.version ||
module.exports = process.nextTick;
}
-function nextTick(fn) {
- var args = new Array(arguments.length - 1);
- var i = 0;
- while (i < args.length) {
- args[i++] = arguments[i];
+function nextTick(fn, arg1, arg2, arg3) {
+ if (typeof fn !== 'function') {
+ throw new TypeError('"callback" argument must be a function');
+ }
+ var len = arguments.length;
+ var args, i;
+ switch (len) {
+ case 0:
+ case 1:
+ return process.nextTick(fn);
+ case 2:
+ return process.nextTick(function afterTickOne() {
+ fn.call(null, arg1);
+ });
+ case 3:
+ return process.nextTick(function afterTickTwo() {
+ fn.call(null, arg1, arg2);
+ });
+ case 4:
+ return process.nextTick(function afterTickThree() {
+ fn.call(null, arg1, arg2, arg3);
+ });
+ default:
+ args = new Array(len - 1);
+ i = 0;
+ while (i < args.length) {
+ args[i++] = arguments[i];
+ }
+ return process.nextTick(function afterTick() {
+ fn.apply(null, args);
+ });
}
- process.nextTick(function afterTick() {
- fn.apply(null, args);
- });
}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/package.json b/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/package.json
index 2d1862b791..a0d2aaaebc 100644
--- a/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/package.json
+++ b/deps/npm/node_modules/readable-stream/node_modules/process-nextick-args/package.json
@@ -1,37 +1,41 @@
{
"_args": [
[
- "process-nextick-args@~1.0.0",
+ "process-nextick-args@~1.0.6",
"/Users/rebecca/code/npm/node_modules/readable-stream"
]
],
- "_from": "process-nextick-args@>=1.0.0 <1.1.0",
- "_id": "process-nextick-args@1.0.6",
+ "_from": "process-nextick-args@>=1.0.6 <1.1.0",
+ "_id": "process-nextick-args@1.0.7",
"_inCache": true,
"_installable": true,
"_location": "/readable-stream/process-nextick-args",
- "_nodeVersion": "4.1.1",
+ "_nodeVersion": "5.11.0",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/process-nextick-args-1.0.7.tgz_1462394251778_0.36989671061746776"
+ },
"_npmUser": {
"email": "calvin.metcalf@gmail.com",
"name": "cwmma"
},
- "_npmVersion": "2.14.4",
+ "_npmVersion": "3.8.6",
"_phantomChildren": {},
"_requested": {
"name": "process-nextick-args",
- "raw": "process-nextick-args@~1.0.0",
- "rawSpec": "~1.0.0",
+ "raw": "process-nextick-args@~1.0.6",
+ "rawSpec": "~1.0.6",
"scope": null,
- "spec": ">=1.0.0 <1.1.0",
+ "spec": ">=1.0.6 <1.1.0",
"type": "range"
},
"_requiredBy": [
"/readable-stream"
],
- "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.6.tgz",
- "_shasum": "0f96b001cea90b12592ce566edb97ec11e69bd05",
+ "_resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
+ "_shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3",
"_shrinkwrap": null,
- "_spec": "process-nextick-args@~1.0.0",
+ "_spec": "process-nextick-args@~1.0.6",
"_where": "/Users/rebecca/code/npm/node_modules/readable-stream",
"author": "",
"bugs": {
@@ -44,17 +48,17 @@
},
"directories": {},
"dist": {
- "shasum": "0f96b001cea90b12592ce566edb97ec11e69bd05",
- "tarball": "http://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.6.tgz"
+ "shasum": "150e20b756590ad3f91093f25a4f2ad8bff30ba3",
+ "tarball": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz"
},
- "gitHead": "e85787b05a8c3c1adb714f332d822e9162699c78",
+ "gitHead": "5c00899ab01dd32f93ad4b5743da33da91404f39",
"homepage": "https://github.com/calvinmetcalf/process-nextick-args",
"license": "MIT",
"main": "index.js",
"maintainers": [
{
- "name": "cwmma",
- "email": "calvin.metcalf@gmail.com"
+ "email": "calvin.metcalf@gmail.com",
+ "name": "cwmma"
}
],
"name": "process-nextick-args",
@@ -67,5 +71,5 @@
"scripts": {
"test": "node test.js"
},
- "version": "1.0.6"
+ "version": "1.0.7"
}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/README.md b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/README.md
deleted file mode 100644
index 345cc48927..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/README.md
+++ /dev/null
@@ -1,72 +0,0 @@
-unreachable-branch-transform
-============================
-
-[![Build Status](https://travis-ci.org/zertosh/unreachable-branch-transform.svg?branch=master)](https://travis-ci.org/zertosh/unreachable-branch-transform)
-
-Removes unreachable code branches in `if` statements, ternaries `?`, and logical operations `||` `&&`, where the test is determinable (like comparing two constants). This is similar to what [UglifyJS](https://github.com/mishoo/UglifyJS2)'s "dead_code" compressor option does, but without the extra code transformations.
-
-When combined with something like [envify](https://github.com/hughsk/envify) and [browserify](https://github.com/substack/node-browserify), you can perform conditional `require` calls without including more code than you need.
-
-#### Install ####
-
-```bash
-npm install unreachable-branch-transform
-```
-
-#### Example outputs #####
-
-```js
-// original
-var transport = process.env.TARGET === 'client' ? require('ajax') : require('fs');
-
-// after envify
-var transport = 'server' === 'client' ? require('ajax') : require('fs');
-// then after unreachable-branch-transform
-var transport = require('fs');
-```
-
-```js
-// original
-if (process.env.NODE_ENV === 'development') {
- console.log('in dev mode');
-} else {
- console.log('in some other mode');
-}
-
-// after envify
-if ('production' === 'development') {
- console.log('in dev mode');
-} else {
- console.log('in some other mode');
-}
-
-// then after unreachable-branch-transform
-{
- console.log('in some other mode');
-}
-```
-
-#### Usage
-
-
-
-* `unreachable-branch-transform` can be used a [browserify](https://github.com/substack/node-browserify) transform. Just include it like any other transform.
-* `unreachable-branch-transform` can also be used on raw code by calling the `transform` function exposed by requiring the package.
-
-#### Frequently asked questions ####
-
-##### Why are `undefined` equality references not removed?
-
-If you have a branch with the format
-
-```javascript
-if (undefined === 'production') {
- /* ... */
-}
-```
-
-it will not be removed. Unfortunately, `undefined` is _not_ a constant in older browser runtimes and can be reassigned. In this case, it could be possible that `undefined` does indeed equal `'production`'.
-
-Credit
-------
-`esmangle-evaluator` is from the [esmangle](https://github.com/Constellation/esmangle) project.
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/index.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/index.js
deleted file mode 100644
index d141d6846e..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/index.js
+++ /dev/null
@@ -1,59 +0,0 @@
-var recast = require('recast');
-var stream = require('stream');
-var util = require('util');
-
-var transformer = require('./unreachableBranchTransformer');
-
-module.exports = UBT;
-util.inherits(UBT, stream.Transform);
-
-function UBT(file, opts) {
- if (!(this instanceof UBT)) {
- return UBT.configure(opts)(file);
- }
-
- stream.Transform.call(this);
- this._data = '';
-}
-
-UBT.prototype._transform = function(buf, enc, cb) {
- this._data += buf;
- cb();
-};
-
-UBT.prototype._flush = function(cb) {
- try {
- var code = UBT.transform(this._data);
- this.push(code);
- } catch(err) {
- this.emit('error', err);
- return;
- }
- cb();
-};
-
-UBT.configure = function(opts) {
- var ignores = ['.json'].concat(opts && opts.ignore || []);
-
- return function(file) {
- for (var i = 0; i < ignores.length; i++) {
- if (endsWith(file, ignores[i])) {
- return stream.PassThrough();
- }
- }
-
- return new UBT(file);
- }
-};
-
-UBT.transform = function(code) {
- var ast = transformer(recast.parse(code));
- return recast.print(ast).code;
-};
-
-function endsWith(str, suffix) {
- if (typeof str !== 'string' || typeof suffix !== 'string') {
- return false;
- }
- return str.indexOf(suffix, str.length - suffix.length) !== -1;
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/.npmignore b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/.npmignore
deleted file mode 100644
index 5f23cc6aad..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.DS_Store
-npm-debug.log
-/node_modules
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/README.md b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/README.md
deleted file mode 100644
index feb55dbb01..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-esmangle-evaluator
-==================
-
-[`esmangle`](https://github.com/estools/esmangle)'s `evaluator.js` as a standalone module.
-
-`evaluator.js` is an unmodified copy of the [original](https://github.com/Constellation/esmangle/blob/7e4ee597/lib/evaluator.js).
-
-`common.js` is a stub of the [original](https://github.com/Constellation/esmangle/blob/7e4ee597/lib/common.js) with a few helpers/constants required by `evaluator.js`.
-
-## Exports
-
-```js
-{
- constant: {
- doBinary: [Function: doBinary],
- doUnary: [Function: doUnary],
- doLogical: [Function: doLogical],
- evaluate: [Function: getConstant],
- isConstant: [Function: isConstant]
- },
- hasSideEffect: [Function: hasSideEffect],
- booleanCondition: [Function: booleanCondition]
-}
-```
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/common.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/common.js
deleted file mode 100644
index 330755e4d9..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/common.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
- Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*jslint bitwise:true */
-(function () {
- 'use strict';
-
- exports.Array = {};
-
- exports.Array.last = function(array) {
- return array[array.length - 1];
- };
-
- exports.unreachable = function() {
- throw new Error('Unreachable point. logically broken.');
- };
-
- exports.Syntax = {
- ArrayExpression: 'ArrayExpression',
- AssignmentExpression: 'AssignmentExpression',
- BinaryExpression: 'BinaryExpression',
- CallExpression: 'CallExpression',
- ConditionalExpression: 'ConditionalExpression',
- FunctionExpression: 'FunctionExpression',
- Identifier: 'Identifier',
- Literal: 'Literal',
- LogicalExpression: 'LogicalExpression',
- MemberExpression: 'MemberExpression',
- NewExpression: 'NewExpression',
- ObjectExpression: 'ObjectExpression',
- Property: 'Property',
- SequenceExpression: 'SequenceExpression',
- ThisExpression: 'ThisExpression',
- UnaryExpression: 'UnaryExpression',
- UpdateExpression: 'UpdateExpression'
- };
-
-}());
-/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/evaluator.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/evaluator.js
deleted file mode 100644
index 493a4fbd12..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/evaluator.js
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
- Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*jshint eqeqeq:false*/
-(function () {
- 'use strict';
-
- var Syntax, common;
-
- common = require('./common');
- Syntax = common.Syntax;
-
- // constant
-
- function isConstant(node, allowRegExp) {
- if (node.type === Syntax.Literal) {
- if (typeof node.value === 'object' && node.value !== null) {
- // This is RegExp
- return allowRegExp;
- }
- return true;
- }
- if (node.type === Syntax.UnaryExpression) {
- if (node.operator === 'void' || node.operator === 'delete' || node.operator === '!') {
- return isConstant(node.argument, true);
- }
- return isConstant(node.argument, false);
- }
- if (node.type === Syntax.BinaryExpression) {
- if (node.operator === 'in' || node.operator === 'instanceof') {
- return false;
- }
- return isConstant(node.left, false) && isConstant(node.right, false);
- }
- if (node.type === Syntax.LogicalExpression) {
- return isConstant(node.left, true) && isConstant(node.right, true);
- }
- return false;
- }
-
- function getConstant(node) {
- if (node.type === Syntax.Literal) {
- return node.value;
- }
- if (node.type === Syntax.UnaryExpression) {
- return doUnary(node.operator, getConstant(node.argument));
- }
- if (node.type === Syntax.BinaryExpression) {
- return doBinary(node.operator, getConstant(node.left), getConstant(node.right));
- }
- if (node.type === Syntax.LogicalExpression) {
- return doLogical(node.operator, getConstant(node.left), getConstant(node.right));
- }
- common.unreachable();
- }
-
- function doLogical(operator, left, right) {
- if (operator === '||') {
- return left || right;
- }
- if (operator === '&&') {
- return left && right;
- }
- common.unreachable();
- }
-
- function doUnary(operator, argument) {
- switch (operator) {
- case '+':
- return +argument;
- case '-':
- return -argument;
- case '~':
- return ~argument;
- case '!':
- return !argument;
- case 'delete':
- // do delete on constant value (not considering identifier in this tree based constant folding)
- return true;
- case 'void':
- return undefined;
- case 'typeof':
- return typeof argument;
- }
- common.unreachable();
- }
-
- function doBinary(operator, left, right) {
- switch (operator) {
- case '|':
- return left | right;
- case '^':
- return left ^ right;
- case '&':
- return left & right;
- case '==':
- return left == right;
- case '!=':
- return left != right;
- case '===':
- return left === right;
- case '!==':
- return left !== right;
- case '<':
- return left < right;
- case '>':
- return left > right;
- case '<=':
- return left <= right;
- case '>=':
- return left >= right;
- // case 'in':
- // return left in right;
- // case 'instanceof':
- // return left instanceof right;
- case '<<':
- return left << right;
- case '>>':
- return left >> right;
- case '>>>':
- return left >>> right;
- case '+':
- return left + right;
- case '-':
- return left - right;
- case '*':
- return left * right;
- case '/':
- return left / right;
- case '%':
- return left % right;
- }
- common.unreachable();
- }
-
- exports.constant = {
- doBinary: doBinary,
- doUnary: doUnary,
- doLogical: doLogical,
- evaluate: getConstant,
- isConstant: isConstant
- };
-
- // has side effect
- function hasSideEffect(expr, scope) {
- function visit(expr) {
- var i, iz, ref;
- switch (expr.type) {
- case Syntax.AssignmentExpression:
- return true;
-
- case Syntax.ArrayExpression:
- for (i = 0, iz = expr.elements.length; i < iz; ++i) {
- if (expr.elements[i] !== null && visit(expr.elements[i])) {
- return true;
- }
- }
- return false;
-
- case Syntax.BinaryExpression:
- return !isConstant(expr);
-
- case Syntax.CallExpression:
- return true;
-
- case Syntax.ConditionalExpression:
- return visit(expr.test) || visit(expr.consequent) || visit(expr.alternate);
-
- case Syntax.FunctionExpression:
- return false;
-
- case Syntax.Identifier:
- ref = scope.resolve(expr);
- if (ref && ref.isStatic()) {
- return false;
- }
- return true;
-
- case Syntax.Literal:
- return false;
-
- case Syntax.LogicalExpression:
- return visit(expr.left) || visit(expr.right);
-
- case Syntax.MemberExpression:
- return true;
-
- case Syntax.NewExpression:
- return true;
-
- case Syntax.ObjectExpression:
- for (i = 0, iz = expr.properties.length; i < iz; ++i) {
- if (visit(expr.properties[i])) {
- return true;
- }
- }
- return false;
-
- case Syntax.Property:
- return visit(expr.value);
-
- case Syntax.SequenceExpression:
- for (i = 0, iz = expr.expressions.length; i < iz; ++i) {
- if (visit(expr.expressions[i])) {
- return true;
- }
- }
- return false;
-
- case Syntax.ThisExpression:
- return false;
-
- case Syntax.UnaryExpression:
- if (expr.operator === 'void' || expr.operator === 'delete' || expr.operator === 'typeof' || expr.operator === '!') {
- return visit(expr.argument);
- }
- return !isConstant(expr);
-
- case Syntax.UpdateExpression:
- return true;
- }
- return true;
- }
-
- return visit(expr);
- }
-
- exports.hasSideEffect = hasSideEffect;
-
- // boolean decision
- // @return {boolean|null} when indeterminate value comes, returns null
- function booleanCondition(expr) {
- var ret;
- switch (expr.type) {
- case Syntax.AssignmentExpression:
- return booleanCondition(expr.right);
-
- case Syntax.ArrayExpression:
- return true;
-
- case Syntax.BinaryExpression:
- if (isConstant(expr)) {
- return !!getConstant(expr);
- }
- return null;
-
- case Syntax.CallExpression:
- return null;
-
- case Syntax.ConditionalExpression:
- ret = booleanCondition(expr.test);
- if (ret === true) {
- return booleanCondition(expr.consequent);
- }
- if (ret === false) {
- return booleanCondition(expr.alternate);
- }
- ret = booleanCondition(expr.consequent);
- if (ret === booleanCondition(expr.alternate)) {
- return ret;
- }
- return null;
-
- case Syntax.FunctionExpression:
- return true;
-
- case Syntax.Identifier:
- return null;
-
- case Syntax.Literal:
- return !!getConstant(expr);
-
- case Syntax.LogicalExpression:
- if (expr.operator === '&&') {
- ret = booleanCondition(expr.left);
- if (ret === null) {
- return null;
- }
- if (!ret) {
- return false;
- }
- return booleanCondition(expr.right);
- } else {
- ret = booleanCondition(expr.left);
- if (ret === null) {
- return null;
- }
- if (ret) {
- return true;
- }
- return booleanCondition(expr.right);
- }
- return null;
-
- case Syntax.MemberExpression:
- return null;
-
- case Syntax.NewExpression:
- // always return object
- return true;
-
- case Syntax.ObjectExpression:
- return true;
-
- case Syntax.Property:
- common.unreachable();
- return null;
-
- case Syntax.SequenceExpression:
- return booleanCondition(common.Array.last(expr.expressions));
-
- case Syntax.ThisExpression:
- // in strict mode, this may be null / undefined
- return null;
-
- case Syntax.UnaryExpression:
- if (expr.operator === 'void') {
- return false;
- }
- if (expr.operator === 'typeof') {
- return true;
- }
- if (expr.operator === '!') {
- ret = booleanCondition(expr.argument);
- if (ret === null) {
- return null;
- }
- return !ret;
- }
- if (isConstant(expr)) {
- return !!getConstant(expr);
- }
- return null;
-
- case Syntax.UpdateExpression:
- return null;
- }
-
- return null;
- }
-
- exports.booleanCondition = booleanCondition;
-}());
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/package.json b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/package.json
deleted file mode 100644
index 70b27c29da..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/esmangle-evaluator/package.json
+++ /dev/null
@@ -1,73 +0,0 @@
-{
- "_args": [
- [
- "esmangle-evaluator@^1.0.0",
- "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform"
- ]
- ],
- "_from": "esmangle-evaluator@>=1.0.0 <2.0.0",
- "_id": "esmangle-evaluator@1.0.0",
- "_inCache": true,
- "_installable": true,
- "_location": "/readable-stream/unreachable-branch-transform/esmangle-evaluator",
- "_npmUser": {
- "email": "zertosh@gmail.com",
- "name": "zertosh"
- },
- "_npmVersion": "1.4.28",
- "_phantomChildren": {},
- "_requested": {
- "name": "esmangle-evaluator",
- "raw": "esmangle-evaluator@^1.0.0",
- "rawSpec": "^1.0.0",
- "scope": null,
- "spec": ">=1.0.0 <2.0.0",
- "type": "range"
- },
- "_requiredBy": [
- "/readable-stream/unreachable-branch-transform"
- ],
- "_resolved": "https://registry.npmjs.org/esmangle-evaluator/-/esmangle-evaluator-1.0.0.tgz",
- "_shasum": "96f8de581ddfd7aa907ef2348d8b52621fe51ec8",
- "_shrinkwrap": null,
- "_spec": "esmangle-evaluator@^1.0.0",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform",
- "author": {
- "email": "zertosh@gmail.com",
- "name": "Andres Suarez"
- },
- "bugs": {
- "url": "https://github.com/zertosh/esmangle-evaluator/issues"
- },
- "dependencies": {},
- "description": "esmangle-evaluator",
- "devDependencies": {},
- "directories": {},
- "dist": {
- "shasum": "96f8de581ddfd7aa907ef2348d8b52621fe51ec8",
- "tarball": "https://registry.npmjs.org/esmangle-evaluator/-/esmangle-evaluator-1.0.0.tgz"
- },
- "gitHead": "4165b0099a4e5285fc16b560a9f45ceaa2957920",
- "homepage": "https://github.com/zertosh/esmangle-evaluator",
- "keywords": [
- "ast",
- "esmangle"
- ],
- "licence": "MIT",
- "main": "evaluator.js",
- "maintainers": [
- {
- "email": "zertosh@gmail.com",
- "name": "zertosh"
- }
- ],
- "name": "esmangle-evaluator",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/zertosh/esmangle-evaluator.git"
- },
- "scripts": {},
- "version": "1.0.0"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/.editorconfig b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/.editorconfig
deleted file mode 100644
index 9541a249ba..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/.editorconfig
+++ /dev/null
@@ -1,3 +0,0 @@
-[*.js]
-indent_style = space
-indent_size = 4 \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/.npmignore b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/.npmignore
deleted file mode 100644
index e216ae5e13..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/node_modules
-/test
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/.travis.yml b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/.travis.yml
deleted file mode 100644
index 10219eaa16..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-language: node_js
-node_js:
- - "4.0"
- - "iojs"
- - "0.12"
- - "0.11"
- - "0.10"
- - "0.8"
-
-matrix:
- allow_failures:
- - node_js: "0.8"
-
-# Allow Travis tests to run in containers.
-sudo: false
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/LICENSE b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/LICENSE
deleted file mode 100644
index 527755ba7a..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2012 Ben Newman <bn@cs.stanford.edu>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/README.md b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/README.md
deleted file mode 100644
index 81bc47adb0..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/README.md
+++ /dev/null
@@ -1,143 +0,0 @@
-# recast, _v_. [![Build Status](https://travis-ci.org/benjamn/recast.svg?branch=master)](https://travis-ci.org/benjamn/recast) [![Join the chat at https://gitter.im/benjamn/recast](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/benjamn/recast?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
-
-1. to give (a metal object) a different form by melting it down and reshaping it.
-1. to form, fashion, or arrange again.
-1. to remodel or reconstruct (a literary work, document, sentence, etc.).
-1. to supply (a theater or opera work) with a new cast.
-
-Installation
----
-
-From NPM:
-
- npm install recast
-
-From GitHub:
-
- cd path/to/node_modules
- git clone git://github.com/benjamn/recast.git
- cd recast
- npm install .
-
-Usage
----
-
-In less poetic terms, Recast exposes two essential interfaces, one for parsing JavaScript code (`require("recast").parse`) and the other for reprinting modified syntax trees (`require("recast").print`).
-
-Here's a simple but non-trivial example of how you might use `.parse` and `.print`:
-```js
-var recast = require("recast");
-
-// Let's turn this function declaration into a variable declaration.
-var code = [
- "function add(a, b) {",
- " return a +",
- " // Weird formatting, huh?",
- " b;",
- "}"
-].join("\n");
-
-// Parse the code using an interface similar to require("esprima").parse.
-var ast = recast.parse(code);
-```
-Now do *whatever* you want to `ast`. Really, anything at all!
-
-See [ast-types](https://github.com/benjamn/ast-types) (especially the [def/core.js](https://github.com/benjamn/ast-types/blob/master/def/core.js)) module for a thorough overview of the `ast` api.
-```js
-// Grab a reference to the function declaration we just parsed.
-var add = ast.program.body[0];
-
-// Make sure it's a FunctionDeclaration (optional).
-var n = recast.types.namedTypes;
-n.FunctionDeclaration.assert(add);
-
-// If you choose to use recast.builders to construct new AST nodes, all builder
-// arguments will be dynamically type-checked against the Mozilla Parser API.
-var b = recast.types.builders;
-
-// This kind of manipulation should seem familiar if you've used Esprima or the
-// Mozilla Parser API before.
-ast.program.body[0] = b.variableDeclaration("var", [
- b.variableDeclarator(add.id, b.functionExpression(
- null, // Anonymize the function expression.
- add.params,
- add.body
- ))
-]);
-
-// Just for fun, because addition is commutative:
-add.params.push(add.params.shift());
-```
-When you finish manipulating the AST, let `recast.print` work its magic:
-```js
-var output = recast.print(ast).code;
-```
-The `output` string now looks exactly like this, weird formatting and all:
-```js
-var add = function(b, a) {
- return a +
- // Weird formatting, huh?
- b;
-}
-```
-The magic of Recast is that it reprints only those parts of the syntax tree that you modify. In other words, the following identity is guaranteed:
-```js
-recast.print(recast.parse(source)).code === source
-```
-Whenever Recast cannot reprint a modified node using the original source code, it falls back to using a generic pretty printer. So the worst that can happen is that your changes trigger some harmless reformatting of your code.
-
-If you really don't care about preserving the original formatting, you can access the pretty printer directly:
-```js
-var output = recast.prettyPrint(ast, { tabWidth: 2 }).code;
-```
-And here's the exact `output`:
-```js
-var add = function(b, a) {
- return a + b;
-}
-```
-Note that the weird formatting was discarded, yet the behavior and abstract structure of the code remain the same.
-
-Source maps
----
-
-One of the coolest consequences of tracking and reusing original source code during reprinting is that it's pretty easy to generate a high-resolution mapping between the original code and the generated code—completely automatically!
-
-With every `slice`, `join`, and re-`indent`-ation, the reprinting process maintains exact knowledge of which character sequences are original, and where in the original source they came from.
-
-All you have to think about is how to manipulate the syntax tree, and Recast will give you a [source map](https://github.com/mozilla/source-map) in exchange for specifying the names of your source file(s) and the desired name of the map:
-```js
-var result = recast.print(transform(recast.parse(source, {
- sourceFileName: "source.js"
-})), {
- sourceMapName: "map.json"
-});
-
-console.log(result.code); // Resulting string of code.
-console.log(result.map); // JSON source map.
-
-var SourceMapConsumer = require("source-map").SourceMapConsumer;
-var smc = new SourceMapConsumer(result.map);
-console.log(smc.originalPositionFor({
- line: 3,
- column: 15
-})); // { source: 'source.js',
- // line: 2,
- // column: 10,
- // name: null }
-```
-
-Note that you are free to mix and match syntax trees parsed from different source files, and the resulting source map will automatically keep track of the separate file origins for you.
-
-Note also that the source maps generated by Recast are character-by-character maps, so meaningful identifier names are not recorded at this time. This approach leads to higher-resolution debugging in modern browsers, at the expense of somewhat larger map sizes. Striking the perfect balance here is an area for future exploration, but such improvements will not require any breaking changes to the interface demonstrated above.
-
-Motivation
----
-
-The more code you have, the harder it becomes to make big, sweeping changes quickly and confidently. Even if you trust yourself not to make too many mistakes, and no matter how proficient you are with your text editor, changing tens of thousands of lines of code takes precious, non-refundable time.
-
-Is there a better way? Not always! When a task requires you to alter the semantics of many different pieces of code in subtly different ways, your brain inevitably becomes the bottleneck, and there is little hope of completely automating the process. Your best bet is to plan carefully, buckle down, and get it right the first time. Love it or loathe it, that's the way programming goes sometimes.
-
-What I hope to eliminate are the brain-wasting tasks, the tasks that are bottlenecked by keystrokes, the tasks that can be expressed as operations on the _syntactic structure_ of your code. Specifically, my goal is to make it possible for you to run your code through a parser, manipulate the abstract syntax tree directly, subject only to the constraints of your imagination, and then automatically translate those modifications back into source code, without upsetting the formatting of unmodified code.
-
-And here's the best part: when you're done running a Recast script, if you're not completely satisfied with the results, blow them away with `git reset --hard`, tweak the script, and just run it again. Change your mind as many times as you like. Instead of typing yourself into a nasty case of [RSI](http://en.wikipedia.org/wiki/Repetitive_strain_injury), gaze upon your new wells of free time and ask yourself: what next?
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/example/add-braces b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/example/add-braces
deleted file mode 100755
index 0c6901d09f..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/example/add-braces
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/env node
-
-var recast = require("recast");
-var types = recast.types;
-var n = types.namedTypes;
-var b = types.builders;
-
-require("recast").run(function(ast, callback) {
- recast.visit(ast, {
- visitIfStatement: function(path) {
- var stmt = path.node;
- stmt.consequent = fix(stmt.consequent);
-
- var alt = stmt.alternate;
- if (!n.IfStatement.check(alt)) {
- stmt.alternate = fix(alt);
- }
-
- this.traverse(path);
- },
-
- visitWhileStatement: visitLoop,
- visitForStatement: visitLoop,
- visitForInStatement: visitLoop
- });
-
- callback(ast);
-});
-
-function visitLoop(path) {
- var loop = path.node;
- loop.body = fix(loop.body);
- this.traverse(path);
-}
-
-function fix(clause) {
- if (clause) {
- if (!n.BlockStatement.check(clause)) {
- clause = b.blockStatement([clause]);
- }
- }
-
- return clause;
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/example/generic-identity b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/example/generic-identity
deleted file mode 100755
index a8364c350d..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/example/generic-identity
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env node
-
-// This script should reprint the contents of the given file without
-// reusing the original source, but with identical AST structure.
-
-var recast = require("recast");
-
-recast.run(function(ast, callback) {
- recast.visit(ast, {
- visitNode: function(path) {
- this.traverse(path);
- path.node.original = null;
- }
- });
-
- callback(ast);
-});
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/example/identity b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/example/identity
deleted file mode 100755
index 62981b8f68..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/example/identity
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env node
-
-// This script should echo the contents of the given file without
-// modification.
-
-require("recast").run(function(ast, callback) {
- callback(ast);
-});
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/example/to-while b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/example/to-while
deleted file mode 100755
index 99222223f8..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/example/to-while
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/env node
-
-// This script converts for and do-while loops into equivalent while loops.
-// Note that for-in statements are left unmodified, as they do not have a
-// simple analogy to while loops. Also note that labeled continue statements
-// are not correctly handled at this point, and will trigger an assertion
-// failure if encountered.
-
-var assert = require("assert");
-var recast = require("recast");
-var types = recast.types;
-var n = types.namedTypes;
-var b = types.builders;
-
-recast.run(function(ast, callback) {
- recast.visit(ast, {
- visitForStatement: function(path) {
- var fst = path.node;
-
- path.replace(
- fst.init,
- b.whileStatement(
- fst.test,
- insertBeforeLoopback(fst, fst.update)
- )
- );
-
- this.traverse(path);
- },
-
- visitDoWhileStatement: function(path) {
- var dwst = path.node;
- return b.whileStatement(
- b.literal(true),
- insertBeforeLoopback(
- dwst,
- b.ifStatement(
- dwst.test,
- b.breakStatement()
- )
- )
- );
- }
- });
-
- callback(ast);
-});
-
-function insertBeforeLoopback(loop, toInsert) {
- var body = loop.body;
-
- if (!n.Statement.check(toInsert)) {
- toInsert = b.expressionStatement(toInsert);
- }
-
- if (n.BlockStatement.check(body)) {
- body.body.push(toInsert);
- } else {
- body = b.blockStatement([body, toInsert]);
- loop.body = body;
- }
-
- recast.visit(body, {
- visitContinueStatement: function(path) {
- var cst = path.node;
-
- assert.equal(
- cst.label, null,
- "Labeled continue statements are not yet supported."
- );
-
- path.replace(toInsert, path.node);
- return false;
- },
-
- // Do not descend into nested loops.
- visitWhileStatement: function() {},
- visitForStatement: function() {},
- visitForInStatement: function() {},
- visitDoWhileStatement: function() {}
- });
-
- return body;
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/comments.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/comments.js
deleted file mode 100644
index 7a32b56a05..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/comments.js
+++ /dev/null
@@ -1,351 +0,0 @@
-var assert = require("assert");
-var types = require("./types");
-var n = types.namedTypes;
-var isArray = types.builtInTypes.array;
-var isObject = types.builtInTypes.object;
-var linesModule = require("./lines");
-var fromString = linesModule.fromString;
-var Lines = linesModule.Lines;
-var concat = linesModule.concat;
-var util = require("./util");
-var comparePos = util.comparePos;
-var childNodesCacheKey = require("private").makeUniqueKey();
-
-// TODO Move a non-caching implementation of this function into ast-types,
-// and implement a caching wrapper function here.
-function getSortedChildNodes(node, lines, resultArray) {
- if (!node) {
- return;
- }
-
- // The .loc checks below are sensitive to some of the problems that
- // are fixed by this utility function. Specifically, if it decides to
- // set node.loc to null, indicating that the node's .loc information
- // is unreliable, then we don't want to add node to the resultArray.
- util.fixFaultyLocations(node, lines);
-
- if (resultArray) {
- if (n.Node.check(node) &&
- n.SourceLocation.check(node.loc)) {
- // This reverse insertion sort almost always takes constant
- // time because we almost always (maybe always?) append the
- // nodes in order anyway.
- for (var i = resultArray.length - 1; i >= 0; --i) {
- if (comparePos(resultArray[i].loc.end,
- node.loc.start) <= 0) {
- break;
- }
- }
- resultArray.splice(i + 1, 0, node);
- return;
- }
- } else if (node[childNodesCacheKey]) {
- return node[childNodesCacheKey];
- }
-
- var names;
- if (isArray.check(node)) {
- names = Object.keys(node);
- } else if (isObject.check(node)) {
- names = types.getFieldNames(node);
- } else {
- return;
- }
-
- if (!resultArray) {
- Object.defineProperty(node, childNodesCacheKey, {
- value: resultArray = [],
- enumerable: false
- });
- }
-
- for (var i = 0, nameCount = names.length; i < nameCount; ++i) {
- getSortedChildNodes(node[names[i]], lines, resultArray);
- }
-
- return resultArray;
-}
-
-// As efficiently as possible, decorate the comment object with
-// .precedingNode, .enclosingNode, and/or .followingNode properties, at
-// least one of which is guaranteed to be defined.
-function decorateComment(node, comment, lines) {
- var childNodes = getSortedChildNodes(node, lines);
-
- // Time to dust off the old binary search robes and wizard hat.
- var left = 0, right = childNodes.length;
- while (left < right) {
- var middle = (left + right) >> 1;
- var child = childNodes[middle];
-
- if (comparePos(child.loc.start, comment.loc.start) <= 0 &&
- comparePos(comment.loc.end, child.loc.end) <= 0) {
- // The comment is completely contained by this child node.
- decorateComment(comment.enclosingNode = child, comment, lines);
- return; // Abandon the binary search at this level.
- }
-
- if (comparePos(child.loc.end, comment.loc.start) <= 0) {
- // This child node falls completely before the comment.
- // Because we will never consider this node or any nodes
- // before it again, this node must be the closest preceding
- // node we have encountered so far.
- var precedingNode = child;
- left = middle + 1;
- continue;
- }
-
- if (comparePos(comment.loc.end, child.loc.start) <= 0) {
- // This child node falls completely after the comment.
- // Because we will never consider this node or any nodes after
- // it again, this node must be the closest following node we
- // have encountered so far.
- var followingNode = child;
- right = middle;
- continue;
- }
-
- throw new Error("Comment location overlaps with node location");
- }
-
- if (precedingNode) {
- comment.precedingNode = precedingNode;
- }
-
- if (followingNode) {
- comment.followingNode = followingNode;
- }
-}
-
-exports.attach = function(comments, ast, lines) {
- if (!isArray.check(comments)) {
- return;
- }
-
- var tiesToBreak = [];
-
- comments.forEach(function(comment) {
- comment.loc.lines = lines;
- decorateComment(ast, comment, lines);
-
- var pn = comment.precedingNode;
- var en = comment.enclosingNode;
- var fn = comment.followingNode;
-
- if (pn && fn) {
- var tieCount = tiesToBreak.length;
- if (tieCount > 0) {
- var lastTie = tiesToBreak[tieCount - 1];
-
- assert.strictEqual(
- lastTie.precedingNode === comment.precedingNode,
- lastTie.followingNode === comment.followingNode
- );
-
- if (lastTie.followingNode !== comment.followingNode) {
- breakTies(tiesToBreak, lines);
- }
- }
-
- tiesToBreak.push(comment);
-
- } else if (pn) {
- // No contest: we have a trailing comment.
- breakTies(tiesToBreak, lines);
- addTrailingComment(pn, comment);
-
- } else if (fn) {
- // No contest: we have a leading comment.
- breakTies(tiesToBreak, lines);
- addLeadingComment(fn, comment);
-
- } else if (en) {
- // The enclosing node has no child nodes at all, so what we
- // have here is a dangling comment, e.g. [/* crickets */].
- breakTies(tiesToBreak, lines);
- addDanglingComment(en, comment);
-
- } else {
- throw new Error("AST contains no nodes at all?");
- }
- });
-
- breakTies(tiesToBreak, lines);
-
- comments.forEach(function(comment) {
- // These node references were useful for breaking ties, but we
- // don't need them anymore, and they create cycles in the AST that
- // may lead to infinite recursion if we don't delete them here.
- delete comment.precedingNode;
- delete comment.enclosingNode;
- delete comment.followingNode;
- });
-};
-
-function breakTies(tiesToBreak, lines) {
- var tieCount = tiesToBreak.length;
- if (tieCount === 0) {
- return;
- }
-
- var pn = tiesToBreak[0].precedingNode;
- var fn = tiesToBreak[0].followingNode;
- var gapEndPos = fn.loc.start;
-
- // Iterate backwards through tiesToBreak, examining the gaps
- // between the tied comments. In order to qualify as leading, a
- // comment must be separated from fn by an unbroken series of
- // whitespace-only gaps (or other comments).
- for (var indexOfFirstLeadingComment = tieCount;
- indexOfFirstLeadingComment > 0;
- --indexOfFirstLeadingComment) {
- var comment = tiesToBreak[indexOfFirstLeadingComment - 1];
- assert.strictEqual(comment.precedingNode, pn);
- assert.strictEqual(comment.followingNode, fn);
-
- var gap = lines.sliceString(comment.loc.end, gapEndPos);
- if (/\S/.test(gap)) {
- // The gap string contained something other than whitespace.
- break;
- }
-
- gapEndPos = comment.loc.start;
- }
-
- while (indexOfFirstLeadingComment <= tieCount &&
- (comment = tiesToBreak[indexOfFirstLeadingComment]) &&
- // If the comment is a //-style comment and indented more
- // deeply than the node itself, reconsider it as trailing.
- (comment.type === "Line" || comment.type === "CommentLine") &&
- comment.loc.start.column > fn.loc.start.column) {
- ++indexOfFirstLeadingComment;
- }
-
- tiesToBreak.forEach(function(comment, i) {
- if (i < indexOfFirstLeadingComment) {
- addTrailingComment(pn, comment);
- } else {
- addLeadingComment(fn, comment);
- }
- });
-
- tiesToBreak.length = 0;
-}
-
-function addCommentHelper(node, comment) {
- var comments = node.comments || (node.comments = []);
- comments.push(comment);
-}
-
-function addLeadingComment(node, comment) {
- comment.leading = true;
- comment.trailing = false;
- addCommentHelper(node, comment);
-}
-
-function addDanglingComment(node, comment) {
- comment.leading = false;
- comment.trailing = false;
- addCommentHelper(node, comment);
-}
-
-function addTrailingComment(node, comment) {
- comment.leading = false;
- comment.trailing = true;
- addCommentHelper(node, comment);
-}
-
-function printLeadingComment(commentPath, print) {
- var comment = commentPath.getValue();
- n.Comment.assert(comment);
-
- var loc = comment.loc;
- var lines = loc && loc.lines;
- var parts = [print(commentPath)];
-
- if (comment.trailing) {
- // When we print trailing comments as leading comments, we don't
- // want to bring any trailing spaces along.
- parts.push("\n");
-
- } else if (lines instanceof Lines) {
- var trailingSpace = lines.slice(
- loc.end,
- lines.skipSpaces(loc.end)
- );
-
- if (trailingSpace.length === 1) {
- // If the trailing space contains no newlines, then we want to
- // preserve it exactly as we found it.
- parts.push(trailingSpace);
- } else {
- // If the trailing space contains newlines, then replace it
- // with just that many newlines, with all other spaces removed.
- parts.push(new Array(trailingSpace.length).join("\n"));
- }
-
- } else {
- parts.push("\n");
- }
-
- return concat(parts);
-}
-
-function printTrailingComment(commentPath, print) {
- var comment = commentPath.getValue(commentPath);
- n.Comment.assert(comment);
-
- var loc = comment.loc;
- var lines = loc && loc.lines;
- var parts = [];
-
- if (lines instanceof Lines) {
- var fromPos = lines.skipSpaces(loc.start, true) || lines.firstPos();
- var leadingSpace = lines.slice(fromPos, loc.start);
-
- if (leadingSpace.length === 1) {
- // If the leading space contains no newlines, then we want to
- // preserve it exactly as we found it.
- parts.push(leadingSpace);
- } else {
- // If the leading space contains newlines, then replace it
- // with just that many newlines, sans all other spaces.
- parts.push(new Array(leadingSpace.length).join("\n"));
- }
- }
-
- parts.push(print(commentPath));
-
- return concat(parts);
-}
-
-exports.printComments = function(path, print) {
- var value = path.getValue();
- var innerLines = print(path);
- var comments = n.Node.check(value) &&
- types.getFieldValue(value, "comments");
-
- if (!comments || comments.length === 0) {
- return innerLines;
- }
-
- var leadingParts = [];
- var trailingParts = [innerLines];
-
- path.each(function(commentPath) {
- var comment = commentPath.getValue();
- var leading = types.getFieldValue(comment, "leading");
- var trailing = types.getFieldValue(comment, "trailing");
-
- if (leading || (trailing && !(n.Statement.check(value) ||
- comment.type === "Block" ||
- comment.type === "CommentBlock"))) {
- leadingParts.push(printLeadingComment(commentPath, print));
- } else if (trailing) {
- trailingParts.push(printTrailingComment(commentPath, print));
- }
- }, "comments");
-
- leadingParts.push.apply(leadingParts, trailingParts);
- return concat(leadingParts);
-};
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/fast-path.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/fast-path.js
deleted file mode 100644
index 8f293ebffb..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/fast-path.js
+++ /dev/null
@@ -1,477 +0,0 @@
-var assert = require("assert");
-var types = require("./types");
-var n = types.namedTypes;
-var Node = n.Node;
-var isArray = types.builtInTypes.array;
-var isNumber = types.builtInTypes.number;
-
-function FastPath(value) {
- assert.ok(this instanceof FastPath);
- this.stack = [value];
-}
-
-var FPp = FastPath.prototype;
-module.exports = FastPath;
-
-// Static convenience function for coercing a value to a FastPath.
-FastPath.from = function(obj) {
- if (obj instanceof FastPath) {
- // Return a defensive copy of any existing FastPath instances.
- return obj.copy();
- }
-
- if (obj instanceof types.NodePath) {
- // For backwards compatibility, unroll NodePath instances into
- // lightweight FastPath [..., name, value] stacks.
- var copy = Object.create(FastPath.prototype);
- var stack = [obj.value];
- for (var pp; (pp = obj.parentPath); obj = pp)
- stack.push(obj.name, pp.value);
- copy.stack = stack.reverse();
- return copy;
- }
-
- // Otherwise use obj as the value of the new FastPath instance.
- return new FastPath(obj);
-};
-
-FPp.copy = function copy() {
- var copy = Object.create(FastPath.prototype);
- copy.stack = this.stack.slice(0);
- return copy;
-};
-
-// The name of the current property is always the penultimate element of
-// this.stack, and always a String.
-FPp.getName = function getName() {
- var s = this.stack;
- var len = s.length;
- if (len > 1) {
- return s[len - 2];
- }
- // Since the name is always a string, null is a safe sentinel value to
- // return if we do not know the name of the (root) value.
- return null;
-};
-
-// The value of the current property is always the final element of
-// this.stack.
-FPp.getValue = function getValue() {
- var s = this.stack;
- return s[s.length - 1];
-};
-
-function getNodeHelper(path, count) {
- var s = path.stack;
-
- for (var i = s.length - 1; i >= 0; i -= 2) {
- var value = s[i];
- if (n.Node.check(value) && --count < 0) {
- return value;
- }
- }
-
- return null;
-}
-
-FPp.getNode = function getNode(count) {
- return getNodeHelper(this, ~~count);
-};
-
-FPp.getParentNode = function getParentNode(count) {
- return getNodeHelper(this, ~~count + 1);
-};
-
-// The length of the stack can be either even or odd, depending on whether
-// or not we have a name for the root value. The difference between the
-// index of the root value and the index of the final value is always
-// even, though, which allows us to return the root value in constant time
-// (i.e. without iterating backwards through the stack).
-FPp.getRootValue = function getRootValue() {
- var s = this.stack;
- if (s.length % 2 === 0) {
- return s[1];
- }
- return s[0];
-};
-
-// Temporarily push properties named by string arguments given after the
-// callback function onto this.stack, then call the callback with a
-// reference to this (modified) FastPath object. Note that the stack will
-// be restored to its original state after the callback is finished, so it
-// is probably a mistake to retain a reference to the path.
-FPp.call = function call(callback/*, name1, name2, ... */) {
- var s = this.stack;
- var origLen = s.length;
- var value = s[origLen - 1];
- var argc = arguments.length;
- for (var i = 1; i < argc; ++i) {
- var name = arguments[i];
- value = value[name];
- s.push(name, value);
- }
- var result = callback(this);
- s.length = origLen;
- return result;
-};
-
-// Similar to FastPath.prototype.call, except that the value obtained by
-// accessing this.getValue()[name1][name2]... should be array-like. The
-// callback will be called with a reference to this path object for each
-// element of the array.
-FPp.each = function each(callback/*, name1, name2, ... */) {
- var s = this.stack;
- var origLen = s.length;
- var value = s[origLen - 1];
- var argc = arguments.length;
-
- for (var i = 1; i < argc; ++i) {
- var name = arguments[i];
- value = value[name];
- s.push(name, value);
- }
-
- for (var i = 0; i < value.length; ++i) {
- if (i in value) {
- s.push(i, value[i]);
- // If the callback needs to know the value of i, call
- // path.getName(), assuming path is the parameter name.
- callback(this);
- s.length -= 2;
- }
- }
-
- s.length = origLen;
-};
-
-// Similar to FastPath.prototype.each, except that the results of the
-// callback function invocations are stored in an array and returned at
-// the end of the iteration.
-FPp.map = function map(callback/*, name1, name2, ... */) {
- var s = this.stack;
- var origLen = s.length;
- var value = s[origLen - 1];
- var argc = arguments.length;
-
- for (var i = 1; i < argc; ++i) {
- var name = arguments[i];
- value = value[name];
- s.push(name, value);
- }
-
- var result = new Array(value.length);
-
- for (var i = 0; i < value.length; ++i) {
- if (i in value) {
- s.push(i, value[i]);
- result[i] = callback(this, i);
- s.length -= 2;
- }
- }
-
- s.length = origLen;
-
- return result;
-};
-
-// Inspired by require("ast-types").NodePath.prototype.needsParens, but
-// more efficient because we're iterating backwards through a stack.
-FPp.needsParens = function(assumeExpressionContext) {
- var parent = this.getParentNode();
- if (!parent) {
- return false;
- }
-
- var name = this.getName();
- var node = this.getNode();
-
- // If the value of this path is some child of a Node and not a Node
- // itself, then it doesn't need parentheses. Only Node objects (in
- // fact, only Expression nodes) need parentheses.
- if (this.getValue() !== node) {
- return false;
- }
-
- // Only expressions need parentheses.
- if (!n.Expression.check(node)) {
- return false;
- }
-
- // Identifiers never need parentheses.
- if (node.type === "Identifier") {
- return false;
- }
-
- if (parent.type === "ParenthesizedExpression") {
- return false;
- }
-
- switch (node.type) {
- case "UnaryExpression":
- case "SpreadElement":
- case "SpreadProperty":
- return parent.type === "MemberExpression"
- && name === "object"
- && parent.object === node;
-
- case "BinaryExpression":
- case "LogicalExpression":
- switch (parent.type) {
- case "CallExpression":
- return name === "callee"
- && parent.callee === node;
-
- case "UnaryExpression":
- case "SpreadElement":
- case "SpreadProperty":
- return true;
-
- case "MemberExpression":
- return name === "object"
- && parent.object === node;
-
- case "BinaryExpression":
- case "LogicalExpression":
- var po = parent.operator;
- var pp = PRECEDENCE[po];
- var no = node.operator;
- var np = PRECEDENCE[no];
-
- if (pp > np) {
- return true;
- }
-
- if (pp === np && name === "right") {
- assert.strictEqual(parent.right, node);
- return true;
- }
-
- default:
- return false;
- }
-
- case "SequenceExpression":
- switch (parent.type) {
- case "ForStatement":
- // Although parentheses wouldn't hurt around sequence
- // expressions in the head of for loops, traditional style
- // dictates that e.g. i++, j++ should not be wrapped with
- // parentheses.
- return false;
-
- case "ExpressionStatement":
- return name !== "expression";
-
- default:
- // Otherwise err on the side of overparenthesization, adding
- // explicit exceptions above if this proves overzealous.
- return true;
- }
-
- case "YieldExpression":
- switch (parent.type) {
- case "BinaryExpression":
- case "LogicalExpression":
- case "UnaryExpression":
- case "SpreadElement":
- case "SpreadProperty":
- case "CallExpression":
- case "MemberExpression":
- case "NewExpression":
- case "ConditionalExpression":
- case "YieldExpression":
- return true;
-
- default:
- return false;
- }
-
- case "Literal":
- return parent.type === "MemberExpression"
- && isNumber.check(node.value)
- && name === "object"
- && parent.object === node;
-
- case "AssignmentExpression":
- case "ConditionalExpression":
- switch (parent.type) {
- case "UnaryExpression":
- case "SpreadElement":
- case "SpreadProperty":
- case "BinaryExpression":
- case "LogicalExpression":
- return true;
-
- case "CallExpression":
- return name === "callee"
- && parent.callee === node;
-
- case "ConditionalExpression":
- return name === "test"
- && parent.test === node;
-
- case "MemberExpression":
- return name === "object"
- && parent.object === node;
-
- default:
- return false;
- }
-
- case "ArrowFunctionExpression":
- if(parent.type === 'CallExpression' &&
- name === 'callee') {
- return true;
- };
-
- return isBinary(parent);
-
- case "ObjectExpression":
- if (parent.type === "ArrowFunctionExpression" &&
- name === "body") {
- return true;
- }
-
- default:
- if (parent.type === "NewExpression" &&
- name === "callee" &&
- parent.callee === node) {
- return containsCallExpression(node);
- }
- }
-
- if (assumeExpressionContext !== true &&
- !this.canBeFirstInStatement() &&
- this.firstInStatement())
- return true;
-
- return false;
-};
-
-function isBinary(node) {
- return n.BinaryExpression.check(node)
- || n.LogicalExpression.check(node);
-}
-
-function isUnaryLike(node) {
- return n.UnaryExpression.check(node)
- // I considered making SpreadElement and SpreadProperty subtypes
- // of UnaryExpression, but they're not really Expression nodes.
- || (n.SpreadElement && n.SpreadElement.check(node))
- || (n.SpreadProperty && n.SpreadProperty.check(node));
-}
-
-var PRECEDENCE = {};
-[["||"],
- ["&&"],
- ["|"],
- ["^"],
- ["&"],
- ["==", "===", "!=", "!=="],
- ["<", ">", "<=", ">=", "in", "instanceof"],
- [">>", "<<", ">>>"],
- ["+", "-"],
- ["*", "/", "%"]
-].forEach(function(tier, i) {
- tier.forEach(function(op) {
- PRECEDENCE[op] = i;
- });
-});
-
-function containsCallExpression(node) {
- if (n.CallExpression.check(node)) {
- return true;
- }
-
- if (isArray.check(node)) {
- return node.some(containsCallExpression);
- }
-
- if (n.Node.check(node)) {
- return types.someField(node, function(name, child) {
- return containsCallExpression(child);
- });
- }
-
- return false;
-}
-
-FPp.canBeFirstInStatement = function() {
- var node = this.getNode();
- return !n.FunctionExpression.check(node)
- && !n.ObjectExpression.check(node);
-};
-
-FPp.firstInStatement = function() {
- var s = this.stack;
- var parentName, parent;
- var childName, child;
-
- for (var i = s.length - 1; i >= 0; i -= 2) {
- if (n.Node.check(s[i])) {
- childName = parentName;
- child = parent;
- parentName = s[i - 1];
- parent = s[i];
- }
-
- if (!parent || !child) {
- continue;
- }
-
- if (n.BlockStatement.check(parent) &&
- parentName === "body" &&
- childName === 0) {
- assert.strictEqual(parent.body[0], child);
- return true;
- }
-
- if (n.ExpressionStatement.check(parent) &&
- childName === "expression") {
- assert.strictEqual(parent.expression, child);
- return true;
- }
-
- if (n.SequenceExpression.check(parent) &&
- parentName === "expressions" &&
- childName === 0) {
- assert.strictEqual(parent.expressions[0], child);
- continue;
- }
-
- if (n.CallExpression.check(parent) &&
- childName === "callee") {
- assert.strictEqual(parent.callee, child);
- continue;
- }
-
- if (n.MemberExpression.check(parent) &&
- childName === "object") {
- assert.strictEqual(parent.object, child);
- continue;
- }
-
- if (n.ConditionalExpression.check(parent) &&
- childName === "test") {
- assert.strictEqual(parent.test, child);
- continue;
- }
-
- if (isBinary(parent) &&
- childName === "left") {
- assert.strictEqual(parent.left, child);
- continue;
- }
-
- if (n.UnaryExpression.check(parent) &&
- !parent.prefix &&
- childName === "argument") {
- assert.strictEqual(parent.argument, child);
- continue;
- }
-
- return false;
- }
-
- return true;
-};
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/lines.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/lines.js
deleted file mode 100644
index b83f8a9521..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/lines.js
+++ /dev/null
@@ -1,878 +0,0 @@
-var assert = require("assert");
-var sourceMap = require("source-map");
-var normalizeOptions = require("./options").normalize;
-var secretKey = require("private").makeUniqueKey();
-var types = require("./types");
-var isString = types.builtInTypes.string;
-var comparePos = require("./util").comparePos;
-var Mapping = require("./mapping");
-
-// Goals:
-// 1. Minimize new string creation.
-// 2. Keep (de)identation O(lines) time.
-// 3. Permit negative indentations.
-// 4. Enforce immutability.
-// 5. No newline characters.
-
-function getSecret(lines) {
- return lines[secretKey];
-}
-
-function Lines(infos, sourceFileName) {
- assert.ok(this instanceof Lines);
- assert.ok(infos.length > 0);
-
- if (sourceFileName) {
- isString.assert(sourceFileName);
- } else {
- sourceFileName = null;
- }
-
- Object.defineProperty(this, secretKey, {
- value: {
- infos: infos,
- mappings: [],
- name: sourceFileName,
- cachedSourceMap: null
- }
- });
-
- if (sourceFileName) {
- getSecret(this).mappings.push(new Mapping(this, {
- start: this.firstPos(),
- end: this.lastPos()
- }));
- }
-}
-
-// Exposed for instanceof checks. The fromString function should be used
-// to create new Lines objects.
-exports.Lines = Lines;
-var Lp = Lines.prototype;
-
-// These properties used to be assigned to each new object in the Lines
-// constructor, but we can more efficiently stuff them into the secret and
-// let these lazy accessors compute their values on-the-fly.
-Object.defineProperties(Lp, {
- length: {
- get: function() {
- return getSecret(this).infos.length;
- }
- },
-
- name: {
- get: function() {
- return getSecret(this).name;
- }
- }
-});
-
-function copyLineInfo(info) {
- return {
- line: info.line,
- indent: info.indent,
- locked: info.locked,
- sliceStart: info.sliceStart,
- sliceEnd: info.sliceEnd
- };
-}
-
-var fromStringCache = {};
-var hasOwn = fromStringCache.hasOwnProperty;
-var maxCacheKeyLen = 10;
-
-function countSpaces(spaces, tabWidth) {
- var count = 0;
- var len = spaces.length;
-
- for (var i = 0; i < len; ++i) {
- switch (spaces.charCodeAt(i)) {
- case 9: // '\t'
- assert.strictEqual(typeof tabWidth, "number");
- assert.ok(tabWidth > 0);
-
- var next = Math.ceil(count / tabWidth) * tabWidth;
- if (next === count) {
- count += tabWidth;
- } else {
- count = next;
- }
-
- break;
-
- case 11: // '\v'
- case 12: // '\f'
- case 13: // '\r'
- case 0xfeff: // zero-width non-breaking space
- // These characters contribute nothing to indentation.
- break;
-
- case 32: // ' '
- default: // Treat all other whitespace like ' '.
- count += 1;
- break;
- }
- }
-
- return count;
-}
-exports.countSpaces = countSpaces;
-
-var leadingSpaceExp = /^\s*/;
-
-// As specified here: http://www.ecma-international.org/ecma-262/6.0/#sec-line-terminators
-var lineTerminatorSeqExp =
- /\u000D\u000A|\u000D(?!\u000A)|\u000A|\u2028|\u2029/;
-
-/**
- * @param {Object} options - Options object that configures printing.
- */
-function fromString(string, options) {
- if (string instanceof Lines)
- return string;
-
- string += "";
-
- var tabWidth = options && options.tabWidth;
- var tabless = string.indexOf("\t") < 0;
- var locked = !! (options && options.locked);
- var cacheable = !options && tabless && (string.length <= maxCacheKeyLen);
-
- assert.ok(tabWidth || tabless, "No tab width specified but encountered tabs in string\n" + string);
-
- if (cacheable && hasOwn.call(fromStringCache, string))
- return fromStringCache[string];
-
- var lines = new Lines(string.split(lineTerminatorSeqExp).map(function(line) {
- var spaces = leadingSpaceExp.exec(line)[0];
- return {
- line: line,
- indent: countSpaces(spaces, tabWidth),
- // Boolean indicating whether this line can be reindented.
- locked: locked,
- sliceStart: spaces.length,
- sliceEnd: line.length
- };
- }), normalizeOptions(options).sourceFileName);
-
- if (cacheable)
- fromStringCache[string] = lines;
-
- return lines;
-}
-exports.fromString = fromString;
-
-function isOnlyWhitespace(string) {
- return !/\S/.test(string);
-}
-
-Lp.toString = function(options) {
- return this.sliceString(this.firstPos(), this.lastPos(), options);
-};
-
-Lp.getSourceMap = function(sourceMapName, sourceRoot) {
- if (!sourceMapName) {
- // Although we could make up a name or generate an anonymous
- // source map, instead we assume that any consumer who does not
- // provide a name does not actually want a source map.
- return null;
- }
-
- var targetLines = this;
-
- function updateJSON(json) {
- json = json || {};
-
- isString.assert(sourceMapName);
- json.file = sourceMapName;
-
- if (sourceRoot) {
- isString.assert(sourceRoot);
- json.sourceRoot = sourceRoot;
- }
-
- return json;
- }
-
- var secret = getSecret(targetLines);
- if (secret.cachedSourceMap) {
- // Since Lines objects are immutable, we can reuse any source map
- // that was previously generated. Nevertheless, we return a new
- // JSON object here to protect the cached source map from outside
- // modification.
- return updateJSON(secret.cachedSourceMap.toJSON());
- }
-
- var smg = new sourceMap.SourceMapGenerator(updateJSON());
- var sourcesToContents = {};
-
- secret.mappings.forEach(function(mapping) {
- var sourceCursor = mapping.sourceLines.skipSpaces(
- mapping.sourceLoc.start
- ) || mapping.sourceLines.lastPos();
-
- var targetCursor = targetLines.skipSpaces(
- mapping.targetLoc.start
- ) || targetLines.lastPos();
-
- while (comparePos(sourceCursor, mapping.sourceLoc.end) < 0 &&
- comparePos(targetCursor, mapping.targetLoc.end) < 0) {
-
- var sourceChar = mapping.sourceLines.charAt(sourceCursor);
- var targetChar = targetLines.charAt(targetCursor);
- assert.strictEqual(sourceChar, targetChar);
-
- var sourceName = mapping.sourceLines.name;
-
- // Add mappings one character at a time for maximum resolution.
- smg.addMapping({
- source: sourceName,
- original: { line: sourceCursor.line,
- column: sourceCursor.column },
- generated: { line: targetCursor.line,
- column: targetCursor.column }
- });
-
- if (!hasOwn.call(sourcesToContents, sourceName)) {
- var sourceContent = mapping.sourceLines.toString();
- smg.setSourceContent(sourceName, sourceContent);
- sourcesToContents[sourceName] = sourceContent;
- }
-
- targetLines.nextPos(targetCursor, true);
- mapping.sourceLines.nextPos(sourceCursor, true);
- }
- });
-
- secret.cachedSourceMap = smg;
-
- return smg.toJSON();
-};
-
-Lp.bootstrapCharAt = function(pos) {
- assert.strictEqual(typeof pos, "object");
- assert.strictEqual(typeof pos.line, "number");
- assert.strictEqual(typeof pos.column, "number");
-
- var line = pos.line,
- column = pos.column,
- strings = this.toString().split(lineTerminatorSeqExp),
- string = strings[line - 1];
-
- if (typeof string === "undefined")
- return "";
-
- if (column === string.length &&
- line < strings.length)
- return "\n";
-
- if (column >= string.length)
- return "";
-
- return string.charAt(column);
-};
-
-Lp.charAt = function(pos) {
- assert.strictEqual(typeof pos, "object");
- assert.strictEqual(typeof pos.line, "number");
- assert.strictEqual(typeof pos.column, "number");
-
- var line = pos.line,
- column = pos.column,
- secret = getSecret(this),
- infos = secret.infos,
- info = infos[line - 1],
- c = column;
-
- if (typeof info === "undefined" || c < 0)
- return "";
-
- var indent = this.getIndentAt(line);
- if (c < indent)
- return " ";
-
- c += info.sliceStart - indent;
-
- if (c === info.sliceEnd &&
- line < this.length)
- return "\n";
-
- if (c >= info.sliceEnd)
- return "";
-
- return info.line.charAt(c);
-};
-
-Lp.stripMargin = function(width, skipFirstLine) {
- if (width === 0)
- return this;
-
- assert.ok(width > 0, "negative margin: " + width);
-
- if (skipFirstLine && this.length === 1)
- return this;
-
- var secret = getSecret(this);
-
- var lines = new Lines(secret.infos.map(function(info, i) {
- if (info.line && (i > 0 || !skipFirstLine)) {
- info = copyLineInfo(info);
- info.indent = Math.max(0, info.indent - width);
- }
- return info;
- }));
-
- if (secret.mappings.length > 0) {
- var newMappings = getSecret(lines).mappings;
- assert.strictEqual(newMappings.length, 0);
- secret.mappings.forEach(function(mapping) {
- newMappings.push(mapping.indent(width, skipFirstLine, true));
- });
- }
-
- return lines;
-};
-
-Lp.indent = function(by) {
- if (by === 0)
- return this;
-
- var secret = getSecret(this);
-
- var lines = new Lines(secret.infos.map(function(info) {
- if (info.line && ! info.locked) {
- info = copyLineInfo(info);
- info.indent += by;
- }
- return info
- }));
-
- if (secret.mappings.length > 0) {
- var newMappings = getSecret(lines).mappings;
- assert.strictEqual(newMappings.length, 0);
- secret.mappings.forEach(function(mapping) {
- newMappings.push(mapping.indent(by));
- });
- }
-
- return lines;
-};
-
-Lp.indentTail = function(by) {
- if (by === 0)
- return this;
-
- if (this.length < 2)
- return this;
-
- var secret = getSecret(this);
-
- var lines = new Lines(secret.infos.map(function(info, i) {
- if (i > 0 && info.line && ! info.locked) {
- info = copyLineInfo(info);
- info.indent += by;
- }
-
- return info;
- }));
-
- if (secret.mappings.length > 0) {
- var newMappings = getSecret(lines).mappings;
- assert.strictEqual(newMappings.length, 0);
- secret.mappings.forEach(function(mapping) {
- newMappings.push(mapping.indent(by, true));
- });
- }
-
- return lines;
-};
-
-Lp.lockIndentTail = function () {
- if (this.length < 2) {
- return this;
- }
-
- var infos = getSecret(this).infos;
-
- return new Lines(infos.map(function (info, i) {
- info = copyLineInfo(info);
- info.locked = i > 0;
- return info;
- }));
-};
-
-Lp.getIndentAt = function(line) {
- assert.ok(line >= 1, "no line " + line + " (line numbers start from 1)");
- var secret = getSecret(this),
- info = secret.infos[line - 1];
- return Math.max(info.indent, 0);
-};
-
-Lp.guessTabWidth = function() {
- var secret = getSecret(this);
- if (hasOwn.call(secret, "cachedTabWidth")) {
- return secret.cachedTabWidth;
- }
-
- var counts = []; // Sparse array.
- var lastIndent = 0;
-
- for (var line = 1, last = this.length; line <= last; ++line) {
- var info = secret.infos[line - 1];
- var sliced = info.line.slice(info.sliceStart, info.sliceEnd);
-
- // Whitespace-only lines don't tell us much about the likely tab
- // width of this code.
- if (isOnlyWhitespace(sliced)) {
- continue;
- }
-
- var diff = Math.abs(info.indent - lastIndent);
- counts[diff] = ~~counts[diff] + 1;
- lastIndent = info.indent;
- }
-
- var maxCount = -1;
- var result = 2;
-
- for (var tabWidth = 1;
- tabWidth < counts.length;
- tabWidth += 1) {
- if (hasOwn.call(counts, tabWidth) &&
- counts[tabWidth] > maxCount) {
- maxCount = counts[tabWidth];
- result = tabWidth;
- }
- }
-
- return secret.cachedTabWidth = result;
-};
-
-Lp.isOnlyWhitespace = function() {
- return isOnlyWhitespace(this.toString());
-};
-
-Lp.isPrecededOnlyByWhitespace = function(pos) {
- var secret = getSecret(this);
- var info = secret.infos[pos.line - 1];
- var indent = Math.max(info.indent, 0);
-
- var diff = pos.column - indent;
- if (diff <= 0) {
- // If pos.column does not exceed the indentation amount, then
- // there must be only whitespace before it.
- return true;
- }
-
- var start = info.sliceStart;
- var end = Math.min(start + diff, info.sliceEnd);
- var prefix = info.line.slice(start, end);
-
- return isOnlyWhitespace(prefix);
-};
-
-Lp.getLineLength = function(line) {
- var secret = getSecret(this),
- info = secret.infos[line - 1];
- return this.getIndentAt(line) + info.sliceEnd - info.sliceStart;
-};
-
-Lp.nextPos = function(pos, skipSpaces) {
- var l = Math.max(pos.line, 0),
- c = Math.max(pos.column, 0);
-
- if (c < this.getLineLength(l)) {
- pos.column += 1;
-
- return skipSpaces
- ? !!this.skipSpaces(pos, false, true)
- : true;
- }
-
- if (l < this.length) {
- pos.line += 1;
- pos.column = 0;
-
- return skipSpaces
- ? !!this.skipSpaces(pos, false, true)
- : true;
- }
-
- return false;
-};
-
-Lp.prevPos = function(pos, skipSpaces) {
- var l = pos.line,
- c = pos.column;
-
- if (c < 1) {
- l -= 1;
-
- if (l < 1)
- return false;
-
- c = this.getLineLength(l);
-
- } else {
- c = Math.min(c - 1, this.getLineLength(l));
- }
-
- pos.line = l;
- pos.column = c;
-
- return skipSpaces
- ? !!this.skipSpaces(pos, true, true)
- : true;
-};
-
-Lp.firstPos = function() {
- // Trivial, but provided for completeness.
- return { line: 1, column: 0 };
-};
-
-Lp.lastPos = function() {
- return {
- line: this.length,
- column: this.getLineLength(this.length)
- };
-};
-
-Lp.skipSpaces = function(pos, backward, modifyInPlace) {
- if (pos) {
- pos = modifyInPlace ? pos : {
- line: pos.line,
- column: pos.column
- };
- } else if (backward) {
- pos = this.lastPos();
- } else {
- pos = this.firstPos();
- }
-
- if (backward) {
- while (this.prevPos(pos)) {
- if (!isOnlyWhitespace(this.charAt(pos)) &&
- this.nextPos(pos)) {
- return pos;
- }
- }
-
- return null;
-
- } else {
- while (isOnlyWhitespace(this.charAt(pos))) {
- if (!this.nextPos(pos)) {
- return null;
- }
- }
-
- return pos;
- }
-};
-
-Lp.trimLeft = function() {
- var pos = this.skipSpaces(this.firstPos(), false, true);
- return pos ? this.slice(pos) : emptyLines;
-};
-
-Lp.trimRight = function() {
- var pos = this.skipSpaces(this.lastPos(), true, true);
- return pos ? this.slice(this.firstPos(), pos) : emptyLines;
-};
-
-Lp.trim = function() {
- var start = this.skipSpaces(this.firstPos(), false, true);
- if (start === null)
- return emptyLines;
-
- var end = this.skipSpaces(this.lastPos(), true, true);
- assert.notStrictEqual(end, null);
-
- return this.slice(start, end);
-};
-
-Lp.eachPos = function(callback, startPos, skipSpaces) {
- var pos = this.firstPos();
-
- if (startPos) {
- pos.line = startPos.line,
- pos.column = startPos.column
- }
-
- if (skipSpaces && !this.skipSpaces(pos, false, true)) {
- return; // Encountered nothing but spaces.
- }
-
- do callback.call(this, pos);
- while (this.nextPos(pos, skipSpaces));
-};
-
-Lp.bootstrapSlice = function(start, end) {
- var strings = this.toString().split(
- lineTerminatorSeqExp
- ).slice(
- start.line - 1,
- end.line
- );
-
- strings.push(strings.pop().slice(0, end.column));
- strings[0] = strings[0].slice(start.column);
-
- return fromString(strings.join("\n"));
-};
-
-Lp.slice = function(start, end) {
- if (!end) {
- if (!start) {
- // The client seems to want a copy of this Lines object, but
- // Lines objects are immutable, so it's perfectly adequate to
- // return the same object.
- return this;
- }
-
- // Slice to the end if no end position was provided.
- end = this.lastPos();
- }
-
- var secret = getSecret(this);
- var sliced = secret.infos.slice(start.line - 1, end.line);
-
- if (start.line === end.line) {
- sliced[0] = sliceInfo(sliced[0], start.column, end.column);
- } else {
- assert.ok(start.line < end.line);
- sliced[0] = sliceInfo(sliced[0], start.column);
- sliced.push(sliceInfo(sliced.pop(), 0, end.column));
- }
-
- var lines = new Lines(sliced);
-
- if (secret.mappings.length > 0) {
- var newMappings = getSecret(lines).mappings;
- assert.strictEqual(newMappings.length, 0);
- secret.mappings.forEach(function(mapping) {
- var sliced = mapping.slice(this, start, end);
- if (sliced) {
- newMappings.push(sliced);
- }
- }, this);
- }
-
- return lines;
-};
-
-function sliceInfo(info, startCol, endCol) {
- var sliceStart = info.sliceStart;
- var sliceEnd = info.sliceEnd;
- var indent = Math.max(info.indent, 0);
- var lineLength = indent + sliceEnd - sliceStart;
-
- if (typeof endCol === "undefined") {
- endCol = lineLength;
- }
-
- startCol = Math.max(startCol, 0);
- endCol = Math.min(endCol, lineLength);
- endCol = Math.max(endCol, startCol);
-
- if (endCol < indent) {
- indent = endCol;
- sliceEnd = sliceStart;
- } else {
- sliceEnd -= lineLength - endCol;
- }
-
- lineLength = endCol;
- lineLength -= startCol;
-
- if (startCol < indent) {
- indent -= startCol;
- } else {
- startCol -= indent;
- indent = 0;
- sliceStart += startCol;
- }
-
- assert.ok(indent >= 0);
- assert.ok(sliceStart <= sliceEnd);
- assert.strictEqual(lineLength, indent + sliceEnd - sliceStart);
-
- if (info.indent === indent &&
- info.sliceStart === sliceStart &&
- info.sliceEnd === sliceEnd) {
- return info;
- }
-
- return {
- line: info.line,
- indent: indent,
- // A destructive slice always unlocks indentation.
- locked: false,
- sliceStart: sliceStart,
- sliceEnd: sliceEnd
- };
-}
-
-Lp.bootstrapSliceString = function(start, end, options) {
- return this.slice(start, end).toString(options);
-};
-
-Lp.sliceString = function(start, end, options) {
- if (!end) {
- if (!start) {
- // The client seems to want a copy of this Lines object, but
- // Lines objects are immutable, so it's perfectly adequate to
- // return the same object.
- return this;
- }
-
- // Slice to the end if no end position was provided.
- end = this.lastPos();
- }
-
- options = normalizeOptions(options);
-
- var infos = getSecret(this).infos;
- var parts = [];
- var tabWidth = options.tabWidth;
-
- for (var line = start.line; line <= end.line; ++line) {
- var info = infos[line - 1];
-
- if (line === start.line) {
- if (line === end.line) {
- info = sliceInfo(info, start.column, end.column);
- } else {
- info = sliceInfo(info, start.column);
- }
- } else if (line === end.line) {
- info = sliceInfo(info, 0, end.column);
- }
-
- var indent = Math.max(info.indent, 0);
-
- var before = info.line.slice(0, info.sliceStart);
- if (options.reuseWhitespace &&
- isOnlyWhitespace(before) &&
- countSpaces(before, options.tabWidth) === indent) {
- // Reuse original spaces if the indentation is correct.
- parts.push(info.line.slice(0, info.sliceEnd));
- continue;
- }
-
- var tabs = 0;
- var spaces = indent;
-
- if (options.useTabs) {
- tabs = Math.floor(indent / tabWidth);
- spaces -= tabs * tabWidth;
- }
-
- var result = "";
-
- if (tabs > 0) {
- result += new Array(tabs + 1).join("\t");
- }
-
- if (spaces > 0) {
- result += new Array(spaces + 1).join(" ");
- }
-
- result += info.line.slice(info.sliceStart, info.sliceEnd);
-
- parts.push(result);
- }
-
- return parts.join(options.lineTerminator);
-};
-
-Lp.isEmpty = function() {
- return this.length < 2 && this.getLineLength(1) < 1;
-};
-
-Lp.join = function(elements) {
- var separator = this;
- var separatorSecret = getSecret(separator);
- var infos = [];
- var mappings = [];
- var prevInfo;
-
- function appendSecret(secret) {
- if (secret === null)
- return;
-
- if (prevInfo) {
- var info = secret.infos[0];
- var indent = new Array(info.indent + 1).join(" ");
- var prevLine = infos.length;
- var prevColumn = Math.max(prevInfo.indent, 0) +
- prevInfo.sliceEnd - prevInfo.sliceStart;
-
- prevInfo.line = prevInfo.line.slice(
- 0, prevInfo.sliceEnd) + indent + info.line.slice(
- info.sliceStart, info.sliceEnd);
-
- // If any part of a line is indentation-locked, the whole line
- // will be indentation-locked.
- prevInfo.locked = prevInfo.locked || info.locked;
-
- prevInfo.sliceEnd = prevInfo.line.length;
-
- if (secret.mappings.length > 0) {
- secret.mappings.forEach(function(mapping) {
- mappings.push(mapping.add(prevLine, prevColumn));
- });
- }
-
- } else if (secret.mappings.length > 0) {
- mappings.push.apply(mappings, secret.mappings);
- }
-
- secret.infos.forEach(function(info, i) {
- if (!prevInfo || i > 0) {
- prevInfo = copyLineInfo(info);
- infos.push(prevInfo);
- }
- });
- }
-
- function appendWithSeparator(secret, i) {
- if (i > 0)
- appendSecret(separatorSecret);
- appendSecret(secret);
- }
-
- elements.map(function(elem) {
- var lines = fromString(elem);
- if (lines.isEmpty())
- return null;
- return getSecret(lines);
- }).forEach(separator.isEmpty()
- ? appendSecret
- : appendWithSeparator);
-
- if (infos.length < 1)
- return emptyLines;
-
- var lines = new Lines(infos);
-
- getSecret(lines).mappings = mappings;
-
- return lines;
-};
-
-exports.concat = function(elements) {
- return emptyLines.join(elements);
-};
-
-Lp.concat = function(other) {
- var args = arguments,
- list = [this];
- list.push.apply(list, args);
- assert.strictEqual(list.length, args.length + 1);
- return emptyLines.join(list);
-};
-
-// The emptyLines object needs to be created all the way down here so that
-// Lines.prototype will be fully populated.
-var emptyLines = fromString("");
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/mapping.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/mapping.js
deleted file mode 100644
index 1d469f3cea..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/mapping.js
+++ /dev/null
@@ -1,277 +0,0 @@
-var assert = require("assert");
-var types = require("./types");
-var isString = types.builtInTypes.string;
-var isNumber = types.builtInTypes.number;
-var SourceLocation = types.namedTypes.SourceLocation;
-var Position = types.namedTypes.Position;
-var linesModule = require("./lines");
-var comparePos = require("./util").comparePos;
-
-function Mapping(sourceLines, sourceLoc, targetLoc) {
- assert.ok(this instanceof Mapping);
- assert.ok(sourceLines instanceof linesModule.Lines);
- SourceLocation.assert(sourceLoc);
-
- if (targetLoc) {
- // In certain cases it's possible for targetLoc.{start,end}.column
- // values to be negative, which technically makes them no longer
- // valid SourceLocation nodes, so we need to be more forgiving.
- assert.ok(
- isNumber.check(targetLoc.start.line) &&
- isNumber.check(targetLoc.start.column) &&
- isNumber.check(targetLoc.end.line) &&
- isNumber.check(targetLoc.end.column)
- );
- } else {
- // Assume identity mapping if no targetLoc specified.
- targetLoc = sourceLoc;
- }
-
- Object.defineProperties(this, {
- sourceLines: { value: sourceLines },
- sourceLoc: { value: sourceLoc },
- targetLoc: { value: targetLoc }
- });
-}
-
-var Mp = Mapping.prototype;
-module.exports = Mapping;
-
-Mp.slice = function(lines, start, end) {
- assert.ok(lines instanceof linesModule.Lines);
- Position.assert(start);
-
- if (end) {
- Position.assert(end);
- } else {
- end = lines.lastPos();
- }
-
- var sourceLines = this.sourceLines;
- var sourceLoc = this.sourceLoc;
- var targetLoc = this.targetLoc;
-
- function skip(name) {
- var sourceFromPos = sourceLoc[name];
- var targetFromPos = targetLoc[name];
- var targetToPos = start;
-
- if (name === "end") {
- targetToPos = end;
- } else {
- assert.strictEqual(name, "start");
- }
-
- return skipChars(
- sourceLines, sourceFromPos,
- lines, targetFromPos, targetToPos
- );
- }
-
- if (comparePos(start, targetLoc.start) <= 0) {
- if (comparePos(targetLoc.end, end) <= 0) {
- targetLoc = {
- start: subtractPos(targetLoc.start, start.line, start.column),
- end: subtractPos(targetLoc.end, start.line, start.column)
- };
-
- // The sourceLoc can stay the same because the contents of the
- // targetLoc have not changed.
-
- } else if (comparePos(end, targetLoc.start) <= 0) {
- return null;
-
- } else {
- sourceLoc = {
- start: sourceLoc.start,
- end: skip("end")
- };
-
- targetLoc = {
- start: subtractPos(targetLoc.start, start.line, start.column),
- end: subtractPos(end, start.line, start.column)
- };
- }
-
- } else {
- if (comparePos(targetLoc.end, start) <= 0) {
- return null;
- }
-
- if (comparePos(targetLoc.end, end) <= 0) {
- sourceLoc = {
- start: skip("start"),
- end: sourceLoc.end
- };
-
- targetLoc = {
- // Same as subtractPos(start, start.line, start.column):
- start: { line: 1, column: 0 },
- end: subtractPos(targetLoc.end, start.line, start.column)
- };
-
- } else {
- sourceLoc = {
- start: skip("start"),
- end: skip("end")
- };
-
- targetLoc = {
- // Same as subtractPos(start, start.line, start.column):
- start: { line: 1, column: 0 },
- end: subtractPos(end, start.line, start.column)
- };
- }
- }
-
- return new Mapping(this.sourceLines, sourceLoc, targetLoc);
-};
-
-Mp.add = function(line, column) {
- return new Mapping(this.sourceLines, this.sourceLoc, {
- start: addPos(this.targetLoc.start, line, column),
- end: addPos(this.targetLoc.end, line, column)
- });
-};
-
-function addPos(toPos, line, column) {
- return {
- line: toPos.line + line - 1,
- column: (toPos.line === 1)
- ? toPos.column + column
- : toPos.column
- };
-}
-
-Mp.subtract = function(line, column) {
- return new Mapping(this.sourceLines, this.sourceLoc, {
- start: subtractPos(this.targetLoc.start, line, column),
- end: subtractPos(this.targetLoc.end, line, column)
- });
-};
-
-function subtractPos(fromPos, line, column) {
- return {
- line: fromPos.line - line + 1,
- column: (fromPos.line === line)
- ? fromPos.column - column
- : fromPos.column
- };
-}
-
-Mp.indent = function(by, skipFirstLine, noNegativeColumns) {
- if (by === 0) {
- return this;
- }
-
- var targetLoc = this.targetLoc;
- var startLine = targetLoc.start.line;
- var endLine = targetLoc.end.line;
-
- if (skipFirstLine && startLine === 1 && endLine === 1) {
- return this;
- }
-
- targetLoc = {
- start: targetLoc.start,
- end: targetLoc.end
- };
-
- if (!skipFirstLine || startLine > 1) {
- var startColumn = targetLoc.start.column + by;
- targetLoc.start = {
- line: startLine,
- column: noNegativeColumns
- ? Math.max(0, startColumn)
- : startColumn
- };
- }
-
- if (!skipFirstLine || endLine > 1) {
- var endColumn = targetLoc.end.column + by;
- targetLoc.end = {
- line: endLine,
- column: noNegativeColumns
- ? Math.max(0, endColumn)
- : endColumn
- };
- }
-
- return new Mapping(this.sourceLines, this.sourceLoc, targetLoc);
-};
-
-function skipChars(
- sourceLines, sourceFromPos,
- targetLines, targetFromPos, targetToPos
-) {
- assert.ok(sourceLines instanceof linesModule.Lines);
- assert.ok(targetLines instanceof linesModule.Lines);
- Position.assert(sourceFromPos);
- Position.assert(targetFromPos);
- Position.assert(targetToPos);
-
- var targetComparison = comparePos(targetFromPos, targetToPos);
- if (targetComparison === 0) {
- // Trivial case: no characters to skip.
- return sourceFromPos;
- }
-
- if (targetComparison < 0) {
- // Skipping forward.
-
- var sourceCursor = sourceLines.skipSpaces(sourceFromPos);
- var targetCursor = targetLines.skipSpaces(targetFromPos);
-
- var lineDiff = targetToPos.line - targetCursor.line;
- sourceCursor.line += lineDiff;
- targetCursor.line += lineDiff;
-
- if (lineDiff > 0) {
- // If jumping to later lines, reset columns to the beginnings
- // of those lines.
- sourceCursor.column = 0;
- targetCursor.column = 0;
- } else {
- assert.strictEqual(lineDiff, 0);
- }
-
- while (comparePos(targetCursor, targetToPos) < 0 &&
- targetLines.nextPos(targetCursor, true)) {
- assert.ok(sourceLines.nextPos(sourceCursor, true));
- assert.strictEqual(
- sourceLines.charAt(sourceCursor),
- targetLines.charAt(targetCursor)
- );
- }
-
- } else {
- // Skipping backward.
-
- var sourceCursor = sourceLines.skipSpaces(sourceFromPos, true);
- var targetCursor = targetLines.skipSpaces(targetFromPos, true);
-
- var lineDiff = targetToPos.line - targetCursor.line;
- sourceCursor.line += lineDiff;
- targetCursor.line += lineDiff;
-
- if (lineDiff < 0) {
- // If jumping to earlier lines, reset columns to the ends of
- // those lines.
- sourceCursor.column = sourceLines.getLineLength(sourceCursor.line);
- targetCursor.column = targetLines.getLineLength(targetCursor.line);
- } else {
- assert.strictEqual(lineDiff, 0);
- }
-
- while (comparePos(targetToPos, targetCursor) < 0 &&
- targetLines.prevPos(targetCursor, true)) {
- assert.ok(sourceLines.prevPos(sourceCursor, true));
- assert.strictEqual(
- sourceLines.charAt(sourceCursor),
- targetLines.charAt(targetCursor)
- );
- }
- }
-
- return sourceCursor;
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/options.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/options.js
deleted file mode 100644
index 10f4520d9a..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/options.js
+++ /dev/null
@@ -1,95 +0,0 @@
-var defaults = {
- // If you want to use a different branch of esprima, or any other
- // module that supports a .parse function, pass that module object to
- // recast.parse as options.parser (legacy synonym: options.esprima).
- parser: require("esprima"),
-
- // Number of spaces the pretty-printer should use per tab for
- // indentation. If you do not pass this option explicitly, it will be
- // (quite reliably!) inferred from the original code.
- tabWidth: 4,
-
- // If you really want the pretty-printer to use tabs instead of
- // spaces, make this option true.
- useTabs: false,
-
- // The reprinting code leaves leading whitespace untouched unless it
- // has to reindent a line, or you pass false for this option.
- reuseWhitespace: true,
-
- // Override this option to use a different line terminator, e.g. \r\n.
- lineTerminator: require("os").EOL,
-
- // Some of the pretty-printer code (such as that for printing function
- // parameter lists) makes a valiant attempt to prevent really long
- // lines. You can adjust the limit by changing this option; however,
- // there is no guarantee that line length will fit inside this limit.
- wrapColumn: 74, // Aspirational for now.
-
- // Pass a string as options.sourceFileName to recast.parse to tell the
- // reprinter to keep track of reused code so that it can construct a
- // source map automatically.
- sourceFileName: null,
-
- // Pass a string as options.sourceMapName to recast.print, and
- // (provided you passed options.sourceFileName earlier) the
- // PrintResult of recast.print will have a .map property for the
- // generated source map.
- sourceMapName: null,
-
- // If provided, this option will be passed along to the source map
- // generator as a root directory for relative source file paths.
- sourceRoot: null,
-
- // If you provide a source map that was generated from a previous call
- // to recast.print as options.inputSourceMap, the old source map will
- // be composed with the new source map.
- inputSourceMap: null,
-
- // If you want esprima to generate .range information (recast only
- // uses .loc internally), pass true for this option.
- range: false,
-
- // If you want esprima not to throw exceptions when it encounters
- // non-fatal errors, keep this option true.
- tolerant: true,
-
- // If you want to override the quotes used in string literals, specify
- // either "single", "double", or "auto" here ("auto" will select the one
- // which results in the shorter literal)
- // Otherwise, double quotes are used.
- quote: null,
-
- // If you want to print trailing commas in object literals,
- // array expressions, functions calls and function definitions pass true
- // for this option.
- trailingComma: false,
-}, hasOwn = defaults.hasOwnProperty;
-
-// Copy options and fill in default values.
-exports.normalize = function(options) {
- options = options || defaults;
-
- function get(key) {
- return hasOwn.call(options, key)
- ? options[key]
- : defaults[key];
- }
-
- return {
- tabWidth: +get("tabWidth"),
- useTabs: !!get("useTabs"),
- reuseWhitespace: !!get("reuseWhitespace"),
- lineTerminator: get("lineTerminator"),
- wrapColumn: Math.max(get("wrapColumn"), 0),
- sourceFileName: get("sourceFileName"),
- sourceMapName: get("sourceMapName"),
- sourceRoot: get("sourceRoot"),
- inputSourceMap: get("inputSourceMap"),
- parser: get("esprima") || get("parser"),
- range: get("range"),
- tolerant: get("tolerant"),
- quote: get("quote"),
- trailingComma: get("trailingComma"),
- };
-};
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/parser.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/parser.js
deleted file mode 100644
index fa2fef9772..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/parser.js
+++ /dev/null
@@ -1,152 +0,0 @@
-var assert = require("assert");
-var types = require("./types");
-var n = types.namedTypes;
-var b = types.builders;
-var isObject = types.builtInTypes.object;
-var isArray = types.builtInTypes.array;
-var isFunction = types.builtInTypes.function;
-var Patcher = require("./patcher").Patcher;
-var normalizeOptions = require("./options").normalize;
-var fromString = require("./lines").fromString;
-var attachComments = require("./comments").attach;
-var util = require("./util");
-
-exports.parse = function parse(source, options) {
- options = normalizeOptions(options);
-
- var lines = fromString(source, options);
-
- var sourceWithoutTabs = lines.toString({
- tabWidth: options.tabWidth,
- reuseWhitespace: false,
- useTabs: false
- });
-
- var comments = [];
- var program = options.parser.parse(sourceWithoutTabs, {
- loc: true,
- locations: true,
- range: options.range,
- comment: true,
- onComment: comments,
- tolerant: options.tolerant,
- ecmaVersion: 6,
- sourceType: 'module'
- });
-
- // If the source was empty, some parsers give loc.{start,end}.line
- // values of 0, instead of the minimum of 1.
- util.fixFaultyLocations(program, lines);
-
- program.loc = program.loc || {
- start: lines.firstPos(),
- end: lines.lastPos()
- };
-
- program.loc.lines = lines;
- program.loc.indent = 0;
-
- // Expand the Program node's .loc to include all comments, since
- // typically its .loc.start and .loc.end will coincide with those of
- // the first and last statements, respectively, excluding any comments
- // that fall outside that region.
- var trueProgramLoc = util.getTrueLoc(program, lines);
- program.loc.start = trueProgramLoc.start;
- program.loc.end = trueProgramLoc.end;
-
- if (program.comments) {
- comments = program.comments;
- delete program.comments;
- }
-
- // In order to ensure we reprint leading and trailing program
- // comments, wrap the original Program node with a File node.
- var file = program;
- if (file.type === "Program") {
- var file = b.file(program);
- file.loc = {
- lines: lines,
- indent: 0,
- start: lines.firstPos(),
- end: lines.lastPos()
- };
- } else if (file.type === "File") {
- program = file.program;
- }
-
- // Passing file.program here instead of just file means that initial
- // comments will be attached to program.body[0] instead of program.
- attachComments(
- comments,
- program.body.length ? file.program : file,
- lines
- );
-
- // Return a copy of the original AST so that any changes made may be
- // compared to the original.
- return new TreeCopier(lines).copy(file);
-};
-
-function TreeCopier(lines) {
- assert.ok(this instanceof TreeCopier);
- this.lines = lines;
- this.indent = 0;
-}
-
-var TCp = TreeCopier.prototype;
-
-TCp.copy = function(node) {
- if (isArray.check(node)) {
- return node.map(this.copy, this);
- }
-
- if (!isObject.check(node)) {
- return node;
- }
-
- util.fixFaultyLocations(node, this.lines);
-
- var copy = Object.create(Object.getPrototypeOf(node), {
- original: { // Provide a link from the copy to the original.
- value: node,
- configurable: false,
- enumerable: false,
- writable: true
- }
- });
-
- var loc = node.loc;
- var oldIndent = this.indent;
- var newIndent = oldIndent;
-
- if (loc) {
- // When node is a comment, we set node.loc.indent to
- // node.loc.start.column so that, when/if we print the comment by
- // itself, we can strip that much whitespace from the left margin
- // of the comment. This only really matters for multiline Block
- // comments, but it doesn't hurt for Line comments.
- if (node.type === "Block" || node.type === "Line" ||
- node.type === "CommentBlock" || node.type === "CommentLine" ||
- this.lines.isPrecededOnlyByWhitespace(loc.start)) {
- newIndent = this.indent = loc.start.column;
- }
-
- loc.lines = this.lines;
- loc.indent = newIndent;
- }
-
- var keys = Object.keys(node);
- var keyCount = keys.length;
- for (var i = 0; i < keyCount; ++i) {
- var key = keys[i];
- if (key === "loc") {
- copy[key] = node[key];
- } else {
- copy[key] = this.copy(node[key]);
- }
- }
-
- this.indent = oldIndent;
-
- return copy;
-};
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/patcher.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/patcher.js
deleted file mode 100644
index ac21eff5f5..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/patcher.js
+++ /dev/null
@@ -1,515 +0,0 @@
-var assert = require("assert");
-var linesModule = require("./lines");
-var types = require("./types");
-var getFieldValue = types.getFieldValue;
-var Printable = types.namedTypes.Printable;
-var Expression = types.namedTypes.Expression;
-var SourceLocation = types.namedTypes.SourceLocation;
-var util = require("./util");
-var comparePos = util.comparePos;
-var FastPath = require("./fast-path");
-var isObject = types.builtInTypes.object;
-var isArray = types.builtInTypes.array;
-var isString = types.builtInTypes.string;
-var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
-
-function Patcher(lines) {
- assert.ok(this instanceof Patcher);
- assert.ok(lines instanceof linesModule.Lines);
-
- var self = this,
- replacements = [];
-
- self.replace = function(loc, lines) {
- if (isString.check(lines))
- lines = linesModule.fromString(lines);
-
- replacements.push({
- lines: lines,
- start: loc.start,
- end: loc.end
- });
- };
-
- self.get = function(loc) {
- // If no location is provided, return the complete Lines object.
- loc = loc || {
- start: { line: 1, column: 0 },
- end: { line: lines.length,
- column: lines.getLineLength(lines.length) }
- };
-
- var sliceFrom = loc.start,
- toConcat = [];
-
- function pushSlice(from, to) {
- assert.ok(comparePos(from, to) <= 0);
- toConcat.push(lines.slice(from, to));
- }
-
- replacements.sort(function(a, b) {
- return comparePos(a.start, b.start);
- }).forEach(function(rep) {
- if (comparePos(sliceFrom, rep.start) > 0) {
- // Ignore nested replacement ranges.
- } else {
- pushSlice(sliceFrom, rep.start);
- toConcat.push(rep.lines);
- sliceFrom = rep.end;
- }
- });
-
- pushSlice(sliceFrom, loc.end);
-
- return linesModule.concat(toConcat);
- };
-}
-exports.Patcher = Patcher;
-
-var Pp = Patcher.prototype;
-
-Pp.tryToReprintComments = function(newNode, oldNode, print) {
- var patcher = this;
-
- if (!newNode.comments &&
- !oldNode.comments) {
- // We were (vacuously) able to reprint all the comments!
- return true;
- }
-
- var newPath = FastPath.from(newNode);
- var oldPath = FastPath.from(oldNode);
-
- newPath.stack.push("comments", getSurroundingComments(newNode));
- oldPath.stack.push("comments", getSurroundingComments(oldNode));
-
- var reprints = [];
- var ableToReprintComments =
- findArrayReprints(newPath, oldPath, reprints);
-
- // No need to pop anything from newPath.stack or oldPath.stack, since
- // newPath and oldPath are fresh local variables.
-
- if (ableToReprintComments && reprints.length > 0) {
- reprints.forEach(function(reprint) {
- var oldComment = reprint.oldPath.getValue();
- assert.ok(oldComment.leading || oldComment.trailing);
- patcher.replace(
- oldComment.loc,
- // Comments can't have .comments, so it doesn't matter
- // whether we print with comments or without.
- print(reprint.newPath).indentTail(oldComment.loc.indent)
- );
- });
- }
-
- return ableToReprintComments;
-};
-
-// Get all comments that are either leading or trailing, ignoring any
-// comments that occur inside node.loc. Returns an empty array for nodes
-// with no leading or trailing comments.
-function getSurroundingComments(node) {
- var result = [];
- if (node.comments &&
- node.comments.length > 0) {
- node.comments.forEach(function(comment) {
- if (comment.leading || comment.trailing) {
- result.push(comment);
- }
- });
- }
- return result;
-}
-
-Pp.deleteComments = function(node) {
- if (!node.comments) {
- return;
- }
-
- var patcher = this;
-
- node.comments.forEach(function(comment) {
- if (comment.leading) {
- // Delete leading comments along with any trailing whitespace
- // they might have.
- patcher.replace({
- start: comment.loc.start,
- end: node.loc.lines.skipSpaces(
- comment.loc.end, false, false)
- }, "");
-
- } else if (comment.trailing) {
- // Delete trailing comments along with any leading whitespace
- // they might have.
- patcher.replace({
- start: node.loc.lines.skipSpaces(
- comment.loc.start, true, false),
- end: comment.loc.end
- }, "");
- }
- });
-};
-
-exports.getReprinter = function(path) {
- assert.ok(path instanceof FastPath);
-
- // Make sure that this path refers specifically to a Node, rather than
- // some non-Node subproperty of a Node.
- var node = path.getValue();
- if (!Printable.check(node))
- return;
-
- var orig = node.original;
- var origLoc = orig && orig.loc;
- var lines = origLoc && origLoc.lines;
- var reprints = [];
-
- if (!lines || !findReprints(path, reprints))
- return;
-
- return function(print) {
- var patcher = new Patcher(lines);
-
- reprints.forEach(function(reprint) {
- var newNode = reprint.newPath.getValue();
- var oldNode = reprint.oldPath.getValue();
-
- SourceLocation.assert(oldNode.loc, true);
-
- var needToPrintNewPathWithComments =
- !patcher.tryToReprintComments(newNode, oldNode, print)
-
- if (needToPrintNewPathWithComments) {
- // Since we were not able to preserve all leading/trailing
- // comments, we delete oldNode's comments, print newPath
- // with comments, and then patch the resulting lines where
- // oldNode used to be.
- patcher.deleteComments(oldNode);
- }
-
- var newLines = print(
- reprint.newPath,
- needToPrintNewPathWithComments
- ).indentTail(oldNode.loc.indent);
-
- var nls = needsLeadingSpace(lines, oldNode.loc, newLines);
- var nts = needsTrailingSpace(lines, oldNode.loc, newLines);
-
- // If we try to replace the argument of a ReturnStatement like
- // return"asdf" with e.g. a literal null expression, we run
- // the risk of ending up with returnnull, so we need to add an
- // extra leading space in situations where that might
- // happen. Likewise for "asdf"in obj. See #170.
- if (nls || nts) {
- var newParts = [];
- nls && newParts.push(" ");
- newParts.push(newLines);
- nts && newParts.push(" ");
- newLines = linesModule.concat(newParts);
- }
-
- patcher.replace(oldNode.loc, newLines);
- });
-
- // Recall that origLoc is the .loc of an ancestor node that is
- // guaranteed to contain all the reprinted nodes and comments.
- return patcher.get(origLoc).indentTail(-orig.loc.indent);
- };
-};
-
-// If the last character before oldLoc and the first character of newLines
-// are both identifier characters, they must be separated by a space,
-// otherwise they will most likely get fused together into a single token.
-function needsLeadingSpace(oldLines, oldLoc, newLines) {
- var posBeforeOldLoc = util.copyPos(oldLoc.start);
-
- // The character just before the location occupied by oldNode.
- var charBeforeOldLoc =
- oldLines.prevPos(posBeforeOldLoc) &&
- oldLines.charAt(posBeforeOldLoc);
-
- // First character of the reprinted node.
- var newFirstChar = newLines.charAt(newLines.firstPos());
-
- return charBeforeOldLoc &&
- riskyAdjoiningCharExp.test(charBeforeOldLoc) &&
- newFirstChar &&
- riskyAdjoiningCharExp.test(newFirstChar);
-}
-
-// If the last character of newLines and the first character after oldLoc
-// are both identifier characters, they must be separated by a space,
-// otherwise they will most likely get fused together into a single token.
-function needsTrailingSpace(oldLines, oldLoc, newLines) {
- // The character just after the location occupied by oldNode.
- var charAfterOldLoc = oldLines.charAt(oldLoc.end);
-
- var newLastPos = newLines.lastPos();
-
- // Last character of the reprinted node.
- var newLastChar = newLines.prevPos(newLastPos) &&
- newLines.charAt(newLastPos);
-
- return newLastChar &&
- riskyAdjoiningCharExp.test(newLastChar) &&
- charAfterOldLoc &&
- riskyAdjoiningCharExp.test(charAfterOldLoc);
-}
-
-function findReprints(newPath, reprints) {
- var newNode = newPath.getValue();
- Printable.assert(newNode);
-
- var oldNode = newNode.original;
- Printable.assert(oldNode);
-
- assert.deepEqual(reprints, []);
-
- if (newNode.type !== oldNode.type) {
- return false;
- }
-
- var oldPath = new FastPath(oldNode);
- var canReprint = findChildReprints(newPath, oldPath, reprints);
-
- if (!canReprint) {
- // Make absolutely sure the calling code does not attempt to reprint
- // any nodes.
- reprints.length = 0;
- }
-
- return canReprint;
-}
-
-function findAnyReprints(newPath, oldPath, reprints) {
- var newNode = newPath.getValue();
- var oldNode = oldPath.getValue();
-
- if (newNode === oldNode)
- return true;
-
- if (isArray.check(newNode))
- return findArrayReprints(newPath, oldPath, reprints);
-
- if (isObject.check(newNode))
- return findObjectReprints(newPath, oldPath, reprints);
-
- return false;
-}
-
-function findArrayReprints(newPath, oldPath, reprints) {
- var newNode = newPath.getValue();
- var oldNode = oldPath.getValue();
- isArray.assert(newNode);
- var len = newNode.length;
-
- if (!(isArray.check(oldNode) &&
- oldNode.length === len))
- return false;
-
- for (var i = 0; i < len; ++i) {
- newPath.stack.push(i, newNode[i]);
- oldPath.stack.push(i, oldNode[i]);
- var canReprint = findAnyReprints(newPath, oldPath, reprints);
- newPath.stack.length -= 2;
- oldPath.stack.length -= 2;
- if (!canReprint) {
- return false;
- }
- }
-
- return true;
-}
-
-function findObjectReprints(newPath, oldPath, reprints) {
- var newNode = newPath.getValue();
- isObject.assert(newNode);
-
- if (newNode.original === null) {
- // If newNode.original node was set to null, reprint the node.
- return false;
- }
-
- var oldNode = oldPath.getValue();
- if (!isObject.check(oldNode))
- return false;
-
- if (Printable.check(newNode)) {
- if (!Printable.check(oldNode)) {
- return false;
- }
-
- // Here we need to decide whether the reprinted code for newNode
- // is appropriate for patching into the location of oldNode.
-
- if (newNode.type === oldNode.type) {
- var childReprints = [];
-
- if (findChildReprints(newPath, oldPath, childReprints)) {
- reprints.push.apply(reprints, childReprints);
- } else if (oldNode.loc) {
- // If we have no .loc information for oldNode, then we
- // won't be able to reprint it.
- reprints.push({
- oldPath: oldPath.copy(),
- newPath: newPath.copy()
- });
- } else {
- return false;
- }
-
- return true;
- }
-
- if (Expression.check(newNode) &&
- Expression.check(oldNode) &&
- // If we have no .loc information for oldNode, then we won't
- // be able to reprint it.
- oldNode.loc) {
-
- // If both nodes are subtypes of Expression, then we should be
- // able to fill the location occupied by the old node with
- // code printed for the new node with no ill consequences.
- reprints.push({
- oldPath: oldPath.copy(),
- newPath: newPath.copy()
- });
-
- return true;
- }
-
- // The nodes have different types, and at least one of the types
- // is not a subtype of the Expression type, so we cannot safely
- // assume the nodes are syntactically interchangeable.
- return false;
- }
-
- return findChildReprints(newPath, oldPath, reprints);
-}
-
-// This object is reused in hasOpeningParen and hasClosingParen to avoid
-// having to allocate a temporary object.
-var reusablePos = { line: 1, column: 0 };
-var nonSpaceExp = /\S/;
-
-function hasOpeningParen(oldPath) {
- var oldNode = oldPath.getValue();
- var loc = oldNode.loc;
- var lines = loc && loc.lines;
-
- if (lines) {
- var pos = reusablePos;
- pos.line = loc.start.line;
- pos.column = loc.start.column;
-
- while (lines.prevPos(pos)) {
- var ch = lines.charAt(pos);
-
- if (ch === "(") {
- // If we found an opening parenthesis but it occurred before
- // the start of the original subtree for this reprinting, then
- // we must not return true for hasOpeningParen(oldPath).
- return comparePos(oldPath.getRootValue().loc.start, pos) <= 0;
- }
-
- if (nonSpaceExp.test(ch)) {
- return false;
- }
- }
- }
-
- return false;
-}
-
-function hasClosingParen(oldPath) {
- var oldNode = oldPath.getValue();
- var loc = oldNode.loc;
- var lines = loc && loc.lines;
-
- if (lines) {
- var pos = reusablePos;
- pos.line = loc.end.line;
- pos.column = loc.end.column;
-
- do {
- var ch = lines.charAt(pos);
-
- if (ch === ")") {
- // If we found a closing parenthesis but it occurred after the
- // end of the original subtree for this reprinting, then we
- // must not return true for hasClosingParen(oldPath).
- return comparePos(pos, oldPath.getRootValue().loc.end) <= 0;
- }
-
- if (nonSpaceExp.test(ch)) {
- return false;
- }
-
- } while (lines.nextPos(pos));
- }
-
- return false;
-}
-
-function hasParens(oldPath) {
- // This logic can technically be fooled if the node has parentheses
- // but there are comments intervening between the parentheses and the
- // node. In such cases the node will be harmlessly wrapped in an
- // additional layer of parentheses.
- return hasOpeningParen(oldPath) && hasClosingParen(oldPath);
-}
-
-function findChildReprints(newPath, oldPath, reprints) {
- var newNode = newPath.getValue();
- var oldNode = oldPath.getValue();
-
- isObject.assert(newNode);
- isObject.assert(oldNode);
-
- if (newNode.original === null) {
- // If newNode.original node was set to null, reprint the node.
- return false;
- }
-
- // If this type of node cannot come lexically first in its enclosing
- // statement (e.g. a function expression or object literal), and it
- // seems to be doing so, then the only way we can ignore this problem
- // and save ourselves from falling back to the pretty printer is if an
- // opening parenthesis happens to precede the node. For example,
- // (function(){ ... }()); does not need to be reprinted, even though
- // the FunctionExpression comes lexically first in the enclosing
- // ExpressionStatement and fails the hasParens test, because the
- // parent CallExpression passes the hasParens test. If we relied on
- // the path.needsParens() && !hasParens(oldNode) check below, the
- // absence of a closing parenthesis after the FunctionExpression would
- // trigger pretty-printing unnecessarily.
- if (!newPath.canBeFirstInStatement() &&
- newPath.firstInStatement() &&
- !hasOpeningParen(oldPath))
- return false;
-
- // If this node needs parentheses and will not be wrapped with
- // parentheses when reprinted, then return false to skip reprinting
- // and let it be printed generically.
- if (newPath.needsParens(true) && !hasParens(oldPath)) {
- return false;
- }
-
- for (var k in util.getUnionOfKeys(newNode, oldNode)) {
- if (k === "loc")
- continue;
-
- newPath.stack.push(k, types.getFieldValue(newNode, k));
- oldPath.stack.push(k, types.getFieldValue(oldNode, k));
- var canReprint = findAnyReprints(newPath, oldPath, reprints);
- newPath.stack.length -= 2;
- oldPath.stack.length -= 2;
-
- if (!canReprint) {
- return false;
- }
- }
-
- return true;
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/printer.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/printer.js
deleted file mode 100644
index 2ed1e8579b..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/printer.js
+++ /dev/null
@@ -1,1802 +0,0 @@
-var assert = require("assert");
-var sourceMap = require("source-map");
-var printComments = require("./comments").printComments;
-var linesModule = require("./lines");
-var fromString = linesModule.fromString;
-var concat = linesModule.concat;
-var normalizeOptions = require("./options").normalize;
-var getReprinter = require("./patcher").getReprinter;
-var types = require("./types");
-var namedTypes = types.namedTypes;
-var isString = types.builtInTypes.string;
-var isObject = types.builtInTypes.object;
-var FastPath = require("./fast-path");
-var util = require("./util");
-
-function PrintResult(code, sourceMap) {
- assert.ok(this instanceof PrintResult);
-
- isString.assert(code);
- this.code = code;
-
- if (sourceMap) {
- isObject.assert(sourceMap);
- this.map = sourceMap;
- }
-}
-
-var PRp = PrintResult.prototype;
-var warnedAboutToString = false;
-
-PRp.toString = function() {
- if (!warnedAboutToString) {
- console.warn(
- "Deprecation warning: recast.print now returns an object with " +
- "a .code property. You appear to be treating the object as a " +
- "string, which might still work but is strongly discouraged."
- );
-
- warnedAboutToString = true;
- }
-
- return this.code;
-};
-
-var emptyPrintResult = new PrintResult("");
-
-function Printer(originalOptions) {
- assert.ok(this instanceof Printer);
-
- var explicitTabWidth = originalOptions && originalOptions.tabWidth;
- var options = normalizeOptions(originalOptions);
- assert.notStrictEqual(options, originalOptions);
-
- // It's common for client code to pass the same options into both
- // recast.parse and recast.print, but the Printer doesn't need (and
- // can be confused by) options.sourceFileName, so we null it out.
- options.sourceFileName = null;
-
- function printWithComments(path) {
- assert.ok(path instanceof FastPath);
- return printComments(path, print);
- }
-
- function print(path, includeComments) {
- if (includeComments)
- return printWithComments(path);
-
- assert.ok(path instanceof FastPath);
-
- if (!explicitTabWidth) {
- var oldTabWidth = options.tabWidth;
- var loc = path.getNode().loc;
- if (loc && loc.lines && loc.lines.guessTabWidth) {
- options.tabWidth = loc.lines.guessTabWidth();
- var lines = maybeReprint(path);
- options.tabWidth = oldTabWidth;
- return lines;
- }
- }
-
- return maybeReprint(path);
- }
-
- function maybeReprint(path) {
- var reprinter = getReprinter(path);
- if (reprinter) {
- // Since the print function that we pass to the reprinter will
- // be used to print "new" nodes, it's tempting to think we
- // should pass printRootGenerically instead of print, to avoid
- // calling maybeReprint again, but that would be a mistake
- // because the new nodes might not be entirely new, but merely
- // moved from elsewhere in the AST. The print function is the
- // right choice because it gives us the opportunity to reprint
- // such nodes using their original source.
- return maybeAddParens(path, reprinter(print));
- }
- return printRootGenerically(path);
- }
-
- // Print the root node generically, but then resume reprinting its
- // children non-generically.
- function printRootGenerically(path, includeComments) {
- return includeComments
- ? printComments(path, printRootGenerically)
- : genericPrint(path, options, printWithComments);
- }
-
- // Print the entire AST generically.
- function printGenerically(path) {
- return genericPrint(path, options, printGenerically);
- }
-
- this.print = function(ast) {
- if (!ast) {
- return emptyPrintResult;
- }
-
- var lines = print(FastPath.from(ast), true);
-
- return new PrintResult(
- lines.toString(options),
- util.composeSourceMaps(
- options.inputSourceMap,
- lines.getSourceMap(
- options.sourceMapName,
- options.sourceRoot
- )
- )
- );
- };
-
- this.printGenerically = function(ast) {
- if (!ast) {
- return emptyPrintResult;
- }
-
- var path = FastPath.from(ast);
- var oldReuseWhitespace = options.reuseWhitespace;
-
- // Do not reuse whitespace (or anything else, for that matter)
- // when printing generically.
- options.reuseWhitespace = false;
-
- // TODO Allow printing of comments?
- var pr = new PrintResult(printGenerically(path).toString(options));
- options.reuseWhitespace = oldReuseWhitespace;
- return pr;
- };
-}
-
-exports.Printer = Printer;
-
-function maybeAddParens(path, lines) {
- return path.needsParens() ? concat(["(", lines, ")"]) : lines;
-}
-
-function genericPrint(path, options, printPath) {
- assert.ok(path instanceof FastPath);
-
- var node = path.getValue();
- var parts = [];
- var needsParens = false;
- var linesWithoutParens =
- genericPrintNoParens(path, options, printPath);
-
- if (! node || linesWithoutParens.isEmpty()) {
- return linesWithoutParens;
- }
-
- if (node.decorators &&
- node.decorators.length > 0 &&
- // If the parent node is an export declaration, it will be
- // responsible for printing node.decorators.
- ! util.getParentExportDeclaration(path)) {
-
- path.each(function(decoratorPath) {
- parts.push(printPath(decoratorPath), "\n");
- }, "decorators");
-
- } else if (util.isExportDeclaration(node) &&
- node.declaration &&
- node.declaration.decorators) {
- // Export declarations are responsible for printing any decorators
- // that logically apply to node.declaration.
- path.each(function(decoratorPath) {
- parts.push(printPath(decoratorPath), "\n");
- }, "declaration", "decorators");
-
- } else {
- // Nodes with decorators can't have parentheses, so we can avoid
- // computing path.needsParens() except in this case.
- needsParens = path.needsParens();
- }
-
- if (needsParens) {
- parts.unshift("(");
- }
-
- parts.push(linesWithoutParens);
-
- if (needsParens) {
- parts.push(")");
- }
-
- return concat(parts);
-}
-
-function genericPrintNoParens(path, options, print) {
- var n = path.getValue();
-
- if (!n) {
- return fromString("");
- }
-
- if (typeof n === "string") {
- return fromString(n, options);
- }
-
- namedTypes.Printable.assert(n);
-
- var parts = [];
-
- switch (n.type) {
- case "File":
- return path.call(print, "program");
-
- case "Program":
- return path.call(function(bodyPath) {
- return printStatementSequence(bodyPath, options, print);
- }, "body");
-
- case "Noop": // Babel extension.
- case "EmptyStatement":
- return fromString("");
-
- case "ExpressionStatement":
- return concat([path.call(print, "expression"), ";"]);
-
- case "ParenthesizedExpression": // Babel extension.
- return concat(["(", path.call(print, "expression"), ")"]);
-
- case "BinaryExpression":
- case "LogicalExpression":
- case "AssignmentExpression":
- return fromString(" ").join([
- path.call(print, "left"),
- n.operator,
- path.call(print, "right")
- ]);
-
- case "AssignmentPattern":
- return concat([
- path.call(print, "left"),
- "=",
- path.call(print, "right")
- ]);
-
- case "MemberExpression":
- parts.push(path.call(print, "object"));
-
- var property = path.call(print, "property");
- if (n.computed) {
- parts.push("[", property, "]");
- } else {
- parts.push(".", property);
- }
-
- return concat(parts);
-
- case "MetaProperty":
- return concat([
- path.call(print, "meta"),
- ".",
- path.call(print, "property")
- ]);
-
- case "BindExpression":
- if (n.object) {
- parts.push(path.call(print, "object"));
- }
-
- parts.push("::", path.call(print, "callee"));
-
- return concat(parts);
-
- case "Path":
- return fromString(".").join(n.body);
-
- case "Identifier":
- return concat([
- fromString(n.name, options),
- path.call(print, "typeAnnotation")
- ]);
-
- case "SpreadElement":
- case "SpreadElementPattern":
- case "SpreadProperty":
- case "SpreadPropertyPattern":
- case "RestElement":
- return concat(["...", path.call(print, "argument")]);
-
- case "FunctionDeclaration":
- case "FunctionExpression":
- if (n.async)
- parts.push("async ");
-
- parts.push("function");
-
- if (n.generator)
- parts.push("*");
-
- if (n.id) {
- parts.push(
- " ",
- path.call(print, "id"),
- path.call(print, "typeParameters")
- );
- }
-
- parts.push(
- "(",
- printFunctionParams(path, options, print),
- ")",
- path.call(print, "returnType"),
- " ",
- path.call(print, "body")
- );
-
- return concat(parts);
-
- case "ArrowFunctionExpression":
- if (n.async)
- parts.push("async ");
-
- if (
- n.params.length === 1 &&
- !n.rest &&
- n.params[0].type === 'Identifier' &&
- !n.params[0].typeAnnotation
- ) {
- parts.push(path.call(print, "params", 0));
- } else {
- parts.push(
- "(",
- printFunctionParams(path, options, print),
- ")"
- );
- }
-
- parts.push(" => ", path.call(print, "body"));
-
- return concat(parts);
-
- case "MethodDefinition":
- if (n.static) {
- parts.push("static ");
- }
-
- parts.push(printMethod(path, options, print));
-
- return concat(parts);
-
- case "YieldExpression":
- parts.push("yield");
-
- if (n.delegate)
- parts.push("*");
-
- if (n.argument)
- parts.push(" ", path.call(print, "argument"));
-
- return concat(parts);
-
- case "AwaitExpression":
- parts.push("await");
-
- if (n.all)
- parts.push("*");
-
- if (n.argument)
- parts.push(" ", path.call(print, "argument"));
-
- return concat(parts);
-
- case "ModuleDeclaration":
- parts.push("module", path.call(print, "id"));
-
- if (n.source) {
- assert.ok(!n.body);
- parts.push("from", path.call(print, "source"));
- } else {
- parts.push(path.call(print, "body"));
- }
-
- return fromString(" ").join(parts);
-
- case "ImportSpecifier":
- if (n.imported) {
- parts.push(path.call(print, "imported"));
- if (n.local &&
- n.local.name !== n.imported.name) {
- parts.push(" as ", path.call(print, "local"));
- }
- } else if (n.id) {
- parts.push(path.call(print, "id"));
- if (n.name) {
- parts.push(" as ", path.call(print, "name"));
- }
- }
-
- return concat(parts);
-
- case "ExportSpecifier":
- if (n.local) {
- parts.push(path.call(print, "local"));
- if (n.exported &&
- n.exported.name !== n.local.name) {
- parts.push(" as ", path.call(print, "exported"));
- }
- } else if (n.id) {
- parts.push(path.call(print, "id"));
- if (n.name) {
- parts.push(" as ", path.call(print, "name"));
- }
- }
-
- return concat(parts);
-
- case "ExportBatchSpecifier":
- return fromString("*");
-
- case "ImportNamespaceSpecifier":
- parts.push("* as ");
- if (n.local) {
- parts.push(path.call(print, "local"));
- } else if (n.id) {
- parts.push(path.call(print, "id"));
- }
- return concat(parts);
-
- case "ImportDefaultSpecifier":
- if (n.local) {
- return path.call(print, "local");
- }
- return path.call(print, "id");
-
- case "ExportDeclaration":
- case "ExportDefaultDeclaration":
- case "ExportNamedDeclaration":
- return printExportDeclaration(path, options, print);
-
- case "ExportAllDeclaration":
- parts.push("export *");
-
- if (n.exported) {
- parts.push(" as ", path.call(print, "exported"));
- }
-
- parts.push(
- " from ",
- path.call(print, "source")
- );
-
- return concat(parts);
-
- case "ExportNamespaceSpecifier":
- return concat(["* as ", path.call(print, "exported")]);
-
- case "ExportDefaultSpecifier":
- return path.call(print, "exported");
-
- case "ImportDeclaration":
- parts.push("import ");
-
- if (n.importKind && n.importKind !== "value") {
- parts.push(n.importKind + " ");
- }
-
- if (n.specifiers &&
- n.specifiers.length > 0) {
-
- var foundImportSpecifier = false;
-
- path.each(function(specifierPath) {
- var i = specifierPath.getName();
- if (i > 0) {
- parts.push(", ");
- }
-
- var value = specifierPath.getValue();
-
- if (namedTypes.ImportDefaultSpecifier.check(value) ||
- namedTypes.ImportNamespaceSpecifier.check(value)) {
- assert.strictEqual(foundImportSpecifier, false);
- } else {
- namedTypes.ImportSpecifier.assert(value);
- if (!foundImportSpecifier) {
- foundImportSpecifier = true;
- parts.push("{");
- }
- }
-
- parts.push(print(specifierPath));
- }, "specifiers");
-
- if (foundImportSpecifier) {
- parts.push("}");
- }
-
- parts.push(" from ");
- }
-
- parts.push(path.call(print, "source"), ";");
-
- return concat(parts);
-
- case "BlockStatement":
- var naked = path.call(function(bodyPath) {
- return printStatementSequence(bodyPath, options, print);
- }, "body");
-
- if (naked.isEmpty()) {
- return fromString("{}");
- }
-
- return concat([
- "{\n",
- naked.indent(options.tabWidth),
- "\n}"
- ]);
-
- case "ReturnStatement":
- parts.push("return");
-
- if (n.argument) {
- var argLines = path.call(print, "argument");
- if (argLines.length > 1 &&
- namedTypes.JSXElement &&
- namedTypes.JSXElement.check(n.argument)) {
- parts.push(
- " (\n",
- argLines.indent(options.tabWidth),
- "\n)"
- );
- } else {
- parts.push(" ", argLines);
- }
- }
-
- parts.push(";");
-
- return concat(parts);
-
- case "CallExpression":
- return concat([
- path.call(print, "callee"),
- printArgumentsList(path, options, print)
- ]);
-
- case "ObjectExpression":
- case "ObjectPattern":
- case "ObjectTypeAnnotation":
- var allowBreak = false;
- var isTypeAnnotation = n.type === "ObjectTypeAnnotation";
- var separator = isTypeAnnotation ? ';' : ',';
- var fields = [];
-
- if (isTypeAnnotation) {
- fields.push("indexers", "callProperties");
- }
-
- fields.push("properties");
-
- var len = 0;
- fields.forEach(function(field) {
- len += n[field].length;
- });
-
- var oneLine = (isTypeAnnotation && len === 1) || len === 0;
- parts.push(oneLine ? "{" : "{\n");
-
- var i = 0;
- fields.forEach(function(field) {
- path.each(function(childPath) {
- var lines = print(childPath);
-
- if (!oneLine) {
- lines = lines.indent(options.tabWidth);
- }
-
- var multiLine = !isTypeAnnotation && lines.length > 1;
- if (multiLine && allowBreak) {
- // Similar to the logic for BlockStatement.
- parts.push("\n");
- }
-
- parts.push(lines);
-
- if (i < len - 1) {
- // Add an extra line break if the previous object property
- // had a multi-line value.
- parts.push(separator + (multiLine ? "\n\n" : "\n"));
- allowBreak = !multiLine;
- } else if (len !== 1 && isTypeAnnotation) {
- parts.push(separator);
- } else if (options.trailingComma) {
- parts.push(separator);
- }
- i++;
- }, field);
- });
-
- parts.push(oneLine ? "}" : "\n}");
-
- return concat(parts);
-
- case "PropertyPattern":
- return concat([
- path.call(print, "key"),
- ": ",
- path.call(print, "pattern")
- ]);
-
- case "Property": // Non-standard AST node type.
- if (n.method || n.kind === "get" || n.kind === "set") {
- return printMethod(path, options, print);
- }
-
- var key = path.call(print, "key");
- if (n.computed) {
- parts.push("[", key, "]");
- } else {
- parts.push(key);
- }
-
- if (! n.shorthand) {
- parts.push(": ", path.call(print, "value"));
- }
-
- return concat(parts);
-
- case "Decorator":
- return concat(["@", path.call(print, "expression")]);
-
- case "ArrayExpression":
- case "ArrayPattern":
- var elems = n.elements,
- len = elems.length;
-
- var printed = path.map(print, "elements");
- var joined = fromString(", ").join(printed);
- var oneLine = joined.getLineLength(1) <= options.wrapColumn;
- parts.push(oneLine ? "[" : "[\n");
-
- path.each(function(elemPath) {
- var i = elemPath.getName();
- var elem = elemPath.getValue();
- if (!elem) {
- // If the array expression ends with a hole, that hole
- // will be ignored by the interpreter, but if it ends with
- // two (or more) holes, we need to write out two (or more)
- // commas so that the resulting code is interpreted with
- // both (all) of the holes.
- parts.push(",");
- } else {
- var lines = printed[i];
- if (oneLine) {
- if (i > 0)
- parts.push(" ");
- } else {
- lines = lines.indent(options.tabWidth);
- }
- parts.push(lines);
- if (i < len - 1 || (!oneLine && options.trailingComma))
- parts.push(",");
- if (!oneLine)
- parts.push("\n");
- }
- }, "elements");
-
- parts.push("]");
-
- return concat(parts);
-
- case "SequenceExpression":
- return fromString(", ").join(path.map(print, "expressions"));
-
- case "ThisExpression":
- return fromString("this");
-
- case "Super":
- return fromString("super");
-
- case "Literal":
- if (typeof n.value !== "string")
- return fromString(n.value, options);
-
- return fromString(nodeStr(n.value, options), options);
-
- case "ModuleSpecifier":
- if (n.local) {
- throw new Error(
- "The ESTree ModuleSpecifier type should be abstract"
- );
- }
-
- // The Esprima ModuleSpecifier type is just a string-valued
- // Literal identifying the imported-from module.
- return fromString(nodeStr(n.value, options), options);
-
- case "UnaryExpression":
- parts.push(n.operator);
- if (/[a-z]$/.test(n.operator))
- parts.push(" ");
- parts.push(path.call(print, "argument"));
- return concat(parts);
-
- case "UpdateExpression":
- parts.push(
- path.call(print, "argument"),
- n.operator
- );
-
- if (n.prefix)
- parts.reverse();
-
- return concat(parts);
-
- case "ConditionalExpression":
- return concat([
- "(", path.call(print, "test"),
- " ? ", path.call(print, "consequent"),
- " : ", path.call(print, "alternate"), ")"
- ]);
-
- case "NewExpression":
- parts.push("new ", path.call(print, "callee"));
- var args = n.arguments;
- if (args) {
- parts.push(printArgumentsList(path, options, print));
- }
-
- return concat(parts);
-
- case "VariableDeclaration":
- parts.push(n.kind, " ");
- var maxLen = 0;
- var printed = path.map(function(childPath) {
- var lines = print(childPath);
- maxLen = Math.max(lines.length, maxLen);
- return lines;
- }, "declarations");
-
- if (maxLen === 1) {
- parts.push(fromString(", ").join(printed));
- } else if (printed.length > 1 ) {
- parts.push(
- fromString(",\n").join(printed)
- .indentTail(n.kind.length + 1)
- );
- } else {
- parts.push(printed[0]);
- }
-
- // We generally want to terminate all variable declarations with a
- // semicolon, except when they are children of for loops.
- var parentNode = path.getParentNode();
- if (!namedTypes.ForStatement.check(parentNode) &&
- !namedTypes.ForInStatement.check(parentNode) &&
- !(namedTypes.ForOfStatement &&
- namedTypes.ForOfStatement.check(parentNode))) {
- parts.push(";");
- }
-
- return concat(parts);
-
- case "VariableDeclarator":
- return n.init ? fromString(" = ").join([
- path.call(print, "id"),
- path.call(print, "init")
- ]) : path.call(print, "id");
-
- case "WithStatement":
- return concat([
- "with (",
- path.call(print, "object"),
- ") ",
- path.call(print, "body")
- ]);
-
- case "IfStatement":
- var con = adjustClause(path.call(print, "consequent"), options),
- parts = ["if (", path.call(print, "test"), ")", con];
-
- if (n.alternate)
- parts.push(
- endsWithBrace(con) ? " else" : "\nelse",
- adjustClause(path.call(print, "alternate"), options));
-
- return concat(parts);
-
- case "ForStatement":
- // TODO Get the for (;;) case right.
- var init = path.call(print, "init"),
- sep = init.length > 1 ? ";\n" : "; ",
- forParen = "for (",
- indented = fromString(sep).join([
- init,
- path.call(print, "test"),
- path.call(print, "update")
- ]).indentTail(forParen.length),
- head = concat([forParen, indented, ")"]),
- clause = adjustClause(path.call(print, "body"), options),
- parts = [head];
-
- if (head.length > 1) {
- parts.push("\n");
- clause = clause.trimLeft();
- }
-
- parts.push(clause);
-
- return concat(parts);
-
- case "WhileStatement":
- return concat([
- "while (",
- path.call(print, "test"),
- ")",
- adjustClause(path.call(print, "body"), options)
- ]);
-
- case "ForInStatement":
- // Note: esprima can't actually parse "for each (".
- return concat([
- n.each ? "for each (" : "for (",
- path.call(print, "left"),
- " in ",
- path.call(print, "right"),
- ")",
- adjustClause(path.call(print, "body"), options)
- ]);
-
- case "ForOfStatement":
- return concat([
- "for (",
- path.call(print, "left"),
- " of ",
- path.call(print, "right"),
- ")",
- adjustClause(path.call(print, "body"), options)
- ]);
-
- case "DoWhileStatement":
- var doBody = concat([
- "do",
- adjustClause(path.call(print, "body"), options)
- ]), parts = [doBody];
-
- if (endsWithBrace(doBody))
- parts.push(" while");
- else
- parts.push("\nwhile");
-
- parts.push(" (", path.call(print, "test"), ");");
-
- return concat(parts);
-
- case "DoExpression":
- var statements = path.call(function(bodyPath) {
- return printStatementSequence(bodyPath, options, print);
- }, "body");
-
- return concat([
- "do {\n",
- statements.indent(options.tabWidth),
- "\n}"
- ]);
-
- case "BreakStatement":
- parts.push("break");
- if (n.label)
- parts.push(" ", path.call(print, "label"));
- parts.push(";");
- return concat(parts);
-
- case "ContinueStatement":
- parts.push("continue");
- if (n.label)
- parts.push(" ", path.call(print, "label"));
- parts.push(";");
- return concat(parts);
-
- case "LabeledStatement":
- return concat([
- path.call(print, "label"),
- ":\n",
- path.call(print, "body")
- ]);
-
- case "TryStatement":
- parts.push(
- "try ",
- path.call(print, "block")
- );
-
- if (n.handler) {
- parts.push(" ", path.call(print, "handler"));
- } else if (n.handlers) {
- path.each(function(handlerPath) {
- parts.push(" ", print(handlerPath));
- }, "handlers");
- }
-
- if (n.finalizer) {
- parts.push(" finally ", path.call(print, "finalizer"));
- }
-
- return concat(parts);
-
- case "CatchClause":
- parts.push("catch (", path.call(print, "param"));
-
- if (n.guard)
- // Note: esprima does not recognize conditional catch clauses.
- parts.push(" if ", path.call(print, "guard"));
-
- parts.push(") ", path.call(print, "body"));
-
- return concat(parts);
-
- case "ThrowStatement":
- return concat(["throw ", path.call(print, "argument"), ";"]);
-
- case "SwitchStatement":
- return concat([
- "switch (",
- path.call(print, "discriminant"),
- ") {\n",
- fromString("\n").join(path.map(print, "cases")),
- "\n}"
- ]);
-
- // Note: ignoring n.lexical because it has no printing consequences.
-
- case "SwitchCase":
- if (n.test)
- parts.push("case ", path.call(print, "test"), ":");
- else
- parts.push("default:");
-
- if (n.consequent.length > 0) {
- parts.push("\n", path.call(function(consequentPath) {
- return printStatementSequence(consequentPath, options, print);
- }, "consequent").indent(options.tabWidth));
- }
-
- return concat(parts);
-
- case "DebuggerStatement":
- return fromString("debugger;");
-
- // JSX extensions below.
-
- case "JSXAttribute":
- parts.push(path.call(print, "name"));
- if (n.value)
- parts.push("=", path.call(print, "value"));
- return concat(parts);
-
- case "JSXIdentifier":
- return fromString(n.name, options);
-
- case "JSXNamespacedName":
- return fromString(":").join([
- path.call(print, "namespace"),
- path.call(print, "name")
- ]);
-
- case "JSXMemberExpression":
- return fromString(".").join([
- path.call(print, "object"),
- path.call(print, "property")
- ]);
-
- case "JSXSpreadAttribute":
- return concat(["{...", path.call(print, "argument"), "}"]);
-
- case "JSXExpressionContainer":
- return concat(["{", path.call(print, "expression"), "}"]);
-
- case "JSXElement":
- var openingLines = path.call(print, "openingElement");
-
- if (n.openingElement.selfClosing) {
- assert.ok(!n.closingElement);
- return openingLines;
- }
-
- var childLines = concat(
- path.map(function(childPath) {
- var child = childPath.getValue();
-
- if (namedTypes.Literal.check(child) &&
- typeof child.value === "string") {
- return child.value;
- }
-
- return print(childPath);
- }, "children")
- ).indentTail(options.tabWidth);
-
- var closingLines = path.call(print, "closingElement");
-
- return concat([
- openingLines,
- childLines,
- closingLines
- ]);
-
- case "JSXOpeningElement":
- parts.push("<", path.call(print, "name"));
- var attrParts = [];
-
- path.each(function(attrPath) {
- attrParts.push(" ", print(attrPath));
- }, "attributes");
-
- var attrLines = concat(attrParts);
-
- var needLineWrap = (
- attrLines.length > 1 ||
- attrLines.getLineLength(1) > options.wrapColumn
- );
-
- if (needLineWrap) {
- attrParts.forEach(function(part, i) {
- if (part === " ") {
- assert.strictEqual(i % 2, 0);
- attrParts[i] = "\n";
- }
- });
-
- attrLines = concat(attrParts).indentTail(options.tabWidth);
- }
-
- parts.push(attrLines, n.selfClosing ? " />" : ">");
-
- return concat(parts);
-
- case "JSXClosingElement":
- return concat(["</", path.call(print, "name"), ">"]);
-
- case "JSXText":
- return fromString(n.value, options);
-
- case "JSXEmptyExpression":
- return fromString("");
-
- case "TypeAnnotatedIdentifier":
- return concat([
- path.call(print, "annotation"),
- " ",
- path.call(print, "identifier")
- ]);
-
- case "ClassBody":
- if (n.body.length === 0) {
- return fromString("{}");
- }
-
- return concat([
- "{\n",
- path.call(function(bodyPath) {
- return printStatementSequence(bodyPath, options, print);
- }, "body").indent(options.tabWidth),
- "\n}"
- ]);
-
- case "ClassPropertyDefinition":
- parts.push("static ", path.call(print, "definition"));
- if (!namedTypes.MethodDefinition.check(n.definition))
- parts.push(";");
- return concat(parts);
-
- case "ClassProperty":
- if (n.static)
- parts.push("static ");
-
- parts.push(path.call(print, "key"));
- if (n.typeAnnotation)
- parts.push(path.call(print, "typeAnnotation"));
-
- if (n.value)
- parts.push(" = ", path.call(print, "value"));
-
- parts.push(";");
- return concat(parts);
-
- case "ClassDeclaration":
- case "ClassExpression":
- parts.push("class");
-
- if (n.id) {
- parts.push(
- " ",
- path.call(print, "id"),
- path.call(print, "typeParameters")
- );
- }
-
- if (n.superClass) {
- parts.push(
- " extends ",
- path.call(print, "superClass"),
- path.call(print, "superTypeParameters")
- );
- }
-
- if (n["implements"] && n['implements'].length > 0) {
- parts.push(
- " implements ",
- fromString(", ").join(path.map(print, "implements"))
- );
- }
-
- parts.push(" ", path.call(print, "body"));
-
- return concat(parts);
-
- case "TemplateElement":
- return fromString(n.value.raw, options).lockIndentTail();
-
- case "TemplateLiteral":
- var expressions = path.map(print, "expressions");
- parts.push("`");
-
- path.each(function(childPath) {
- var i = childPath.getName();
- parts.push(print(childPath));
- if (i < expressions.length) {
- parts.push("${", expressions[i], "}");
- }
- }, "quasis");
-
- parts.push("`");
-
- return concat(parts).lockIndentTail();
-
- case "TaggedTemplateExpression":
- return concat([
- path.call(print, "tag"),
- path.call(print, "quasi")
- ]);
-
- // These types are unprintable because they serve as abstract
- // supertypes for other (printable) types.
- case "Node":
- case "Printable":
- case "SourceLocation":
- case "Position":
- case "Statement":
- case "Function":
- case "Pattern":
- case "Expression":
- case "Declaration":
- case "Specifier":
- case "NamedSpecifier":
- case "Comment": // Supertype of Block and Line.
- case "MemberTypeAnnotation": // Flow
- case "TupleTypeAnnotation": // Flow
- case "Type": // Flow
- throw new Error("unprintable type: " + JSON.stringify(n.type));
-
- case "CommentBlock": // Babel block comment.
- case "Block": // Esprima block comment.
- return concat(["/*", fromString(n.value, options), "*/"]);
-
- case "CommentLine": // Babel line comment.
- case "Line": // Esprima line comment.
- return concat(["//", fromString(n.value, options)]);
-
- // Type Annotations for Facebook Flow, typically stripped out or
- // transformed away before printing.
- case "TypeAnnotation":
- if (n.typeAnnotation) {
- if (n.typeAnnotation.type !== "FunctionTypeAnnotation") {
- parts.push(": ");
- }
- parts.push(path.call(print, "typeAnnotation"));
- return concat(parts);
- }
-
- return fromString("");
-
- case "AnyTypeAnnotation":
- return fromString("any", options);
-
- case "MixedTypeAnnotation":
- return fromString("mixed", options);
-
- case "ArrayTypeAnnotation":
- return concat([
- path.call(print, "elementType"),
- "[]"
- ]);
-
- case "BooleanTypeAnnotation":
- return fromString("boolean", options);
-
- case "BooleanLiteralTypeAnnotation":
- assert.strictEqual(typeof n.value, "boolean");
- return fromString("" + n.value, options);
-
- case "DeclareClass":
- return printFlowDeclaration(path, [
- "class ",
- path.call(print, "id"),
- " ",
- path.call(print, "body"),
- ]);
-
- case "DeclareFunction":
- return printFlowDeclaration(path, [
- "function ",
- path.call(print, "id"),
- ";"
- ]);
-
- case "DeclareModule":
- return printFlowDeclaration(path, [
- "module ",
- path.call(print, "id"),
- " ",
- path.call(print, "body"),
- ]);
-
- case "DeclareVariable":
- return printFlowDeclaration(path, [
- "var ",
- path.call(print, "id"),
- ";"
- ]);
-
- case "DeclareExportDeclaration":
- return concat([
- "declare ",
- printExportDeclaration(path, options, print)
- ]);
-
- case "FunctionTypeAnnotation":
- // FunctionTypeAnnotation is ambiguous:
- // declare function(a: B): void; OR
- // var A: (a: B) => void;
- var parent = path.getParentNode(0);
- var isArrowFunctionTypeAnnotation = !(
- namedTypes.ObjectTypeCallProperty.check(parent) ||
- namedTypes.DeclareFunction.check(path.getParentNode(2))
- );
-
- var needsColon =
- isArrowFunctionTypeAnnotation &&
- !namedTypes.FunctionTypeParam.check(parent);
-
- if (needsColon) {
- parts.push(": ");
- }
-
- parts.push(
- "(",
- fromString(", ").join(path.map(print, "params")),
- ")"
- );
-
- // The returnType is not wrapped in a TypeAnnotation, so the colon
- // needs to be added separately.
- if (n.returnType) {
- parts.push(
- isArrowFunctionTypeAnnotation ? " => " : ": ",
- path.call(print, "returnType")
- );
- }
-
- return concat(parts);
-
- case "FunctionTypeParam":
- return concat([
- path.call(print, "name"),
- n.optional ? '?' : '',
- ": ",
- path.call(print, "typeAnnotation"),
- ]);
-
- case "GenericTypeAnnotation":
- return concat([
- path.call(print, "id"),
- path.call(print, "typeParameters")
- ]);
-
- case "DeclareInterface":
- parts.push("declare ");
-
- case "InterfaceDeclaration":
- parts.push(
- fromString("interface ", options),
- path.call(print, "id"),
- path.call(print, "typeParameters"),
- " "
- );
-
- if (n["extends"]) {
- parts.push(
- "extends ",
- fromString(", ").join(path.map(print, "extends"))
- );
- }
-
- parts.push(" ", path.call(print, "body"));
-
- return concat(parts);
-
- case "ClassImplements":
- case "InterfaceExtends":
- return concat([
- path.call(print, "id"),
- path.call(print, "typeParameters")
- ]);
-
- case "IntersectionTypeAnnotation":
- return fromString(" & ").join(path.map(print, "types"));
-
- case "NullableTypeAnnotation":
- return concat([
- "?",
- path.call(print, "typeAnnotation")
- ]);
-
- case "NullLiteralTypeAnnotation":
- return fromString("null", options);
-
- case "ThisTypeAnnotation":
- return fromString("this", options);
-
- case "NumberTypeAnnotation":
- return fromString("number", options);
-
- case "ObjectTypeCallProperty":
- return path.call(print, "value");
-
- case "ObjectTypeIndexer":
- return concat([
- "[",
- path.call(print, "id"),
- ": ",
- path.call(print, "key"),
- "]: ",
- path.call(print, "value")
- ]);
-
- case "ObjectTypeProperty":
- return concat([
- path.call(print, "key"),
- n.optional ? "?" : "",
- ": ",
- path.call(print, "value")
- ]);
-
- case "QualifiedTypeIdentifier":
- return concat([
- path.call(print, "qualification"),
- ".",
- path.call(print, "id")
- ]);
-
- case "StringLiteralTypeAnnotation":
- return fromString(nodeStr(n.value, options), options);
-
- case "NumberLiteralTypeAnnotation":
- assert.strictEqual(typeof n.value, "number");
- return fromString("" + n.value, options);
-
- case "StringTypeAnnotation":
- return fromString("string", options);
-
- case "DeclareTypeAlias":
- parts.push("declare ");
-
- case "TypeAlias":
- return concat([
- "type ",
- path.call(print, "id"),
- " = ",
- path.call(print, "right"),
- ";"
- ]);
-
- case "TypeCastExpression":
- return concat([
- "(",
- path.call(print, "expression"),
- path.call(print, "typeAnnotation"),
- ")"
- ]);
-
- case "TypeParameterDeclaration":
- case "TypeParameterInstantiation":
- return concat([
- "<",
- fromString(", ").join(path.map(print, "params")),
- ">"
- ]);
-
- case "TypeofTypeAnnotation":
- return concat([
- fromString("typeof ", options),
- path.call(print, "argument")
- ]);
-
- case "UnionTypeAnnotation":
- return fromString(" | ").join(path.map(print, "types"));
-
- case "VoidTypeAnnotation":
- return fromString("void", options);
-
- // Unhandled types below. If encountered, nodes of these types should
- // be either left alone or desugared into AST types that are fully
- // supported by the pretty-printer.
- case "ClassHeritage": // TODO
- case "ComprehensionBlock": // TODO
- case "ComprehensionExpression": // TODO
- case "Glob": // TODO
- case "GeneratorExpression": // TODO
- case "LetStatement": // TODO
- case "LetExpression": // TODO
- case "GraphExpression": // TODO
- case "GraphIndexExpression": // TODO
-
- // XML types that nobody cares about or needs to print.
- case "XMLDefaultDeclaration":
- case "XMLAnyName":
- case "XMLQualifiedIdentifier":
- case "XMLFunctionQualifiedIdentifier":
- case "XMLAttributeSelector":
- case "XMLFilterExpression":
- case "XML":
- case "XMLElement":
- case "XMLList":
- case "XMLEscape":
- case "XMLText":
- case "XMLStartTag":
- case "XMLEndTag":
- case "XMLPointTag":
- case "XMLName":
- case "XMLAttribute":
- case "XMLCdata":
- case "XMLComment":
- case "XMLProcessingInstruction":
- default:
- debugger;
- throw new Error("unknown type: " + JSON.stringify(n.type));
- }
-
- return p;
-}
-
-function printStatementSequence(path, options, print) {
- var inClassBody =
- namedTypes.ClassBody &&
- namedTypes.ClassBody.check(path.getParentNode());
-
- var filtered = [];
- var sawComment = false;
- var sawStatement = false;
-
- path.each(function(stmtPath) {
- var i = stmtPath.getName();
- var stmt = stmtPath.getValue();
-
- // Just in case the AST has been modified to contain falsy
- // "statements," it's safer simply to skip them.
- if (!stmt) {
- return;
- }
-
- // Skip printing EmptyStatement nodes to avoid leaving stray
- // semicolons lying around.
- if (stmt.type === "EmptyStatement") {
- return;
- }
-
- if (namedTypes.Comment.check(stmt)) {
- // The pretty printer allows a dangling Comment node to act as
- // a Statement when the Comment can't be attached to any other
- // non-Comment node in the tree.
- sawComment = true;
- } else if (namedTypes.Statement.check(stmt)) {
- sawStatement = true;
- } else {
- // When the pretty printer encounters a string instead of an
- // AST node, it just prints the string. This behavior can be
- // useful for fine-grained formatting decisions like inserting
- // blank lines.
- isString.assert(stmt);
- }
-
- // We can't hang onto stmtPath outside of this function, because
- // it's just a reference to a mutable FastPath object, so we have
- // to go ahead and print it here.
- filtered.push({
- node: stmt,
- printed: print(stmtPath)
- });
- });
-
- if (sawComment) {
- assert.strictEqual(
- sawStatement, false,
- "Comments may appear as statements in otherwise empty statement " +
- "lists, but may not coexist with non-Comment nodes."
- );
- }
-
- var prevTrailingSpace = null;
- var len = filtered.length;
- var parts = [];
-
- filtered.forEach(function(info, i) {
- var printed = info.printed;
- var stmt = info.node;
- var multiLine = printed.length > 1;
- var notFirst = i > 0;
- var notLast = i < len - 1;
- var leadingSpace;
- var trailingSpace;
- var lines = stmt && stmt.loc && stmt.loc.lines;
- var trueLoc = lines && options.reuseWhitespace &&
- util.getTrueLoc(stmt, lines);
-
- if (notFirst) {
- if (trueLoc) {
- var beforeStart = lines.skipSpaces(trueLoc.start, true);
- var beforeStartLine = beforeStart ? beforeStart.line : 1;
- var leadingGap = trueLoc.start.line - beforeStartLine;
- leadingSpace = Array(leadingGap + 1).join("\n");
- } else {
- leadingSpace = multiLine ? "\n\n" : "\n";
- }
- } else {
- leadingSpace = "";
- }
-
- if (notLast) {
- if (trueLoc) {
- var afterEnd = lines.skipSpaces(trueLoc.end);
- var afterEndLine = afterEnd ? afterEnd.line : lines.length;
- var trailingGap = afterEndLine - trueLoc.end.line;
- trailingSpace = Array(trailingGap + 1).join("\n");
- } else {
- trailingSpace = multiLine ? "\n\n" : "\n";
- }
- } else {
- trailingSpace = "";
- }
-
- parts.push(
- maxSpace(prevTrailingSpace, leadingSpace),
- printed
- );
-
- if (notLast) {
- prevTrailingSpace = trailingSpace;
- } else if (trailingSpace) {
- parts.push(trailingSpace);
- }
- });
-
- return concat(parts);
-}
-
-function maxSpace(s1, s2) {
- if (!s1 && !s2) {
- return fromString("");
- }
-
- if (!s1) {
- return fromString(s2);
- }
-
- if (!s2) {
- return fromString(s1);
- }
-
- var spaceLines1 = fromString(s1);
- var spaceLines2 = fromString(s2);
-
- if (spaceLines2.length > spaceLines1.length) {
- return spaceLines2;
- }
-
- return spaceLines1;
-}
-
-function printMethod(path, options, print) {
- var node = path.getNode();
- var kind = node.kind;
- var parts = [];
-
- namedTypes.FunctionExpression.assert(node.value);
-
- if (node.value.async) {
- parts.push("async ");
- }
-
- if (!kind || kind === "init" || kind === "method" || kind === "constructor") {
- if (node.value.generator) {
- parts.push("*");
- }
- } else {
- assert.ok(kind === "get" || kind === "set");
- parts.push(kind, " ");
- }
-
- var key = path.call(print, "key");
- if (node.computed) {
- key = concat(["[", key, "]"]);
- }
-
- parts.push(
- key,
- path.call(print, "value", "typeParameters"),
- "(",
- path.call(function(valuePath) {
- return printFunctionParams(valuePath, options, print);
- }, "value"),
- ")",
- path.call(print, "value", "returnType"),
- " ",
- path.call(print, "value", "body")
- );
-
- return concat(parts);
-}
-
-function printArgumentsList(path, options, print) {
- var printed = path.map(print, "arguments");
-
- var joined = fromString(", ").join(printed);
- if (joined.getLineLength(1) > options.wrapColumn) {
- joined = fromString(",\n").join(printed);
- return concat([
- "(\n",
- joined.indent(options.tabWidth),
- options.trailingComma ? ",\n)" : "\n)"
- ]);
- }
-
- return concat(["(", joined, ")"]);
-}
-
-function printFunctionParams(path, options, print) {
- var fun = path.getValue();
- namedTypes.Function.assert(fun);
-
- var printed = path.map(print, "params");
-
- if (fun.defaults) {
- path.each(function(defExprPath) {
- var i = defExprPath.getName();
- var p = printed[i];
- if (p && defExprPath.getValue()) {
- printed[i] = concat([p, "=", print(defExprPath)]);
- }
- }, "defaults");
- }
-
- if (fun.rest) {
- printed.push(concat(["...", path.call(print, "rest")]));
- }
-
- var joined = fromString(", ").join(printed);
- if (joined.length > 1 ||
- joined.getLineLength(1) > options.wrapColumn) {
- joined = fromString(",\n").join(printed);
- if (options.trailingComma && !fun.rest) {
- joined = concat([joined, ",\n"]);
- }
- return concat(["\n", joined.indent(options.tabWidth)]);
- }
-
- return joined;
-}
-
-function printExportDeclaration(path, options, print) {
- var decl = path.getValue();
- var parts = ["export "];
-
- namedTypes.Declaration.assert(decl);
-
- if (decl["default"] ||
- decl.type === "ExportDefaultDeclaration") {
- parts.push("default ");
- }
-
- if (decl.declaration) {
- parts.push(path.call(print, "declaration"));
-
- } else if (decl.specifiers &&
- decl.specifiers.length > 0) {
-
- if (decl.specifiers.length === 1 &&
- decl.specifiers[0].type === "ExportBatchSpecifier") {
- parts.push("*");
- } else {
- parts.push(
- "{",
- fromString(", ").join(path.map(print, "specifiers")),
- "}"
- );
- }
-
- if (decl.source) {
- parts.push(" from ", path.call(print, "source"));
- }
- }
-
- var lines = concat(parts);
-
- if (lastNonSpaceCharacter(lines) !== ";") {
- lines = concat([lines, ";"]);
- }
-
- return lines;
-}
-
-function printFlowDeclaration(path, parts) {
- var parentExportDecl = util.getParentExportDeclaration(path);
-
- if (parentExportDecl) {
- assert.strictEqual(
- parentExportDecl.type,
- "DeclareExportDeclaration"
- );
- } else {
- // If the parent node has type DeclareExportDeclaration, then it
- // will be responsible for printing the "declare" token. Otherwise
- // it needs to be printed with this non-exported declaration node.
- parts.unshift("declare ");
- }
-
- return concat(parts);
-}
-
-function adjustClause(clause, options) {
- if (clause.length > 1)
- return concat([" ", clause]);
-
- return concat([
- "\n",
- maybeAddSemicolon(clause).indent(options.tabWidth)
- ]);
-}
-
-function lastNonSpaceCharacter(lines) {
- var pos = lines.lastPos();
- do {
- var ch = lines.charAt(pos);
- if (/\S/.test(ch))
- return ch;
- } while (lines.prevPos(pos));
-}
-
-function endsWithBrace(lines) {
- return lastNonSpaceCharacter(lines) === "}";
-}
-
-function swapQuotes(str) {
- return str.replace(/['"]/g, function(m) {
- return m === '"' ? '\'' : '"';
- });
-}
-
-function nodeStr(str, options) {
- isString.assert(str);
- switch (options.quote) {
- case "auto":
- var double = JSON.stringify(str);
- var single = swapQuotes(JSON.stringify(swapQuotes(str)));
- return double.length > single.length ? single : double;
- case "single":
- return swapQuotes(JSON.stringify(swapQuotes(str)));
- case "double":
- default:
- return JSON.stringify(str);
- }
-}
-
-function maybeAddSemicolon(lines) {
- var eoc = lastNonSpaceCharacter(lines);
- if (!eoc || "\n};".indexOf(eoc) < 0)
- return concat([lines, ";"]);
- return lines;
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/types.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/types.js
deleted file mode 100644
index 4446f07a9c..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/types.js
+++ /dev/null
@@ -1,5 +0,0 @@
-// This module was originally created so that Recast could add its own
-// custom types to the AST type system (in particular, the File type), but
-// those types are now incorporated into ast-types, so this module doesn't
-// have much to do anymore. Still, it might prove useful in the future.
-module.exports = require("ast-types");
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/util.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/util.js
deleted file mode 100644
index f78cdaaa17..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/lib/util.js
+++ /dev/null
@@ -1,283 +0,0 @@
-var assert = require("assert");
-var types = require("./types");
-var getFieldValue = types.getFieldValue;
-var n = types.namedTypes;
-var sourceMap = require("source-map");
-var SourceMapConsumer = sourceMap.SourceMapConsumer;
-var SourceMapGenerator = sourceMap.SourceMapGenerator;
-var hasOwn = Object.prototype.hasOwnProperty;
-var util = exports;
-
-function getUnionOfKeys() {
- var result = {};
- var argc = arguments.length;
- for (var i = 0; i < argc; ++i) {
- var keys = Object.keys(arguments[i]);
- var keyCount = keys.length;
- for (var j = 0; j < keyCount; ++j) {
- result[keys[j]] = true;
- }
- }
- return result;
-}
-util.getUnionOfKeys = getUnionOfKeys;
-
-function comparePos(pos1, pos2) {
- return (pos1.line - pos2.line) || (pos1.column - pos2.column);
-}
-util.comparePos = comparePos;
-
-function copyPos(pos) {
- return {
- line: pos.line,
- column: pos.column
- };
-}
-util.copyPos = copyPos;
-
-util.composeSourceMaps = function(formerMap, latterMap) {
- if (formerMap) {
- if (!latterMap) {
- return formerMap;
- }
- } else {
- return latterMap || null;
- }
-
- var smcFormer = new SourceMapConsumer(formerMap);
- var smcLatter = new SourceMapConsumer(latterMap);
- var smg = new SourceMapGenerator({
- file: latterMap.file,
- sourceRoot: latterMap.sourceRoot
- });
-
- var sourcesToContents = {};
-
- smcLatter.eachMapping(function(mapping) {
- var origPos = smcFormer.originalPositionFor({
- line: mapping.originalLine,
- column: mapping.originalColumn
- });
-
- var sourceName = origPos.source;
- if (sourceName === null) {
- return;
- }
-
- smg.addMapping({
- source: sourceName,
- original: copyPos(origPos),
- generated: {
- line: mapping.generatedLine,
- column: mapping.generatedColumn
- },
- name: mapping.name
- });
-
- var sourceContent = smcFormer.sourceContentFor(sourceName);
- if (sourceContent && !hasOwn.call(sourcesToContents, sourceName)) {
- sourcesToContents[sourceName] = sourceContent;
- smg.setSourceContent(sourceName, sourceContent);
- }
- });
-
- return smg.toJSON();
-};
-
-util.getTrueLoc = function(node, lines) {
- // It's possible that node is newly-created (not parsed by Esprima),
- // in which case it probably won't have a .loc property (or an
- // .original property for that matter). That's fine; we'll just
- // pretty-print it as usual.
- if (!node.loc) {
- return null;
- }
-
- var result = {
- start: node.loc.start,
- end: node.loc.end
- };
-
- function include(node) {
- expandLoc(result, node.loc);
- }
-
- // If the node has any comments, their locations might contribute to
- // the true start/end positions of the node.
- if (node.comments) {
- node.comments.forEach(include);
- }
-
- // If the node is an export declaration and its .declaration has any
- // decorators, their locations might contribute to the true start/end
- // positions of the export declaration node.
- if (util.isExportDeclaration(node) &&
- node.declaration.decorators) {
- node.declaration.decorators.forEach(include);
- }
-
- if (comparePos(result.start, result.end) < 0) {
- // Trim leading whitespace.
- result.start = copyPos(result.start);
- lines.skipSpaces(result.start, false, true);
-
- if (comparePos(result.start, result.end) < 0) {
- // Trim trailing whitespace, if the end location is not already the
- // same as the start location.
- result.end = copyPos(result.end);
- lines.skipSpaces(result.end, true, true);
- }
- }
-
- return result;
-};
-
-function expandLoc(parentLoc, childLoc) {
- if (parentLoc && childLoc) {
- if (comparePos(childLoc.start, parentLoc.start) < 0) {
- parentLoc.start = childLoc.start;
- }
-
- if (comparePos(parentLoc.end, childLoc.end) < 0) {
- parentLoc.end = childLoc.end;
- }
- }
-}
-
-util.fixFaultyLocations = function(node, lines) {
- var loc = node.loc;
- if (loc) {
- if (loc.start.line < 1) {
- loc.start.line = 1;
- }
-
- if (loc.end.line < 1) {
- loc.end.line = 1;
- }
- }
-
- if (node.type === "TemplateLiteral") {
- fixTemplateLiteral(node, lines);
-
- } else if (loc && node.decorators) {
- // Expand the .loc of the node responsible for printing the decorators
- // (here, the decorated node) so that it includes node.decorators.
- node.decorators.forEach(function (decorator) {
- expandLoc(loc, decorator.loc);
- });
-
- } else if (node.declaration && util.isExportDeclaration(node)) {
- // Nullify .loc information for the child declaration so that we never
- // try to reprint it without also reprinting the export declaration.
- node.declaration.loc = null;
-
- // Expand the .loc of the node responsible for printing the decorators
- // (here, the export declaration) so that it includes node.decorators.
- var decorators = node.declaration.decorators;
- if (decorators) {
- decorators.forEach(function (decorator) {
- expandLoc(loc, decorator.loc);
- });
- }
-
- } else if ((n.MethodDefinition && n.MethodDefinition.check(node)) ||
- (n.Property.check(node) && (node.method || node.shorthand))) {
- // If the node is a MethodDefinition or a .method or .shorthand
- // Property, then the location information stored in
- // node.value.loc is very likely untrustworthy (just the {body}
- // part of a method, or nothing in the case of shorthand
- // properties), so we null out that information to prevent
- // accidental reuse of bogus source code during reprinting.
- node.value.loc = null;
-
- if (n.FunctionExpression.check(node.value)) {
- // FunctionExpression method values should be anonymous,
- // because their .id fields are ignored anyway.
- node.value.id = null;
- }
- }
-};
-
-function fixTemplateLiteral(node, lines) {
- assert.strictEqual(node.type, "TemplateLiteral");
-
- if (node.quasis.length === 0) {
- // If there are no quasi elements, then there is nothing to fix.
- return;
- }
-
- // First we need to exclude the opening ` from the .loc of the first
- // quasi element, in case the parser accidentally decided to include it.
- var afterLeftBackTickPos = copyPos(node.loc.start);
- assert.strictEqual(lines.charAt(afterLeftBackTickPos), "`");
- assert.ok(lines.nextPos(afterLeftBackTickPos));
- var firstQuasi = node.quasis[0];
- if (comparePos(firstQuasi.loc.start, afterLeftBackTickPos) < 0) {
- firstQuasi.loc.start = afterLeftBackTickPos;
- }
-
- // Next we need to exclude the closing ` from the .loc of the last quasi
- // element, in case the parser accidentally decided to include it.
- var rightBackTickPos = copyPos(node.loc.end);
- assert.ok(lines.prevPos(rightBackTickPos));
- assert.strictEqual(lines.charAt(rightBackTickPos), "`");
- var lastQuasi = node.quasis[node.quasis.length - 1];
- if (comparePos(rightBackTickPos, lastQuasi.loc.end) < 0) {
- lastQuasi.loc.end = rightBackTickPos;
- }
-
- // Now we need to exclude ${ and } characters from the .loc's of all
- // quasi elements, since some parsers accidentally include them.
- node.expressions.forEach(function (expr, i) {
- // Rewind from expr.loc.start over any whitespace and the ${ that
- // precedes the expression. The position of the $ should be the same
- // as the .loc.end of the preceding quasi element, but some parsers
- // accidentally include the ${ in the .loc of the quasi element.
- var dollarCurlyPos = lines.skipSpaces(expr.loc.start, true, false);
- if (lines.prevPos(dollarCurlyPos) &&
- lines.charAt(dollarCurlyPos) === "{" &&
- lines.prevPos(dollarCurlyPos) &&
- lines.charAt(dollarCurlyPos) === "$") {
- var quasiBefore = node.quasis[i];
- if (comparePos(dollarCurlyPos, quasiBefore.loc.end) < 0) {
- quasiBefore.loc.end = dollarCurlyPos;
- }
- }
-
- // Likewise, some parsers accidentally include the } that follows
- // the expression in the .loc of the following quasi element.
- var rightCurlyPos = lines.skipSpaces(expr.loc.end, false, false);
- if (lines.charAt(rightCurlyPos) === "}") {
- assert.ok(lines.nextPos(rightCurlyPos));
- // Now rightCurlyPos is technically the position just after the }.
- var quasiAfter = node.quasis[i + 1];
- if (comparePos(quasiAfter.loc.start, rightCurlyPos) < 0) {
- quasiAfter.loc.start = rightCurlyPos;
- }
- }
- });
-}
-
-util.isExportDeclaration = function (node) {
- if (node) switch (node.type) {
- case "ExportDeclaration":
- case "ExportDefaultDeclaration":
- case "ExportDefaultSpecifier":
- case "DeclareExportDeclaration":
- case "ExportNamedDeclaration":
- case "ExportAllDeclaration":
- return true;
- }
-
- return false;
-};
-
-util.getParentExportDeclaration = function (path) {
- var parentNode = path.getParentNode();
- if (path.getName() === "declaration" &&
- util.isExportDeclaration(parentNode)) {
- return parentNode;
- }
-
- return null;
-};
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/main.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/main.js
deleted file mode 100644
index 60d5ea6cf4..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/main.js
+++ /dev/null
@@ -1,99 +0,0 @@
-var types = require("./lib/types");
-var parse = require("./lib/parser").parse;
-var Printer = require("./lib/printer").Printer;
-
-function print(node, options) {
- return new Printer(options).print(node);
-}
-
-function prettyPrint(node, options) {
- return new Printer(options).printGenerically(node);
-}
-
-function run(transformer, options) {
- return runFile(process.argv[2], transformer, options);
-}
-
-function runFile(path, transformer, options) {
- require("fs").readFile(path, "utf-8", function(err, code) {
- if (err) {
- console.error(err);
- return;
- }
-
- runString(code, transformer, options);
- });
-}
-
-function defaultWriteback(output) {
- process.stdout.write(output);
-}
-
-function runString(code, transformer, options) {
- var writeback = options && options.writeback || defaultWriteback;
- transformer(parse(code, options), function(node) {
- writeback(print(node, options).code);
- });
-}
-
-Object.defineProperties(exports, {
- /**
- * Parse a string of code into an augmented syntax tree suitable for
- * arbitrary modification and reprinting.
- */
- parse: {
- enumerable: true,
- value: parse
- },
-
- /**
- * Traverse and potentially modify an abstract syntax tree using a
- * convenient visitor syntax:
- *
- * recast.visit(ast, {
- * names: [],
- * visitIdentifier: function(path) {
- * var node = path.value;
- * this.visitor.names.push(node.name);
- * this.traverse(path);
- * }
- * });
- */
- visit: {
- enumerable: true,
- value: types.visit
- },
-
- /**
- * Reprint a modified syntax tree using as much of the original source
- * code as possible.
- */
- print: {
- enumerable: true,
- value: print
- },
-
- /**
- * Print without attempting to reuse any original source code.
- */
- prettyPrint: {
- enumerable: false,
- value: prettyPrint
- },
-
- /**
- * Customized version of require("ast-types").
- */
- types: {
- enumerable: false,
- value: types
- },
-
- /**
- * Convenient command-line interface (see e.g. example/add-braces).
- */
- run: {
- enumerable: false,
- value: run
- }
-});
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/.npmignore b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/.npmignore
deleted file mode 100644
index e216ae5e13..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/node_modules
-/test
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/.travis.yml b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/.travis.yml
deleted file mode 100644
index 1b921d6ce7..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/.travis.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-language: node_js
-node_js:
- - "5.0"
- - "4.0"
- - "iojs"
- - "0.12"
- - "0.11"
- - "0.10"
- - "0.8"
- - "0.6"
-
-sudo: false
-
-before_install:
- npm install -g npm@'>=1.4.3'
-
-matrix:
- allow_failures:
- - node_js: "0.8"
- - node_js: "0.6"
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/LICENSE b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/LICENSE
deleted file mode 100644
index 3f9d40b55b..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2013 Ben Newman <bn@cs.stanford.edu>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/README.md b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/README.md
deleted file mode 100644
index fc8ca80172..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/README.md
+++ /dev/null
@@ -1,489 +0,0 @@
-AST Types
-===
-
-This module provides an efficient, modular,
-[Esprima](https://github.com/ariya/esprima)-compatible implementation of
-the [abstract syntax
-tree](http://en.wikipedia.org/wiki/Abstract_syntax_tree) type hierarchy
-pioneered by the [Mozilla Parser
-API](https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API).
-
-[![Build Status](https://travis-ci.org/benjamn/ast-types.png?branch=master)](https://travis-ci.org/benjamn/ast-types)
-
-Installation
----
-
-From NPM:
-
- npm install ast-types
-
-From GitHub:
-
- cd path/to/node_modules
- git clone git://github.com/benjamn/ast-types.git
- cd ast-types
- npm install .
-
-Basic Usage
----
-```js
-var assert = require("assert");
-var n = require("ast-types").namedTypes;
-var b = require("ast-types").builders;
-
-var fooId = b.identifier("foo");
-var ifFoo = b.ifStatement(fooId, b.blockStatement([
- b.expressionStatement(b.callExpression(fooId, []))
-]));
-
-assert.ok(n.IfStatement.check(ifFoo));
-assert.ok(n.Statement.check(ifFoo));
-assert.ok(n.Node.check(ifFoo));
-
-assert.ok(n.BlockStatement.check(ifFoo.consequent));
-assert.strictEqual(
- ifFoo.consequent.body[0].expression.arguments.length,
- 0);
-
-assert.strictEqual(ifFoo.test, fooId);
-assert.ok(n.Expression.check(ifFoo.test));
-assert.ok(n.Identifier.check(ifFoo.test));
-assert.ok(!n.Statement.check(ifFoo.test));
-```
-
-AST Traversal
----
-
-Because it understands the AST type system so thoroughly, this library
-is able to provide excellent node iteration and traversal mechanisms.
-
-If you want complete control over the traversal, and all you need is a way
-of enumerating the known fields of your AST nodes and getting their
-values, you may be interested in the primitives `getFieldNames` and
-`getFieldValue`:
-```js
-var types = require("ast-types");
-var partialFunExpr = { type: "FunctionExpression" };
-
-// Even though partialFunExpr doesn't actually contain all the fields that
-// are expected for a FunctionExpression, types.getFieldNames knows:
-console.log(types.getFieldNames(partialFunExpr));
-// [ 'type', 'id', 'params', 'body', 'generator', 'expression',
-// 'defaults', 'rest', 'async' ]
-
-// For fields that have default values, types.getFieldValue will return
-// the default if the field is not actually defined.
-console.log(types.getFieldValue(partialFunExpr, "generator"));
-// false
-```
-
-Two more low-level helper functions, `eachField` and `someField`, are
-defined in terms of `getFieldNames` and `getFieldValue`:
-```js
-// Iterate over all defined fields of an object, including those missing
-// or undefined, passing each field name and effective value (as returned
-// by getFieldValue) to the callback. If the object has no corresponding
-// Def, the callback will never be called.
-exports.eachField = function(object, callback, context) {
- getFieldNames(object).forEach(function(name) {
- callback.call(this, name, getFieldValue(object, name));
- }, context);
-};
-
-// Similar to eachField, except that iteration stops as soon as the
-// callback returns a truthy value. Like Array.prototype.some, the final
-// result is either true or false to indicates whether the callback
-// returned true for any element or not.
-exports.someField = function(object, callback, context) {
- return getFieldNames(object).some(function(name) {
- return callback.call(this, name, getFieldValue(object, name));
- }, context);
-};
-```
-
-So here's how you might make a copy of an AST node:
-```js
-var copy = {};
-require("ast-types").eachField(node, function(name, value) {
- // Note that undefined fields will be visited too, according to
- // the rules associated with node.type, and default field values
- // will be substituted if appropriate.
- copy[name] = value;
-})
-```
-
-But that's not all! You can also easily visit entire syntax trees using
-the powerful `types.visit` abstraction.
-
-Here's a trivial example of how you might assert that `arguments.callee`
-is never used in `ast`:
-```js
-var assert = require("assert");
-var types = require("ast-types");
-var n = types.namedTypes;
-
-types.visit(ast, {
- // This method will be called for any node with .type "MemberExpression":
- visitMemberExpression: function(path) {
- // Visitor methods receive a single argument, a NodePath object
- // wrapping the node of interest.
- var node = path.node;
-
- if (n.Identifier.check(node.object) &&
- node.object.name === "arguments" &&
- n.Identifier.check(node.property)) {
- assert.notStrictEqual(node.property.name, "callee");
- }
-
- // It's your responsibility to call this.traverse with some
- // NodePath object (usually the one passed into the visitor
- // method) before the visitor method returns, or return false to
- // indicate that the traversal need not continue any further down
- // this subtree.
- this.traverse(path);
- }
-});
-```
-
-Here's a slightly more involved example of transforming `...rest`
-parameters into browser-runnable ES5 JavaScript:
-
-```js
-var b = types.builders;
-
-// Reuse the same AST structure for Array.prototype.slice.call.
-var sliceExpr = b.memberExpression(
- b.memberExpression(
- b.memberExpression(
- b.identifier("Array"),
- b.identifier("prototype"),
- false
- ),
- b.identifier("slice"),
- false
- ),
- b.identifier("call"),
- false
-);
-
-types.visit(ast, {
- // This method will be called for any node whose type is a subtype of
- // Function (e.g., FunctionDeclaration, FunctionExpression, and
- // ArrowFunctionExpression). Note that types.visit precomputes a
- // lookup table from every known type to the appropriate visitor
- // method to call for nodes of that type, so the dispatch takes
- // constant time.
- visitFunction: function(path) {
- // Visitor methods receive a single argument, a NodePath object
- // wrapping the node of interest.
- var node = path.node;
-
- // It's your responsibility to call this.traverse with some
- // NodePath object (usually the one passed into the visitor
- // method) before the visitor method returns, or return false to
- // indicate that the traversal need not continue any further down
- // this subtree. An assertion will fail if you forget, which is
- // awesome, because it means you will never again make the
- // disastrous mistake of forgetting to traverse a subtree. Also
- // cool: because you can call this method at any point in the
- // visitor method, it's up to you whether your traversal is
- // pre-order, post-order, or both!
- this.traverse(path);
-
- // This traversal is only concerned with Function nodes that have
- // rest parameters.
- if (!node.rest) {
- return;
- }
-
- // For the purposes of this example, we won't worry about functions
- // with Expression bodies.
- n.BlockStatement.assert(node.body);
-
- // Use types.builders to build a variable declaration of the form
- //
- // var rest = Array.prototype.slice.call(arguments, n);
- //
- // where `rest` is the name of the rest parameter, and `n` is a
- // numeric literal specifying the number of named parameters the
- // function takes.
- var restVarDecl = b.variableDeclaration("var", [
- b.variableDeclarator(
- node.rest,
- b.callExpression(sliceExpr, [
- b.identifier("arguments"),
- b.literal(node.params.length)
- ])
- )
- ]);
-
- // Similar to doing node.body.body.unshift(restVarDecl), except
- // that the other NodePath objects wrapping body statements will
- // have their indexes updated to accommodate the new statement.
- path.get("body", "body").unshift(restVarDecl);
-
- // Nullify node.rest now that we have simulated the behavior of
- // the rest parameter using ordinary JavaScript.
- path.get("rest").replace(null);
-
- // There's nothing wrong with doing node.rest = null, but I wanted
- // to point out that the above statement has the same effect.
- assert.strictEqual(node.rest, null);
- }
-});
-```
-
-Here's how you might use `types.visit` to implement a function that
-determines if a given function node refers to `this`:
-
-```js
-function usesThis(funcNode) {
- n.Function.assert(funcNode);
- var result = false;
-
- types.visit(funcNode, {
- visitThisExpression: function(path) {
- result = true;
-
- // The quickest way to terminate the traversal is to call
- // this.abort(), which throws a special exception (instanceof
- // this.AbortRequest) that will be caught in the top-level
- // types.visit method, so you don't have to worry about
- // catching the exception yourself.
- this.abort();
- },
-
- visitFunction: function(path) {
- // ThisExpression nodes in nested scopes don't count as `this`
- // references for the original function node, so we can safely
- // avoid traversing this subtree.
- return false;
- },
-
- visitCallExpression: function(path) {
- var node = path.node;
-
- // If the function contains CallExpression nodes involving
- // super, those expressions will implicitly depend on the
- // value of `this`, even though they do not explicitly contain
- // any ThisExpression nodes.
- if (this.isSuperCallExpression(node)) {
- result = true;
- this.abort(); // Throws AbortRequest exception.
- }
-
- this.traverse(path);
- },
-
- // Yes, you can define arbitrary helper methods.
- isSuperCallExpression: function(callExpr) {
- n.CallExpression.assert(callExpr);
- return this.isSuperIdentifier(callExpr.callee)
- || this.isSuperMemberExpression(callExpr.callee);
- },
-
- // And even helper helper methods!
- isSuperIdentifier: function(node) {
- return n.Identifier.check(node.callee)
- && node.callee.name === "super";
- },
-
- isSuperMemberExpression: function(node) {
- return n.MemberExpression.check(node.callee)
- && n.Identifier.check(node.callee.object)
- && node.callee.object.name === "super";
- }
- });
-
- return result;
-}
-```
-
-As you might guess, when an `AbortRequest` is thrown from a subtree, the
-exception will propagate from the corresponding calls to `this.traverse`
-in the ancestor visitor methods. If you decide you want to cancel the
-request, simply catch the exception and call its `.cancel()` method. The
-rest of the subtree beneath the `try`-`catch` block will be abandoned, but
-the remaining siblings of the ancestor node will still be visited.
-
-NodePath
----
-
-The `NodePath` object passed to visitor methods is a wrapper around an AST
-node, and it serves to provide access to the chain of ancestor objects
-(all the way back to the root of the AST) and scope information.
-
-In general, `path.node` refers to the wrapped node, `path.parent.node`
-refers to the nearest `Node` ancestor, `path.parent.parent.node` to the
-grandparent, and so on.
-
-Note that `path.node` may not be a direct property value of
-`path.parent.node`; for instance, it might be the case that `path.node` is
-an element of an array that is a direct child of the parent node:
-```js
-path.node === path.parent.node.elements[3]
-```
-in which case you should know that `path.parentPath` provides
-finer-grained access to the complete path of objects (not just the `Node`
-ones) from the root of the AST:
-```js
-// In reality, path.parent is the grandparent of path:
-path.parentPath.parentPath === path.parent
-
-// The path.parentPath object wraps the elements array (note that we use
-// .value because the elements array is not a Node):
-path.parentPath.value === path.parent.node.elements
-
-// The path.node object is the fourth element in that array:
-path.parentPath.value[3] === path.node
-
-// Unlike path.node and path.value, which are synonyms because path.node
-// is a Node object, path.parentPath.node is distinct from
-// path.parentPath.value, because the elements array is not a
-// Node. Instead, path.parentPath.node refers to the closest ancestor
-// Node, which happens to be the same as path.parent.node:
-path.parentPath.node === path.parent.node
-
-// The path is named for its index in the elements array:
-path.name === 3
-
-// Likewise, path.parentPath is named for the property by which
-// path.parent.node refers to it:
-path.parentPath.name === "elements"
-
-// Putting it all together, we can follow the chain of object references
-// from path.parent.node all the way to path.node by accessing each
-// property by name:
-path.parent.node[path.parentPath.name][path.name] === path.node
-```
-
-These `NodePath` objects are created during the traversal without
-modifying the AST nodes themselves, so it's not a problem if the same node
-appears more than once in the AST (like `Array.prototype.slice.call` in
-the example above), because it will be visited with a distict `NodePath`
-each time it appears.
-
-Child `NodePath` objects are created lazily, by calling the `.get` method
-of a parent `NodePath` object:
-```js
-// If a NodePath object for the elements array has never been created
-// before, it will be created here and cached in the future:
-path.get("elements").get(3).value === path.value.elements[3]
-
-// Alternatively, you can pass multiple property names to .get instead of
-// chaining multiple .get calls:
-path.get("elements", 0).value === path.value.elements[0]
-```
-
-`NodePath` objects support a number of useful methods:
-```js
-// Replace one node with another node:
-var fifth = path.get("elements", 4);
-fifth.replace(newNode);
-
-// Now do some stuff that might rearrange the list, and this replacement
-// remains safe:
-fifth.replace(newerNode);
-
-// Replace the third element in an array with two new nodes:
-path.get("elements", 2).replace(
- b.identifier("foo"),
- b.thisExpression()
-);
-
-// Remove a node and its parent if it would leave a redundant AST node:
-//e.g. var t = 1, y =2; removing the `t` and `y` declarators results in `var undefined`.
-path.prune(); //returns the closest parent `NodePath`.
-
-// Remove a node from a list of nodes:
-path.get("elements", 3).replace();
-
-// Add three new nodes to the beginning of a list of nodes:
-path.get("elements").unshift(a, b, c);
-
-// Remove and return the first node in a list of nodes:
-path.get("elements").shift();
-
-// Push two new nodes onto the end of a list of nodes:
-path.get("elements").push(d, e);
-
-// Remove and return the last node in a list of nodes:
-path.get("elements").pop();
-
-// Insert a new node before/after the seventh node in a list of nodes:
-var seventh = path.get("elements", 6);
-seventh.insertBefore(newNode);
-seventh.insertAfter(newNode);
-
-// Insert a new element at index 5 in a list of nodes:
-path.get("elements").insertAt(5, newNode);
-```
-
-Scope
----
-
-The object exposed as `path.scope` during AST traversals provides
-information about variable and function declarations in the scope that
-contains `path.node`. See [scope.js](lib/scope.js) for its public
-interface, which currently includes `.isGlobal`, `.getGlobalScope()`,
-`.depth`, `.declares(name)`, `.lookup(name)`, and `.getBindings()`.
-
-Custom AST Node Types
----
-
-The `ast-types` module was designed to be extended. To that end, it
-provides a readable, declarative syntax for specifying new AST node types,
-based primarily upon the `require("ast-types").Type.def` function:
-```js
-var types = require("ast-types");
-var def = types.Type.def;
-var string = types.builtInTypes.string;
-var b = types.builders;
-
-// Suppose you need a named File type to wrap your Programs.
-def("File")
- .bases("Node")
- .build("name", "program")
- .field("name", string)
- .field("program", def("Program"));
-
-// Prevent further modifications to the File type (and any other
-// types newly introduced by def(...)).
-types.finalize();
-
-// The b.file builder function is now available. It expects two
-// arguments, as named by .build("name", "program") above.
-var main = b.file("main.js", b.program([
- // Pointless program contents included for extra color.
- b.functionDeclaration(b.identifier("succ"), [
- b.identifier("x")
- ], b.blockStatement([
- b.returnStatement(
- b.binaryExpression(
- "+", b.identifier("x"), b.literal(1)
- )
- )
- ]))
-]));
-
-assert.strictEqual(main.name, "main.js");
-assert.strictEqual(main.program.body[0].params[0].name, "x");
-// etc.
-
-// If you pass the wrong type of arguments, or fail to pass enough
-// arguments, an AssertionError will be thrown.
-
-b.file(b.blockStatement([]));
-// ==> AssertionError: {"body":[],"type":"BlockStatement","loc":null} does not match type string
-
-b.file("lib/types.js", b.thisExpression());
-// ==> AssertionError: {"type":"ThisExpression","loc":null} does not match type Program
-```
-The `def` syntax is used to define all the default AST node types found in
-[core.js](def/core.js),
-[e4x.js](def/e4x.js),
-[es6.js](def/es6.js),
-[es7.js](def/es7.js),
-[flow.js](def/flow.js), and
-[jsx.js](def/jsx.js), so you have
-no shortage of examples to learn from.
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/babel.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/babel.js
deleted file mode 100644
index 608ffbc7b7..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/babel.js
+++ /dev/null
@@ -1,105 +0,0 @@
-require("./es7");
-
-var types = require("../lib/types");
-var defaults = require("../lib/shared").defaults;
-var def = types.Type.def;
-var or = types.Type.or;
-
-def("Noop")
- .bases("Node")
- .build();
-
-def("DoExpression")
- .bases("Expression")
- .build("body")
- .field("body", [def("Statement")]);
-
-def("Super")
- .bases("Expression")
- .build();
-
-def("BindExpression")
- .bases("Expression")
- .build("object", "callee")
- .field("object", or(def("Expression"), null))
- .field("callee", def("Expression"));
-
-def("Decorator")
- .bases("Node")
- .build("expression")
- .field("expression", def("Expression"));
-
-def("Property")
- .field("decorators",
- or([def("Decorator")], null),
- defaults["null"]);
-
-def("MethodDefinition")
- .field("decorators",
- or([def("Decorator")], null),
- defaults["null"]);
-
-def("MetaProperty")
- .bases("Expression")
- .build("meta", "property")
- .field("meta", def("Identifier"))
- .field("property", def("Identifier"));
-
-def("ParenthesizedExpression")
- .bases("Expression")
- .build("expression")
- .field("expression", def("Expression"));
-
-def("ImportSpecifier")
- .bases("ModuleSpecifier")
- .build("imported", "local")
- .field("imported", def("Identifier"));
-
-def("ImportDefaultSpecifier")
- .bases("ModuleSpecifier")
- .build("local");
-
-def("ImportNamespaceSpecifier")
- .bases("ModuleSpecifier")
- .build("local");
-
-def("ExportDefaultDeclaration")
- .bases("Declaration")
- .build("declaration")
- .field("declaration", or(def("Declaration"), def("Expression")));
-
-def("ExportNamedDeclaration")
- .bases("Declaration")
- .build("declaration", "specifiers", "source")
- .field("declaration", or(def("Declaration"), null))
- .field("specifiers", [def("ExportSpecifier")], defaults.emptyArray)
- .field("source", or(def("Literal"), null), defaults["null"]);
-
-def("ExportSpecifier")
- .bases("ModuleSpecifier")
- .build("local", "exported")
- .field("exported", def("Identifier"));
-
-def("ExportNamespaceSpecifier")
- .bases("Specifier")
- .build("exported")
- .field("exported", def("Identifier"));
-
-def("ExportDefaultSpecifier")
- .bases("Specifier")
- .build("exported")
- .field("exported", def("Identifier"));
-
-def("ExportAllDeclaration")
- .bases("Declaration")
- .build("exported", "source")
- .field("exported", or(def("Identifier"), null))
- .field("source", def("Literal"));
-
-def("CommentBlock")
- .bases("Comment")
- .build("value", /*optional:*/ "leading", "trailing");
-
-def("CommentLine")
- .bases("Comment")
- .build("value", /*optional:*/ "leading", "trailing");
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/core.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/core.js
deleted file mode 100644
index 2942c4b154..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/core.js
+++ /dev/null
@@ -1,367 +0,0 @@
-var types = require("../lib/types");
-var Type = types.Type;
-var def = Type.def;
-var or = Type.or;
-var shared = require("../lib/shared");
-var defaults = shared.defaults;
-var geq = shared.geq;
-
-// Abstract supertype of all syntactic entities that are allowed to have a
-// .loc field.
-def("Printable")
- .field("loc", or(
- def("SourceLocation"),
- null
- ), defaults["null"], true);
-
-def("Node")
- .bases("Printable")
- .field("type", String)
- .field("comments", or(
- [def("Comment")],
- null
- ), defaults["null"], true);
-
-def("SourceLocation")
- .build("start", "end", "source")
- .field("start", def("Position"))
- .field("end", def("Position"))
- .field("source", or(String, null), defaults["null"]);
-
-def("Position")
- .build("line", "column")
- .field("line", geq(1))
- .field("column", geq(0));
-
-def("File")
- .bases("Node")
- .build("program")
- .field("program", def("Program"));
-
-def("Program")
- .bases("Node")
- .build("body")
- .field("body", [def("Statement")]);
-
-def("Function")
- .bases("Node")
- .field("id", or(def("Identifier"), null), defaults["null"])
- .field("params", [def("Pattern")])
- .field("body", def("BlockStatement"));
-
-def("Statement").bases("Node");
-
-// The empty .build() here means that an EmptyStatement can be constructed
-// (i.e. it's not abstract) but that it needs no arguments.
-def("EmptyStatement").bases("Statement").build();
-
-def("BlockStatement")
- .bases("Statement")
- .build("body")
- .field("body", [def("Statement")]);
-
-// TODO Figure out how to silently coerce Expressions to
-// ExpressionStatements where a Statement was expected.
-def("ExpressionStatement")
- .bases("Statement")
- .build("expression")
- .field("expression", def("Expression"));
-
-def("IfStatement")
- .bases("Statement")
- .build("test", "consequent", "alternate")
- .field("test", def("Expression"))
- .field("consequent", def("Statement"))
- .field("alternate", or(def("Statement"), null), defaults["null"]);
-
-def("LabeledStatement")
- .bases("Statement")
- .build("label", "body")
- .field("label", def("Identifier"))
- .field("body", def("Statement"));
-
-def("BreakStatement")
- .bases("Statement")
- .build("label")
- .field("label", or(def("Identifier"), null), defaults["null"]);
-
-def("ContinueStatement")
- .bases("Statement")
- .build("label")
- .field("label", or(def("Identifier"), null), defaults["null"]);
-
-def("WithStatement")
- .bases("Statement")
- .build("object", "body")
- .field("object", def("Expression"))
- .field("body", def("Statement"));
-
-def("SwitchStatement")
- .bases("Statement")
- .build("discriminant", "cases", "lexical")
- .field("discriminant", def("Expression"))
- .field("cases", [def("SwitchCase")])
- .field("lexical", Boolean, defaults["false"]);
-
-def("ReturnStatement")
- .bases("Statement")
- .build("argument")
- .field("argument", or(def("Expression"), null));
-
-def("ThrowStatement")
- .bases("Statement")
- .build("argument")
- .field("argument", def("Expression"));
-
-def("TryStatement")
- .bases("Statement")
- .build("block", "handler", "finalizer")
- .field("block", def("BlockStatement"))
- .field("handler", or(def("CatchClause"), null), function() {
- return this.handlers && this.handlers[0] || null;
- })
- .field("handlers", [def("CatchClause")], function() {
- return this.handler ? [this.handler] : [];
- }, true) // Indicates this field is hidden from eachField iteration.
- .field("guardedHandlers", [def("CatchClause")], defaults.emptyArray)
- .field("finalizer", or(def("BlockStatement"), null), defaults["null"]);
-
-def("CatchClause")
- .bases("Node")
- .build("param", "guard", "body")
- .field("param", def("Pattern"))
- .field("guard", or(def("Expression"), null), defaults["null"])
- .field("body", def("BlockStatement"));
-
-def("WhileStatement")
- .bases("Statement")
- .build("test", "body")
- .field("test", def("Expression"))
- .field("body", def("Statement"));
-
-def("DoWhileStatement")
- .bases("Statement")
- .build("body", "test")
- .field("body", def("Statement"))
- .field("test", def("Expression"));
-
-def("ForStatement")
- .bases("Statement")
- .build("init", "test", "update", "body")
- .field("init", or(
- def("VariableDeclaration"),
- def("Expression"),
- null))
- .field("test", or(def("Expression"), null))
- .field("update", or(def("Expression"), null))
- .field("body", def("Statement"));
-
-def("ForInStatement")
- .bases("Statement")
- .build("left", "right", "body")
- .field("left", or(
- def("VariableDeclaration"),
- def("Expression")))
- .field("right", def("Expression"))
- .field("body", def("Statement"));
-
-def("DebuggerStatement").bases("Statement").build();
-
-def("Declaration").bases("Statement");
-
-def("FunctionDeclaration")
- .bases("Function", "Declaration")
- .build("id", "params", "body")
- .field("id", def("Identifier"));
-
-def("FunctionExpression")
- .bases("Function", "Expression")
- .build("id", "params", "body");
-
-def("VariableDeclaration")
- .bases("Declaration")
- .build("kind", "declarations")
- .field("kind", or("var", "let", "const"))
- .field("declarations", [def("VariableDeclarator")]);
-
-def("VariableDeclarator")
- .bases("Node")
- .build("id", "init")
- .field("id", def("Pattern"))
- .field("init", or(def("Expression"), null));
-
-// TODO Are all Expressions really Patterns?
-def("Expression").bases("Node", "Pattern");
-
-def("ThisExpression").bases("Expression").build();
-
-def("ArrayExpression")
- .bases("Expression")
- .build("elements")
- .field("elements", [or(def("Expression"), null)]);
-
-def("ObjectExpression")
- .bases("Expression")
- .build("properties")
- .field("properties", [def("Property")]);
-
-// TODO Not in the Mozilla Parser API, but used by Esprima.
-def("Property")
- .bases("Node") // Want to be able to visit Property Nodes.
- .build("kind", "key", "value")
- .field("kind", or("init", "get", "set"))
- .field("key", or(def("Literal"), def("Identifier")))
- .field("value", def("Expression"));
-
-def("SequenceExpression")
- .bases("Expression")
- .build("expressions")
- .field("expressions", [def("Expression")]);
-
-var UnaryOperator = or(
- "-", "+", "!", "~",
- "typeof", "void", "delete");
-
-def("UnaryExpression")
- .bases("Expression")
- .build("operator", "argument", "prefix")
- .field("operator", UnaryOperator)
- .field("argument", def("Expression"))
- // Esprima doesn't bother with this field, presumably because it's
- // always true for unary operators.
- .field("prefix", Boolean, defaults["true"]);
-
-var BinaryOperator = or(
- "==", "!=", "===", "!==",
- "<", "<=", ">", ">=",
- "<<", ">>", ">>>",
- "+", "-", "*", "/", "%",
- "&", // TODO Missing from the Parser API.
- "|", "^", "in",
- "instanceof", "..");
-
-def("BinaryExpression")
- .bases("Expression")
- .build("operator", "left", "right")
- .field("operator", BinaryOperator)
- .field("left", def("Expression"))
- .field("right", def("Expression"));
-
-var AssignmentOperator = or(
- "=", "+=", "-=", "*=", "/=", "%=",
- "<<=", ">>=", ">>>=",
- "|=", "^=", "&=");
-
-def("AssignmentExpression")
- .bases("Expression")
- .build("operator", "left", "right")
- .field("operator", AssignmentOperator)
- .field("left", def("Pattern"))
- .field("right", def("Expression"));
-
-var UpdateOperator = or("++", "--");
-
-def("UpdateExpression")
- .bases("Expression")
- .build("operator", "argument", "prefix")
- .field("operator", UpdateOperator)
- .field("argument", def("Expression"))
- .field("prefix", Boolean);
-
-var LogicalOperator = or("||", "&&");
-
-def("LogicalExpression")
- .bases("Expression")
- .build("operator", "left", "right")
- .field("operator", LogicalOperator)
- .field("left", def("Expression"))
- .field("right", def("Expression"));
-
-def("ConditionalExpression")
- .bases("Expression")
- .build("test", "consequent", "alternate")
- .field("test", def("Expression"))
- .field("consequent", def("Expression"))
- .field("alternate", def("Expression"));
-
-def("NewExpression")
- .bases("Expression")
- .build("callee", "arguments")
- .field("callee", def("Expression"))
- // The Mozilla Parser API gives this type as [or(def("Expression"),
- // null)], but null values don't really make sense at the call site.
- // TODO Report this nonsense.
- .field("arguments", [def("Expression")]);
-
-def("CallExpression")
- .bases("Expression")
- .build("callee", "arguments")
- .field("callee", def("Expression"))
- // See comment for NewExpression above.
- .field("arguments", [def("Expression")]);
-
-def("MemberExpression")
- .bases("Expression")
- .build("object", "property", "computed")
- .field("object", def("Expression"))
- .field("property", or(def("Identifier"), def("Expression")))
- .field("computed", Boolean, function(){
- var type = this.property.type;
- if (type === 'Literal' ||
- type === 'MemberExpression' ||
- type === 'BinaryExpression') {
- return true;
- }
- return false;
- });
-
-def("Pattern").bases("Node");
-
-def("SwitchCase")
- .bases("Node")
- .build("test", "consequent")
- .field("test", or(def("Expression"), null))
- .field("consequent", [def("Statement")]);
-
-def("Identifier")
- // But aren't Expressions and Patterns already Nodes? TODO Report this.
- .bases("Node", "Expression", "Pattern")
- .build("name")
- .field("name", String);
-
-def("Literal")
- // But aren't Expressions already Nodes? TODO Report this.
- .bases("Node", "Expression")
- .build("value")
- .field("value", or(String, Boolean, null, Number, RegExp))
- .field("regex", or({
- pattern: String,
- flags: String
- }, null), function() {
- if (this.value instanceof RegExp) {
- var flags = "";
-
- if (this.value.ignoreCase) flags += "i";
- if (this.value.multiline) flags += "m";
- if (this.value.global) flags += "g";
-
- return {
- pattern: this.value.source,
- flags: flags
- };
- }
-
- return null;
- });
-
-// Abstract (non-buildable) comment supertype. Not a Node.
-def("Comment")
- .bases("Printable")
- .field("value", String)
- // A .leading comment comes before the node, whereas a .trailing
- // comment comes after it. These two fields should not both be true,
- // but they might both be false when the comment falls inside a node
- // and the node has no children for the comment to lead or trail,
- // e.g. { /*dangling*/ }.
- .field("leading", Boolean, defaults["true"])
- .field("trailing", Boolean, defaults["false"]);
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/e4x.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/e4x.js
deleted file mode 100644
index 22ac0fff4f..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/e4x.js
+++ /dev/null
@@ -1,84 +0,0 @@
-require("./core");
-var types = require("../lib/types");
-var def = types.Type.def;
-var or = types.Type.or;
-
-// Note that none of these types are buildable because the Mozilla Parser
-// API doesn't specify any builder functions, and nobody uses E4X anymore.
-
-def("XMLDefaultDeclaration")
- .bases("Declaration")
- .field("namespace", def("Expression"));
-
-def("XMLAnyName").bases("Expression");
-
-def("XMLQualifiedIdentifier")
- .bases("Expression")
- .field("left", or(def("Identifier"), def("XMLAnyName")))
- .field("right", or(def("Identifier"), def("Expression")))
- .field("computed", Boolean);
-
-def("XMLFunctionQualifiedIdentifier")
- .bases("Expression")
- .field("right", or(def("Identifier"), def("Expression")))
- .field("computed", Boolean);
-
-def("XMLAttributeSelector")
- .bases("Expression")
- .field("attribute", def("Expression"));
-
-def("XMLFilterExpression")
- .bases("Expression")
- .field("left", def("Expression"))
- .field("right", def("Expression"));
-
-def("XMLElement")
- .bases("XML", "Expression")
- .field("contents", [def("XML")]);
-
-def("XMLList")
- .bases("XML", "Expression")
- .field("contents", [def("XML")]);
-
-def("XML").bases("Node");
-
-def("XMLEscape")
- .bases("XML")
- .field("expression", def("Expression"));
-
-def("XMLText")
- .bases("XML")
- .field("text", String);
-
-def("XMLStartTag")
- .bases("XML")
- .field("contents", [def("XML")]);
-
-def("XMLEndTag")
- .bases("XML")
- .field("contents", [def("XML")]);
-
-def("XMLPointTag")
- .bases("XML")
- .field("contents", [def("XML")]);
-
-def("XMLName")
- .bases("XML")
- .field("contents", or(String, [def("XML")]));
-
-def("XMLAttribute")
- .bases("XML")
- .field("value", String);
-
-def("XMLCdata")
- .bases("XML")
- .field("contents", String);
-
-def("XMLComment")
- .bases("XML")
- .field("contents", String);
-
-def("XMLProcessingInstruction")
- .bases("XML")
- .field("target", String)
- .field("contents", or(String, null));
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/es6.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/es6.js
deleted file mode 100644
index b73bc07c4b..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/es6.js
+++ /dev/null
@@ -1,217 +0,0 @@
-require("./core");
-var types = require("../lib/types");
-var def = types.Type.def;
-var or = types.Type.or;
-var defaults = require("../lib/shared").defaults;
-
-def("Function")
- .field("generator", Boolean, defaults["false"])
- .field("expression", Boolean, defaults["false"])
- .field("defaults", [or(def("Expression"), null)], defaults.emptyArray)
- // TODO This could be represented as a RestElement in .params.
- .field("rest", or(def("Identifier"), null), defaults["null"]);
-
-// The ESTree way of representing a ...rest parameter.
-def("RestElement")
- .bases("Pattern")
- .build("argument")
- .field("argument", def("Pattern"));
-
-def("SpreadElementPattern")
- .bases("Pattern")
- .build("argument")
- .field("argument", def("Pattern"));
-
-def("FunctionDeclaration")
- .build("id", "params", "body", "generator", "expression");
-
-def("FunctionExpression")
- .build("id", "params", "body", "generator", "expression");
-
-// The Parser API calls this ArrowExpression, but Esprima and all other
-// actual parsers use ArrowFunctionExpression.
-def("ArrowFunctionExpression")
- .bases("Function", "Expression")
- .build("params", "body", "expression")
- // The forced null value here is compatible with the overridden
- // definition of the "id" field in the Function interface.
- .field("id", null, defaults["null"])
- // Arrow function bodies are allowed to be expressions.
- .field("body", or(def("BlockStatement"), def("Expression")))
- // The current spec forbids arrow generators, so I have taken the
- // liberty of enforcing that. TODO Report this.
- .field("generator", false, defaults["false"]);
-
-def("YieldExpression")
- .bases("Expression")
- .build("argument", "delegate")
- .field("argument", or(def("Expression"), null))
- .field("delegate", Boolean, defaults["false"]);
-
-def("GeneratorExpression")
- .bases("Expression")
- .build("body", "blocks", "filter")
- .field("body", def("Expression"))
- .field("blocks", [def("ComprehensionBlock")])
- .field("filter", or(def("Expression"), null));
-
-def("ComprehensionExpression")
- .bases("Expression")
- .build("body", "blocks", "filter")
- .field("body", def("Expression"))
- .field("blocks", [def("ComprehensionBlock")])
- .field("filter", or(def("Expression"), null));
-
-def("ComprehensionBlock")
- .bases("Node")
- .build("left", "right", "each")
- .field("left", def("Pattern"))
- .field("right", def("Expression"))
- .field("each", Boolean);
-
-def("Property")
- .field("key", or(def("Literal"), def("Identifier"), def("Expression")))
- .field("value", or(def("Expression"), def("Pattern")))
- .field("method", Boolean, defaults["false"])
- .field("shorthand", Boolean, defaults["false"])
- .field("computed", Boolean, defaults["false"]);
-
-def("PropertyPattern")
- .bases("Pattern")
- .build("key", "pattern")
- .field("key", or(def("Literal"), def("Identifier"), def("Expression")))
- .field("pattern", def("Pattern"))
- .field("computed", Boolean, defaults["false"]);
-
-def("ObjectPattern")
- .bases("Pattern")
- .build("properties")
- .field("properties", [or(def("PropertyPattern"), def("Property"))]);
-
-def("ArrayPattern")
- .bases("Pattern")
- .build("elements")
- .field("elements", [or(def("Pattern"), null)]);
-
-def("MethodDefinition")
- .bases("Declaration")
- .build("kind", "key", "value", "static")
- .field("kind", or("constructor", "method", "get", "set"))
- .field("key", or(def("Literal"), def("Identifier"), def("Expression")))
- .field("value", def("Function"))
- .field("computed", Boolean, defaults["false"])
- .field("static", Boolean, defaults["false"]);
-
-def("SpreadElement")
- .bases("Node")
- .build("argument")
- .field("argument", def("Expression"));
-
-def("ArrayExpression")
- .field("elements", [or(
- def("Expression"),
- def("SpreadElement"),
- def("RestElement"),
- null
- )]);
-
-def("NewExpression")
- .field("arguments", [or(def("Expression"), def("SpreadElement"))]);
-
-def("CallExpression")
- .field("arguments", [or(def("Expression"), def("SpreadElement"))]);
-
-// Note: this node type is *not* an AssignmentExpression with a Pattern on
-// the left-hand side! The existing AssignmentExpression type already
-// supports destructuring assignments. AssignmentPattern nodes may appear
-// wherever a Pattern is allowed, and the right-hand side represents a
-// default value to be destructured against the left-hand side, if no
-// value is otherwise provided. For example: default parameter values.
-def("AssignmentPattern")
- .bases("Pattern")
- .build("left", "right")
- .field("left", def("Pattern"))
- .field("right", def("Expression"));
-
-var ClassBodyElement = or(
- def("MethodDefinition"),
- def("VariableDeclarator"),
- def("ClassPropertyDefinition"),
- def("ClassProperty")
-);
-
-def("ClassProperty")
- .bases("Declaration")
- .build("key")
- .field("key", or(def("Literal"), def("Identifier"), def("Expression")))
- .field("computed", Boolean, defaults["false"]);
-
-def("ClassPropertyDefinition") // static property
- .bases("Declaration")
- .build("definition")
- // Yes, Virginia, circular definitions are permitted.
- .field("definition", ClassBodyElement);
-
-def("ClassBody")
- .bases("Declaration")
- .build("body")
- .field("body", [ClassBodyElement]);
-
-def("ClassDeclaration")
- .bases("Declaration")
- .build("id", "body", "superClass")
- .field("id", or(def("Identifier"), null))
- .field("body", def("ClassBody"))
- .field("superClass", or(def("Expression"), null), defaults["null"]);
-
-def("ClassExpression")
- .bases("Expression")
- .build("id", "body", "superClass")
- .field("id", or(def("Identifier"), null), defaults["null"])
- .field("body", def("ClassBody"))
- .field("superClass", or(def("Expression"), null), defaults["null"])
- .field("implements", [def("ClassImplements")], defaults.emptyArray);
-
-def("ClassImplements")
- .bases("Node")
- .build("id")
- .field("id", def("Identifier"))
- .field("superClass", or(def("Expression"), null), defaults["null"]);
-
-// Specifier and ModuleSpecifier are abstract non-standard types
-// introduced for definitional convenience.
-def("Specifier").bases("Node");
-
-// This supertype is shared/abused by both def/babel.js and
-// def/esprima.js. In the future, it will be possible to load only one set
-// of definitions appropriate for a given parser, but until then we must
-// rely on default functions to reconcile the conflicting AST formats.
-def("ModuleSpecifier")
- .bases("Specifier")
- // This local field is used by Babel/Acorn. It should not technically
- // be optional in the Babel/Acorn AST format, but it must be optional
- // in the Esprima AST format.
- .field("local", or(def("Identifier"), null), defaults["null"])
- // The id and name fields are used by Esprima. The id field should not
- // technically be optional in the Esprima AST format, but it must be
- // optional in the Babel/Acorn AST format.
- .field("id", or(def("Identifier"), null), defaults["null"])
- .field("name", or(def("Identifier"), null), defaults["null"]);
-
-def("TaggedTemplateExpression")
- .bases("Expression")
- .build("tag", "quasi")
- .field("tag", def("Expression"))
- .field("quasi", def("TemplateLiteral"));
-
-def("TemplateLiteral")
- .bases("Expression")
- .build("quasis", "expressions")
- .field("quasis", [def("TemplateElement")])
- .field("expressions", [def("Expression")]);
-
-def("TemplateElement")
- .bases("Node")
- .build("value", "tail")
- .field("value", {"cooked": String, "raw": String})
- .field("tail", Boolean);
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/es7.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/es7.js
deleted file mode 100644
index e9c50bd542..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/es7.js
+++ /dev/null
@@ -1,36 +0,0 @@
-require("./es6");
-
-var types = require("../lib/types");
-var def = types.Type.def;
-var or = types.Type.or;
-var builtin = types.builtInTypes;
-var defaults = require("../lib/shared").defaults;
-
-def("Function")
- .field("async", Boolean, defaults["false"]);
-
-def("SpreadProperty")
- .bases("Node")
- .build("argument")
- .field("argument", def("Expression"));
-
-def("ObjectExpression")
- .field("properties", [or(def("Property"), def("SpreadProperty"))]);
-
-def("SpreadPropertyPattern")
- .bases("Pattern")
- .build("argument")
- .field("argument", def("Pattern"));
-
-def("ObjectPattern")
- .field("properties", [or(
- def("Property"),
- def("PropertyPattern"),
- def("SpreadPropertyPattern")
- )]);
-
-def("AwaitExpression")
- .bases("Expression")
- .build("argument", "all")
- .field("argument", or(def("Expression"), null))
- .field("all", Boolean, defaults["false"]);
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/esprima.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/esprima.js
deleted file mode 100644
index a27e38f742..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/esprima.js
+++ /dev/null
@@ -1,96 +0,0 @@
-require("./es7");
-
-var types = require("../lib/types");
-var defaults = require("../lib/shared").defaults;
-var def = types.Type.def;
-var or = types.Type.or;
-
-def("VariableDeclaration")
- .field("declarations", [or(
- def("VariableDeclarator"),
- def("Identifier") // Esprima deviation.
- )]);
-
-def("Property")
- .field("value", or(
- def("Expression"),
- def("Pattern") // Esprima deviation.
- ));
-
-def("ArrayPattern")
- .field("elements", [or(
- def("Pattern"),
- def("SpreadElement"),
- null
- )]);
-
-def("ObjectPattern")
- .field("properties", [or(
- def("Property"),
- def("PropertyPattern"),
- def("SpreadPropertyPattern"),
- def("SpreadProperty") // Used by Esprima.
- )]);
-
-// Like ModuleSpecifier, except type:"ExportSpecifier" and buildable.
-// export {<id [as name]>} [from ...];
-def("ExportSpecifier")
- .bases("ModuleSpecifier")
- .build("id", "name");
-
-// export <*> from ...;
-def("ExportBatchSpecifier")
- .bases("Specifier")
- .build();
-
-// Like ModuleSpecifier, except type:"ImportSpecifier" and buildable.
-// import {<id [as name]>} from ...;
-def("ImportSpecifier")
- .bases("ModuleSpecifier")
- .build("id", "name");
-
-// import <* as id> from ...;
-def("ImportNamespaceSpecifier")
- .bases("ModuleSpecifier")
- .build("id");
-
-// import <id> from ...;
-def("ImportDefaultSpecifier")
- .bases("ModuleSpecifier")
- .build("id");
-
-def("ExportDeclaration")
- .bases("Declaration")
- .build("default", "declaration", "specifiers", "source")
- .field("default", Boolean)
- .field("declaration", or(
- def("Declaration"),
- def("Expression"), // Implies default.
- null
- ))
- .field("specifiers", [or(
- def("ExportSpecifier"),
- def("ExportBatchSpecifier")
- )], defaults.emptyArray)
- .field("source", or(
- def("Literal"),
- null
- ), defaults["null"]);
-
-def("ImportDeclaration")
- .bases("Declaration")
- .build("specifiers", "source")
- .field("specifiers", [or(
- def("ImportSpecifier"),
- def("ImportNamespaceSpecifier"),
- def("ImportDefaultSpecifier")
- )], defaults.emptyArray)
- .field("source", def("Literal"));
-
-def("Block")
- .bases("Comment")
- .build("value", /*optional:*/ "leading", "trailing");
-
-def("Line")
- .bases("Comment")
- .build("value", /*optional:*/ "leading", "trailing");
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/flow.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/flow.js
deleted file mode 100644
index b7774a6f00..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/flow.js
+++ /dev/null
@@ -1,269 +0,0 @@
-require("./es7");
-
-var types = require("../lib/types");
-var def = types.Type.def;
-var or = types.Type.or;
-var defaults = require("../lib/shared").defaults;
-
-// Type Annotations
-def("Type").bases("Node");
-
-def("AnyTypeAnnotation")
- .bases("Type")
- .build();
-
-def("MixedTypeAnnotation")
- .bases("Type")
- .build();
-
-def("VoidTypeAnnotation")
- .bases("Type")
- .build();
-
-def("NumberTypeAnnotation")
- .bases("Type")
- .build();
-
-def("NumberLiteralTypeAnnotation")
- .bases("Type")
- .build("value", "raw")
- .field("value", Number)
- .field("raw", String);
-
-def("StringTypeAnnotation")
- .bases("Type")
- .build();
-
-def("StringLiteralTypeAnnotation")
- .bases("Type")
- .build("value", "raw")
- .field("value", String)
- .field("raw", String);
-
-def("BooleanTypeAnnotation")
- .bases("Type")
- .build();
-
-def("BooleanLiteralTypeAnnotation")
- .bases("Type")
- .build("value", "raw")
- .field("value", Boolean)
- .field("raw", String);
-
-def("TypeAnnotation")
- .bases("Node")
- .build("typeAnnotation")
- .field("typeAnnotation", def("Type"));
-
-def("NullableTypeAnnotation")
- .bases("Type")
- .build("typeAnnotation")
- .field("typeAnnotation", def("Type"));
-
-def("NullLiteralTypeAnnotation")
- .bases("Type")
- .build();
-
-def("ThisTypeAnnotation")
- .bases("Type")
- .build();
-
-def("FunctionTypeAnnotation")
- .bases("Type")
- .build("params", "returnType", "rest", "typeParameters")
- .field("params", [def("FunctionTypeParam")])
- .field("returnType", def("Type"))
- .field("rest", or(def("FunctionTypeParam"), null))
- .field("typeParameters", or(def("TypeParameterDeclaration"), null));
-
-def("FunctionTypeParam")
- .bases("Node")
- .build("name", "typeAnnotation", "optional")
- .field("name", def("Identifier"))
- .field("typeAnnotation", def("Type"))
- .field("optional", Boolean);
-
-def("ArrayTypeAnnotation")
- .bases("Type")
- .build("elementType")
- .field("elementType", def("Type"));
-
-def("ObjectTypeAnnotation")
- .bases("Type")
- .build("properties")
- .field("properties", [def("ObjectTypeProperty")])
- .field("indexers", [def("ObjectTypeIndexer")], defaults.emptyArray)
- .field("callProperties",
- [def("ObjectTypeCallProperty")],
- defaults.emptyArray);
-
-def("ObjectTypeProperty")
- .bases("Node")
- .build("key", "value", "optional")
- .field("key", or(def("Literal"), def("Identifier")))
- .field("value", def("Type"))
- .field("optional", Boolean);
-
-def("ObjectTypeIndexer")
- .bases("Node")
- .build("id", "key", "value")
- .field("id", def("Identifier"))
- .field("key", def("Type"))
- .field("value", def("Type"));
-
-def("ObjectTypeCallProperty")
- .bases("Node")
- .build("value")
- .field("value", def("FunctionTypeAnnotation"))
- .field("static", Boolean, defaults["false"]);
-
-def("QualifiedTypeIdentifier")
- .bases("Node")
- .build("qualification", "id")
- .field("qualification",
- or(def("Identifier"),
- def("QualifiedTypeIdentifier")))
- .field("id", def("Identifier"));
-
-def("GenericTypeAnnotation")
- .bases("Type")
- .build("id", "typeParameters")
- .field("id", or(def("Identifier"), def("QualifiedTypeIdentifier")))
- .field("typeParameters", or(def("TypeParameterInstantiation"), null));
-
-def("MemberTypeAnnotation")
- .bases("Type")
- .build("object", "property")
- .field("object", def("Identifier"))
- .field("property",
- or(def("MemberTypeAnnotation"),
- def("GenericTypeAnnotation")));
-
-def("UnionTypeAnnotation")
- .bases("Type")
- .build("types")
- .field("types", [def("Type")]);
-
-def("IntersectionTypeAnnotation")
- .bases("Type")
- .build("types")
- .field("types", [def("Type")]);
-
-def("TypeofTypeAnnotation")
- .bases("Type")
- .build("argument")
- .field("argument", def("Type"));
-
-def("Identifier")
- .field("typeAnnotation", or(def("TypeAnnotation"), null), defaults["null"]);
-
-def("TypeParameterDeclaration")
- .bases("Node")
- .build("params")
- .field("params", [def("Identifier")]);
-
-def("TypeParameterInstantiation")
- .bases("Node")
- .build("params")
- .field("params", [def("Type")]);
-
-def("Function")
- .field("returnType",
- or(def("TypeAnnotation"), null),
- defaults["null"])
- .field("typeParameters",
- or(def("TypeParameterDeclaration"), null),
- defaults["null"]);
-
-def("ClassProperty")
- .build("key", "value", "typeAnnotation", "static")
- .field("value", or(def("Expression"), null))
- .field("typeAnnotation", or(def("TypeAnnotation"), null))
- .field("static", Boolean, defaults["false"]);
-
-def("ClassImplements")
- .field("typeParameters",
- or(def("TypeParameterInstantiation"), null),
- defaults["null"]);
-
-def("InterfaceDeclaration")
- .bases("Declaration")
- .build("id", "body", "extends")
- .field("id", def("Identifier"))
- .field("typeParameters",
- or(def("TypeParameterDeclaration"), null),
- defaults["null"])
- .field("body", def("ObjectTypeAnnotation"))
- .field("extends", [def("InterfaceExtends")]);
-
-def("DeclareInterface")
- .bases("InterfaceDeclaration")
- .build("id", "body", "extends");
-
-def("InterfaceExtends")
- .bases("Node")
- .build("id")
- .field("id", def("Identifier"))
- .field("typeParameters", or(def("TypeParameterInstantiation"), null));
-
-def("TypeAlias")
- .bases("Declaration")
- .build("id", "typeParameters", "right")
- .field("id", def("Identifier"))
- .field("typeParameters", or(def("TypeParameterDeclaration"), null))
- .field("right", def("Type"));
-
-def("DeclareTypeAlias")
- .bases("TypeAlias")
- .build("id", "typeParameters", "right");
-
-def("TypeCastExpression")
- .bases("Expression")
- .build("expression", "typeAnnotation")
- .field("expression", def("Expression"))
- .field("typeAnnotation", def("TypeAnnotation"));
-
-def("TupleTypeAnnotation")
- .bases("Type")
- .build("types")
- .field("types", [def("Type")]);
-
-def("DeclareVariable")
- .bases("Statement")
- .build("id")
- .field("id", def("Identifier"));
-
-def("DeclareFunction")
- .bases("Statement")
- .build("id")
- .field("id", def("Identifier"));
-
-def("DeclareClass")
- .bases("InterfaceDeclaration")
- .build("id");
-
-def("DeclareModule")
- .bases("Statement")
- .build("id", "body")
- .field("id", or(def("Identifier"), def("Literal")))
- .field("body", def("BlockStatement"));
-
-def("DeclareExportDeclaration")
- .bases("Declaration")
- .build("default", "declaration", "specifiers", "source")
- .field("default", Boolean)
- .field("declaration", or(
- def("DeclareVariable"),
- def("DeclareFunction"),
- def("DeclareClass"),
- def("Type"), // Implies default.
- null
- ))
- .field("specifiers", [or(
- def("ExportSpecifier"),
- def("ExportBatchSpecifier")
- )], defaults.emptyArray)
- .field("source", or(
- def("Literal"),
- null
- ), defaults["null"]);
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/jsx.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/jsx.js
deleted file mode 100644
index 18fa4ea598..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/jsx.js
+++ /dev/null
@@ -1,100 +0,0 @@
-require("./es7");
-
-var types = require("../lib/types");
-var def = types.Type.def;
-var or = types.Type.or;
-var defaults = require("../lib/shared").defaults;
-
-def("JSXAttribute")
- .bases("Node")
- .build("name", "value")
- .field("name", or(def("JSXIdentifier"), def("JSXNamespacedName")))
- .field("value", or(
- def("Literal"), // attr="value"
- def("JSXExpressionContainer"), // attr={value}
- null // attr= or just attr
- ), defaults["null"]);
-
-def("JSXIdentifier")
- .bases("Identifier")
- .build("name")
- .field("name", String);
-
-def("JSXNamespacedName")
- .bases("Node")
- .build("namespace", "name")
- .field("namespace", def("JSXIdentifier"))
- .field("name", def("JSXIdentifier"));
-
-def("JSXMemberExpression")
- .bases("MemberExpression")
- .build("object", "property")
- .field("object", or(def("JSXIdentifier"), def("JSXMemberExpression")))
- .field("property", def("JSXIdentifier"))
- .field("computed", Boolean, defaults.false);
-
-var JSXElementName = or(
- def("JSXIdentifier"),
- def("JSXNamespacedName"),
- def("JSXMemberExpression")
-);
-
-def("JSXSpreadAttribute")
- .bases("Node")
- .build("argument")
- .field("argument", def("Expression"));
-
-var JSXAttributes = [or(
- def("JSXAttribute"),
- def("JSXSpreadAttribute")
-)];
-
-def("JSXExpressionContainer")
- .bases("Expression")
- .build("expression")
- .field("expression", def("Expression"));
-
-def("JSXElement")
- .bases("Expression")
- .build("openingElement", "closingElement", "children")
- .field("openingElement", def("JSXOpeningElement"))
- .field("closingElement", or(def("JSXClosingElement"), null), defaults["null"])
- .field("children", [or(
- def("JSXElement"),
- def("JSXExpressionContainer"),
- def("JSXText"),
- def("Literal") // TODO Esprima should return JSXText instead.
- )], defaults.emptyArray)
- .field("name", JSXElementName, function() {
- // Little-known fact: the `this` object inside a default function
- // is none other than the partially-built object itself, and any
- // fields initialized directly from builder function arguments
- // (like openingElement, closingElement, and children) are
- // guaranteed to be available.
- return this.openingElement.name;
- }, true) // hidden from traversal
- .field("selfClosing", Boolean, function() {
- return this.openingElement.selfClosing;
- }, true) // hidden from traversal
- .field("attributes", JSXAttributes, function() {
- return this.openingElement.attributes;
- }, true); // hidden from traversal
-
-def("JSXOpeningElement")
- .bases("Node") // TODO Does this make sense? Can't really be an JSXElement.
- .build("name", "attributes", "selfClosing")
- .field("name", JSXElementName)
- .field("attributes", JSXAttributes, defaults.emptyArray)
- .field("selfClosing", Boolean, defaults["false"]);
-
-def("JSXClosingElement")
- .bases("Node") // TODO Same concern.
- .build("name")
- .field("name", JSXElementName);
-
-def("JSXText")
- .bases("Literal")
- .build("value")
- .field("value", String);
-
-def("JSXEmptyExpression").bases("Expression").build();
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/mozilla.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/mozilla.js
deleted file mode 100644
index 2861ae9cc0..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/def/mozilla.js
+++ /dev/null
@@ -1,49 +0,0 @@
-require("./core");
-var types = require("../lib/types");
-var def = types.Type.def;
-var or = types.Type.or;
-var shared = require("../lib/shared");
-var geq = shared.geq;
-var defaults = shared.defaults;
-
-def("Function")
- // SpiderMonkey allows expression closures: function(x) x+1
- .field("body", or(def("BlockStatement"), def("Expression")));
-
-def("ForInStatement")
- .build("left", "right", "body", "each")
- .field("each", Boolean, defaults["false"]);
-
-def("ForOfStatement")
- .bases("Statement")
- .build("left", "right", "body")
- .field("left", or(
- def("VariableDeclaration"),
- def("Expression")))
- .field("right", def("Expression"))
- .field("body", def("Statement"));
-
-def("LetStatement")
- .bases("Statement")
- .build("head", "body")
- // TODO Deviating from the spec by reusing VariableDeclarator here.
- .field("head", [def("VariableDeclarator")])
- .field("body", def("Statement"));
-
-def("LetExpression")
- .bases("Expression")
- .build("head", "body")
- // TODO Deviating from the spec by reusing VariableDeclarator here.
- .field("head", [def("VariableDeclarator")])
- .field("body", def("Expression"));
-
-def("GraphExpression")
- .bases("Expression")
- .build("index", "expression")
- .field("index", geq(0))
- .field("expression", def("Literal"));
-
-def("GraphIndexExpression")
- .bases("Expression")
- .build("index")
- .field("index", geq(0));
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/equiv.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/equiv.js
deleted file mode 100644
index 616757752b..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/equiv.js
+++ /dev/null
@@ -1,184 +0,0 @@
-var types = require("../main");
-var getFieldNames = types.getFieldNames;
-var getFieldValue = types.getFieldValue;
-var isArray = types.builtInTypes.array;
-var isObject = types.builtInTypes.object;
-var isDate = types.builtInTypes.Date;
-var isRegExp = types.builtInTypes.RegExp;
-var hasOwn = Object.prototype.hasOwnProperty;
-
-function astNodesAreEquivalent(a, b, problemPath) {
- if (isArray.check(problemPath)) {
- problemPath.length = 0;
- } else {
- problemPath = null;
- }
-
- return areEquivalent(a, b, problemPath);
-}
-
-astNodesAreEquivalent.assert = function(a, b) {
- var problemPath = [];
- if (!astNodesAreEquivalent(a, b, problemPath)) {
- if (problemPath.length === 0) {
- if (a !== b) {
- throw new Error("Nodes must be equal");
- }
- } else {
- throw new Error(
- "Nodes differ in the following path: " +
- problemPath.map(subscriptForProperty).join("")
- );
- }
- }
-};
-
-function subscriptForProperty(property) {
- if (/[_$a-z][_$a-z0-9]*/i.test(property)) {
- return "." + property;
- }
- return "[" + JSON.stringify(property) + "]";
-}
-
-function areEquivalent(a, b, problemPath) {
- if (a === b) {
- return true;
- }
-
- if (isArray.check(a)) {
- return arraysAreEquivalent(a, b, problemPath);
- }
-
- if (isObject.check(a)) {
- return objectsAreEquivalent(a, b, problemPath);
- }
-
- if (isDate.check(a)) {
- return isDate.check(b) && (+a === +b);
- }
-
- if (isRegExp.check(a)) {
- return isRegExp.check(b) && (
- a.source === b.source &&
- a.global === b.global &&
- a.multiline === b.multiline &&
- a.ignoreCase === b.ignoreCase
- );
- }
-
- return a == b;
-}
-
-function arraysAreEquivalent(a, b, problemPath) {
- isArray.assert(a);
- var aLength = a.length;
-
- if (!isArray.check(b) || b.length !== aLength) {
- if (problemPath) {
- problemPath.push("length");
- }
- return false;
- }
-
- for (var i = 0; i < aLength; ++i) {
- if (problemPath) {
- problemPath.push(i);
- }
-
- if (i in a !== i in b) {
- return false;
- }
-
- if (!areEquivalent(a[i], b[i], problemPath)) {
- return false;
- }
-
- if (problemPath) {
- var problemPathTail = problemPath.pop();
- if (problemPathTail !== i) {
- throw new Error("" + problemPathTail);
- }
- }
- }
-
- return true;
-}
-
-function objectsAreEquivalent(a, b, problemPath) {
- isObject.assert(a);
- if (!isObject.check(b)) {
- return false;
- }
-
- // Fast path for a common property of AST nodes.
- if (a.type !== b.type) {
- if (problemPath) {
- problemPath.push("type");
- }
- return false;
- }
-
- var aNames = getFieldNames(a);
- var aNameCount = aNames.length;
-
- var bNames = getFieldNames(b);
- var bNameCount = bNames.length;
-
- if (aNameCount === bNameCount) {
- for (var i = 0; i < aNameCount; ++i) {
- var name = aNames[i];
- var aChild = getFieldValue(a, name);
- var bChild = getFieldValue(b, name);
-
- if (problemPath) {
- problemPath.push(name);
- }
-
- if (!areEquivalent(aChild, bChild, problemPath)) {
- return false;
- }
-
- if (problemPath) {
- var problemPathTail = problemPath.pop();
- if (problemPathTail !== name) {
- throw new Error("" + problemPathTail);
- }
- }
- }
-
- return true;
- }
-
- if (!problemPath) {
- return false;
- }
-
- // Since aNameCount !== bNameCount, we need to find some name that's
- // missing in aNames but present in bNames, or vice-versa.
-
- var seenNames = Object.create(null);
-
- for (i = 0; i < aNameCount; ++i) {
- seenNames[aNames[i]] = true;
- }
-
- for (i = 0; i < bNameCount; ++i) {
- name = bNames[i];
-
- if (!hasOwn.call(seenNames, name)) {
- problemPath.push(name);
- return false;
- }
-
- delete seenNames[name];
- }
-
- for (name in seenNames) {
- problemPath.push(name);
- break;
- }
-
- return false;
-}
-
-module.exports = astNodesAreEquivalent;
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/node-path.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/node-path.js
deleted file mode 100644
index fbb79eaa12..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/node-path.js
+++ /dev/null
@@ -1,474 +0,0 @@
-var types = require("./types");
-var n = types.namedTypes;
-var b = types.builders;
-var isNumber = types.builtInTypes.number;
-var isArray = types.builtInTypes.array;
-var Path = require("./path");
-var Scope = require("./scope");
-
-function NodePath(value, parentPath, name) {
- if (!(this instanceof NodePath)) {
- throw new Error("NodePath constructor cannot be invoked without 'new'");
- }
- Path.call(this, value, parentPath, name);
-}
-
-var NPp = NodePath.prototype = Object.create(Path.prototype, {
- constructor: {
- value: NodePath,
- enumerable: false,
- writable: true,
- configurable: true
- }
-});
-
-Object.defineProperties(NPp, {
- node: {
- get: function() {
- Object.defineProperty(this, "node", {
- configurable: true, // Enable deletion.
- value: this._computeNode()
- });
-
- return this.node;
- }
- },
-
- parent: {
- get: function() {
- Object.defineProperty(this, "parent", {
- configurable: true, // Enable deletion.
- value: this._computeParent()
- });
-
- return this.parent;
- }
- },
-
- scope: {
- get: function() {
- Object.defineProperty(this, "scope", {
- configurable: true, // Enable deletion.
- value: this._computeScope()
- });
-
- return this.scope;
- }
- }
-});
-
-NPp.replace = function() {
- delete this.node;
- delete this.parent;
- delete this.scope;
- return Path.prototype.replace.apply(this, arguments);
-};
-
-NPp.prune = function() {
- var remainingNodePath = this.parent;
-
- this.replace();
-
- return cleanUpNodesAfterPrune(remainingNodePath);
-};
-
-// The value of the first ancestor Path whose value is a Node.
-NPp._computeNode = function() {
- var value = this.value;
- if (n.Node.check(value)) {
- return value;
- }
-
- var pp = this.parentPath;
- return pp && pp.node || null;
-};
-
-// The first ancestor Path whose value is a Node distinct from this.node.
-NPp._computeParent = function() {
- var value = this.value;
- var pp = this.parentPath;
-
- if (!n.Node.check(value)) {
- while (pp && !n.Node.check(pp.value)) {
- pp = pp.parentPath;
- }
-
- if (pp) {
- pp = pp.parentPath;
- }
- }
-
- while (pp && !n.Node.check(pp.value)) {
- pp = pp.parentPath;
- }
-
- return pp || null;
-};
-
-// The closest enclosing scope that governs this node.
-NPp._computeScope = function() {
- var value = this.value;
- var pp = this.parentPath;
- var scope = pp && pp.scope;
-
- if (n.Node.check(value) &&
- Scope.isEstablishedBy(value)) {
- scope = new Scope(this, scope);
- }
-
- return scope || null;
-};
-
-NPp.getValueProperty = function(name) {
- return types.getFieldValue(this.value, name);
-};
-
-/**
- * Determine whether this.node needs to be wrapped in parentheses in order
- * for a parser to reproduce the same local AST structure.
- *
- * For instance, in the expression `(1 + 2) * 3`, the BinaryExpression
- * whose operator is "+" needs parentheses, because `1 + 2 * 3` would
- * parse differently.
- *
- * If assumeExpressionContext === true, we don't worry about edge cases
- * like an anonymous FunctionExpression appearing lexically first in its
- * enclosing statement and thus needing parentheses to avoid being parsed
- * as a FunctionDeclaration with a missing name.
- */
-NPp.needsParens = function(assumeExpressionContext) {
- var pp = this.parentPath;
- if (!pp) {
- return false;
- }
-
- var node = this.value;
-
- // Only expressions need parentheses.
- if (!n.Expression.check(node)) {
- return false;
- }
-
- // Identifiers never need parentheses.
- if (node.type === "Identifier") {
- return false;
- }
-
- while (!n.Node.check(pp.value)) {
- pp = pp.parentPath;
- if (!pp) {
- return false;
- }
- }
-
- var parent = pp.value;
-
- switch (node.type) {
- case "UnaryExpression":
- case "SpreadElement":
- case "SpreadProperty":
- return parent.type === "MemberExpression"
- && this.name === "object"
- && parent.object === node;
-
- case "BinaryExpression":
- case "LogicalExpression":
- switch (parent.type) {
- case "CallExpression":
- return this.name === "callee"
- && parent.callee === node;
-
- case "UnaryExpression":
- case "SpreadElement":
- case "SpreadProperty":
- return true;
-
- case "MemberExpression":
- return this.name === "object"
- && parent.object === node;
-
- case "BinaryExpression":
- case "LogicalExpression":
- var po = parent.operator;
- var pp = PRECEDENCE[po];
- var no = node.operator;
- var np = PRECEDENCE[no];
-
- if (pp > np) {
- return true;
- }
-
- if (pp === np && this.name === "right") {
- if (parent.right !== node) {
- throw new Error("Nodes must be equal");
- }
- return true;
- }
-
- default:
- return false;
- }
-
- case "SequenceExpression":
- switch (parent.type) {
- case "ForStatement":
- // Although parentheses wouldn't hurt around sequence
- // expressions in the head of for loops, traditional style
- // dictates that e.g. i++, j++ should not be wrapped with
- // parentheses.
- return false;
-
- case "ExpressionStatement":
- return this.name !== "expression";
-
- default:
- // Otherwise err on the side of overparenthesization, adding
- // explicit exceptions above if this proves overzealous.
- return true;
- }
-
- case "YieldExpression":
- switch (parent.type) {
- case "BinaryExpression":
- case "LogicalExpression":
- case "UnaryExpression":
- case "SpreadElement":
- case "SpreadProperty":
- case "CallExpression":
- case "MemberExpression":
- case "NewExpression":
- case "ConditionalExpression":
- case "YieldExpression":
- return true;
-
- default:
- return false;
- }
-
- case "Literal":
- return parent.type === "MemberExpression"
- && isNumber.check(node.value)
- && this.name === "object"
- && parent.object === node;
-
- case "AssignmentExpression":
- case "ConditionalExpression":
- switch (parent.type) {
- case "UnaryExpression":
- case "SpreadElement":
- case "SpreadProperty":
- case "BinaryExpression":
- case "LogicalExpression":
- return true;
-
- case "CallExpression":
- return this.name === "callee"
- && parent.callee === node;
-
- case "ConditionalExpression":
- return this.name === "test"
- && parent.test === node;
-
- case "MemberExpression":
- return this.name === "object"
- && parent.object === node;
-
- default:
- return false;
- }
-
- default:
- if (parent.type === "NewExpression" &&
- this.name === "callee" &&
- parent.callee === node) {
- return containsCallExpression(node);
- }
- }
-
- if (assumeExpressionContext !== true &&
- !this.canBeFirstInStatement() &&
- this.firstInStatement())
- return true;
-
- return false;
-};
-
-function isBinary(node) {
- return n.BinaryExpression.check(node)
- || n.LogicalExpression.check(node);
-}
-
-function isUnaryLike(node) {
- return n.UnaryExpression.check(node)
- // I considered making SpreadElement and SpreadProperty subtypes
- // of UnaryExpression, but they're not really Expression nodes.
- || (n.SpreadElement && n.SpreadElement.check(node))
- || (n.SpreadProperty && n.SpreadProperty.check(node));
-}
-
-var PRECEDENCE = {};
-[["||"],
- ["&&"],
- ["|"],
- ["^"],
- ["&"],
- ["==", "===", "!=", "!=="],
- ["<", ">", "<=", ">=", "in", "instanceof"],
- [">>", "<<", ">>>"],
- ["+", "-"],
- ["*", "/", "%"]
-].forEach(function(tier, i) {
- tier.forEach(function(op) {
- PRECEDENCE[op] = i;
- });
-});
-
-function containsCallExpression(node) {
- if (n.CallExpression.check(node)) {
- return true;
- }
-
- if (isArray.check(node)) {
- return node.some(containsCallExpression);
- }
-
- if (n.Node.check(node)) {
- return types.someField(node, function(name, child) {
- return containsCallExpression(child);
- });
- }
-
- return false;
-}
-
-NPp.canBeFirstInStatement = function() {
- var node = this.node;
- return !n.FunctionExpression.check(node)
- && !n.ObjectExpression.check(node);
-};
-
-NPp.firstInStatement = function() {
- return firstInStatement(this);
-};
-
-function firstInStatement(path) {
- for (var node, parent; path.parent; path = path.parent) {
- node = path.node;
- parent = path.parent.node;
-
- if (n.BlockStatement.check(parent) &&
- path.parent.name === "body" &&
- path.name === 0) {
- if (parent.body[0] !== node) {
- throw new Error("Nodes must be equal");
- }
- return true;
- }
-
- if (n.ExpressionStatement.check(parent) &&
- path.name === "expression") {
- if (parent.expression !== node) {
- throw new Error("Nodes must be equal");
- }
- return true;
- }
-
- if (n.SequenceExpression.check(parent) &&
- path.parent.name === "expressions" &&
- path.name === 0) {
- if (parent.expressions[0] !== node) {
- throw new Error("Nodes must be equal");
- }
- continue;
- }
-
- if (n.CallExpression.check(parent) &&
- path.name === "callee") {
- if (parent.callee !== node) {
- throw new Error("Nodes must be equal");
- }
- continue;
- }
-
- if (n.MemberExpression.check(parent) &&
- path.name === "object") {
- if (parent.object !== node) {
- throw new Error("Nodes must be equal");
- }
- continue;
- }
-
- if (n.ConditionalExpression.check(parent) &&
- path.name === "test") {
- if (parent.test !== node) {
- throw new Error("Nodes must be equal");
- }
- continue;
- }
-
- if (isBinary(parent) &&
- path.name === "left") {
- if (parent.left !== node) {
- throw new Error("Nodes must be equal");
- }
- continue;
- }
-
- if (n.UnaryExpression.check(parent) &&
- !parent.prefix &&
- path.name === "argument") {
- if (parent.argument !== node) {
- throw new Error("Nodes must be equal");
- }
- continue;
- }
-
- return false;
- }
-
- return true;
-}
-
-/**
- * Pruning certain nodes will result in empty or incomplete nodes, here we clean those nodes up.
- */
-function cleanUpNodesAfterPrune(remainingNodePath) {
- if (n.VariableDeclaration.check(remainingNodePath.node)) {
- var declarations = remainingNodePath.get('declarations').value;
- if (!declarations || declarations.length === 0) {
- return remainingNodePath.prune();
- }
- } else if (n.ExpressionStatement.check(remainingNodePath.node)) {
- if (!remainingNodePath.get('expression').value) {
- return remainingNodePath.prune();
- }
- } else if (n.IfStatement.check(remainingNodePath.node)) {
- cleanUpIfStatementAfterPrune(remainingNodePath);
- }
-
- return remainingNodePath;
-}
-
-function cleanUpIfStatementAfterPrune(ifStatement) {
- var testExpression = ifStatement.get('test').value;
- var alternate = ifStatement.get('alternate').value;
- var consequent = ifStatement.get('consequent').value;
-
- if (!consequent && !alternate) {
- var testExpressionStatement = b.expressionStatement(testExpression);
-
- ifStatement.replace(testExpressionStatement);
- } else if (!consequent && alternate) {
- var negatedTestExpression = b.unaryExpression('!', testExpression, true);
-
- if (n.UnaryExpression.check(testExpression) && testExpression.operator === '!') {
- negatedTestExpression = testExpression.argument;
- }
-
- ifStatement.get("test").replace(negatedTestExpression);
- ifStatement.get("consequent").replace(alternate);
- ifStatement.get("alternate").replace();
- }
-}
-
-module.exports = NodePath;
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/path-visitor.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/path-visitor.js
deleted file mode 100644
index cfe1441d1b..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/path-visitor.js
+++ /dev/null
@@ -1,419 +0,0 @@
-var types = require("./types");
-var NodePath = require("./node-path");
-var Printable = types.namedTypes.Printable;
-var isArray = types.builtInTypes.array;
-var isObject = types.builtInTypes.object;
-var isFunction = types.builtInTypes.function;
-var hasOwn = Object.prototype.hasOwnProperty;
-var undefined;
-
-function PathVisitor() {
- if (!(this instanceof PathVisitor)) {
- throw new Error(
- "PathVisitor constructor cannot be invoked without 'new'"
- );
- }
-
- // Permanent state.
- this._reusableContextStack = [];
-
- this._methodNameTable = computeMethodNameTable(this);
- this._shouldVisitComments =
- hasOwn.call(this._methodNameTable, "Block") ||
- hasOwn.call(this._methodNameTable, "Line");
-
- this.Context = makeContextConstructor(this);
-
- // State reset every time PathVisitor.prototype.visit is called.
- this._visiting = false;
- this._changeReported = false;
-}
-
-function computeMethodNameTable(visitor) {
- var typeNames = Object.create(null);
-
- for (var methodName in visitor) {
- if (/^visit[A-Z]/.test(methodName)) {
- typeNames[methodName.slice("visit".length)] = true;
- }
- }
-
- var supertypeTable = types.computeSupertypeLookupTable(typeNames);
- var methodNameTable = Object.create(null);
-
- var typeNames = Object.keys(supertypeTable);
- var typeNameCount = typeNames.length;
- for (var i = 0; i < typeNameCount; ++i) {
- var typeName = typeNames[i];
- methodName = "visit" + supertypeTable[typeName];
- if (isFunction.check(visitor[methodName])) {
- methodNameTable[typeName] = methodName;
- }
- }
-
- return methodNameTable;
-}
-
-PathVisitor.fromMethodsObject = function fromMethodsObject(methods) {
- if (methods instanceof PathVisitor) {
- return methods;
- }
-
- if (!isObject.check(methods)) {
- // An empty visitor?
- return new PathVisitor;
- }
-
- function Visitor() {
- if (!(this instanceof Visitor)) {
- throw new Error(
- "Visitor constructor cannot be invoked without 'new'"
- );
- }
- PathVisitor.call(this);
- }
-
- var Vp = Visitor.prototype = Object.create(PVp);
- Vp.constructor = Visitor;
-
- extend(Vp, methods);
- extend(Visitor, PathVisitor);
-
- isFunction.assert(Visitor.fromMethodsObject);
- isFunction.assert(Visitor.visit);
-
- return new Visitor;
-};
-
-function extend(target, source) {
- for (var property in source) {
- if (hasOwn.call(source, property)) {
- target[property] = source[property];
- }
- }
-
- return target;
-}
-
-PathVisitor.visit = function visit(node, methods) {
- return PathVisitor.fromMethodsObject(methods).visit(node);
-};
-
-var PVp = PathVisitor.prototype;
-
-PVp.visit = function() {
- if (this._visiting) {
- throw new Error(
- "Recursively calling visitor.visit(path) resets visitor state. " +
- "Try this.visit(path) or this.traverse(path) instead."
- );
- }
-
- // Private state that needs to be reset before every traversal.
- this._visiting = true;
- this._changeReported = false;
- this._abortRequested = false;
-
- var argc = arguments.length;
- var args = new Array(argc)
- for (var i = 0; i < argc; ++i) {
- args[i] = arguments[i];
- }
-
- if (!(args[0] instanceof NodePath)) {
- args[0] = new NodePath({ root: args[0] }).get("root");
- }
-
- // Called with the same arguments as .visit.
- this.reset.apply(this, args);
-
- try {
- var root = this.visitWithoutReset(args[0]);
- var didNotThrow = true;
- } finally {
- this._visiting = false;
-
- if (!didNotThrow && this._abortRequested) {
- // If this.visitWithoutReset threw an exception and
- // this._abortRequested was set to true, return the root of
- // the AST instead of letting the exception propagate, so that
- // client code does not have to provide a try-catch block to
- // intercept the AbortRequest exception. Other kinds of
- // exceptions will propagate without being intercepted and
- // rethrown by a catch block, so their stacks will accurately
- // reflect the original throwing context.
- return args[0].value;
- }
- }
-
- return root;
-};
-
-PVp.AbortRequest = function AbortRequest() {};
-PVp.abort = function() {
- var visitor = this;
- visitor._abortRequested = true;
- var request = new visitor.AbortRequest();
-
- // If you decide to catch this exception and stop it from propagating,
- // make sure to call its cancel method to avoid silencing other
- // exceptions that might be thrown later in the traversal.
- request.cancel = function() {
- visitor._abortRequested = false;
- };
-
- throw request;
-};
-
-PVp.reset = function(path/*, additional arguments */) {
- // Empty stub; may be reassigned or overridden by subclasses.
-};
-
-PVp.visitWithoutReset = function(path) {
- if (this instanceof this.Context) {
- // Since this.Context.prototype === this, there's a chance we
- // might accidentally call context.visitWithoutReset. If that
- // happens, re-invoke the method against context.visitor.
- return this.visitor.visitWithoutReset(path);
- }
-
- if (!(path instanceof NodePath)) {
- throw new Error("");
- }
-
- var value = path.value;
-
- var methodName = value &&
- typeof value === "object" &&
- typeof value.type === "string" &&
- this._methodNameTable[value.type];
-
- if (methodName) {
- var context = this.acquireContext(path);
- try {
- return context.invokeVisitorMethod(methodName);
- } finally {
- this.releaseContext(context);
- }
-
- } else {
- // If there was no visitor method to call, visit the children of
- // this node generically.
- return visitChildren(path, this);
- }
-};
-
-function visitChildren(path, visitor) {
- if (!(path instanceof NodePath)) {
- throw new Error("");
- }
- if (!(visitor instanceof PathVisitor)) {
- throw new Error("");
- }
-
- var value = path.value;
-
- if (isArray.check(value)) {
- path.each(visitor.visitWithoutReset, visitor);
- } else if (!isObject.check(value)) {
- // No children to visit.
- } else {
- var childNames = types.getFieldNames(value);
-
- // The .comments field of the Node type is hidden, so we only
- // visit it if the visitor defines visitBlock or visitLine, and
- // value.comments is defined.
- if (visitor._shouldVisitComments &&
- value.comments &&
- childNames.indexOf("comments") < 0) {
- childNames.push("comments");
- }
-
- var childCount = childNames.length;
- var childPaths = [];
-
- for (var i = 0; i < childCount; ++i) {
- var childName = childNames[i];
- if (!hasOwn.call(value, childName)) {
- value[childName] = types.getFieldValue(value, childName);
- }
- childPaths.push(path.get(childName));
- }
-
- for (var i = 0; i < childCount; ++i) {
- visitor.visitWithoutReset(childPaths[i]);
- }
- }
-
- return path.value;
-}
-
-PVp.acquireContext = function(path) {
- if (this._reusableContextStack.length === 0) {
- return new this.Context(path);
- }
- return this._reusableContextStack.pop().reset(path);
-};
-
-PVp.releaseContext = function(context) {
- if (!(context instanceof this.Context)) {
- throw new Error("");
- }
- this._reusableContextStack.push(context);
- context.currentPath = null;
-};
-
-PVp.reportChanged = function() {
- this._changeReported = true;
-};
-
-PVp.wasChangeReported = function() {
- return this._changeReported;
-};
-
-function makeContextConstructor(visitor) {
- function Context(path) {
- if (!(this instanceof Context)) {
- throw new Error("");
- }
- if (!(this instanceof PathVisitor)) {
- throw new Error("");
- }
- if (!(path instanceof NodePath)) {
- throw new Error("");
- }
-
- Object.defineProperty(this, "visitor", {
- value: visitor,
- writable: false,
- enumerable: true,
- configurable: false
- });
-
- this.currentPath = path;
- this.needToCallTraverse = true;
-
- Object.seal(this);
- }
-
- if (!(visitor instanceof PathVisitor)) {
- throw new Error("");
- }
-
- // Note that the visitor object is the prototype of Context.prototype,
- // so all visitor methods are inherited by context objects.
- var Cp = Context.prototype = Object.create(visitor);
-
- Cp.constructor = Context;
- extend(Cp, sharedContextProtoMethods);
-
- return Context;
-}
-
-// Every PathVisitor has a different this.Context constructor and
-// this.Context.prototype object, but those prototypes can all use the
-// same reset, invokeVisitorMethod, and traverse function objects.
-var sharedContextProtoMethods = Object.create(null);
-
-sharedContextProtoMethods.reset =
-function reset(path) {
- if (!(this instanceof this.Context)) {
- throw new Error("");
- }
- if (!(path instanceof NodePath)) {
- throw new Error("");
- }
-
- this.currentPath = path;
- this.needToCallTraverse = true;
-
- return this;
-};
-
-sharedContextProtoMethods.invokeVisitorMethod =
-function invokeVisitorMethod(methodName) {
- if (!(this instanceof this.Context)) {
- throw new Error("");
- }
- if (!(this.currentPath instanceof NodePath)) {
- throw new Error("");
- }
-
- var result = this.visitor[methodName].call(this, this.currentPath);
-
- if (result === false) {
- // Visitor methods return false to indicate that they have handled
- // their own traversal needs, and we should not complain if
- // this.needToCallTraverse is still true.
- this.needToCallTraverse = false;
-
- } else if (result !== undefined) {
- // Any other non-undefined value returned from the visitor method
- // is interpreted as a replacement value.
- this.currentPath = this.currentPath.replace(result)[0];
-
- if (this.needToCallTraverse) {
- // If this.traverse still hasn't been called, visit the
- // children of the replacement node.
- this.traverse(this.currentPath);
- }
- }
-
- if (this.needToCallTraverse !== false) {
- throw new Error(
- "Must either call this.traverse or return false in " + methodName
- );
- }
-
- var path = this.currentPath;
- return path && path.value;
-};
-
-sharedContextProtoMethods.traverse =
-function traverse(path, newVisitor) {
- if (!(this instanceof this.Context)) {
- throw new Error("");
- }
- if (!(path instanceof NodePath)) {
- throw new Error("");
- }
- if (!(this.currentPath instanceof NodePath)) {
- throw new Error("");
- }
-
- this.needToCallTraverse = false;
-
- return visitChildren(path, PathVisitor.fromMethodsObject(
- newVisitor || this.visitor
- ));
-};
-
-sharedContextProtoMethods.visit =
-function visit(path, newVisitor) {
- if (!(this instanceof this.Context)) {
- throw new Error("");
- }
- if (!(path instanceof NodePath)) {
- throw new Error("");
- }
- if (!(this.currentPath instanceof NodePath)) {
- throw new Error("");
- }
-
- this.needToCallTraverse = false;
-
- return PathVisitor.fromMethodsObject(
- newVisitor || this.visitor
- ).visitWithoutReset(path);
-};
-
-sharedContextProtoMethods.reportChanged = function reportChanged() {
- this.visitor.reportChanged();
-};
-
-sharedContextProtoMethods.abort = function abort() {
- this.needToCallTraverse = false;
- this.visitor.abort();
-};
-
-module.exports = PathVisitor;
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/path.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/path.js
deleted file mode 100644
index 9601e88e88..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/path.js
+++ /dev/null
@@ -1,366 +0,0 @@
-var Op = Object.prototype;
-var hasOwn = Op.hasOwnProperty;
-var types = require("./types");
-var isArray = types.builtInTypes.array;
-var isNumber = types.builtInTypes.number;
-var Ap = Array.prototype;
-var slice = Ap.slice;
-var map = Ap.map;
-
-function Path(value, parentPath, name) {
- if (!(this instanceof Path)) {
- throw new Error("Path constructor cannot be invoked without 'new'");
- }
-
- if (parentPath) {
- if (!(parentPath instanceof Path)) {
- throw new Error("");
- }
- } else {
- parentPath = null;
- name = null;
- }
-
- // The value encapsulated by this Path, generally equal to
- // parentPath.value[name] if we have a parentPath.
- this.value = value;
-
- // The immediate parent Path of this Path.
- this.parentPath = parentPath;
-
- // The name of the property of parentPath.value through which this
- // Path's value was reached.
- this.name = name;
-
- // Calling path.get("child") multiple times always returns the same
- // child Path object, for both performance and consistency reasons.
- this.__childCache = null;
-}
-
-var Pp = Path.prototype;
-
-function getChildCache(path) {
- // Lazily create the child cache. This also cheapens cache
- // invalidation, since you can just reset path.__childCache to null.
- return path.__childCache || (path.__childCache = Object.create(null));
-}
-
-function getChildPath(path, name) {
- var cache = getChildCache(path);
- var actualChildValue = path.getValueProperty(name);
- var childPath = cache[name];
- if (!hasOwn.call(cache, name) ||
- // Ensure consistency between cache and reality.
- childPath.value !== actualChildValue) {
- childPath = cache[name] = new path.constructor(
- actualChildValue, path, name
- );
- }
- return childPath;
-}
-
-// This method is designed to be overridden by subclasses that need to
-// handle missing properties, etc.
-Pp.getValueProperty = function getValueProperty(name) {
- return this.value[name];
-};
-
-Pp.get = function get(name) {
- var path = this;
- var names = arguments;
- var count = names.length;
-
- for (var i = 0; i < count; ++i) {
- path = getChildPath(path, names[i]);
- }
-
- return path;
-};
-
-Pp.each = function each(callback, context) {
- var childPaths = [];
- var len = this.value.length;
- var i = 0;
-
- // Collect all the original child paths before invoking the callback.
- for (var i = 0; i < len; ++i) {
- if (hasOwn.call(this.value, i)) {
- childPaths[i] = this.get(i);
- }
- }
-
- // Invoke the callback on just the original child paths, regardless of
- // any modifications made to the array by the callback. I chose these
- // semantics over cleverly invoking the callback on new elements because
- // this way is much easier to reason about.
- context = context || this;
- for (i = 0; i < len; ++i) {
- if (hasOwn.call(childPaths, i)) {
- callback.call(context, childPaths[i]);
- }
- }
-};
-
-Pp.map = function map(callback, context) {
- var result = [];
-
- this.each(function(childPath) {
- result.push(callback.call(this, childPath));
- }, context);
-
- return result;
-};
-
-Pp.filter = function filter(callback, context) {
- var result = [];
-
- this.each(function(childPath) {
- if (callback.call(this, childPath)) {
- result.push(childPath);
- }
- }, context);
-
- return result;
-};
-
-function emptyMoves() {}
-function getMoves(path, offset, start, end) {
- isArray.assert(path.value);
-
- if (offset === 0) {
- return emptyMoves;
- }
-
- var length = path.value.length;
- if (length < 1) {
- return emptyMoves;
- }
-
- var argc = arguments.length;
- if (argc === 2) {
- start = 0;
- end = length;
- } else if (argc === 3) {
- start = Math.max(start, 0);
- end = length;
- } else {
- start = Math.max(start, 0);
- end = Math.min(end, length);
- }
-
- isNumber.assert(start);
- isNumber.assert(end);
-
- var moves = Object.create(null);
- var cache = getChildCache(path);
-
- for (var i = start; i < end; ++i) {
- if (hasOwn.call(path.value, i)) {
- var childPath = path.get(i);
- if (childPath.name !== i) {
- throw new Error("");
- }
- var newIndex = i + offset;
- childPath.name = newIndex;
- moves[newIndex] = childPath;
- delete cache[i];
- }
- }
-
- delete cache.length;
-
- return function() {
- for (var newIndex in moves) {
- var childPath = moves[newIndex];
- if (childPath.name !== +newIndex) {
- throw new Error("");
- }
- cache[newIndex] = childPath;
- path.value[newIndex] = childPath.value;
- }
- };
-}
-
-Pp.shift = function shift() {
- var move = getMoves(this, -1);
- var result = this.value.shift();
- move();
- return result;
-};
-
-Pp.unshift = function unshift(node) {
- var move = getMoves(this, arguments.length);
- var result = this.value.unshift.apply(this.value, arguments);
- move();
- return result;
-};
-
-Pp.push = function push(node) {
- isArray.assert(this.value);
- delete getChildCache(this).length
- return this.value.push.apply(this.value, arguments);
-};
-
-Pp.pop = function pop() {
- isArray.assert(this.value);
- var cache = getChildCache(this);
- delete cache[this.value.length - 1];
- delete cache.length;
- return this.value.pop();
-};
-
-Pp.insertAt = function insertAt(index, node) {
- var argc = arguments.length;
- var move = getMoves(this, argc - 1, index);
- if (move === emptyMoves) {
- return this;
- }
-
- index = Math.max(index, 0);
-
- for (var i = 1; i < argc; ++i) {
- this.value[index + i - 1] = arguments[i];
- }
-
- move();
-
- return this;
-};
-
-Pp.insertBefore = function insertBefore(node) {
- var pp = this.parentPath;
- var argc = arguments.length;
- var insertAtArgs = [this.name];
- for (var i = 0; i < argc; ++i) {
- insertAtArgs.push(arguments[i]);
- }
- return pp.insertAt.apply(pp, insertAtArgs);
-};
-
-Pp.insertAfter = function insertAfter(node) {
- var pp = this.parentPath;
- var argc = arguments.length;
- var insertAtArgs = [this.name + 1];
- for (var i = 0; i < argc; ++i) {
- insertAtArgs.push(arguments[i]);
- }
- return pp.insertAt.apply(pp, insertAtArgs);
-};
-
-function repairRelationshipWithParent(path) {
- if (!(path instanceof Path)) {
- throw new Error("");
- }
-
- var pp = path.parentPath;
- if (!pp) {
- // Orphan paths have no relationship to repair.
- return path;
- }
-
- var parentValue = pp.value;
- var parentCache = getChildCache(pp);
-
- // Make sure parentCache[path.name] is populated.
- if (parentValue[path.name] === path.value) {
- parentCache[path.name] = path;
- } else if (isArray.check(parentValue)) {
- // Something caused path.name to become out of date, so attempt to
- // recover by searching for path.value in parentValue.
- var i = parentValue.indexOf(path.value);
- if (i >= 0) {
- parentCache[path.name = i] = path;
- }
- } else {
- // If path.value disagrees with parentValue[path.name], and
- // path.name is not an array index, let path.value become the new
- // parentValue[path.name] and update parentCache accordingly.
- parentValue[path.name] = path.value;
- parentCache[path.name] = path;
- }
-
- if (parentValue[path.name] !== path.value) {
- throw new Error("");
- }
- if (path.parentPath.get(path.name) !== path) {
- throw new Error("");
- }
-
- return path;
-}
-
-Pp.replace = function replace(replacement) {
- var results = [];
- var parentValue = this.parentPath.value;
- var parentCache = getChildCache(this.parentPath);
- var count = arguments.length;
-
- repairRelationshipWithParent(this);
-
- if (isArray.check(parentValue)) {
- var originalLength = parentValue.length;
- var move = getMoves(this.parentPath, count - 1, this.name + 1);
-
- var spliceArgs = [this.name, 1];
- for (var i = 0; i < count; ++i) {
- spliceArgs.push(arguments[i]);
- }
-
- var splicedOut = parentValue.splice.apply(parentValue, spliceArgs);
-
- if (splicedOut[0] !== this.value) {
- throw new Error("");
- }
- if (parentValue.length !== (originalLength - 1 + count)) {
- throw new Error("");
- }
-
- move();
-
- if (count === 0) {
- delete this.value;
- delete parentCache[this.name];
- this.__childCache = null;
-
- } else {
- if (parentValue[this.name] !== replacement) {
- throw new Error("");
- }
-
- if (this.value !== replacement) {
- this.value = replacement;
- this.__childCache = null;
- }
-
- for (i = 0; i < count; ++i) {
- results.push(this.parentPath.get(this.name + i));
- }
-
- if (results[0] !== this) {
- throw new Error("");
- }
- }
-
- } else if (count === 1) {
- if (this.value !== replacement) {
- this.__childCache = null;
- }
- this.value = parentValue[this.name] = replacement;
- results.push(this);
-
- } else if (count === 0) {
- delete parentValue[this.name];
- delete this.value;
- this.__childCache = null;
-
- // Leave this path cached as parentCache[this.name], even though
- // it no longer has a value defined.
-
- } else {
- throw new Error("Could not replace path");
- }
-
- return results;
-};
-
-module.exports = Path;
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/scope.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/scope.js
deleted file mode 100644
index f4c7b9d1b7..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/scope.js
+++ /dev/null
@@ -1,330 +0,0 @@
-var types = require("./types");
-var Type = types.Type;
-var namedTypes = types.namedTypes;
-var Node = namedTypes.Node;
-var Expression = namedTypes.Expression;
-var isArray = types.builtInTypes.array;
-var hasOwn = Object.prototype.hasOwnProperty;
-var b = types.builders;
-
-function Scope(path, parentScope) {
- if (!(this instanceof Scope)) {
- throw new Error("Scope constructor cannot be invoked without 'new'");
- }
- if (!(path instanceof require("./node-path"))) {
- throw new Error("");
- }
- ScopeType.assert(path.value);
-
- var depth;
-
- if (parentScope) {
- if (!(parentScope instanceof Scope)) {
- throw new Error("");
- }
- depth = parentScope.depth + 1;
- } else {
- parentScope = null;
- depth = 0;
- }
-
- Object.defineProperties(this, {
- path: { value: path },
- node: { value: path.value },
- isGlobal: { value: !parentScope, enumerable: true },
- depth: { value: depth },
- parent: { value: parentScope },
- bindings: { value: {} },
- types: { value: {} },
- });
-}
-
-var scopeTypes = [
- // Program nodes introduce global scopes.
- namedTypes.Program,
-
- // Function is the supertype of FunctionExpression,
- // FunctionDeclaration, ArrowExpression, etc.
- namedTypes.Function,
-
- // In case you didn't know, the caught parameter shadows any variable
- // of the same name in an outer scope.
- namedTypes.CatchClause
-];
-
-var ScopeType = Type.or.apply(Type, scopeTypes);
-
-Scope.isEstablishedBy = function(node) {
- return ScopeType.check(node);
-};
-
-var Sp = Scope.prototype;
-
-// Will be overridden after an instance lazily calls scanScope.
-Sp.didScan = false;
-
-Sp.declares = function(name) {
- this.scan();
- return hasOwn.call(this.bindings, name);
-};
-
-Sp.declaresType = function(name) {
- this.scan();
- return hasOwn.call(this.types, name);
-};
-
-Sp.declareTemporary = function(prefix) {
- if (prefix) {
- if (!/^[a-z$_]/i.test(prefix)) {
- throw new Error("");
- }
- } else {
- prefix = "t$";
- }
-
- // Include this.depth in the name to make sure the name does not
- // collide with any variables in nested/enclosing scopes.
- prefix += this.depth.toString(36) + "$";
-
- this.scan();
-
- var index = 0;
- while (this.declares(prefix + index)) {
- ++index;
- }
-
- var name = prefix + index;
- return this.bindings[name] = types.builders.identifier(name);
-};
-
-Sp.injectTemporary = function(identifier, init) {
- identifier || (identifier = this.declareTemporary());
-
- var bodyPath = this.path.get("body");
- if (namedTypes.BlockStatement.check(bodyPath.value)) {
- bodyPath = bodyPath.get("body");
- }
-
- bodyPath.unshift(
- b.variableDeclaration(
- "var",
- [b.variableDeclarator(identifier, init || null)]
- )
- );
-
- return identifier;
-};
-
-Sp.scan = function(force) {
- if (force || !this.didScan) {
- for (var name in this.bindings) {
- // Empty out this.bindings, just in cases.
- delete this.bindings[name];
- }
- scanScope(this.path, this.bindings, this.types);
- this.didScan = true;
- }
-};
-
-Sp.getBindings = function () {
- this.scan();
- return this.bindings;
-};
-
-Sp.getTypes = function () {
- this.scan();
- return this.types;
-};
-
-function scanScope(path, bindings, scopeTypes) {
- var node = path.value;
- ScopeType.assert(node);
-
- if (namedTypes.CatchClause.check(node)) {
- // A catch clause establishes a new scope but the only variable
- // bound in that scope is the catch parameter. Any other
- // declarations create bindings in the outer scope.
- addPattern(path.get("param"), bindings);
-
- } else {
- recursiveScanScope(path, bindings, scopeTypes);
- }
-}
-
-function recursiveScanScope(path, bindings, scopeTypes) {
- var node = path.value;
-
- if (path.parent &&
- namedTypes.FunctionExpression.check(path.parent.node) &&
- path.parent.node.id) {
- addPattern(path.parent.get("id"), bindings);
- }
-
- if (!node) {
- // None of the remaining cases matter if node is falsy.
-
- } else if (isArray.check(node)) {
- path.each(function(childPath) {
- recursiveScanChild(childPath, bindings, scopeTypes);
- });
-
- } else if (namedTypes.Function.check(node)) {
- path.get("params").each(function(paramPath) {
- addPattern(paramPath, bindings);
- });
-
- recursiveScanChild(path.get("body"), bindings, scopeTypes);
-
- } else if (namedTypes.TypeAlias && namedTypes.TypeAlias.check(node)) {
- addTypePattern(path.get("id"), scopeTypes);
-
- } else if (namedTypes.VariableDeclarator.check(node)) {
- addPattern(path.get("id"), bindings);
- recursiveScanChild(path.get("init"), bindings, scopeTypes);
-
- } else if (node.type === "ImportSpecifier" ||
- node.type === "ImportNamespaceSpecifier" ||
- node.type === "ImportDefaultSpecifier") {
- addPattern(
- // Esprima used to use the .name field to refer to the local
- // binding identifier for ImportSpecifier nodes, but .id for
- // ImportNamespaceSpecifier and ImportDefaultSpecifier nodes.
- // ESTree/Acorn/ESpree use .local for all three node types.
- path.get(node.local ? "local" :
- node.name ? "name" : "id"),
- bindings
- );
-
- } else if (Node.check(node) && !Expression.check(node)) {
- types.eachField(node, function(name, child) {
- var childPath = path.get(name);
- if (childPath.value !== child) {
- throw new Error("");
- }
- recursiveScanChild(childPath, bindings, scopeTypes);
- });
- }
-}
-
-function recursiveScanChild(path, bindings, scopeTypes) {
- var node = path.value;
-
- if (!node || Expression.check(node)) {
- // Ignore falsy values and Expressions.
-
- } else if (namedTypes.FunctionDeclaration.check(node)) {
- addPattern(path.get("id"), bindings);
-
- } else if (namedTypes.ClassDeclaration &&
- namedTypes.ClassDeclaration.check(node)) {
- addPattern(path.get("id"), bindings);
-
- } else if (ScopeType.check(node)) {
- if (namedTypes.CatchClause.check(node)) {
- var catchParamName = node.param.name;
- var hadBinding = hasOwn.call(bindings, catchParamName);
-
- // Any declarations that occur inside the catch body that do
- // not have the same name as the catch parameter should count
- // as bindings in the outer scope.
- recursiveScanScope(path.get("body"), bindings, scopeTypes);
-
- // If a new binding matching the catch parameter name was
- // created while scanning the catch body, ignore it because it
- // actually refers to the catch parameter and not the outer
- // scope that we're currently scanning.
- if (!hadBinding) {
- delete bindings[catchParamName];
- }
- }
-
- } else {
- recursiveScanScope(path, bindings, scopeTypes);
- }
-}
-
-function addPattern(patternPath, bindings) {
- var pattern = patternPath.value;
- namedTypes.Pattern.assert(pattern);
-
- if (namedTypes.Identifier.check(pattern)) {
- if (hasOwn.call(bindings, pattern.name)) {
- bindings[pattern.name].push(patternPath);
- } else {
- bindings[pattern.name] = [patternPath];
- }
-
- } else if (namedTypes.ObjectPattern &&
- namedTypes.ObjectPattern.check(pattern)) {
- patternPath.get('properties').each(function(propertyPath) {
- var property = propertyPath.value;
- if (namedTypes.Pattern.check(property)) {
- addPattern(propertyPath, bindings);
- } else if (namedTypes.Property.check(property)) {
- addPattern(propertyPath.get('value'), bindings);
- } else if (namedTypes.SpreadProperty &&
- namedTypes.SpreadProperty.check(property)) {
- addPattern(propertyPath.get('argument'), bindings);
- }
- });
-
- } else if (namedTypes.ArrayPattern &&
- namedTypes.ArrayPattern.check(pattern)) {
- patternPath.get('elements').each(function(elementPath) {
- var element = elementPath.value;
- if (namedTypes.Pattern.check(element)) {
- addPattern(elementPath, bindings);
- } else if (namedTypes.SpreadElement &&
- namedTypes.SpreadElement.check(element)) {
- addPattern(elementPath.get("argument"), bindings);
- }
- });
-
- } else if (namedTypes.PropertyPattern &&
- namedTypes.PropertyPattern.check(pattern)) {
- addPattern(patternPath.get('pattern'), bindings);
-
- } else if ((namedTypes.SpreadElementPattern &&
- namedTypes.SpreadElementPattern.check(pattern)) ||
- (namedTypes.SpreadPropertyPattern &&
- namedTypes.SpreadPropertyPattern.check(pattern))) {
- addPattern(patternPath.get('argument'), bindings);
- }
-}
-
-function addTypePattern(patternPath, types) {
- var pattern = patternPath.value;
- namedTypes.Pattern.assert(pattern);
-
- if (namedTypes.Identifier.check(pattern)) {
- if (hasOwn.call(types, pattern.name)) {
- types[pattern.name].push(patternPath);
- } else {
- types[pattern.name] = [patternPath];
- }
-
- }
-}
-
-Sp.lookup = function(name) {
- for (var scope = this; scope; scope = scope.parent)
- if (scope.declares(name))
- break;
- return scope;
-};
-
-Sp.lookupType = function(name) {
- for (var scope = this; scope; scope = scope.parent)
- if (scope.declaresType(name))
- break;
- return scope;
-};
-
-Sp.getGlobalScope = function() {
- var scope = this;
- while (!scope.isGlobal)
- scope = scope.parent;
- return scope;
-};
-
-module.exports = Scope;
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/shared.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/shared.js
deleted file mode 100644
index 3e8408622f..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/shared.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var types = require("../lib/types");
-var Type = types.Type;
-var builtin = types.builtInTypes;
-var isNumber = builtin.number;
-
-// An example of constructing a new type with arbitrary constraints from
-// an existing type.
-exports.geq = function(than) {
- return new Type(function(value) {
- return isNumber.check(value) && value >= than;
- }, isNumber + " >= " + than);
-};
-
-// Default value-returning functions that may optionally be passed as a
-// third argument to Def.prototype.field.
-exports.defaults = {
- // Functions were used because (among other reasons) that's the most
- // elegant way to allow for the emptyArray one always to give a new
- // array instance.
- "null": function() { return null },
- "emptyArray": function() { return [] },
- "false": function() { return false },
- "true": function() { return true },
- "undefined": function() {}
-};
-
-var naiveIsPrimitive = Type.or(
- builtin.string,
- builtin.number,
- builtin.boolean,
- builtin.null,
- builtin.undefined
-);
-
-exports.isPrimitive = new Type(function(value) {
- if (value === null)
- return true;
- var type = typeof value;
- return !(type === "object" ||
- type === "function");
-}, naiveIsPrimitive.toString());
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/types.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/types.js
deleted file mode 100644
index b4d4aee958..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/lib/types.js
+++ /dev/null
@@ -1,828 +0,0 @@
-var Ap = Array.prototype;
-var slice = Ap.slice;
-var map = Ap.map;
-var each = Ap.forEach;
-var Op = Object.prototype;
-var objToStr = Op.toString;
-var funObjStr = objToStr.call(function(){});
-var strObjStr = objToStr.call("");
-var hasOwn = Op.hasOwnProperty;
-
-// A type is an object with a .check method that takes a value and returns
-// true or false according to whether the value matches the type.
-
-function Type(check, name) {
- var self = this;
- if (!(self instanceof Type)) {
- throw new Error("Type constructor cannot be invoked without 'new'");
- }
-
- // Unfortunately we can't elegantly reuse isFunction and isString,
- // here, because this code is executed while defining those types.
- if (objToStr.call(check) !== funObjStr) {
- throw new Error(check + " is not a function");
- }
-
- // The `name` parameter can be either a function or a string.
- var nameObjStr = objToStr.call(name);
- if (!(nameObjStr === funObjStr ||
- nameObjStr === strObjStr)) {
- throw new Error(name + " is neither a function nor a string");
- }
-
- Object.defineProperties(self, {
- name: { value: name },
- check: {
- value: function(value, deep) {
- var result = check.call(self, value, deep);
- if (!result && deep && objToStr.call(deep) === funObjStr)
- deep(self, value);
- return result;
- }
- }
- });
-}
-
-var Tp = Type.prototype;
-
-// Throughout this file we use Object.defineProperty to prevent
-// redefinition of exported properties.
-exports.Type = Type;
-
-// Like .check, except that failure triggers an AssertionError.
-Tp.assert = function(value, deep) {
- if (!this.check(value, deep)) {
- var str = shallowStringify(value);
- throw new Error(str + " does not match type " + this);
- }
- return true;
-};
-
-function shallowStringify(value) {
- if (isObject.check(value))
- return "{" + Object.keys(value).map(function(key) {
- return key + ": " + value[key];
- }).join(", ") + "}";
-
- if (isArray.check(value))
- return "[" + value.map(shallowStringify).join(", ") + "]";
-
- return JSON.stringify(value);
-}
-
-Tp.toString = function() {
- var name = this.name;
-
- if (isString.check(name))
- return name;
-
- if (isFunction.check(name))
- return name.call(this) + "";
-
- return name + " type";
-};
-
-var builtInCtorFns = [];
-var builtInCtorTypes = [];
-var builtInTypes = {};
-exports.builtInTypes = builtInTypes;
-
-function defBuiltInType(example, name) {
- var objStr = objToStr.call(example);
-
- var type = new Type(function(value) {
- return objToStr.call(value) === objStr;
- }, name);
-
- builtInTypes[name] = type;
-
- if (example && typeof example.constructor === "function") {
- builtInCtorFns.push(example.constructor);
- builtInCtorTypes.push(type);
- }
-
- return type;
-}
-
-// These types check the underlying [[Class]] attribute of the given
-// value, rather than using the problematic typeof operator. Note however
-// that no subtyping is considered; so, for instance, isObject.check
-// returns false for [], /./, new Date, and null.
-var isString = defBuiltInType("truthy", "string");
-var isFunction = defBuiltInType(function(){}, "function");
-var isArray = defBuiltInType([], "array");
-var isObject = defBuiltInType({}, "object");
-var isRegExp = defBuiltInType(/./, "RegExp");
-var isDate = defBuiltInType(new Date, "Date");
-var isNumber = defBuiltInType(3, "number");
-var isBoolean = defBuiltInType(true, "boolean");
-var isNull = defBuiltInType(null, "null");
-var isUndefined = defBuiltInType(void 0, "undefined");
-
-// There are a number of idiomatic ways of expressing types, so this
-// function serves to coerce them all to actual Type objects. Note that
-// providing the name argument is not necessary in most cases.
-function toType(from, name) {
- // The toType function should of course be idempotent.
- if (from instanceof Type)
- return from;
-
- // The Def type is used as a helper for constructing compound
- // interface types for AST nodes.
- if (from instanceof Def)
- return from.type;
-
- // Support [ElemType] syntax.
- if (isArray.check(from))
- return Type.fromArray(from);
-
- // Support { someField: FieldType, ... } syntax.
- if (isObject.check(from))
- return Type.fromObject(from);
-
- if (isFunction.check(from)) {
- var bicfIndex = builtInCtorFns.indexOf(from);
- if (bicfIndex >= 0) {
- return builtInCtorTypes[bicfIndex];
- }
-
- // If isFunction.check(from), and from is not a built-in
- // constructor, assume from is a binary predicate function we can
- // use to define the type.
- return new Type(from, name);
- }
-
- // As a last resort, toType returns a type that matches any value that
- // is === from. This is primarily useful for literal values like
- // toType(null), but it has the additional advantage of allowing
- // toType to be a total function.
- return new Type(function(value) {
- return value === from;
- }, isUndefined.check(name) ? function() {
- return from + "";
- } : name);
-}
-
-// Returns a type that matches the given value iff any of type1, type2,
-// etc. match the value.
-Type.or = function(/* type1, type2, ... */) {
- var types = [];
- var len = arguments.length;
- for (var i = 0; i < len; ++i)
- types.push(toType(arguments[i]));
-
- return new Type(function(value, deep) {
- for (var i = 0; i < len; ++i)
- if (types[i].check(value, deep))
- return true;
- return false;
- }, function() {
- return types.join(" | ");
- });
-};
-
-Type.fromArray = function(arr) {
- if (!isArray.check(arr)) {
- throw new Error("");
- }
- if (arr.length !== 1) {
- throw new Error("only one element type is permitted for typed arrays");
- }
- return toType(arr[0]).arrayOf();
-};
-
-Tp.arrayOf = function() {
- var elemType = this;
- return new Type(function(value, deep) {
- return isArray.check(value) && value.every(function(elem) {
- return elemType.check(elem, deep);
- });
- }, function() {
- return "[" + elemType + "]";
- });
-};
-
-Type.fromObject = function(obj) {
- var fields = Object.keys(obj).map(function(name) {
- return new Field(name, obj[name]);
- });
-
- return new Type(function(value, deep) {
- return isObject.check(value) && fields.every(function(field) {
- return field.type.check(value[field.name], deep);
- });
- }, function() {
- return "{ " + fields.join(", ") + " }";
- });
-};
-
-function Field(name, type, defaultFn, hidden) {
- var self = this;
-
- if (!(self instanceof Field)) {
- throw new Error("Field constructor cannot be invoked without 'new'");
- }
- isString.assert(name);
-
- type = toType(type);
-
- var properties = {
- name: { value: name },
- type: { value: type },
- hidden: { value: !!hidden }
- };
-
- if (isFunction.check(defaultFn)) {
- properties.defaultFn = { value: defaultFn };
- }
-
- Object.defineProperties(self, properties);
-}
-
-var Fp = Field.prototype;
-
-Fp.toString = function() {
- return JSON.stringify(this.name) + ": " + this.type;
-};
-
-Fp.getValue = function(obj) {
- var value = obj[this.name];
-
- if (!isUndefined.check(value))
- return value;
-
- if (this.defaultFn)
- value = this.defaultFn.call(obj);
-
- return value;
-};
-
-// Define a type whose name is registered in a namespace (the defCache) so
-// that future definitions will return the same type given the same name.
-// In particular, this system allows for circular and forward definitions.
-// The Def object d returned from Type.def may be used to configure the
-// type d.type by calling methods such as d.bases, d.build, and d.field.
-Type.def = function(typeName) {
- isString.assert(typeName);
- return hasOwn.call(defCache, typeName)
- ? defCache[typeName]
- : defCache[typeName] = new Def(typeName);
-};
-
-// In order to return the same Def instance every time Type.def is called
-// with a particular name, those instances need to be stored in a cache.
-var defCache = Object.create(null);
-
-function Def(typeName) {
- var self = this;
- if (!(self instanceof Def)) {
- throw new Error("Def constructor cannot be invoked without 'new'");
- }
-
- Object.defineProperties(self, {
- typeName: { value: typeName },
- baseNames: { value: [] },
- ownFields: { value: Object.create(null) },
-
- // These two are populated during finalization.
- allSupertypes: { value: Object.create(null) }, // Includes own typeName.
- supertypeList: { value: [] }, // Linear inheritance hierarchy.
- allFields: { value: Object.create(null) }, // Includes inherited fields.
- fieldNames: { value: [] }, // Non-hidden keys of allFields.
-
- type: {
- value: new Type(function(value, deep) {
- return self.check(value, deep);
- }, typeName)
- }
- });
-}
-
-Def.fromValue = function(value) {
- if (value && typeof value === "object") {
- var type = value.type;
- if (typeof type === "string" &&
- hasOwn.call(defCache, type)) {
- var d = defCache[type];
- if (d.finalized) {
- return d;
- }
- }
- }
-
- return null;
-};
-
-var Dp = Def.prototype;
-
-Dp.isSupertypeOf = function(that) {
- if (that instanceof Def) {
- if (this.finalized !== true ||
- that.finalized !== true) {
- throw new Error("");
- }
- return hasOwn.call(that.allSupertypes, this.typeName);
- } else {
- throw new Error(that + " is not a Def");
- }
-};
-
-// Note that the list returned by this function is a copy of the internal
-// supertypeList, *without* the typeName itself as the first element.
-exports.getSupertypeNames = function(typeName) {
- if (!hasOwn.call(defCache, typeName)) {
- throw new Error("");
- }
- var d = defCache[typeName];
- if (d.finalized !== true) {
- throw new Error("");
- }
- return d.supertypeList.slice(1);
-};
-
-// Returns an object mapping from every known type in the defCache to the
-// most specific supertype whose name is an own property of the candidates
-// object.
-exports.computeSupertypeLookupTable = function(candidates) {
- var table = {};
- var typeNames = Object.keys(defCache);
- var typeNameCount = typeNames.length;
-
- for (var i = 0; i < typeNameCount; ++i) {
- var typeName = typeNames[i];
- var d = defCache[typeName];
- if (d.finalized !== true) {
- throw new Error("" + typeName);
- }
- for (var j = 0; j < d.supertypeList.length; ++j) {
- var superTypeName = d.supertypeList[j];
- if (hasOwn.call(candidates, superTypeName)) {
- table[typeName] = superTypeName;
- break;
- }
- }
- }
-
- return table;
-};
-
-Dp.checkAllFields = function(value, deep) {
- var allFields = this.allFields;
- if (this.finalized !== true) {
- throw new Error("" + this.typeName);
- }
-
- function checkFieldByName(name) {
- var field = allFields[name];
- var type = field.type;
- var child = field.getValue(value);
- return type.check(child, deep);
- }
-
- return isObject.check(value)
- && Object.keys(allFields).every(checkFieldByName);
-};
-
-Dp.check = function(value, deep) {
- if (this.finalized !== true) {
- throw new Error(
- "prematurely checking unfinalized type " + this.typeName
- );
- }
-
- // A Def type can only match an object value.
- if (!isObject.check(value))
- return false;
-
- var vDef = Def.fromValue(value);
- if (!vDef) {
- // If we couldn't infer the Def associated with the given value,
- // and we expected it to be a SourceLocation or a Position, it was
- // probably just missing a "type" field (because Esprima does not
- // assign a type property to such nodes). Be optimistic and let
- // this.checkAllFields make the final decision.
- if (this.typeName === "SourceLocation" ||
- this.typeName === "Position") {
- return this.checkAllFields(value, deep);
- }
-
- // Calling this.checkAllFields for any other type of node is both
- // bad for performance and way too forgiving.
- return false;
- }
-
- // If checking deeply and vDef === this, then we only need to call
- // checkAllFields once. Calling checkAllFields is too strict when deep
- // is false, because then we only care about this.isSupertypeOf(vDef).
- if (deep && vDef === this)
- return this.checkAllFields(value, deep);
-
- // In most cases we rely exclusively on isSupertypeOf to make O(1)
- // subtyping determinations. This suffices in most situations outside
- // of unit tests, since interface conformance is checked whenever new
- // instances are created using builder functions.
- if (!this.isSupertypeOf(vDef))
- return false;
-
- // The exception is when deep is true; then, we recursively check all
- // fields.
- if (!deep)
- return true;
-
- // Use the more specific Def (vDef) to perform the deep check, but
- // shallow-check fields defined by the less specific Def (this).
- return vDef.checkAllFields(value, deep)
- && this.checkAllFields(value, false);
-};
-
-Dp.bases = function() {
- var args = slice.call(arguments);
- var bases = this.baseNames;
-
- if (this.finalized) {
- if (args.length !== bases.length) {
- throw new Error("");
- }
- for (var i = 0; i < args.length; i++) {
- if (args[i] !== bases[i]) {
- throw new Error("");
- }
- }
- return this;
- }
-
- args.forEach(function(baseName) {
- isString.assert(baseName);
-
- // This indexOf lookup may be O(n), but the typical number of base
- // names is very small, and indexOf is a native Array method.
- if (bases.indexOf(baseName) < 0)
- bases.push(baseName);
- });
-
- return this; // For chaining.
-};
-
-// False by default until .build(...) is called on an instance.
-Object.defineProperty(Dp, "buildable", { value: false });
-
-var builders = {};
-exports.builders = builders;
-
-// This object is used as prototype for any node created by a builder.
-var nodePrototype = {};
-
-// Call this function to define a new method to be shared by all AST
-// nodes. The replaced method (if any) is returned for easy wrapping.
-exports.defineMethod = function(name, func) {
- var old = nodePrototype[name];
-
- // Pass undefined as func to delete nodePrototype[name].
- if (isUndefined.check(func)) {
- delete nodePrototype[name];
-
- } else {
- isFunction.assert(func);
-
- Object.defineProperty(nodePrototype, name, {
- enumerable: true, // For discoverability.
- configurable: true, // For delete proto[name].
- value: func
- });
- }
-
- return old;
-};
-
-var isArrayOfString = isString.arrayOf();
-
-// Calling the .build method of a Def simultaneously marks the type as
-// buildable (by defining builders[getBuilderName(typeName)]) and
-// specifies the order of arguments that should be passed to the builder
-// function to create an instance of the type.
-Dp.build = function(/* param1, param2, ... */) {
- var self = this;
-
- var newBuildParams = slice.call(arguments);
- isArrayOfString.assert(newBuildParams);
-
- // Calling Def.prototype.build multiple times has the effect of merely
- // redefining this property.
- Object.defineProperty(self, "buildParams", {
- value: newBuildParams,
- writable: false,
- enumerable: false,
- configurable: true
- });
-
- if (self.buildable) {
- // If this Def is already buildable, update self.buildParams and
- // continue using the old builder function.
- return self;
- }
-
- // Every buildable type will have its "type" field filled in
- // automatically. This includes types that are not subtypes of Node,
- // like SourceLocation, but that seems harmless (TODO?).
- self.field("type", String, function() { return self.typeName });
-
- // Override Dp.buildable for this Def instance.
- Object.defineProperty(self, "buildable", { value: true });
-
- Object.defineProperty(builders, getBuilderName(self.typeName), {
- enumerable: true,
-
- value: function() {
- var args = arguments;
- var argc = args.length;
- var built = Object.create(nodePrototype);
-
- if (!self.finalized) {
- throw new Error(
- "attempting to instantiate unfinalized type " +
- self.typeName
- );
- }
-
- function add(param, i) {
- if (hasOwn.call(built, param))
- return;
-
- var all = self.allFields;
- if (!hasOwn.call(all, param)) {
- throw new Error("" + param);
- }
-
- var field = all[param];
- var type = field.type;
- var value;
-
- if (isNumber.check(i) && i < argc) {
- value = args[i];
- } else if (field.defaultFn) {
- // Expose the partially-built object to the default
- // function as its `this` object.
- value = field.defaultFn.call(built);
- } else {
- var message = "no value or default function given for field " +
- JSON.stringify(param) + " of " + self.typeName + "(" +
- self.buildParams.map(function(name) {
- return all[name];
- }).join(", ") + ")";
- throw new Error(message);
- }
-
- if (!type.check(value)) {
- throw new Error(
- shallowStringify(value) +
- " does not match field " + field +
- " of type " + self.typeName
- );
- }
-
- // TODO Could attach getters and setters here to enforce
- // dynamic type safety.
- built[param] = value;
- }
-
- self.buildParams.forEach(function(param, i) {
- add(param, i);
- });
-
- Object.keys(self.allFields).forEach(function(param) {
- add(param); // Use the default value.
- });
-
- // Make sure that the "type" field was filled automatically.
- if (built.type !== self.typeName) {
- throw new Error("");
- }
-
- return built;
- }
- });
-
- return self; // For chaining.
-};
-
-function getBuilderName(typeName) {
- return typeName.replace(/^[A-Z]+/, function(upperCasePrefix) {
- var len = upperCasePrefix.length;
- switch (len) {
- case 0: return "";
- // If there's only one initial capital letter, just lower-case it.
- case 1: return upperCasePrefix.toLowerCase();
- default:
- // If there's more than one initial capital letter, lower-case
- // all but the last one, so that XMLDefaultDeclaration (for
- // example) becomes xmlDefaultDeclaration.
- return upperCasePrefix.slice(
- 0, len - 1).toLowerCase() +
- upperCasePrefix.charAt(len - 1);
- }
- });
-}
-exports.getBuilderName = getBuilderName;
-
-function getStatementBuilderName(typeName) {
- typeName = getBuilderName(typeName);
- return typeName.replace(/(Expression)?$/, "Statement");
-}
-exports.getStatementBuilderName = getStatementBuilderName;
-
-// The reason fields are specified using .field(...) instead of an object
-// literal syntax is somewhat subtle: the object literal syntax would
-// support only one key and one value, but with .field(...) we can pass
-// any number of arguments to specify the field.
-Dp.field = function(name, type, defaultFn, hidden) {
- if (this.finalized) {
- console.error("Ignoring attempt to redefine field " +
- JSON.stringify(name) + " of finalized type " +
- JSON.stringify(this.typeName));
- return this;
- }
- this.ownFields[name] = new Field(name, type, defaultFn, hidden);
- return this; // For chaining.
-};
-
-var namedTypes = {};
-exports.namedTypes = namedTypes;
-
-// Like Object.keys, but aware of what fields each AST type should have.
-function getFieldNames(object) {
- var d = Def.fromValue(object);
- if (d) {
- return d.fieldNames.slice(0);
- }
-
- if ("type" in object) {
- throw new Error(
- "did not recognize object of type " +
- JSON.stringify(object.type)
- );
- }
-
- return Object.keys(object);
-}
-exports.getFieldNames = getFieldNames;
-
-// Get the value of an object property, taking object.type and default
-// functions into account.
-function getFieldValue(object, fieldName) {
- var d = Def.fromValue(object);
- if (d) {
- var field = d.allFields[fieldName];
- if (field) {
- return field.getValue(object);
- }
- }
-
- return object[fieldName];
-}
-exports.getFieldValue = getFieldValue;
-
-// Iterate over all defined fields of an object, including those missing
-// or undefined, passing each field name and effective value (as returned
-// by getFieldValue) to the callback. If the object has no corresponding
-// Def, the callback will never be called.
-exports.eachField = function(object, callback, context) {
- getFieldNames(object).forEach(function(name) {
- callback.call(this, name, getFieldValue(object, name));
- }, context);
-};
-
-// Similar to eachField, except that iteration stops as soon as the
-// callback returns a truthy value. Like Array.prototype.some, the final
-// result is either true or false to indicates whether the callback
-// returned true for any element or not.
-exports.someField = function(object, callback, context) {
- return getFieldNames(object).some(function(name) {
- return callback.call(this, name, getFieldValue(object, name));
- }, context);
-};
-
-// This property will be overridden as true by individual Def instances
-// when they are finalized.
-Object.defineProperty(Dp, "finalized", { value: false });
-
-Dp.finalize = function() {
- var self = this;
-
- // It's not an error to finalize a type more than once, but only the
- // first call to .finalize does anything.
- if (!self.finalized) {
- var allFields = self.allFields;
- var allSupertypes = self.allSupertypes;
-
- self.baseNames.forEach(function(name) {
- var def = defCache[name];
- if (def instanceof Def) {
- def.finalize();
- extend(allFields, def.allFields);
- extend(allSupertypes, def.allSupertypes);
- } else {
- var message = "unknown supertype name " +
- JSON.stringify(name) +
- " for subtype " +
- JSON.stringify(self.typeName);
- throw new Error(message);
- }
- });
-
- // TODO Warn if fields are overridden with incompatible types.
- extend(allFields, self.ownFields);
- allSupertypes[self.typeName] = self;
-
- self.fieldNames.length = 0;
- for (var fieldName in allFields) {
- if (hasOwn.call(allFields, fieldName) &&
- !allFields[fieldName].hidden) {
- self.fieldNames.push(fieldName);
- }
- }
-
- // Types are exported only once they have been finalized.
- Object.defineProperty(namedTypes, self.typeName, {
- enumerable: true,
- value: self.type
- });
-
- Object.defineProperty(self, "finalized", { value: true });
-
- // A linearization of the inheritance hierarchy.
- populateSupertypeList(self.typeName, self.supertypeList);
-
- if (self.buildable && self.supertypeList.lastIndexOf("Expression") >= 0) {
- wrapExpressionBuilderWithStatement(self.typeName);
- }
- }
-};
-
-// Adds an additional builder for Expression subtypes
-// that wraps the built Expression in an ExpressionStatements.
-function wrapExpressionBuilderWithStatement(typeName) {
- var wrapperName = getStatementBuilderName(typeName);
-
- // skip if the builder already exists
- if (builders[wrapperName]) return;
-
- // the builder function to wrap with builders.ExpressionStatement
- var wrapped = builders[getBuilderName(typeName)];
-
- // skip if there is nothing to wrap
- if (!wrapped) return;
-
- builders[wrapperName] = function() {
- return builders.expressionStatement(wrapped.apply(builders, arguments));
- };
-}
-
-function populateSupertypeList(typeName, list) {
- list.length = 0;
- list.push(typeName);
-
- var lastSeen = Object.create(null);
-
- for (var pos = 0; pos < list.length; ++pos) {
- typeName = list[pos];
- var d = defCache[typeName];
- if (d.finalized !== true) {
- throw new Error("");
- }
-
- // If we saw typeName earlier in the breadth-first traversal,
- // delete the last-seen occurrence.
- if (hasOwn.call(lastSeen, typeName)) {
- delete list[lastSeen[typeName]];
- }
-
- // Record the new index of the last-seen occurrence of typeName.
- lastSeen[typeName] = pos;
-
- // Enqueue the base names of this type.
- list.push.apply(list, d.baseNames);
- }
-
- // Compaction loop to remove array holes.
- for (var to = 0, from = to, len = list.length; from < len; ++from) {
- if (hasOwn.call(list, from)) {
- list[to++] = list[from];
- }
- }
-
- list.length = to;
-}
-
-function extend(into, from) {
- Object.keys(from).forEach(function(name) {
- into[name] = from[name];
- });
-
- return into;
-};
-
-exports.finalize = function() {
- Object.keys(defCache).forEach(function(name) {
- defCache[name].finalize();
- });
-};
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/main.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/main.js
deleted file mode 100644
index 69f249357b..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/main.js
+++ /dev/null
@@ -1,34 +0,0 @@
-var types = require("./lib/types");
-
-// This core module of AST types captures ES5 as it is parsed today by
-// git://github.com/ariya/esprima.git#master.
-require("./def/core");
-
-// Feel free to add to or remove from this list of extension modules to
-// configure the precise type hierarchy that you need.
-require("./def/es6");
-require("./def/es7");
-require("./def/mozilla");
-require("./def/e4x");
-require("./def/jsx");
-require("./def/flow");
-require("./def/esprima");
-require("./def/babel");
-
-types.finalize();
-
-exports.Type = types.Type;
-exports.builtInTypes = types.builtInTypes;
-exports.namedTypes = types.namedTypes;
-exports.builders = types.builders;
-exports.defineMethod = types.defineMethod;
-exports.getFieldNames = types.getFieldNames;
-exports.getFieldValue = types.getFieldValue;
-exports.eachField = types.eachField;
-exports.someField = types.someField;
-exports.getSupertypeNames = types.getSupertypeNames;
-exports.astNodesAreEquivalent = require("./lib/equiv");
-exports.finalize = types.finalize;
-exports.NodePath = require("./lib/node-path");
-exports.PathVisitor = require("./lib/path-visitor");
-exports.visit = exports.PathVisitor.visit;
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/package.json b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/package.json
deleted file mode 100644
index b8bf6095fe..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/ast-types/package.json
+++ /dev/null
@@ -1,100 +0,0 @@
-{
- "_args": [
- [
- "ast-types@0.8.16",
- "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast"
- ]
- ],
- "_from": "ast-types@0.8.16",
- "_id": "ast-types@0.8.16",
- "_inCache": true,
- "_installable": true,
- "_location": "/readable-stream/unreachable-branch-transform/recast/ast-types",
- "_nodeVersion": "4.2.4",
- "_npmOperationalInternal": {
- "host": "packages-13-west.internal.npmjs.com",
- "tmp": "tmp/ast-types-0.8.16.tgz_1457564958738_0.010630627628415823"
- },
- "_npmUser": {
- "email": "bn@cs.stanford.edu",
- "name": "benjamn"
- },
- "_npmVersion": "3.3.9",
- "_phantomChildren": {},
- "_requested": {
- "name": "ast-types",
- "raw": "ast-types@0.8.16",
- "rawSpec": "0.8.16",
- "scope": null,
- "spec": "0.8.16",
- "type": "version"
- },
- "_requiredBy": [
- "/readable-stream/unreachable-branch-transform/recast"
- ],
- "_resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.16.tgz",
- "_shasum": "09adddc1d0bd64873d94fcd3edd3366a4873e746",
- "_shrinkwrap": null,
- "_spec": "ast-types@0.8.16",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast",
- "author": {
- "email": "bn@cs.stanford.edu",
- "name": "Ben Newman"
- },
- "bugs": {
- "url": "https://github.com/benjamn/ast-types/issues"
- },
- "dependencies": {},
- "description": "Esprima-compatible implementation of the Mozilla JS Parser API",
- "devDependencies": {
- "babel-core": "^5.6.15",
- "esprima": "~1.2.2",
- "esprima-fb": "~14001.1.0-dev-harmony-fb",
- "mocha": "~2.2.5"
- },
- "directories": {},
- "dist": {
- "shasum": "09adddc1d0bd64873d94fcd3edd3366a4873e746",
- "tarball": "https://registry.npmjs.org/ast-types/-/ast-types-0.8.16.tgz"
- },
- "engines": {
- "node": ">= 0.8"
- },
- "gitHead": "6cfb8bc71670f56943976bbb4173783ed6ed33db",
- "homepage": "http://github.com/benjamn/ast-types",
- "keywords": [
- "ast",
- "abstract syntax tree",
- "hierarchy",
- "mozilla",
- "spidermonkey",
- "parser api",
- "esprima",
- "types",
- "type system",
- "type checking",
- "dynamic types",
- "parsing",
- "transformation",
- "syntax"
- ],
- "license": "MIT",
- "main": "main.js",
- "maintainers": [
- {
- "email": "bn@cs.stanford.edu",
- "name": "benjamn"
- }
- ],
- "name": "ast-types",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/benjamn/ast-types.git"
- },
- "scripts": {
- "test": "mocha --reporter spec --full-trace test/run.js"
- },
- "version": "0.8.16"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/ChangeLog b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/ChangeLog
deleted file mode 100644
index 864ab69619..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/ChangeLog
+++ /dev/null
@@ -1,170 +0,0 @@
-2016-02-02: Version 2.7.2
-
- * Fix out-of-bound error location in an invalid string literal (issue 1457)
- * Fix shorthand object destructuring defaults in variable declarations (issue 1459)
-
-2015-12-10: Version 2.7.1
-
- * Do not allow trailing comma in a variable declaration (issue 1360)
- * Fix assignment to `let` in non-strict mode (issue 1376)
- * Fix missing delegate property in YieldExpression (issue 1407)
-
-2015-10-22: Version 2.7.0
-
- * Fix the handling of semicolon in a break statement (issue 1044)
- * Run the test suite with major web browsers (issue 1259, 1317)
- * Allow `let` as an identifier in non-strict mode (issue 1289)
- * Attach orphaned comments as `innerComments` (issue 1328)
- * Add the support for token delegator (issue 1332)
-
-2015-09-01: Version 2.6.0
-
- * Properly allow or prohibit `let` in a binding identifier/pattern (issue 1048, 1098)
- * Add sourceType field for Program node (issue 1159)
- * Ensure that strict mode reserved word binding throw an error (issue 1171)
- * Run the test suite with Node.js and IE 11 on Windows (issue 1294)
- * Allow binding pattern with no initializer in a for statement (issue 1301)
-
-2015-07-31: Version 2.5.0
-
- * Run the test suite in a browser environment (issue 1004)
- * Ensure a comma between imported default binding and named imports (issue 1046)
- * Distinguish `yield` as a keyword vs an identifier (issue 1186)
- * Support ES6 meta property `new.target` (issue 1203)
- * Fix the syntax node for yield with expression (issue 1223)
- * Fix the check of duplicated proto in property names (issue 1225)
- * Fix ES6 Unicode escape in identifier name (issue 1229)
- * Support ES6 IdentifierStart and IdentifierPart (issue 1232)
- * Treat await as a reserved word when parsing as a module (issue 1234)
- * Recognize identifier characters from Unicode SMP (issue 1244)
- * Ensure that export and import can be followed by a comma (issue 1250)
- * Fix yield operator precedence (issue 1262)
-
-2015-07-01: Version 2.4.1
-
- * Fix some cases of comment attachment (issue 1071, 1175)
- * Fix the handling of destructuring in function arguments (issue 1193)
- * Fix invalid ranges in assignment expression (issue 1201)
-
-2015-06-26: Version 2.4.0
-
- * Support ES6 for-of iteration (issue 1047)
- * Support ES6 spread arguments (issue 1169)
- * Minimize npm payload (issue 1191)
-
-2015-06-16: Version 2.3.0
-
- * Support ES6 generator (issue 1033)
- * Improve parsing of regular expressions with `u` flag (issue 1179)
-
-2015-04-17: Version 2.2.0
-
- * Support ES6 import and export declarations (issue 1000)
- * Fix line terminator before arrow not recognized as error (issue 1009)
- * Support ES6 destructuring (issue 1045)
- * Support ES6 template literal (issue 1074)
- * Fix the handling of invalid/incomplete string escape sequences (issue 1106)
- * Fix ES3 static member access restriction (issue 1120)
- * Support for `super` in ES6 class (issue 1147)
-
-2015-03-09: Version 2.1.0
-
- * Support ES6 class (issue 1001)
- * Support ES6 rest parameter (issue 1011)
- * Expand the location of property getter, setter, and methods (issue 1029)
- * Enable TryStatement transition to a single handler (issue 1031)
- * Support ES6 computed property name (issue 1037)
- * Tolerate unclosed block comment (issue 1041)
- * Support ES6 lexical declaration (issue 1065)
-
-2015-02-06: Version 2.0.0
-
- * Support ES6 arrow function (issue 517)
- * Support ES6 Unicode code point escape (issue 521)
- * Improve the speed and accuracy of comment attachment (issue 522)
- * Support ES6 default parameter (issue 519)
- * Support ES6 regular expression flags (issue 557)
- * Fix scanning of implicit octal literals (issue 565)
- * Fix the handling of automatic semicolon insertion (issue 574)
- * Support ES6 method definition (issue 620)
- * Support ES6 octal integer literal (issue 621)
- * Support ES6 binary integer literal (issue 622)
- * Support ES6 object literal property value shorthand (issue 624)
-
-2015-03-03: Version 1.2.5
-
- * Fix scanning of implicit octal literals (issue 565)
-
-2015-02-05: Version 1.2.4
-
- * Fix parsing of LeftHandSideExpression in ForInStatement (issue 560)
- * Fix the handling of automatic semicolon insertion (issue 574)
-
-2015-01-18: Version 1.2.3
-
- * Fix division by this (issue 616)
-
-2014-05-18: Version 1.2.2
-
- * Fix duplicated tokens when collecting comments (issue 537)
-
-2014-05-04: Version 1.2.1
-
- * Ensure that Program node may still have leading comments (issue 536)
-
-2014-04-29: Version 1.2.0
-
- * Fix semicolon handling for expression statement (issue 462, 533)
- * Disallow escaped characters in regular expression flags (issue 503)
- * Performance improvement for location tracking (issue 520)
- * Improve the speed of comment attachment (issue 522)
-
-2014-03-26: Version 1.1.1
-
- * Fix token handling of forward slash after an array literal (issue 512)
-
-2014-03-23: Version 1.1.0
-
- * Optionally attach comments to the owning syntax nodes (issue 197)
- * Simplify binary parsing with stack-based shift reduce (issue 352)
- * Always include the raw source of literals (issue 376)
- * Add optional input source information (issue 386)
- * Tokenizer API for pure lexical scanning (issue 398)
- * Improve the web site and its online demos (issue 337, 400, 404)
- * Performance improvement for location tracking (issue 417, 424)
- * Support HTML comment syntax (issue 451)
- * Drop support for legacy browsers (issue 474)
-
-2013-08-27: Version 1.0.4
-
- * Minimize the payload for packages (issue 362)
- * Fix missing cases on an empty switch statement (issue 436)
- * Support escaped ] in regexp literal character classes (issue 442)
- * Tolerate invalid left-hand side expression (issue 130)
-
-2013-05-17: Version 1.0.3
-
- * Variable declaration needs at least one declarator (issue 391)
- * Fix benchmark's variance unit conversion (issue 397)
- * IE < 9: \v should be treated as vertical tab (issue 405)
- * Unary expressions should always have prefix: true (issue 418)
- * Catch clause should only accept an identifier (issue 423)
- * Tolerate setters without parameter (issue 426)
-
-2012-11-02: Version 1.0.2
-
- Improvement:
-
- * Fix esvalidate JUnit output upon a syntax error (issue 374)
-
-2012-10-28: Version 1.0.1
-
- Improvements:
-
- * esvalidate understands shebang in a Unix shell script (issue 361)
- * esvalidate treats fatal parsing failure as an error (issue 361)
- * Reduce Node.js package via .npmignore (issue 362)
-
-2012-10-22: Version 1.0.0
-
- Initial release.
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/LICENSE.BSD b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/LICENSE.BSD
deleted file mode 100644
index 17557eceb9..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/LICENSE.BSD
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/README.md b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/README.md
deleted file mode 100644
index 749454f449..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/README.md
+++ /dev/null
@@ -1,27 +0,0 @@
-[![NPM version](https://img.shields.io/npm/v/esprima.svg)](https://www.npmjs.com/package/esprima)
-[![npm download](https://img.shields.io/npm/dm/esprima.svg)](https://www.npmjs.com/package/esprima)
-[![Build Status](https://img.shields.io/travis/jquery/esprima/master.svg)](https://travis-ci.org/jquery/esprima)
-[![Coverage Status](https://img.shields.io/codecov/c/github/jquery/esprima/master.svg)](https://codecov.io/github/jquery/esprima)
-
-**Esprima** ([esprima.org](http://esprima.org), BSD license) is a high performance,
-standard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)
-parser written in ECMAScript (also popularly known as
-[JavaScript](https://en.wikipedia.org/wiki/JavaScript)).
-Esprima is created and maintained by [Ariya Hidayat](https://twitter.com/ariyahidayat),
-with the help of [many contributors](https://github.com/jquery/esprima/contributors).
-
-### Features
-
-- Full support for ECMAScript 6 ([ECMA-262](http://www.ecma-international.org/publications/standards/Ecma-262.htm))
-- Sensible [syntax tree format](https://github.com/estree/estree/blob/master/spec.md) as standardized by [ESTree project](https://github.com/estree/estree)
-- Optional tracking of syntax node location (index-based and line-column)
-- [Heavily tested](http://esprima.org/test/ci.html) (~1250 [unit tests](https://github.com/jquery/esprima/tree/master/test/fixtures) with [full code coverage](https://codecov.io/github/jquery/esprima))
-
-Esprima serves as a **building block** for some JavaScript
-language tools, from [code instrumentation](http://esprima.org/demo/functiontrace.html)
-to [editor autocompletion](http://esprima.org/demo/autocomplete.html).
-
-Esprima runs on many popular web browsers, as well as other ECMAScript platforms such as
-[Rhino](http://www.mozilla.org/rhino), [Nashorn](http://openjdk.java.net/projects/nashorn/), and [Node.js](https://npmjs.org/package/esprima).
-
-For more information, check the web site [esprima.org](http://esprima.org).
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/bin/esparse.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/bin/esparse.js
deleted file mode 100755
index 98bdbf48f2..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/bin/esparse.js
+++ /dev/null
@@ -1,126 +0,0 @@
-#!/usr/bin/env node
-/*
- Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*jslint sloppy:true node:true rhino:true */
-
-var fs, esprima, fname, content, options, syntax;
-
-if (typeof require === 'function') {
- fs = require('fs');
- esprima = require('esprima');
-} else if (typeof load === 'function') {
- try {
- load('esprima.js');
- } catch (e) {
- load('../esprima.js');
- }
-}
-
-// Shims to Node.js objects when running under Rhino.
-if (typeof console === 'undefined' && typeof process === 'undefined') {
- console = { log: print };
- fs = { readFileSync: readFile };
- process = { argv: arguments, exit: quit };
- process.argv.unshift('esparse.js');
- process.argv.unshift('rhino');
-}
-
-function showUsage() {
- console.log('Usage:');
- console.log(' esparse [options] file.js');
- console.log();
- console.log('Available options:');
- console.log();
- console.log(' --comment Gather all line and block comments in an array');
- console.log(' --loc Include line-column location info for each syntax node');
- console.log(' --range Include index-based range for each syntax node');
- console.log(' --raw Display the raw value of literals');
- console.log(' --tokens List all tokens in an array');
- console.log(' --tolerant Tolerate errors on a best-effort basis (experimental)');
- console.log(' -v, --version Shows program version');
- console.log();
- process.exit(1);
-}
-
-if (process.argv.length <= 2) {
- showUsage();
-}
-
-options = {};
-
-process.argv.splice(2).forEach(function (entry) {
-
- if (entry === '-h' || entry === '--help') {
- showUsage();
- } else if (entry === '-v' || entry === '--version') {
- console.log('ECMAScript Parser (using Esprima version', esprima.version, ')');
- console.log();
- process.exit(0);
- } else if (entry === '--comment') {
- options.comment = true;
- } else if (entry === '--loc') {
- options.loc = true;
- } else if (entry === '--range') {
- options.range = true;
- } else if (entry === '--raw') {
- options.raw = true;
- } else if (entry === '--tokens') {
- options.tokens = true;
- } else if (entry === '--tolerant') {
- options.tolerant = true;
- } else if (entry.slice(0, 2) === '--') {
- console.log('Error: unknown option ' + entry + '.');
- process.exit(1);
- } else if (typeof fname === 'string') {
- console.log('Error: more than one input file.');
- process.exit(1);
- } else {
- fname = entry;
- }
-});
-
-if (typeof fname !== 'string') {
- console.log('Error: no input file.');
- process.exit(1);
-}
-
-// Special handling for regular expression literal since we need to
-// convert it to a string literal, otherwise it will be decoded
-// as object "{}" and the regular expression would be lost.
-function adjustRegexLiteral(key, value) {
- if (key === 'value' && value instanceof RegExp) {
- value = value.toString();
- }
- return value;
-}
-
-try {
- content = fs.readFileSync(fname, 'utf-8');
- syntax = esprima.parse(content, options);
- console.log(JSON.stringify(syntax, adjustRegexLiteral, 4));
-} catch (e) {
- console.log('Error: ' + e.message);
- process.exit(1);
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/bin/esvalidate.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/bin/esvalidate.js
deleted file mode 100755
index f522dec290..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/bin/esvalidate.js
+++ /dev/null
@@ -1,199 +0,0 @@
-#!/usr/bin/env node
-/*
- Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*jslint sloppy:true plusplus:true node:true rhino:true */
-/*global phantom:true */
-
-var fs, system, esprima, options, fnames, count;
-
-if (typeof esprima === 'undefined') {
- // PhantomJS can only require() relative files
- if (typeof phantom === 'object') {
- fs = require('fs');
- system = require('system');
- esprima = require('./esprima');
- } else if (typeof require === 'function') {
- fs = require('fs');
- esprima = require('esprima');
- } else if (typeof load === 'function') {
- try {
- load('esprima.js');
- } catch (e) {
- load('../esprima.js');
- }
- }
-}
-
-// Shims to Node.js objects when running under PhantomJS 1.7+.
-if (typeof phantom === 'object') {
- fs.readFileSync = fs.read;
- process = {
- argv: [].slice.call(system.args),
- exit: phantom.exit
- };
- process.argv.unshift('phantomjs');
-}
-
-// Shims to Node.js objects when running under Rhino.
-if (typeof console === 'undefined' && typeof process === 'undefined') {
- console = { log: print };
- fs = { readFileSync: readFile };
- process = { argv: arguments, exit: quit };
- process.argv.unshift('esvalidate.js');
- process.argv.unshift('rhino');
-}
-
-function showUsage() {
- console.log('Usage:');
- console.log(' esvalidate [options] file.js');
- console.log();
- console.log('Available options:');
- console.log();
- console.log(' --format=type Set the report format, plain (default) or junit');
- console.log(' -v, --version Print program version');
- console.log();
- process.exit(1);
-}
-
-if (process.argv.length <= 2) {
- showUsage();
-}
-
-options = {
- format: 'plain'
-};
-
-fnames = [];
-
-process.argv.splice(2).forEach(function (entry) {
-
- if (entry === '-h' || entry === '--help') {
- showUsage();
- } else if (entry === '-v' || entry === '--version') {
- console.log('ECMAScript Validator (using Esprima version', esprima.version, ')');
- console.log();
- process.exit(0);
- } else if (entry.slice(0, 9) === '--format=') {
- options.format = entry.slice(9);
- if (options.format !== 'plain' && options.format !== 'junit') {
- console.log('Error: unknown report format ' + options.format + '.');
- process.exit(1);
- }
- } else if (entry.slice(0, 2) === '--') {
- console.log('Error: unknown option ' + entry + '.');
- process.exit(1);
- } else {
- fnames.push(entry);
- }
-});
-
-if (fnames.length === 0) {
- console.log('Error: no input file.');
- process.exit(1);
-}
-
-if (options.format === 'junit') {
- console.log('<?xml version="1.0" encoding="UTF-8"?>');
- console.log('<testsuites>');
-}
-
-count = 0;
-fnames.forEach(function (fname) {
- var content, timestamp, syntax, name;
- try {
- content = fs.readFileSync(fname, 'utf-8');
-
- if (content[0] === '#' && content[1] === '!') {
- content = '//' + content.substr(2, content.length);
- }
-
- timestamp = Date.now();
- syntax = esprima.parse(content, { tolerant: true });
-
- if (options.format === 'junit') {
-
- name = fname;
- if (name.lastIndexOf('/') >= 0) {
- name = name.slice(name.lastIndexOf('/') + 1);
- }
-
- console.log('<testsuite name="' + fname + '" errors="0" ' +
- ' failures="' + syntax.errors.length + '" ' +
- ' tests="' + syntax.errors.length + '" ' +
- ' time="' + Math.round((Date.now() - timestamp) / 1000) +
- '">');
-
- syntax.errors.forEach(function (error) {
- var msg = error.message;
- msg = msg.replace(/^Line\ [0-9]*\:\ /, '');
- console.log(' <testcase name="Line ' + error.lineNumber + ': ' + msg + '" ' +
- ' time="0">');
- console.log(' <error type="SyntaxError" message="' + error.message + '">' +
- error.message + '(' + name + ':' + error.lineNumber + ')' +
- '</error>');
- console.log(' </testcase>');
- });
-
- console.log('</testsuite>');
-
- } else if (options.format === 'plain') {
-
- syntax.errors.forEach(function (error) {
- var msg = error.message;
- msg = msg.replace(/^Line\ [0-9]*\:\ /, '');
- msg = fname + ':' + error.lineNumber + ': ' + msg;
- console.log(msg);
- ++count;
- });
-
- }
- } catch (e) {
- ++count;
- if (options.format === 'junit') {
- console.log('<testsuite name="' + fname + '" errors="1" failures="0" tests="1" ' +
- ' time="' + Math.round((Date.now() - timestamp) / 1000) + '">');
- console.log(' <testcase name="' + e.message + '" ' + ' time="0">');
- console.log(' <error type="ParseError" message="' + e.message + '">' +
- e.message + '(' + fname + ((e.lineNumber) ? ':' + e.lineNumber : '') +
- ')</error>');
- console.log(' </testcase>');
- console.log('</testsuite>');
- } else {
- console.log('Error: ' + e.message);
- }
- }
-});
-
-if (options.format === 'junit') {
- console.log('</testsuites>');
-}
-
-if (count > 0) {
- process.exit(1);
-}
-
-if (count === 0 && typeof phantom === 'object') {
- process.exit(0);
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/esprima.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/esprima.js
deleted file mode 100644
index 654e5fd0dd..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/esprima.js
+++ /dev/null
@@ -1,5739 +0,0 @@
-/*
- Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-(function (root, factory) {
- 'use strict';
-
- // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js,
- // Rhino, and plain browser loading.
-
- /* istanbul ignore next */
- if (typeof define === 'function' && define.amd) {
- define(['exports'], factory);
- } else if (typeof exports !== 'undefined') {
- factory(exports);
- } else {
- factory((root.esprima = {}));
- }
-}(this, function (exports) {
- 'use strict';
-
- var Token,
- TokenName,
- FnExprTokens,
- Syntax,
- PlaceHolders,
- Messages,
- Regex,
- source,
- strict,
- index,
- lineNumber,
- lineStart,
- hasLineTerminator,
- lastIndex,
- lastLineNumber,
- lastLineStart,
- startIndex,
- startLineNumber,
- startLineStart,
- scanning,
- length,
- lookahead,
- state,
- extra,
- isBindingElement,
- isAssignmentTarget,
- firstCoverInitializedNameError;
-
- Token = {
- BooleanLiteral: 1,
- EOF: 2,
- Identifier: 3,
- Keyword: 4,
- NullLiteral: 5,
- NumericLiteral: 6,
- Punctuator: 7,
- StringLiteral: 8,
- RegularExpression: 9,
- Template: 10
- };
-
- TokenName = {};
- TokenName[Token.BooleanLiteral] = 'Boolean';
- TokenName[Token.EOF] = '<end>';
- TokenName[Token.Identifier] = 'Identifier';
- TokenName[Token.Keyword] = 'Keyword';
- TokenName[Token.NullLiteral] = 'Null';
- TokenName[Token.NumericLiteral] = 'Numeric';
- TokenName[Token.Punctuator] = 'Punctuator';
- TokenName[Token.StringLiteral] = 'String';
- TokenName[Token.RegularExpression] = 'RegularExpression';
- TokenName[Token.Template] = 'Template';
-
- // A function following one of those tokens is an expression.
- FnExprTokens = ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new',
- 'return', 'case', 'delete', 'throw', 'void',
- // assignment operators
- '=', '+=', '-=', '*=', '/=', '%=', '<<=', '>>=', '>>>=',
- '&=', '|=', '^=', ',',
- // binary/unary operators
- '+', '-', '*', '/', '%', '++', '--', '<<', '>>', '>>>', '&',
- '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=',
- '<=', '<', '>', '!=', '!=='];
-
- Syntax = {
- AssignmentExpression: 'AssignmentExpression',
- AssignmentPattern: 'AssignmentPattern',
- ArrayExpression: 'ArrayExpression',
- ArrayPattern: 'ArrayPattern',
- ArrowFunctionExpression: 'ArrowFunctionExpression',
- BlockStatement: 'BlockStatement',
- BinaryExpression: 'BinaryExpression',
- BreakStatement: 'BreakStatement',
- CallExpression: 'CallExpression',
- CatchClause: 'CatchClause',
- ClassBody: 'ClassBody',
- ClassDeclaration: 'ClassDeclaration',
- ClassExpression: 'ClassExpression',
- ConditionalExpression: 'ConditionalExpression',
- ContinueStatement: 'ContinueStatement',
- DoWhileStatement: 'DoWhileStatement',
- DebuggerStatement: 'DebuggerStatement',
- EmptyStatement: 'EmptyStatement',
- ExportAllDeclaration: 'ExportAllDeclaration',
- ExportDefaultDeclaration: 'ExportDefaultDeclaration',
- ExportNamedDeclaration: 'ExportNamedDeclaration',
- ExportSpecifier: 'ExportSpecifier',
- ExpressionStatement: 'ExpressionStatement',
- ForStatement: 'ForStatement',
- ForOfStatement: 'ForOfStatement',
- ForInStatement: 'ForInStatement',
- FunctionDeclaration: 'FunctionDeclaration',
- FunctionExpression: 'FunctionExpression',
- Identifier: 'Identifier',
- IfStatement: 'IfStatement',
- ImportDeclaration: 'ImportDeclaration',
- ImportDefaultSpecifier: 'ImportDefaultSpecifier',
- ImportNamespaceSpecifier: 'ImportNamespaceSpecifier',
- ImportSpecifier: 'ImportSpecifier',
- Literal: 'Literal',
- LabeledStatement: 'LabeledStatement',
- LogicalExpression: 'LogicalExpression',
- MemberExpression: 'MemberExpression',
- MetaProperty: 'MetaProperty',
- MethodDefinition: 'MethodDefinition',
- NewExpression: 'NewExpression',
- ObjectExpression: 'ObjectExpression',
- ObjectPattern: 'ObjectPattern',
- Program: 'Program',
- Property: 'Property',
- RestElement: 'RestElement',
- ReturnStatement: 'ReturnStatement',
- SequenceExpression: 'SequenceExpression',
- SpreadElement: 'SpreadElement',
- Super: 'Super',
- SwitchCase: 'SwitchCase',
- SwitchStatement: 'SwitchStatement',
- TaggedTemplateExpression: 'TaggedTemplateExpression',
- TemplateElement: 'TemplateElement',
- TemplateLiteral: 'TemplateLiteral',
- ThisExpression: 'ThisExpression',
- ThrowStatement: 'ThrowStatement',
- TryStatement: 'TryStatement',
- UnaryExpression: 'UnaryExpression',
- UpdateExpression: 'UpdateExpression',
- VariableDeclaration: 'VariableDeclaration',
- VariableDeclarator: 'VariableDeclarator',
- WhileStatement: 'WhileStatement',
- WithStatement: 'WithStatement',
- YieldExpression: 'YieldExpression'
- };
-
- PlaceHolders = {
- ArrowParameterPlaceHolder: 'ArrowParameterPlaceHolder'
- };
-
- // Error messages should be identical to V8.
- Messages = {
- UnexpectedToken: 'Unexpected token %0',
- UnexpectedNumber: 'Unexpected number',
- UnexpectedString: 'Unexpected string',
- UnexpectedIdentifier: 'Unexpected identifier',
- UnexpectedReserved: 'Unexpected reserved word',
- UnexpectedTemplate: 'Unexpected quasi %0',
- UnexpectedEOS: 'Unexpected end of input',
- NewlineAfterThrow: 'Illegal newline after throw',
- InvalidRegExp: 'Invalid regular expression',
- UnterminatedRegExp: 'Invalid regular expression: missing /',
- InvalidLHSInAssignment: 'Invalid left-hand side in assignment',
- InvalidLHSInForIn: 'Invalid left-hand side in for-in',
- InvalidLHSInForLoop: 'Invalid left-hand side in for-loop',
- MultipleDefaultsInSwitch: 'More than one default clause in switch statement',
- NoCatchOrFinally: 'Missing catch or finally after try',
- UnknownLabel: 'Undefined label \'%0\'',
- Redeclaration: '%0 \'%1\' has already been declared',
- IllegalContinue: 'Illegal continue statement',
- IllegalBreak: 'Illegal break statement',
- IllegalReturn: 'Illegal return statement',
- StrictModeWith: 'Strict mode code may not include a with statement',
- StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode',
- StrictVarName: 'Variable name may not be eval or arguments in strict mode',
- StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode',
- StrictParamDupe: 'Strict mode function may not have duplicate parameter names',
- StrictFunctionName: 'Function name may not be eval or arguments in strict mode',
- StrictOctalLiteral: 'Octal literals are not allowed in strict mode.',
- StrictDelete: 'Delete of an unqualified identifier in strict mode.',
- StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode',
- StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode',
- StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode',
- StrictReservedWord: 'Use of future reserved word in strict mode',
- TemplateOctalLiteral: 'Octal literals are not allowed in template strings.',
- ParameterAfterRestParameter: 'Rest parameter must be last formal parameter',
- DefaultRestParameter: 'Unexpected token =',
- ObjectPatternAsRestParameter: 'Unexpected token {',
- DuplicateProtoProperty: 'Duplicate __proto__ fields are not allowed in object literals',
- ConstructorSpecialMethod: 'Class constructor may not be an accessor',
- DuplicateConstructor: 'A class may only have one constructor',
- StaticPrototype: 'Classes may not have static property named prototype',
- MissingFromClause: 'Unexpected token',
- NoAsAfterImportNamespace: 'Unexpected token',
- InvalidModuleSpecifier: 'Unexpected token',
- IllegalImportDeclaration: 'Unexpected token',
- IllegalExportDeclaration: 'Unexpected token',
- DuplicateBinding: 'Duplicate binding %0'
- };
-
- // See also tools/generate-unicode-regex.js.
- Regex = {
- // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierStart:
- NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u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\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,
-
- // ECMAScript 6/Unicode v7.0.0 NonAsciiIdentifierPart:
- NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0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\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-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F9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/
- };
-
- // Ensure the condition is true, otherwise throw an error.
- // This is only to have a better contract semantic, i.e. another safety net
- // to catch a logic error. The condition shall be fulfilled in normal case.
- // Do NOT use this to enforce a certain condition on any user input.
-
- function assert(condition, message) {
- /* istanbul ignore if */
- if (!condition) {
- throw new Error('ASSERT: ' + message);
- }
- }
-
- function isDecimalDigit(ch) {
- return (ch >= 0x30 && ch <= 0x39); // 0..9
- }
-
- function isHexDigit(ch) {
- return '0123456789abcdefABCDEF'.indexOf(ch) >= 0;
- }
-
- function isOctalDigit(ch) {
- return '01234567'.indexOf(ch) >= 0;
- }
-
- function octalToDecimal(ch) {
- // \0 is not octal escape sequence
- var octal = (ch !== '0'), code = '01234567'.indexOf(ch);
-
- if (index < length && isOctalDigit(source[index])) {
- octal = true;
- code = code * 8 + '01234567'.indexOf(source[index++]);
-
- // 3 digits are only allowed when string starts
- // with 0, 1, 2, 3
- if ('0123'.indexOf(ch) >= 0 &&
- index < length &&
- isOctalDigit(source[index])) {
- code = code * 8 + '01234567'.indexOf(source[index++]);
- }
- }
-
- return {
- code: code,
- octal: octal
- };
- }
-
- // ECMA-262 11.2 White Space
-
- function isWhiteSpace(ch) {
- return (ch === 0x20) || (ch === 0x09) || (ch === 0x0B) || (ch === 0x0C) || (ch === 0xA0) ||
- (ch >= 0x1680 && [0x1680, 0x180E, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(ch) >= 0);
- }
-
- // ECMA-262 11.3 Line Terminators
-
- function isLineTerminator(ch) {
- return (ch === 0x0A) || (ch === 0x0D) || (ch === 0x2028) || (ch === 0x2029);
- }
-
- // ECMA-262 11.6 Identifier Names and Identifiers
-
- function fromCodePoint(cp) {
- return (cp < 0x10000) ? String.fromCharCode(cp) :
- String.fromCharCode(0xD800 + ((cp - 0x10000) >> 10)) +
- String.fromCharCode(0xDC00 + ((cp - 0x10000) & 1023));
- }
-
- function isIdentifierStart(ch) {
- return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore)
- (ch >= 0x41 && ch <= 0x5A) || // A..Z
- (ch >= 0x61 && ch <= 0x7A) || // a..z
- (ch === 0x5C) || // \ (backslash)
- ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch)));
- }
-
- function isIdentifierPart(ch) {
- return (ch === 0x24) || (ch === 0x5F) || // $ (dollar) and _ (underscore)
- (ch >= 0x41 && ch <= 0x5A) || // A..Z
- (ch >= 0x61 && ch <= 0x7A) || // a..z
- (ch >= 0x30 && ch <= 0x39) || // 0..9
- (ch === 0x5C) || // \ (backslash)
- ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch)));
- }
-
- // ECMA-262 11.6.2.2 Future Reserved Words
-
- function isFutureReservedWord(id) {
- switch (id) {
- case 'enum':
- case 'export':
- case 'import':
- case 'super':
- return true;
- default:
- return false;
- }
- }
-
- function isStrictModeReservedWord(id) {
- switch (id) {
- case 'implements':
- case 'interface':
- case 'package':
- case 'private':
- case 'protected':
- case 'public':
- case 'static':
- case 'yield':
- case 'let':
- return true;
- default:
- return false;
- }
- }
-
- function isRestrictedWord(id) {
- return id === 'eval' || id === 'arguments';
- }
-
- // ECMA-262 11.6.2.1 Keywords
-
- function isKeyword(id) {
- switch (id.length) {
- case 2:
- return (id === 'if') || (id === 'in') || (id === 'do');
- case 3:
- return (id === 'var') || (id === 'for') || (id === 'new') ||
- (id === 'try') || (id === 'let');
- case 4:
- return (id === 'this') || (id === 'else') || (id === 'case') ||
- (id === 'void') || (id === 'with') || (id === 'enum');
- case 5:
- return (id === 'while') || (id === 'break') || (id === 'catch') ||
- (id === 'throw') || (id === 'const') || (id === 'yield') ||
- (id === 'class') || (id === 'super');
- case 6:
- return (id === 'return') || (id === 'typeof') || (id === 'delete') ||
- (id === 'switch') || (id === 'export') || (id === 'import');
- case 7:
- return (id === 'default') || (id === 'finally') || (id === 'extends');
- case 8:
- return (id === 'function') || (id === 'continue') || (id === 'debugger');
- case 10:
- return (id === 'instanceof');
- default:
- return false;
- }
- }
-
- // ECMA-262 11.4 Comments
-
- function addComment(type, value, start, end, loc) {
- var comment;
-
- assert(typeof start === 'number', 'Comment must have valid position');
-
- state.lastCommentStart = start;
-
- comment = {
- type: type,
- value: value
- };
- if (extra.range) {
- comment.range = [start, end];
- }
- if (extra.loc) {
- comment.loc = loc;
- }
- extra.comments.push(comment);
- if (extra.attachComment) {
- extra.leadingComments.push(comment);
- extra.trailingComments.push(comment);
- }
- if (extra.tokenize) {
- comment.type = comment.type + 'Comment';
- if (extra.delegate) {
- comment = extra.delegate(comment);
- }
- extra.tokens.push(comment);
- }
- }
-
- function skipSingleLineComment(offset) {
- var start, loc, ch, comment;
-
- start = index - offset;
- loc = {
- start: {
- line: lineNumber,
- column: index - lineStart - offset
- }
- };
-
- while (index < length) {
- ch = source.charCodeAt(index);
- ++index;
- if (isLineTerminator(ch)) {
- hasLineTerminator = true;
- if (extra.comments) {
- comment = source.slice(start + offset, index - 1);
- loc.end = {
- line: lineNumber,
- column: index - lineStart - 1
- };
- addComment('Line', comment, start, index - 1, loc);
- }
- if (ch === 13 && source.charCodeAt(index) === 10) {
- ++index;
- }
- ++lineNumber;
- lineStart = index;
- return;
- }
- }
-
- if (extra.comments) {
- comment = source.slice(start + offset, index);
- loc.end = {
- line: lineNumber,
- column: index - lineStart
- };
- addComment('Line', comment, start, index, loc);
- }
- }
-
- function skipMultiLineComment() {
- var start, loc, ch, comment;
-
- if (extra.comments) {
- start = index - 2;
- loc = {
- start: {
- line: lineNumber,
- column: index - lineStart - 2
- }
- };
- }
-
- while (index < length) {
- ch = source.charCodeAt(index);
- if (isLineTerminator(ch)) {
- if (ch === 0x0D && source.charCodeAt(index + 1) === 0x0A) {
- ++index;
- }
- hasLineTerminator = true;
- ++lineNumber;
- ++index;
- lineStart = index;
- } else if (ch === 0x2A) {
- // Block comment ends with '*/'.
- if (source.charCodeAt(index + 1) === 0x2F) {
- ++index;
- ++index;
- if (extra.comments) {
- comment = source.slice(start + 2, index - 2);
- loc.end = {
- line: lineNumber,
- column: index - lineStart
- };
- addComment('Block', comment, start, index, loc);
- }
- return;
- }
- ++index;
- } else {
- ++index;
- }
- }
-
- // Ran off the end of the file - the whole thing is a comment
- if (extra.comments) {
- loc.end = {
- line: lineNumber,
- column: index - lineStart
- };
- comment = source.slice(start + 2, index);
- addComment('Block', comment, start, index, loc);
- }
- tolerateUnexpectedToken();
- }
-
- function skipComment() {
- var ch, start;
- hasLineTerminator = false;
-
- start = (index === 0);
- while (index < length) {
- ch = source.charCodeAt(index);
-
- if (isWhiteSpace(ch)) {
- ++index;
- } else if (isLineTerminator(ch)) {
- hasLineTerminator = true;
- ++index;
- if (ch === 0x0D && source.charCodeAt(index) === 0x0A) {
- ++index;
- }
- ++lineNumber;
- lineStart = index;
- start = true;
- } else if (ch === 0x2F) { // U+002F is '/'
- ch = source.charCodeAt(index + 1);
- if (ch === 0x2F) {
- ++index;
- ++index;
- skipSingleLineComment(2);
- start = true;
- } else if (ch === 0x2A) { // U+002A is '*'
- ++index;
- ++index;
- skipMultiLineComment();
- } else {
- break;
- }
- } else if (start && ch === 0x2D) { // U+002D is '-'
- // U+003E is '>'
- if ((source.charCodeAt(index + 1) === 0x2D) && (source.charCodeAt(index + 2) === 0x3E)) {
- // '-->' is a single-line comment
- index += 3;
- skipSingleLineComment(3);
- } else {
- break;
- }
- } else if (ch === 0x3C) { // U+003C is '<'
- if (source.slice(index + 1, index + 4) === '!--') {
- ++index; // `<`
- ++index; // `!`
- ++index; // `-`
- ++index; // `-`
- skipSingleLineComment(4);
- } else {
- break;
- }
- } else {
- break;
- }
- }
- }
-
- function scanHexEscape(prefix) {
- var i, len, ch, code = 0;
-
- len = (prefix === 'u') ? 4 : 2;
- for (i = 0; i < len; ++i) {
- if (index < length && isHexDigit(source[index])) {
- ch = source[index++];
- code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());
- } else {
- return '';
- }
- }
- return String.fromCharCode(code);
- }
-
- function scanUnicodeCodePointEscape() {
- var ch, code;
-
- ch = source[index];
- code = 0;
-
- // At least, one hex digit is required.
- if (ch === '}') {
- throwUnexpectedToken();
- }
-
- while (index < length) {
- ch = source[index++];
- if (!isHexDigit(ch)) {
- break;
- }
- code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());
- }
-
- if (code > 0x10FFFF || ch !== '}') {
- throwUnexpectedToken();
- }
-
- return fromCodePoint(code);
- }
-
- function codePointAt(i) {
- var cp, first, second;
-
- cp = source.charCodeAt(i);
- if (cp >= 0xD800 && cp <= 0xDBFF) {
- second = source.charCodeAt(i + 1);
- if (second >= 0xDC00 && second <= 0xDFFF) {
- first = cp;
- cp = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
- }
- }
-
- return cp;
- }
-
- function getComplexIdentifier() {
- var cp, ch, id;
-
- cp = codePointAt(index);
- id = fromCodePoint(cp);
- index += id.length;
-
- // '\u' (U+005C, U+0075) denotes an escaped character.
- if (cp === 0x5C) {
- if (source.charCodeAt(index) !== 0x75) {
- throwUnexpectedToken();
- }
- ++index;
- if (source[index] === '{') {
- ++index;
- ch = scanUnicodeCodePointEscape();
- } else {
- ch = scanHexEscape('u');
- cp = ch.charCodeAt(0);
- if (!ch || ch === '\\' || !isIdentifierStart(cp)) {
- throwUnexpectedToken();
- }
- }
- id = ch;
- }
-
- while (index < length) {
- cp = codePointAt(index);
- if (!isIdentifierPart(cp)) {
- break;
- }
- ch = fromCodePoint(cp);
- id += ch;
- index += ch.length;
-
- // '\u' (U+005C, U+0075) denotes an escaped character.
- if (cp === 0x5C) {
- id = id.substr(0, id.length - 1);
- if (source.charCodeAt(index) !== 0x75) {
- throwUnexpectedToken();
- }
- ++index;
- if (source[index] === '{') {
- ++index;
- ch = scanUnicodeCodePointEscape();
- } else {
- ch = scanHexEscape('u');
- cp = ch.charCodeAt(0);
- if (!ch || ch === '\\' || !isIdentifierPart(cp)) {
- throwUnexpectedToken();
- }
- }
- id += ch;
- }
- }
-
- return id;
- }
-
- function getIdentifier() {
- var start, ch;
-
- start = index++;
- while (index < length) {
- ch = source.charCodeAt(index);
- if (ch === 0x5C) {
- // Blackslash (U+005C) marks Unicode escape sequence.
- index = start;
- return getComplexIdentifier();
- } else if (ch >= 0xD800 && ch < 0xDFFF) {
- // Need to handle surrogate pairs.
- index = start;
- return getComplexIdentifier();
- }
- if (isIdentifierPart(ch)) {
- ++index;
- } else {
- break;
- }
- }
-
- return source.slice(start, index);
- }
-
- function scanIdentifier() {
- var start, id, type;
-
- start = index;
-
- // Backslash (U+005C) starts an escaped character.
- id = (source.charCodeAt(index) === 0x5C) ? getComplexIdentifier() : getIdentifier();
-
- // There is no keyword or literal with only one character.
- // Thus, it must be an identifier.
- if (id.length === 1) {
- type = Token.Identifier;
- } else if (isKeyword(id)) {
- type = Token.Keyword;
- } else if (id === 'null') {
- type = Token.NullLiteral;
- } else if (id === 'true' || id === 'false') {
- type = Token.BooleanLiteral;
- } else {
- type = Token.Identifier;
- }
-
- return {
- type: type,
- value: id,
- lineNumber: lineNumber,
- lineStart: lineStart,
- start: start,
- end: index
- };
- }
-
-
- // ECMA-262 11.7 Punctuators
-
- function scanPunctuator() {
- var token, str;
-
- token = {
- type: Token.Punctuator,
- value: '',
- lineNumber: lineNumber,
- lineStart: lineStart,
- start: index,
- end: index
- };
-
- // Check for most common single-character punctuators.
- str = source[index];
- switch (str) {
-
- case '(':
- if (extra.tokenize) {
- extra.openParenToken = extra.tokenValues.length;
- }
- ++index;
- break;
-
- case '{':
- if (extra.tokenize) {
- extra.openCurlyToken = extra.tokenValues.length;
- }
- state.curlyStack.push('{');
- ++index;
- break;
-
- case '.':
- ++index;
- if (source[index] === '.' && source[index + 1] === '.') {
- // Spread operator: ...
- index += 2;
- str = '...';
- }
- break;
-
- case '}':
- ++index;
- state.curlyStack.pop();
- break;
- case ')':
- case ';':
- case ',':
- case '[':
- case ']':
- case ':':
- case '?':
- case '~':
- ++index;
- break;
-
- default:
- // 4-character punctuator.
- str = source.substr(index, 4);
- if (str === '>>>=') {
- index += 4;
- } else {
-
- // 3-character punctuators.
- str = str.substr(0, 3);
- if (str === '===' || str === '!==' || str === '>>>' ||
- str === '<<=' || str === '>>=') {
- index += 3;
- } else {
-
- // 2-character punctuators.
- str = str.substr(0, 2);
- if (str === '&&' || str === '||' || str === '==' || str === '!=' ||
- str === '+=' || str === '-=' || str === '*=' || str === '/=' ||
- str === '++' || str === '--' || str === '<<' || str === '>>' ||
- str === '&=' || str === '|=' || str === '^=' || str === '%=' ||
- str === '<=' || str === '>=' || str === '=>') {
- index += 2;
- } else {
-
- // 1-character punctuators.
- str = source[index];
- if ('<>=!+-*%&|^/'.indexOf(str) >= 0) {
- ++index;
- }
- }
- }
- }
- }
-
- if (index === token.start) {
- throwUnexpectedToken();
- }
-
- token.end = index;
- token.value = str;
- return token;
- }
-
- // ECMA-262 11.8.3 Numeric Literals
-
- function scanHexLiteral(start) {
- var number = '';
-
- while (index < length) {
- if (!isHexDigit(source[index])) {
- break;
- }
- number += source[index++];
- }
-
- if (number.length === 0) {
- throwUnexpectedToken();
- }
-
- if (isIdentifierStart(source.charCodeAt(index))) {
- throwUnexpectedToken();
- }
-
- return {
- type: Token.NumericLiteral,
- value: parseInt('0x' + number, 16),
- lineNumber: lineNumber,
- lineStart: lineStart,
- start: start,
- end: index
- };
- }
-
- function scanBinaryLiteral(start) {
- var ch, number;
-
- number = '';
-
- while (index < length) {
- ch = source[index];
- if (ch !== '0' && ch !== '1') {
- break;
- }
- number += source[index++];
- }
-
- if (number.length === 0) {
- // only 0b or 0B
- throwUnexpectedToken();
- }
-
- if (index < length) {
- ch = source.charCodeAt(index);
- /* istanbul ignore else */
- if (isIdentifierStart(ch) || isDecimalDigit(ch)) {
- throwUnexpectedToken();
- }
- }
-
- return {
- type: Token.NumericLiteral,
- value: parseInt(number, 2),
- lineNumber: lineNumber,
- lineStart: lineStart,
- start: start,
- end: index
- };
- }
-
- function scanOctalLiteral(prefix, start) {
- var number, octal;
-
- if (isOctalDigit(prefix)) {
- octal = true;
- number = '0' + source[index++];
- } else {
- octal = false;
- ++index;
- number = '';
- }
-
- while (index < length) {
- if (!isOctalDigit(source[index])) {
- break;
- }
- number += source[index++];
- }
-
- if (!octal && number.length === 0) {
- // only 0o or 0O
- throwUnexpectedToken();
- }
-
- if (isIdentifierStart(source.charCodeAt(index)) || isDecimalDigit(source.charCodeAt(index))) {
- throwUnexpectedToken();
- }
-
- return {
- type: Token.NumericLiteral,
- value: parseInt(number, 8),
- octal: octal,
- lineNumber: lineNumber,
- lineStart: lineStart,
- start: start,
- end: index
- };
- }
-
- function isImplicitOctalLiteral() {
- var i, ch;
-
- // Implicit octal, unless there is a non-octal digit.
- // (Annex B.1.1 on Numeric Literals)
- for (i = index + 1; i < length; ++i) {
- ch = source[i];
- if (ch === '8' || ch === '9') {
- return false;
- }
- if (!isOctalDigit(ch)) {
- return true;
- }
- }
-
- return true;
- }
-
- function scanNumericLiteral() {
- var number, start, ch;
-
- ch = source[index];
- assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'),
- 'Numeric literal must start with a decimal digit or a decimal point');
-
- start = index;
- number = '';
- if (ch !== '.') {
- number = source[index++];
- ch = source[index];
-
- // Hex number starts with '0x'.
- // Octal number starts with '0'.
- // Octal number in ES6 starts with '0o'.
- // Binary number in ES6 starts with '0b'.
- if (number === '0') {
- if (ch === 'x' || ch === 'X') {
- ++index;
- return scanHexLiteral(start);
- }
- if (ch === 'b' || ch === 'B') {
- ++index;
- return scanBinaryLiteral(start);
- }
- if (ch === 'o' || ch === 'O') {
- return scanOctalLiteral(ch, start);
- }
-
- if (isOctalDigit(ch)) {
- if (isImplicitOctalLiteral()) {
- return scanOctalLiteral(ch, start);
- }
- }
- }
-
- while (isDecimalDigit(source.charCodeAt(index))) {
- number += source[index++];
- }
- ch = source[index];
- }
-
- if (ch === '.') {
- number += source[index++];
- while (isDecimalDigit(source.charCodeAt(index))) {
- number += source[index++];
- }
- ch = source[index];
- }
-
- if (ch === 'e' || ch === 'E') {
- number += source[index++];
-
- ch = source[index];
- if (ch === '+' || ch === '-') {
- number += source[index++];
- }
- if (isDecimalDigit(source.charCodeAt(index))) {
- while (isDecimalDigit(source.charCodeAt(index))) {
- number += source[index++];
- }
- } else {
- throwUnexpectedToken();
- }
- }
-
- if (isIdentifierStart(source.charCodeAt(index))) {
- throwUnexpectedToken();
- }
-
- return {
- type: Token.NumericLiteral,
- value: parseFloat(number),
- lineNumber: lineNumber,
- lineStart: lineStart,
- start: start,
- end: index
- };
- }
-
- // ECMA-262 11.8.4 String Literals
-
- function scanStringLiteral() {
- var str = '', quote, start, ch, unescaped, octToDec, octal = false;
-
- quote = source[index];
- assert((quote === '\'' || quote === '"'),
- 'String literal must starts with a quote');
-
- start = index;
- ++index;
-
- while (index < length) {
- ch = source[index++];
-
- if (ch === quote) {
- quote = '';
- break;
- } else if (ch === '\\') {
- ch = source[index++];
- if (!ch || !isLineTerminator(ch.charCodeAt(0))) {
- switch (ch) {
- case 'u':
- case 'x':
- if (source[index] === '{') {
- ++index;
- str += scanUnicodeCodePointEscape();
- } else {
- unescaped = scanHexEscape(ch);
- if (!unescaped) {
- throw throwUnexpectedToken();
- }
- str += unescaped;
- }
- break;
- case 'n':
- str += '\n';
- break;
- case 'r':
- str += '\r';
- break;
- case 't':
- str += '\t';
- break;
- case 'b':
- str += '\b';
- break;
- case 'f':
- str += '\f';
- break;
- case 'v':
- str += '\x0B';
- break;
- case '8':
- case '9':
- str += ch;
- tolerateUnexpectedToken();
- break;
-
- default:
- if (isOctalDigit(ch)) {
- octToDec = octalToDecimal(ch);
-
- octal = octToDec.octal || octal;
- str += String.fromCharCode(octToDec.code);
- } else {
- str += ch;
- }
- break;
- }
- } else {
- ++lineNumber;
- if (ch === '\r' && source[index] === '\n') {
- ++index;
- }
- lineStart = index;
- }
- } else if (isLineTerminator(ch.charCodeAt(0))) {
- break;
- } else {
- str += ch;
- }
- }
-
- if (quote !== '') {
- index = start;
- throwUnexpectedToken();
- }
-
- return {
- type: Token.StringLiteral,
- value: str,
- octal: octal,
- lineNumber: startLineNumber,
- lineStart: startLineStart,
- start: start,
- end: index
- };
- }
-
- // ECMA-262 11.8.6 Template Literal Lexical Components
-
- function scanTemplate() {
- var cooked = '', ch, start, rawOffset, terminated, head, tail, restore, unescaped;
-
- terminated = false;
- tail = false;
- start = index;
- head = (source[index] === '`');
- rawOffset = 2;
-
- ++index;
-
- while (index < length) {
- ch = source[index++];
- if (ch === '`') {
- rawOffset = 1;
- tail = true;
- terminated = true;
- break;
- } else if (ch === '$') {
- if (source[index] === '{') {
- state.curlyStack.push('${');
- ++index;
- terminated = true;
- break;
- }
- cooked += ch;
- } else if (ch === '\\') {
- ch = source[index++];
- if (!isLineTerminator(ch.charCodeAt(0))) {
- switch (ch) {
- case 'n':
- cooked += '\n';
- break;
- case 'r':
- cooked += '\r';
- break;
- case 't':
- cooked += '\t';
- break;
- case 'u':
- case 'x':
- if (source[index] === '{') {
- ++index;
- cooked += scanUnicodeCodePointEscape();
- } else {
- restore = index;
- unescaped = scanHexEscape(ch);
- if (unescaped) {
- cooked += unescaped;
- } else {
- index = restore;
- cooked += ch;
- }
- }
- break;
- case 'b':
- cooked += '\b';
- break;
- case 'f':
- cooked += '\f';
- break;
- case 'v':
- cooked += '\v';
- break;
-
- default:
- if (ch === '0') {
- if (isDecimalDigit(source.charCodeAt(index))) {
- // Illegal: \01 \02 and so on
- throwError(Messages.TemplateOctalLiteral);
- }
- cooked += '\0';
- } else if (isOctalDigit(ch)) {
- // Illegal: \1 \2
- throwError(Messages.TemplateOctalLiteral);
- } else {
- cooked += ch;
- }
- break;
- }
- } else {
- ++lineNumber;
- if (ch === '\r' && source[index] === '\n') {
- ++index;
- }
- lineStart = index;
- }
- } else if (isLineTerminator(ch.charCodeAt(0))) {
- ++lineNumber;
- if (ch === '\r' && source[index] === '\n') {
- ++index;
- }
- lineStart = index;
- cooked += '\n';
- } else {
- cooked += ch;
- }
- }
-
- if (!terminated) {
- throwUnexpectedToken();
- }
-
- if (!head) {
- state.curlyStack.pop();
- }
-
- return {
- type: Token.Template,
- value: {
- cooked: cooked,
- raw: source.slice(start + 1, index - rawOffset)
- },
- head: head,
- tail: tail,
- lineNumber: lineNumber,
- lineStart: lineStart,
- start: start,
- end: index
- };
- }
-
- // ECMA-262 11.8.5 Regular Expression Literals
-
- function testRegExp(pattern, flags) {
- // The BMP character to use as a replacement for astral symbols when
- // translating an ES6 "u"-flagged pattern to an ES5-compatible
- // approximation.
- // Note: replacing with '\uFFFF' enables false positives in unlikely
- // scenarios. For example, `[\u{1044f}-\u{10440}]` is an invalid
- // pattern that would not be detected by this substitution.
- var astralSubstitute = '\uFFFF',
- tmp = pattern;
-
- if (flags.indexOf('u') >= 0) {
- tmp = tmp
- // Replace every Unicode escape sequence with the equivalent
- // BMP character or a constant ASCII code point in the case of
- // astral symbols. (See the above note on `astralSubstitute`
- // for more information.)
- .replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g, function ($0, $1, $2) {
- var codePoint = parseInt($1 || $2, 16);
- if (codePoint > 0x10FFFF) {
- throwUnexpectedToken(null, Messages.InvalidRegExp);
- }
- if (codePoint <= 0xFFFF) {
- return String.fromCharCode(codePoint);
- }
- return astralSubstitute;
- })
- // Replace each paired surrogate with a single ASCII symbol to
- // avoid throwing on regular expressions that are only valid in
- // combination with the "u" flag.
- .replace(
- /[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
- astralSubstitute
- );
- }
-
- // First, detect invalid regular expressions.
- try {
- RegExp(tmp);
- } catch (e) {
- throwUnexpectedToken(null, Messages.InvalidRegExp);
- }
-
- // Return a regular expression object for this pattern-flag pair, or
- // `null` in case the current environment doesn't support the flags it
- // uses.
- try {
- return new RegExp(pattern, flags);
- } catch (exception) {
- return null;
- }
- }
-
- function scanRegExpBody() {
- var ch, str, classMarker, terminated, body;
-
- ch = source[index];
- assert(ch === '/', 'Regular expression literal must start with a slash');
- str = source[index++];
-
- classMarker = false;
- terminated = false;
- while (index < length) {
- ch = source[index++];
- str += ch;
- if (ch === '\\') {
- ch = source[index++];
- // ECMA-262 7.8.5
- if (isLineTerminator(ch.charCodeAt(0))) {
- throwUnexpectedToken(null, Messages.UnterminatedRegExp);
- }
- str += ch;
- } else if (isLineTerminator(ch.charCodeAt(0))) {
- throwUnexpectedToken(null, Messages.UnterminatedRegExp);
- } else if (classMarker) {
- if (ch === ']') {
- classMarker = false;
- }
- } else {
- if (ch === '/') {
- terminated = true;
- break;
- } else if (ch === '[') {
- classMarker = true;
- }
- }
- }
-
- if (!terminated) {
- throwUnexpectedToken(null, Messages.UnterminatedRegExp);
- }
-
- // Exclude leading and trailing slash.
- body = str.substr(1, str.length - 2);
- return {
- value: body,
- literal: str
- };
- }
-
- function scanRegExpFlags() {
- var ch, str, flags, restore;
-
- str = '';
- flags = '';
- while (index < length) {
- ch = source[index];
- if (!isIdentifierPart(ch.charCodeAt(0))) {
- break;
- }
-
- ++index;
- if (ch === '\\' && index < length) {
- ch = source[index];
- if (ch === 'u') {
- ++index;
- restore = index;
- ch = scanHexEscape('u');
- if (ch) {
- flags += ch;
- for (str += '\\u'; restore < index; ++restore) {
- str += source[restore];
- }
- } else {
- index = restore;
- flags += 'u';
- str += '\\u';
- }
- tolerateUnexpectedToken();
- } else {
- str += '\\';
- tolerateUnexpectedToken();
- }
- } else {
- flags += ch;
- str += ch;
- }
- }
-
- return {
- value: flags,
- literal: str
- };
- }
-
- function scanRegExp() {
- var start, body, flags, value;
- scanning = true;
-
- lookahead = null;
- skipComment();
- start = index;
-
- body = scanRegExpBody();
- flags = scanRegExpFlags();
- value = testRegExp(body.value, flags.value);
- scanning = false;
- if (extra.tokenize) {
- return {
- type: Token.RegularExpression,
- value: value,
- regex: {
- pattern: body.value,
- flags: flags.value
- },
- lineNumber: lineNumber,
- lineStart: lineStart,
- start: start,
- end: index
- };
- }
-
- return {
- literal: body.literal + flags.literal,
- value: value,
- regex: {
- pattern: body.value,
- flags: flags.value
- },
- start: start,
- end: index
- };
- }
-
- function collectRegex() {
- var pos, loc, regex, token;
-
- skipComment();
-
- pos = index;
- loc = {
- start: {
- line: lineNumber,
- column: index - lineStart
- }
- };
-
- regex = scanRegExp();
-
- loc.end = {
- line: lineNumber,
- column: index - lineStart
- };
-
- /* istanbul ignore next */
- if (!extra.tokenize) {
- // Pop the previous token, which is likely '/' or '/='
- if (extra.tokens.length > 0) {
- token = extra.tokens[extra.tokens.length - 1];
- if (token.range[0] === pos && token.type === 'Punctuator') {
- if (token.value === '/' || token.value === '/=') {
- extra.tokens.pop();
- }
- }
- }
-
- extra.tokens.push({
- type: 'RegularExpression',
- value: regex.literal,
- regex: regex.regex,
- range: [pos, index],
- loc: loc
- });
- }
-
- return regex;
- }
-
- function isIdentifierName(token) {
- return token.type === Token.Identifier ||
- token.type === Token.Keyword ||
- token.type === Token.BooleanLiteral ||
- token.type === Token.NullLiteral;
- }
-
- // Using the following algorithm:
- // https://github.com/mozilla/sweet.js/wiki/design
-
- function advanceSlash() {
- var regex, previous, check;
-
- function testKeyword(value) {
- return value && (value.length > 1) && (value[0] >= 'a') && (value[0] <= 'z');
- }
-
- previous = extra.tokenValues[extra.tokens.length - 1];
- regex = (previous !== null);
-
- switch (previous) {
- case 'this':
- case ']':
- regex = false;
- break;
-
- case ')':
- check = extra.tokenValues[extra.openParenToken - 1];
- regex = (check === 'if' || check === 'while' || check === 'for' || check === 'with');
- break;
-
- case '}':
- // Dividing a function by anything makes little sense,
- // but we have to check for that.
- regex = false;
- if (testKeyword(extra.tokenValues[extra.openCurlyToken - 3])) {
- // Anonymous function, e.g. function(){} /42
- check = extra.tokenValues[extra.openCurlyToken - 4];
- regex = check ? (FnExprTokens.indexOf(check) < 0) : false;
- } else if (testKeyword(extra.tokenValues[extra.openCurlyToken - 4])) {
- // Named function, e.g. function f(){} /42/
- check = extra.tokenValues[extra.openCurlyToken - 5];
- regex = check ? (FnExprTokens.indexOf(check) < 0) : true;
- }
- }
-
- return regex ? collectRegex() : scanPunctuator();
- }
-
- function advance() {
- var cp, token;
-
- if (index >= length) {
- return {
- type: Token.EOF,
- lineNumber: lineNumber,
- lineStart: lineStart,
- start: index,
- end: index
- };
- }
-
- cp = source.charCodeAt(index);
-
- if (isIdentifierStart(cp)) {
- token = scanIdentifier();
- if (strict && isStrictModeReservedWord(token.value)) {
- token.type = Token.Keyword;
- }
- return token;
- }
-
- // Very common: ( and ) and ;
- if (cp === 0x28 || cp === 0x29 || cp === 0x3B) {
- return scanPunctuator();
- }
-
- // String literal starts with single quote (U+0027) or double quote (U+0022).
- if (cp === 0x27 || cp === 0x22) {
- return scanStringLiteral();
- }
-
- // Dot (.) U+002E can also start a floating-point number, hence the need
- // to check the next character.
- if (cp === 0x2E) {
- if (isDecimalDigit(source.charCodeAt(index + 1))) {
- return scanNumericLiteral();
- }
- return scanPunctuator();
- }
-
- if (isDecimalDigit(cp)) {
- return scanNumericLiteral();
- }
-
- // Slash (/) U+002F can also start a regex.
- if (extra.tokenize && cp === 0x2F) {
- return advanceSlash();
- }
-
- // Template literals start with ` (U+0060) for template head
- // or } (U+007D) for template middle or template tail.
- if (cp === 0x60 || (cp === 0x7D && state.curlyStack[state.curlyStack.length - 1] === '${')) {
- return scanTemplate();
- }
-
- // Possible identifier start in a surrogate pair.
- if (cp >= 0xD800 && cp < 0xDFFF) {
- cp = codePointAt(index);
- if (isIdentifierStart(cp)) {
- return scanIdentifier();
- }
- }
-
- return scanPunctuator();
- }
-
- function collectToken() {
- var loc, token, value, entry;
-
- loc = {
- start: {
- line: lineNumber,
- column: index - lineStart
- }
- };
-
- token = advance();
- loc.end = {
- line: lineNumber,
- column: index - lineStart
- };
-
- if (token.type !== Token.EOF) {
- value = source.slice(token.start, token.end);
- entry = {
- type: TokenName[token.type],
- value: value,
- range: [token.start, token.end],
- loc: loc
- };
- if (token.regex) {
- entry.regex = {
- pattern: token.regex.pattern,
- flags: token.regex.flags
- };
- }
- if (extra.tokenValues) {
- extra.tokenValues.push((entry.type === 'Punctuator' || entry.type === 'Keyword') ? entry.value : null);
- }
- if (extra.tokenize) {
- if (!extra.range) {
- delete entry.range;
- }
- if (!extra.loc) {
- delete entry.loc;
- }
- if (extra.delegate) {
- entry = extra.delegate(entry);
- }
- }
- extra.tokens.push(entry);
- }
-
- return token;
- }
-
- function lex() {
- var token;
- scanning = true;
-
- lastIndex = index;
- lastLineNumber = lineNumber;
- lastLineStart = lineStart;
-
- skipComment();
-
- token = lookahead;
-
- startIndex = index;
- startLineNumber = lineNumber;
- startLineStart = lineStart;
-
- lookahead = (typeof extra.tokens !== 'undefined') ? collectToken() : advance();
- scanning = false;
- return token;
- }
-
- function peek() {
- scanning = true;
-
- skipComment();
-
- lastIndex = index;
- lastLineNumber = lineNumber;
- lastLineStart = lineStart;
-
- startIndex = index;
- startLineNumber = lineNumber;
- startLineStart = lineStart;
-
- lookahead = (typeof extra.tokens !== 'undefined') ? collectToken() : advance();
- scanning = false;
- }
-
- function Position() {
- this.line = startLineNumber;
- this.column = startIndex - startLineStart;
- }
-
- function SourceLocation() {
- this.start = new Position();
- this.end = null;
- }
-
- function WrappingSourceLocation(startToken) {
- this.start = {
- line: startToken.lineNumber,
- column: startToken.start - startToken.lineStart
- };
- this.end = null;
- }
-
- function Node() {
- if (extra.range) {
- this.range = [startIndex, 0];
- }
- if (extra.loc) {
- this.loc = new SourceLocation();
- }
- }
-
- function WrappingNode(startToken) {
- if (extra.range) {
- this.range = [startToken.start, 0];
- }
- if (extra.loc) {
- this.loc = new WrappingSourceLocation(startToken);
- }
- }
-
- WrappingNode.prototype = Node.prototype = {
-
- processComment: function () {
- var lastChild,
- innerComments,
- leadingComments,
- trailingComments,
- bottomRight = extra.bottomRightStack,
- i,
- comment,
- last = bottomRight[bottomRight.length - 1];
-
- if (this.type === Syntax.Program) {
- if (this.body.length > 0) {
- return;
- }
- }
- /**
- * patch innnerComments for properties empty block
- * `function a() {/** comments **\/}`
- */
-
- if (this.type === Syntax.BlockStatement && this.body.length === 0) {
- innerComments = [];
- for (i = extra.leadingComments.length - 1; i >= 0; --i) {
- comment = extra.leadingComments[i];
- if (this.range[1] >= comment.range[1]) {
- innerComments.unshift(comment);
- extra.leadingComments.splice(i, 1);
- extra.trailingComments.splice(i, 1);
- }
- }
- if (innerComments.length) {
- this.innerComments = innerComments;
- //bottomRight.push(this);
- return;
- }
- }
-
- if (extra.trailingComments.length > 0) {
- trailingComments = [];
- for (i = extra.trailingComments.length - 1; i >= 0; --i) {
- comment = extra.trailingComments[i];
- if (comment.range[0] >= this.range[1]) {
- trailingComments.unshift(comment);
- extra.trailingComments.splice(i, 1);
- }
- }
- extra.trailingComments = [];
- } else {
- if (last && last.trailingComments && last.trailingComments[0].range[0] >= this.range[1]) {
- trailingComments = last.trailingComments;
- delete last.trailingComments;
- }
- }
-
- // Eating the stack.
- while (last && last.range[0] >= this.range[0]) {
- lastChild = bottomRight.pop();
- last = bottomRight[bottomRight.length - 1];
- }
-
- if (lastChild) {
- if (lastChild.leadingComments) {
- leadingComments = [];
- for (i = lastChild.leadingComments.length - 1; i >= 0; --i) {
- comment = lastChild.leadingComments[i];
- if (comment.range[1] <= this.range[0]) {
- leadingComments.unshift(comment);
- lastChild.leadingComments.splice(i, 1);
- }
- }
-
- if (!lastChild.leadingComments.length) {
- lastChild.leadingComments = undefined;
- }
- }
- } else if (extra.leadingComments.length > 0) {
- leadingComments = [];
- for (i = extra.leadingComments.length - 1; i >= 0; --i) {
- comment = extra.leadingComments[i];
- if (comment.range[1] <= this.range[0]) {
- leadingComments.unshift(comment);
- extra.leadingComments.splice(i, 1);
- }
- }
- }
-
-
- if (leadingComments && leadingComments.length > 0) {
- this.leadingComments = leadingComments;
- }
- if (trailingComments && trailingComments.length > 0) {
- this.trailingComments = trailingComments;
- }
-
- bottomRight.push(this);
- },
-
- finish: function () {
- if (extra.range) {
- this.range[1] = lastIndex;
- }
- if (extra.loc) {
- this.loc.end = {
- line: lastLineNumber,
- column: lastIndex - lastLineStart
- };
- if (extra.source) {
- this.loc.source = extra.source;
- }
- }
-
- if (extra.attachComment) {
- this.processComment();
- }
- },
-
- finishArrayExpression: function (elements) {
- this.type = Syntax.ArrayExpression;
- this.elements = elements;
- this.finish();
- return this;
- },
-
- finishArrayPattern: function (elements) {
- this.type = Syntax.ArrayPattern;
- this.elements = elements;
- this.finish();
- return this;
- },
-
- finishArrowFunctionExpression: function (params, defaults, body, expression) {
- this.type = Syntax.ArrowFunctionExpression;
- this.id = null;
- this.params = params;
- this.defaults = defaults;
- this.body = body;
- this.generator = false;
- this.expression = expression;
- this.finish();
- return this;
- },
-
- finishAssignmentExpression: function (operator, left, right) {
- this.type = Syntax.AssignmentExpression;
- this.operator = operator;
- this.left = left;
- this.right = right;
- this.finish();
- return this;
- },
-
- finishAssignmentPattern: function (left, right) {
- this.type = Syntax.AssignmentPattern;
- this.left = left;
- this.right = right;
- this.finish();
- return this;
- },
-
- finishBinaryExpression: function (operator, left, right) {
- this.type = (operator === '||' || operator === '&&') ? Syntax.LogicalExpression : Syntax.BinaryExpression;
- this.operator = operator;
- this.left = left;
- this.right = right;
- this.finish();
- return this;
- },
-
- finishBlockStatement: function (body) {
- this.type = Syntax.BlockStatement;
- this.body = body;
- this.finish();
- return this;
- },
-
- finishBreakStatement: function (label) {
- this.type = Syntax.BreakStatement;
- this.label = label;
- this.finish();
- return this;
- },
-
- finishCallExpression: function (callee, args) {
- this.type = Syntax.CallExpression;
- this.callee = callee;
- this.arguments = args;
- this.finish();
- return this;
- },
-
- finishCatchClause: function (param, body) {
- this.type = Syntax.CatchClause;
- this.param = param;
- this.body = body;
- this.finish();
- return this;
- },
-
- finishClassBody: function (body) {
- this.type = Syntax.ClassBody;
- this.body = body;
- this.finish();
- return this;
- },
-
- finishClassDeclaration: function (id, superClass, body) {
- this.type = Syntax.ClassDeclaration;
- this.id = id;
- this.superClass = superClass;
- this.body = body;
- this.finish();
- return this;
- },
-
- finishClassExpression: function (id, superClass, body) {
- this.type = Syntax.ClassExpression;
- this.id = id;
- this.superClass = superClass;
- this.body = body;
- this.finish();
- return this;
- },
-
- finishConditionalExpression: function (test, consequent, alternate) {
- this.type = Syntax.ConditionalExpression;
- this.test = test;
- this.consequent = consequent;
- this.alternate = alternate;
- this.finish();
- return this;
- },
-
- finishContinueStatement: function (label) {
- this.type = Syntax.ContinueStatement;
- this.label = label;
- this.finish();
- return this;
- },
-
- finishDebuggerStatement: function () {
- this.type = Syntax.DebuggerStatement;
- this.finish();
- return this;
- },
-
- finishDoWhileStatement: function (body, test) {
- this.type = Syntax.DoWhileStatement;
- this.body = body;
- this.test = test;
- this.finish();
- return this;
- },
-
- finishEmptyStatement: function () {
- this.type = Syntax.EmptyStatement;
- this.finish();
- return this;
- },
-
- finishExpressionStatement: function (expression) {
- this.type = Syntax.ExpressionStatement;
- this.expression = expression;
- this.finish();
- return this;
- },
-
- finishForStatement: function (init, test, update, body) {
- this.type = Syntax.ForStatement;
- this.init = init;
- this.test = test;
- this.update = update;
- this.body = body;
- this.finish();
- return this;
- },
-
- finishForOfStatement: function (left, right, body) {
- this.type = Syntax.ForOfStatement;
- this.left = left;
- this.right = right;
- this.body = body;
- this.finish();
- return this;
- },
-
- finishForInStatement: function (left, right, body) {
- this.type = Syntax.ForInStatement;
- this.left = left;
- this.right = right;
- this.body = body;
- this.each = false;
- this.finish();
- return this;
- },
-
- finishFunctionDeclaration: function (id, params, defaults, body, generator) {
- this.type = Syntax.FunctionDeclaration;
- this.id = id;
- this.params = params;
- this.defaults = defaults;
- this.body = body;
- this.generator = generator;
- this.expression = false;
- this.finish();
- return this;
- },
-
- finishFunctionExpression: function (id, params, defaults, body, generator) {
- this.type = Syntax.FunctionExpression;
- this.id = id;
- this.params = params;
- this.defaults = defaults;
- this.body = body;
- this.generator = generator;
- this.expression = false;
- this.finish();
- return this;
- },
-
- finishIdentifier: function (name) {
- this.type = Syntax.Identifier;
- this.name = name;
- this.finish();
- return this;
- },
-
- finishIfStatement: function (test, consequent, alternate) {
- this.type = Syntax.IfStatement;
- this.test = test;
- this.consequent = consequent;
- this.alternate = alternate;
- this.finish();
- return this;
- },
-
- finishLabeledStatement: function (label, body) {
- this.type = Syntax.LabeledStatement;
- this.label = label;
- this.body = body;
- this.finish();
- return this;
- },
-
- finishLiteral: function (token) {
- this.type = Syntax.Literal;
- this.value = token.value;
- this.raw = source.slice(token.start, token.end);
- if (token.regex) {
- this.regex = token.regex;
- }
- this.finish();
- return this;
- },
-
- finishMemberExpression: function (accessor, object, property) {
- this.type = Syntax.MemberExpression;
- this.computed = accessor === '[';
- this.object = object;
- this.property = property;
- this.finish();
- return this;
- },
-
- finishMetaProperty: function (meta, property) {
- this.type = Syntax.MetaProperty;
- this.meta = meta;
- this.property = property;
- this.finish();
- return this;
- },
-
- finishNewExpression: function (callee, args) {
- this.type = Syntax.NewExpression;
- this.callee = callee;
- this.arguments = args;
- this.finish();
- return this;
- },
-
- finishObjectExpression: function (properties) {
- this.type = Syntax.ObjectExpression;
- this.properties = properties;
- this.finish();
- return this;
- },
-
- finishObjectPattern: function (properties) {
- this.type = Syntax.ObjectPattern;
- this.properties = properties;
- this.finish();
- return this;
- },
-
- finishPostfixExpression: function (operator, argument) {
- this.type = Syntax.UpdateExpression;
- this.operator = operator;
- this.argument = argument;
- this.prefix = false;
- this.finish();
- return this;
- },
-
- finishProgram: function (body, sourceType) {
- this.type = Syntax.Program;
- this.body = body;
- this.sourceType = sourceType;
- this.finish();
- return this;
- },
-
- finishProperty: function (kind, key, computed, value, method, shorthand) {
- this.type = Syntax.Property;
- this.key = key;
- this.computed = computed;
- this.value = value;
- this.kind = kind;
- this.method = method;
- this.shorthand = shorthand;
- this.finish();
- return this;
- },
-
- finishRestElement: function (argument) {
- this.type = Syntax.RestElement;
- this.argument = argument;
- this.finish();
- return this;
- },
-
- finishReturnStatement: function (argument) {
- this.type = Syntax.ReturnStatement;
- this.argument = argument;
- this.finish();
- return this;
- },
-
- finishSequenceExpression: function (expressions) {
- this.type = Syntax.SequenceExpression;
- this.expressions = expressions;
- this.finish();
- return this;
- },
-
- finishSpreadElement: function (argument) {
- this.type = Syntax.SpreadElement;
- this.argument = argument;
- this.finish();
- return this;
- },
-
- finishSwitchCase: function (test, consequent) {
- this.type = Syntax.SwitchCase;
- this.test = test;
- this.consequent = consequent;
- this.finish();
- return this;
- },
-
- finishSuper: function () {
- this.type = Syntax.Super;
- this.finish();
- return this;
- },
-
- finishSwitchStatement: function (discriminant, cases) {
- this.type = Syntax.SwitchStatement;
- this.discriminant = discriminant;
- this.cases = cases;
- this.finish();
- return this;
- },
-
- finishTaggedTemplateExpression: function (tag, quasi) {
- this.type = Syntax.TaggedTemplateExpression;
- this.tag = tag;
- this.quasi = quasi;
- this.finish();
- return this;
- },
-
- finishTemplateElement: function (value, tail) {
- this.type = Syntax.TemplateElement;
- this.value = value;
- this.tail = tail;
- this.finish();
- return this;
- },
-
- finishTemplateLiteral: function (quasis, expressions) {
- this.type = Syntax.TemplateLiteral;
- this.quasis = quasis;
- this.expressions = expressions;
- this.finish();
- return this;
- },
-
- finishThisExpression: function () {
- this.type = Syntax.ThisExpression;
- this.finish();
- return this;
- },
-
- finishThrowStatement: function (argument) {
- this.type = Syntax.ThrowStatement;
- this.argument = argument;
- this.finish();
- return this;
- },
-
- finishTryStatement: function (block, handler, finalizer) {
- this.type = Syntax.TryStatement;
- this.block = block;
- this.guardedHandlers = [];
- this.handlers = handler ? [handler] : [];
- this.handler = handler;
- this.finalizer = finalizer;
- this.finish();
- return this;
- },
-
- finishUnaryExpression: function (operator, argument) {
- this.type = (operator === '++' || operator === '--') ? Syntax.UpdateExpression : Syntax.UnaryExpression;
- this.operator = operator;
- this.argument = argument;
- this.prefix = true;
- this.finish();
- return this;
- },
-
- finishVariableDeclaration: function (declarations) {
- this.type = Syntax.VariableDeclaration;
- this.declarations = declarations;
- this.kind = 'var';
- this.finish();
- return this;
- },
-
- finishLexicalDeclaration: function (declarations, kind) {
- this.type = Syntax.VariableDeclaration;
- this.declarations = declarations;
- this.kind = kind;
- this.finish();
- return this;
- },
-
- finishVariableDeclarator: function (id, init) {
- this.type = Syntax.VariableDeclarator;
- this.id = id;
- this.init = init;
- this.finish();
- return this;
- },
-
- finishWhileStatement: function (test, body) {
- this.type = Syntax.WhileStatement;
- this.test = test;
- this.body = body;
- this.finish();
- return this;
- },
-
- finishWithStatement: function (object, body) {
- this.type = Syntax.WithStatement;
- this.object = object;
- this.body = body;
- this.finish();
- return this;
- },
-
- finishExportSpecifier: function (local, exported) {
- this.type = Syntax.ExportSpecifier;
- this.exported = exported || local;
- this.local = local;
- this.finish();
- return this;
- },
-
- finishImportDefaultSpecifier: function (local) {
- this.type = Syntax.ImportDefaultSpecifier;
- this.local = local;
- this.finish();
- return this;
- },
-
- finishImportNamespaceSpecifier: function (local) {
- this.type = Syntax.ImportNamespaceSpecifier;
- this.local = local;
- this.finish();
- return this;
- },
-
- finishExportNamedDeclaration: function (declaration, specifiers, src) {
- this.type = Syntax.ExportNamedDeclaration;
- this.declaration = declaration;
- this.specifiers = specifiers;
- this.source = src;
- this.finish();
- return this;
- },
-
- finishExportDefaultDeclaration: function (declaration) {
- this.type = Syntax.ExportDefaultDeclaration;
- this.declaration = declaration;
- this.finish();
- return this;
- },
-
- finishExportAllDeclaration: function (src) {
- this.type = Syntax.ExportAllDeclaration;
- this.source = src;
- this.finish();
- return this;
- },
-
- finishImportSpecifier: function (local, imported) {
- this.type = Syntax.ImportSpecifier;
- this.local = local || imported;
- this.imported = imported;
- this.finish();
- return this;
- },
-
- finishImportDeclaration: function (specifiers, src) {
- this.type = Syntax.ImportDeclaration;
- this.specifiers = specifiers;
- this.source = src;
- this.finish();
- return this;
- },
-
- finishYieldExpression: function (argument, delegate) {
- this.type = Syntax.YieldExpression;
- this.argument = argument;
- this.delegate = delegate;
- this.finish();
- return this;
- }
- };
-
-
- function recordError(error) {
- var e, existing;
-
- for (e = 0; e < extra.errors.length; e++) {
- existing = extra.errors[e];
- // Prevent duplicated error.
- /* istanbul ignore next */
- if (existing.index === error.index && existing.message === error.message) {
- return;
- }
- }
-
- extra.errors.push(error);
- }
-
- function constructError(msg, column) {
- var error = new Error(msg);
- try {
- throw error;
- } catch (base) {
- /* istanbul ignore else */
- if (Object.create && Object.defineProperty) {
- error = Object.create(base);
- Object.defineProperty(error, 'column', { value: column });
- }
- } finally {
- return error;
- }
- }
-
- function createError(line, pos, description) {
- var msg, column, error;
-
- msg = 'Line ' + line + ': ' + description;
- column = pos - (scanning ? lineStart : lastLineStart) + 1;
- error = constructError(msg, column);
- error.lineNumber = line;
- error.description = description;
- error.index = pos;
- return error;
- }
-
- // Throw an exception
-
- function throwError(messageFormat) {
- var args, msg;
-
- args = Array.prototype.slice.call(arguments, 1);
- msg = messageFormat.replace(/%(\d)/g,
- function (whole, idx) {
- assert(idx < args.length, 'Message reference must be in range');
- return args[idx];
- }
- );
-
- throw createError(lastLineNumber, lastIndex, msg);
- }
-
- function tolerateError(messageFormat) {
- var args, msg, error;
-
- args = Array.prototype.slice.call(arguments, 1);
- /* istanbul ignore next */
- msg = messageFormat.replace(/%(\d)/g,
- function (whole, idx) {
- assert(idx < args.length, 'Message reference must be in range');
- return args[idx];
- }
- );
-
- error = createError(lineNumber, lastIndex, msg);
- if (extra.errors) {
- recordError(error);
- } else {
- throw error;
- }
- }
-
- // Throw an exception because of the token.
-
- function unexpectedTokenError(token, message) {
- var value, msg = message || Messages.UnexpectedToken;
-
- if (token) {
- if (!message) {
- msg = (token.type === Token.EOF) ? Messages.UnexpectedEOS :
- (token.type === Token.Identifier) ? Messages.UnexpectedIdentifier :
- (token.type === Token.NumericLiteral) ? Messages.UnexpectedNumber :
- (token.type === Token.StringLiteral) ? Messages.UnexpectedString :
- (token.type === Token.Template) ? Messages.UnexpectedTemplate :
- Messages.UnexpectedToken;
-
- if (token.type === Token.Keyword) {
- if (isFutureReservedWord(token.value)) {
- msg = Messages.UnexpectedReserved;
- } else if (strict && isStrictModeReservedWord(token.value)) {
- msg = Messages.StrictReservedWord;
- }
- }
- }
-
- value = (token.type === Token.Template) ? token.value.raw : token.value;
- } else {
- value = 'ILLEGAL';
- }
-
- msg = msg.replace('%0', value);
-
- return (token && typeof token.lineNumber === 'number') ?
- createError(token.lineNumber, token.start, msg) :
- createError(scanning ? lineNumber : lastLineNumber, scanning ? index : lastIndex, msg);
- }
-
- function throwUnexpectedToken(token, message) {
- throw unexpectedTokenError(token, message);
- }
-
- function tolerateUnexpectedToken(token, message) {
- var error = unexpectedTokenError(token, message);
- if (extra.errors) {
- recordError(error);
- } else {
- throw error;
- }
- }
-
- // Expect the next token to match the specified punctuator.
- // If not, an exception will be thrown.
-
- function expect(value) {
- var token = lex();
- if (token.type !== Token.Punctuator || token.value !== value) {
- throwUnexpectedToken(token);
- }
- }
-
- /**
- * @name expectCommaSeparator
- * @description Quietly expect a comma when in tolerant mode, otherwise delegates
- * to <code>expect(value)</code>
- * @since 2.0
- */
- function expectCommaSeparator() {
- var token;
-
- if (extra.errors) {
- token = lookahead;
- if (token.type === Token.Punctuator && token.value === ',') {
- lex();
- } else if (token.type === Token.Punctuator && token.value === ';') {
- lex();
- tolerateUnexpectedToken(token);
- } else {
- tolerateUnexpectedToken(token, Messages.UnexpectedToken);
- }
- } else {
- expect(',');
- }
- }
-
- // Expect the next token to match the specified keyword.
- // If not, an exception will be thrown.
-
- function expectKeyword(keyword) {
- var token = lex();
- if (token.type !== Token.Keyword || token.value !== keyword) {
- throwUnexpectedToken(token);
- }
- }
-
- // Return true if the next token matches the specified punctuator.
-
- function match(value) {
- return lookahead.type === Token.Punctuator && lookahead.value === value;
- }
-
- // Return true if the next token matches the specified keyword
-
- function matchKeyword(keyword) {
- return lookahead.type === Token.Keyword && lookahead.value === keyword;
- }
-
- // Return true if the next token matches the specified contextual keyword
- // (where an identifier is sometimes a keyword depending on the context)
-
- function matchContextualKeyword(keyword) {
- return lookahead.type === Token.Identifier && lookahead.value === keyword;
- }
-
- // Return true if the next token is an assignment operator
-
- function matchAssign() {
- var op;
-
- if (lookahead.type !== Token.Punctuator) {
- return false;
- }
- op = lookahead.value;
- return op === '=' ||
- op === '*=' ||
- op === '/=' ||
- op === '%=' ||
- op === '+=' ||
- op === '-=' ||
- op === '<<=' ||
- op === '>>=' ||
- op === '>>>=' ||
- op === '&=' ||
- op === '^=' ||
- op === '|=';
- }
-
- function consumeSemicolon() {
- // Catch the very common case first: immediately a semicolon (U+003B).
- if (source.charCodeAt(startIndex) === 0x3B || match(';')) {
- lex();
- return;
- }
-
- if (hasLineTerminator) {
- return;
- }
-
- // FIXME(ikarienator): this is seemingly an issue in the previous location info convention.
- lastIndex = startIndex;
- lastLineNumber = startLineNumber;
- lastLineStart = startLineStart;
-
- if (lookahead.type !== Token.EOF && !match('}')) {
- throwUnexpectedToken(lookahead);
- }
- }
-
- // Cover grammar support.
- //
- // When an assignment expression position starts with an left parenthesis, the determination of the type
- // of the syntax is to be deferred arbitrarily long until the end of the parentheses pair (plus a lookahead)
- // or the first comma. This situation also defers the determination of all the expressions nested in the pair.
- //
- // There are three productions that can be parsed in a parentheses pair that needs to be determined
- // after the outermost pair is closed. They are:
- //
- // 1. AssignmentExpression
- // 2. BindingElements
- // 3. AssignmentTargets
- //
- // In order to avoid exponential backtracking, we use two flags to denote if the production can be
- // binding element or assignment target.
- //
- // The three productions have the relationship:
- //
- // BindingElements ⊆ AssignmentTargets ⊆ AssignmentExpression
- //
- // with a single exception that CoverInitializedName when used directly in an Expression, generates
- // an early error. Therefore, we need the third state, firstCoverInitializedNameError, to track the
- // first usage of CoverInitializedName and report it when we reached the end of the parentheses pair.
- //
- // isolateCoverGrammar function runs the given parser function with a new cover grammar context, and it does not
- // effect the current flags. This means the production the parser parses is only used as an expression. Therefore
- // the CoverInitializedName check is conducted.
- //
- // inheritCoverGrammar function runs the given parse function with a new cover grammar context, and it propagates
- // the flags outside of the parser. This means the production the parser parses is used as a part of a potential
- // pattern. The CoverInitializedName check is deferred.
- function isolateCoverGrammar(parser) {
- var oldIsBindingElement = isBindingElement,
- oldIsAssignmentTarget = isAssignmentTarget,
- oldFirstCoverInitializedNameError = firstCoverInitializedNameError,
- result;
- isBindingElement = true;
- isAssignmentTarget = true;
- firstCoverInitializedNameError = null;
- result = parser();
- if (firstCoverInitializedNameError !== null) {
- throwUnexpectedToken(firstCoverInitializedNameError);
- }
- isBindingElement = oldIsBindingElement;
- isAssignmentTarget = oldIsAssignmentTarget;
- firstCoverInitializedNameError = oldFirstCoverInitializedNameError;
- return result;
- }
-
- function inheritCoverGrammar(parser) {
- var oldIsBindingElement = isBindingElement,
- oldIsAssignmentTarget = isAssignmentTarget,
- oldFirstCoverInitializedNameError = firstCoverInitializedNameError,
- result;
- isBindingElement = true;
- isAssignmentTarget = true;
- firstCoverInitializedNameError = null;
- result = parser();
- isBindingElement = isBindingElement && oldIsBindingElement;
- isAssignmentTarget = isAssignmentTarget && oldIsAssignmentTarget;
- firstCoverInitializedNameError = oldFirstCoverInitializedNameError || firstCoverInitializedNameError;
- return result;
- }
-
- // ECMA-262 13.3.3 Destructuring Binding Patterns
-
- function parseArrayPattern(params, kind) {
- var node = new Node(), elements = [], rest, restNode;
- expect('[');
-
- while (!match(']')) {
- if (match(',')) {
- lex();
- elements.push(null);
- } else {
- if (match('...')) {
- restNode = new Node();
- lex();
- params.push(lookahead);
- rest = parseVariableIdentifier(kind);
- elements.push(restNode.finishRestElement(rest));
- break;
- } else {
- elements.push(parsePatternWithDefault(params, kind));
- }
- if (!match(']')) {
- expect(',');
- }
- }
-
- }
-
- expect(']');
-
- return node.finishArrayPattern(elements);
- }
-
- function parsePropertyPattern(params, kind) {
- var node = new Node(), key, keyToken, computed = match('['), init;
- if (lookahead.type === Token.Identifier) {
- keyToken = lookahead;
- key = parseVariableIdentifier();
- if (match('=')) {
- params.push(keyToken);
- lex();
- init = parseAssignmentExpression();
-
- return node.finishProperty(
- 'init', key, false,
- new WrappingNode(keyToken).finishAssignmentPattern(key, init), false, true);
- } else if (!match(':')) {
- params.push(keyToken);
- return node.finishProperty('init', key, false, key, false, true);
- }
- } else {
- key = parseObjectPropertyKey();
- }
- expect(':');
- init = parsePatternWithDefault(params, kind);
- return node.finishProperty('init', key, computed, init, false, false);
- }
-
- function parseObjectPattern(params, kind) {
- var node = new Node(), properties = [];
-
- expect('{');
-
- while (!match('}')) {
- properties.push(parsePropertyPattern(params, kind));
- if (!match('}')) {
- expect(',');
- }
- }
-
- lex();
-
- return node.finishObjectPattern(properties);
- }
-
- function parsePattern(params, kind) {
- if (match('[')) {
- return parseArrayPattern(params, kind);
- } else if (match('{')) {
- return parseObjectPattern(params, kind);
- } else if (matchKeyword('let')) {
- if (kind === 'const' || kind === 'let') {
- tolerateUnexpectedToken(lookahead, Messages.UnexpectedToken);
- }
- }
-
- params.push(lookahead);
- return parseVariableIdentifier(kind);
- }
-
- function parsePatternWithDefault(params, kind) {
- var startToken = lookahead, pattern, previousAllowYield, right;
- pattern = parsePattern(params, kind);
- if (match('=')) {
- lex();
- previousAllowYield = state.allowYield;
- state.allowYield = true;
- right = isolateCoverGrammar(parseAssignmentExpression);
- state.allowYield = previousAllowYield;
- pattern = new WrappingNode(startToken).finishAssignmentPattern(pattern, right);
- }
- return pattern;
- }
-
- // ECMA-262 12.2.5 Array Initializer
-
- function parseArrayInitializer() {
- var elements = [], node = new Node(), restSpread;
-
- expect('[');
-
- while (!match(']')) {
- if (match(',')) {
- lex();
- elements.push(null);
- } else if (match('...')) {
- restSpread = new Node();
- lex();
- restSpread.finishSpreadElement(inheritCoverGrammar(parseAssignmentExpression));
-
- if (!match(']')) {
- isAssignmentTarget = isBindingElement = false;
- expect(',');
- }
- elements.push(restSpread);
- } else {
- elements.push(inheritCoverGrammar(parseAssignmentExpression));
-
- if (!match(']')) {
- expect(',');
- }
- }
- }
-
- lex();
-
- return node.finishArrayExpression(elements);
- }
-
- // ECMA-262 12.2.6 Object Initializer
-
- function parsePropertyFunction(node, paramInfo, isGenerator) {
- var previousStrict, body;
-
- isAssignmentTarget = isBindingElement = false;
-
- previousStrict = strict;
- body = isolateCoverGrammar(parseFunctionSourceElements);
-
- if (strict && paramInfo.firstRestricted) {
- tolerateUnexpectedToken(paramInfo.firstRestricted, paramInfo.message);
- }
- if (strict && paramInfo.stricted) {
- tolerateUnexpectedToken(paramInfo.stricted, paramInfo.message);
- }
-
- strict = previousStrict;
- return node.finishFunctionExpression(null, paramInfo.params, paramInfo.defaults, body, isGenerator);
- }
-
- function parsePropertyMethodFunction() {
- var params, method, node = new Node(),
- previousAllowYield = state.allowYield;
-
- state.allowYield = false;
- params = parseParams();
- state.allowYield = previousAllowYield;
-
- state.allowYield = false;
- method = parsePropertyFunction(node, params, false);
- state.allowYield = previousAllowYield;
-
- return method;
- }
-
- function parseObjectPropertyKey() {
- var token, node = new Node(), expr;
-
- token = lex();
-
- // Note: This function is called only from parseObjectProperty(), where
- // EOF and Punctuator tokens are already filtered out.
-
- switch (token.type) {
- case Token.StringLiteral:
- case Token.NumericLiteral:
- if (strict && token.octal) {
- tolerateUnexpectedToken(token, Messages.StrictOctalLiteral);
- }
- return node.finishLiteral(token);
- case Token.Identifier:
- case Token.BooleanLiteral:
- case Token.NullLiteral:
- case Token.Keyword:
- return node.finishIdentifier(token.value);
- case Token.Punctuator:
- if (token.value === '[') {
- expr = isolateCoverGrammar(parseAssignmentExpression);
- expect(']');
- return expr;
- }
- break;
- }
- throwUnexpectedToken(token);
- }
-
- function lookaheadPropertyName() {
- switch (lookahead.type) {
- case Token.Identifier:
- case Token.StringLiteral:
- case Token.BooleanLiteral:
- case Token.NullLiteral:
- case Token.NumericLiteral:
- case Token.Keyword:
- return true;
- case Token.Punctuator:
- return lookahead.value === '[';
- }
- return false;
- }
-
- // This function is to try to parse a MethodDefinition as defined in 14.3. But in the case of object literals,
- // it might be called at a position where there is in fact a short hand identifier pattern or a data property.
- // This can only be determined after we consumed up to the left parentheses.
- //
- // In order to avoid back tracking, it returns `null` if the position is not a MethodDefinition and the caller
- // is responsible to visit other options.
- function tryParseMethodDefinition(token, key, computed, node) {
- var value, options, methodNode, params,
- previousAllowYield = state.allowYield;
-
- if (token.type === Token.Identifier) {
- // check for `get` and `set`;
-
- if (token.value === 'get' && lookaheadPropertyName()) {
- computed = match('[');
- key = parseObjectPropertyKey();
- methodNode = new Node();
- expect('(');
- expect(')');
-
- state.allowYield = false;
- value = parsePropertyFunction(methodNode, {
- params: [],
- defaults: [],
- stricted: null,
- firstRestricted: null,
- message: null
- }, false);
- state.allowYield = previousAllowYield;
-
- return node.finishProperty('get', key, computed, value, false, false);
- } else if (token.value === 'set' && lookaheadPropertyName()) {
- computed = match('[');
- key = parseObjectPropertyKey();
- methodNode = new Node();
- expect('(');
-
- options = {
- params: [],
- defaultCount: 0,
- defaults: [],
- firstRestricted: null,
- paramSet: {}
- };
- if (match(')')) {
- tolerateUnexpectedToken(lookahead);
- } else {
- state.allowYield = false;
- parseParam(options);
- state.allowYield = previousAllowYield;
- if (options.defaultCount === 0) {
- options.defaults = [];
- }
- }
- expect(')');
-
- state.allowYield = false;
- value = parsePropertyFunction(methodNode, options, false);
- state.allowYield = previousAllowYield;
-
- return node.finishProperty('set', key, computed, value, false, false);
- }
- } else if (token.type === Token.Punctuator && token.value === '*' && lookaheadPropertyName()) {
- computed = match('[');
- key = parseObjectPropertyKey();
- methodNode = new Node();
-
- state.allowYield = true;
- params = parseParams();
- state.allowYield = previousAllowYield;
-
- state.allowYield = false;
- value = parsePropertyFunction(methodNode, params, true);
- state.allowYield = previousAllowYield;
-
- return node.finishProperty('init', key, computed, value, true, false);
- }
-
- if (key && match('(')) {
- value = parsePropertyMethodFunction();
- return node.finishProperty('init', key, computed, value, true, false);
- }
-
- // Not a MethodDefinition.
- return null;
- }
-
- function parseObjectProperty(hasProto) {
- var token = lookahead, node = new Node(), computed, key, maybeMethod, proto, value;
-
- computed = match('[');
- if (match('*')) {
- lex();
- } else {
- key = parseObjectPropertyKey();
- }
- maybeMethod = tryParseMethodDefinition(token, key, computed, node);
- if (maybeMethod) {
- return maybeMethod;
- }
-
- if (!key) {
- throwUnexpectedToken(lookahead);
- }
-
- // Check for duplicated __proto__
- if (!computed) {
- proto = (key.type === Syntax.Identifier && key.name === '__proto__') ||
- (key.type === Syntax.Literal && key.value === '__proto__');
- if (hasProto.value && proto) {
- tolerateError(Messages.DuplicateProtoProperty);
- }
- hasProto.value |= proto;
- }
-
- if (match(':')) {
- lex();
- value = inheritCoverGrammar(parseAssignmentExpression);
- return node.finishProperty('init', key, computed, value, false, false);
- }
-
- if (token.type === Token.Identifier) {
- if (match('=')) {
- firstCoverInitializedNameError = lookahead;
- lex();
- value = isolateCoverGrammar(parseAssignmentExpression);
- return node.finishProperty('init', key, computed,
- new WrappingNode(token).finishAssignmentPattern(key, value), false, true);
- }
- return node.finishProperty('init', key, computed, key, false, true);
- }
-
- throwUnexpectedToken(lookahead);
- }
-
- function parseObjectInitializer() {
- var properties = [], hasProto = {value: false}, node = new Node();
-
- expect('{');
-
- while (!match('}')) {
- properties.push(parseObjectProperty(hasProto));
-
- if (!match('}')) {
- expectCommaSeparator();
- }
- }
-
- expect('}');
-
- return node.finishObjectExpression(properties);
- }
-
- function reinterpretExpressionAsPattern(expr) {
- var i;
- switch (expr.type) {
- case Syntax.Identifier:
- case Syntax.MemberExpression:
- case Syntax.RestElement:
- case Syntax.AssignmentPattern:
- break;
- case Syntax.SpreadElement:
- expr.type = Syntax.RestElement;
- reinterpretExpressionAsPattern(expr.argument);
- break;
- case Syntax.ArrayExpression:
- expr.type = Syntax.ArrayPattern;
- for (i = 0; i < expr.elements.length; i++) {
- if (expr.elements[i] !== null) {
- reinterpretExpressionAsPattern(expr.elements[i]);
- }
- }
- break;
- case Syntax.ObjectExpression:
- expr.type = Syntax.ObjectPattern;
- for (i = 0; i < expr.properties.length; i++) {
- reinterpretExpressionAsPattern(expr.properties[i].value);
- }
- break;
- case Syntax.AssignmentExpression:
- expr.type = Syntax.AssignmentPattern;
- reinterpretExpressionAsPattern(expr.left);
- break;
- default:
- // Allow other node type for tolerant parsing.
- break;
- }
- }
-
- // ECMA-262 12.2.9 Template Literals
-
- function parseTemplateElement(option) {
- var node, token;
-
- if (lookahead.type !== Token.Template || (option.head && !lookahead.head)) {
- throwUnexpectedToken();
- }
-
- node = new Node();
- token = lex();
-
- return node.finishTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail);
- }
-
- function parseTemplateLiteral() {
- var quasi, quasis, expressions, node = new Node();
-
- quasi = parseTemplateElement({ head: true });
- quasis = [quasi];
- expressions = [];
-
- while (!quasi.tail) {
- expressions.push(parseExpression());
- quasi = parseTemplateElement({ head: false });
- quasis.push(quasi);
- }
-
- return node.finishTemplateLiteral(quasis, expressions);
- }
-
- // ECMA-262 12.2.10 The Grouping Operator
-
- function parseGroupExpression() {
- var expr, expressions, startToken, i, params = [];
-
- expect('(');
-
- if (match(')')) {
- lex();
- if (!match('=>')) {
- expect('=>');
- }
- return {
- type: PlaceHolders.ArrowParameterPlaceHolder,
- params: [],
- rawParams: []
- };
- }
-
- startToken = lookahead;
- if (match('...')) {
- expr = parseRestElement(params);
- expect(')');
- if (!match('=>')) {
- expect('=>');
- }
- return {
- type: PlaceHolders.ArrowParameterPlaceHolder,
- params: [expr]
- };
- }
-
- isBindingElement = true;
- expr = inheritCoverGrammar(parseAssignmentExpression);
-
- if (match(',')) {
- isAssignmentTarget = false;
- expressions = [expr];
-
- while (startIndex < length) {
- if (!match(',')) {
- break;
- }
- lex();
-
- if (match('...')) {
- if (!isBindingElement) {
- throwUnexpectedToken(lookahead);
- }
- expressions.push(parseRestElement(params));
- expect(')');
- if (!match('=>')) {
- expect('=>');
- }
- isBindingElement = false;
- for (i = 0; i < expressions.length; i++) {
- reinterpretExpressionAsPattern(expressions[i]);
- }
- return {
- type: PlaceHolders.ArrowParameterPlaceHolder,
- params: expressions
- };
- }
-
- expressions.push(inheritCoverGrammar(parseAssignmentExpression));
- }
-
- expr = new WrappingNode(startToken).finishSequenceExpression(expressions);
- }
-
-
- expect(')');
-
- if (match('=>')) {
- if (expr.type === Syntax.Identifier && expr.name === 'yield') {
- return {
- type: PlaceHolders.ArrowParameterPlaceHolder,
- params: [expr]
- };
- }
-
- if (!isBindingElement) {
- throwUnexpectedToken(lookahead);
- }
-
- if (expr.type === Syntax.SequenceExpression) {
- for (i = 0; i < expr.expressions.length; i++) {
- reinterpretExpressionAsPattern(expr.expressions[i]);
- }
- } else {
- reinterpretExpressionAsPattern(expr);
- }
-
- expr = {
- type: PlaceHolders.ArrowParameterPlaceHolder,
- params: expr.type === Syntax.SequenceExpression ? expr.expressions : [expr]
- };
- }
- isBindingElement = false;
- return expr;
- }
-
-
- // ECMA-262 12.2 Primary Expressions
-
- function parsePrimaryExpression() {
- var type, token, expr, node;
-
- if (match('(')) {
- isBindingElement = false;
- return inheritCoverGrammar(parseGroupExpression);
- }
-
- if (match('[')) {
- return inheritCoverGrammar(parseArrayInitializer);
- }
-
- if (match('{')) {
- return inheritCoverGrammar(parseObjectInitializer);
- }
-
- type = lookahead.type;
- node = new Node();
-
- if (type === Token.Identifier) {
- if (state.sourceType === 'module' && lookahead.value === 'await') {
- tolerateUnexpectedToken(lookahead);
- }
- expr = node.finishIdentifier(lex().value);
- } else if (type === Token.StringLiteral || type === Token.NumericLiteral) {
- isAssignmentTarget = isBindingElement = false;
- if (strict && lookahead.octal) {
- tolerateUnexpectedToken(lookahead, Messages.StrictOctalLiteral);
- }
- expr = node.finishLiteral(lex());
- } else if (type === Token.Keyword) {
- if (!strict && state.allowYield && matchKeyword('yield')) {
- return parseNonComputedProperty();
- }
- if (!strict && matchKeyword('let')) {
- return node.finishIdentifier(lex().value);
- }
- isAssignmentTarget = isBindingElement = false;
- if (matchKeyword('function')) {
- return parseFunctionExpression();
- }
- if (matchKeyword('this')) {
- lex();
- return node.finishThisExpression();
- }
- if (matchKeyword('class')) {
- return parseClassExpression();
- }
- throwUnexpectedToken(lex());
- } else if (type === Token.BooleanLiteral) {
- isAssignmentTarget = isBindingElement = false;
- token = lex();
- token.value = (token.value === 'true');
- expr = node.finishLiteral(token);
- } else if (type === Token.NullLiteral) {
- isAssignmentTarget = isBindingElement = false;
- token = lex();
- token.value = null;
- expr = node.finishLiteral(token);
- } else if (match('/') || match('/=')) {
- isAssignmentTarget = isBindingElement = false;
- index = startIndex;
-
- if (typeof extra.tokens !== 'undefined') {
- token = collectRegex();
- } else {
- token = scanRegExp();
- }
- lex();
- expr = node.finishLiteral(token);
- } else if (type === Token.Template) {
- expr = parseTemplateLiteral();
- } else {
- throwUnexpectedToken(lex());
- }
-
- return expr;
- }
-
- // ECMA-262 12.3 Left-Hand-Side Expressions
-
- function parseArguments() {
- var args = [], expr;
-
- expect('(');
-
- if (!match(')')) {
- while (startIndex < length) {
- if (match('...')) {
- expr = new Node();
- lex();
- expr.finishSpreadElement(isolateCoverGrammar(parseAssignmentExpression));
- } else {
- expr = isolateCoverGrammar(parseAssignmentExpression);
- }
- args.push(expr);
- if (match(')')) {
- break;
- }
- expectCommaSeparator();
- }
- }
-
- expect(')');
-
- return args;
- }
-
- function parseNonComputedProperty() {
- var token, node = new Node();
-
- token = lex();
-
- if (!isIdentifierName(token)) {
- throwUnexpectedToken(token);
- }
-
- return node.finishIdentifier(token.value);
- }
-
- function parseNonComputedMember() {
- expect('.');
-
- return parseNonComputedProperty();
- }
-
- function parseComputedMember() {
- var expr;
-
- expect('[');
-
- expr = isolateCoverGrammar(parseExpression);
-
- expect(']');
-
- return expr;
- }
-
- // ECMA-262 12.3.3 The new Operator
-
- function parseNewExpression() {
- var callee, args, node = new Node();
-
- expectKeyword('new');
-
- if (match('.')) {
- lex();
- if (lookahead.type === Token.Identifier && lookahead.value === 'target') {
- if (state.inFunctionBody) {
- lex();
- return node.finishMetaProperty('new', 'target');
- }
- }
- throwUnexpectedToken(lookahead);
- }
-
- callee = isolateCoverGrammar(parseLeftHandSideExpression);
- args = match('(') ? parseArguments() : [];
-
- isAssignmentTarget = isBindingElement = false;
-
- return node.finishNewExpression(callee, args);
- }
-
- // ECMA-262 12.3.4 Function Calls
-
- function parseLeftHandSideExpressionAllowCall() {
- var quasi, expr, args, property, startToken, previousAllowIn = state.allowIn;
-
- startToken = lookahead;
- state.allowIn = true;
-
- if (matchKeyword('super') && state.inFunctionBody) {
- expr = new Node();
- lex();
- expr = expr.finishSuper();
- if (!match('(') && !match('.') && !match('[')) {
- throwUnexpectedToken(lookahead);
- }
- } else {
- expr = inheritCoverGrammar(matchKeyword('new') ? parseNewExpression : parsePrimaryExpression);
- }
-
- for (;;) {
- if (match('.')) {
- isBindingElement = false;
- isAssignmentTarget = true;
- property = parseNonComputedMember();
- expr = new WrappingNode(startToken).finishMemberExpression('.', expr, property);
- } else if (match('(')) {
- isBindingElement = false;
- isAssignmentTarget = false;
- args = parseArguments();
- expr = new WrappingNode(startToken).finishCallExpression(expr, args);
- } else if (match('[')) {
- isBindingElement = false;
- isAssignmentTarget = true;
- property = parseComputedMember();
- expr = new WrappingNode(startToken).finishMemberExpression('[', expr, property);
- } else if (lookahead.type === Token.Template && lookahead.head) {
- quasi = parseTemplateLiteral();
- expr = new WrappingNode(startToken).finishTaggedTemplateExpression(expr, quasi);
- } else {
- break;
- }
- }
- state.allowIn = previousAllowIn;
-
- return expr;
- }
-
- // ECMA-262 12.3 Left-Hand-Side Expressions
-
- function parseLeftHandSideExpression() {
- var quasi, expr, property, startToken;
- assert(state.allowIn, 'callee of new expression always allow in keyword.');
-
- startToken = lookahead;
-
- if (matchKeyword('super') && state.inFunctionBody) {
- expr = new Node();
- lex();
- expr = expr.finishSuper();
- if (!match('[') && !match('.')) {
- throwUnexpectedToken(lookahead);
- }
- } else {
- expr = inheritCoverGrammar(matchKeyword('new') ? parseNewExpression : parsePrimaryExpression);
- }
-
- for (;;) {
- if (match('[')) {
- isBindingElement = false;
- isAssignmentTarget = true;
- property = parseComputedMember();
- expr = new WrappingNode(startToken).finishMemberExpression('[', expr, property);
- } else if (match('.')) {
- isBindingElement = false;
- isAssignmentTarget = true;
- property = parseNonComputedMember();
- expr = new WrappingNode(startToken).finishMemberExpression('.', expr, property);
- } else if (lookahead.type === Token.Template && lookahead.head) {
- quasi = parseTemplateLiteral();
- expr = new WrappingNode(startToken).finishTaggedTemplateExpression(expr, quasi);
- } else {
- break;
- }
- }
- return expr;
- }
-
- // ECMA-262 12.4 Postfix Expressions
-
- function parsePostfixExpression() {
- var expr, token, startToken = lookahead;
-
- expr = inheritCoverGrammar(parseLeftHandSideExpressionAllowCall);
-
- if (!hasLineTerminator && lookahead.type === Token.Punctuator) {
- if (match('++') || match('--')) {
- // ECMA-262 11.3.1, 11.3.2
- if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {
- tolerateError(Messages.StrictLHSPostfix);
- }
-
- if (!isAssignmentTarget) {
- tolerateError(Messages.InvalidLHSInAssignment);
- }
-
- isAssignmentTarget = isBindingElement = false;
-
- token = lex();
- expr = new WrappingNode(startToken).finishPostfixExpression(token.value, expr);
- }
- }
-
- return expr;
- }
-
- // ECMA-262 12.5 Unary Operators
-
- function parseUnaryExpression() {
- var token, expr, startToken;
-
- if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) {
- expr = parsePostfixExpression();
- } else if (match('++') || match('--')) {
- startToken = lookahead;
- token = lex();
- expr = inheritCoverGrammar(parseUnaryExpression);
- // ECMA-262 11.4.4, 11.4.5
- if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {
- tolerateError(Messages.StrictLHSPrefix);
- }
-
- if (!isAssignmentTarget) {
- tolerateError(Messages.InvalidLHSInAssignment);
- }
- expr = new WrappingNode(startToken).finishUnaryExpression(token.value, expr);
- isAssignmentTarget = isBindingElement = false;
- } else if (match('+') || match('-') || match('~') || match('!')) {
- startToken = lookahead;
- token = lex();
- expr = inheritCoverGrammar(parseUnaryExpression);
- expr = new WrappingNode(startToken).finishUnaryExpression(token.value, expr);
- isAssignmentTarget = isBindingElement = false;
- } else if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) {
- startToken = lookahead;
- token = lex();
- expr = inheritCoverGrammar(parseUnaryExpression);
- expr = new WrappingNode(startToken).finishUnaryExpression(token.value, expr);
- if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) {
- tolerateError(Messages.StrictDelete);
- }
- isAssignmentTarget = isBindingElement = false;
- } else {
- expr = parsePostfixExpression();
- }
-
- return expr;
- }
-
- function binaryPrecedence(token, allowIn) {
- var prec = 0;
-
- if (token.type !== Token.Punctuator && token.type !== Token.Keyword) {
- return 0;
- }
-
- switch (token.value) {
- case '||':
- prec = 1;
- break;
-
- case '&&':
- prec = 2;
- break;
-
- case '|':
- prec = 3;
- break;
-
- case '^':
- prec = 4;
- break;
-
- case '&':
- prec = 5;
- break;
-
- case '==':
- case '!=':
- case '===':
- case '!==':
- prec = 6;
- break;
-
- case '<':
- case '>':
- case '<=':
- case '>=':
- case 'instanceof':
- prec = 7;
- break;
-
- case 'in':
- prec = allowIn ? 7 : 0;
- break;
-
- case '<<':
- case '>>':
- case '>>>':
- prec = 8;
- break;
-
- case '+':
- case '-':
- prec = 9;
- break;
-
- case '*':
- case '/':
- case '%':
- prec = 11;
- break;
-
- default:
- break;
- }
-
- return prec;
- }
-
- // ECMA-262 12.6 Multiplicative Operators
- // ECMA-262 12.7 Additive Operators
- // ECMA-262 12.8 Bitwise Shift Operators
- // ECMA-262 12.9 Relational Operators
- // ECMA-262 12.10 Equality Operators
- // ECMA-262 12.11 Binary Bitwise Operators
- // ECMA-262 12.12 Binary Logical Operators
-
- function parseBinaryExpression() {
- var marker, markers, expr, token, prec, stack, right, operator, left, i;
-
- marker = lookahead;
- left = inheritCoverGrammar(parseUnaryExpression);
-
- token = lookahead;
- prec = binaryPrecedence(token, state.allowIn);
- if (prec === 0) {
- return left;
- }
- isAssignmentTarget = isBindingElement = false;
- token.prec = prec;
- lex();
-
- markers = [marker, lookahead];
- right = isolateCoverGrammar(parseUnaryExpression);
-
- stack = [left, token, right];
-
- while ((prec = binaryPrecedence(lookahead, state.allowIn)) > 0) {
-
- // Reduce: make a binary expression from the three topmost entries.
- while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) {
- right = stack.pop();
- operator = stack.pop().value;
- left = stack.pop();
- markers.pop();
- expr = new WrappingNode(markers[markers.length - 1]).finishBinaryExpression(operator, left, right);
- stack.push(expr);
- }
-
- // Shift.
- token = lex();
- token.prec = prec;
- stack.push(token);
- markers.push(lookahead);
- expr = isolateCoverGrammar(parseUnaryExpression);
- stack.push(expr);
- }
-
- // Final reduce to clean-up the stack.
- i = stack.length - 1;
- expr = stack[i];
- markers.pop();
- while (i > 1) {
- expr = new WrappingNode(markers.pop()).finishBinaryExpression(stack[i - 1].value, stack[i - 2], expr);
- i -= 2;
- }
-
- return expr;
- }
-
-
- // ECMA-262 12.13 Conditional Operator
-
- function parseConditionalExpression() {
- var expr, previousAllowIn, consequent, alternate, startToken;
-
- startToken = lookahead;
-
- expr = inheritCoverGrammar(parseBinaryExpression);
- if (match('?')) {
- lex();
- previousAllowIn = state.allowIn;
- state.allowIn = true;
- consequent = isolateCoverGrammar(parseAssignmentExpression);
- state.allowIn = previousAllowIn;
- expect(':');
- alternate = isolateCoverGrammar(parseAssignmentExpression);
-
- expr = new WrappingNode(startToken).finishConditionalExpression(expr, consequent, alternate);
- isAssignmentTarget = isBindingElement = false;
- }
-
- return expr;
- }
-
- // ECMA-262 14.2 Arrow Function Definitions
-
- function parseConciseBody() {
- if (match('{')) {
- return parseFunctionSourceElements();
- }
- return isolateCoverGrammar(parseAssignmentExpression);
- }
-
- function checkPatternParam(options, param) {
- var i;
- switch (param.type) {
- case Syntax.Identifier:
- validateParam(options, param, param.name);
- break;
- case Syntax.RestElement:
- checkPatternParam(options, param.argument);
- break;
- case Syntax.AssignmentPattern:
- checkPatternParam(options, param.left);
- break;
- case Syntax.ArrayPattern:
- for (i = 0; i < param.elements.length; i++) {
- if (param.elements[i] !== null) {
- checkPatternParam(options, param.elements[i]);
- }
- }
- break;
- case Syntax.YieldExpression:
- break;
- default:
- assert(param.type === Syntax.ObjectPattern, 'Invalid type');
- for (i = 0; i < param.properties.length; i++) {
- checkPatternParam(options, param.properties[i].value);
- }
- break;
- }
- }
- function reinterpretAsCoverFormalsList(expr) {
- var i, len, param, params, defaults, defaultCount, options, token;
-
- defaults = [];
- defaultCount = 0;
- params = [expr];
-
- switch (expr.type) {
- case Syntax.Identifier:
- break;
- case PlaceHolders.ArrowParameterPlaceHolder:
- params = expr.params;
- break;
- default:
- return null;
- }
-
- options = {
- paramSet: {}
- };
-
- for (i = 0, len = params.length; i < len; i += 1) {
- param = params[i];
- switch (param.type) {
- case Syntax.AssignmentPattern:
- params[i] = param.left;
- if (param.right.type === Syntax.YieldExpression) {
- if (param.right.argument) {
- throwUnexpectedToken(lookahead);
- }
- param.right.type = Syntax.Identifier;
- param.right.name = 'yield';
- delete param.right.argument;
- delete param.right.delegate;
- }
- defaults.push(param.right);
- ++defaultCount;
- checkPatternParam(options, param.left);
- break;
- default:
- checkPatternParam(options, param);
- params[i] = param;
- defaults.push(null);
- break;
- }
- }
-
- if (strict || !state.allowYield) {
- for (i = 0, len = params.length; i < len; i += 1) {
- param = params[i];
- if (param.type === Syntax.YieldExpression) {
- throwUnexpectedToken(lookahead);
- }
- }
- }
-
- if (options.message === Messages.StrictParamDupe) {
- token = strict ? options.stricted : options.firstRestricted;
- throwUnexpectedToken(token, options.message);
- }
-
- if (defaultCount === 0) {
- defaults = [];
- }
-
- return {
- params: params,
- defaults: defaults,
- stricted: options.stricted,
- firstRestricted: options.firstRestricted,
- message: options.message
- };
- }
-
- function parseArrowFunctionExpression(options, node) {
- var previousStrict, previousAllowYield, body;
-
- if (hasLineTerminator) {
- tolerateUnexpectedToken(lookahead);
- }
- expect('=>');
-
- previousStrict = strict;
- previousAllowYield = state.allowYield;
- state.allowYield = true;
-
- body = parseConciseBody();
-
- if (strict && options.firstRestricted) {
- throwUnexpectedToken(options.firstRestricted, options.message);
- }
- if (strict && options.stricted) {
- tolerateUnexpectedToken(options.stricted, options.message);
- }
-
- strict = previousStrict;
- state.allowYield = previousAllowYield;
-
- return node.finishArrowFunctionExpression(options.params, options.defaults, body, body.type !== Syntax.BlockStatement);
- }
-
- // ECMA-262 14.4 Yield expression
-
- function parseYieldExpression() {
- var argument, expr, delegate, previousAllowYield;
-
- argument = null;
- expr = new Node();
- delegate = false;
-
- expectKeyword('yield');
-
- if (!hasLineTerminator) {
- previousAllowYield = state.allowYield;
- state.allowYield = false;
- delegate = match('*');
- if (delegate) {
- lex();
- argument = parseAssignmentExpression();
- } else {
- if (!match(';') && !match('}') && !match(')') && lookahead.type !== Token.EOF) {
- argument = parseAssignmentExpression();
- }
- }
- state.allowYield = previousAllowYield;
- }
-
- return expr.finishYieldExpression(argument, delegate);
- }
-
- // ECMA-262 12.14 Assignment Operators
-
- function parseAssignmentExpression() {
- var token, expr, right, list, startToken;
-
- startToken = lookahead;
- token = lookahead;
-
- if (!state.allowYield && matchKeyword('yield')) {
- return parseYieldExpression();
- }
-
- expr = parseConditionalExpression();
-
- if (expr.type === PlaceHolders.ArrowParameterPlaceHolder || match('=>')) {
- isAssignmentTarget = isBindingElement = false;
- list = reinterpretAsCoverFormalsList(expr);
-
- if (list) {
- firstCoverInitializedNameError = null;
- return parseArrowFunctionExpression(list, new WrappingNode(startToken));
- }
-
- return expr;
- }
-
- if (matchAssign()) {
- if (!isAssignmentTarget) {
- tolerateError(Messages.InvalidLHSInAssignment);
- }
-
- // ECMA-262 12.1.1
- if (strict && expr.type === Syntax.Identifier) {
- if (isRestrictedWord(expr.name)) {
- tolerateUnexpectedToken(token, Messages.StrictLHSAssignment);
- }
- if (isStrictModeReservedWord(expr.name)) {
- tolerateUnexpectedToken(token, Messages.StrictReservedWord);
- }
- }
-
- if (!match('=')) {
- isAssignmentTarget = isBindingElement = false;
- } else {
- reinterpretExpressionAsPattern(expr);
- }
-
- token = lex();
- right = isolateCoverGrammar(parseAssignmentExpression);
- expr = new WrappingNode(startToken).finishAssignmentExpression(token.value, expr, right);
- firstCoverInitializedNameError = null;
- }
-
- return expr;
- }
-
- // ECMA-262 12.15 Comma Operator
-
- function parseExpression() {
- var expr, startToken = lookahead, expressions;
-
- expr = isolateCoverGrammar(parseAssignmentExpression);
-
- if (match(',')) {
- expressions = [expr];
-
- while (startIndex < length) {
- if (!match(',')) {
- break;
- }
- lex();
- expressions.push(isolateCoverGrammar(parseAssignmentExpression));
- }
-
- expr = new WrappingNode(startToken).finishSequenceExpression(expressions);
- }
-
- return expr;
- }
-
- // ECMA-262 13.2 Block
-
- function parseStatementListItem() {
- if (lookahead.type === Token.Keyword) {
- switch (lookahead.value) {
- case 'export':
- if (state.sourceType !== 'module') {
- tolerateUnexpectedToken(lookahead, Messages.IllegalExportDeclaration);
- }
- return parseExportDeclaration();
- case 'import':
- if (state.sourceType !== 'module') {
- tolerateUnexpectedToken(lookahead, Messages.IllegalImportDeclaration);
- }
- return parseImportDeclaration();
- case 'const':
- return parseLexicalDeclaration({inFor: false});
- case 'function':
- return parseFunctionDeclaration(new Node());
- case 'class':
- return parseClassDeclaration();
- }
- }
-
- if (matchKeyword('let') && isLexicalDeclaration()) {
- return parseLexicalDeclaration({inFor: false});
- }
-
- return parseStatement();
- }
-
- function parseStatementList() {
- var list = [];
- while (startIndex < length) {
- if (match('}')) {
- break;
- }
- list.push(parseStatementListItem());
- }
-
- return list;
- }
-
- function parseBlock() {
- var block, node = new Node();
-
- expect('{');
-
- block = parseStatementList();
-
- expect('}');
-
- return node.finishBlockStatement(block);
- }
-
- // ECMA-262 13.3.2 Variable Statement
-
- function parseVariableIdentifier(kind) {
- var token, node = new Node();
-
- token = lex();
-
- if (token.type === Token.Keyword && token.value === 'yield') {
- if (strict) {
- tolerateUnexpectedToken(token, Messages.StrictReservedWord);
- } if (!state.allowYield) {
- throwUnexpectedToken(token);
- }
- } else if (token.type !== Token.Identifier) {
- if (strict && token.type === Token.Keyword && isStrictModeReservedWord(token.value)) {
- tolerateUnexpectedToken(token, Messages.StrictReservedWord);
- } else {
- if (strict || token.value !== 'let' || kind !== 'var') {
- throwUnexpectedToken(token);
- }
- }
- } else if (state.sourceType === 'module' && token.type === Token.Identifier && token.value === 'await') {
- tolerateUnexpectedToken(token);
- }
-
- return node.finishIdentifier(token.value);
- }
-
- function parseVariableDeclaration(options) {
- var init = null, id, node = new Node(), params = [];
-
- id = parsePattern(params, 'var');
-
- // ECMA-262 12.2.1
- if (strict && isRestrictedWord(id.name)) {
- tolerateError(Messages.StrictVarName);
- }
-
- if (match('=')) {
- lex();
- init = isolateCoverGrammar(parseAssignmentExpression);
- } else if (id.type !== Syntax.Identifier && !options.inFor) {
- expect('=');
- }
-
- return node.finishVariableDeclarator(id, init);
- }
-
- function parseVariableDeclarationList(options) {
- var opt, list;
-
- opt = { inFor: options.inFor };
- list = [parseVariableDeclaration(opt)];
-
- while (match(',')) {
- lex();
- list.push(parseVariableDeclaration(opt));
- }
-
- return list;
- }
-
- function parseVariableStatement(node) {
- var declarations;
-
- expectKeyword('var');
-
- declarations = parseVariableDeclarationList({ inFor: false });
-
- consumeSemicolon();
-
- return node.finishVariableDeclaration(declarations);
- }
-
- // ECMA-262 13.3.1 Let and Const Declarations
-
- function parseLexicalBinding(kind, options) {
- var init = null, id, node = new Node(), params = [];
-
- id = parsePattern(params, kind);
-
- // ECMA-262 12.2.1
- if (strict && id.type === Syntax.Identifier && isRestrictedWord(id.name)) {
- tolerateError(Messages.StrictVarName);
- }
-
- if (kind === 'const') {
- if (!matchKeyword('in') && !matchContextualKeyword('of')) {
- expect('=');
- init = isolateCoverGrammar(parseAssignmentExpression);
- }
- } else if ((!options.inFor && id.type !== Syntax.Identifier) || match('=')) {
- expect('=');
- init = isolateCoverGrammar(parseAssignmentExpression);
- }
-
- return node.finishVariableDeclarator(id, init);
- }
-
- function parseBindingList(kind, options) {
- var list = [parseLexicalBinding(kind, options)];
-
- while (match(',')) {
- lex();
- list.push(parseLexicalBinding(kind, options));
- }
-
- return list;
- }
-
-
- function tokenizerState() {
- return {
- index: index,
- lineNumber: lineNumber,
- lineStart: lineStart,
- hasLineTerminator: hasLineTerminator,
- lastIndex: lastIndex,
- lastLineNumber: lastLineNumber,
- lastLineStart: lastLineStart,
- startIndex: startIndex,
- startLineNumber: startLineNumber,
- startLineStart: startLineStart,
- lookahead: lookahead,
- tokenCount: extra.tokens ? extra.tokens.length : 0
- };
- }
-
- function resetTokenizerState(ts) {
- index = ts.index;
- lineNumber = ts.lineNumber;
- lineStart = ts.lineStart;
- hasLineTerminator = ts.hasLineTerminator;
- lastIndex = ts.lastIndex;
- lastLineNumber = ts.lastLineNumber;
- lastLineStart = ts.lastLineStart;
- startIndex = ts.startIndex;
- startLineNumber = ts.startLineNumber;
- startLineStart = ts.startLineStart;
- lookahead = ts.lookahead;
- if (extra.tokens) {
- extra.tokens.splice(ts.tokenCount, extra.tokens.length);
- }
- }
-
- function isLexicalDeclaration() {
- var lexical, ts;
-
- ts = tokenizerState();
-
- lex();
- lexical = (lookahead.type === Token.Identifier) || match('[') || match('{') ||
- matchKeyword('let') || matchKeyword('yield');
-
- resetTokenizerState(ts);
-
- return lexical;
- }
-
- function parseLexicalDeclaration(options) {
- var kind, declarations, node = new Node();
-
- kind = lex().value;
- assert(kind === 'let' || kind === 'const', 'Lexical declaration must be either let or const');
-
- declarations = parseBindingList(kind, options);
-
- consumeSemicolon();
-
- return node.finishLexicalDeclaration(declarations, kind);
- }
-
- function parseRestElement(params) {
- var param, node = new Node();
-
- lex();
-
- if (match('{')) {
- throwError(Messages.ObjectPatternAsRestParameter);
- }
-
- params.push(lookahead);
-
- param = parseVariableIdentifier();
-
- if (match('=')) {
- throwError(Messages.DefaultRestParameter);
- }
-
- if (!match(')')) {
- throwError(Messages.ParameterAfterRestParameter);
- }
-
- return node.finishRestElement(param);
- }
-
- // ECMA-262 13.4 Empty Statement
-
- function parseEmptyStatement(node) {
- expect(';');
- return node.finishEmptyStatement();
- }
-
- // ECMA-262 12.4 Expression Statement
-
- function parseExpressionStatement(node) {
- var expr = parseExpression();
- consumeSemicolon();
- return node.finishExpressionStatement(expr);
- }
-
- // ECMA-262 13.6 If statement
-
- function parseIfStatement(node) {
- var test, consequent, alternate;
-
- expectKeyword('if');
-
- expect('(');
-
- test = parseExpression();
-
- expect(')');
-
- consequent = parseStatement();
-
- if (matchKeyword('else')) {
- lex();
- alternate = parseStatement();
- } else {
- alternate = null;
- }
-
- return node.finishIfStatement(test, consequent, alternate);
- }
-
- // ECMA-262 13.7 Iteration Statements
-
- function parseDoWhileStatement(node) {
- var body, test, oldInIteration;
-
- expectKeyword('do');
-
- oldInIteration = state.inIteration;
- state.inIteration = true;
-
- body = parseStatement();
-
- state.inIteration = oldInIteration;
-
- expectKeyword('while');
-
- expect('(');
-
- test = parseExpression();
-
- expect(')');
-
- if (match(';')) {
- lex();
- }
-
- return node.finishDoWhileStatement(body, test);
- }
-
- function parseWhileStatement(node) {
- var test, body, oldInIteration;
-
- expectKeyword('while');
-
- expect('(');
-
- test = parseExpression();
-
- expect(')');
-
- oldInIteration = state.inIteration;
- state.inIteration = true;
-
- body = parseStatement();
-
- state.inIteration = oldInIteration;
-
- return node.finishWhileStatement(test, body);
- }
-
- function parseForStatement(node) {
- var init, forIn, initSeq, initStartToken, test, update, left, right, kind, declarations,
- body, oldInIteration, previousAllowIn = state.allowIn;
-
- init = test = update = null;
- forIn = true;
-
- expectKeyword('for');
-
- expect('(');
-
- if (match(';')) {
- lex();
- } else {
- if (matchKeyword('var')) {
- init = new Node();
- lex();
-
- state.allowIn = false;
- declarations = parseVariableDeclarationList({ inFor: true });
- state.allowIn = previousAllowIn;
-
- if (declarations.length === 1 && matchKeyword('in')) {
- init = init.finishVariableDeclaration(declarations);
- lex();
- left = init;
- right = parseExpression();
- init = null;
- } else if (declarations.length === 1 && declarations[0].init === null && matchContextualKeyword('of')) {
- init = init.finishVariableDeclaration(declarations);
- lex();
- left = init;
- right = parseAssignmentExpression();
- init = null;
- forIn = false;
- } else {
- init = init.finishVariableDeclaration(declarations);
- expect(';');
- }
- } else if (matchKeyword('const') || matchKeyword('let')) {
- init = new Node();
- kind = lex().value;
-
- if (!strict && lookahead.value === 'in') {
- init = init.finishIdentifier(kind);
- lex();
- left = init;
- right = parseExpression();
- init = null;
- } else {
- state.allowIn = false;
- declarations = parseBindingList(kind, {inFor: true});
- state.allowIn = previousAllowIn;
-
- if (declarations.length === 1 && declarations[0].init === null && matchKeyword('in')) {
- init = init.finishLexicalDeclaration(declarations, kind);
- lex();
- left = init;
- right = parseExpression();
- init = null;
- } else if (declarations.length === 1 && declarations[0].init === null && matchContextualKeyword('of')) {
- init = init.finishLexicalDeclaration(declarations, kind);
- lex();
- left = init;
- right = parseAssignmentExpression();
- init = null;
- forIn = false;
- } else {
- consumeSemicolon();
- init = init.finishLexicalDeclaration(declarations, kind);
- }
- }
- } else {
- initStartToken = lookahead;
- state.allowIn = false;
- init = inheritCoverGrammar(parseAssignmentExpression);
- state.allowIn = previousAllowIn;
-
- if (matchKeyword('in')) {
- if (!isAssignmentTarget) {
- tolerateError(Messages.InvalidLHSInForIn);
- }
-
- lex();
- reinterpretExpressionAsPattern(init);
- left = init;
- right = parseExpression();
- init = null;
- } else if (matchContextualKeyword('of')) {
- if (!isAssignmentTarget) {
- tolerateError(Messages.InvalidLHSInForLoop);
- }
-
- lex();
- reinterpretExpressionAsPattern(init);
- left = init;
- right = parseAssignmentExpression();
- init = null;
- forIn = false;
- } else {
- if (match(',')) {
- initSeq = [init];
- while (match(',')) {
- lex();
- initSeq.push(isolateCoverGrammar(parseAssignmentExpression));
- }
- init = new WrappingNode(initStartToken).finishSequenceExpression(initSeq);
- }
- expect(';');
- }
- }
- }
-
- if (typeof left === 'undefined') {
-
- if (!match(';')) {
- test = parseExpression();
- }
- expect(';');
-
- if (!match(')')) {
- update = parseExpression();
- }
- }
-
- expect(')');
-
- oldInIteration = state.inIteration;
- state.inIteration = true;
-
- body = isolateCoverGrammar(parseStatement);
-
- state.inIteration = oldInIteration;
-
- return (typeof left === 'undefined') ?
- node.finishForStatement(init, test, update, body) :
- forIn ? node.finishForInStatement(left, right, body) :
- node.finishForOfStatement(left, right, body);
- }
-
- // ECMA-262 13.8 The continue statement
-
- function parseContinueStatement(node) {
- var label = null, key;
-
- expectKeyword('continue');
-
- // Optimize the most common form: 'continue;'.
- if (source.charCodeAt(startIndex) === 0x3B) {
- lex();
-
- if (!state.inIteration) {
- throwError(Messages.IllegalContinue);
- }
-
- return node.finishContinueStatement(null);
- }
-
- if (hasLineTerminator) {
- if (!state.inIteration) {
- throwError(Messages.IllegalContinue);
- }
-
- return node.finishContinueStatement(null);
- }
-
- if (lookahead.type === Token.Identifier) {
- label = parseVariableIdentifier();
-
- key = '$' + label.name;
- if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) {
- throwError(Messages.UnknownLabel, label.name);
- }
- }
-
- consumeSemicolon();
-
- if (label === null && !state.inIteration) {
- throwError(Messages.IllegalContinue);
- }
-
- return node.finishContinueStatement(label);
- }
-
- // ECMA-262 13.9 The break statement
-
- function parseBreakStatement(node) {
- var label = null, key;
-
- expectKeyword('break');
-
- // Catch the very common case first: immediately a semicolon (U+003B).
- if (source.charCodeAt(lastIndex) === 0x3B) {
- lex();
-
- if (!(state.inIteration || state.inSwitch)) {
- throwError(Messages.IllegalBreak);
- }
-
- return node.finishBreakStatement(null);
- }
-
- if (hasLineTerminator) {
- if (!(state.inIteration || state.inSwitch)) {
- throwError(Messages.IllegalBreak);
- }
- } else if (lookahead.type === Token.Identifier) {
- label = parseVariableIdentifier();
-
- key = '$' + label.name;
- if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) {
- throwError(Messages.UnknownLabel, label.name);
- }
- }
-
- consumeSemicolon();
-
- if (label === null && !(state.inIteration || state.inSwitch)) {
- throwError(Messages.IllegalBreak);
- }
-
- return node.finishBreakStatement(label);
- }
-
- // ECMA-262 13.10 The return statement
-
- function parseReturnStatement(node) {
- var argument = null;
-
- expectKeyword('return');
-
- if (!state.inFunctionBody) {
- tolerateError(Messages.IllegalReturn);
- }
-
- // 'return' followed by a space and an identifier is very common.
- if (source.charCodeAt(lastIndex) === 0x20) {
- if (isIdentifierStart(source.charCodeAt(lastIndex + 1))) {
- argument = parseExpression();
- consumeSemicolon();
- return node.finishReturnStatement(argument);
- }
- }
-
- if (hasLineTerminator) {
- // HACK
- return node.finishReturnStatement(null);
- }
-
- if (!match(';')) {
- if (!match('}') && lookahead.type !== Token.EOF) {
- argument = parseExpression();
- }
- }
-
- consumeSemicolon();
-
- return node.finishReturnStatement(argument);
- }
-
- // ECMA-262 13.11 The with statement
-
- function parseWithStatement(node) {
- var object, body;
-
- if (strict) {
- tolerateError(Messages.StrictModeWith);
- }
-
- expectKeyword('with');
-
- expect('(');
-
- object = parseExpression();
-
- expect(')');
-
- body = parseStatement();
-
- return node.finishWithStatement(object, body);
- }
-
- // ECMA-262 13.12 The switch statement
-
- function parseSwitchCase() {
- var test, consequent = [], statement, node = new Node();
-
- if (matchKeyword('default')) {
- lex();
- test = null;
- } else {
- expectKeyword('case');
- test = parseExpression();
- }
- expect(':');
-
- while (startIndex < length) {
- if (match('}') || matchKeyword('default') || matchKeyword('case')) {
- break;
- }
- statement = parseStatementListItem();
- consequent.push(statement);
- }
-
- return node.finishSwitchCase(test, consequent);
- }
-
- function parseSwitchStatement(node) {
- var discriminant, cases, clause, oldInSwitch, defaultFound;
-
- expectKeyword('switch');
-
- expect('(');
-
- discriminant = parseExpression();
-
- expect(')');
-
- expect('{');
-
- cases = [];
-
- if (match('}')) {
- lex();
- return node.finishSwitchStatement(discriminant, cases);
- }
-
- oldInSwitch = state.inSwitch;
- state.inSwitch = true;
- defaultFound = false;
-
- while (startIndex < length) {
- if (match('}')) {
- break;
- }
- clause = parseSwitchCase();
- if (clause.test === null) {
- if (defaultFound) {
- throwError(Messages.MultipleDefaultsInSwitch);
- }
- defaultFound = true;
- }
- cases.push(clause);
- }
-
- state.inSwitch = oldInSwitch;
-
- expect('}');
-
- return node.finishSwitchStatement(discriminant, cases);
- }
-
- // ECMA-262 13.14 The throw statement
-
- function parseThrowStatement(node) {
- var argument;
-
- expectKeyword('throw');
-
- if (hasLineTerminator) {
- throwError(Messages.NewlineAfterThrow);
- }
-
- argument = parseExpression();
-
- consumeSemicolon();
-
- return node.finishThrowStatement(argument);
- }
-
- // ECMA-262 13.15 The try statement
-
- function parseCatchClause() {
- var param, params = [], paramMap = {}, key, i, body, node = new Node();
-
- expectKeyword('catch');
-
- expect('(');
- if (match(')')) {
- throwUnexpectedToken(lookahead);
- }
-
- param = parsePattern(params);
- for (i = 0; i < params.length; i++) {
- key = '$' + params[i].value;
- if (Object.prototype.hasOwnProperty.call(paramMap, key)) {
- tolerateError(Messages.DuplicateBinding, params[i].value);
- }
- paramMap[key] = true;
- }
-
- // ECMA-262 12.14.1
- if (strict && isRestrictedWord(param.name)) {
- tolerateError(Messages.StrictCatchVariable);
- }
-
- expect(')');
- body = parseBlock();
- return node.finishCatchClause(param, body);
- }
-
- function parseTryStatement(node) {
- var block, handler = null, finalizer = null;
-
- expectKeyword('try');
-
- block = parseBlock();
-
- if (matchKeyword('catch')) {
- handler = parseCatchClause();
- }
-
- if (matchKeyword('finally')) {
- lex();
- finalizer = parseBlock();
- }
-
- if (!handler && !finalizer) {
- throwError(Messages.NoCatchOrFinally);
- }
-
- return node.finishTryStatement(block, handler, finalizer);
- }
-
- // ECMA-262 13.16 The debugger statement
-
- function parseDebuggerStatement(node) {
- expectKeyword('debugger');
-
- consumeSemicolon();
-
- return node.finishDebuggerStatement();
- }
-
- // 13 Statements
-
- function parseStatement() {
- var type = lookahead.type,
- expr,
- labeledBody,
- key,
- node;
-
- if (type === Token.EOF) {
- throwUnexpectedToken(lookahead);
- }
-
- if (type === Token.Punctuator && lookahead.value === '{') {
- return parseBlock();
- }
- isAssignmentTarget = isBindingElement = true;
- node = new Node();
-
- if (type === Token.Punctuator) {
- switch (lookahead.value) {
- case ';':
- return parseEmptyStatement(node);
- case '(':
- return parseExpressionStatement(node);
- default:
- break;
- }
- } else if (type === Token.Keyword) {
- switch (lookahead.value) {
- case 'break':
- return parseBreakStatement(node);
- case 'continue':
- return parseContinueStatement(node);
- case 'debugger':
- return parseDebuggerStatement(node);
- case 'do':
- return parseDoWhileStatement(node);
- case 'for':
- return parseForStatement(node);
- case 'function':
- return parseFunctionDeclaration(node);
- case 'if':
- return parseIfStatement(node);
- case 'return':
- return parseReturnStatement(node);
- case 'switch':
- return parseSwitchStatement(node);
- case 'throw':
- return parseThrowStatement(node);
- case 'try':
- return parseTryStatement(node);
- case 'var':
- return parseVariableStatement(node);
- case 'while':
- return parseWhileStatement(node);
- case 'with':
- return parseWithStatement(node);
- default:
- break;
- }
- }
-
- expr = parseExpression();
-
- // ECMA-262 12.12 Labelled Statements
- if ((expr.type === Syntax.Identifier) && match(':')) {
- lex();
-
- key = '$' + expr.name;
- if (Object.prototype.hasOwnProperty.call(state.labelSet, key)) {
- throwError(Messages.Redeclaration, 'Label', expr.name);
- }
-
- state.labelSet[key] = true;
- labeledBody = parseStatement();
- delete state.labelSet[key];
- return node.finishLabeledStatement(expr, labeledBody);
- }
-
- consumeSemicolon();
-
- return node.finishExpressionStatement(expr);
- }
-
- // ECMA-262 14.1 Function Definition
-
- function parseFunctionSourceElements() {
- var statement, body = [], token, directive, firstRestricted,
- oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody,
- node = new Node();
-
- expect('{');
-
- while (startIndex < length) {
- if (lookahead.type !== Token.StringLiteral) {
- break;
- }
- token = lookahead;
-
- statement = parseStatementListItem();
- body.push(statement);
- if (statement.expression.type !== Syntax.Literal) {
- // this is not directive
- break;
- }
- directive = source.slice(token.start + 1, token.end - 1);
- if (directive === 'use strict') {
- strict = true;
- if (firstRestricted) {
- tolerateUnexpectedToken(firstRestricted, Messages.StrictOctalLiteral);
- }
- } else {
- if (!firstRestricted && token.octal) {
- firstRestricted = token;
- }
- }
- }
-
- oldLabelSet = state.labelSet;
- oldInIteration = state.inIteration;
- oldInSwitch = state.inSwitch;
- oldInFunctionBody = state.inFunctionBody;
-
- state.labelSet = {};
- state.inIteration = false;
- state.inSwitch = false;
- state.inFunctionBody = true;
-
- while (startIndex < length) {
- if (match('}')) {
- break;
- }
- body.push(parseStatementListItem());
- }
-
- expect('}');
-
- state.labelSet = oldLabelSet;
- state.inIteration = oldInIteration;
- state.inSwitch = oldInSwitch;
- state.inFunctionBody = oldInFunctionBody;
-
- return node.finishBlockStatement(body);
- }
-
- function validateParam(options, param, name) {
- var key = '$' + name;
- if (strict) {
- if (isRestrictedWord(name)) {
- options.stricted = param;
- options.message = Messages.StrictParamName;
- }
- if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) {
- options.stricted = param;
- options.message = Messages.StrictParamDupe;
- }
- } else if (!options.firstRestricted) {
- if (isRestrictedWord(name)) {
- options.firstRestricted = param;
- options.message = Messages.StrictParamName;
- } else if (isStrictModeReservedWord(name)) {
- options.firstRestricted = param;
- options.message = Messages.StrictReservedWord;
- } else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) {
- options.stricted = param;
- options.message = Messages.StrictParamDupe;
- }
- }
- options.paramSet[key] = true;
- }
-
- function parseParam(options) {
- var token, param, params = [], i, def;
-
- token = lookahead;
- if (token.value === '...') {
- param = parseRestElement(params);
- validateParam(options, param.argument, param.argument.name);
- options.params.push(param);
- options.defaults.push(null);
- return false;
- }
-
- param = parsePatternWithDefault(params);
- for (i = 0; i < params.length; i++) {
- validateParam(options, params[i], params[i].value);
- }
-
- if (param.type === Syntax.AssignmentPattern) {
- def = param.right;
- param = param.left;
- ++options.defaultCount;
- }
-
- options.params.push(param);
- options.defaults.push(def);
-
- return !match(')');
- }
-
- function parseParams(firstRestricted) {
- var options;
-
- options = {
- params: [],
- defaultCount: 0,
- defaults: [],
- firstRestricted: firstRestricted
- };
-
- expect('(');
-
- if (!match(')')) {
- options.paramSet = {};
- while (startIndex < length) {
- if (!parseParam(options)) {
- break;
- }
- expect(',');
- }
- }
-
- expect(')');
-
- if (options.defaultCount === 0) {
- options.defaults = [];
- }
-
- return {
- params: options.params,
- defaults: options.defaults,
- stricted: options.stricted,
- firstRestricted: options.firstRestricted,
- message: options.message
- };
- }
-
- function parseFunctionDeclaration(node, identifierIsOptional) {
- var id = null, params = [], defaults = [], body, token, stricted, tmp, firstRestricted, message, previousStrict,
- isGenerator, previousAllowYield;
-
- previousAllowYield = state.allowYield;
-
- expectKeyword('function');
-
- isGenerator = match('*');
- if (isGenerator) {
- lex();
- }
-
- if (!identifierIsOptional || !match('(')) {
- token = lookahead;
- id = parseVariableIdentifier();
- if (strict) {
- if (isRestrictedWord(token.value)) {
- tolerateUnexpectedToken(token, Messages.StrictFunctionName);
- }
- } else {
- if (isRestrictedWord(token.value)) {
- firstRestricted = token;
- message = Messages.StrictFunctionName;
- } else if (isStrictModeReservedWord(token.value)) {
- firstRestricted = token;
- message = Messages.StrictReservedWord;
- }
- }
- }
-
- state.allowYield = !isGenerator;
- tmp = parseParams(firstRestricted);
- params = tmp.params;
- defaults = tmp.defaults;
- stricted = tmp.stricted;
- firstRestricted = tmp.firstRestricted;
- if (tmp.message) {
- message = tmp.message;
- }
-
-
- previousStrict = strict;
- body = parseFunctionSourceElements();
- if (strict && firstRestricted) {
- throwUnexpectedToken(firstRestricted, message);
- }
- if (strict && stricted) {
- tolerateUnexpectedToken(stricted, message);
- }
-
- strict = previousStrict;
- state.allowYield = previousAllowYield;
-
- return node.finishFunctionDeclaration(id, params, defaults, body, isGenerator);
- }
-
- function parseFunctionExpression() {
- var token, id = null, stricted, firstRestricted, message, tmp,
- params = [], defaults = [], body, previousStrict, node = new Node(),
- isGenerator, previousAllowYield;
-
- previousAllowYield = state.allowYield;
-
- expectKeyword('function');
-
- isGenerator = match('*');
- if (isGenerator) {
- lex();
- }
-
- state.allowYield = !isGenerator;
- if (!match('(')) {
- token = lookahead;
- id = (!strict && !isGenerator && matchKeyword('yield')) ? parseNonComputedProperty() : parseVariableIdentifier();
- if (strict) {
- if (isRestrictedWord(token.value)) {
- tolerateUnexpectedToken(token, Messages.StrictFunctionName);
- }
- } else {
- if (isRestrictedWord(token.value)) {
- firstRestricted = token;
- message = Messages.StrictFunctionName;
- } else if (isStrictModeReservedWord(token.value)) {
- firstRestricted = token;
- message = Messages.StrictReservedWord;
- }
- }
- }
-
- tmp = parseParams(firstRestricted);
- params = tmp.params;
- defaults = tmp.defaults;
- stricted = tmp.stricted;
- firstRestricted = tmp.firstRestricted;
- if (tmp.message) {
- message = tmp.message;
- }
-
- previousStrict = strict;
- body = parseFunctionSourceElements();
- if (strict && firstRestricted) {
- throwUnexpectedToken(firstRestricted, message);
- }
- if (strict && stricted) {
- tolerateUnexpectedToken(stricted, message);
- }
- strict = previousStrict;
- state.allowYield = previousAllowYield;
-
- return node.finishFunctionExpression(id, params, defaults, body, isGenerator);
- }
-
- // ECMA-262 14.5 Class Definitions
-
- function parseClassBody() {
- var classBody, token, isStatic, hasConstructor = false, body, method, computed, key;
-
- classBody = new Node();
-
- expect('{');
- body = [];
- while (!match('}')) {
- if (match(';')) {
- lex();
- } else {
- method = new Node();
- token = lookahead;
- isStatic = false;
- computed = match('[');
- if (match('*')) {
- lex();
- } else {
- key = parseObjectPropertyKey();
- if (key.name === 'static' && (lookaheadPropertyName() || match('*'))) {
- token = lookahead;
- isStatic = true;
- computed = match('[');
- if (match('*')) {
- lex();
- } else {
- key = parseObjectPropertyKey();
- }
- }
- }
- method = tryParseMethodDefinition(token, key, computed, method);
- if (method) {
- method['static'] = isStatic; // jscs:ignore requireDotNotation
- if (method.kind === 'init') {
- method.kind = 'method';
- }
- if (!isStatic) {
- if (!method.computed && (method.key.name || method.key.value.toString()) === 'constructor') {
- if (method.kind !== 'method' || !method.method || method.value.generator) {
- throwUnexpectedToken(token, Messages.ConstructorSpecialMethod);
- }
- if (hasConstructor) {
- throwUnexpectedToken(token, Messages.DuplicateConstructor);
- } else {
- hasConstructor = true;
- }
- method.kind = 'constructor';
- }
- } else {
- if (!method.computed && (method.key.name || method.key.value.toString()) === 'prototype') {
- throwUnexpectedToken(token, Messages.StaticPrototype);
- }
- }
- method.type = Syntax.MethodDefinition;
- delete method.method;
- delete method.shorthand;
- body.push(method);
- } else {
- throwUnexpectedToken(lookahead);
- }
- }
- }
- lex();
- return classBody.finishClassBody(body);
- }
-
- function parseClassDeclaration(identifierIsOptional) {
- var id = null, superClass = null, classNode = new Node(), classBody, previousStrict = strict;
- strict = true;
-
- expectKeyword('class');
-
- if (!identifierIsOptional || lookahead.type === Token.Identifier) {
- id = parseVariableIdentifier();
- }
-
- if (matchKeyword('extends')) {
- lex();
- superClass = isolateCoverGrammar(parseLeftHandSideExpressionAllowCall);
- }
- classBody = parseClassBody();
- strict = previousStrict;
-
- return classNode.finishClassDeclaration(id, superClass, classBody);
- }
-
- function parseClassExpression() {
- var id = null, superClass = null, classNode = new Node(), classBody, previousStrict = strict;
- strict = true;
-
- expectKeyword('class');
-
- if (lookahead.type === Token.Identifier) {
- id = parseVariableIdentifier();
- }
-
- if (matchKeyword('extends')) {
- lex();
- superClass = isolateCoverGrammar(parseLeftHandSideExpressionAllowCall);
- }
- classBody = parseClassBody();
- strict = previousStrict;
-
- return classNode.finishClassExpression(id, superClass, classBody);
- }
-
- // ECMA-262 15.2 Modules
-
- function parseModuleSpecifier() {
- var node = new Node();
-
- if (lookahead.type !== Token.StringLiteral) {
- throwError(Messages.InvalidModuleSpecifier);
- }
- return node.finishLiteral(lex());
- }
-
- // ECMA-262 15.2.3 Exports
-
- function parseExportSpecifier() {
- var exported, local, node = new Node(), def;
- if (matchKeyword('default')) {
- // export {default} from 'something';
- def = new Node();
- lex();
- local = def.finishIdentifier('default');
- } else {
- local = parseVariableIdentifier();
- }
- if (matchContextualKeyword('as')) {
- lex();
- exported = parseNonComputedProperty();
- }
- return node.finishExportSpecifier(local, exported);
- }
-
- function parseExportNamedDeclaration(node) {
- var declaration = null,
- isExportFromIdentifier,
- src = null, specifiers = [];
-
- // non-default export
- if (lookahead.type === Token.Keyword) {
- // covers:
- // export var f = 1;
- switch (lookahead.value) {
- case 'let':
- case 'const':
- declaration = parseLexicalDeclaration({inFor: false});
- return node.finishExportNamedDeclaration(declaration, specifiers, null);
- case 'var':
- case 'class':
- case 'function':
- declaration = parseStatementListItem();
- return node.finishExportNamedDeclaration(declaration, specifiers, null);
- }
- }
-
- expect('{');
- while (!match('}')) {
- isExportFromIdentifier = isExportFromIdentifier || matchKeyword('default');
- specifiers.push(parseExportSpecifier());
- if (!match('}')) {
- expect(',');
- if (match('}')) {
- break;
- }
- }
- }
- expect('}');
-
- if (matchContextualKeyword('from')) {
- // covering:
- // export {default} from 'foo';
- // export {foo} from 'foo';
- lex();
- src = parseModuleSpecifier();
- consumeSemicolon();
- } else if (isExportFromIdentifier) {
- // covering:
- // export {default}; // missing fromClause
- throwError(lookahead.value ?
- Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value);
- } else {
- // cover
- // export {foo};
- consumeSemicolon();
- }
- return node.finishExportNamedDeclaration(declaration, specifiers, src);
- }
-
- function parseExportDefaultDeclaration(node) {
- var declaration = null,
- expression = null;
-
- // covers:
- // export default ...
- expectKeyword('default');
-
- if (matchKeyword('function')) {
- // covers:
- // export default function foo () {}
- // export default function () {}
- declaration = parseFunctionDeclaration(new Node(), true);
- return node.finishExportDefaultDeclaration(declaration);
- }
- if (matchKeyword('class')) {
- declaration = parseClassDeclaration(true);
- return node.finishExportDefaultDeclaration(declaration);
- }
-
- if (matchContextualKeyword('from')) {
- throwError(Messages.UnexpectedToken, lookahead.value);
- }
-
- // covers:
- // export default {};
- // export default [];
- // export default (1 + 2);
- if (match('{')) {
- expression = parseObjectInitializer();
- } else if (match('[')) {
- expression = parseArrayInitializer();
- } else {
- expression = parseAssignmentExpression();
- }
- consumeSemicolon();
- return node.finishExportDefaultDeclaration(expression);
- }
-
- function parseExportAllDeclaration(node) {
- var src;
-
- // covers:
- // export * from 'foo';
- expect('*');
- if (!matchContextualKeyword('from')) {
- throwError(lookahead.value ?
- Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value);
- }
- lex();
- src = parseModuleSpecifier();
- consumeSemicolon();
-
- return node.finishExportAllDeclaration(src);
- }
-
- function parseExportDeclaration() {
- var node = new Node();
- if (state.inFunctionBody) {
- throwError(Messages.IllegalExportDeclaration);
- }
-
- expectKeyword('export');
-
- if (matchKeyword('default')) {
- return parseExportDefaultDeclaration(node);
- }
- if (match('*')) {
- return parseExportAllDeclaration(node);
- }
- return parseExportNamedDeclaration(node);
- }
-
- // ECMA-262 15.2.2 Imports
-
- function parseImportSpecifier() {
- // import {<foo as bar>} ...;
- var local, imported, node = new Node();
-
- imported = parseNonComputedProperty();
- if (matchContextualKeyword('as')) {
- lex();
- local = parseVariableIdentifier();
- }
-
- return node.finishImportSpecifier(local, imported);
- }
-
- function parseNamedImports() {
- var specifiers = [];
- // {foo, bar as bas}
- expect('{');
- while (!match('}')) {
- specifiers.push(parseImportSpecifier());
- if (!match('}')) {
- expect(',');
- if (match('}')) {
- break;
- }
- }
- }
- expect('}');
- return specifiers;
- }
-
- function parseImportDefaultSpecifier() {
- // import <foo> ...;
- var local, node = new Node();
-
- local = parseNonComputedProperty();
-
- return node.finishImportDefaultSpecifier(local);
- }
-
- function parseImportNamespaceSpecifier() {
- // import <* as foo> ...;
- var local, node = new Node();
-
- expect('*');
- if (!matchContextualKeyword('as')) {
- throwError(Messages.NoAsAfterImportNamespace);
- }
- lex();
- local = parseNonComputedProperty();
-
- return node.finishImportNamespaceSpecifier(local);
- }
-
- function parseImportDeclaration() {
- var specifiers = [], src, node = new Node();
-
- if (state.inFunctionBody) {
- throwError(Messages.IllegalImportDeclaration);
- }
-
- expectKeyword('import');
-
- if (lookahead.type === Token.StringLiteral) {
- // import 'foo';
- src = parseModuleSpecifier();
- } else {
-
- if (match('{')) {
- // import {bar}
- specifiers = specifiers.concat(parseNamedImports());
- } else if (match('*')) {
- // import * as foo
- specifiers.push(parseImportNamespaceSpecifier());
- } else if (isIdentifierName(lookahead) && !matchKeyword('default')) {
- // import foo
- specifiers.push(parseImportDefaultSpecifier());
- if (match(',')) {
- lex();
- if (match('*')) {
- // import foo, * as foo
- specifiers.push(parseImportNamespaceSpecifier());
- } else if (match('{')) {
- // import foo, {bar}
- specifiers = specifiers.concat(parseNamedImports());
- } else {
- throwUnexpectedToken(lookahead);
- }
- }
- } else {
- throwUnexpectedToken(lex());
- }
-
- if (!matchContextualKeyword('from')) {
- throwError(lookahead.value ?
- Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value);
- }
- lex();
- src = parseModuleSpecifier();
- }
-
- consumeSemicolon();
- return node.finishImportDeclaration(specifiers, src);
- }
-
- // ECMA-262 15.1 Scripts
-
- function parseScriptBody() {
- var statement, body = [], token, directive, firstRestricted;
-
- while (startIndex < length) {
- token = lookahead;
- if (token.type !== Token.StringLiteral) {
- break;
- }
-
- statement = parseStatementListItem();
- body.push(statement);
- if (statement.expression.type !== Syntax.Literal) {
- // this is not directive
- break;
- }
- directive = source.slice(token.start + 1, token.end - 1);
- if (directive === 'use strict') {
- strict = true;
- if (firstRestricted) {
- tolerateUnexpectedToken(firstRestricted, Messages.StrictOctalLiteral);
- }
- } else {
- if (!firstRestricted && token.octal) {
- firstRestricted = token;
- }
- }
- }
-
- while (startIndex < length) {
- statement = parseStatementListItem();
- /* istanbul ignore if */
- if (typeof statement === 'undefined') {
- break;
- }
- body.push(statement);
- }
- return body;
- }
-
- function parseProgram() {
- var body, node;
-
- peek();
- node = new Node();
-
- body = parseScriptBody();
- return node.finishProgram(body, state.sourceType);
- }
-
- function filterTokenLocation() {
- var i, entry, token, tokens = [];
-
- for (i = 0; i < extra.tokens.length; ++i) {
- entry = extra.tokens[i];
- token = {
- type: entry.type,
- value: entry.value
- };
- if (entry.regex) {
- token.regex = {
- pattern: entry.regex.pattern,
- flags: entry.regex.flags
- };
- }
- if (extra.range) {
- token.range = entry.range;
- }
- if (extra.loc) {
- token.loc = entry.loc;
- }
- tokens.push(token);
- }
-
- extra.tokens = tokens;
- }
-
- function tokenize(code, options, delegate) {
- var toString,
- tokens;
-
- toString = String;
- if (typeof code !== 'string' && !(code instanceof String)) {
- code = toString(code);
- }
-
- source = code;
- index = 0;
- lineNumber = (source.length > 0) ? 1 : 0;
- lineStart = 0;
- startIndex = index;
- startLineNumber = lineNumber;
- startLineStart = lineStart;
- length = source.length;
- lookahead = null;
- state = {
- allowIn: true,
- allowYield: true,
- labelSet: {},
- inFunctionBody: false,
- inIteration: false,
- inSwitch: false,
- lastCommentStart: -1,
- curlyStack: []
- };
-
- extra = {};
-
- // Options matching.
- options = options || {};
-
- // Of course we collect tokens here.
- options.tokens = true;
- extra.tokens = [];
- extra.tokenValues = [];
- extra.tokenize = true;
- extra.delegate = delegate;
-
- // The following two fields are necessary to compute the Regex tokens.
- extra.openParenToken = -1;
- extra.openCurlyToken = -1;
-
- extra.range = (typeof options.range === 'boolean') && options.range;
- extra.loc = (typeof options.loc === 'boolean') && options.loc;
-
- if (typeof options.comment === 'boolean' && options.comment) {
- extra.comments = [];
- }
- if (typeof options.tolerant === 'boolean' && options.tolerant) {
- extra.errors = [];
- }
-
- try {
- peek();
- if (lookahead.type === Token.EOF) {
- return extra.tokens;
- }
-
- lex();
- while (lookahead.type !== Token.EOF) {
- try {
- lex();
- } catch (lexError) {
- if (extra.errors) {
- recordError(lexError);
- // We have to break on the first error
- // to avoid infinite loops.
- break;
- } else {
- throw lexError;
- }
- }
- }
-
- tokens = extra.tokens;
- if (typeof extra.errors !== 'undefined') {
- tokens.errors = extra.errors;
- }
- } catch (e) {
- throw e;
- } finally {
- extra = {};
- }
- return tokens;
- }
-
- function parse(code, options) {
- var program, toString;
-
- toString = String;
- if (typeof code !== 'string' && !(code instanceof String)) {
- code = toString(code);
- }
-
- source = code;
- index = 0;
- lineNumber = (source.length > 0) ? 1 : 0;
- lineStart = 0;
- startIndex = index;
- startLineNumber = lineNumber;
- startLineStart = lineStart;
- length = source.length;
- lookahead = null;
- state = {
- allowIn: true,
- allowYield: true,
- labelSet: {},
- inFunctionBody: false,
- inIteration: false,
- inSwitch: false,
- lastCommentStart: -1,
- curlyStack: [],
- sourceType: 'script'
- };
- strict = false;
-
- extra = {};
- if (typeof options !== 'undefined') {
- extra.range = (typeof options.range === 'boolean') && options.range;
- extra.loc = (typeof options.loc === 'boolean') && options.loc;
- extra.attachComment = (typeof options.attachComment === 'boolean') && options.attachComment;
-
- if (extra.loc && options.source !== null && options.source !== undefined) {
- extra.source = toString(options.source);
- }
-
- if (typeof options.tokens === 'boolean' && options.tokens) {
- extra.tokens = [];
- }
- if (typeof options.comment === 'boolean' && options.comment) {
- extra.comments = [];
- }
- if (typeof options.tolerant === 'boolean' && options.tolerant) {
- extra.errors = [];
- }
- if (extra.attachComment) {
- extra.range = true;
- extra.comments = [];
- extra.bottomRightStack = [];
- extra.trailingComments = [];
- extra.leadingComments = [];
- }
- if (options.sourceType === 'module') {
- // very restrictive condition for now
- state.sourceType = options.sourceType;
- strict = true;
- }
- }
-
- try {
- program = parseProgram();
- if (typeof extra.comments !== 'undefined') {
- program.comments = extra.comments;
- }
- if (typeof extra.tokens !== 'undefined') {
- filterTokenLocation();
- program.tokens = extra.tokens;
- }
- if (typeof extra.errors !== 'undefined') {
- program.errors = extra.errors;
- }
- } catch (e) {
- throw e;
- } finally {
- extra = {};
- }
-
- return program;
- }
-
- // Sync with *.json manifests.
- exports.version = '2.7.2';
-
- exports.tokenize = tokenize;
-
- exports.parse = parse;
-
- // Deep copy.
- /* istanbul ignore next */
- exports.Syntax = (function () {
- var name, types = {};
-
- if (typeof Object.create === 'function') {
- types = Object.create(null);
- }
-
- for (name in Syntax) {
- if (Syntax.hasOwnProperty(name)) {
- types[name] = Syntax[name];
- }
- }
-
- if (typeof Object.freeze === 'function') {
- Object.freeze(types);
- }
-
- return types;
- }());
-
-}));
-/* vim: set sw=4 ts=4 et tw=80 : */
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/package.json b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/package.json
deleted file mode 100644
index 58bb445e18..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/esprima/package.json
+++ /dev/null
@@ -1,145 +0,0 @@
-{
- "_args": [
- [
- "esprima@~2.7.1",
- "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast"
- ]
- ],
- "_from": "esprima@>=2.7.1 <2.8.0",
- "_id": "esprima@2.7.2",
- "_inCache": true,
- "_installable": true,
- "_location": "/readable-stream/unreachable-branch-transform/recast/esprima",
- "_nodeVersion": "4.2.2",
- "_npmOperationalInternal": {
- "host": "packages-9-west.internal.npmjs.com",
- "tmp": "tmp/esprima-2.7.2.tgz_1454477276067_0.014412595424801111"
- },
- "_npmUser": {
- "email": "ariya.hidayat@gmail.com",
- "name": "ariya"
- },
- "_npmVersion": "2.14.7",
- "_phantomChildren": {},
- "_requested": {
- "name": "esprima",
- "raw": "esprima@~2.7.1",
- "rawSpec": "~2.7.1",
- "scope": null,
- "spec": ">=2.7.1 <2.8.0",
- "type": "range"
- },
- "_requiredBy": [
- "/readable-stream/unreachable-branch-transform/recast"
- ],
- "_resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.2.tgz",
- "_shasum": "f43be543609984eae44c933ac63352a6af35f339",
- "_shrinkwrap": null,
- "_spec": "esprima@~2.7.1",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast",
- "author": {
- "email": "ariya.hidayat@gmail.com",
- "name": "Ariya Hidayat"
- },
- "bin": {
- "esparse": "./bin/esparse.js",
- "esvalidate": "./bin/esvalidate.js"
- },
- "bugs": {
- "url": "https://github.com/jquery/esprima/issues"
- },
- "dependencies": {},
- "description": "ECMAScript parsing infrastructure for multipurpose analysis",
- "devDependencies": {
- "codecov.io": "~0.1.6",
- "escomplex-js": "1.2.0",
- "eslint": "~1.7.2",
- "everything.js": "~1.0.3",
- "glob": "^5.0.15",
- "istanbul": "~0.4.0",
- "jscs": "~2.3.5",
- "json-diff": "~0.3.1",
- "karma": "^0.13.11",
- "karma-chrome-launcher": "^0.2.1",
- "karma-detect-browsers": "^2.0.2",
- "karma-firefox-launcher": "^0.1.6",
- "karma-ie-launcher": "^0.2.0",
- "karma-mocha": "^0.2.0",
- "karma-safari-launcher": "^0.1.1",
- "karma-sauce-launcher": "^0.2.14",
- "lodash": "^3.10.0",
- "mocha": "^2.3.3",
- "node-tick-processor": "~0.0.2",
- "regenerate": "~1.2.1",
- "temp": "~0.8.3",
- "unicode-7.0.0": "~0.1.5"
- },
- "directories": {},
- "dist": {
- "shasum": "f43be543609984eae44c933ac63352a6af35f339",
- "tarball": "http://registry.npmjs.org/esprima/-/esprima-2.7.2.tgz"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "bin",
- "unit-tests.js",
- "esprima.js"
- ],
- "gitHead": "eb05a03b18b8433ab1ebeabea635a949219cd75e",
- "homepage": "http://esprima.org",
- "keywords": [
- "ast",
- "ecmascript",
- "javascript",
- "parser",
- "syntax"
- ],
- "license": "BSD-2-Clause",
- "main": "esprima.js",
- "maintainers": [
- {
- "email": "ariya.hidayat@gmail.com",
- "name": "ariya"
- }
- ],
- "name": "esprima",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/jquery/esprima.git"
- },
- "scripts": {
- "all-tests": "npm run generate-fixtures && npm run unit-tests && npm run grammar-tests && npm run regression-tests",
- "analyze-coverage": "istanbul cover test/unit-tests.js",
- "appveyor": "npm run all-tests && npm run browser-tests && npm run dynamic-analysis",
- "benchmark": "node test/benchmarks.js",
- "benchmark-quick": "node test/benchmarks.js quick",
- "browser-tests": "npm run generate-fixtures && cd test && karma start --single-run",
- "check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100",
- "check-version": "node test/check-version.js",
- "circleci": "npm test && npm run codecov && npm run downstream",
- "codecov": "istanbul report cobertura && codecov < ./coverage/cobertura-coverage.xml",
- "complexity": "node test/check-complexity.js",
- "downstream": "node test/downstream.js",
- "droneio": "npm test && npm run saucelabs-evergreen && npm run saucelabs-ie && npm run saucelabs-safari",
- "dynamic-analysis": "npm run analyze-coverage && npm run check-coverage",
- "eslint": "node node_modules/eslint/bin/eslint.js -c .lintrc esprima.js",
- "generate-fixtures": "node tools/generate-fixtures.js",
- "generate-regex": "node tools/generate-identifier-regex.js",
- "grammar-tests": "node test/grammar-tests.js",
- "jscs": "jscs -p crockford esprima.js && jscs -p crockford test/*.js",
- "profile": "node --prof test/profile.js && mv isolate*.log v8.log && node-tick-processor",
- "regression-tests": "node test/regression-tests.js",
- "saucelabs-evergreen": "cd test && karma start saucelabs-evergreen.conf.js",
- "saucelabs-ie": "cd test && karma start saucelabs-ie.conf.js",
- "saucelabs-safari": "cd test && karma start saucelabs-safari.conf.js",
- "static-analysis": "npm run check-version && npm run jscs && npm run eslint && npm run complexity",
- "test": "npm run all-tests && npm run static-analysis && npm run dynamic-analysis",
- "travis": "npm test",
- "unit-tests": "node test/unit-tests.js"
- },
- "version": "2.7.2"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/.travis.yml b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/.travis.yml
deleted file mode 100644
index ed05f88d50..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/.travis.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-language: node_js
-node_js:
- - "0.11"
- - "0.10"
- - "0.8"
- - "0.6"
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/LICENSE b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/LICENSE
deleted file mode 100644
index 6c2f144b1c..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-Copyright (c) 2014 Ben Newman <bn@cs.stanford.edu>
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/README.md b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/README.md
deleted file mode 100644
index a8990aa6e2..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/README.md
+++ /dev/null
@@ -1,246 +0,0 @@
-private [![Build Status](https://travis-ci.org/benjamn/private.png?branch=master)](https://travis-ci.org/benjamn/private)
-===
-
-A general-purpose utility for associating truly private state with any JavaScript object.
-
-Installation
----
-
-From NPM:
-
- npm install private
-
-From GitHub:
-
- cd path/to/node_modules
- git clone git://github.com/benjamn/private.git
- cd private
- npm install .
-
-Usage
----
-**Get or create a secret object associated with any (non-frozen) object:**
-```js
-var getSecret = require("private").makeAccessor();
-var obj = Object.create(null); // any kind of object works
-getSecret(obj).totallySafeProperty = "p455w0rd";
-
-console.log(Object.keys(obj)); // []
-console.log(Object.getOwnPropertyNames(obj)); // []
-console.log(getSecret(obj)); // { totallySafeProperty: "p455w0rd" }
-```
-Now, only code that has a reference to both `getSecret` and `obj` can possibly access `.totallySafeProperty`.
-
-*Importantly, no global references to the secret object are retained by the `private` package, so as soon as `obj` gets garbage collected, the secret will be reclaimed as well. In other words, you don't have to worry about memory leaks.*
-
-**Create a unique property name that cannot be enumerated or guessed:**
-```js
-var secretKey = require("private").makeUniqueKey();
-var obj = Object.create(null); // any kind of object works
-
-Object.defineProperty(obj, secretKey, {
- value: { totallySafeProperty: "p455w0rd" },
- enumerable: false // optional; non-enumerability is the default
-});
-
-Object.defineProperty(obj, "nonEnumerableProperty", {
- value: "anyone can guess my name",
- enumerable: false
-});
-
-console.log(obj[secretKey].totallySafeProperty); // p455w0rd
-console.log(obj.nonEnumerableProperty); // "anyone can guess my name"
-console.log(Object.keys(obj)); // []
-console.log(Object.getOwnPropertyNames(obj)); // ["nonEnumerableProperty"]
-
-for (var key in obj) {
- console.log(key); // never called
-}
-```
-Because these keys are non-enumerable, you can't discover them using a `for`-`in` loop. Because `secretKey` is a long string of random characters, you would have a lot of trouble guessing it. And because the `private` module wraps `Object.getOwnPropertyNames` to exclude the keys it generates, you can't even use that interface to discover it.
-
-Unless you have access to the value of the `secretKey` property name, there is no way to access the value associated with it. So your only responsibility as secret-keeper is to avoid handing out the value of `secretKey` to untrusted code.
-
-Think of this style as a home-grown version of the first style. Note, however, that it requires a full implementation of ES5's `Object.defineProperty` method in order to make any safety guarantees, whereas the first example will provide safety even in environments that do not support `Object.defineProperty`.
-
-Rationale
----
-
-In JavaScript, the only data that are truly private are local variables
-whose values do not *leak* from the scope in which they were defined.
-
-This notion of *closure privacy* is powerful, and it readily provides some
-of the benefits of traditional data privacy, a la Java or C++:
-```js
-function MyClass(secret) {
- this.increment = function() {
- return ++secret;
- };
-}
-
-var mc = new MyClass(3);
-console.log(mc.increment()); // 4
-```
-You can learn something about `secret` by calling `.increment()`, and you
-can increase its value by one as many times as you like, but you can never
-decrease its value, because it is completely inaccessible except through
-the `.increment` method. And if the `.increment` method were not
-available, it would be as if no `secret` variable had ever been declared,
-as far as you could tell.
-
-This style breaks down as soon as you want to inherit methods from the
-prototype of a class:
-```js
-function MyClass(secret) {
- this.secret = secret;
-}
-
-MyClass.prototype.increment = function() {
- return ++this.secret;
-};
-```
-The only way to communicate between the `MyClass` constructor and the
-`.increment` method in this example is to manipulate shared properties of
-`this`. Unfortunately `this.secret` is now exposed to unlicensed
-modification:
-```js
-var mc = new MyClass(6);
-console.log(mc.increment()); // 7
-mc.secret -= Infinity;
-console.log(mc.increment()); // -Infinity
-mc.secret = "Go home JavaScript, you're drunk.";
-mc.increment(); // NaN
-```
-Another problem with closure privacy is that it only lends itself to
-per-instance privacy, whereas the `private` keyword in most
-object-oriented languages indicates that the data member in question is
-visible to all instances of the same class.
-
-Suppose you have a `Node` class with a notion of parents and children:
-```js
-function Node() {
- var parent;
- var children = [];
-
- this.getParent = function() {
- return parent;
- };
-
- this.appendChild = function(child) {
- children.push(child);
- child.parent = this; // Can this be made to work?
- };
-}
-```
-The desire here is to allow other `Node` objects to manipulate the value
-returned by `.getParent()`, but otherwise disallow any modification of the
-`parent` variable. You could expose a `.setParent` function, but then
-anyone could call it, and you might as well give up on the getter/setter
-pattern.
-
-This module solves both of these problems.
-
-Usage
----
-
-Let's revisit the `Node` example from above:
-```js
-var p = require("private").makeAccessor();
-
-function Node() {
- var privates = p(this);
- var children = [];
-
- this.getParent = function() {
- return privates.parent;
- };
-
- this.appendChild = function(child) {
- children.push(child);
- var cp = p(child);
- if (cp.parent)
- cp.parent.removeChild(child);
- cp.parent = this;
- return child;
- };
-}
-```
-Now, in order to access the private data of a `Node` object, you need to
-have access to the unique `p` function that is being used here. This is
-already an improvement over the previous example, because it allows
-restricted access by other `Node` instances, but can it help with the
-`Node.prototype` problem too?
-
-Yes it can!
-```js
-var p = require("private").makeAccessor();
-
-function Node() {
- p(this).children = [];
-}
-
-var Np = Node.prototype;
-
-Np.getParent = function() {
- return p(this).parent;
-};
-
-Np.appendChild = function(child) {
- p(this).children.push(child);
- var cp = p(child);
- if (cp.parent)
- cp.parent.removeChild(child);
- cp.parent = this;
- return child;
-};
-```
-Because `p` is in scope not only within the `Node` constructor but also
-within `Node` methods, we can finally avoid redefining methods every time
-the `Node` constructor is called.
-
-Now, you might be wondering how you can restrict access to `p` so that no
-untrusted code is able to call it. The answer is to use your favorite
-module pattern, be it CommonJS, AMD `define`, or even the old
-Immediately-Invoked Function Expression:
-```js
-var Node = (function() {
- var p = require("private").makeAccessor();
-
- function Node() {
- p(this).children = [];
- }
-
- var Np = Node.prototype;
-
- Np.getParent = function() {
- return p(this).parent;
- };
-
- Np.appendChild = function(child) {
- p(this).children.push(child);
- var cp = p(child);
- if (cp.parent)
- cp.parent.removeChild(child);
- cp.parent = this;
- return child;
- };
-
- return Node;
-}());
-
-var parent = new Node;
-var child = new Node;
-parent.appendChild(child);
-assert.strictEqual(child.getParent(), parent);
-```
-Because this version of `p` never leaks from the enclosing function scope,
-only `Node` objects have access to it.
-
-So, you see, the claim I made at the beginning of this README remains
-true:
-
-> In JavaScript, the only data that are truly private are local variables
-> whose values do not *leak* from the scope in which they were defined.
-
-It just so happens that closure privacy is sufficient to implement a
-privacy model similar to that provided by other languages.
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/package.json b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/package.json
deleted file mode 100644
index 3d787aa56a..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/package.json
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- "_args": [
- [
- "private@~0.1.5",
- "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast"
- ]
- ],
- "_from": "private@>=0.1.5 <0.2.0",
- "_id": "private@0.1.6",
- "_inCache": true,
- "_installable": true,
- "_location": "/readable-stream/unreachable-branch-transform/recast/private",
- "_npmUser": {
- "email": "bn@cs.stanford.edu",
- "name": "benjamn"
- },
- "_npmVersion": "1.4.14",
- "_phantomChildren": {},
- "_requested": {
- "name": "private",
- "raw": "private@~0.1.5",
- "rawSpec": "~0.1.5",
- "scope": null,
- "spec": ">=0.1.5 <0.2.0",
- "type": "range"
- },
- "_requiredBy": [
- "/readable-stream/unreachable-branch-transform/recast"
- ],
- "_resolved": "https://registry.npmjs.org/private/-/private-0.1.6.tgz",
- "_shasum": "55c6a976d0f9bafb9924851350fe47b9b5fbb7c1",
- "_shrinkwrap": null,
- "_spec": "private@~0.1.5",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast",
- "author": {
- "email": "bn@cs.stanford.edu",
- "name": "Ben Newman"
- },
- "bugs": {
- "url": "https://github.com/benjamn/private/issues"
- },
- "dependencies": {},
- "description": "Utility for associating truly private state with any JavaScript object",
- "devDependencies": {},
- "directories": {},
- "dist": {
- "shasum": "55c6a976d0f9bafb9924851350fe47b9b5fbb7c1",
- "tarball": "http://registry.npmjs.org/private/-/private-0.1.6.tgz"
- },
- "engines": {
- "node": ">= 0.6"
- },
- "gitHead": "8df9e34c8f66a5e634a1024dba3ea16704d5178d",
- "homepage": "http://github.com/benjamn/private",
- "keywords": [
- "private",
- "access control",
- "access modifiers",
- "encapsulation",
- "secret",
- "state",
- "privilege",
- "scope",
- "es5"
- ],
- "license": "MIT",
- "main": "private.js",
- "maintainers": [
- {
- "email": "bn@cs.stanford.edu",
- "name": "benjamn"
- }
- ],
- "name": "private",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/benjamn/private.git"
- },
- "scripts": {
- "test": "node test/run.js"
- },
- "version": "0.1.6"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/private.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/private.js
deleted file mode 100644
index 20bed57eeb..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/private.js
+++ /dev/null
@@ -1,129 +0,0 @@
-"use strict";
-
-var originalObject = Object;
-var originalDefProp = Object.defineProperty;
-var originalCreate = Object.create;
-
-function defProp(obj, name, value) {
- if (originalDefProp) try {
- originalDefProp.call(originalObject, obj, name, { value: value });
- } catch (definePropertyIsBrokenInIE8) {
- obj[name] = value;
- } else {
- obj[name] = value;
- }
-}
-
-// For functions that will be invoked using .call or .apply, we need to
-// define those methods on the function objects themselves, rather than
-// inheriting them from Function.prototype, so that a malicious or clumsy
-// third party cannot interfere with the functionality of this module by
-// redefining Function.prototype.call or .apply.
-function makeSafeToCall(fun) {
- if (fun) {
- defProp(fun, "call", fun.call);
- defProp(fun, "apply", fun.apply);
- }
- return fun;
-}
-
-makeSafeToCall(originalDefProp);
-makeSafeToCall(originalCreate);
-
-var hasOwn = makeSafeToCall(Object.prototype.hasOwnProperty);
-var numToStr = makeSafeToCall(Number.prototype.toString);
-var strSlice = makeSafeToCall(String.prototype.slice);
-
-var cloner = function(){};
-function create(prototype) {
- if (originalCreate) {
- return originalCreate.call(originalObject, prototype);
- }
- cloner.prototype = prototype || null;
- return new cloner;
-}
-
-var rand = Math.random;
-var uniqueKeys = create(null);
-
-function makeUniqueKey() {
- // Collisions are highly unlikely, but this module is in the business of
- // making guarantees rather than safe bets.
- do var uniqueKey = internString(strSlice.call(numToStr.call(rand(), 36), 2));
- while (hasOwn.call(uniqueKeys, uniqueKey));
- return uniqueKeys[uniqueKey] = uniqueKey;
-}
-
-function internString(str) {
- var obj = {};
- obj[str] = true;
- return Object.keys(obj)[0];
-}
-
-// External users might find this function useful, but it is not necessary
-// for the typical use of this module.
-defProp(exports, "makeUniqueKey", makeUniqueKey);
-
-// Object.getOwnPropertyNames is the only way to enumerate non-enumerable
-// properties, so if we wrap it to ignore our secret keys, there should be
-// no way (except guessing) to access those properties.
-var originalGetOPNs = Object.getOwnPropertyNames;
-Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
- for (var names = originalGetOPNs(object),
- src = 0,
- dst = 0,
- len = names.length;
- src < len;
- ++src) {
- if (!hasOwn.call(uniqueKeys, names[src])) {
- if (src > dst) {
- names[dst] = names[src];
- }
- ++dst;
- }
- }
- names.length = dst;
- return names;
-};
-
-function defaultCreatorFn(object) {
- return create(null);
-}
-
-function makeAccessor(secretCreatorFn) {
- var brand = makeUniqueKey();
- var passkey = create(null);
-
- secretCreatorFn = secretCreatorFn || defaultCreatorFn;
-
- function register(object) {
- var secret; // Created lazily.
-
- function vault(key, forget) {
- // Only code that has access to the passkey can retrieve (or forget)
- // the secret object.
- if (key === passkey) {
- return forget
- ? secret = null
- : secret || (secret = secretCreatorFn(object));
- }
- }
-
- defProp(object, brand, vault);
- }
-
- function accessor(object) {
- if (!hasOwn.call(object, brand))
- register(object);
- return object[brand](passkey);
- }
-
- accessor.forget = function(object) {
- if (hasOwn.call(object, brand))
- object[brand](passkey, true);
- };
-
- return accessor;
-}
-
-defProp(exports, "makeAccessor", makeAccessor);
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/test/run.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/test/run.js
deleted file mode 100644
index dc3c888f06..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/private/test/run.js
+++ /dev/null
@@ -1,68 +0,0 @@
-var assert = require("assert");
-var makeAccessor = require("../private").makeAccessor;
-var acc1 = makeAccessor();
-var obj = {};
-var hasOwn = obj.hasOwnProperty;
-
-acc1(obj).foo = 42;
-assert.deepEqual(obj, {});
-assert.deepEqual(acc1(obj), { foo: 42 });
-assert.deepEqual(acc1(acc1(obj)), {});
-assert.deepEqual(acc1(obj), { foo: 42 });
-assert.deepEqual(Object.keys(acc1(obj)), ["foo"]);
-assert.strictEqual(Object.getOwnPropertyNames(acc1(obj)).length, 1);
-assert.strictEqual(Object.getOwnPropertyNames(acc1(acc1(obj))).length, 0);
-acc1(obj).bar = "baz";
-assert.deepEqual(acc1(obj), { foo: 42, bar: "baz" });
-delete acc1(obj).foo;
-assert.deepEqual(acc1(obj), { bar: "baz" });
-
-try {
- acc1(42);
- throw new Error("threw wrong error");
-} catch (err) {
- assert.ok(err);
-}
-
-var acc2 = makeAccessor();
-assert.notStrictEqual(acc1, acc2);
-assert.notStrictEqual(acc1(obj), acc2(obj));
-assert.deepEqual(acc2(obj), {});
-assert.strictEqual(Object.getOwnPropertyNames(obj).length, 0);
-assert.strictEqual(Object.keys(obj).length, 0);
-acc2(obj).bar = "asdf";
-assert.deepEqual(acc2(obj), { bar: "asdf" });
-
-acc2.forget(obj);
-acc2(obj).bar = "asdf";
-var oldSecret = acc2(obj);
-assert.strictEqual(oldSecret.bar, "asdf");
-acc2.forget(obj);
-var newSecret = acc2(obj);
-assert.notStrictEqual(oldSecret, newSecret);
-assert.ok(hasOwn.call(oldSecret, "bar"));
-assert.ok(!hasOwn.call(newSecret, "bar"));
-newSecret.bar = "zxcv";
-assert.strictEqual(oldSecret.bar, "asdf");
-assert.strictEqual(acc2(obj).bar, "zxcv");
-
-function creatorFn(object) {
- return { self: object };
-}
-
-var acc3 = makeAccessor(creatorFn);
-
-acc3(obj).xxx = "yyy";
-assert.deepEqual(acc3(obj), {
- self: obj,
- xxx: "yyy"
-});
-
-acc3.forget(obj);
-assert.deepEqual(acc3(obj), {
- self: obj
-});
-
-var green = "\033[32m";
-var reset = "\033[0m";
-console.log(green + "ALL PASS" + reset);
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/README.md b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/README.md
deleted file mode 100644
index 8922fe8b0e..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/README.md
+++ /dev/null
@@ -1,729 +0,0 @@
-# Source Map
-
-[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map)
-
-[![NPM](https://nodei.co/npm/source-map.png?downloads=true&downloadRank=true)](https://www.npmjs.com/package/source-map)
-
-This is a library to generate and consume the source map format
-[described here][format].
-
-[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
-
-## Use with Node
-
- $ npm install source-map
-
-## Use on the Web
-
- <script src="https://raw.githubusercontent.com/mozilla/source-map/master/dist/source-map.min.js" defer></script>
-
---------------------------------------------------------------------------------
-
-<!-- `npm run toc` to regenerate the Table of Contents -->
-
-<!-- START doctoc generated TOC please keep comment here to allow auto update -->
-<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
-## Table of Contents
-
-- [Examples](#examples)
- - [Consuming a source map](#consuming-a-source-map)
- - [Generating a source map](#generating-a-source-map)
- - [With SourceNode (high level API)](#with-sourcenode-high-level-api)
- - [With SourceMapGenerator (low level API)](#with-sourcemapgenerator-low-level-api)
-- [API](#api)
- - [SourceMapConsumer](#sourcemapconsumer)
- - [new SourceMapConsumer(rawSourceMap)](#new-sourcemapconsumerrawsourcemap)
- - [SourceMapConsumer.prototype.computeColumnSpans()](#sourcemapconsumerprototypecomputecolumnspans)
- - [SourceMapConsumer.prototype.originalPositionFor(generatedPosition)](#sourcemapconsumerprototypeoriginalpositionforgeneratedposition)
- - [SourceMapConsumer.prototype.generatedPositionFor(originalPosition)](#sourcemapconsumerprototypegeneratedpositionfororiginalposition)
- - [SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)](#sourcemapconsumerprototypeallgeneratedpositionsfororiginalposition)
- - [SourceMapConsumer.prototype.hasContentsOfAllSources()](#sourcemapconsumerprototypehascontentsofallsources)
- - [SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])](#sourcemapconsumerprototypesourcecontentforsource-returnnullonmissing)
- - [SourceMapConsumer.prototype.eachMapping(callback, context, order)](#sourcemapconsumerprototypeeachmappingcallback-context-order)
- - [SourceMapGenerator](#sourcemapgenerator)
- - [new SourceMapGenerator([startOfSourceMap])](#new-sourcemapgeneratorstartofsourcemap)
- - [SourceMapGenerator.fromSourceMap(sourceMapConsumer)](#sourcemapgeneratorfromsourcemapsourcemapconsumer)
- - [SourceMapGenerator.prototype.addMapping(mapping)](#sourcemapgeneratorprototypeaddmappingmapping)
- - [SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)](#sourcemapgeneratorprototypesetsourcecontentsourcefile-sourcecontent)
- - [SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])](#sourcemapgeneratorprototypeapplysourcemapsourcemapconsumer-sourcefile-sourcemappath)
- - [SourceMapGenerator.prototype.toString()](#sourcemapgeneratorprototypetostring)
- - [SourceNode](#sourcenode)
- - [new SourceNode([line, column, source[, chunk[, name]]])](#new-sourcenodeline-column-source-chunk-name)
- - [SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])](#sourcenodefromstringwithsourcemapcode-sourcemapconsumer-relativepath)
- - [SourceNode.prototype.add(chunk)](#sourcenodeprototypeaddchunk)
- - [SourceNode.prototype.prepend(chunk)](#sourcenodeprototypeprependchunk)
- - [SourceNode.prototype.setSourceContent(sourceFile, sourceContent)](#sourcenodeprototypesetsourcecontentsourcefile-sourcecontent)
- - [SourceNode.prototype.walk(fn)](#sourcenodeprototypewalkfn)
- - [SourceNode.prototype.walkSourceContents(fn)](#sourcenodeprototypewalksourcecontentsfn)
- - [SourceNode.prototype.join(sep)](#sourcenodeprototypejoinsep)
- - [SourceNode.prototype.replaceRight(pattern, replacement)](#sourcenodeprototypereplacerightpattern-replacement)
- - [SourceNode.prototype.toString()](#sourcenodeprototypetostring)
- - [SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])](#sourcenodeprototypetostringwithsourcemapstartofsourcemap)
-
-<!-- END doctoc generated TOC please keep comment here to allow auto update -->
-
-## Examples
-
-### Consuming a source map
-
-```js
-var rawSourceMap = {
- version: 3,
- file: 'min.js',
- names: ['bar', 'baz', 'n'],
- sources: ['one.js', 'two.js'],
- sourceRoot: 'http://example.com/www/js/',
- mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA'
-};
-
-var smc = new SourceMapConsumer(rawSourceMap);
-
-console.log(smc.sources);
-// [ 'http://example.com/www/js/one.js',
-// 'http://example.com/www/js/two.js' ]
-
-console.log(smc.originalPositionFor({
- line: 2,
- column: 28
-}));
-// { source: 'http://example.com/www/js/two.js',
-// line: 2,
-// column: 10,
-// name: 'n' }
-
-console.log(smc.generatedPositionFor({
- source: 'http://example.com/www/js/two.js',
- line: 2,
- column: 10
-}));
-// { line: 2, column: 28 }
-
-smc.eachMapping(function (m) {
- // ...
-});
-```
-
-### Generating a source map
-
-In depth guide:
-[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/)
-
-#### With SourceNode (high level API)
-
-```js
-function compile(ast) {
- switch (ast.type) {
- case 'BinaryExpression':
- return new SourceNode(
- ast.location.line,
- ast.location.column,
- ast.location.source,
- [compile(ast.left), " + ", compile(ast.right)]
- );
- case 'Literal':
- return new SourceNode(
- ast.location.line,
- ast.location.column,
- ast.location.source,
- String(ast.value)
- );
- // ...
- default:
- throw new Error("Bad AST");
- }
-}
-
-var ast = parse("40 + 2", "add.js");
-console.log(compile(ast).toStringWithSourceMap({
- file: 'add.js'
-}));
-// { code: '40 + 2',
-// map: [object SourceMapGenerator] }
-```
-
-#### With SourceMapGenerator (low level API)
-
-```js
-var map = new SourceMapGenerator({
- file: "source-mapped.js"
-});
-
-map.addMapping({
- generated: {
- line: 10,
- column: 35
- },
- source: "foo.js",
- original: {
- line: 33,
- column: 2
- },
- name: "christopher"
-});
-
-console.log(map.toString());
-// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}'
-```
-
-## API
-
-Get a reference to the module:
-
-```js
-// Node.js
-var sourceMap = require('source-map');
-
-// Browser builds
-var sourceMap = window.sourceMap;
-
-// Inside Firefox
-const sourceMap = require("devtools/toolkit/sourcemap/source-map.js");
-```
-
-### SourceMapConsumer
-
-A SourceMapConsumer instance represents a parsed source map which we can query
-for information about the original file positions by giving it a file position
-in the generated source.
-
-#### new SourceMapConsumer(rawSourceMap)
-
-The only parameter is the raw source map (either as a string which can be
-`JSON.parse`'d, or an object). According to the spec, source maps have the
-following attributes:
-
-* `version`: Which version of the source map spec this map is following.
-
-* `sources`: An array of URLs to the original source files.
-
-* `names`: An array of identifiers which can be referenced by individual
- mappings.
-
-* `sourceRoot`: Optional. The URL root from which all sources are relative.
-
-* `sourcesContent`: Optional. An array of contents of the original source files.
-
-* `mappings`: A string of base64 VLQs which contain the actual mappings.
-
-* `file`: Optional. The generated filename this source map is associated with.
-
-```js
-var consumer = new sourceMap.SourceMapConsumer(rawSourceMapJsonData);
-```
-
-#### SourceMapConsumer.prototype.computeColumnSpans()
-
-Compute the last column for each generated mapping. The last column is
-inclusive.
-
-```js
-// Before:
-consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" })
-// [ { line: 2,
-// column: 1 },
-// { line: 2,
-// column: 10 },
-// { line: 2,
-// column: 20 } ]
-
-consumer.computeColumnSpans();
-
-// After:
-consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" })
-// [ { line: 2,
-// column: 1,
-// lastColumn: 9 },
-// { line: 2,
-// column: 10,
-// lastColumn: 19 },
-// { line: 2,
-// column: 20,
-// lastColumn: Infinity } ]
-
-```
-
-#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition)
-
-Returns the original source, line, and column information for the generated
-source's line and column positions provided. The only argument is an object with
-the following properties:
-
-* `line`: The line number in the generated source.
-
-* `column`: The column number in the generated source.
-
-* `bias`: Either `SourceMapConsumer.GREATEST_LOWER_BOUND` or
- `SourceMapConsumer.LEAST_UPPER_BOUND`. Specifies whether to return the closest
- element that is smaller than or greater than the one we are searching for,
- respectively, if the exact element cannot be found. Defaults to
- `SourceMapConsumer.GREATEST_LOWER_BOUND`.
-
-and an object is returned with the following properties:
-
-* `source`: The original source file, or null if this information is not
- available.
-
-* `line`: The line number in the original source, or null if this information is
- not available.
-
-* `column`: The column number in the original source, or null or null if this
- information is not available.
-
-* `name`: The original identifier, or null if this information is not available.
-
-```js
-consumer.originalPositionFor({ line: 2, column: 10 })
-// { source: 'foo.coffee',
-// line: 2,
-// column: 2,
-// name: null }
-
-consumer.originalPositionFor({ line: 99999999999999999, column: 999999999999999 })
-// { source: null,
-// line: null,
-// column: null,
-// name: null }
-```
-
-#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition)
-
-Returns the generated line and column information for the original source,
-line, and column positions provided. The only argument is an object with
-the following properties:
-
-* `source`: The filename of the original source.
-
-* `line`: The line number in the original source.
-
-* `column`: The column number in the original source.
-
-and an object is returned with the following properties:
-
-* `line`: The line number in the generated source, or null.
-
-* `column`: The column number in the generated source, or null.
-
-```js
-consumer.generatedPositionFor({ source: "example.js", line: 2, column: 10 })
-// { line: 1,
-// column: 56 }
-```
-
-#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)
-
-Returns all generated line and column information for the original source, line,
-and column provided. If no column is provided, returns all mappings
-corresponding to a either the line we are searching for or the next closest line
-that has any mappings. Otherwise, returns all mappings corresponding to the
-given line and either the column we are searching for or the next closest column
-that has any offsets.
-
-The only argument is an object with the following properties:
-
-* `source`: The filename of the original source.
-
-* `line`: The line number in the original source.
-
-* `column`: Optional. The column number in the original source.
-
-and an array of objects is returned, each with the following properties:
-
-* `line`: The line number in the generated source, or null.
-
-* `column`: The column number in the generated source, or null.
-
-```js
-consumer.allGeneratedpositionsfor({ line: 2, source: "foo.coffee" })
-// [ { line: 2,
-// column: 1 },
-// { line: 2,
-// column: 10 },
-// { line: 2,
-// column: 20 } ]
-```
-
-#### SourceMapConsumer.prototype.hasContentsOfAllSources()
-
-Return true if we have the embedded source content for every source listed in
-the source map, false otherwise.
-
-In other words, if this method returns `true`, then
-`consumer.sourceContentFor(s)` will succeed for every source `s` in
-`consumer.sources`.
-
-```js
-// ...
-if (consumer.hasContentsOfAllSources()) {
- consumerReadyCallback(consumer);
-} else {
- fetchSources(consumer, consumerReadyCallback);
-}
-// ...
-```
-
-#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])
-
-Returns the original source content for the source provided. The only
-argument is the URL of the original source file.
-
-If the source content for the given source is not found, then an error is
-thrown. Optionally, pass `true` as the second param to have `null` returned
-instead.
-
-```js
-consumer.sources
-// [ "my-cool-lib.clj" ]
-
-consumer.sourceContentFor("my-cool-lib.clj")
-// "..."
-
-consumer.sourceContentFor("this is not in the source map");
-// Error: "this is not in the source map" is not in the source map
-
-consumer.sourceContentFor("this is not in the source map", true);
-// null
-```
-
-#### SourceMapConsumer.prototype.eachMapping(callback, context, order)
-
-Iterate over each mapping between an original source/line/column and a
-generated line/column in this source map.
-
-* `callback`: The function that is called with each mapping. Mappings have the
- form `{ source, generatedLine, generatedColumn, originalLine, originalColumn,
- name }`
-
-* `context`: Optional. If specified, this object will be the value of `this`
- every time that `callback` is called.
-
-* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or
- `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over
- the mappings sorted by the generated file's line/column order or the
- original's source/line/column order, respectively. Defaults to
- `SourceMapConsumer.GENERATED_ORDER`.
-
-```js
-consumer.eachMapping(function (m) { console.log(m); })
-// ...
-// { source: 'illmatic.js',
-// generatedLine: 1,
-// generatedColumn: 0,
-// originalLine: 1,
-// originalColumn: 0,
-// name: null }
-// { source: 'illmatic.js',
-// generatedLine: 2,
-// generatedColumn: 0,
-// originalLine: 2,
-// originalColumn: 0,
-// name: null }
-// ...
-```
-### SourceMapGenerator
-
-An instance of the SourceMapGenerator represents a source map which is being
-built incrementally.
-
-#### new SourceMapGenerator([startOfSourceMap])
-
-You may pass an object with the following properties:
-
-* `file`: The filename of the generated source that this source map is
- associated with.
-
-* `sourceRoot`: A root for all relative URLs in this source map.
-
-* `skipValidation`: Optional. When `true`, disables validation of mappings as
- they are added. This can improve performance but should be used with
- discretion, as a last resort. Even then, one should avoid using this flag when
- running tests, if possible.
-
-```js
-var generator = new sourceMap.SourceMapGenerator({
- file: "my-generated-javascript-file.js",
- sourceRoot: "http://example.com/app/js/"
-});
-```
-
-#### SourceMapGenerator.fromSourceMap(sourceMapConsumer)
-
-Creates a new `SourceMapGenerator` from an existing `SourceMapConsumer` instance.
-
-* `sourceMapConsumer` The SourceMap.
-
-```js
-var generator = sourceMap.SourceMapGenerator.fromSourceMap(consumer);
-```
-
-#### SourceMapGenerator.prototype.addMapping(mapping)
-
-Add a single mapping from original source line and column to the generated
-source's line and column for this source map being created. The mapping object
-should have the following properties:
-
-* `generated`: An object with the generated line and column positions.
-
-* `original`: An object with the original line and column positions.
-
-* `source`: The original source file (relative to the sourceRoot).
-
-* `name`: An optional original token name for this mapping.
-
-```js
-generator.addMapping({
- source: "module-one.scm",
- original: { line: 128, column: 0 },
- generated: { line: 3, column: 456 }
-})
-```
-
-#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)
-
-Set the source content for an original source file.
-
-* `sourceFile` the URL of the original source file.
-
-* `sourceContent` the content of the source file.
-
-```js
-generator.setSourceContent("module-one.scm",
- fs.readFileSync("path/to/module-one.scm"))
-```
-
-#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])
-
-Applies a SourceMap for a source file to the SourceMap.
-Each mapping to the supplied source file is rewritten using the
-supplied SourceMap. Note: The resolution for the resulting mappings
-is the minimum of this map and the supplied map.
-
-* `sourceMapConsumer`: The SourceMap to be applied.
-
-* `sourceFile`: Optional. The filename of the source file.
- If omitted, sourceMapConsumer.file will be used, if it exists.
- Otherwise an error will be thrown.
-
-* `sourceMapPath`: Optional. The dirname of the path to the SourceMap
- to be applied. If relative, it is relative to the SourceMap.
-
- This parameter is needed when the two SourceMaps aren't in the same
- directory, and the SourceMap to be applied contains relative source
- paths. If so, those relative source paths need to be rewritten
- relative to the SourceMap.
-
- If omitted, it is assumed that both SourceMaps are in the same directory,
- thus not needing any rewriting. (Supplying `'.'` has the same effect.)
-
-#### SourceMapGenerator.prototype.toString()
-
-Renders the source map being generated to a string.
-
-```js
-generator.toString()
-// '{"version":3,"sources":["module-one.scm"],"names":[],"mappings":"...snip...","file":"my-generated-javascript-file.js","sourceRoot":"http://example.com/app/js/"}'
-```
-
-### SourceNode
-
-SourceNodes provide a way to abstract over interpolating and/or concatenating
-snippets of generated JavaScript source code, while maintaining the line and
-column information associated between those snippets and the original source
-code. This is useful as the final intermediate representation a compiler might
-use before outputting the generated JS and source map.
-
-#### new SourceNode([line, column, source[, chunk[, name]]])
-
-* `line`: The original line number associated with this source node, or null if
- it isn't associated with an original line.
-
-* `column`: The original column number associated with this source node, or null
- if it isn't associated with an original column.
-
-* `source`: The original source's filename; null if no filename is provided.
-
-* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see
- below.
-
-* `name`: Optional. The original identifier.
-
-```js
-var node = new SourceNode(1, 2, "a.cpp", [
- new SourceNode(3, 4, "b.cpp", "extern int status;\n"),
- new SourceNode(5, 6, "c.cpp", "std::string* make_string(size_t n);\n"),
- new SourceNode(7, 8, "d.cpp", "int main(int argc, char** argv) {}\n"),
-]);
-```
-
-#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath])
-
-Creates a SourceNode from generated code and a SourceMapConsumer.
-
-* `code`: The generated code
-
-* `sourceMapConsumer` The SourceMap for the generated code
-
-* `relativePath` The optional path that relative sources in `sourceMapConsumer`
- should be relative to.
-
-```js
-var consumer = new SourceMapConsumer(fs.readFileSync("path/to/my-file.js.map"));
-var node = SourceNode.fromStringWithSourceMap(fs.readFileSync("path/to/my-file.js"),
- consumer);
-```
-
-#### SourceNode.prototype.add(chunk)
-
-Add a chunk of generated JS to this source node.
-
-* `chunk`: A string snippet of generated JS code, another instance of
- `SourceNode`, or an array where each member is one of those things.
-
-```js
-node.add(" + ");
-node.add(otherNode);
-node.add([leftHandOperandNode, " + ", rightHandOperandNode]);
-```
-
-#### SourceNode.prototype.prepend(chunk)
-
-Prepend a chunk of generated JS to this source node.
-
-* `chunk`: A string snippet of generated JS code, another instance of
- `SourceNode`, or an array where each member is one of those things.
-
-```js
-node.prepend("/** Build Id: f783haef86324gf **/\n\n");
-```
-
-#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent)
-
-Set the source content for a source file. This will be added to the
-`SourceMap` in the `sourcesContent` field.
-
-* `sourceFile`: The filename of the source file
-
-* `sourceContent`: The content of the source file
-
-```js
-node.setSourceContent("module-one.scm",
- fs.readFileSync("path/to/module-one.scm"))
-```
-
-#### SourceNode.prototype.walk(fn)
-
-Walk over the tree of JS snippets in this node and its children. The walking
-function is called once for each snippet of JS and is passed that snippet and
-the its original associated source's line/column location.
-
-* `fn`: The traversal function.
-
-```js
-var node = new SourceNode(1, 2, "a.js", [
- new SourceNode(3, 4, "b.js", "uno"),
- "dos",
- [
- "tres",
- new SourceNode(5, 6, "c.js", "quatro")
- ]
-]);
-
-node.walk(function (code, loc) { console.log("WALK:", code, loc); })
-// WALK: uno { source: 'b.js', line: 3, column: 4, name: null }
-// WALK: dos { source: 'a.js', line: 1, column: 2, name: null }
-// WALK: tres { source: 'a.js', line: 1, column: 2, name: null }
-// WALK: quatro { source: 'c.js', line: 5, column: 6, name: null }
-```
-
-#### SourceNode.prototype.walkSourceContents(fn)
-
-Walk over the tree of SourceNodes. The walking function is called for each
-source file content and is passed the filename and source content.
-
-* `fn`: The traversal function.
-
-```js
-var a = new SourceNode(1, 2, "a.js", "generated from a");
-a.setSourceContent("a.js", "original a");
-var b = new SourceNode(1, 2, "b.js", "generated from b");
-b.setSourceContent("b.js", "original b");
-var c = new SourceNode(1, 2, "c.js", "generated from c");
-c.setSourceContent("c.js", "original c");
-
-var node = new SourceNode(null, null, null, [a, b, c]);
-node.walkSourceContents(function (source, contents) { console.log("WALK:", source, ":", contents); })
-// WALK: a.js : original a
-// WALK: b.js : original b
-// WALK: c.js : original c
-```
-
-#### SourceNode.prototype.join(sep)
-
-Like `Array.prototype.join` except for SourceNodes. Inserts the separator
-between each of this source node's children.
-
-* `sep`: The separator.
-
-```js
-var lhs = new SourceNode(1, 2, "a.rs", "my_copy");
-var operand = new SourceNode(3, 4, "a.rs", "=");
-var rhs = new SourceNode(5, 6, "a.rs", "orig.clone()");
-
-var node = new SourceNode(null, null, null, [ lhs, operand, rhs ]);
-var joinedNode = node.join(" ");
-```
-
-#### SourceNode.prototype.replaceRight(pattern, replacement)
-
-Call `String.prototype.replace` on the very right-most source snippet. Useful
-for trimming white space from the end of a source node, etc.
-
-* `pattern`: The pattern to replace.
-
-* `replacement`: The thing to replace the pattern with.
-
-```js
-// Trim trailing white space.
-node.replaceRight(/\s*$/, "");
-```
-
-#### SourceNode.prototype.toString()
-
-Return the string representation of this source node. Walks over the tree and
-concatenates all the various snippets together to one string.
-
-```js
-var node = new SourceNode(1, 2, "a.js", [
- new SourceNode(3, 4, "b.js", "uno"),
- "dos",
- [
- "tres",
- new SourceNode(5, 6, "c.js", "quatro")
- ]
-]);
-
-node.toString()
-// 'unodostresquatro'
-```
-
-#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap])
-
-Returns the string representation of this tree of source nodes, plus a
-SourceMapGenerator which contains all the mappings between the generated and
-original sources.
-
-The arguments are the same as those to `new SourceMapGenerator`.
-
-```js
-var node = new SourceNode(1, 2, "a.js", [
- new SourceNode(3, 4, "b.js", "uno"),
- "dos",
- [
- "tres",
- new SourceNode(5, 6, "c.js", "quatro")
- ]
-]);
-
-node.toStringWithSourceMap({ file: "my-output-file.js" })
-// { code: 'unodostresquatro',
-// map: [object SourceMapGenerator] }
-```
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/dist/source-map.debug.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/dist/source-map.debug.js
deleted file mode 100644
index dc091643f4..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/dist/source-map.debug.js
+++ /dev/null
@@ -1,3006 +0,0 @@
-(function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory();
- else if(typeof define === 'function' && define.amd)
- define([], factory);
- else if(typeof exports === 'object')
- exports["sourceMap"] = factory();
- else
- root["sourceMap"] = factory();
-})(this, function() {
-return /******/ (function(modules) { // webpackBootstrap
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
-/******/
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-/******/
-/******/ // Flag the module as loaded
-/******/ module.loaded = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/ // Load entry module and return exports
-/******/ return __webpack_require__(0);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
-/***/ function(module, exports, __webpack_require__) {
-
- /*
- * Copyright 2009-2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE.txt or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;
- exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer;
- exports.SourceNode = __webpack_require__(10).SourceNode;
-
-
-/***/ },
-/* 1 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- var base64VLQ = __webpack_require__(2);
- var util = __webpack_require__(4);
- var ArraySet = __webpack_require__(5).ArraySet;
- var MappingList = __webpack_require__(6).MappingList;
-
- /**
- * An instance of the SourceMapGenerator represents a source map which is
- * being built incrementally. You may pass an object with the following
- * properties:
- *
- * - file: The filename of the generated source.
- * - sourceRoot: A root for all relative URLs in this source map.
- */
- function SourceMapGenerator(aArgs) {
- if (!aArgs) {
- aArgs = {};
- }
- this._file = util.getArg(aArgs, 'file', null);
- this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
- this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
- this._sources = new ArraySet();
- this._names = new ArraySet();
- this._mappings = new MappingList();
- this._sourcesContents = null;
- }
-
- SourceMapGenerator.prototype._version = 3;
-
- /**
- * Creates a new SourceMapGenerator based on a SourceMapConsumer
- *
- * @param aSourceMapConsumer The SourceMap.
- */
- SourceMapGenerator.fromSourceMap =
- function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
- var sourceRoot = aSourceMapConsumer.sourceRoot;
- var generator = new SourceMapGenerator({
- file: aSourceMapConsumer.file,
- sourceRoot: sourceRoot
- });
- aSourceMapConsumer.eachMapping(function (mapping) {
- var newMapping = {
- generated: {
- line: mapping.generatedLine,
- column: mapping.generatedColumn
- }
- };
-
- if (mapping.source != null) {
- newMapping.source = mapping.source;
- if (sourceRoot != null) {
- newMapping.source = util.relative(sourceRoot, newMapping.source);
- }
-
- newMapping.original = {
- line: mapping.originalLine,
- column: mapping.originalColumn
- };
-
- if (mapping.name != null) {
- newMapping.name = mapping.name;
- }
- }
-
- generator.addMapping(newMapping);
- });
- aSourceMapConsumer.sources.forEach(function (sourceFile) {
- var content = aSourceMapConsumer.sourceContentFor(sourceFile);
- if (content != null) {
- generator.setSourceContent(sourceFile, content);
- }
- });
- return generator;
- };
-
- /**
- * Add a single mapping from original source line and column to the generated
- * source's line and column for this source map being created. The mapping
- * object should have the following properties:
- *
- * - generated: An object with the generated line and column positions.
- * - original: An object with the original line and column positions.
- * - source: The original source file (relative to the sourceRoot).
- * - name: An optional original token name for this mapping.
- */
- SourceMapGenerator.prototype.addMapping =
- function SourceMapGenerator_addMapping(aArgs) {
- var generated = util.getArg(aArgs, 'generated');
- var original = util.getArg(aArgs, 'original', null);
- var source = util.getArg(aArgs, 'source', null);
- var name = util.getArg(aArgs, 'name', null);
-
- if (!this._skipValidation) {
- this._validateMapping(generated, original, source, name);
- }
-
- if (source != null && !this._sources.has(source)) {
- this._sources.add(source);
- }
-
- if (name != null && !this._names.has(name)) {
- this._names.add(name);
- }
-
- this._mappings.add({
- generatedLine: generated.line,
- generatedColumn: generated.column,
- originalLine: original != null && original.line,
- originalColumn: original != null && original.column,
- source: source,
- name: name
- });
- };
-
- /**
- * Set the source content for a source file.
- */
- SourceMapGenerator.prototype.setSourceContent =
- function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
- var source = aSourceFile;
- if (this._sourceRoot != null) {
- source = util.relative(this._sourceRoot, source);
- }
-
- if (aSourceContent != null) {
- // Add the source content to the _sourcesContents map.
- // Create a new _sourcesContents map if the property is null.
- if (!this._sourcesContents) {
- this._sourcesContents = {};
- }
- this._sourcesContents[util.toSetString(source)] = aSourceContent;
- } else if (this._sourcesContents) {
- // Remove the source file from the _sourcesContents map.
- // If the _sourcesContents map is empty, set the property to null.
- delete this._sourcesContents[util.toSetString(source)];
- if (Object.keys(this._sourcesContents).length === 0) {
- this._sourcesContents = null;
- }
- }
- };
-
- /**
- * Applies the mappings of a sub-source-map for a specific source file to the
- * source map being generated. Each mapping to the supplied source file is
- * rewritten using the supplied source map. Note: The resolution for the
- * resulting mappings is the minimium of this map and the supplied map.
- *
- * @param aSourceMapConsumer The source map to be applied.
- * @param aSourceFile Optional. The filename of the source file.
- * If omitted, SourceMapConsumer's file property will be used.
- * @param aSourceMapPath Optional. The dirname of the path to the source map
- * to be applied. If relative, it is relative to the SourceMapConsumer.
- * This parameter is needed when the two source maps aren't in the same
- * directory, and the source map to be applied contains relative source
- * paths. If so, those relative source paths need to be rewritten
- * relative to the SourceMapGenerator.
- */
- SourceMapGenerator.prototype.applySourceMap =
- function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
- var sourceFile = aSourceFile;
- // If aSourceFile is omitted, we will use the file property of the SourceMap
- if (aSourceFile == null) {
- if (aSourceMapConsumer.file == null) {
- throw new Error(
- 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
- 'or the source map\'s "file" property. Both were omitted.'
- );
- }
- sourceFile = aSourceMapConsumer.file;
- }
- var sourceRoot = this._sourceRoot;
- // Make "sourceFile" relative if an absolute Url is passed.
- if (sourceRoot != null) {
- sourceFile = util.relative(sourceRoot, sourceFile);
- }
- // Applying the SourceMap can add and remove items from the sources and
- // the names array.
- var newSources = new ArraySet();
- var newNames = new ArraySet();
-
- // Find mappings for the "sourceFile"
- this._mappings.unsortedForEach(function (mapping) {
- if (mapping.source === sourceFile && mapping.originalLine != null) {
- // Check if it can be mapped by the source map, then update the mapping.
- var original = aSourceMapConsumer.originalPositionFor({
- line: mapping.originalLine,
- column: mapping.originalColumn
- });
- if (original.source != null) {
- // Copy mapping
- mapping.source = original.source;
- if (aSourceMapPath != null) {
- mapping.source = util.join(aSourceMapPath, mapping.source)
- }
- if (sourceRoot != null) {
- mapping.source = util.relative(sourceRoot, mapping.source);
- }
- mapping.originalLine = original.line;
- mapping.originalColumn = original.column;
- if (original.name != null) {
- mapping.name = original.name;
- }
- }
- }
-
- var source = mapping.source;
- if (source != null && !newSources.has(source)) {
- newSources.add(source);
- }
-
- var name = mapping.name;
- if (name != null && !newNames.has(name)) {
- newNames.add(name);
- }
-
- }, this);
- this._sources = newSources;
- this._names = newNames;
-
- // Copy sourcesContents of applied map.
- aSourceMapConsumer.sources.forEach(function (sourceFile) {
- var content = aSourceMapConsumer.sourceContentFor(sourceFile);
- if (content != null) {
- if (aSourceMapPath != null) {
- sourceFile = util.join(aSourceMapPath, sourceFile);
- }
- if (sourceRoot != null) {
- sourceFile = util.relative(sourceRoot, sourceFile);
- }
- this.setSourceContent(sourceFile, content);
- }
- }, this);
- };
-
- /**
- * A mapping can have one of the three levels of data:
- *
- * 1. Just the generated position.
- * 2. The Generated position, original position, and original source.
- * 3. Generated and original position, original source, as well as a name
- * token.
- *
- * To maintain consistency, we validate that any new mapping being added falls
- * in to one of these categories.
- */
- SourceMapGenerator.prototype._validateMapping =
- function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
- aName) {
- if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
- && aGenerated.line > 0 && aGenerated.column >= 0
- && !aOriginal && !aSource && !aName) {
- // Case 1.
- return;
- }
- else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
- && aOriginal && 'line' in aOriginal && 'column' in aOriginal
- && aGenerated.line > 0 && aGenerated.column >= 0
- && aOriginal.line > 0 && aOriginal.column >= 0
- && aSource) {
- // Cases 2 and 3.
- return;
- }
- else {
- throw new Error('Invalid mapping: ' + JSON.stringify({
- generated: aGenerated,
- source: aSource,
- original: aOriginal,
- name: aName
- }));
- }
- };
-
- /**
- * Serialize the accumulated mappings in to the stream of base 64 VLQs
- * specified by the source map format.
- */
- SourceMapGenerator.prototype._serializeMappings =
- function SourceMapGenerator_serializeMappings() {
- var previousGeneratedColumn = 0;
- var previousGeneratedLine = 1;
- var previousOriginalColumn = 0;
- var previousOriginalLine = 0;
- var previousName = 0;
- var previousSource = 0;
- var result = '';
- var mapping;
- var nameIdx;
- var sourceIdx;
-
- var mappings = this._mappings.toArray();
- for (var i = 0, len = mappings.length; i < len; i++) {
- mapping = mappings[i];
-
- if (mapping.generatedLine !== previousGeneratedLine) {
- previousGeneratedColumn = 0;
- while (mapping.generatedLine !== previousGeneratedLine) {
- result += ';';
- previousGeneratedLine++;
- }
- }
- else {
- if (i > 0) {
- if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
- continue;
- }
- result += ',';
- }
- }
-
- result += base64VLQ.encode(mapping.generatedColumn
- - previousGeneratedColumn);
- previousGeneratedColumn = mapping.generatedColumn;
-
- if (mapping.source != null) {
- sourceIdx = this._sources.indexOf(mapping.source);
- result += base64VLQ.encode(sourceIdx - previousSource);
- previousSource = sourceIdx;
-
- // lines are stored 0-based in SourceMap spec version 3
- result += base64VLQ.encode(mapping.originalLine - 1
- - previousOriginalLine);
- previousOriginalLine = mapping.originalLine - 1;
-
- result += base64VLQ.encode(mapping.originalColumn
- - previousOriginalColumn);
- previousOriginalColumn = mapping.originalColumn;
-
- if (mapping.name != null) {
- nameIdx = this._names.indexOf(mapping.name);
- result += base64VLQ.encode(nameIdx - previousName);
- previousName = nameIdx;
- }
- }
- }
-
- return result;
- };
-
- SourceMapGenerator.prototype._generateSourcesContent =
- function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
- return aSources.map(function (source) {
- if (!this._sourcesContents) {
- return null;
- }
- if (aSourceRoot != null) {
- source = util.relative(aSourceRoot, source);
- }
- var key = util.toSetString(source);
- return Object.prototype.hasOwnProperty.call(this._sourcesContents,
- key)
- ? this._sourcesContents[key]
- : null;
- }, this);
- };
-
- /**
- * Externalize the source map.
- */
- SourceMapGenerator.prototype.toJSON =
- function SourceMapGenerator_toJSON() {
- var map = {
- version: this._version,
- sources: this._sources.toArray(),
- names: this._names.toArray(),
- mappings: this._serializeMappings()
- };
- if (this._file != null) {
- map.file = this._file;
- }
- if (this._sourceRoot != null) {
- map.sourceRoot = this._sourceRoot;
- }
- if (this._sourcesContents) {
- map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
- }
-
- return map;
- };
-
- /**
- * Render the source map being generated to a string.
- */
- SourceMapGenerator.prototype.toString =
- function SourceMapGenerator_toString() {
- return JSON.stringify(this.toJSON());
- };
-
- exports.SourceMapGenerator = SourceMapGenerator;
- }
-
-
-/***/ },
-/* 2 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- *
- * Based on the Base 64 VLQ implementation in Closure Compiler:
- * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
- *
- * Copyright 2011 The Closure Compiler Authors. All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- {
- var base64 = __webpack_require__(3);
-
- // A single base 64 digit can contain 6 bits of data. For the base 64 variable
- // length quantities we use in the source map spec, the first bit is the sign,
- // the next four bits are the actual value, and the 6th bit is the
- // continuation bit. The continuation bit tells us whether there are more
- // digits in this value following this digit.
- //
- // Continuation
- // | Sign
- // | |
- // V V
- // 101011
-
- var VLQ_BASE_SHIFT = 5;
-
- // binary: 100000
- var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
-
- // binary: 011111
- var VLQ_BASE_MASK = VLQ_BASE - 1;
-
- // binary: 100000
- var VLQ_CONTINUATION_BIT = VLQ_BASE;
-
- /**
- * Converts from a two-complement value to a value where the sign bit is
- * placed in the least significant bit. For example, as decimals:
- * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
- * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
- */
- function toVLQSigned(aValue) {
- return aValue < 0
- ? ((-aValue) << 1) + 1
- : (aValue << 1) + 0;
- }
-
- /**
- * Converts to a two-complement value from a value where the sign bit is
- * placed in the least significant bit. For example, as decimals:
- * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
- * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
- */
- function fromVLQSigned(aValue) {
- var isNegative = (aValue & 1) === 1;
- var shifted = aValue >> 1;
- return isNegative
- ? -shifted
- : shifted;
- }
-
- /**
- * Returns the base 64 VLQ encoded value.
- */
- exports.encode = function base64VLQ_encode(aValue) {
- var encoded = "";
- var digit;
-
- var vlq = toVLQSigned(aValue);
-
- do {
- digit = vlq & VLQ_BASE_MASK;
- vlq >>>= VLQ_BASE_SHIFT;
- if (vlq > 0) {
- // There are still more digits in this value, so we must make sure the
- // continuation bit is marked.
- digit |= VLQ_CONTINUATION_BIT;
- }
- encoded += base64.encode(digit);
- } while (vlq > 0);
-
- return encoded;
- };
-
- /**
- * Decodes the next base 64 VLQ value from the given string and returns the
- * value and the rest of the string via the out parameter.
- */
- exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
- var strLen = aStr.length;
- var result = 0;
- var shift = 0;
- var continuation, digit;
-
- do {
- if (aIndex >= strLen) {
- throw new Error("Expected more digits in base 64 VLQ value.");
- }
-
- digit = base64.decode(aStr.charCodeAt(aIndex++));
- if (digit === -1) {
- throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
- }
-
- continuation = !!(digit & VLQ_CONTINUATION_BIT);
- digit &= VLQ_BASE_MASK;
- result = result + (digit << shift);
- shift += VLQ_BASE_SHIFT;
- } while (continuation);
-
- aOutParam.value = fromVLQSigned(result);
- aOutParam.rest = aIndex;
- };
- }
-
-
-/***/ },
-/* 3 */
-/***/ function(module, exports) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
-
- /**
- * Encode an integer in the range of 0 to 63 to a single base 64 digit.
- */
- exports.encode = function (number) {
- if (0 <= number && number < intToCharMap.length) {
- return intToCharMap[number];
- }
- throw new TypeError("Must be between 0 and 63: " + number);
- };
-
- /**
- * Decode a single base 64 character code digit to an integer. Returns -1 on
- * failure.
- */
- exports.decode = function (charCode) {
- var bigA = 65; // 'A'
- var bigZ = 90; // 'Z'
-
- var littleA = 97; // 'a'
- var littleZ = 122; // 'z'
-
- var zero = 48; // '0'
- var nine = 57; // '9'
-
- var plus = 43; // '+'
- var slash = 47; // '/'
-
- var littleOffset = 26;
- var numberOffset = 52;
-
- // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
- if (bigA <= charCode && charCode <= bigZ) {
- return (charCode - bigA);
- }
-
- // 26 - 51: abcdefghijklmnopqrstuvwxyz
- if (littleA <= charCode && charCode <= littleZ) {
- return (charCode - littleA + littleOffset);
- }
-
- // 52 - 61: 0123456789
- if (zero <= charCode && charCode <= nine) {
- return (charCode - zero + numberOffset);
- }
-
- // 62: +
- if (charCode == plus) {
- return 62;
- }
-
- // 63: /
- if (charCode == slash) {
- return 63;
- }
-
- // Invalid base64 digit.
- return -1;
- };
- }
-
-
-/***/ },
-/* 4 */
-/***/ function(module, exports) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- /**
- * This is a helper function for getting values from parameter/options
- * objects.
- *
- * @param args The object we are extracting values from
- * @param name The name of the property we are getting.
- * @param defaultValue An optional value to return if the property is missing
- * from the object. If this is not specified and the property is missing, an
- * error will be thrown.
- */
- function getArg(aArgs, aName, aDefaultValue) {
- if (aName in aArgs) {
- return aArgs[aName];
- } else if (arguments.length === 3) {
- return aDefaultValue;
- } else {
- throw new Error('"' + aName + '" is a required argument.');
- }
- }
- exports.getArg = getArg;
-
- var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
- var dataUrlRegexp = /^data:.+\,.+$/;
-
- function urlParse(aUrl) {
- var match = aUrl.match(urlRegexp);
- if (!match) {
- return null;
- }
- return {
- scheme: match[1],
- auth: match[2],
- host: match[3],
- port: match[4],
- path: match[5]
- };
- }
- exports.urlParse = urlParse;
-
- function urlGenerate(aParsedUrl) {
- var url = '';
- if (aParsedUrl.scheme) {
- url += aParsedUrl.scheme + ':';
- }
- url += '//';
- if (aParsedUrl.auth) {
- url += aParsedUrl.auth + '@';
- }
- if (aParsedUrl.host) {
- url += aParsedUrl.host;
- }
- if (aParsedUrl.port) {
- url += ":" + aParsedUrl.port
- }
- if (aParsedUrl.path) {
- url += aParsedUrl.path;
- }
- return url;
- }
- exports.urlGenerate = urlGenerate;
-
- /**
- * Normalizes a path, or the path portion of a URL:
- *
- * - Replaces consequtive slashes with one slash.
- * - Removes unnecessary '.' parts.
- * - Removes unnecessary '<dir>/..' parts.
- *
- * Based on code in the Node.js 'path' core module.
- *
- * @param aPath The path or url to normalize.
- */
- function normalize(aPath) {
- var path = aPath;
- var url = urlParse(aPath);
- if (url) {
- if (!url.path) {
- return aPath;
- }
- path = url.path;
- }
- var isAbsolute = exports.isAbsolute(path);
-
- var parts = path.split(/\/+/);
- for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
- part = parts[i];
- if (part === '.') {
- parts.splice(i, 1);
- } else if (part === '..') {
- up++;
- } else if (up > 0) {
- if (part === '') {
- // The first part is blank if the path is absolute. Trying to go
- // above the root is a no-op. Therefore we can remove all '..' parts
- // directly after the root.
- parts.splice(i + 1, up);
- up = 0;
- } else {
- parts.splice(i, 2);
- up--;
- }
- }
- }
- path = parts.join('/');
-
- if (path === '') {
- path = isAbsolute ? '/' : '.';
- }
-
- if (url) {
- url.path = path;
- return urlGenerate(url);
- }
- return path;
- }
- exports.normalize = normalize;
-
- /**
- * Joins two paths/URLs.
- *
- * @param aRoot The root path or URL.
- * @param aPath The path or URL to be joined with the root.
- *
- * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
- * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
- * first.
- * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
- * is updated with the result and aRoot is returned. Otherwise the result
- * is returned.
- * - If aPath is absolute, the result is aPath.
- * - Otherwise the two paths are joined with a slash.
- * - Joining for example 'http://' and 'www.example.com' is also supported.
- */
- function join(aRoot, aPath) {
- if (aRoot === "") {
- aRoot = ".";
- }
- if (aPath === "") {
- aPath = ".";
- }
- var aPathUrl = urlParse(aPath);
- var aRootUrl = urlParse(aRoot);
- if (aRootUrl) {
- aRoot = aRootUrl.path || '/';
- }
-
- // `join(foo, '//www.example.org')`
- if (aPathUrl && !aPathUrl.scheme) {
- if (aRootUrl) {
- aPathUrl.scheme = aRootUrl.scheme;
- }
- return urlGenerate(aPathUrl);
- }
-
- if (aPathUrl || aPath.match(dataUrlRegexp)) {
- return aPath;
- }
-
- // `join('http://', 'www.example.com')`
- if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
- aRootUrl.host = aPath;
- return urlGenerate(aRootUrl);
- }
-
- var joined = aPath.charAt(0) === '/'
- ? aPath
- : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
-
- if (aRootUrl) {
- aRootUrl.path = joined;
- return urlGenerate(aRootUrl);
- }
- return joined;
- }
- exports.join = join;
-
- exports.isAbsolute = function (aPath) {
- return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
- };
-
- /**
- * Make a path relative to a URL or another path.
- *
- * @param aRoot The root path or URL.
- * @param aPath The path or URL to be made relative to aRoot.
- */
- function relative(aRoot, aPath) {
- if (aRoot === "") {
- aRoot = ".";
- }
-
- aRoot = aRoot.replace(/\/$/, '');
-
- // It is possible for the path to be above the root. In this case, simply
- // checking whether the root is a prefix of the path won't work. Instead, we
- // need to remove components from the root one by one, until either we find
- // a prefix that fits, or we run out of components to remove.
- var level = 0;
- while (aPath.indexOf(aRoot + '/') !== 0) {
- var index = aRoot.lastIndexOf("/");
- if (index < 0) {
- return aPath;
- }
-
- // If the only part of the root that is left is the scheme (i.e. http://,
- // file:///, etc.), one or more slashes (/), or simply nothing at all, we
- // have exhausted all components, so the path is not relative to the root.
- aRoot = aRoot.slice(0, index);
- if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
- return aPath;
- }
-
- ++level;
- }
-
- // Make sure we add a "../" for each component we removed from the root.
- return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
- }
- exports.relative = relative;
-
- /**
- * Because behavior goes wacky when you set `__proto__` on objects, we
- * have to prefix all the strings in our set with an arbitrary character.
- *
- * See https://github.com/mozilla/source-map/pull/31 and
- * https://github.com/mozilla/source-map/issues/30
- *
- * @param String aStr
- */
- function toSetString(aStr) {
- return '$' + aStr;
- }
- exports.toSetString = toSetString;
-
- function fromSetString(aStr) {
- return aStr.substr(1);
- }
- exports.fromSetString = fromSetString;
-
- /**
- * Comparator between two mappings where the original positions are compared.
- *
- * Optionally pass in `true` as `onlyCompareGenerated` to consider two
- * mappings with the same original source/line/column, but different generated
- * line and column the same. Useful when searching for a mapping with a
- * stubbed out mapping.
- */
- function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
- var cmp = mappingA.source - mappingB.source;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalLine - mappingB.originalLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalColumn - mappingB.originalColumn;
- if (cmp !== 0 || onlyCompareOriginal) {
- return cmp;
- }
-
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.generatedLine - mappingB.generatedLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- return mappingA.name - mappingB.name;
- }
- exports.compareByOriginalPositions = compareByOriginalPositions;
-
- /**
- * Comparator between two mappings with deflated source and name indices where
- * the generated positions are compared.
- *
- * Optionally pass in `true` as `onlyCompareGenerated` to consider two
- * mappings with the same generated line and column, but different
- * source/name/original line and column the same. Useful when searching for a
- * mapping with a stubbed out mapping.
- */
- function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
- var cmp = mappingA.generatedLine - mappingB.generatedLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
- if (cmp !== 0 || onlyCompareGenerated) {
- return cmp;
- }
-
- cmp = mappingA.source - mappingB.source;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalLine - mappingB.originalLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalColumn - mappingB.originalColumn;
- if (cmp !== 0) {
- return cmp;
- }
-
- return mappingA.name - mappingB.name;
- }
- exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
-
- function strcmp(aStr1, aStr2) {
- if (aStr1 === aStr2) {
- return 0;
- }
-
- if (aStr1 > aStr2) {
- return 1;
- }
-
- return -1;
- }
-
- /**
- * Comparator between two mappings with inflated source and name strings where
- * the generated positions are compared.
- */
- function compareByGeneratedPositionsInflated(mappingA, mappingB) {
- var cmp = mappingA.generatedLine - mappingB.generatedLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = strcmp(mappingA.source, mappingB.source);
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalLine - mappingB.originalLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalColumn - mappingB.originalColumn;
- if (cmp !== 0) {
- return cmp;
- }
-
- return strcmp(mappingA.name, mappingB.name);
- }
- exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
- }
-
-
-/***/ },
-/* 5 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- var util = __webpack_require__(4);
-
- /**
- * A data structure which is a combination of an array and a set. Adding a new
- * member is O(1), testing for membership is O(1), and finding the index of an
- * element is O(1). Removing elements from the set is not supported. Only
- * strings are supported for membership.
- */
- function ArraySet() {
- this._array = [];
- this._set = {};
- }
-
- /**
- * Static method for creating ArraySet instances from an existing array.
- */
- ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
- var set = new ArraySet();
- for (var i = 0, len = aArray.length; i < len; i++) {
- set.add(aArray[i], aAllowDuplicates);
- }
- return set;
- };
-
- /**
- * Return how many unique items are in this ArraySet. If duplicates have been
- * added, than those do not count towards the size.
- *
- * @returns Number
- */
- ArraySet.prototype.size = function ArraySet_size() {
- return Object.getOwnPropertyNames(this._set).length;
- };
-
- /**
- * Add the given string to this set.
- *
- * @param String aStr
- */
- ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
- var sStr = util.toSetString(aStr);
- var isDuplicate = this._set.hasOwnProperty(sStr);
- var idx = this._array.length;
- if (!isDuplicate || aAllowDuplicates) {
- this._array.push(aStr);
- }
- if (!isDuplicate) {
- this._set[sStr] = idx;
- }
- };
-
- /**
- * Is the given string a member of this set?
- *
- * @param String aStr
- */
- ArraySet.prototype.has = function ArraySet_has(aStr) {
- var sStr = util.toSetString(aStr);
- return this._set.hasOwnProperty(sStr);
- };
-
- /**
- * What is the index of the given string in the array?
- *
- * @param String aStr
- */
- ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
- var sStr = util.toSetString(aStr);
- if (this._set.hasOwnProperty(sStr)) {
- return this._set[sStr];
- }
- throw new Error('"' + aStr + '" is not in the set.');
- };
-
- /**
- * What is the element at the given index?
- *
- * @param Number aIdx
- */
- ArraySet.prototype.at = function ArraySet_at(aIdx) {
- if (aIdx >= 0 && aIdx < this._array.length) {
- return this._array[aIdx];
- }
- throw new Error('No element indexed by ' + aIdx);
- };
-
- /**
- * Returns the array representation of this set (which has the proper indices
- * indicated by indexOf). Note that this is a copy of the internal array used
- * for storing the members so that no one can mess with internal state.
- */
- ArraySet.prototype.toArray = function ArraySet_toArray() {
- return this._array.slice();
- };
-
- exports.ArraySet = ArraySet;
- }
-
-
-/***/ },
-/* 6 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2014 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- var util = __webpack_require__(4);
-
- /**
- * Determine whether mappingB is after mappingA with respect to generated
- * position.
- */
- function generatedPositionAfter(mappingA, mappingB) {
- // Optimized for most common case
- var lineA = mappingA.generatedLine;
- var lineB = mappingB.generatedLine;
- var columnA = mappingA.generatedColumn;
- var columnB = mappingB.generatedColumn;
- return lineB > lineA || lineB == lineA && columnB >= columnA ||
- util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
- }
-
- /**
- * A data structure to provide a sorted view of accumulated mappings in a
- * performance conscious manner. It trades a neglibable overhead in general
- * case for a large speedup in case of mappings being added in order.
- */
- function MappingList() {
- this._array = [];
- this._sorted = true;
- // Serves as infimum
- this._last = {generatedLine: -1, generatedColumn: 0};
- }
-
- /**
- * Iterate through internal items. This method takes the same arguments that
- * `Array.prototype.forEach` takes.
- *
- * NOTE: The order of the mappings is NOT guaranteed.
- */
- MappingList.prototype.unsortedForEach =
- function MappingList_forEach(aCallback, aThisArg) {
- this._array.forEach(aCallback, aThisArg);
- };
-
- /**
- * Add the given source mapping.
- *
- * @param Object aMapping
- */
- MappingList.prototype.add = function MappingList_add(aMapping) {
- if (generatedPositionAfter(this._last, aMapping)) {
- this._last = aMapping;
- this._array.push(aMapping);
- } else {
- this._sorted = false;
- this._array.push(aMapping);
- }
- };
-
- /**
- * Returns the flat, sorted array of mappings. The mappings are sorted by
- * generated position.
- *
- * WARNING: This method returns internal data without copying, for
- * performance. The return value must NOT be mutated, and should be treated as
- * an immutable borrow. If you want to take ownership, you must make your own
- * copy.
- */
- MappingList.prototype.toArray = function MappingList_toArray() {
- if (!this._sorted) {
- this._array.sort(util.compareByGeneratedPositionsInflated);
- this._sorted = true;
- }
- return this._array;
- };
-
- exports.MappingList = MappingList;
- }
-
-
-/***/ },
-/* 7 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- var util = __webpack_require__(4);
- var binarySearch = __webpack_require__(8);
- var ArraySet = __webpack_require__(5).ArraySet;
- var base64VLQ = __webpack_require__(2);
- var quickSort = __webpack_require__(9).quickSort;
-
- function SourceMapConsumer(aSourceMap) {
- var sourceMap = aSourceMap;
- if (typeof aSourceMap === 'string') {
- sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
- }
-
- return sourceMap.sections != null
- ? new IndexedSourceMapConsumer(sourceMap)
- : new BasicSourceMapConsumer(sourceMap);
- }
-
- SourceMapConsumer.fromSourceMap = function(aSourceMap) {
- return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
- }
-
- /**
- * The version of the source mapping spec that we are consuming.
- */
- SourceMapConsumer.prototype._version = 3;
-
- // `__generatedMappings` and `__originalMappings` are arrays that hold the
- // parsed mapping coordinates from the source map's "mappings" attribute. They
- // are lazily instantiated, accessed via the `_generatedMappings` and
- // `_originalMappings` getters respectively, and we only parse the mappings
- // and create these arrays once queried for a source location. We jump through
- // these hoops because there can be many thousands of mappings, and parsing
- // them is expensive, so we only want to do it if we must.
- //
- // Each object in the arrays is of the form:
- //
- // {
- // generatedLine: The line number in the generated code,
- // generatedColumn: The column number in the generated code,
- // source: The path to the original source file that generated this
- // chunk of code,
- // originalLine: The line number in the original source that
- // corresponds to this chunk of generated code,
- // originalColumn: The column number in the original source that
- // corresponds to this chunk of generated code,
- // name: The name of the original symbol which generated this chunk of
- // code.
- // }
- //
- // All properties except for `generatedLine` and `generatedColumn` can be
- // `null`.
- //
- // `_generatedMappings` is ordered by the generated positions.
- //
- // `_originalMappings` is ordered by the original positions.
-
- SourceMapConsumer.prototype.__generatedMappings = null;
- Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
- get: function () {
- if (!this.__generatedMappings) {
- this._parseMappings(this._mappings, this.sourceRoot);
- }
-
- return this.__generatedMappings;
- }
- });
-
- SourceMapConsumer.prototype.__originalMappings = null;
- Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
- get: function () {
- if (!this.__originalMappings) {
- this._parseMappings(this._mappings, this.sourceRoot);
- }
-
- return this.__originalMappings;
- }
- });
-
- SourceMapConsumer.prototype._charIsMappingSeparator =
- function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
- var c = aStr.charAt(index);
- return c === ";" || c === ",";
- };
-
- /**
- * Parse the mappings in a string in to a data structure which we can easily
- * query (the ordered arrays in the `this.__generatedMappings` and
- * `this.__originalMappings` properties).
- */
- SourceMapConsumer.prototype._parseMappings =
- function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
- throw new Error("Subclasses must implement _parseMappings");
- };
-
- SourceMapConsumer.GENERATED_ORDER = 1;
- SourceMapConsumer.ORIGINAL_ORDER = 2;
-
- SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
- SourceMapConsumer.LEAST_UPPER_BOUND = 2;
-
- /**
- * Iterate over each mapping between an original source/line/column and a
- * generated line/column in this source map.
- *
- * @param Function aCallback
- * The function that is called with each mapping.
- * @param Object aContext
- * Optional. If specified, this object will be the value of `this` every
- * time that `aCallback` is called.
- * @param aOrder
- * Either `SourceMapConsumer.GENERATED_ORDER` or
- * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
- * iterate over the mappings sorted by the generated file's line/column
- * order or the original's source/line/column order, respectively. Defaults to
- * `SourceMapConsumer.GENERATED_ORDER`.
- */
- SourceMapConsumer.prototype.eachMapping =
- function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
- var context = aContext || null;
- var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
-
- var mappings;
- switch (order) {
- case SourceMapConsumer.GENERATED_ORDER:
- mappings = this._generatedMappings;
- break;
- case SourceMapConsumer.ORIGINAL_ORDER:
- mappings = this._originalMappings;
- break;
- default:
- throw new Error("Unknown order of iteration.");
- }
-
- var sourceRoot = this.sourceRoot;
- mappings.map(function (mapping) {
- var source = mapping.source === null ? null : this._sources.at(mapping.source);
- if (source != null && sourceRoot != null) {
- source = util.join(sourceRoot, source);
- }
- return {
- source: source,
- generatedLine: mapping.generatedLine,
- generatedColumn: mapping.generatedColumn,
- originalLine: mapping.originalLine,
- originalColumn: mapping.originalColumn,
- name: mapping.name === null ? null : this._names.at(mapping.name)
- };
- }, this).forEach(aCallback, context);
- };
-
- /**
- * Returns all generated line and column information for the original source,
- * line, and column provided. If no column is provided, returns all mappings
- * corresponding to a either the line we are searching for or the next
- * closest line that has any mappings. Otherwise, returns all mappings
- * corresponding to the given line and either the column we are searching for
- * or the next closest column that has any offsets.
- *
- * The only argument is an object with the following properties:
- *
- * - source: The filename of the original source.
- * - line: The line number in the original source.
- * - column: Optional. the column number in the original source.
- *
- * and an array of objects is returned, each with the following properties:
- *
- * - line: The line number in the generated source, or null.
- * - column: The column number in the generated source, or null.
- */
- SourceMapConsumer.prototype.allGeneratedPositionsFor =
- function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
- var line = util.getArg(aArgs, 'line');
-
- // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
- // returns the index of the closest mapping less than the needle. By
- // setting needle.originalColumn to 0, we thus find the last mapping for
- // the given line, provided such a mapping exists.
- var needle = {
- source: util.getArg(aArgs, 'source'),
- originalLine: line,
- originalColumn: util.getArg(aArgs, 'column', 0)
- };
-
- if (this.sourceRoot != null) {
- needle.source = util.relative(this.sourceRoot, needle.source);
- }
- if (!this._sources.has(needle.source)) {
- return [];
- }
- needle.source = this._sources.indexOf(needle.source);
-
- var mappings = [];
-
- var index = this._findMapping(needle,
- this._originalMappings,
- "originalLine",
- "originalColumn",
- util.compareByOriginalPositions,
- binarySearch.LEAST_UPPER_BOUND);
- if (index >= 0) {
- var mapping = this._originalMappings[index];
-
- if (aArgs.column === undefined) {
- var originalLine = mapping.originalLine;
-
- // Iterate until either we run out of mappings, or we run into
- // a mapping for a different line than the one we found. Since
- // mappings are sorted, this is guaranteed to find all mappings for
- // the line we found.
- while (mapping && mapping.originalLine === originalLine) {
- mappings.push({
- line: util.getArg(mapping, 'generatedLine', null),
- column: util.getArg(mapping, 'generatedColumn', null),
- lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
- });
-
- mapping = this._originalMappings[++index];
- }
- } else {
- var originalColumn = mapping.originalColumn;
-
- // Iterate until either we run out of mappings, or we run into
- // a mapping for a different line than the one we were searching for.
- // Since mappings are sorted, this is guaranteed to find all mappings for
- // the line we are searching for.
- while (mapping &&
- mapping.originalLine === line &&
- mapping.originalColumn == originalColumn) {
- mappings.push({
- line: util.getArg(mapping, 'generatedLine', null),
- column: util.getArg(mapping, 'generatedColumn', null),
- lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
- });
-
- mapping = this._originalMappings[++index];
- }
- }
- }
-
- return mappings;
- };
-
- exports.SourceMapConsumer = SourceMapConsumer;
-
- /**
- * A BasicSourceMapConsumer instance represents a parsed source map which we can
- * query for information about the original file positions by giving it a file
- * position in the generated source.
- *
- * The only parameter is the raw source map (either as a JSON string, or
- * already parsed to an object). According to the spec, source maps have the
- * following attributes:
- *
- * - version: Which version of the source map spec this map is following.
- * - sources: An array of URLs to the original source files.
- * - names: An array of identifiers which can be referrenced by individual mappings.
- * - sourceRoot: Optional. The URL root from which all sources are relative.
- * - sourcesContent: Optional. An array of contents of the original source files.
- * - mappings: A string of base64 VLQs which contain the actual mappings.
- * - file: Optional. The generated file this source map is associated with.
- *
- * Here is an example source map, taken from the source map spec[0]:
- *
- * {
- * version : 3,
- * file: "out.js",
- * sourceRoot : "",
- * sources: ["foo.js", "bar.js"],
- * names: ["src", "maps", "are", "fun"],
- * mappings: "AA,AB;;ABCDE;"
- * }
- *
- * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
- */
- function BasicSourceMapConsumer(aSourceMap) {
- var sourceMap = aSourceMap;
- if (typeof aSourceMap === 'string') {
- sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
- }
-
- var version = util.getArg(sourceMap, 'version');
- var sources = util.getArg(sourceMap, 'sources');
- // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
- // requires the array) to play nice here.
- var names = util.getArg(sourceMap, 'names', []);
- var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
- var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
- var mappings = util.getArg(sourceMap, 'mappings');
- var file = util.getArg(sourceMap, 'file', null);
-
- // Once again, Sass deviates from the spec and supplies the version as a
- // string rather than a number, so we use loose equality checking here.
- if (version != this._version) {
- throw new Error('Unsupported version: ' + version);
- }
-
- sources = sources
- // Some source maps produce relative source paths like "./foo.js" instead of
- // "foo.js". Normalize these first so that future comparisons will succeed.
- // See bugzil.la/1090768.
- .map(util.normalize)
- // Always ensure that absolute sources are internally stored relative to
- // the source root, if the source root is absolute. Not doing this would
- // be particularly problematic when the source root is a prefix of the
- // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
- .map(function (source) {
- return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)
- ? util.relative(sourceRoot, source)
- : source;
- });
-
- // Pass `true` below to allow duplicate names and sources. While source maps
- // are intended to be compressed and deduplicated, the TypeScript compiler
- // sometimes generates source maps with duplicates in them. See Github issue
- // #72 and bugzil.la/889492.
- this._names = ArraySet.fromArray(names, true);
- this._sources = ArraySet.fromArray(sources, true);
-
- this.sourceRoot = sourceRoot;
- this.sourcesContent = sourcesContent;
- this._mappings = mappings;
- this.file = file;
- }
-
- BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
- BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
-
- /**
- * Create a BasicSourceMapConsumer from a SourceMapGenerator.
- *
- * @param SourceMapGenerator aSourceMap
- * The source map that will be consumed.
- * @returns BasicSourceMapConsumer
- */
- BasicSourceMapConsumer.fromSourceMap =
- function SourceMapConsumer_fromSourceMap(aSourceMap) {
- var smc = Object.create(BasicSourceMapConsumer.prototype);
-
- var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
- var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
- smc.sourceRoot = aSourceMap._sourceRoot;
- smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
- smc.sourceRoot);
- smc.file = aSourceMap._file;
-
- // Because we are modifying the entries (by converting string sources and
- // names to indices into the sources and names ArraySets), we have to make
- // a copy of the entry or else bad things happen. Shared mutable state
- // strikes again! See github issue #191.
-
- var generatedMappings = aSourceMap._mappings.toArray().slice();
- var destGeneratedMappings = smc.__generatedMappings = [];
- var destOriginalMappings = smc.__originalMappings = [];
-
- for (var i = 0, length = generatedMappings.length; i < length; i++) {
- var srcMapping = generatedMappings[i];
- var destMapping = new Mapping;
- destMapping.generatedLine = srcMapping.generatedLine;
- destMapping.generatedColumn = srcMapping.generatedColumn;
-
- if (srcMapping.source) {
- destMapping.source = sources.indexOf(srcMapping.source);
- destMapping.originalLine = srcMapping.originalLine;
- destMapping.originalColumn = srcMapping.originalColumn;
-
- if (srcMapping.name) {
- destMapping.name = names.indexOf(srcMapping.name);
- }
-
- destOriginalMappings.push(destMapping);
- }
-
- destGeneratedMappings.push(destMapping);
- }
-
- quickSort(smc.__originalMappings, util.compareByOriginalPositions);
-
- return smc;
- };
-
- /**
- * The version of the source mapping spec that we are consuming.
- */
- BasicSourceMapConsumer.prototype._version = 3;
-
- /**
- * The list of original sources.
- */
- Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
- get: function () {
- return this._sources.toArray().map(function (s) {
- return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
- }, this);
- }
- });
-
- /**
- * Provide the JIT with a nice shape / hidden class.
- */
- function Mapping() {
- this.generatedLine = 0;
- this.generatedColumn = 0;
- this.source = null;
- this.originalLine = null;
- this.originalColumn = null;
- this.name = null;
- }
-
- /**
- * Parse the mappings in a string in to a data structure which we can easily
- * query (the ordered arrays in the `this.__generatedMappings` and
- * `this.__originalMappings` properties).
- */
- BasicSourceMapConsumer.prototype._parseMappings =
- function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
- var generatedLine = 1;
- var previousGeneratedColumn = 0;
- var previousOriginalLine = 0;
- var previousOriginalColumn = 0;
- var previousSource = 0;
- var previousName = 0;
- var length = aStr.length;
- var index = 0;
- var cachedSegments = {};
- var temp = {};
- var originalMappings = [];
- var generatedMappings = [];
- var mapping, str, segment, end, value;
-
- while (index < length) {
- if (aStr.charAt(index) === ';') {
- generatedLine++;
- index++;
- previousGeneratedColumn = 0;
- }
- else if (aStr.charAt(index) === ',') {
- index++;
- }
- else {
- mapping = new Mapping();
- mapping.generatedLine = generatedLine;
-
- // Because each offset is encoded relative to the previous one,
- // many segments often have the same encoding. We can exploit this
- // fact by caching the parsed variable length fields of each segment,
- // allowing us to avoid a second parse if we encounter the same
- // segment again.
- for (end = index; end < length; end++) {
- if (this._charIsMappingSeparator(aStr, end)) {
- break;
- }
- }
- str = aStr.slice(index, end);
-
- segment = cachedSegments[str];
- if (segment) {
- index += str.length;
- } else {
- segment = [];
- while (index < end) {
- base64VLQ.decode(aStr, index, temp);
- value = temp.value;
- index = temp.rest;
- segment.push(value);
- }
-
- if (segment.length === 2) {
- throw new Error('Found a source, but no line and column');
- }
-
- if (segment.length === 3) {
- throw new Error('Found a source and line, but no column');
- }
-
- cachedSegments[str] = segment;
- }
-
- // Generated column.
- mapping.generatedColumn = previousGeneratedColumn + segment[0];
- previousGeneratedColumn = mapping.generatedColumn;
-
- if (segment.length > 1) {
- // Original source.
- mapping.source = previousSource + segment[1];
- previousSource += segment[1];
-
- // Original line.
- mapping.originalLine = previousOriginalLine + segment[2];
- previousOriginalLine = mapping.originalLine;
- // Lines are stored 0-based
- mapping.originalLine += 1;
-
- // Original column.
- mapping.originalColumn = previousOriginalColumn + segment[3];
- previousOriginalColumn = mapping.originalColumn;
-
- if (segment.length > 4) {
- // Original name.
- mapping.name = previousName + segment[4];
- previousName += segment[4];
- }
- }
-
- generatedMappings.push(mapping);
- if (typeof mapping.originalLine === 'number') {
- originalMappings.push(mapping);
- }
- }
- }
-
- quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
- this.__generatedMappings = generatedMappings;
-
- quickSort(originalMappings, util.compareByOriginalPositions);
- this.__originalMappings = originalMappings;
- };
-
- /**
- * Find the mapping that best matches the hypothetical "needle" mapping that
- * we are searching for in the given "haystack" of mappings.
- */
- BasicSourceMapConsumer.prototype._findMapping =
- function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
- aColumnName, aComparator, aBias) {
- // To return the position we are searching for, we must first find the
- // mapping for the given position and then return the opposite position it
- // points to. Because the mappings are sorted, we can use binary search to
- // find the best mapping.
-
- if (aNeedle[aLineName] <= 0) {
- throw new TypeError('Line must be greater than or equal to 1, got '
- + aNeedle[aLineName]);
- }
- if (aNeedle[aColumnName] < 0) {
- throw new TypeError('Column must be greater than or equal to 0, got '
- + aNeedle[aColumnName]);
- }
-
- return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
- };
-
- /**
- * Compute the last column for each generated mapping. The last column is
- * inclusive.
- */
- BasicSourceMapConsumer.prototype.computeColumnSpans =
- function SourceMapConsumer_computeColumnSpans() {
- for (var index = 0; index < this._generatedMappings.length; ++index) {
- var mapping = this._generatedMappings[index];
-
- // Mappings do not contain a field for the last generated columnt. We
- // can come up with an optimistic estimate, however, by assuming that
- // mappings are contiguous (i.e. given two consecutive mappings, the
- // first mapping ends where the second one starts).
- if (index + 1 < this._generatedMappings.length) {
- var nextMapping = this._generatedMappings[index + 1];
-
- if (mapping.generatedLine === nextMapping.generatedLine) {
- mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
- continue;
- }
- }
-
- // The last mapping for each line spans the entire line.
- mapping.lastGeneratedColumn = Infinity;
- }
- };
-
- /**
- * Returns the original source, line, and column information for the generated
- * source's line and column positions provided. The only argument is an object
- * with the following properties:
- *
- * - line: The line number in the generated source.
- * - column: The column number in the generated source.
- * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
- * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
- *
- * and an object is returned with the following properties:
- *
- * - source: The original source file, or null.
- * - line: The line number in the original source, or null.
- * - column: The column number in the original source, or null.
- * - name: The original identifier, or null.
- */
- BasicSourceMapConsumer.prototype.originalPositionFor =
- function SourceMapConsumer_originalPositionFor(aArgs) {
- var needle = {
- generatedLine: util.getArg(aArgs, 'line'),
- generatedColumn: util.getArg(aArgs, 'column')
- };
-
- var index = this._findMapping(
- needle,
- this._generatedMappings,
- "generatedLine",
- "generatedColumn",
- util.compareByGeneratedPositionsDeflated,
- util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
- );
-
- if (index >= 0) {
- var mapping = this._generatedMappings[index];
-
- if (mapping.generatedLine === needle.generatedLine) {
- var source = util.getArg(mapping, 'source', null);
- if (source !== null) {
- source = this._sources.at(source);
- if (this.sourceRoot != null) {
- source = util.join(this.sourceRoot, source);
- }
- }
- var name = util.getArg(mapping, 'name', null);
- if (name !== null) {
- name = this._names.at(name);
- }
- return {
- source: source,
- line: util.getArg(mapping, 'originalLine', null),
- column: util.getArg(mapping, 'originalColumn', null),
- name: name
- };
- }
- }
-
- return {
- source: null,
- line: null,
- column: null,
- name: null
- };
- };
-
- /**
- * Return true if we have the source content for every source in the source
- * map, false otherwise.
- */
- BasicSourceMapConsumer.prototype.hasContentsOfAllSources =
- function BasicSourceMapConsumer_hasContentsOfAllSources() {
- if (!this.sourcesContent) {
- return false;
- }
- return this.sourcesContent.length >= this._sources.size() &&
- !this.sourcesContent.some(function (sc) { return sc == null; });
- };
-
- /**
- * Returns the original source content. The only argument is the url of the
- * original source file. Returns null if no original source content is
- * available.
- */
- BasicSourceMapConsumer.prototype.sourceContentFor =
- function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
- if (!this.sourcesContent) {
- return null;
- }
-
- if (this.sourceRoot != null) {
- aSource = util.relative(this.sourceRoot, aSource);
- }
-
- if (this._sources.has(aSource)) {
- return this.sourcesContent[this._sources.indexOf(aSource)];
- }
-
- var url;
- if (this.sourceRoot != null
- && (url = util.urlParse(this.sourceRoot))) {
- // XXX: file:// URIs and absolute paths lead to unexpected behavior for
- // many users. We can help them out when they expect file:// URIs to
- // behave like it would if they were running a local HTTP server. See
- // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
- var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
- if (url.scheme == "file"
- && this._sources.has(fileUriAbsPath)) {
- return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
- }
-
- if ((!url.path || url.path == "/")
- && this._sources.has("/" + aSource)) {
- return this.sourcesContent[this._sources.indexOf("/" + aSource)];
- }
- }
-
- // This function is used recursively from
- // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
- // don't want to throw if we can't find the source - we just want to
- // return null, so we provide a flag to exit gracefully.
- if (nullOnMissing) {
- return null;
- }
- else {
- throw new Error('"' + aSource + '" is not in the SourceMap.');
- }
- };
-
- /**
- * Returns the generated line and column information for the original source,
- * line, and column positions provided. The only argument is an object with
- * the following properties:
- *
- * - source: The filename of the original source.
- * - line: The line number in the original source.
- * - column: The column number in the original source.
- * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
- * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
- *
- * and an object is returned with the following properties:
- *
- * - line: The line number in the generated source, or null.
- * - column: The column number in the generated source, or null.
- */
- BasicSourceMapConsumer.prototype.generatedPositionFor =
- function SourceMapConsumer_generatedPositionFor(aArgs) {
- var source = util.getArg(aArgs, 'source');
- if (this.sourceRoot != null) {
- source = util.relative(this.sourceRoot, source);
- }
- if (!this._sources.has(source)) {
- return {
- line: null,
- column: null,
- lastColumn: null
- };
- }
- source = this._sources.indexOf(source);
-
- var needle = {
- source: source,
- originalLine: util.getArg(aArgs, 'line'),
- originalColumn: util.getArg(aArgs, 'column')
- };
-
- var index = this._findMapping(
- needle,
- this._originalMappings,
- "originalLine",
- "originalColumn",
- util.compareByOriginalPositions,
- util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
- );
-
- if (index >= 0) {
- var mapping = this._originalMappings[index];
-
- if (mapping.source === needle.source) {
- return {
- line: util.getArg(mapping, 'generatedLine', null),
- column: util.getArg(mapping, 'generatedColumn', null),
- lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
- };
- }
- }
-
- return {
- line: null,
- column: null,
- lastColumn: null
- };
- };
-
- exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
-
- /**
- * An IndexedSourceMapConsumer instance represents a parsed source map which
- * we can query for information. It differs from BasicSourceMapConsumer in
- * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
- * input.
- *
- * The only parameter is a raw source map (either as a JSON string, or already
- * parsed to an object). According to the spec for indexed source maps, they
- * have the following attributes:
- *
- * - version: Which version of the source map spec this map is following.
- * - file: Optional. The generated file this source map is associated with.
- * - sections: A list of section definitions.
- *
- * Each value under the "sections" field has two fields:
- * - offset: The offset into the original specified at which this section
- * begins to apply, defined as an object with a "line" and "column"
- * field.
- * - map: A source map definition. This source map could also be indexed,
- * but doesn't have to be.
- *
- * Instead of the "map" field, it's also possible to have a "url" field
- * specifying a URL to retrieve a source map from, but that's currently
- * unsupported.
- *
- * Here's an example source map, taken from the source map spec[0], but
- * modified to omit a section which uses the "url" field.
- *
- * {
- * version : 3,
- * file: "app.js",
- * sections: [{
- * offset: {line:100, column:10},
- * map: {
- * version : 3,
- * file: "section.js",
- * sources: ["foo.js", "bar.js"],
- * names: ["src", "maps", "are", "fun"],
- * mappings: "AAAA,E;;ABCDE;"
- * }
- * }],
- * }
- *
- * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
- */
- function IndexedSourceMapConsumer(aSourceMap) {
- var sourceMap = aSourceMap;
- if (typeof aSourceMap === 'string') {
- sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
- }
-
- var version = util.getArg(sourceMap, 'version');
- var sections = util.getArg(sourceMap, 'sections');
-
- if (version != this._version) {
- throw new Error('Unsupported version: ' + version);
- }
-
- this._sources = new ArraySet();
- this._names = new ArraySet();
-
- var lastOffset = {
- line: -1,
- column: 0
- };
- this._sections = sections.map(function (s) {
- if (s.url) {
- // The url field will require support for asynchronicity.
- // See https://github.com/mozilla/source-map/issues/16
- throw new Error('Support for url field in sections not implemented.');
- }
- var offset = util.getArg(s, 'offset');
- var offsetLine = util.getArg(offset, 'line');
- var offsetColumn = util.getArg(offset, 'column');
-
- if (offsetLine < lastOffset.line ||
- (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
- throw new Error('Section offsets must be ordered and non-overlapping.');
- }
- lastOffset = offset;
-
- return {
- generatedOffset: {
- // The offset fields are 0-based, but we use 1-based indices when
- // encoding/decoding from VLQ.
- generatedLine: offsetLine + 1,
- generatedColumn: offsetColumn + 1
- },
- consumer: new SourceMapConsumer(util.getArg(s, 'map'))
- }
- });
- }
-
- IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
- IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
-
- /**
- * The version of the source mapping spec that we are consuming.
- */
- IndexedSourceMapConsumer.prototype._version = 3;
-
- /**
- * The list of original sources.
- */
- Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
- get: function () {
- var sources = [];
- for (var i = 0; i < this._sections.length; i++) {
- for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
- sources.push(this._sections[i].consumer.sources[j]);
- }
- }
- return sources;
- }
- });
-
- /**
- * Returns the original source, line, and column information for the generated
- * source's line and column positions provided. The only argument is an object
- * with the following properties:
- *
- * - line: The line number in the generated source.
- * - column: The column number in the generated source.
- *
- * and an object is returned with the following properties:
- *
- * - source: The original source file, or null.
- * - line: The line number in the original source, or null.
- * - column: The column number in the original source, or null.
- * - name: The original identifier, or null.
- */
- IndexedSourceMapConsumer.prototype.originalPositionFor =
- function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
- var needle = {
- generatedLine: util.getArg(aArgs, 'line'),
- generatedColumn: util.getArg(aArgs, 'column')
- };
-
- // Find the section containing the generated position we're trying to map
- // to an original position.
- var sectionIndex = binarySearch.search(needle, this._sections,
- function(needle, section) {
- var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
- if (cmp) {
- return cmp;
- }
-
- return (needle.generatedColumn -
- section.generatedOffset.generatedColumn);
- });
- var section = this._sections[sectionIndex];
-
- if (!section) {
- return {
- source: null,
- line: null,
- column: null,
- name: null
- };
- }
-
- return section.consumer.originalPositionFor({
- line: needle.generatedLine -
- (section.generatedOffset.generatedLine - 1),
- column: needle.generatedColumn -
- (section.generatedOffset.generatedLine === needle.generatedLine
- ? section.generatedOffset.generatedColumn - 1
- : 0),
- bias: aArgs.bias
- });
- };
-
- /**
- * Return true if we have the source content for every source in the source
- * map, false otherwise.
- */
- IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =
- function IndexedSourceMapConsumer_hasContentsOfAllSources() {
- return this._sections.every(function (s) {
- return s.consumer.hasContentsOfAllSources();
- });
- };
-
- /**
- * Returns the original source content. The only argument is the url of the
- * original source file. Returns null if no original source content is
- * available.
- */
- IndexedSourceMapConsumer.prototype.sourceContentFor =
- function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
- for (var i = 0; i < this._sections.length; i++) {
- var section = this._sections[i];
-
- var content = section.consumer.sourceContentFor(aSource, true);
- if (content) {
- return content;
- }
- }
- if (nullOnMissing) {
- return null;
- }
- else {
- throw new Error('"' + aSource + '" is not in the SourceMap.');
- }
- };
-
- /**
- * Returns the generated line and column information for the original source,
- * line, and column positions provided. The only argument is an object with
- * the following properties:
- *
- * - source: The filename of the original source.
- * - line: The line number in the original source.
- * - column: The column number in the original source.
- *
- * and an object is returned with the following properties:
- *
- * - line: The line number in the generated source, or null.
- * - column: The column number in the generated source, or null.
- */
- IndexedSourceMapConsumer.prototype.generatedPositionFor =
- function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
- for (var i = 0; i < this._sections.length; i++) {
- var section = this._sections[i];
-
- // Only consider this section if the requested source is in the list of
- // sources of the consumer.
- if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
- continue;
- }
- var generatedPosition = section.consumer.generatedPositionFor(aArgs);
- if (generatedPosition) {
- var ret = {
- line: generatedPosition.line +
- (section.generatedOffset.generatedLine - 1),
- column: generatedPosition.column +
- (section.generatedOffset.generatedLine === generatedPosition.line
- ? section.generatedOffset.generatedColumn - 1
- : 0)
- };
- return ret;
- }
- }
-
- return {
- line: null,
- column: null
- };
- };
-
- /**
- * Parse the mappings in a string in to a data structure which we can easily
- * query (the ordered arrays in the `this.__generatedMappings` and
- * `this.__originalMappings` properties).
- */
- IndexedSourceMapConsumer.prototype._parseMappings =
- function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
- this.__generatedMappings = [];
- this.__originalMappings = [];
- for (var i = 0; i < this._sections.length; i++) {
- var section = this._sections[i];
- var sectionMappings = section.consumer._generatedMappings;
- for (var j = 0; j < sectionMappings.length; j++) {
- var mapping = sectionMappings[j];
-
- var source = section.consumer._sources.at(mapping.source);
- if (section.consumer.sourceRoot !== null) {
- source = util.join(section.consumer.sourceRoot, source);
- }
- this._sources.add(source);
- source = this._sources.indexOf(source);
-
- var name = section.consumer._names.at(mapping.name);
- this._names.add(name);
- name = this._names.indexOf(name);
-
- // The mappings coming from the consumer for the section have
- // generated positions relative to the start of the section, so we
- // need to offset them to be relative to the start of the concatenated
- // generated file.
- var adjustedMapping = {
- source: source,
- generatedLine: mapping.generatedLine +
- (section.generatedOffset.generatedLine - 1),
- generatedColumn: mapping.generatedColumn +
- (section.generatedOffset.generatedLine === mapping.generatedLine
- ? section.generatedOffset.generatedColumn - 1
- : 0),
- originalLine: mapping.originalLine,
- originalColumn: mapping.originalColumn,
- name: name
- };
-
- this.__generatedMappings.push(adjustedMapping);
- if (typeof adjustedMapping.originalLine === 'number') {
- this.__originalMappings.push(adjustedMapping);
- }
- }
- }
-
- quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
- quickSort(this.__originalMappings, util.compareByOriginalPositions);
- };
-
- exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
- }
-
-
-/***/ },
-/* 8 */
-/***/ function(module, exports) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- exports.GREATEST_LOWER_BOUND = 1;
- exports.LEAST_UPPER_BOUND = 2;
-
- /**
- * Recursive implementation of binary search.
- *
- * @param aLow Indices here and lower do not contain the needle.
- * @param aHigh Indices here and higher do not contain the needle.
- * @param aNeedle The element being searched for.
- * @param aHaystack The non-empty array being searched.
- * @param aCompare Function which takes two elements and returns -1, 0, or 1.
- * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
- * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- */
- function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
- // This function terminates when one of the following is true:
- //
- // 1. We find the exact element we are looking for.
- //
- // 2. We did not find the exact element, but we can return the index of
- // the next-closest element.
- //
- // 3. We did not find the exact element, and there is no next-closest
- // element than the one we are searching for, so we return -1.
- var mid = Math.floor((aHigh - aLow) / 2) + aLow;
- var cmp = aCompare(aNeedle, aHaystack[mid], true);
- if (cmp === 0) {
- // Found the element we are looking for.
- return mid;
- }
- else if (cmp > 0) {
- // Our needle is greater than aHaystack[mid].
- if (aHigh - mid > 1) {
- // The element is in the upper half.
- return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
- }
-
- // The exact needle element was not found in this haystack. Determine if
- // we are in termination case (3) or (2) and return the appropriate thing.
- if (aBias == exports.LEAST_UPPER_BOUND) {
- return aHigh < aHaystack.length ? aHigh : -1;
- } else {
- return mid;
- }
- }
- else {
- // Our needle is less than aHaystack[mid].
- if (mid - aLow > 1) {
- // The element is in the lower half.
- return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
- }
-
- // we are in termination case (3) or (2) and return the appropriate thing.
- if (aBias == exports.LEAST_UPPER_BOUND) {
- return mid;
- } else {
- return aLow < 0 ? -1 : aLow;
- }
- }
- }
-
- /**
- * This is an implementation of binary search which will always try and return
- * the index of the closest element if there is no exact hit. This is because
- * mappings between original and generated line/col pairs are single points,
- * and there is an implicit region between each of them, so a miss just means
- * that you aren't on the very start of a region.
- *
- * @param aNeedle The element you are looking for.
- * @param aHaystack The array that is being searched.
- * @param aCompare A function which takes the needle and an element in the
- * array and returns -1, 0, or 1 depending on whether the needle is less
- * than, equal to, or greater than the element, respectively.
- * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
- * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
- */
- exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
- if (aHaystack.length === 0) {
- return -1;
- }
-
- var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
- aCompare, aBias || exports.GREATEST_LOWER_BOUND);
- if (index < 0) {
- return -1;
- }
-
- // We have found either the exact element, or the next-closest element than
- // the one we are searching for. However, there may be more than one such
- // element. Make sure we always return the smallest of these.
- while (index - 1 >= 0) {
- if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
- break;
- }
- --index;
- }
-
- return index;
- };
- }
-
-
-/***/ },
-/* 9 */
-/***/ function(module, exports) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- // It turns out that some (most?) JavaScript engines don't self-host
- // `Array.prototype.sort`. This makes sense because C++ will likely remain
- // faster than JS when doing raw CPU-intensive sorting. However, when using a
- // custom comparator function, calling back and forth between the VM's C++ and
- // JIT'd JS is rather slow *and* loses JIT type information, resulting in
- // worse generated code for the comparator function than would be optimal. In
- // fact, when sorting with a comparator, these costs outweigh the benefits of
- // sorting in C++. By using our own JS-implemented Quick Sort (below), we get
- // a ~3500ms mean speed-up in `bench/bench.html`.
-
- /**
- * Swap the elements indexed by `x` and `y` in the array `ary`.
- *
- * @param {Array} ary
- * The array.
- * @param {Number} x
- * The index of the first item.
- * @param {Number} y
- * The index of the second item.
- */
- function swap(ary, x, y) {
- var temp = ary[x];
- ary[x] = ary[y];
- ary[y] = temp;
- }
-
- /**
- * Returns a random integer within the range `low .. high` inclusive.
- *
- * @param {Number} low
- * The lower bound on the range.
- * @param {Number} high
- * The upper bound on the range.
- */
- function randomIntInRange(low, high) {
- return Math.round(low + (Math.random() * (high - low)));
- }
-
- /**
- * The Quick Sort algorithm.
- *
- * @param {Array} ary
- * An array to sort.
- * @param {function} comparator
- * Function to use to compare two items.
- * @param {Number} p
- * Start index of the array
- * @param {Number} r
- * End index of the array
- */
- function doQuickSort(ary, comparator, p, r) {
- // If our lower bound is less than our upper bound, we (1) partition the
- // array into two pieces and (2) recurse on each half. If it is not, this is
- // the empty array and our base case.
-
- if (p < r) {
- // (1) Partitioning.
- //
- // The partitioning chooses a pivot between `p` and `r` and moves all
- // elements that are less than or equal to the pivot to the before it, and
- // all the elements that are greater than it after it. The effect is that
- // once partition is done, the pivot is in the exact place it will be when
- // the array is put in sorted order, and it will not need to be moved
- // again. This runs in O(n) time.
-
- // Always choose a random pivot so that an input array which is reverse
- // sorted does not cause O(n^2) running time.
- var pivotIndex = randomIntInRange(p, r);
- var i = p - 1;
-
- swap(ary, pivotIndex, r);
- var pivot = ary[r];
-
- // Immediately after `j` is incremented in this loop, the following hold
- // true:
- //
- // * Every element in `ary[p .. i]` is less than or equal to the pivot.
- //
- // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
- for (var j = p; j < r; j++) {
- if (comparator(ary[j], pivot) <= 0) {
- i += 1;
- swap(ary, i, j);
- }
- }
-
- swap(ary, i + 1, j);
- var q = i + 1;
-
- // (2) Recurse on each half.
-
- doQuickSort(ary, comparator, p, q - 1);
- doQuickSort(ary, comparator, q + 1, r);
- }
- }
-
- /**
- * Sort the given array in-place with the given comparator function.
- *
- * @param {Array} ary
- * An array to sort.
- * @param {function} comparator
- * Function to use to compare two items.
- */
- exports.quickSort = function (ary, comparator) {
- doQuickSort(ary, comparator, 0, ary.length - 1);
- };
- }
-
-
-/***/ },
-/* 10 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;
- var util = __webpack_require__(4);
-
- // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
- // operating systems these days (capturing the result).
- var REGEX_NEWLINE = /(\r?\n)/;
-
- // Newline character code for charCodeAt() comparisons
- var NEWLINE_CODE = 10;
-
- // Private symbol for identifying `SourceNode`s when multiple versions of
- // the source-map library are loaded. This MUST NOT CHANGE across
- // versions!
- var isSourceNode = "$$$isSourceNode$$$";
-
- /**
- * SourceNodes provide a way to abstract over interpolating/concatenating
- * snippets of generated JavaScript source code while maintaining the line and
- * column information associated with the original source code.
- *
- * @param aLine The original line number.
- * @param aColumn The original column number.
- * @param aSource The original source's filename.
- * @param aChunks Optional. An array of strings which are snippets of
- * generated JS, or other SourceNodes.
- * @param aName The original identifier.
- */
- function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
- this.children = [];
- this.sourceContents = {};
- this.line = aLine == null ? null : aLine;
- this.column = aColumn == null ? null : aColumn;
- this.source = aSource == null ? null : aSource;
- this.name = aName == null ? null : aName;
- this[isSourceNode] = true;
- if (aChunks != null) this.add(aChunks);
- }
-
- /**
- * Creates a SourceNode from generated code and a SourceMapConsumer.
- *
- * @param aGeneratedCode The generated code
- * @param aSourceMapConsumer The SourceMap for the generated code
- * @param aRelativePath Optional. The path that relative sources in the
- * SourceMapConsumer should be relative to.
- */
- SourceNode.fromStringWithSourceMap =
- function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
- // The SourceNode we want to fill with the generated code
- // and the SourceMap
- var node = new SourceNode();
-
- // All even indices of this array are one line of the generated code,
- // while all odd indices are the newlines between two adjacent lines
- // (since `REGEX_NEWLINE` captures its match).
- // Processed fragments are removed from this array, by calling `shiftNextLine`.
- var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
- var shiftNextLine = function() {
- var lineContents = remainingLines.shift();
- // The last line of a file might not have a newline.
- var newLine = remainingLines.shift() || "";
- return lineContents + newLine;
- };
-
- // We need to remember the position of "remainingLines"
- var lastGeneratedLine = 1, lastGeneratedColumn = 0;
-
- // The generate SourceNodes we need a code range.
- // To extract it current and last mapping is used.
- // Here we store the last mapping.
- var lastMapping = null;
-
- aSourceMapConsumer.eachMapping(function (mapping) {
- if (lastMapping !== null) {
- // We add the code from "lastMapping" to "mapping":
- // First check if there is a new line in between.
- if (lastGeneratedLine < mapping.generatedLine) {
- // Associate first line with "lastMapping"
- addMappingWithCode(lastMapping, shiftNextLine());
- lastGeneratedLine++;
- lastGeneratedColumn = 0;
- // The remaining code is added without mapping
- } else {
- // There is no new line in between.
- // Associate the code between "lastGeneratedColumn" and
- // "mapping.generatedColumn" with "lastMapping"
- var nextLine = remainingLines[0];
- var code = nextLine.substr(0, mapping.generatedColumn -
- lastGeneratedColumn);
- remainingLines[0] = nextLine.substr(mapping.generatedColumn -
- lastGeneratedColumn);
- lastGeneratedColumn = mapping.generatedColumn;
- addMappingWithCode(lastMapping, code);
- // No more remaining code, continue
- lastMapping = mapping;
- return;
- }
- }
- // We add the generated code until the first mapping
- // to the SourceNode without any mapping.
- // Each line is added as separate string.
- while (lastGeneratedLine < mapping.generatedLine) {
- node.add(shiftNextLine());
- lastGeneratedLine++;
- }
- if (lastGeneratedColumn < mapping.generatedColumn) {
- var nextLine = remainingLines[0];
- node.add(nextLine.substr(0, mapping.generatedColumn));
- remainingLines[0] = nextLine.substr(mapping.generatedColumn);
- lastGeneratedColumn = mapping.generatedColumn;
- }
- lastMapping = mapping;
- }, this);
- // We have processed all mappings.
- if (remainingLines.length > 0) {
- if (lastMapping) {
- // Associate the remaining code in the current line with "lastMapping"
- addMappingWithCode(lastMapping, shiftNextLine());
- }
- // and add the remaining lines without any mapping
- node.add(remainingLines.join(""));
- }
-
- // Copy sourcesContent into SourceNode
- aSourceMapConsumer.sources.forEach(function (sourceFile) {
- var content = aSourceMapConsumer.sourceContentFor(sourceFile);
- if (content != null) {
- if (aRelativePath != null) {
- sourceFile = util.join(aRelativePath, sourceFile);
- }
- node.setSourceContent(sourceFile, content);
- }
- });
-
- return node;
-
- function addMappingWithCode(mapping, code) {
- if (mapping === null || mapping.source === undefined) {
- node.add(code);
- } else {
- var source = aRelativePath
- ? util.join(aRelativePath, mapping.source)
- : mapping.source;
- node.add(new SourceNode(mapping.originalLine,
- mapping.originalColumn,
- source,
- code,
- mapping.name));
- }
- }
- };
-
- /**
- * Add a chunk of generated JS to this source node.
- *
- * @param aChunk A string snippet of generated JS code, another instance of
- * SourceNode, or an array where each member is one of those things.
- */
- SourceNode.prototype.add = function SourceNode_add(aChunk) {
- if (Array.isArray(aChunk)) {
- aChunk.forEach(function (chunk) {
- this.add(chunk);
- }, this);
- }
- else if (aChunk[isSourceNode] || typeof aChunk === "string") {
- if (aChunk) {
- this.children.push(aChunk);
- }
- }
- else {
- throw new TypeError(
- "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
- );
- }
- return this;
- };
-
- /**
- * Add a chunk of generated JS to the beginning of this source node.
- *
- * @param aChunk A string snippet of generated JS code, another instance of
- * SourceNode, or an array where each member is one of those things.
- */
- SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
- if (Array.isArray(aChunk)) {
- for (var i = aChunk.length-1; i >= 0; i--) {
- this.prepend(aChunk[i]);
- }
- }
- else if (aChunk[isSourceNode] || typeof aChunk === "string") {
- this.children.unshift(aChunk);
- }
- else {
- throw new TypeError(
- "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
- );
- }
- return this;
- };
-
- /**
- * Walk over the tree of JS snippets in this node and its children. The
- * walking function is called once for each snippet of JS and is passed that
- * snippet and the its original associated source's line/column location.
- *
- * @param aFn The traversal function.
- */
- SourceNode.prototype.walk = function SourceNode_walk(aFn) {
- var chunk;
- for (var i = 0, len = this.children.length; i < len; i++) {
- chunk = this.children[i];
- if (chunk[isSourceNode]) {
- chunk.walk(aFn);
- }
- else {
- if (chunk !== '') {
- aFn(chunk, { source: this.source,
- line: this.line,
- column: this.column,
- name: this.name });
- }
- }
- }
- };
-
- /**
- * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
- * each of `this.children`.
- *
- * @param aSep The separator.
- */
- SourceNode.prototype.join = function SourceNode_join(aSep) {
- var newChildren;
- var i;
- var len = this.children.length;
- if (len > 0) {
- newChildren = [];
- for (i = 0; i < len-1; i++) {
- newChildren.push(this.children[i]);
- newChildren.push(aSep);
- }
- newChildren.push(this.children[i]);
- this.children = newChildren;
- }
- return this;
- };
-
- /**
- * Call String.prototype.replace on the very right-most source snippet. Useful
- * for trimming whitespace from the end of a source node, etc.
- *
- * @param aPattern The pattern to replace.
- * @param aReplacement The thing to replace the pattern with.
- */
- SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
- var lastChild = this.children[this.children.length - 1];
- if (lastChild[isSourceNode]) {
- lastChild.replaceRight(aPattern, aReplacement);
- }
- else if (typeof lastChild === 'string') {
- this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
- }
- else {
- this.children.push(''.replace(aPattern, aReplacement));
- }
- return this;
- };
-
- /**
- * Set the source content for a source file. This will be added to the SourceMapGenerator
- * in the sourcesContent field.
- *
- * @param aSourceFile The filename of the source file
- * @param aSourceContent The content of the source file
- */
- SourceNode.prototype.setSourceContent =
- function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
- this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
- };
-
- /**
- * Walk over the tree of SourceNodes. The walking function is called for each
- * source file content and is passed the filename and source content.
- *
- * @param aFn The traversal function.
- */
- SourceNode.prototype.walkSourceContents =
- function SourceNode_walkSourceContents(aFn) {
- for (var i = 0, len = this.children.length; i < len; i++) {
- if (this.children[i][isSourceNode]) {
- this.children[i].walkSourceContents(aFn);
- }
- }
-
- var sources = Object.keys(this.sourceContents);
- for (var i = 0, len = sources.length; i < len; i++) {
- aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
- }
- };
-
- /**
- * Return the string representation of this source node. Walks over the tree
- * and concatenates all the various snippets together to one string.
- */
- SourceNode.prototype.toString = function SourceNode_toString() {
- var str = "";
- this.walk(function (chunk) {
- str += chunk;
- });
- return str;
- };
-
- /**
- * Returns the string representation of this source node along with a source
- * map.
- */
- SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
- var generated = {
- code: "",
- line: 1,
- column: 0
- };
- var map = new SourceMapGenerator(aArgs);
- var sourceMappingActive = false;
- var lastOriginalSource = null;
- var lastOriginalLine = null;
- var lastOriginalColumn = null;
- var lastOriginalName = null;
- this.walk(function (chunk, original) {
- generated.code += chunk;
- if (original.source !== null
- && original.line !== null
- && original.column !== null) {
- if(lastOriginalSource !== original.source
- || lastOriginalLine !== original.line
- || lastOriginalColumn !== original.column
- || lastOriginalName !== original.name) {
- map.addMapping({
- source: original.source,
- original: {
- line: original.line,
- column: original.column
- },
- generated: {
- line: generated.line,
- column: generated.column
- },
- name: original.name
- });
- }
- lastOriginalSource = original.source;
- lastOriginalLine = original.line;
- lastOriginalColumn = original.column;
- lastOriginalName = original.name;
- sourceMappingActive = true;
- } else if (sourceMappingActive) {
- map.addMapping({
- generated: {
- line: generated.line,
- column: generated.column
- }
- });
- lastOriginalSource = null;
- sourceMappingActive = false;
- }
- for (var idx = 0, length = chunk.length; idx < length; idx++) {
- if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
- generated.line++;
- generated.column = 0;
- // Mappings end at eol
- if (idx + 1 === length) {
- lastOriginalSource = null;
- sourceMappingActive = false;
- } else if (sourceMappingActive) {
- map.addMapping({
- source: original.source,
- original: {
- line: original.line,
- column: original.column
- },
- generated: {
- line: generated.line,
- column: generated.column
- },
- name: original.name
- });
- }
- } else {
- generated.column++;
- }
- }
- });
- this.walkSourceContents(function (sourceFile, sourceContent) {
- map.setSourceContent(sourceFile, sourceContent);
- });
-
- return { code: generated.code, map: map };
- };
-
- exports.SourceNode = SourceNode;
- }
-
-
-/***/ }
-/******/ ])
-});
-;
-//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay91bml2ZXJzYWxNb2R1bGVEZWZpbml0aW9uIiwid2VicGFjazovLy93ZWJwYWNrL2Jvb3RzdHJhcCAzMzE2M2Q1YTFmMDY1MDk5Y2MwYiIsIndlYnBhY2s6Ly8vLi9zb3VyY2UtbWFwLmpzIiwid2VicGFjazovLy8uL2xpYi9zb3VyY2UtbWFwLWdlbmVyYXRvci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LXZscS5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmFzZTY0LmpzIiwid2VicGFjazovLy8uL2xpYi91dGlsLmpzIiwid2VicGFjazovLy8uL2xpYi9hcnJheS1zZXQuanMiLCJ3ZWJwYWNrOi8vLy4vbGliL21hcHBpbmctbGlzdC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW1hcC1jb25zdW1lci5qcyIsIndlYnBhY2s6Ly8vLi9saWIvYmluYXJ5LXNlYXJjaC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvcXVpY2stc29ydC5qcyIsIndlYnBhY2s6Ly8vLi9saWIvc291cmNlLW5vZGUuanMiXSwibmFtZXMiOltdLCJtYX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ICAgICAgICBtYXBwaW5nLnNvdXJjZSA9IHV0aWwucmVsYXRpdmUoc291cmNlUm9vdCwgbWFwcGluZy5zb3VyY2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgPSBvcmlnaW5hbC5saW5lO1xuICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbENvbHVtbiA9IG9yaWdpbmFsLmNvbHVtbjtcbiAgICAgICAgICAgIGlmIChvcmlnaW5hbC5uYW1lICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgbWFwcGluZy5uYW1lID0gb3JpZ2luYWwubmFtZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgc291cmNlID0gbWFwcGluZy5zb3VyY2U7XG4gICAgICAgIGlmIChzb3VyY2UgIT0gbnVsbCAmJiAhbmV3U291cmNlcy5oYXMoc291cmNlKSkge1xuICAgICAgICAgIG5ld1NvdXJjZXMuYWRkKHNvdXJjZSk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgbmFtZSA9IG1hcHBpbmcubmFtZTtcbiAgICAgICAgaWYgKG5hbWUgIT0gbnVsbCAmJiAhbmV3TmFtZXMuaGFzKG5hbWUpKSB7XG4gICAgICAgICAgbmV3TmFtZXMuYWRkKG5hbWUpO1xuICAgICAgICB9XG5cbiAgICAgIH0sIHRoaXMpO1xuICAgICAgdGhpcy5fc291cmNlcyA9IG5ld1NvdXJjZXM7XG4gICAgICB0aGlzLl9uYW1lcyA9IG5ld05hbWVzO1xuXG4gICAgICAvLyBDb3B5IHNvdXJjZXNDb250ZW50cyBvZiBhcHBsaWVkIG1hcC5cbiAgICAgIGFTb3VyY2VNYXBDb25zdW1lci5zb3VyY2VzLmZvckVhY2goZnVuY3Rpb24gKHNvdXJjZUZpbGUpIHtcbiAgICAgICAgdmFyIGNvbnRlbnQgPSBhU291cmNlTWFwQ29uc3VtZXIuc291cmNlQ29udGVudEZv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5cbiAgICAgICAgaWYgKG1hcHBpbmcuZ2VuZXJhdGVkTGluZSAhPT0gcHJldmlvdXNHZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSAwO1xuICAgICAgICAgIHdoaWxlIChtYXBwaW5nLmdlbmVyYXRlZExpbmUgIT09IHByZXZpb3VzR2VuZXJhdGVkTGluZSkge1xuICAgICAgICAgICAgcmVzdWx0ICs9ICc7JztcbiAgICAgICAgICAgIHByZXZpb3VzR2VuZXJhdGVkTGluZSsrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICBpZiAoaSA+IDApIHtcbiAgICAgICAgICAgIGlmICghdXRpbC5jb21wYXJlQnlHZW5lcmF0ZWRQb3NpdGlvbnNJbmZsYXRlZChtYXBwaW5nLCBtYXBwaW5nc1tpIC0gMV0pKSB7XG4gICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVzdWx0ICs9ICcsJztcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXN1bHQgKz0gYmFzZTY0VkxRLmVuY29kZShtYXBwaW5nLmdlbmVyYXRlZENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uKTtcbiAgICAgICAgcHJldmlvdXNHZW5lcmF0ZWRDb2x1bW4gPSBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbjtcblxuICAgICAgICBpZiAobWFwcGluZy5zb3VyY2UgIT0gbnVsbCkge1xuICAgICAgICAgIHNvdXJjZUlkeCA9IHRoaXMuX3NvdXJjZXMuaW5kZXhPZihtYXBwaW5nLnNvdXJjZSk7XG4gICAgICAgICAgcmVzdWx0ICs9IGJhc2U2NFZMUS5lbmNvZGUoc291cmNlSWR4IC0gcHJldmlvdXNTb3VyY2UpO1xuICAgICAgICAgIHByZXZpb3VzU291cmNlID0gc291cmNlSWR4O1xuXG4gICAgICAgICAgLy8gbGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkIGluIFNvdXJjZU1hcCBzcGVjIHZlcnNpb24gM1xuICAgICAgICAgIHJlc3VsdCArPSBiYXNlNjRWTFEuZW5jb2RlKG1hcHBpbmcub3JpZ2luYWxMaW5lIC0gMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbExpbmUpO1xuICAgICAgICAgIHByZXZpb3VzT3JpZ2luYWxMaW5lID0gbWFwcGluZy5vcmlnaW5hbExpbmUgLSAxO1xuXG4gICAgICAgICAgcmVzdWx0ICs9IGJhc2U2NFZMUS5lbmNvZGUobWFwcGluZy5vcmlnaW5hbENvbHVtblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gcHJldmlvdXNPcmlnaW5hbENvbHVtbik7XG4gICAgICAgICAgcHJldmlvdXNPcmlnaW5hbENvbHVtbiA9IG1hcHBpbmcub3JpZ2luYWxDb2x1bW47XG5cbiAgICAgICAgICBpZiAobWFwcGluZy5uYW1lICE9IG51bGwpIHtcbiAgICAgICAgICAgIG5hbWVJZHggPSB0aGlzLl9uYW1lcy5pbmRleE9mKG1hcHBpbmcubmFtZSk7XG4gICAgICAgICAgICByZXN1bHQgKz0gYmFzZTY0VkxRLmVuY29kZShuYW1lSWR4IC0gcHJldmlvdXNOYW1lKTtcbiAgICAgICAgICAgIHByZXZpb3VzTmFtZSA9IG5hbWVJZHg7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHJldHVybiByZXN1bHQ7XG4gICAgfTtcblxuICBTb3VyY2VNYXBHZW5lcmF0b3IucHJvdG90eXBlLl9nZW5lcmF0ZVNvdXJjZXNDb250ZW50ID1cbiAgICBmdW5jdGlvbiBTb3VyY2VNYXBHZW5lcmF0b3JfZ2VuZXJhdGVTb3VyY2VzQ29udGVudChhU291cmNlcywgYVNvdXJjZVJvb3QpIHtcbiAgICAgIHJldHVybiBhU291cmNlcy5tYXAoZnVuY3Rpb24gKHNvdXJjZSkge1xuICAgICAgICBpZiAoIXRoaXMuX3NvdXJjZXNDb250ZW50cykge1xuICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG4gICAgICAgIGlmIChhU291cmNlUm9vdCAhPSBudWxsKSB7XG4gICAgICAgICAgc291cmNlID0gdXRpbC5yZWxhdGl2ZShhU291cmNlUm9vdCwgc291cmNlKTtcbiAgICAgICAgfVxuICAgICAgICB2YXIga2V5ID0gdXRpbC50b1NldFN0cmluZyhzb3VyY2UpO1xuICAgICAgICByZXR1cm4gT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKHRoaXMuX3NvdXJjZXNDb250ZW50cyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXkpXG4gICAgICAgICAgPyB0aGlzLl9zb3VyY2VzQ29udGVudHNba2V5XVxuICAgICAgICAgIDogbnVsbDtcbiAgICAgIH0sIHRoaXMpO1xuICAgIH07XG5cbiAgLyoqXG4gICAqIEV4dGVybmFsaXplIHRoZSBzb3VyY2UgbWFwLlxuICAgKi9cbiAgU291cmNlTWFwR2VuZXJhdG9yLnByb3RvdHlwZS50b0pTT04gPVxuICAgIGZ1bmN0aW9uIFNvdXJjZU1hcEdlbmVyYXRvcl90b0pTT04oKSB7XG4gICAgICB2YXIgbWFwID0ge1xuICAgICAgICB2ZXJzaW9uOiB0aGlzLl92ZXJzaW9uLFxuICAgICAgICBzb3VyY2VzOiB0aGlzLl9zb3VyY2VzLnRvQXJyYXkoKSxcbiAgICAgICAgbmFtZXM6IHRoaXMuX25hbWVzLnRvQXJyYXkoKSxcbiAgICAgICAgbWFwcGluZ3M6IHRoaXMuX3NlcmlhbGl6ZU1hcHBpbmdzKClcbiAgICAgIH07XG4gICAgICBpZiAodG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S5zb3VyY2UpO1xuICAgICAgfVxuICAgICAgaWYgKCF0aGlzLl9zb3VyY2VzLmhhcyhuZWVkbGUuc291cmNlKSkge1xuICAgICAgICByZXR1cm4gW107XG4gICAgICB9XG4gICAgICBuZWVkbGUuc291cmNlID0gdGhpcy5fc291cmNlcy5pbmRleE9mKG5lZWRsZS5zb3VyY2UpO1xuXG4gICAgICB2YXIgbWFwcGluZ3MgPSBbXTtcblxuICAgICAgdmFyIGluZGV4ID0gdGhpcy5fZmluZE1hcHBpbmcobmVlZGxlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5fb3JpZ2luYWxNYXBwaW5ncyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwib3JpZ2luYWxMaW5lXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9yaWdpbmFsQ29sdW1uXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1dGlsLmNvbXBhcmVCeU9yaWdpbmFsUG9zaXRpb25zLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmluYXJ5U2VhcmNoLkxFQVNUX1VQUEVSX0JPVU5EKTtcbiAgICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICAgIHZhciBtYXBwaW5nID0gdGhpcy5fb3JpZ2luYWxNYXBwaW5nc1tpbmRleF07XG5cbiAgICAgICAgaWYgKGFBcmdzLmNvbHVtbiA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgdmFyIG9yaWdpbmFsTGluZSA9IG1hcHBpbmcub3JpZ2luYWxMaW5lO1xuXG4gICAgICAgICAgLy8gSXRlcmF0ZSB1bnRpbCBlaXRoZXIgd2UgcnVuIG91dCBvZiBtYXBwaW5ncywgb3Igd2UgcnVuIGludG9cbiAgICAgICAgICAvLyBhIG1hcHBpbmcgZm9yIGEgZGlmZmVyZW50IGxpbmUgdGhhbiB0aGUgb25lIHdl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1cbiAgICAgICAgICBzdHIgPSBhU3RyLnNsaWNlKGluZGV4LCBlbmQpO1xuXG4gICAgICAgICAgc2VnbWVudCA9IGNhY2hlZFNlZ21lbnRzW3N0cl07XG4gICAgICAgICAgaWYgKHNlZ21lbnQpIHtcbiAgICAgICAgICAgIGluZGV4ICs9IHN0ci5sZW5ndGg7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHNlZ21lbnQgPSBbXTtcbiAgICAgICAgICAgIHdoaWxlIChpbmRleCA8IGVuZCkge1xuICAgICAgICAgICAgICBiYXNlNjRWTFEuZGVjb2RlKGFTdHIsIGluZGV4LCB0ZW1wKTtcbiAgICAgICAgICAgICAgdmFsdWUgPSB0ZW1wLnZhbHVlO1xuICAgICAgICAgICAgICBpbmRleCA9IHRlbXAucmVzdDtcbiAgICAgICAgICAgICAgc2VnbWVudC5wdXNoKHZhbHVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAyKSB7XG4gICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRm91bmQgYSBzb3VyY2UsIGJ1dCBubyBsaW5lIGFuZCBjb2x1bW4nKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID09PSAzKSB7XG4gICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRm91bmQgYSBzb3VyY2UgYW5kIGxpbmUsIGJ1dCBubyBjb2x1bW4nKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY2FjaGVkU2VnbWVudHNbc3RyXSA9IHNlZ21lbnQ7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgLy8gR2VuZXJhdGVkIGNvbHVtbi5cbiAgICAgICAgICBtYXBwaW5nLmdlbmVyYXRlZENvbHVtbiA9IHByZXZpb3VzR2VuZXJhdGVkQ29sdW1uICsgc2VnbWVudFswXTtcbiAgICAgICAgICBwcmV2aW91c0dlbmVyYXRlZENvbHVtbiA9IG1hcHBpbmcuZ2VuZXJhdGVkQ29sdW1uO1xuXG4gICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID4gMSkge1xuICAgICAgICAgICAgLy8gT3JpZ2luYWwgc291cmNlLlxuICAgICAgICAgICAgbWFwcGluZy5zb3VyY2UgPSBwcmV2aW91c1NvdXJjZSArIHNlZ21lbnRbMV07XG4gICAgICAgICAgICBwcmV2aW91c1NvdXJjZSArPSBzZWdtZW50WzFdO1xuXG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBsaW5lLlxuICAgICAgICAgICAgbWFwcGluZy5vcmlnaW5hbExpbmUgPSBwcmV2aW91c09yaWdpbmFsTGluZSArIHNlZ21lbnRbMl07XG4gICAgICAgICAgICBwcmV2aW91c09yaWdpbmFsTGluZSA9IG1hcHBpbmcub3JpZ2luYWxMaW5lO1xuICAgICAgICAgICAgLy8gTGluZXMgYXJlIHN0b3JlZCAwLWJhc2VkXG4gICAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsTGluZSArPSAxO1xuXG4gICAgICAgICAgICAvLyBPcmlnaW5hbCBjb2x1bW4uXG4gICAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uID0gcHJldmlvdXNPcmlnaW5hbENvbHVtbiArIHNlZ21lbnRbM107XG4gICAgICAgICAgICBwcmV2aW91c09yaWdpbmFsQ29sdW1uID0gbWFwcGluZy5vcmlnaW5hbENvbHVtbjtcblxuICAgICAgICAgICAgaWYgKHNlZ21lbnQubGVuZ3RoID4gNCkge1xuICAgICAgICAgICAgICAvLyBPcmlnaW5hbCBuYW1lLlxuICAgICAgICAgICAgICBtYXBwaW5nLm5hbWUgPSBwcmV2aW91c05hbWUgKyBzZWdtZW50WzRdO1xuICAgICAgICAgICAgICBwcmV2aW91c05hbWUgKz0gc2VnbWVudFs0XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBnZW5lcmF0ZWRNY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lZFBvc2l0aW9uc0RlZmxhdGVkLFxuICAgICAgICB1dGlsLmdldEFyZyhhQXJncywgJ2JpYXMnLCBTb3VyY2VNYXBDb25zdW1lci5HUkVBVEVTVF9MT1dFUl9CT1VORClcbiAgICAgICk7XG5cbiAgICAgIGlmIChpbmRleCA+PSAwKSB7XG4gICAgICAgIHZhciBtYXBwaW5nID0gdGhpcy5fZ2VuZXJhdGVkTWFwcGluZ3NbaW5kZXhdO1xuXG4gICAgICAgIGlmIChtYXBwaW5nLmdlbmVyYXRlZExpbmUgPT09IG5lZWRsZS5nZW5lcmF0ZWRMaW5lKSB7XG4gICAgICAgICAgdmFyIHNvdXJjZSA9IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdzb3VyY2UnLCBudWxsKTtcbiAgICAgICAgICBpZiAoc291cmNlICE9PSBudWxsKSB7XG4gICAgICAgICAgICBzb3VyY2UgPSB0aGlzLl9zb3VyY2VzLmF0KHNvdXJjZSk7XG4gICAgICAgICAgICBpZiAodGhpcy5zb3VyY2VSb290ICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgc291cmNlID0gdXRpbC5qb2luKHRoaXMuc291cmNlUm9vdCwgc291cmNlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgdmFyIG5hbWUgPSB1dGlsLmdldEFyZyhtYXBwaW5nLCAnbmFtZScsIG51bGwpO1xuICAgICAgICAgIGlmIChuYW1lICE9PSBudWxsKSB7XG4gICAgICAgICAgICBuYW1lID0gdGhpcy5fbmFtZXMuYXQobmFtZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBzb3VyY2U6IHNvdXJjZSxcbiAgICAgICAgICAgIGxpbmU6IHV0aWwuZ2V0QXJnKG1hcHBpbmcsICdvcmlnaW5hbExpbmUnLCBudWxsKSxcbiAgICAgICAgICAgIGNvbHVtbjogdXRpbC5nZXRBcmcobWFwcGluZywgJ29yaWdpbmFsQ29sdW1uJywgbnVsbCksXG4gICAgICAgICAgICBuYW1lOiBuYW1lXG4gICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICByZXR1cm4ge1xuICAgICAgICBzb3VyY2U6IG51bGwsXG4gICAgICAgIGxpbmU6IG51bGwsXG4gICAgICAgIGNvbHVtbjogbnVsbCxcbiAgICAgICAgbmFtZTogbnVsbFxuICAgICAgfTtcbiAgICB9O1xuXG4gIC8qKlxuICAgKiBSZXR1cm4gdHJ1ZSBpZiB3ZSBoYXZlIHRoZSBzb3VyY2UgY29udGVudCBmb3IgZXZlcnkgc291cmNlIGluIHRoZSBzb3VyY2VcbiAgICogbWFwLCBmYWxzZSBvdGhlcndpc2UuXG4gICAqL1xuICBCYXNpY1NvdXJjZU1hcENvbnN1bWVyLnByb3RvdHlwZS5oYXNDb250ZW50c09mQWxsU291cmNlcyA9XG4gICAgZnVuY3Rpb24gQmFzaWNTb3VyY2VNYXBDb25zdW1lcl9oYXNDb250ZW50c09mQWxsU291cmNlcygpIHtcbiAgICAgIGlmICghdGhpcy5zb3VyY2VzQ29udGVudCkge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICB9XG4gICAgICByZXR1cm4gdGhpcy5zb3VyY2VzQ29udGVudC5sZW5ndGggPj0gdGhpcy5fc291cmNlcy5zaXplKCkgJiZcbiAgICAgICAgIXRoaXMuc291cmNlc0NvbnRlbnQuc29tZShmdW5jdGlvbiAoc2MpIHsgcmV0dXJuIHNjID09IG51bGw7IH0pO1xuICAgIH07XG5cbiAgLyoqXG4gICAqIFJldHVybnMgdGhlIG9yaWdpbmFsIHNvdXJjZSBjb250ZW50LiBUaGUgb25seSBhcmd1bWVudCBpcyB0aGUgdXJsIG9mIHRoZVxuICAgKiBvcmlnaW5hbCBzb3VyY2UgZmlsZS4gUmV0dXJucyBudWxsIGlmIG5vIG9yaWdpbmFsIHNvdXJjZSBjb250ZW50IGlzXG4gICAqIGF2YWlsYWJsZS5cbiAgICovXG4gIEJ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W4oYVJlbGF0aXZlUGF0aCwgc291cmNlRmlsZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIG5vZGUuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBjb250ZW50KTtcbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIHJldHVybiBub2RlO1xuXG4gICAgICBmdW5jdGlvbiBhZGRNYXBwaW5nV2l0aENvZGUobWFwcGluZywgY29kZSkge1xuICAgICAgICBpZiAobWFwcGluZyA9PT0gbnVsbCB8fCBtYXBwaW5nLnNvdXJjZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgbm9kZS5hZGQoY29kZSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdmFyIHNvdXJjZSA9IGFSZWxhdGl2ZVBhdGhcbiAgICAgICAgICAgID8gdXRpbC5qb2luKGFSZWxhdGl2ZVBhdGgsIG1hcHBpbmcuc291cmNlKVxuICAgICAgICAgICAgOiBtYXBwaW5nLnNvdXJjZTtcbiAgICAgICAgICBub2RlLmFkZChuZXcgU291cmNlTm9kZShtYXBwaW5nLm9yaWdpbmFsTGluZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXBwaW5nLm9yaWdpbmFsQ29sdW1uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcHBpbmcubmFtZSkpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfTtcblxuICAvKipcbiAgICogQWRkIGEgY2h1bmsgb2YgZ2VuZXJhdGVkIEpTIHRvIHRoaXMgc291cmNlIG5vZGUuXG4gICAqXG4gICAqIEBwYXJhbSBhQ2h1bmsgQSBzdHJpbmcgc25pcHBldCBvZiBnZW5lcmF0ZWQgSlMgY29kZSwgYW5vdGhlciBpbnN0YW5jZSBvZlxuIC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Tb3VyY2VOb2RlLnByb3RvdHlwZS53YWxrID0gZnVuY3Rpb24gU291cmNlTm9kZV93YWxrKGFGbikge1xuICAgIHZhciBjaHVuaztcbiAgICBmb3IgKHZhciBpID0gMCwgbGVuID0gdGhpcy5jaGlsZHJlbi5sZW5ndGg7IGkgPCBsZW47IGkrKykge1xuICAgICAgY2h1bmsgPSB0aGlzLmNoaWxkcmVuW2ldO1xuICAgICAgaWYgKGNodW5rW2lzU291cmNlTm9kZV0pIHtcbiAgICAgICAgY2h1bmsud2FsayhhRm4pO1xuICAgICAgfVxuICAgICAgZWxzZSB7XG4gICAgICAgIGlmIChjaHVuayAhPT0gJycpIHtcbiAgICAgICAgICBhRm4oY2h1bmssIHsgc291cmNlOiB0aGlzLnNvdXJjZSxcbiAgICAgICAgICAgICAgICAgICAgICAgbGluZTogdGhpcy5saW5lLFxuICAgICAgICAgICAgICAgICAgICAgICBjb2x1bW46IHRoaXMuY29sdW1uLFxuICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiB0aGlzLm5hbWUgfSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbiAgLyoqXG4gICAqIExpa2UgYFN0cmluZy5wcm90b3R5cGUuam9pbmAgZXhjZXB0IGZvciBTb3VyY2VOb2Rlcy4gSW5zZXJ0cyBgYVN0cmAgYmV0d2VlblxuICAgKiBlYWNoIG9mIGB0aGlzLmNoaWxkcmVuYC5cbiAgICpcbiAgICogQHBhcmFtIGFTZXAgVGhlIHNlcGFyYXRvci5cbiAgICovXG4gIFNvdXJjZU5vZGUucHJvdG90eXBlLmpvaW4gPSBmdW5jdGlvbiBTb3VyY2VOb2RlX2pvaW4oYVNlcCkge1xuICAgIHZhciBuZXdDaGlsZHJlbjtcbiAgICB2YXIgaTtcbiAgICB2YXIgbGVuID0gdGhpcy5jaGlsZHJlbi5sZW5ndGg7XG4gICAgaWYgKGxlbiA+IDApIHtcbiAgICAgIG5ld0NoaWxkcmVuID0gW107XG4gICA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pbmcoe1xuICAgICAgICAgIGdlbmVyYXRlZDoge1xuICAgICAgICAgICAgbGluZTogZ2VuZXJhdGVkLmxpbmUsXG4gICAgICAgICAgICBjb2x1bW46IGdlbmVyYXRlZC5jb2x1bW5cbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICBsYXN0T3JpZ2luYWxTb3VyY2UgPSBudWxsO1xuICAgICAgICBzb3VyY2VNYXBwaW5nQWN0aXZlID0gZmFsc2U7XG4gICAgICB9XG4gICAgICBmb3IgKHZhciBpZHggPSAwLCBsZW5ndGggPSBjaHVuay5sZW5ndGg7IGlkeCA8IGxlbmd0aDsgaWR4KyspIHtcbiAgICAgICAgaWYgKGNodW5rLmNoYXJDb2RlQXQoaWR4KSA9PT0gTkVXTElORV9DT0RFKSB7XG4gICAgICAgICAgZ2VuZXJhdGVkLmxpbmUrKztcbiAgICAgICAgICBnZW5lcmF0ZWQuY29sdW1uID0gMDtcbiAgICAgICAgICAvLyBNYXBwaW5ncyBlbmQgYXQgZW9sXG4gICAgICAgICAgaWYgKGlkeCArIDEgPT09IGxlbmd0aCkge1xuICAgICAgICAgICAgbGFzdE9yaWdpbmFsU291cmNlID0gbnVsbDtcbiAgICAgICAgICAgIHNvdXJjZU1hcHBpbmdBY3RpdmUgPSBmYWxzZTtcbiAgICAgICAgICB9IGVsc2UgaWYgKHNvdXJjZU1hcHBpbmdBY3RpdmUpIHtcbiAgICAgICAgICAgIG1hcC5hZGRNYXBwaW5nKHtcbiAgICAgICAgICAgICAgc291cmNlOiBvcmlnaW5hbC5zb3VyY2UsXG4gICAgICAgICAgICAgIG9yaWdpbmFsOiB7XG4gICAgICAgICAgICAgICAgbGluZTogb3JpZ2luYWwubGluZSxcbiAgICAgICAgICAgICAgICBjb2x1bW46IG9yaWdpbmFsLmNvbHVtblxuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBnZW5lcmF0ZWQ6IHtcbiAgICAgICAgICAgICAgICBsaW5lOiBnZW5lcmF0ZWQubGluZSxcbiAgICAgICAgICAgICAgICBjb2x1bW46IGdlbmVyYXRlZC5jb2x1bW5cbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgbmFtZTogb3JpZ2luYWwubmFtZVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGdlbmVyYXRlZC5jb2x1bW4rKztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0pO1xuICAgIHRoaXMud2Fsa1NvdXJjZUNvbnRlbnRzKGZ1bmN0aW9uIChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KSB7XG4gICAgICBtYXAuc2V0U291cmNlQ29udGVudChzb3VyY2VGaWxlLCBzb3VyY2VDb250ZW50KTtcbiAgICB9KTtcblxuICAgIHJldHVybiB7IGNvZGU6IGdlbmVyYXRlZC5jb2RlLCBtYXA6IG1hcCB9O1xuICB9O1xuXG4gIGV4cG9ydHMuU291cmNlTm9kZSA9IFNvdXJjZU5vZGU7XG59XG5cblxuXG4vKioqKioqKioqKioqKioqKipcbiAqKiBXRUJQQUNLIEZPT1RFUlxuICoqIC4vbGliL3NvdXJjZS1ub2RlLmpzXG4gKiogbW9kdWxlIGlkID0gMTBcbiAqKiBtb2R1bGUgY2h1bmtzID0gMFxuICoqLyJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/dist/source-map.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/dist/source-map.js
deleted file mode 100644
index 25199a64c6..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/dist/source-map.js
+++ /dev/null
@@ -1,3005 +0,0 @@
-(function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory();
- else if(typeof define === 'function' && define.amd)
- define([], factory);
- else if(typeof exports === 'object')
- exports["sourceMap"] = factory();
- else
- root["sourceMap"] = factory();
-})(this, function() {
-return /******/ (function(modules) { // webpackBootstrap
-/******/ // The module cache
-/******/ var installedModules = {};
-
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
-
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
-/******/ };
-
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
-
-/******/ // Flag the module as loaded
-/******/ module.loaded = true;
-
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-
-
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-
-/******/ // Load entry module and return exports
-/******/ return __webpack_require__(0);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
-/***/ function(module, exports, __webpack_require__) {
-
- /*
- * Copyright 2009-2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE.txt or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- exports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;
- exports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer;
- exports.SourceNode = __webpack_require__(10).SourceNode;
-
-
-/***/ },
-/* 1 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- var base64VLQ = __webpack_require__(2);
- var util = __webpack_require__(4);
- var ArraySet = __webpack_require__(5).ArraySet;
- var MappingList = __webpack_require__(6).MappingList;
-
- /**
- * An instance of the SourceMapGenerator represents a source map which is
- * being built incrementally. You may pass an object with the following
- * properties:
- *
- * - file: The filename of the generated source.
- * - sourceRoot: A root for all relative URLs in this source map.
- */
- function SourceMapGenerator(aArgs) {
- if (!aArgs) {
- aArgs = {};
- }
- this._file = util.getArg(aArgs, 'file', null);
- this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
- this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
- this._sources = new ArraySet();
- this._names = new ArraySet();
- this._mappings = new MappingList();
- this._sourcesContents = null;
- }
-
- SourceMapGenerator.prototype._version = 3;
-
- /**
- * Creates a new SourceMapGenerator based on a SourceMapConsumer
- *
- * @param aSourceMapConsumer The SourceMap.
- */
- SourceMapGenerator.fromSourceMap =
- function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
- var sourceRoot = aSourceMapConsumer.sourceRoot;
- var generator = new SourceMapGenerator({
- file: aSourceMapConsumer.file,
- sourceRoot: sourceRoot
- });
- aSourceMapConsumer.eachMapping(function (mapping) {
- var newMapping = {
- generated: {
- line: mapping.generatedLine,
- column: mapping.generatedColumn
- }
- };
-
- if (mapping.source != null) {
- newMapping.source = mapping.source;
- if (sourceRoot != null) {
- newMapping.source = util.relative(sourceRoot, newMapping.source);
- }
-
- newMapping.original = {
- line: mapping.originalLine,
- column: mapping.originalColumn
- };
-
- if (mapping.name != null) {
- newMapping.name = mapping.name;
- }
- }
-
- generator.addMapping(newMapping);
- });
- aSourceMapConsumer.sources.forEach(function (sourceFile) {
- var content = aSourceMapConsumer.sourceContentFor(sourceFile);
- if (content != null) {
- generator.setSourceContent(sourceFile, content);
- }
- });
- return generator;
- };
-
- /**
- * Add a single mapping from original source line and column to the generated
- * source's line and column for this source map being created. The mapping
- * object should have the following properties:
- *
- * - generated: An object with the generated line and column positions.
- * - original: An object with the original line and column positions.
- * - source: The original source file (relative to the sourceRoot).
- * - name: An optional original token name for this mapping.
- */
- SourceMapGenerator.prototype.addMapping =
- function SourceMapGenerator_addMapping(aArgs) {
- var generated = util.getArg(aArgs, 'generated');
- var original = util.getArg(aArgs, 'original', null);
- var source = util.getArg(aArgs, 'source', null);
- var name = util.getArg(aArgs, 'name', null);
-
- if (!this._skipValidation) {
- this._validateMapping(generated, original, source, name);
- }
-
- if (source != null && !this._sources.has(source)) {
- this._sources.add(source);
- }
-
- if (name != null && !this._names.has(name)) {
- this._names.add(name);
- }
-
- this._mappings.add({
- generatedLine: generated.line,
- generatedColumn: generated.column,
- originalLine: original != null && original.line,
- originalColumn: original != null && original.column,
- source: source,
- name: name
- });
- };
-
- /**
- * Set the source content for a source file.
- */
- SourceMapGenerator.prototype.setSourceContent =
- function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
- var source = aSourceFile;
- if (this._sourceRoot != null) {
- source = util.relative(this._sourceRoot, source);
- }
-
- if (aSourceContent != null) {
- // Add the source content to the _sourcesContents map.
- // Create a new _sourcesContents map if the property is null.
- if (!this._sourcesContents) {
- this._sourcesContents = {};
- }
- this._sourcesContents[util.toSetString(source)] = aSourceContent;
- } else if (this._sourcesContents) {
- // Remove the source file from the _sourcesContents map.
- // If the _sourcesContents map is empty, set the property to null.
- delete this._sourcesContents[util.toSetString(source)];
- if (Object.keys(this._sourcesContents).length === 0) {
- this._sourcesContents = null;
- }
- }
- };
-
- /**
- * Applies the mappings of a sub-source-map for a specific source file to the
- * source map being generated. Each mapping to the supplied source file is
- * rewritten using the supplied source map. Note: The resolution for the
- * resulting mappings is the minimium of this map and the supplied map.
- *
- * @param aSourceMapConsumer The source map to be applied.
- * @param aSourceFile Optional. The filename of the source file.
- * If omitted, SourceMapConsumer's file property will be used.
- * @param aSourceMapPath Optional. The dirname of the path to the source map
- * to be applied. If relative, it is relative to the SourceMapConsumer.
- * This parameter is needed when the two source maps aren't in the same
- * directory, and the source map to be applied contains relative source
- * paths. If so, those relative source paths need to be rewritten
- * relative to the SourceMapGenerator.
- */
- SourceMapGenerator.prototype.applySourceMap =
- function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
- var sourceFile = aSourceFile;
- // If aSourceFile is omitted, we will use the file property of the SourceMap
- if (aSourceFile == null) {
- if (aSourceMapConsumer.file == null) {
- throw new Error(
- 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
- 'or the source map\'s "file" property. Both were omitted.'
- );
- }
- sourceFile = aSourceMapConsumer.file;
- }
- var sourceRoot = this._sourceRoot;
- // Make "sourceFile" relative if an absolute Url is passed.
- if (sourceRoot != null) {
- sourceFile = util.relative(sourceRoot, sourceFile);
- }
- // Applying the SourceMap can add and remove items from the sources and
- // the names array.
- var newSources = new ArraySet();
- var newNames = new ArraySet();
-
- // Find mappings for the "sourceFile"
- this._mappings.unsortedForEach(function (mapping) {
- if (mapping.source === sourceFile && mapping.originalLine != null) {
- // Check if it can be mapped by the source map, then update the mapping.
- var original = aSourceMapConsumer.originalPositionFor({
- line: mapping.originalLine,
- column: mapping.originalColumn
- });
- if (original.source != null) {
- // Copy mapping
- mapping.source = original.source;
- if (aSourceMapPath != null) {
- mapping.source = util.join(aSourceMapPath, mapping.source)
- }
- if (sourceRoot != null) {
- mapping.source = util.relative(sourceRoot, mapping.source);
- }
- mapping.originalLine = original.line;
- mapping.originalColumn = original.column;
- if (original.name != null) {
- mapping.name = original.name;
- }
- }
- }
-
- var source = mapping.source;
- if (source != null && !newSources.has(source)) {
- newSources.add(source);
- }
-
- var name = mapping.name;
- if (name != null && !newNames.has(name)) {
- newNames.add(name);
- }
-
- }, this);
- this._sources = newSources;
- this._names = newNames;
-
- // Copy sourcesContents of applied map.
- aSourceMapConsumer.sources.forEach(function (sourceFile) {
- var content = aSourceMapConsumer.sourceContentFor(sourceFile);
- if (content != null) {
- if (aSourceMapPath != null) {
- sourceFile = util.join(aSourceMapPath, sourceFile);
- }
- if (sourceRoot != null) {
- sourceFile = util.relative(sourceRoot, sourceFile);
- }
- this.setSourceContent(sourceFile, content);
- }
- }, this);
- };
-
- /**
- * A mapping can have one of the three levels of data:
- *
- * 1. Just the generated position.
- * 2. The Generated position, original position, and original source.
- * 3. Generated and original position, original source, as well as a name
- * token.
- *
- * To maintain consistency, we validate that any new mapping being added falls
- * in to one of these categories.
- */
- SourceMapGenerator.prototype._validateMapping =
- function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
- aName) {
- if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
- && aGenerated.line > 0 && aGenerated.column >= 0
- && !aOriginal && !aSource && !aName) {
- // Case 1.
- return;
- }
- else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
- && aOriginal && 'line' in aOriginal && 'column' in aOriginal
- && aGenerated.line > 0 && aGenerated.column >= 0
- && aOriginal.line > 0 && aOriginal.column >= 0
- && aSource) {
- // Cases 2 and 3.
- return;
- }
- else {
- throw new Error('Invalid mapping: ' + JSON.stringify({
- generated: aGenerated,
- source: aSource,
- original: aOriginal,
- name: aName
- }));
- }
- };
-
- /**
- * Serialize the accumulated mappings in to the stream of base 64 VLQs
- * specified by the source map format.
- */
- SourceMapGenerator.prototype._serializeMappings =
- function SourceMapGenerator_serializeMappings() {
- var previousGeneratedColumn = 0;
- var previousGeneratedLine = 1;
- var previousOriginalColumn = 0;
- var previousOriginalLine = 0;
- var previousName = 0;
- var previousSource = 0;
- var result = '';
- var mapping;
- var nameIdx;
- var sourceIdx;
-
- var mappings = this._mappings.toArray();
- for (var i = 0, len = mappings.length; i < len; i++) {
- mapping = mappings[i];
-
- if (mapping.generatedLine !== previousGeneratedLine) {
- previousGeneratedColumn = 0;
- while (mapping.generatedLine !== previousGeneratedLine) {
- result += ';';
- previousGeneratedLine++;
- }
- }
- else {
- if (i > 0) {
- if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
- continue;
- }
- result += ',';
- }
- }
-
- result += base64VLQ.encode(mapping.generatedColumn
- - previousGeneratedColumn);
- previousGeneratedColumn = mapping.generatedColumn;
-
- if (mapping.source != null) {
- sourceIdx = this._sources.indexOf(mapping.source);
- result += base64VLQ.encode(sourceIdx - previousSource);
- previousSource = sourceIdx;
-
- // lines are stored 0-based in SourceMap spec version 3
- result += base64VLQ.encode(mapping.originalLine - 1
- - previousOriginalLine);
- previousOriginalLine = mapping.originalLine - 1;
-
- result += base64VLQ.encode(mapping.originalColumn
- - previousOriginalColumn);
- previousOriginalColumn = mapping.originalColumn;
-
- if (mapping.name != null) {
- nameIdx = this._names.indexOf(mapping.name);
- result += base64VLQ.encode(nameIdx - previousName);
- previousName = nameIdx;
- }
- }
- }
-
- return result;
- };
-
- SourceMapGenerator.prototype._generateSourcesContent =
- function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
- return aSources.map(function (source) {
- if (!this._sourcesContents) {
- return null;
- }
- if (aSourceRoot != null) {
- source = util.relative(aSourceRoot, source);
- }
- var key = util.toSetString(source);
- return Object.prototype.hasOwnProperty.call(this._sourcesContents,
- key)
- ? this._sourcesContents[key]
- : null;
- }, this);
- };
-
- /**
- * Externalize the source map.
- */
- SourceMapGenerator.prototype.toJSON =
- function SourceMapGenerator_toJSON() {
- var map = {
- version: this._version,
- sources: this._sources.toArray(),
- names: this._names.toArray(),
- mappings: this._serializeMappings()
- };
- if (this._file != null) {
- map.file = this._file;
- }
- if (this._sourceRoot != null) {
- map.sourceRoot = this._sourceRoot;
- }
- if (this._sourcesContents) {
- map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
- }
-
- return map;
- };
-
- /**
- * Render the source map being generated to a string.
- */
- SourceMapGenerator.prototype.toString =
- function SourceMapGenerator_toString() {
- return JSON.stringify(this.toJSON());
- };
-
- exports.SourceMapGenerator = SourceMapGenerator;
- }
-
-
-/***/ },
-/* 2 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- *
- * Based on the Base 64 VLQ implementation in Closure Compiler:
- * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
- *
- * Copyright 2011 The Closure Compiler Authors. All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- {
- var base64 = __webpack_require__(3);
-
- // A single base 64 digit can contain 6 bits of data. For the base 64 variable
- // length quantities we use in the source map spec, the first bit is the sign,
- // the next four bits are the actual value, and the 6th bit is the
- // continuation bit. The continuation bit tells us whether there are more
- // digits in this value following this digit.
- //
- // Continuation
- // | Sign
- // | |
- // V V
- // 101011
-
- var VLQ_BASE_SHIFT = 5;
-
- // binary: 100000
- var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
-
- // binary: 011111
- var VLQ_BASE_MASK = VLQ_BASE - 1;
-
- // binary: 100000
- var VLQ_CONTINUATION_BIT = VLQ_BASE;
-
- /**
- * Converts from a two-complement value to a value where the sign bit is
- * placed in the least significant bit. For example, as decimals:
- * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
- * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
- */
- function toVLQSigned(aValue) {
- return aValue < 0
- ? ((-aValue) << 1) + 1
- : (aValue << 1) + 0;
- }
-
- /**
- * Converts to a two-complement value from a value where the sign bit is
- * placed in the least significant bit. For example, as decimals:
- * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
- * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
- */
- function fromVLQSigned(aValue) {
- var isNegative = (aValue & 1) === 1;
- var shifted = aValue >> 1;
- return isNegative
- ? -shifted
- : shifted;
- }
-
- /**
- * Returns the base 64 VLQ encoded value.
- */
- exports.encode = function base64VLQ_encode(aValue) {
- var encoded = "";
- var digit;
-
- var vlq = toVLQSigned(aValue);
-
- do {
- digit = vlq & VLQ_BASE_MASK;
- vlq >>>= VLQ_BASE_SHIFT;
- if (vlq > 0) {
- // There are still more digits in this value, so we must make sure the
- // continuation bit is marked.
- digit |= VLQ_CONTINUATION_BIT;
- }
- encoded += base64.encode(digit);
- } while (vlq > 0);
-
- return encoded;
- };
-
- /**
- * Decodes the next base 64 VLQ value from the given string and returns the
- * value and the rest of the string via the out parameter.
- */
- exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
- var strLen = aStr.length;
- var result = 0;
- var shift = 0;
- var continuation, digit;
-
- do {
- if (aIndex >= strLen) {
- throw new Error("Expected more digits in base 64 VLQ value.");
- }
-
- digit = base64.decode(aStr.charCodeAt(aIndex++));
- if (digit === -1) {
- throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
- }
-
- continuation = !!(digit & VLQ_CONTINUATION_BIT);
- digit &= VLQ_BASE_MASK;
- result = result + (digit << shift);
- shift += VLQ_BASE_SHIFT;
- } while (continuation);
-
- aOutParam.value = fromVLQSigned(result);
- aOutParam.rest = aIndex;
- };
- }
-
-
-/***/ },
-/* 3 */
-/***/ function(module, exports) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
-
- /**
- * Encode an integer in the range of 0 to 63 to a single base 64 digit.
- */
- exports.encode = function (number) {
- if (0 <= number && number < intToCharMap.length) {
- return intToCharMap[number];
- }
- throw new TypeError("Must be between 0 and 63: " + number);
- };
-
- /**
- * Decode a single base 64 character code digit to an integer. Returns -1 on
- * failure.
- */
- exports.decode = function (charCode) {
- var bigA = 65; // 'A'
- var bigZ = 90; // 'Z'
-
- var littleA = 97; // 'a'
- var littleZ = 122; // 'z'
-
- var zero = 48; // '0'
- var nine = 57; // '9'
-
- var plus = 43; // '+'
- var slash = 47; // '/'
-
- var littleOffset = 26;
- var numberOffset = 52;
-
- // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
- if (bigA <= charCode && charCode <= bigZ) {
- return (charCode - bigA);
- }
-
- // 26 - 51: abcdefghijklmnopqrstuvwxyz
- if (littleA <= charCode && charCode <= littleZ) {
- return (charCode - littleA + littleOffset);
- }
-
- // 52 - 61: 0123456789
- if (zero <= charCode && charCode <= nine) {
- return (charCode - zero + numberOffset);
- }
-
- // 62: +
- if (charCode == plus) {
- return 62;
- }
-
- // 63: /
- if (charCode == slash) {
- return 63;
- }
-
- // Invalid base64 digit.
- return -1;
- };
- }
-
-
-/***/ },
-/* 4 */
-/***/ function(module, exports) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- /**
- * This is a helper function for getting values from parameter/options
- * objects.
- *
- * @param args The object we are extracting values from
- * @param name The name of the property we are getting.
- * @param defaultValue An optional value to return if the property is missing
- * from the object. If this is not specified and the property is missing, an
- * error will be thrown.
- */
- function getArg(aArgs, aName, aDefaultValue) {
- if (aName in aArgs) {
- return aArgs[aName];
- } else if (arguments.length === 3) {
- return aDefaultValue;
- } else {
- throw new Error('"' + aName + '" is a required argument.');
- }
- }
- exports.getArg = getArg;
-
- var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
- var dataUrlRegexp = /^data:.+\,.+$/;
-
- function urlParse(aUrl) {
- var match = aUrl.match(urlRegexp);
- if (!match) {
- return null;
- }
- return {
- scheme: match[1],
- auth: match[2],
- host: match[3],
- port: match[4],
- path: match[5]
- };
- }
- exports.urlParse = urlParse;
-
- function urlGenerate(aParsedUrl) {
- var url = '';
- if (aParsedUrl.scheme) {
- url += aParsedUrl.scheme + ':';
- }
- url += '//';
- if (aParsedUrl.auth) {
- url += aParsedUrl.auth + '@';
- }
- if (aParsedUrl.host) {
- url += aParsedUrl.host;
- }
- if (aParsedUrl.port) {
- url += ":" + aParsedUrl.port
- }
- if (aParsedUrl.path) {
- url += aParsedUrl.path;
- }
- return url;
- }
- exports.urlGenerate = urlGenerate;
-
- /**
- * Normalizes a path, or the path portion of a URL:
- *
- * - Replaces consequtive slashes with one slash.
- * - Removes unnecessary '.' parts.
- * - Removes unnecessary '<dir>/..' parts.
- *
- * Based on code in the Node.js 'path' core module.
- *
- * @param aPath The path or url to normalize.
- */
- function normalize(aPath) {
- var path = aPath;
- var url = urlParse(aPath);
- if (url) {
- if (!url.path) {
- return aPath;
- }
- path = url.path;
- }
- var isAbsolute = exports.isAbsolute(path);
-
- var parts = path.split(/\/+/);
- for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
- part = parts[i];
- if (part === '.') {
- parts.splice(i, 1);
- } else if (part === '..') {
- up++;
- } else if (up > 0) {
- if (part === '') {
- // The first part is blank if the path is absolute. Trying to go
- // above the root is a no-op. Therefore we can remove all '..' parts
- // directly after the root.
- parts.splice(i + 1, up);
- up = 0;
- } else {
- parts.splice(i, 2);
- up--;
- }
- }
- }
- path = parts.join('/');
-
- if (path === '') {
- path = isAbsolute ? '/' : '.';
- }
-
- if (url) {
- url.path = path;
- return urlGenerate(url);
- }
- return path;
- }
- exports.normalize = normalize;
-
- /**
- * Joins two paths/URLs.
- *
- * @param aRoot The root path or URL.
- * @param aPath The path or URL to be joined with the root.
- *
- * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
- * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
- * first.
- * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
- * is updated with the result and aRoot is returned. Otherwise the result
- * is returned.
- * - If aPath is absolute, the result is aPath.
- * - Otherwise the two paths are joined with a slash.
- * - Joining for example 'http://' and 'www.example.com' is also supported.
- */
- function join(aRoot, aPath) {
- if (aRoot === "") {
- aRoot = ".";
- }
- if (aPath === "") {
- aPath = ".";
- }
- var aPathUrl = urlParse(aPath);
- var aRootUrl = urlParse(aRoot);
- if (aRootUrl) {
- aRoot = aRootUrl.path || '/';
- }
-
- // `join(foo, '//www.example.org')`
- if (aPathUrl && !aPathUrl.scheme) {
- if (aRootUrl) {
- aPathUrl.scheme = aRootUrl.scheme;
- }
- return urlGenerate(aPathUrl);
- }
-
- if (aPathUrl || aPath.match(dataUrlRegexp)) {
- return aPath;
- }
-
- // `join('http://', 'www.example.com')`
- if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
- aRootUrl.host = aPath;
- return urlGenerate(aRootUrl);
- }
-
- var joined = aPath.charAt(0) === '/'
- ? aPath
- : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
-
- if (aRootUrl) {
- aRootUrl.path = joined;
- return urlGenerate(aRootUrl);
- }
- return joined;
- }
- exports.join = join;
-
- exports.isAbsolute = function (aPath) {
- return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
- };
-
- /**
- * Make a path relative to a URL or another path.
- *
- * @param aRoot The root path or URL.
- * @param aPath The path or URL to be made relative to aRoot.
- */
- function relative(aRoot, aPath) {
- if (aRoot === "") {
- aRoot = ".";
- }
-
- aRoot = aRoot.replace(/\/$/, '');
-
- // It is possible for the path to be above the root. In this case, simply
- // checking whether the root is a prefix of the path won't work. Instead, we
- // need to remove components from the root one by one, until either we find
- // a prefix that fits, or we run out of components to remove.
- var level = 0;
- while (aPath.indexOf(aRoot + '/') !== 0) {
- var index = aRoot.lastIndexOf("/");
- if (index < 0) {
- return aPath;
- }
-
- // If the only part of the root that is left is the scheme (i.e. http://,
- // file:///, etc.), one or more slashes (/), or simply nothing at all, we
- // have exhausted all components, so the path is not relative to the root.
- aRoot = aRoot.slice(0, index);
- if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
- return aPath;
- }
-
- ++level;
- }
-
- // Make sure we add a "../" for each component we removed from the root.
- return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
- }
- exports.relative = relative;
-
- /**
- * Because behavior goes wacky when you set `__proto__` on objects, we
- * have to prefix all the strings in our set with an arbitrary character.
- *
- * See https://github.com/mozilla/source-map/pull/31 and
- * https://github.com/mozilla/source-map/issues/30
- *
- * @param String aStr
- */
- function toSetString(aStr) {
- return '$' + aStr;
- }
- exports.toSetString = toSetString;
-
- function fromSetString(aStr) {
- return aStr.substr(1);
- }
- exports.fromSetString = fromSetString;
-
- /**
- * Comparator between two mappings where the original positions are compared.
- *
- * Optionally pass in `true` as `onlyCompareGenerated` to consider two
- * mappings with the same original source/line/column, but different generated
- * line and column the same. Useful when searching for a mapping with a
- * stubbed out mapping.
- */
- function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
- var cmp = mappingA.source - mappingB.source;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalLine - mappingB.originalLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalColumn - mappingB.originalColumn;
- if (cmp !== 0 || onlyCompareOriginal) {
- return cmp;
- }
-
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.generatedLine - mappingB.generatedLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- return mappingA.name - mappingB.name;
- }
- exports.compareByOriginalPositions = compareByOriginalPositions;
-
- /**
- * Comparator between two mappings with deflated source and name indices where
- * the generated positions are compared.
- *
- * Optionally pass in `true` as `onlyCompareGenerated` to consider two
- * mappings with the same generated line and column, but different
- * source/name/original line and column the same. Useful when searching for a
- * mapping with a stubbed out mapping.
- */
- function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
- var cmp = mappingA.generatedLine - mappingB.generatedLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
- if (cmp !== 0 || onlyCompareGenerated) {
- return cmp;
- }
-
- cmp = mappingA.source - mappingB.source;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalLine - mappingB.originalLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalColumn - mappingB.originalColumn;
- if (cmp !== 0) {
- return cmp;
- }
-
- return mappingA.name - mappingB.name;
- }
- exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
-
- function strcmp(aStr1, aStr2) {
- if (aStr1 === aStr2) {
- return 0;
- }
-
- if (aStr1 > aStr2) {
- return 1;
- }
-
- return -1;
- }
-
- /**
- * Comparator between two mappings with inflated source and name strings where
- * the generated positions are compared.
- */
- function compareByGeneratedPositionsInflated(mappingA, mappingB) {
- var cmp = mappingA.generatedLine - mappingB.generatedLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = strcmp(mappingA.source, mappingB.source);
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalLine - mappingB.originalLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalColumn - mappingB.originalColumn;
- if (cmp !== 0) {
- return cmp;
- }
-
- return strcmp(mappingA.name, mappingB.name);
- }
- exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
- }
-
-
-/***/ },
-/* 5 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- var util = __webpack_require__(4);
-
- /**
- * A data structure which is a combination of an array and a set. Adding a new
- * member is O(1), testing for membership is O(1), and finding the index of an
- * element is O(1). Removing elements from the set is not supported. Only
- * strings are supported for membership.
- */
- function ArraySet() {
- this._array = [];
- this._set = {};
- }
-
- /**
- * Static method for creating ArraySet instances from an existing array.
- */
- ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
- var set = new ArraySet();
- for (var i = 0, len = aArray.length; i < len; i++) {
- set.add(aArray[i], aAllowDuplicates);
- }
- return set;
- };
-
- /**
- * Return how many unique items are in this ArraySet. If duplicates have been
- * added, than those do not count towards the size.
- *
- * @returns Number
- */
- ArraySet.prototype.size = function ArraySet_size() {
- return Object.getOwnPropertyNames(this._set).length;
- };
-
- /**
- * Add the given string to this set.
- *
- * @param String aStr
- */
- ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
- var sStr = util.toSetString(aStr);
- var isDuplicate = this._set.hasOwnProperty(sStr);
- var idx = this._array.length;
- if (!isDuplicate || aAllowDuplicates) {
- this._array.push(aStr);
- }
- if (!isDuplicate) {
- this._set[sStr] = idx;
- }
- };
-
- /**
- * Is the given string a member of this set?
- *
- * @param String aStr
- */
- ArraySet.prototype.has = function ArraySet_has(aStr) {
- var sStr = util.toSetString(aStr);
- return this._set.hasOwnProperty(sStr);
- };
-
- /**
- * What is the index of the given string in the array?
- *
- * @param String aStr
- */
- ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
- var sStr = util.toSetString(aStr);
- if (this._set.hasOwnProperty(sStr)) {
- return this._set[sStr];
- }
- throw new Error('"' + aStr + '" is not in the set.');
- };
-
- /**
- * What is the element at the given index?
- *
- * @param Number aIdx
- */
- ArraySet.prototype.at = function ArraySet_at(aIdx) {
- if (aIdx >= 0 && aIdx < this._array.length) {
- return this._array[aIdx];
- }
- throw new Error('No element indexed by ' + aIdx);
- };
-
- /**
- * Returns the array representation of this set (which has the proper indices
- * indicated by indexOf). Note that this is a copy of the internal array used
- * for storing the members so that no one can mess with internal state.
- */
- ArraySet.prototype.toArray = function ArraySet_toArray() {
- return this._array.slice();
- };
-
- exports.ArraySet = ArraySet;
- }
-
-
-/***/ },
-/* 6 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2014 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- var util = __webpack_require__(4);
-
- /**
- * Determine whether mappingB is after mappingA with respect to generated
- * position.
- */
- function generatedPositionAfter(mappingA, mappingB) {
- // Optimized for most common case
- var lineA = mappingA.generatedLine;
- var lineB = mappingB.generatedLine;
- var columnA = mappingA.generatedColumn;
- var columnB = mappingB.generatedColumn;
- return lineB > lineA || lineB == lineA && columnB >= columnA ||
- util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
- }
-
- /**
- * A data structure to provide a sorted view of accumulated mappings in a
- * performance conscious manner. It trades a neglibable overhead in general
- * case for a large speedup in case of mappings being added in order.
- */
- function MappingList() {
- this._array = [];
- this._sorted = true;
- // Serves as infimum
- this._last = {generatedLine: -1, generatedColumn: 0};
- }
-
- /**
- * Iterate through internal items. This method takes the same arguments that
- * `Array.prototype.forEach` takes.
- *
- * NOTE: The order of the mappings is NOT guaranteed.
- */
- MappingList.prototype.unsortedForEach =
- function MappingList_forEach(aCallback, aThisArg) {
- this._array.forEach(aCallback, aThisArg);
- };
-
- /**
- * Add the given source mapping.
- *
- * @param Object aMapping
- */
- MappingList.prototype.add = function MappingList_add(aMapping) {
- if (generatedPositionAfter(this._last, aMapping)) {
- this._last = aMapping;
- this._array.push(aMapping);
- } else {
- this._sorted = false;
- this._array.push(aMapping);
- }
- };
-
- /**
- * Returns the flat, sorted array of mappings. The mappings are sorted by
- * generated position.
- *
- * WARNING: This method returns internal data without copying, for
- * performance. The return value must NOT be mutated, and should be treated as
- * an immutable borrow. If you want to take ownership, you must make your own
- * copy.
- */
- MappingList.prototype.toArray = function MappingList_toArray() {
- if (!this._sorted) {
- this._array.sort(util.compareByGeneratedPositionsInflated);
- this._sorted = true;
- }
- return this._array;
- };
-
- exports.MappingList = MappingList;
- }
-
-
-/***/ },
-/* 7 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- var util = __webpack_require__(4);
- var binarySearch = __webpack_require__(8);
- var ArraySet = __webpack_require__(5).ArraySet;
- var base64VLQ = __webpack_require__(2);
- var quickSort = __webpack_require__(9).quickSort;
-
- function SourceMapConsumer(aSourceMap) {
- var sourceMap = aSourceMap;
- if (typeof aSourceMap === 'string') {
- sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
- }
-
- return sourceMap.sections != null
- ? new IndexedSourceMapConsumer(sourceMap)
- : new BasicSourceMapConsumer(sourceMap);
- }
-
- SourceMapConsumer.fromSourceMap = function(aSourceMap) {
- return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
- }
-
- /**
- * The version of the source mapping spec that we are consuming.
- */
- SourceMapConsumer.prototype._version = 3;
-
- // `__generatedMappings` and `__originalMappings` are arrays that hold the
- // parsed mapping coordinates from the source map's "mappings" attribute. They
- // are lazily instantiated, accessed via the `_generatedMappings` and
- // `_originalMappings` getters respectively, and we only parse the mappings
- // and create these arrays once queried for a source location. We jump through
- // these hoops because there can be many thousands of mappings, and parsing
- // them is expensive, so we only want to do it if we must.
- //
- // Each object in the arrays is of the form:
- //
- // {
- // generatedLine: The line number in the generated code,
- // generatedColumn: The column number in the generated code,
- // source: The path to the original source file that generated this
- // chunk of code,
- // originalLine: The line number in the original source that
- // corresponds to this chunk of generated code,
- // originalColumn: The column number in the original source that
- // corresponds to this chunk of generated code,
- // name: The name of the original symbol which generated this chunk of
- // code.
- // }
- //
- // All properties except for `generatedLine` and `generatedColumn` can be
- // `null`.
- //
- // `_generatedMappings` is ordered by the generated positions.
- //
- // `_originalMappings` is ordered by the original positions.
-
- SourceMapConsumer.prototype.__generatedMappings = null;
- Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
- get: function () {
- if (!this.__generatedMappings) {
- this._parseMappings(this._mappings, this.sourceRoot);
- }
-
- return this.__generatedMappings;
- }
- });
-
- SourceMapConsumer.prototype.__originalMappings = null;
- Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
- get: function () {
- if (!this.__originalMappings) {
- this._parseMappings(this._mappings, this.sourceRoot);
- }
-
- return this.__originalMappings;
- }
- });
-
- SourceMapConsumer.prototype._charIsMappingSeparator =
- function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
- var c = aStr.charAt(index);
- return c === ";" || c === ",";
- };
-
- /**
- * Parse the mappings in a string in to a data structure which we can easily
- * query (the ordered arrays in the `this.__generatedMappings` and
- * `this.__originalMappings` properties).
- */
- SourceMapConsumer.prototype._parseMappings =
- function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
- throw new Error("Subclasses must implement _parseMappings");
- };
-
- SourceMapConsumer.GENERATED_ORDER = 1;
- SourceMapConsumer.ORIGINAL_ORDER = 2;
-
- SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
- SourceMapConsumer.LEAST_UPPER_BOUND = 2;
-
- /**
- * Iterate over each mapping between an original source/line/column and a
- * generated line/column in this source map.
- *
- * @param Function aCallback
- * The function that is called with each mapping.
- * @param Object aContext
- * Optional. If specified, this object will be the value of `this` every
- * time that `aCallback` is called.
- * @param aOrder
- * Either `SourceMapConsumer.GENERATED_ORDER` or
- * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
- * iterate over the mappings sorted by the generated file's line/column
- * order or the original's source/line/column order, respectively. Defaults to
- * `SourceMapConsumer.GENERATED_ORDER`.
- */
- SourceMapConsumer.prototype.eachMapping =
- function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
- var context = aContext || null;
- var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
-
- var mappings;
- switch (order) {
- case SourceMapConsumer.GENERATED_ORDER:
- mappings = this._generatedMappings;
- break;
- case SourceMapConsumer.ORIGINAL_ORDER:
- mappings = this._originalMappings;
- break;
- default:
- throw new Error("Unknown order of iteration.");
- }
-
- var sourceRoot = this.sourceRoot;
- mappings.map(function (mapping) {
- var source = mapping.source === null ? null : this._sources.at(mapping.source);
- if (source != null && sourceRoot != null) {
- source = util.join(sourceRoot, source);
- }
- return {
- source: source,
- generatedLine: mapping.generatedLine,
- generatedColumn: mapping.generatedColumn,
- originalLine: mapping.originalLine,
- originalColumn: mapping.originalColumn,
- name: mapping.name === null ? null : this._names.at(mapping.name)
- };
- }, this).forEach(aCallback, context);
- };
-
- /**
- * Returns all generated line and column information for the original source,
- * line, and column provided. If no column is provided, returns all mappings
- * corresponding to a either the line we are searching for or the next
- * closest line that has any mappings. Otherwise, returns all mappings
- * corresponding to the given line and either the column we are searching for
- * or the next closest column that has any offsets.
- *
- * The only argument is an object with the following properties:
- *
- * - source: The filename of the original source.
- * - line: The line number in the original source.
- * - column: Optional. the column number in the original source.
- *
- * and an array of objects is returned, each with the following properties:
- *
- * - line: The line number in the generated source, or null.
- * - column: The column number in the generated source, or null.
- */
- SourceMapConsumer.prototype.allGeneratedPositionsFor =
- function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
- var line = util.getArg(aArgs, 'line');
-
- // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
- // returns the index of the closest mapping less than the needle. By
- // setting needle.originalColumn to 0, we thus find the last mapping for
- // the given line, provided such a mapping exists.
- var needle = {
- source: util.getArg(aArgs, 'source'),
- originalLine: line,
- originalColumn: util.getArg(aArgs, 'column', 0)
- };
-
- if (this.sourceRoot != null) {
- needle.source = util.relative(this.sourceRoot, needle.source);
- }
- if (!this._sources.has(needle.source)) {
- return [];
- }
- needle.source = this._sources.indexOf(needle.source);
-
- var mappings = [];
-
- var index = this._findMapping(needle,
- this._originalMappings,
- "originalLine",
- "originalColumn",
- util.compareByOriginalPositions,
- binarySearch.LEAST_UPPER_BOUND);
- if (index >= 0) {
- var mapping = this._originalMappings[index];
-
- if (aArgs.column === undefined) {
- var originalLine = mapping.originalLine;
-
- // Iterate until either we run out of mappings, or we run into
- // a mapping for a different line than the one we found. Since
- // mappings are sorted, this is guaranteed to find all mappings for
- // the line we found.
- while (mapping && mapping.originalLine === originalLine) {
- mappings.push({
- line: util.getArg(mapping, 'generatedLine', null),
- column: util.getArg(mapping, 'generatedColumn', null),
- lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
- });
-
- mapping = this._originalMappings[++index];
- }
- } else {
- var originalColumn = mapping.originalColumn;
-
- // Iterate until either we run out of mappings, or we run into
- // a mapping for a different line than the one we were searching for.
- // Since mappings are sorted, this is guaranteed to find all mappings for
- // the line we are searching for.
- while (mapping &&
- mapping.originalLine === line &&
- mapping.originalColumn == originalColumn) {
- mappings.push({
- line: util.getArg(mapping, 'generatedLine', null),
- column: util.getArg(mapping, 'generatedColumn', null),
- lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
- });
-
- mapping = this._originalMappings[++index];
- }
- }
- }
-
- return mappings;
- };
-
- exports.SourceMapConsumer = SourceMapConsumer;
-
- /**
- * A BasicSourceMapConsumer instance represents a parsed source map which we can
- * query for information about the original file positions by giving it a file
- * position in the generated source.
- *
- * The only parameter is the raw source map (either as a JSON string, or
- * already parsed to an object). According to the spec, source maps have the
- * following attributes:
- *
- * - version: Which version of the source map spec this map is following.
- * - sources: An array of URLs to the original source files.
- * - names: An array of identifiers which can be referrenced by individual mappings.
- * - sourceRoot: Optional. The URL root from which all sources are relative.
- * - sourcesContent: Optional. An array of contents of the original source files.
- * - mappings: A string of base64 VLQs which contain the actual mappings.
- * - file: Optional. The generated file this source map is associated with.
- *
- * Here is an example source map, taken from the source map spec[0]:
- *
- * {
- * version : 3,
- * file: "out.js",
- * sourceRoot : "",
- * sources: ["foo.js", "bar.js"],
- * names: ["src", "maps", "are", "fun"],
- * mappings: "AA,AB;;ABCDE;"
- * }
- *
- * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
- */
- function BasicSourceMapConsumer(aSourceMap) {
- var sourceMap = aSourceMap;
- if (typeof aSourceMap === 'string') {
- sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
- }
-
- var version = util.getArg(sourceMap, 'version');
- var sources = util.getArg(sourceMap, 'sources');
- // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
- // requires the array) to play nice here.
- var names = util.getArg(sourceMap, 'names', []);
- var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
- var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
- var mappings = util.getArg(sourceMap, 'mappings');
- var file = util.getArg(sourceMap, 'file', null);
-
- // Once again, Sass deviates from the spec and supplies the version as a
- // string rather than a number, so we use loose equality checking here.
- if (version != this._version) {
- throw new Error('Unsupported version: ' + version);
- }
-
- sources = sources
- // Some source maps produce relative source paths like "./foo.js" instead of
- // "foo.js". Normalize these first so that future comparisons will succeed.
- // See bugzil.la/1090768.
- .map(util.normalize)
- // Always ensure that absolute sources are internally stored relative to
- // the source root, if the source root is absolute. Not doing this would
- // be particularly problematic when the source root is a prefix of the
- // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
- .map(function (source) {
- return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)
- ? util.relative(sourceRoot, source)
- : source;
- });
-
- // Pass `true` below to allow duplicate names and sources. While source maps
- // are intended to be compressed and deduplicated, the TypeScript compiler
- // sometimes generates source maps with duplicates in them. See Github issue
- // #72 and bugzil.la/889492.
- this._names = ArraySet.fromArray(names, true);
- this._sources = ArraySet.fromArray(sources, true);
-
- this.sourceRoot = sourceRoot;
- this.sourcesContent = sourcesContent;
- this._mappings = mappings;
- this.file = file;
- }
-
- BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
- BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
-
- /**
- * Create a BasicSourceMapConsumer from a SourceMapGenerator.
- *
- * @param SourceMapGenerator aSourceMap
- * The source map that will be consumed.
- * @returns BasicSourceMapConsumer
- */
- BasicSourceMapConsumer.fromSourceMap =
- function SourceMapConsumer_fromSourceMap(aSourceMap) {
- var smc = Object.create(BasicSourceMapConsumer.prototype);
-
- var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
- var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
- smc.sourceRoot = aSourceMap._sourceRoot;
- smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
- smc.sourceRoot);
- smc.file = aSourceMap._file;
-
- // Because we are modifying the entries (by converting string sources and
- // names to indices into the sources and names ArraySets), we have to make
- // a copy of the entry or else bad things happen. Shared mutable state
- // strikes again! See github issue #191.
-
- var generatedMappings = aSourceMap._mappings.toArray().slice();
- var destGeneratedMappings = smc.__generatedMappings = [];
- var destOriginalMappings = smc.__originalMappings = [];
-
- for (var i = 0, length = generatedMappings.length; i < length; i++) {
- var srcMapping = generatedMappings[i];
- var destMapping = new Mapping;
- destMapping.generatedLine = srcMapping.generatedLine;
- destMapping.generatedColumn = srcMapping.generatedColumn;
-
- if (srcMapping.source) {
- destMapping.source = sources.indexOf(srcMapping.source);
- destMapping.originalLine = srcMapping.originalLine;
- destMapping.originalColumn = srcMapping.originalColumn;
-
- if (srcMapping.name) {
- destMapping.name = names.indexOf(srcMapping.name);
- }
-
- destOriginalMappings.push(destMapping);
- }
-
- destGeneratedMappings.push(destMapping);
- }
-
- quickSort(smc.__originalMappings, util.compareByOriginalPositions);
-
- return smc;
- };
-
- /**
- * The version of the source mapping spec that we are consuming.
- */
- BasicSourceMapConsumer.prototype._version = 3;
-
- /**
- * The list of original sources.
- */
- Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
- get: function () {
- return this._sources.toArray().map(function (s) {
- return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
- }, this);
- }
- });
-
- /**
- * Provide the JIT with a nice shape / hidden class.
- */
- function Mapping() {
- this.generatedLine = 0;
- this.generatedColumn = 0;
- this.source = null;
- this.originalLine = null;
- this.originalColumn = null;
- this.name = null;
- }
-
- /**
- * Parse the mappings in a string in to a data structure which we can easily
- * query (the ordered arrays in the `this.__generatedMappings` and
- * `this.__originalMappings` properties).
- */
- BasicSourceMapConsumer.prototype._parseMappings =
- function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
- var generatedLine = 1;
- var previousGeneratedColumn = 0;
- var previousOriginalLine = 0;
- var previousOriginalColumn = 0;
- var previousSource = 0;
- var previousName = 0;
- var length = aStr.length;
- var index = 0;
- var cachedSegments = {};
- var temp = {};
- var originalMappings = [];
- var generatedMappings = [];
- var mapping, str, segment, end, value;
-
- while (index < length) {
- if (aStr.charAt(index) === ';') {
- generatedLine++;
- index++;
- previousGeneratedColumn = 0;
- }
- else if (aStr.charAt(index) === ',') {
- index++;
- }
- else {
- mapping = new Mapping();
- mapping.generatedLine = generatedLine;
-
- // Because each offset is encoded relative to the previous one,
- // many segments often have the same encoding. We can exploit this
- // fact by caching the parsed variable length fields of each segment,
- // allowing us to avoid a second parse if we encounter the same
- // segment again.
- for (end = index; end < length; end++) {
- if (this._charIsMappingSeparator(aStr, end)) {
- break;
- }
- }
- str = aStr.slice(index, end);
-
- segment = cachedSegments[str];
- if (segment) {
- index += str.length;
- } else {
- segment = [];
- while (index < end) {
- base64VLQ.decode(aStr, index, temp);
- value = temp.value;
- index = temp.rest;
- segment.push(value);
- }
-
- if (segment.length === 2) {
- throw new Error('Found a source, but no line and column');
- }
-
- if (segment.length === 3) {
- throw new Error('Found a source and line, but no column');
- }
-
- cachedSegments[str] = segment;
- }
-
- // Generated column.
- mapping.generatedColumn = previousGeneratedColumn + segment[0];
- previousGeneratedColumn = mapping.generatedColumn;
-
- if (segment.length > 1) {
- // Original source.
- mapping.source = previousSource + segment[1];
- previousSource += segment[1];
-
- // Original line.
- mapping.originalLine = previousOriginalLine + segment[2];
- previousOriginalLine = mapping.originalLine;
- // Lines are stored 0-based
- mapping.originalLine += 1;
-
- // Original column.
- mapping.originalColumn = previousOriginalColumn + segment[3];
- previousOriginalColumn = mapping.originalColumn;
-
- if (segment.length > 4) {
- // Original name.
- mapping.name = previousName + segment[4];
- previousName += segment[4];
- }
- }
-
- generatedMappings.push(mapping);
- if (typeof mapping.originalLine === 'number') {
- originalMappings.push(mapping);
- }
- }
- }
-
- quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
- this.__generatedMappings = generatedMappings;
-
- quickSort(originalMappings, util.compareByOriginalPositions);
- this.__originalMappings = originalMappings;
- };
-
- /**
- * Find the mapping that best matches the hypothetical "needle" mapping that
- * we are searching for in the given "haystack" of mappings.
- */
- BasicSourceMapConsumer.prototype._findMapping =
- function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
- aColumnName, aComparator, aBias) {
- // To return the position we are searching for, we must first find the
- // mapping for the given position and then return the opposite position it
- // points to. Because the mappings are sorted, we can use binary search to
- // find the best mapping.
-
- if (aNeedle[aLineName] <= 0) {
- throw new TypeError('Line must be greater than or equal to 1, got '
- + aNeedle[aLineName]);
- }
- if (aNeedle[aColumnName] < 0) {
- throw new TypeError('Column must be greater than or equal to 0, got '
- + aNeedle[aColumnName]);
- }
-
- return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
- };
-
- /**
- * Compute the last column for each generated mapping. The last column is
- * inclusive.
- */
- BasicSourceMapConsumer.prototype.computeColumnSpans =
- function SourceMapConsumer_computeColumnSpans() {
- for (var index = 0; index < this._generatedMappings.length; ++index) {
- var mapping = this._generatedMappings[index];
-
- // Mappings do not contain a field for the last generated columnt. We
- // can come up with an optimistic estimate, however, by assuming that
- // mappings are contiguous (i.e. given two consecutive mappings, the
- // first mapping ends where the second one starts).
- if (index + 1 < this._generatedMappings.length) {
- var nextMapping = this._generatedMappings[index + 1];
-
- if (mapping.generatedLine === nextMapping.generatedLine) {
- mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
- continue;
- }
- }
-
- // The last mapping for each line spans the entire line.
- mapping.lastGeneratedColumn = Infinity;
- }
- };
-
- /**
- * Returns the original source, line, and column information for the generated
- * source's line and column positions provided. The only argument is an object
- * with the following properties:
- *
- * - line: The line number in the generated source.
- * - column: The column number in the generated source.
- * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
- * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
- *
- * and an object is returned with the following properties:
- *
- * - source: The original source file, or null.
- * - line: The line number in the original source, or null.
- * - column: The column number in the original source, or null.
- * - name: The original identifier, or null.
- */
- BasicSourceMapConsumer.prototype.originalPositionFor =
- function SourceMapConsumer_originalPositionFor(aArgs) {
- var needle = {
- generatedLine: util.getArg(aArgs, 'line'),
- generatedColumn: util.getArg(aArgs, 'column')
- };
-
- var index = this._findMapping(
- needle,
- this._generatedMappings,
- "generatedLine",
- "generatedColumn",
- util.compareByGeneratedPositionsDeflated,
- util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
- );
-
- if (index >= 0) {
- var mapping = this._generatedMappings[index];
-
- if (mapping.generatedLine === needle.generatedLine) {
- var source = util.getArg(mapping, 'source', null);
- if (source !== null) {
- source = this._sources.at(source);
- if (this.sourceRoot != null) {
- source = util.join(this.sourceRoot, source);
- }
- }
- var name = util.getArg(mapping, 'name', null);
- if (name !== null) {
- name = this._names.at(name);
- }
- return {
- source: source,
- line: util.getArg(mapping, 'originalLine', null),
- column: util.getArg(mapping, 'originalColumn', null),
- name: name
- };
- }
- }
-
- return {
- source: null,
- line: null,
- column: null,
- name: null
- };
- };
-
- /**
- * Return true if we have the source content for every source in the source
- * map, false otherwise.
- */
- BasicSourceMapConsumer.prototype.hasContentsOfAllSources =
- function BasicSourceMapConsumer_hasContentsOfAllSources() {
- if (!this.sourcesContent) {
- return false;
- }
- return this.sourcesContent.length >= this._sources.size() &&
- !this.sourcesContent.some(function (sc) { return sc == null; });
- };
-
- /**
- * Returns the original source content. The only argument is the url of the
- * original source file. Returns null if no original source content is
- * available.
- */
- BasicSourceMapConsumer.prototype.sourceContentFor =
- function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
- if (!this.sourcesContent) {
- return null;
- }
-
- if (this.sourceRoot != null) {
- aSource = util.relative(this.sourceRoot, aSource);
- }
-
- if (this._sources.has(aSource)) {
- return this.sourcesContent[this._sources.indexOf(aSource)];
- }
-
- var url;
- if (this.sourceRoot != null
- && (url = util.urlParse(this.sourceRoot))) {
- // XXX: file:// URIs and absolute paths lead to unexpected behavior for
- // many users. We can help them out when they expect file:// URIs to
- // behave like it would if they were running a local HTTP server. See
- // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
- var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
- if (url.scheme == "file"
- && this._sources.has(fileUriAbsPath)) {
- return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
- }
-
- if ((!url.path || url.path == "/")
- && this._sources.has("/" + aSource)) {
- return this.sourcesContent[this._sources.indexOf("/" + aSource)];
- }
- }
-
- // This function is used recursively from
- // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
- // don't want to throw if we can't find the source - we just want to
- // return null, so we provide a flag to exit gracefully.
- if (nullOnMissing) {
- return null;
- }
- else {
- throw new Error('"' + aSource + '" is not in the SourceMap.');
- }
- };
-
- /**
- * Returns the generated line and column information for the original source,
- * line, and column positions provided. The only argument is an object with
- * the following properties:
- *
- * - source: The filename of the original source.
- * - line: The line number in the original source.
- * - column: The column number in the original source.
- * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
- * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
- *
- * and an object is returned with the following properties:
- *
- * - line: The line number in the generated source, or null.
- * - column: The column number in the generated source, or null.
- */
- BasicSourceMapConsumer.prototype.generatedPositionFor =
- function SourceMapConsumer_generatedPositionFor(aArgs) {
- var source = util.getArg(aArgs, 'source');
- if (this.sourceRoot != null) {
- source = util.relative(this.sourceRoot, source);
- }
- if (!this._sources.has(source)) {
- return {
- line: null,
- column: null,
- lastColumn: null
- };
- }
- source = this._sources.indexOf(source);
-
- var needle = {
- source: source,
- originalLine: util.getArg(aArgs, 'line'),
- originalColumn: util.getArg(aArgs, 'column')
- };
-
- var index = this._findMapping(
- needle,
- this._originalMappings,
- "originalLine",
- "originalColumn",
- util.compareByOriginalPositions,
- util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
- );
-
- if (index >= 0) {
- var mapping = this._originalMappings[index];
-
- if (mapping.source === needle.source) {
- return {
- line: util.getArg(mapping, 'generatedLine', null),
- column: util.getArg(mapping, 'generatedColumn', null),
- lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
- };
- }
- }
-
- return {
- line: null,
- column: null,
- lastColumn: null
- };
- };
-
- exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
-
- /**
- * An IndexedSourceMapConsumer instance represents a parsed source map which
- * we can query for information. It differs from BasicSourceMapConsumer in
- * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
- * input.
- *
- * The only parameter is a raw source map (either as a JSON string, or already
- * parsed to an object). According to the spec for indexed source maps, they
- * have the following attributes:
- *
- * - version: Which version of the source map spec this map is following.
- * - file: Optional. The generated file this source map is associated with.
- * - sections: A list of section definitions.
- *
- * Each value under the "sections" field has two fields:
- * - offset: The offset into the original specified at which this section
- * begins to apply, defined as an object with a "line" and "column"
- * field.
- * - map: A source map definition. This source map could also be indexed,
- * but doesn't have to be.
- *
- * Instead of the "map" field, it's also possible to have a "url" field
- * specifying a URL to retrieve a source map from, but that's currently
- * unsupported.
- *
- * Here's an example source map, taken from the source map spec[0], but
- * modified to omit a section which uses the "url" field.
- *
- * {
- * version : 3,
- * file: "app.js",
- * sections: [{
- * offset: {line:100, column:10},
- * map: {
- * version : 3,
- * file: "section.js",
- * sources: ["foo.js", "bar.js"],
- * names: ["src", "maps", "are", "fun"],
- * mappings: "AAAA,E;;ABCDE;"
- * }
- * }],
- * }
- *
- * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
- */
- function IndexedSourceMapConsumer(aSourceMap) {
- var sourceMap = aSourceMap;
- if (typeof aSourceMap === 'string') {
- sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
- }
-
- var version = util.getArg(sourceMap, 'version');
- var sections = util.getArg(sourceMap, 'sections');
-
- if (version != this._version) {
- throw new Error('Unsupported version: ' + version);
- }
-
- this._sources = new ArraySet();
- this._names = new ArraySet();
-
- var lastOffset = {
- line: -1,
- column: 0
- };
- this._sections = sections.map(function (s) {
- if (s.url) {
- // The url field will require support for asynchronicity.
- // See https://github.com/mozilla/source-map/issues/16
- throw new Error('Support for url field in sections not implemented.');
- }
- var offset = util.getArg(s, 'offset');
- var offsetLine = util.getArg(offset, 'line');
- var offsetColumn = util.getArg(offset, 'column');
-
- if (offsetLine < lastOffset.line ||
- (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
- throw new Error('Section offsets must be ordered and non-overlapping.');
- }
- lastOffset = offset;
-
- return {
- generatedOffset: {
- // The offset fields are 0-based, but we use 1-based indices when
- // encoding/decoding from VLQ.
- generatedLine: offsetLine + 1,
- generatedColumn: offsetColumn + 1
- },
- consumer: new SourceMapConsumer(util.getArg(s, 'map'))
- }
- });
- }
-
- IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
- IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
-
- /**
- * The version of the source mapping spec that we are consuming.
- */
- IndexedSourceMapConsumer.prototype._version = 3;
-
- /**
- * The list of original sources.
- */
- Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
- get: function () {
- var sources = [];
- for (var i = 0; i < this._sections.length; i++) {
- for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
- sources.push(this._sections[i].consumer.sources[j]);
- }
- }
- return sources;
- }
- });
-
- /**
- * Returns the original source, line, and column information for the generated
- * source's line and column positions provided. The only argument is an object
- * with the following properties:
- *
- * - line: The line number in the generated source.
- * - column: The column number in the generated source.
- *
- * and an object is returned with the following properties:
- *
- * - source: The original source file, or null.
- * - line: The line number in the original source, or null.
- * - column: The column number in the original source, or null.
- * - name: The original identifier, or null.
- */
- IndexedSourceMapConsumer.prototype.originalPositionFor =
- function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
- var needle = {
- generatedLine: util.getArg(aArgs, 'line'),
- generatedColumn: util.getArg(aArgs, 'column')
- };
-
- // Find the section containing the generated position we're trying to map
- // to an original position.
- var sectionIndex = binarySearch.search(needle, this._sections,
- function(needle, section) {
- var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
- if (cmp) {
- return cmp;
- }
-
- return (needle.generatedColumn -
- section.generatedOffset.generatedColumn);
- });
- var section = this._sections[sectionIndex];
-
- if (!section) {
- return {
- source: null,
- line: null,
- column: null,
- name: null
- };
- }
-
- return section.consumer.originalPositionFor({
- line: needle.generatedLine -
- (section.generatedOffset.generatedLine - 1),
- column: needle.generatedColumn -
- (section.generatedOffset.generatedLine === needle.generatedLine
- ? section.generatedOffset.generatedColumn - 1
- : 0),
- bias: aArgs.bias
- });
- };
-
- /**
- * Return true if we have the source content for every source in the source
- * map, false otherwise.
- */
- IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =
- function IndexedSourceMapConsumer_hasContentsOfAllSources() {
- return this._sections.every(function (s) {
- return s.consumer.hasContentsOfAllSources();
- });
- };
-
- /**
- * Returns the original source content. The only argument is the url of the
- * original source file. Returns null if no original source content is
- * available.
- */
- IndexedSourceMapConsumer.prototype.sourceContentFor =
- function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
- for (var i = 0; i < this._sections.length; i++) {
- var section = this._sections[i];
-
- var content = section.consumer.sourceContentFor(aSource, true);
- if (content) {
- return content;
- }
- }
- if (nullOnMissing) {
- return null;
- }
- else {
- throw new Error('"' + aSource + '" is not in the SourceMap.');
- }
- };
-
- /**
- * Returns the generated line and column information for the original source,
- * line, and column positions provided. The only argument is an object with
- * the following properties:
- *
- * - source: The filename of the original source.
- * - line: The line number in the original source.
- * - column: The column number in the original source.
- *
- * and an object is returned with the following properties:
- *
- * - line: The line number in the generated source, or null.
- * - column: The column number in the generated source, or null.
- */
- IndexedSourceMapConsumer.prototype.generatedPositionFor =
- function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
- for (var i = 0; i < this._sections.length; i++) {
- var section = this._sections[i];
-
- // Only consider this section if the requested source is in the list of
- // sources of the consumer.
- if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
- continue;
- }
- var generatedPosition = section.consumer.generatedPositionFor(aArgs);
- if (generatedPosition) {
- var ret = {
- line: generatedPosition.line +
- (section.generatedOffset.generatedLine - 1),
- column: generatedPosition.column +
- (section.generatedOffset.generatedLine === generatedPosition.line
- ? section.generatedOffset.generatedColumn - 1
- : 0)
- };
- return ret;
- }
- }
-
- return {
- line: null,
- column: null
- };
- };
-
- /**
- * Parse the mappings in a string in to a data structure which we can easily
- * query (the ordered arrays in the `this.__generatedMappings` and
- * `this.__originalMappings` properties).
- */
- IndexedSourceMapConsumer.prototype._parseMappings =
- function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
- this.__generatedMappings = [];
- this.__originalMappings = [];
- for (var i = 0; i < this._sections.length; i++) {
- var section = this._sections[i];
- var sectionMappings = section.consumer._generatedMappings;
- for (var j = 0; j < sectionMappings.length; j++) {
- var mapping = sectionMappings[j];
-
- var source = section.consumer._sources.at(mapping.source);
- if (section.consumer.sourceRoot !== null) {
- source = util.join(section.consumer.sourceRoot, source);
- }
- this._sources.add(source);
- source = this._sources.indexOf(source);
-
- var name = section.consumer._names.at(mapping.name);
- this._names.add(name);
- name = this._names.indexOf(name);
-
- // The mappings coming from the consumer for the section have
- // generated positions relative to the start of the section, so we
- // need to offset them to be relative to the start of the concatenated
- // generated file.
- var adjustedMapping = {
- source: source,
- generatedLine: mapping.generatedLine +
- (section.generatedOffset.generatedLine - 1),
- generatedColumn: mapping.generatedColumn +
- (section.generatedOffset.generatedLine === mapping.generatedLine
- ? section.generatedOffset.generatedColumn - 1
- : 0),
- originalLine: mapping.originalLine,
- originalColumn: mapping.originalColumn,
- name: name
- };
-
- this.__generatedMappings.push(adjustedMapping);
- if (typeof adjustedMapping.originalLine === 'number') {
- this.__originalMappings.push(adjustedMapping);
- }
- }
- }
-
- quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
- quickSort(this.__originalMappings, util.compareByOriginalPositions);
- };
-
- exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
- }
-
-
-/***/ },
-/* 8 */
-/***/ function(module, exports) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- exports.GREATEST_LOWER_BOUND = 1;
- exports.LEAST_UPPER_BOUND = 2;
-
- /**
- * Recursive implementation of binary search.
- *
- * @param aLow Indices here and lower do not contain the needle.
- * @param aHigh Indices here and higher do not contain the needle.
- * @param aNeedle The element being searched for.
- * @param aHaystack The non-empty array being searched.
- * @param aCompare Function which takes two elements and returns -1, 0, or 1.
- * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
- * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- */
- function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
- // This function terminates when one of the following is true:
- //
- // 1. We find the exact element we are looking for.
- //
- // 2. We did not find the exact element, but we can return the index of
- // the next-closest element.
- //
- // 3. We did not find the exact element, and there is no next-closest
- // element than the one we are searching for, so we return -1.
- var mid = Math.floor((aHigh - aLow) / 2) + aLow;
- var cmp = aCompare(aNeedle, aHaystack[mid], true);
- if (cmp === 0) {
- // Found the element we are looking for.
- return mid;
- }
- else if (cmp > 0) {
- // Our needle is greater than aHaystack[mid].
- if (aHigh - mid > 1) {
- // The element is in the upper half.
- return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
- }
-
- // The exact needle element was not found in this haystack. Determine if
- // we are in termination case (3) or (2) and return the appropriate thing.
- if (aBias == exports.LEAST_UPPER_BOUND) {
- return aHigh < aHaystack.length ? aHigh : -1;
- } else {
- return mid;
- }
- }
- else {
- // Our needle is less than aHaystack[mid].
- if (mid - aLow > 1) {
- // The element is in the lower half.
- return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
- }
-
- // we are in termination case (3) or (2) and return the appropriate thing.
- if (aBias == exports.LEAST_UPPER_BOUND) {
- return mid;
- } else {
- return aLow < 0 ? -1 : aLow;
- }
- }
- }
-
- /**
- * This is an implementation of binary search which will always try and return
- * the index of the closest element if there is no exact hit. This is because
- * mappings between original and generated line/col pairs are single points,
- * and there is an implicit region between each of them, so a miss just means
- * that you aren't on the very start of a region.
- *
- * @param aNeedle The element you are looking for.
- * @param aHaystack The array that is being searched.
- * @param aCompare A function which takes the needle and an element in the
- * array and returns -1, 0, or 1 depending on whether the needle is less
- * than, equal to, or greater than the element, respectively.
- * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
- * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
- */
- exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
- if (aHaystack.length === 0) {
- return -1;
- }
-
- var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
- aCompare, aBias || exports.GREATEST_LOWER_BOUND);
- if (index < 0) {
- return -1;
- }
-
- // We have found either the exact element, or the next-closest element than
- // the one we are searching for. However, there may be more than one such
- // element. Make sure we always return the smallest of these.
- while (index - 1 >= 0) {
- if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
- break;
- }
- --index;
- }
-
- return index;
- };
- }
-
-
-/***/ },
-/* 9 */
-/***/ function(module, exports) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- // It turns out that some (most?) JavaScript engines don't self-host
- // `Array.prototype.sort`. This makes sense because C++ will likely remain
- // faster than JS when doing raw CPU-intensive sorting. However, when using a
- // custom comparator function, calling back and forth between the VM's C++ and
- // JIT'd JS is rather slow *and* loses JIT type information, resulting in
- // worse generated code for the comparator function than would be optimal. In
- // fact, when sorting with a comparator, these costs outweigh the benefits of
- // sorting in C++. By using our own JS-implemented Quick Sort (below), we get
- // a ~3500ms mean speed-up in `bench/bench.html`.
-
- /**
- * Swap the elements indexed by `x` and `y` in the array `ary`.
- *
- * @param {Array} ary
- * The array.
- * @param {Number} x
- * The index of the first item.
- * @param {Number} y
- * The index of the second item.
- */
- function swap(ary, x, y) {
- var temp = ary[x];
- ary[x] = ary[y];
- ary[y] = temp;
- }
-
- /**
- * Returns a random integer within the range `low .. high` inclusive.
- *
- * @param {Number} low
- * The lower bound on the range.
- * @param {Number} high
- * The upper bound on the range.
- */
- function randomIntInRange(low, high) {
- return Math.round(low + (Math.random() * (high - low)));
- }
-
- /**
- * The Quick Sort algorithm.
- *
- * @param {Array} ary
- * An array to sort.
- * @param {function} comparator
- * Function to use to compare two items.
- * @param {Number} p
- * Start index of the array
- * @param {Number} r
- * End index of the array
- */
- function doQuickSort(ary, comparator, p, r) {
- // If our lower bound is less than our upper bound, we (1) partition the
- // array into two pieces and (2) recurse on each half. If it is not, this is
- // the empty array and our base case.
-
- if (p < r) {
- // (1) Partitioning.
- //
- // The partitioning chooses a pivot between `p` and `r` and moves all
- // elements that are less than or equal to the pivot to the before it, and
- // all the elements that are greater than it after it. The effect is that
- // once partition is done, the pivot is in the exact place it will be when
- // the array is put in sorted order, and it will not need to be moved
- // again. This runs in O(n) time.
-
- // Always choose a random pivot so that an input array which is reverse
- // sorted does not cause O(n^2) running time.
- var pivotIndex = randomIntInRange(p, r);
- var i = p - 1;
-
- swap(ary, pivotIndex, r);
- var pivot = ary[r];
-
- // Immediately after `j` is incremented in this loop, the following hold
- // true:
- //
- // * Every element in `ary[p .. i]` is less than or equal to the pivot.
- //
- // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
- for (var j = p; j < r; j++) {
- if (comparator(ary[j], pivot) <= 0) {
- i += 1;
- swap(ary, i, j);
- }
- }
-
- swap(ary, i + 1, j);
- var q = i + 1;
-
- // (2) Recurse on each half.
-
- doQuickSort(ary, comparator, p, q - 1);
- doQuickSort(ary, comparator, q + 1, r);
- }
- }
-
- /**
- * Sort the given array in-place with the given comparator function.
- *
- * @param {Array} ary
- * An array to sort.
- * @param {function} comparator
- * Function to use to compare two items.
- */
- exports.quickSort = function (ary, comparator) {
- doQuickSort(ary, comparator, 0, ary.length - 1);
- };
- }
-
-
-/***/ },
-/* 10 */
-/***/ function(module, exports, __webpack_require__) {
-
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- {
- var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;
- var util = __webpack_require__(4);
-
- // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
- // operating systems these days (capturing the result).
- var REGEX_NEWLINE = /(\r?\n)/;
-
- // Newline character code for charCodeAt() comparisons
- var NEWLINE_CODE = 10;
-
- // Private symbol for identifying `SourceNode`s when multiple versions of
- // the source-map library are loaded. This MUST NOT CHANGE across
- // versions!
- var isSourceNode = "$$$isSourceNode$$$";
-
- /**
- * SourceNodes provide a way to abstract over interpolating/concatenating
- * snippets of generated JavaScript source code while maintaining the line and
- * column information associated with the original source code.
- *
- * @param aLine The original line number.
- * @param aColumn The original column number.
- * @param aSource The original source's filename.
- * @param aChunks Optional. An array of strings which are snippets of
- * generated JS, or other SourceNodes.
- * @param aName The original identifier.
- */
- function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
- this.children = [];
- this.sourceContents = {};
- this.line = aLine == null ? null : aLine;
- this.column = aColumn == null ? null : aColumn;
- this.source = aSource == null ? null : aSource;
- this.name = aName == null ? null : aName;
- this[isSourceNode] = true;
- if (aChunks != null) this.add(aChunks);
- }
-
- /**
- * Creates a SourceNode from generated code and a SourceMapConsumer.
- *
- * @param aGeneratedCode The generated code
- * @param aSourceMapConsumer The SourceMap for the generated code
- * @param aRelativePath Optional. The path that relative sources in the
- * SourceMapConsumer should be relative to.
- */
- SourceNode.fromStringWithSourceMap =
- function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
- // The SourceNode we want to fill with the generated code
- // and the SourceMap
- var node = new SourceNode();
-
- // All even indices of this array are one line of the generated code,
- // while all odd indices are the newlines between two adjacent lines
- // (since `REGEX_NEWLINE` captures its match).
- // Processed fragments are removed from this array, by calling `shiftNextLine`.
- var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
- var shiftNextLine = function() {
- var lineContents = remainingLines.shift();
- // The last line of a file might not have a newline.
- var newLine = remainingLines.shift() || "";
- return lineContents + newLine;
- };
-
- // We need to remember the position of "remainingLines"
- var lastGeneratedLine = 1, lastGeneratedColumn = 0;
-
- // The generate SourceNodes we need a code range.
- // To extract it current and last mapping is used.
- // Here we store the last mapping.
- var lastMapping = null;
-
- aSourceMapConsumer.eachMapping(function (mapping) {
- if (lastMapping !== null) {
- // We add the code from "lastMapping" to "mapping":
- // First check if there is a new line in between.
- if (lastGeneratedLine < mapping.generatedLine) {
- // Associate first line with "lastMapping"
- addMappingWithCode(lastMapping, shiftNextLine());
- lastGeneratedLine++;
- lastGeneratedColumn = 0;
- // The remaining code is added without mapping
- } else {
- // There is no new line in between.
- // Associate the code between "lastGeneratedColumn" and
- // "mapping.generatedColumn" with "lastMapping"
- var nextLine = remainingLines[0];
- var code = nextLine.substr(0, mapping.generatedColumn -
- lastGeneratedColumn);
- remainingLines[0] = nextLine.substr(mapping.generatedColumn -
- lastGeneratedColumn);
- lastGeneratedColumn = mapping.generatedColumn;
- addMappingWithCode(lastMapping, code);
- // No more remaining code, continue
- lastMapping = mapping;
- return;
- }
- }
- // We add the generated code until the first mapping
- // to the SourceNode without any mapping.
- // Each line is added as separate string.
- while (lastGeneratedLine < mapping.generatedLine) {
- node.add(shiftNextLine());
- lastGeneratedLine++;
- }
- if (lastGeneratedColumn < mapping.generatedColumn) {
- var nextLine = remainingLines[0];
- node.add(nextLine.substr(0, mapping.generatedColumn));
- remainingLines[0] = nextLine.substr(mapping.generatedColumn);
- lastGeneratedColumn = mapping.generatedColumn;
- }
- lastMapping = mapping;
- }, this);
- // We have processed all mappings.
- if (remainingLines.length > 0) {
- if (lastMapping) {
- // Associate the remaining code in the current line with "lastMapping"
- addMappingWithCode(lastMapping, shiftNextLine());
- }
- // and add the remaining lines without any mapping
- node.add(remainingLines.join(""));
- }
-
- // Copy sourcesContent into SourceNode
- aSourceMapConsumer.sources.forEach(function (sourceFile) {
- var content = aSourceMapConsumer.sourceContentFor(sourceFile);
- if (content != null) {
- if (aRelativePath != null) {
- sourceFile = util.join(aRelativePath, sourceFile);
- }
- node.setSourceContent(sourceFile, content);
- }
- });
-
- return node;
-
- function addMappingWithCode(mapping, code) {
- if (mapping === null || mapping.source === undefined) {
- node.add(code);
- } else {
- var source = aRelativePath
- ? util.join(aRelativePath, mapping.source)
- : mapping.source;
- node.add(new SourceNode(mapping.originalLine,
- mapping.originalColumn,
- source,
- code,
- mapping.name));
- }
- }
- };
-
- /**
- * Add a chunk of generated JS to this source node.
- *
- * @param aChunk A string snippet of generated JS code, another instance of
- * SourceNode, or an array where each member is one of those things.
- */
- SourceNode.prototype.add = function SourceNode_add(aChunk) {
- if (Array.isArray(aChunk)) {
- aChunk.forEach(function (chunk) {
- this.add(chunk);
- }, this);
- }
- else if (aChunk[isSourceNode] || typeof aChunk === "string") {
- if (aChunk) {
- this.children.push(aChunk);
- }
- }
- else {
- throw new TypeError(
- "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
- );
- }
- return this;
- };
-
- /**
- * Add a chunk of generated JS to the beginning of this source node.
- *
- * @param aChunk A string snippet of generated JS code, another instance of
- * SourceNode, or an array where each member is one of those things.
- */
- SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
- if (Array.isArray(aChunk)) {
- for (var i = aChunk.length-1; i >= 0; i--) {
- this.prepend(aChunk[i]);
- }
- }
- else if (aChunk[isSourceNode] || typeof aChunk === "string") {
- this.children.unshift(aChunk);
- }
- else {
- throw new TypeError(
- "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
- );
- }
- return this;
- };
-
- /**
- * Walk over the tree of JS snippets in this node and its children. The
- * walking function is called once for each snippet of JS and is passed that
- * snippet and the its original associated source's line/column location.
- *
- * @param aFn The traversal function.
- */
- SourceNode.prototype.walk = function SourceNode_walk(aFn) {
- var chunk;
- for (var i = 0, len = this.children.length; i < len; i++) {
- chunk = this.children[i];
- if (chunk[isSourceNode]) {
- chunk.walk(aFn);
- }
- else {
- if (chunk !== '') {
- aFn(chunk, { source: this.source,
- line: this.line,
- column: this.column,
- name: this.name });
- }
- }
- }
- };
-
- /**
- * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
- * each of `this.children`.
- *
- * @param aSep The separator.
- */
- SourceNode.prototype.join = function SourceNode_join(aSep) {
- var newChildren;
- var i;
- var len = this.children.length;
- if (len > 0) {
- newChildren = [];
- for (i = 0; i < len-1; i++) {
- newChildren.push(this.children[i]);
- newChildren.push(aSep);
- }
- newChildren.push(this.children[i]);
- this.children = newChildren;
- }
- return this;
- };
-
- /**
- * Call String.prototype.replace on the very right-most source snippet. Useful
- * for trimming whitespace from the end of a source node, etc.
- *
- * @param aPattern The pattern to replace.
- * @param aReplacement The thing to replace the pattern with.
- */
- SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
- var lastChild = this.children[this.children.length - 1];
- if (lastChild[isSourceNode]) {
- lastChild.replaceRight(aPattern, aReplacement);
- }
- else if (typeof lastChild === 'string') {
- this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
- }
- else {
- this.children.push(''.replace(aPattern, aReplacement));
- }
- return this;
- };
-
- /**
- * Set the source content for a source file. This will be added to the SourceMapGenerator
- * in the sourcesContent field.
- *
- * @param aSourceFile The filename of the source file
- * @param aSourceContent The content of the source file
- */
- SourceNode.prototype.setSourceContent =
- function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
- this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
- };
-
- /**
- * Walk over the tree of SourceNodes. The walking function is called for each
- * source file content and is passed the filename and source content.
- *
- * @param aFn The traversal function.
- */
- SourceNode.prototype.walkSourceContents =
- function SourceNode_walkSourceContents(aFn) {
- for (var i = 0, len = this.children.length; i < len; i++) {
- if (this.children[i][isSourceNode]) {
- this.children[i].walkSourceContents(aFn);
- }
- }
-
- var sources = Object.keys(this.sourceContents);
- for (var i = 0, len = sources.length; i < len; i++) {
- aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
- }
- };
-
- /**
- * Return the string representation of this source node. Walks over the tree
- * and concatenates all the various snippets together to one string.
- */
- SourceNode.prototype.toString = function SourceNode_toString() {
- var str = "";
- this.walk(function (chunk) {
- str += chunk;
- });
- return str;
- };
-
- /**
- * Returns the string representation of this source node along with a source
- * map.
- */
- SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
- var generated = {
- code: "",
- line: 1,
- column: 0
- };
- var map = new SourceMapGenerator(aArgs);
- var sourceMappingActive = false;
- var lastOriginalSource = null;
- var lastOriginalLine = null;
- var lastOriginalColumn = null;
- var lastOriginalName = null;
- this.walk(function (chunk, original) {
- generated.code += chunk;
- if (original.source !== null
- && original.line !== null
- && original.column !== null) {
- if(lastOriginalSource !== original.source
- || lastOriginalLine !== original.line
- || lastOriginalColumn !== original.column
- || lastOriginalName !== original.name) {
- map.addMapping({
- source: original.source,
- original: {
- line: original.line,
- column: original.column
- },
- generated: {
- line: generated.line,
- column: generated.column
- },
- name: original.name
- });
- }
- lastOriginalSource = original.source;
- lastOriginalLine = original.line;
- lastOriginalColumn = original.column;
- lastOriginalName = original.name;
- sourceMappingActive = true;
- } else if (sourceMappingActive) {
- map.addMapping({
- generated: {
- line: generated.line,
- column: generated.column
- }
- });
- lastOriginalSource = null;
- sourceMappingActive = false;
- }
- for (var idx = 0, length = chunk.length; idx < length; idx++) {
- if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
- generated.line++;
- generated.column = 0;
- // Mappings end at eol
- if (idx + 1 === length) {
- lastOriginalSource = null;
- sourceMappingActive = false;
- } else if (sourceMappingActive) {
- map.addMapping({
- source: original.source,
- original: {
- line: original.line,
- column: original.column
- },
- generated: {
- line: generated.line,
- column: generated.column
- },
- name: original.name
- });
- }
- } else {
- generated.column++;
- }
- }
- });
- this.walkSourceContents(function (sourceFile, sourceContent) {
- map.setSourceContent(sourceFile, sourceContent);
- });
-
- return { code: generated.code, map: map };
- };
-
- exports.SourceNode = SourceNode;
- }
-
-
-/***/ }
-/******/ ])
-});
-; \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/dist/source-map.min.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/dist/source-map.min.js
deleted file mode 100644
index 3de3bd2e4e..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/dist/source-map.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sourceMap=n():e.sourceMap=n()}(this,function(){return function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={exports:{},id:t,loaded:!1};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}var r={};return n.m=e,n.c=r,n.p="",n(0)}([function(e,n,r){n.SourceMapGenerator=r(1).SourceMapGenerator,n.SourceMapConsumer=r(7).SourceMapConsumer,n.SourceNode=r(10).SourceNode},function(e,n,r){function t(e){e||(e={}),this._file=i.getArg(e,"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new s,this._names=new s,this._mappings=new a,this._sourcesContents=null}var o=r(2),i=r(4),s=r(5).ArraySet,a=r(6).MappingList;t.prototype._version=3,t.fromSourceMap=function(e){var n=e.sourceRoot,r=new t({file:e.file,sourceRoot:n});return e.eachMapping(function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=n&&(t.source=i.relative(n,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),r.addMapping(t)}),e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&r.setSourceContent(n,t)}),r},t.prototype.addMapping=function(e){var n=i.getArg(e,"generated"),r=i.getArg(e,"original",null),t=i.getArg(e,"source",null),o=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(n,r,t,o),null==t||this._sources.has(t)||this._sources.add(t),null==o||this._names.has(o)||this._names.add(o),this._mappings.add({generatedLine:n.line,generatedColumn:n.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:t,name:o})},t.prototype.setSourceContent=function(e,n){var r=e;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=n?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[i.toSetString(r)]=n):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},t.prototype.applySourceMap=function(e,n,r){var t=n;if(null==n){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');t=e.file}var o=this._sourceRoot;null!=o&&(t=i.relative(o,t));var a=new s,u=new s;this._mappings.unsortedForEach(function(n){if(n.source===t&&null!=n.originalLine){var s=e.originalPositionFor({line:n.originalLine,column:n.originalColumn});null!=s.source&&(n.source=s.source,null!=r&&(n.source=i.join(r,n.source)),null!=o&&(n.source=i.relative(o,n.source)),n.originalLine=s.line,n.originalColumn=s.column,null!=s.name&&(n.name=s.name))}var l=n.source;null==l||a.has(l)||a.add(l);var c=n.name;null==c||u.has(c)||u.add(c)},this),this._sources=a,this._names=u,e.sources.forEach(function(n){var t=e.sourceContentFor(n);null!=t&&(null!=r&&(n=i.join(r,n)),null!=o&&(n=i.relative(o,n)),this.setSourceContent(n,t))},this)},t.prototype._validateMapping=function(e,n,r,t){if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||n||r||t)&&!(e&&"line"in e&&"column"in e&&n&&"line"in n&&"column"in n&&e.line>0&&e.column>=0&&n.line>0&&n.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:n,name:t}))},t.prototype._serializeMappings=function(){for(var e,n,r,t=0,s=1,a=0,u=0,l=0,c=0,g="",p=this._mappings.toArray(),h=0,f=p.length;f>h;h++){if(e=p[h],e.generatedLine!==s)for(t=0;e.generatedLine!==s;)g+=";",s++;else if(h>0){if(!i.compareByGeneratedPositionsInflated(e,p[h-1]))continue;g+=","}g+=o.encode(e.generatedColumn-t),t=e.generatedColumn,null!=e.source&&(r=this._sources.indexOf(e.source),g+=o.encode(r-c),c=r,g+=o.encode(e.originalLine-1-u),u=e.originalLine-1,g+=o.encode(e.originalColumn-a),a=e.originalColumn,null!=e.name&&(n=this._names.indexOf(e.name),g+=o.encode(n-l),l=n))}return g},t.prototype._generateSourcesContent=function(e,n){return e.map(function(e){if(!this._sourcesContents)return null;null!=n&&(e=i.relative(n,e));var r=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null},this)},t.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},t.prototype.toString=function(){return JSON.stringify(this.toJSON())},n.SourceMapGenerator=t},function(e,n,r){function t(e){return 0>e?(-e<<1)+1:(e<<1)+0}function o(e){var n=1===(1&e),r=e>>1;return n?-r:r}var i=r(3),s=5,a=1<<s,u=a-1,l=a;n.encode=function(e){var n,r="",o=t(e);do n=o&u,o>>>=s,o>0&&(n|=l),r+=i.encode(n);while(o>0);return r},n.decode=function(e,n,r){var t,a,c=e.length,g=0,p=0;do{if(n>=c)throw new Error("Expected more digits in base 64 VLQ value.");if(a=i.decode(e.charCodeAt(n++)),-1===a)throw new Error("Invalid base64 digit: "+e.charAt(n-1));t=!!(a&l),a&=u,g+=a<<p,p+=s}while(t);r.value=o(g),r.rest=n}},function(e,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");n.encode=function(e){if(e>=0&&e<r.length)return r[e];throw new TypeError("Must be between 0 and 63: "+e)},n.decode=function(e){var n=65,r=90,t=97,o=122,i=48,s=57,a=43,u=47,l=26,c=52;return e>=n&&r>=e?e-n:e>=t&&o>=e?e-t+l:e>=i&&s>=e?e-i+c:e==a?62:e==u?63:-1}},function(e,n){function r(e,n,r){if(n in e)return e[n];if(3===arguments.length)return r;throw new Error('"'+n+'" is a required argument.')}function t(e){var n=e.match(f);return n?{scheme:n[1],auth:n[2],host:n[3],port:n[4],path:n[5]}:null}function o(e){var n="";return e.scheme&&(n+=e.scheme+":"),n+="//",e.auth&&(n+=e.auth+"@"),e.host&&(n+=e.host),e.port&&(n+=":"+e.port),e.path&&(n+=e.path),n}function i(e){var r=e,i=t(e);if(i){if(!i.path)return e;r=i.path}for(var s,a=n.isAbsolute(r),u=r.split(/\/+/),l=0,c=u.length-1;c>=0;c--)s=u[c],"."===s?u.splice(c,1):".."===s?l++:l>0&&(""===s?(u.splice(c+1,l),l=0):(u.splice(c,2),l--));return r=u.join("/"),""===r&&(r=a?"/":"."),i?(i.path=r,o(i)):r}function s(e,n){""===e&&(e="."),""===n&&(n=".");var r=t(n),s=t(e);if(s&&(e=s.path||"/"),r&&!r.scheme)return s&&(r.scheme=s.scheme),o(r);if(r||n.match(d))return n;if(s&&!s.host&&!s.path)return s.host=n,o(s);var a="/"===n.charAt(0)?n:i(e.replace(/\/+$/,"")+"/"+n);return s?(s.path=a,o(s)):a}function a(e,n){""===e&&(e="."),e=e.replace(/\/$/,"");for(var r=0;0!==n.indexOf(e+"/");){var t=e.lastIndexOf("/");if(0>t)return n;if(e=e.slice(0,t),e.match(/^([^\/]+:\/)?\/*$/))return n;++r}return Array(r+1).join("../")+n.substr(e.length+1)}function u(e){return"$"+e}function l(e){return e.substr(1)}function c(e,n,r){var t=e.source-n.source;return 0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t||r?t:(t=e.generatedColumn-n.generatedColumn,0!==t?t:(t=e.generatedLine-n.generatedLine,0!==t?t:e.name-n.name))))}function g(e,n,r){var t=e.generatedLine-n.generatedLine;return 0!==t?t:(t=e.generatedColumn-n.generatedColumn,0!==t||r?t:(t=e.source-n.source,0!==t?t:(t=e.originalLine-n.originalLine,0!==t?t:(t=e.originalColumn-n.originalColumn,0!==t?t:e.name-n.name))))}function p(e,n){return e===n?0:e>n?1:-1}function h(e,n){var r=e.generatedLine-n.generatedLine;return 0!==r?r:(r=e.generatedColumn-n.generatedColumn,0!==r?r:(r=p(e.source,n.source),0!==r?r:(r=e.originalLine-n.originalLine,0!==r?r:(r=e.originalColumn-n.originalColumn,0!==r?r:p(e.name,n.name)))))}n.getArg=r;var f=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,d=/^data:.+\,.+$/;n.urlParse=t,n.urlGenerate=o,n.normalize=i,n.join=s,n.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(f)},n.relative=a,n.toSetString=u,n.fromSetString=l,n.compareByOriginalPositions=c,n.compareByGeneratedPositionsDeflated=g,n.compareByGeneratedPositionsInflated=h},function(e,n,r){function t(){this._array=[],this._set={}}var o=r(4);t.fromArray=function(e,n){for(var r=new t,o=0,i=e.length;i>o;o++)r.add(e[o],n);return r},t.prototype.size=function(){return Object.getOwnPropertyNames(this._set).length},t.prototype.add=function(e,n){var r=o.toSetString(e),t=this._set.hasOwnProperty(r),i=this._array.length;(!t||n)&&this._array.push(e),t||(this._set[r]=i)},t.prototype.has=function(e){var n=o.toSetString(e);return this._set.hasOwnProperty(n)},t.prototype.indexOf=function(e){var n=o.toSetString(e);if(this._set.hasOwnProperty(n))return this._set[n];throw new Error('"'+e+'" is not in the set.')},t.prototype.at=function(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},t.prototype.toArray=function(){return this._array.slice()},n.ArraySet=t},function(e,n,r){function t(e,n){var r=e.generatedLine,t=n.generatedLine,o=e.generatedColumn,s=n.generatedColumn;return t>r||t==r&&s>=o||i.compareByGeneratedPositionsInflated(e,n)<=0}function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}var i=r(4);o.prototype.unsortedForEach=function(e,n){this._array.forEach(e,n)},o.prototype.add=function(e){t(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(i.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},n.MappingList=o},function(e,n,r){function t(e){var n=e;return"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=n.sections?new s(n):new o(n)}function o(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),t=a.getArg(n,"sources"),o=a.getArg(n,"names",[]),i=a.getArg(n,"sourceRoot",null),s=a.getArg(n,"sourcesContent",null),u=a.getArg(n,"mappings"),c=a.getArg(n,"file",null);if(r!=this._version)throw new Error("Unsupported version: "+r);t=t.map(a.normalize).map(function(e){return i&&a.isAbsolute(i)&&a.isAbsolute(e)?a.relative(i,e):e}),this._names=l.fromArray(o,!0),this._sources=l.fromArray(t,!0),this.sourceRoot=i,this.sourcesContent=s,this._mappings=u,this.file=c}function i(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function s(e){var n=e;"string"==typeof e&&(n=JSON.parse(e.replace(/^\)\]\}'/,"")));var r=a.getArg(n,"version"),o=a.getArg(n,"sections");if(r!=this._version)throw new Error("Unsupported version: "+r);this._sources=new l,this._names=new l;var i={line:-1,column:0};this._sections=o.map(function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=a.getArg(e,"offset"),r=a.getArg(n,"line"),o=a.getArg(n,"column");if(r<i.line||r===i.line&&o<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=n,{generatedOffset:{generatedLine:r+1,generatedColumn:o+1},consumer:new t(a.getArg(e,"map"))}})}var a=r(4),u=r(8),l=r(5).ArraySet,c=r(2),g=r(9).quickSort;t.fromSourceMap=function(e){return o.fromSourceMap(e)},t.prototype._version=3,t.prototype.__generatedMappings=null,Object.defineProperty(t.prototype,"_generatedMappings",{get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),t.prototype.__originalMappings=null,Object.defineProperty(t.prototype,"_originalMappings",{get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),t.prototype._charIsMappingSeparator=function(e,n){var r=e.charAt(n);return";"===r||","===r},t.prototype._parseMappings=function(e,n){throw new Error("Subclasses must implement _parseMappings")},t.GENERATED_ORDER=1,t.ORIGINAL_ORDER=2,t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.prototype.eachMapping=function(e,n,r){var o,i=n||null,s=r||t.GENERATED_ORDER;switch(s){case t.GENERATED_ORDER:o=this._generatedMappings;break;case t.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;o.map(function(e){var n=null===e.source?null:this._sources.at(e.source);return null!=n&&null!=u&&(n=a.join(u,n)),{source:n,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}},this).forEach(e,i)},t.prototype.allGeneratedPositionsFor=function(e){var n=a.getArg(e,"line"),r={source:a.getArg(e,"source"),originalLine:n,originalColumn:a.getArg(e,"column",0)};if(null!=this.sourceRoot&&(r.source=a.relative(this.sourceRoot,r.source)),!this._sources.has(r.source))return[];r.source=this._sources.indexOf(r.source);var t=[],o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,u.LEAST_UPPER_BOUND);if(o>=0){var i=this._originalMappings[o];if(void 0===e.column)for(var s=i.originalLine;i&&i.originalLine===s;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o];else for(var l=i.originalColumn;i&&i.originalLine===n&&i.originalColumn==l;)t.push({line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}),i=this._originalMappings[++o]}return t},n.SourceMapConsumer=t,o.prototype=Object.create(t.prototype),o.prototype.consumer=t,o.fromSourceMap=function(e){var n=Object.create(o.prototype),r=n._names=l.fromArray(e._names.toArray(),!0),t=n._sources=l.fromArray(e._sources.toArray(),!0);n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file;for(var s=e._mappings.toArray().slice(),u=n.__generatedMappings=[],c=n.__originalMappings=[],p=0,h=s.length;h>p;p++){var f=s[p],d=new i;d.generatedLine=f.generatedLine,d.generatedColumn=f.generatedColumn,f.source&&(d.source=t.indexOf(f.source),d.originalLine=f.originalLine,d.originalColumn=f.originalColumn,f.name&&(d.name=r.indexOf(f.name)),c.push(d)),u.push(d)}return g(n.__originalMappings,a.compareByOriginalPositions),n},o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){return this._sources.toArray().map(function(e){return null!=this.sourceRoot?a.join(this.sourceRoot,e):e},this)}}),o.prototype._parseMappings=function(e,n){for(var r,t,o,s,u,l=1,p=0,h=0,f=0,d=0,m=0,_=e.length,v=0,y={},C={},A=[],S=[];_>v;)if(";"===e.charAt(v))l++,v++,p=0;else if(","===e.charAt(v))v++;else{for(r=new i,r.generatedLine=l,s=v;_>s&&!this._charIsMappingSeparator(e,s);s++);if(t=e.slice(v,s),o=y[t])v+=t.length;else{for(o=[];s>v;)c.decode(e,v,C),u=C.value,v=C.rest,o.push(u);if(2===o.length)throw new Error("Found a source, but no line and column");if(3===o.length)throw new Error("Found a source and line, but no column");y[t]=o}r.generatedColumn=p+o[0],p=r.generatedColumn,o.length>1&&(r.source=d+o[1],d+=o[1],r.originalLine=h+o[2],h=r.originalLine,r.originalLine+=1,r.originalColumn=f+o[3],f=r.originalColumn,o.length>4&&(r.name=m+o[4],m+=o[4])),S.push(r),"number"==typeof r.originalLine&&A.push(r)}g(S,a.compareByGeneratedPositionsDeflated),this.__generatedMappings=S,g(A,a.compareByOriginalPositions),this.__originalMappings=A},o.prototype._findMapping=function(e,n,r,t,o,i){if(e[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[r]);if(e[t]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[t]);return u.search(e,n,o,i)},o.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var n=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var r=this._generatedMappings[e+1];if(n.generatedLine===r.generatedLine){n.lastGeneratedColumn=r.generatedColumn-1;continue}}n.lastGeneratedColumn=1/0}},o.prototype.originalPositionFor=function(e){var n={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},r=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",a.compareByGeneratedPositionsDeflated,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(r>=0){var o=this._generatedMappings[r];if(o.generatedLine===n.generatedLine){var i=a.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=a.join(this.sourceRoot,i)));var s=a.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:a.getArg(o,"originalLine",null),column:a.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(e){return null==e}):!1},o.prototype.sourceContentFor=function(e,n){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=a.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var r;if(null!=this.sourceRoot&&(r=a.urlParse(this.sourceRoot))){var t=e.replace(/^file:\/\//,"");if("file"==r.scheme&&this._sources.has(t))return this.sourcesContent[this._sources.indexOf(t)];if((!r.path||"/"==r.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(e){var n=a.getArg(e,"source");if(null!=this.sourceRoot&&(n=a.relative(this.sourceRoot,n)),!this._sources.has(n))return{line:null,column:null,lastColumn:null};n=this._sources.indexOf(n);var r={source:n,originalLine:a.getArg(e,"line"),originalColumn:a.getArg(e,"column")},o=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",a.compareByOriginalPositions,a.getArg(e,"bias",t.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===r.source)return{line:a.getArg(i,"generatedLine",null),column:a.getArg(i,"generatedColumn",null),lastColumn:a.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},n.BasicSourceMapConsumer=o,s.prototype=Object.create(t.prototype),s.prototype.constructor=t,s.prototype._version=3,Object.defineProperty(s.prototype,"sources",{get:function(){for(var e=[],n=0;n<this._sections.length;n++)for(var r=0;r<this._sections[n].consumer.sources.length;r++)e.push(this._sections[n].consumer.sources[r]);return e}}),s.prototype.originalPositionFor=function(e){var n={generatedLine:a.getArg(e,"line"),generatedColumn:a.getArg(e,"column")},r=u.search(n,this._sections,function(e,n){var r=e.generatedLine-n.generatedOffset.generatedLine;return r?r:e.generatedColumn-n.generatedOffset.generatedColumn}),t=this._sections[r];return t?t.consumer.originalPositionFor({line:n.generatedLine-(t.generatedOffset.generatedLine-1),column:n.generatedColumn-(t.generatedOffset.generatedLine===n.generatedLine?t.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},s.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(e){return e.consumer.hasContentsOfAllSources()})},s.prototype.sourceContentFor=function(e,n){for(var r=0;r<this._sections.length;r++){var t=this._sections[r],o=t.consumer.sourceContentFor(e,!0);if(o)return o}if(n)return null;throw new Error('"'+e+'" is not in the SourceMap.')},s.prototype.generatedPositionFor=function(e){for(var n=0;n<this._sections.length;n++){var r=this._sections[n];if(-1!==r.consumer.sources.indexOf(a.getArg(e,"source"))){var t=r.consumer.generatedPositionFor(e);if(t){var o={line:t.line+(r.generatedOffset.generatedLine-1),column:t.column+(r.generatedOffset.generatedLine===t.line?r.generatedOffset.generatedColumn-1:0)};return o}}}return{line:null,column:null}},s.prototype._parseMappings=function(e,n){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var t=this._sections[r],o=t.consumer._generatedMappings,i=0;i<o.length;i++){var s=o[i],u=t.consumer._sources.at(s.source);null!==t.consumer.sourceRoot&&(u=a.join(t.consumer.sourceRoot,u)),this._sources.add(u),u=this._sources.indexOf(u);var l=t.consumer._names.at(s.name);this._names.add(l),l=this._names.indexOf(l);var c={source:u,generatedLine:s.generatedLine+(t.generatedOffset.generatedLine-1),generatedColumn:s.generatedColumn+(t.generatedOffset.generatedLine===s.generatedLine?t.generatedOffset.generatedColumn-1:0),originalLine:s.originalLine,originalColumn:s.originalColumn,name:l};this.__generatedMappings.push(c),"number"==typeof c.originalLine&&this.__originalMappings.push(c)}g(this.__generatedMappings,a.compareByGeneratedPositionsDeflated),g(this.__originalMappings,a.compareByOriginalPositions)},n.IndexedSourceMapConsumer=s},function(e,n){function r(e,t,o,i,s,a){var u=Math.floor((t-e)/2)+e,l=s(o,i[u],!0);return 0===l?u:l>0?t-u>1?r(u,t,o,i,s,a):a==n.LEAST_UPPER_BOUND?t<i.length?t:-1:u:u-e>1?r(e,u,o,i,s,a):a==n.LEAST_UPPER_BOUND?u:0>e?-1:e}n.GREATEST_LOWER_BOUND=1,n.LEAST_UPPER_BOUND=2,n.search=function(e,t,o,i){if(0===t.length)return-1;var s=r(-1,t.length,e,t,o,i||n.GREATEST_LOWER_BOUND);if(0>s)return-1;for(;s-1>=0&&0===o(t[s],t[s-1],!0);)--s;return s}},function(e,n){function r(e,n,r){var t=e[n];e[n]=e[r],e[r]=t}function t(e,n){return Math.round(e+Math.random()*(n-e))}function o(e,n,i,s){if(s>i){var a=t(i,s),u=i-1;r(e,a,s);for(var l=e[s],c=i;s>c;c++)n(e[c],l)<=0&&(u+=1,r(e,u,c));r(e,u+1,c);var g=u+1;o(e,n,i,g-1),o(e,n,g+1,s)}}n.quickSort=function(e,n){o(e,n,0,e.length-1)}},function(e,n,r){function t(e,n,r,t,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==n?null:n,this.source=null==r?null:r,this.name=null==o?null:o,this[u]=!0,null!=t&&this.add(t)}var o=r(1).SourceMapGenerator,i=r(4),s=/(\r?\n)/,a=10,u="$$$isSourceNode$$$";t.fromStringWithSourceMap=function(e,n,r){function o(e,n){if(null===e||void 0===e.source)a.add(n);else{var o=r?i.join(r,e.source):e.source;a.add(new t(e.originalLine,e.originalColumn,o,n,e.name))}}var a=new t,u=e.split(s),l=function(){var e=u.shift(),n=u.shift()||"";return e+n},c=1,g=0,p=null;return n.eachMapping(function(e){if(null!==p){if(!(c<e.generatedLine)){var n=u[0],r=n.substr(0,e.generatedColumn-g);return u[0]=n.substr(e.generatedColumn-g),g=e.generatedColumn,o(p,r),void(p=e)}o(p,l()),c++,g=0}for(;c<e.generatedLine;)a.add(l()),c++;if(g<e.generatedColumn){var n=u[0];a.add(n.substr(0,e.generatedColumn)),u[0]=n.substr(e.generatedColumn),g=e.generatedColumn}p=e},this),u.length>0&&(p&&o(p,l()),a.add(u.join(""))),n.sources.forEach(function(e){var t=n.sourceContentFor(e);null!=t&&(null!=r&&(e=i.join(r,e)),a.setSourceContent(e,t))}),a},t.prototype.add=function(e){if(Array.isArray(e))e.forEach(function(e){this.add(e)},this);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},t.prototype.prepend=function(e){if(Array.isArray(e))for(var n=e.length-1;n>=0;n--)this.prepend(e[n]);else{if(!e[u]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},t.prototype.walk=function(e){for(var n,r=0,t=this.children.length;t>r;r++)n=this.children[r],n[u]?n.walk(e):""!==n&&e(n,{source:this.source,line:this.line,column:this.column,name:this.name})},t.prototype.join=function(e){var n,r,t=this.children.length;if(t>0){for(n=[],r=0;t-1>r;r++)n.push(this.children[r]),n.push(e);n.push(this.children[r]),this.children=n}return this},t.prototype.replaceRight=function(e,n){var r=this.children[this.children.length-1];return r[u]?r.replaceRight(e,n):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,n):this.children.push("".replace(e,n)),this},t.prototype.setSourceContent=function(e,n){this.sourceContents[i.toSetString(e)]=n},t.prototype.walkSourceContents=function(e){for(var n=0,r=this.children.length;r>n;n++)this.children[n][u]&&this.children[n].walkSourceContents(e);for(var t=Object.keys(this.sourceContents),n=0,r=t.length;r>n;n++)e(i.fromSetString(t[n]),this.sourceContents[t[n]])},t.prototype.toString=function(){var e="";return this.walk(function(n){e+=n}),e},t.prototype.toStringWithSourceMap=function(e){var n={code:"",line:1,column:0},r=new o(e),t=!1,i=null,s=null,u=null,l=null;return this.walk(function(e,o){n.code+=e,null!==o.source&&null!==o.line&&null!==o.column?((i!==o.source||s!==o.line||u!==o.column||l!==o.name)&&r.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:n.line,column:n.column},name:o.name}),i=o.source,s=o.line,u=o.column,l=o.name,t=!0):t&&(r.addMapping({generated:{line:n.line,column:n.column}}),i=null,t=!1);for(var c=0,g=e.length;g>c;c++)e.charCodeAt(c)===a?(n.line++,n.column=0,c+1===g?(i=null,t=!1):t&&r.addMapping({source:o.source,original:{line:o.line,column:o.column},generated:{line:n.line,column:n.column},name:o.name})):n.column++}),this.walkSourceContents(function(e,n){r.setSourceContent(e,n)}),{code:n.code,map:r}},n.SourceNode=t}])});
-//# sourceMappingURL=source-map.min.js.map \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/dist/source-map.min.js.map b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/dist/source-map.min.js.map
deleted file mode 100644
index 8470bde426..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/dist/source-map.min.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///source-map.min.js","webpack:///webpack/bootstrap a7d787c028005295f8d2","webpack:///./source-map.js","webpack:///./lib/source-map-generator.js","webpack:///./lib/base64-vlq.js","webpack:///./lib/base64.js","webpack:///./lib/util.js","webpack:///./lib/array-set.js","webpack:///./lib/mapping-list.js","webpack:///./lib/source-map-consumer.js","webpack:///./lib/binary-search.js","webpack:///./lib/quick-sort.js","webpack:///./lib/source-node.js"],"names":["root","factory","exports","module","define","amd","this","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","SourceMapGenerator","SourceMapConsumer","SourceNode","aArgs","_file","util","getArg","_sourceRoot","_skipValidation","_sources","ArraySet","_names","_mappings","MappingList","_sourcesContents","base64VLQ","prototype","_version","fromSourceMap","aSourceMapConsumer","sourceRoot","generator","file","eachMapping","mapping","newMapping","generated","line","generatedLine","column","generatedColumn","source","relative","original","originalLine","originalColumn","name","addMapping","sources","forEach","sourceFile","content","sourceContentFor","setSourceContent","_validateMapping","has","add","aSourceFile","aSourceContent","toSetString","Object","keys","length","applySourceMap","aSourceMapPath","Error","newSources","newNames","unsortedForEach","originalPositionFor","join","aGenerated","aOriginal","aSource","aName","JSON","stringify","_serializeMappings","nameIdx","sourceIdx","previousGeneratedColumn","previousGeneratedLine","previousOriginalColumn","previousOriginalLine","previousName","previousSource","result","mappings","toArray","i","len","compareByGeneratedPositionsInflated","encode","indexOf","_generateSourcesContent","aSources","aSourceRoot","map","key","hasOwnProperty","toJSON","version","names","sourcesContent","toString","toVLQSigned","aValue","fromVLQSigned","isNegative","shifted","base64","VLQ_BASE_SHIFT","VLQ_BASE","VLQ_BASE_MASK","VLQ_CONTINUATION_BIT","digit","encoded","vlq","decode","aStr","aIndex","aOutParam","continuation","strLen","shift","charCodeAt","charAt","value","rest","intToCharMap","split","number","TypeError","charCode","bigA","bigZ","littleA","littleZ","zero","nine","plus","slash","littleOffset","numberOffset","aDefaultValue","arguments","urlParse","aUrl","match","urlRegexp","scheme","auth","host","port","path","urlGenerate","aParsedUrl","url","normalize","aPath","part","isAbsolute","parts","up","splice","aRoot","aPathUrl","aRootUrl","dataUrlRegexp","joined","replace","level","index","lastIndexOf","slice","Array","substr","fromSetString","compareByOriginalPositions","mappingA","mappingB","onlyCompareOriginal","cmp","compareByGeneratedPositionsDeflated","onlyCompareGenerated","strcmp","aStr1","aStr2","_array","_set","fromArray","aArray","aAllowDuplicates","set","size","getOwnPropertyNames","sStr","isDuplicate","idx","push","at","aIdx","generatedPositionAfter","lineA","lineB","columnA","columnB","_sorted","_last","aCallback","aThisArg","aMapping","sort","aSourceMap","sourceMap","parse","sections","IndexedSourceMapConsumer","BasicSourceMapConsumer","Mapping","lastOffset","_sections","s","offset","offsetLine","offsetColumn","generatedOffset","consumer","binarySearch","quickSort","__generatedMappings","defineProperty","get","_parseMappings","__originalMappings","_charIsMappingSeparator","GENERATED_ORDER","ORIGINAL_ORDER","GREATEST_LOWER_BOUND","LEAST_UPPER_BOUND","aContext","aOrder","context","order","_generatedMappings","_originalMappings","allGeneratedPositionsFor","needle","_findMapping","undefined","lastColumn","create","smc","generatedMappings","destGeneratedMappings","destOriginalMappings","srcMapping","destMapping","str","segment","end","cachedSegments","temp","originalMappings","aNeedle","aMappings","aLineName","aColumnName","aComparator","aBias","search","computeColumnSpans","nextMapping","lastGeneratedColumn","Infinity","hasContentsOfAllSources","some","sc","nullOnMissing","fileUriAbsPath","generatedPositionFor","constructor","j","sectionIndex","section","bias","every","generatedPosition","ret","sectionMappings","adjustedMapping","recursiveSearch","aLow","aHigh","aHaystack","aCompare","mid","Math","floor","swap","ary","x","y","randomIntInRange","low","high","round","random","doQuickSort","comparator","r","pivotIndex","pivot","q","aLine","aColumn","aChunks","children","sourceContents","isSourceNode","REGEX_NEWLINE","NEWLINE_CODE","fromStringWithSourceMap","aGeneratedCode","aRelativePath","addMappingWithCode","code","node","remainingLines","shiftNextLine","lineContents","newLine","lastGeneratedLine","lastMapping","nextLine","aChunk","isArray","chunk","prepend","unshift","walk","aFn","aSep","newChildren","replaceRight","aPattern","aReplacement","lastChild","walkSourceContents","toStringWithSourceMap","sourceMappingActive","lastOriginalSource","lastOriginalLine","lastOriginalColumn","lastOriginalName","sourceContent"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,IACA,kBAAAG,gBAAAC,IACAD,UAAAH,GACA,gBAAAC,SACAA,QAAA,UAAAD,IAEAD,EAAA,UAAAC,KACCK,KAAA,WACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAP,OAGA,IAAAC,GAAAO,EAAAD,IACAP,WACAS,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAS,QAAA,EAGAT,EAAAD,QAvBA,GAAAQ,KAqCA,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EAAA5C,iBAAAH,EAAAiT,MAGY7B,KAAAlS,EAAAkS,KAAArO,QAGZtG,EAAAiB","file":"source-map.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"sourceMap\"] = factory();\n\telse\n\t\troot[\"sourceMap\"] = factory();\n})(this, function() {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"sourceMap\"] = factory();\n\telse\n\t\troot[\"sourceMap\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/*\n\t * Copyright 2009-2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE.txt or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\texports.SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\texports.SourceMapConsumer = __webpack_require__(7).SourceMapConsumer;\n\texports.SourceNode = __webpack_require__(10).SourceNode;\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t var base64VLQ = __webpack_require__(2);\n\t var util = __webpack_require__(4);\n\t var ArraySet = __webpack_require__(5).ArraySet;\n\t var MappingList = __webpack_require__(6).MappingList;\n\t\n\t /**\n\t * An instance of the SourceMapGenerator represents a source map which is\n\t * being built incrementally. You may pass an object with the following\n\t * properties:\n\t *\n\t * - file: The filename of the generated source.\n\t * - sourceRoot: A root for all relative URLs in this source map.\n\t */\n\t function SourceMapGenerator(aArgs) {\n\t if (!aArgs) {\n\t aArgs = {};\n\t }\n\t this._file = util.getArg(aArgs, 'file', null);\n\t this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n\t this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t this._mappings = new MappingList();\n\t this._sourcesContents = null;\n\t }\n\t\n\t SourceMapGenerator.prototype._version = 3;\n\t\n\t /**\n\t * Creates a new SourceMapGenerator based on a SourceMapConsumer\n\t *\n\t * @param aSourceMapConsumer The SourceMap.\n\t */\n\t SourceMapGenerator.fromSourceMap =\n\t function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n\t var sourceRoot = aSourceMapConsumer.sourceRoot;\n\t var generator = new SourceMapGenerator({\n\t file: aSourceMapConsumer.file,\n\t sourceRoot: sourceRoot\n\t });\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t var newMapping = {\n\t generated: {\n\t line: mapping.generatedLine,\n\t column: mapping.generatedColumn\n\t }\n\t };\n\t\n\t if (mapping.source != null) {\n\t newMapping.source = mapping.source;\n\t if (sourceRoot != null) {\n\t newMapping.source = util.relative(sourceRoot, newMapping.source);\n\t }\n\t\n\t newMapping.original = {\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t };\n\t\n\t if (mapping.name != null) {\n\t newMapping.name = mapping.name;\n\t }\n\t }\n\t\n\t generator.addMapping(newMapping);\n\t });\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t generator.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t return generator;\n\t };\n\t\n\t /**\n\t * Add a single mapping from original source line and column to the generated\n\t * source's line and column for this source map being created. The mapping\n\t * object should have the following properties:\n\t *\n\t * - generated: An object with the generated line and column positions.\n\t * - original: An object with the original line and column positions.\n\t * - source: The original source file (relative to the sourceRoot).\n\t * - name: An optional original token name for this mapping.\n\t */\n\t SourceMapGenerator.prototype.addMapping =\n\t function SourceMapGenerator_addMapping(aArgs) {\n\t var generated = util.getArg(aArgs, 'generated');\n\t var original = util.getArg(aArgs, 'original', null);\n\t var source = util.getArg(aArgs, 'source', null);\n\t var name = util.getArg(aArgs, 'name', null);\n\t\n\t if (!this._skipValidation) {\n\t this._validateMapping(generated, original, source, name);\n\t }\n\t\n\t if (source != null && !this._sources.has(source)) {\n\t this._sources.add(source);\n\t }\n\t\n\t if (name != null && !this._names.has(name)) {\n\t this._names.add(name);\n\t }\n\t\n\t this._mappings.add({\n\t generatedLine: generated.line,\n\t generatedColumn: generated.column,\n\t originalLine: original != null && original.line,\n\t originalColumn: original != null && original.column,\n\t source: source,\n\t name: name\n\t });\n\t };\n\t\n\t /**\n\t * Set the source content for a source file.\n\t */\n\t SourceMapGenerator.prototype.setSourceContent =\n\t function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n\t var source = aSourceFile;\n\t if (this._sourceRoot != null) {\n\t source = util.relative(this._sourceRoot, source);\n\t }\n\t\n\t if (aSourceContent != null) {\n\t // Add the source content to the _sourcesContents map.\n\t // Create a new _sourcesContents map if the property is null.\n\t if (!this._sourcesContents) {\n\t this._sourcesContents = {};\n\t }\n\t this._sourcesContents[util.toSetString(source)] = aSourceContent;\n\t } else if (this._sourcesContents) {\n\t // Remove the source file from the _sourcesContents map.\n\t // If the _sourcesContents map is empty, set the property to null.\n\t delete this._sourcesContents[util.toSetString(source)];\n\t if (Object.keys(this._sourcesContents).length === 0) {\n\t this._sourcesContents = null;\n\t }\n\t }\n\t };\n\t\n\t /**\n\t * Applies the mappings of a sub-source-map for a specific source file to the\n\t * source map being generated. Each mapping to the supplied source file is\n\t * rewritten using the supplied source map. Note: The resolution for the\n\t * resulting mappings is the minimium of this map and the supplied map.\n\t *\n\t * @param aSourceMapConsumer The source map to be applied.\n\t * @param aSourceFile Optional. The filename of the source file.\n\t * If omitted, SourceMapConsumer's file property will be used.\n\t * @param aSourceMapPath Optional. The dirname of the path to the source map\n\t * to be applied. If relative, it is relative to the SourceMapConsumer.\n\t * This parameter is needed when the two source maps aren't in the same\n\t * directory, and the source map to be applied contains relative source\n\t * paths. If so, those relative source paths need to be rewritten\n\t * relative to the SourceMapGenerator.\n\t */\n\t SourceMapGenerator.prototype.applySourceMap =\n\t function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n\t var sourceFile = aSourceFile;\n\t // If aSourceFile is omitted, we will use the file property of the SourceMap\n\t if (aSourceFile == null) {\n\t if (aSourceMapConsumer.file == null) {\n\t throw new Error(\n\t 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n\t 'or the source map\\'s \"file\" property. Both were omitted.'\n\t );\n\t }\n\t sourceFile = aSourceMapConsumer.file;\n\t }\n\t var sourceRoot = this._sourceRoot;\n\t // Make \"sourceFile\" relative if an absolute Url is passed.\n\t if (sourceRoot != null) {\n\t sourceFile = util.relative(sourceRoot, sourceFile);\n\t }\n\t // Applying the SourceMap can add and remove items from the sources and\n\t // the names array.\n\t var newSources = new ArraySet();\n\t var newNames = new ArraySet();\n\t\n\t // Find mappings for the \"sourceFile\"\n\t this._mappings.unsortedForEach(function (mapping) {\n\t if (mapping.source === sourceFile && mapping.originalLine != null) {\n\t // Check if it can be mapped by the source map, then update the mapping.\n\t var original = aSourceMapConsumer.originalPositionFor({\n\t line: mapping.originalLine,\n\t column: mapping.originalColumn\n\t });\n\t if (original.source != null) {\n\t // Copy mapping\n\t mapping.source = original.source;\n\t if (aSourceMapPath != null) {\n\t mapping.source = util.join(aSourceMapPath, mapping.source)\n\t }\n\t if (sourceRoot != null) {\n\t mapping.source = util.relative(sourceRoot, mapping.source);\n\t }\n\t mapping.originalLine = original.line;\n\t mapping.originalColumn = original.column;\n\t if (original.name != null) {\n\t mapping.name = original.name;\n\t }\n\t }\n\t }\n\t\n\t var source = mapping.source;\n\t if (source != null && !newSources.has(source)) {\n\t newSources.add(source);\n\t }\n\t\n\t var name = mapping.name;\n\t if (name != null && !newNames.has(name)) {\n\t newNames.add(name);\n\t }\n\t\n\t }, this);\n\t this._sources = newSources;\n\t this._names = newNames;\n\t\n\t // Copy sourcesContents of applied map.\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aSourceMapPath != null) {\n\t sourceFile = util.join(aSourceMapPath, sourceFile);\n\t }\n\t if (sourceRoot != null) {\n\t sourceFile = util.relative(sourceRoot, sourceFile);\n\t }\n\t this.setSourceContent(sourceFile, content);\n\t }\n\t }, this);\n\t };\n\t\n\t /**\n\t * A mapping can have one of the three levels of data:\n\t *\n\t * 1. Just the generated position.\n\t * 2. The Generated position, original position, and original source.\n\t * 3. Generated and original position, original source, as well as a name\n\t * token.\n\t *\n\t * To maintain consistency, we validate that any new mapping being added falls\n\t * in to one of these categories.\n\t */\n\t SourceMapGenerator.prototype._validateMapping =\n\t function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n\t aName) {\n\t if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && !aOriginal && !aSource && !aName) {\n\t // Case 1.\n\t return;\n\t }\n\t else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n\t && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n\t && aGenerated.line > 0 && aGenerated.column >= 0\n\t && aOriginal.line > 0 && aOriginal.column >= 0\n\t && aSource) {\n\t // Cases 2 and 3.\n\t return;\n\t }\n\t else {\n\t throw new Error('Invalid mapping: ' + JSON.stringify({\n\t generated: aGenerated,\n\t source: aSource,\n\t original: aOriginal,\n\t name: aName\n\t }));\n\t }\n\t };\n\t\n\t /**\n\t * Serialize the accumulated mappings in to the stream of base 64 VLQs\n\t * specified by the source map format.\n\t */\n\t SourceMapGenerator.prototype._serializeMappings =\n\t function SourceMapGenerator_serializeMappings() {\n\t var previousGeneratedColumn = 0;\n\t var previousGeneratedLine = 1;\n\t var previousOriginalColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousName = 0;\n\t var previousSource = 0;\n\t var result = '';\n\t var mapping;\n\t var nameIdx;\n\t var sourceIdx;\n\t\n\t var mappings = this._mappings.toArray();\n\t for (var i = 0, len = mappings.length; i < len; i++) {\n\t mapping = mappings[i];\n\t\n\t if (mapping.generatedLine !== previousGeneratedLine) {\n\t previousGeneratedColumn = 0;\n\t while (mapping.generatedLine !== previousGeneratedLine) {\n\t result += ';';\n\t previousGeneratedLine++;\n\t }\n\t }\n\t else {\n\t if (i > 0) {\n\t if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n\t continue;\n\t }\n\t result += ',';\n\t }\n\t }\n\t\n\t result += base64VLQ.encode(mapping.generatedColumn\n\t - previousGeneratedColumn);\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (mapping.source != null) {\n\t sourceIdx = this._sources.indexOf(mapping.source);\n\t result += base64VLQ.encode(sourceIdx - previousSource);\n\t previousSource = sourceIdx;\n\t\n\t // lines are stored 0-based in SourceMap spec version 3\n\t result += base64VLQ.encode(mapping.originalLine - 1\n\t - previousOriginalLine);\n\t previousOriginalLine = mapping.originalLine - 1;\n\t\n\t result += base64VLQ.encode(mapping.originalColumn\n\t - previousOriginalColumn);\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (mapping.name != null) {\n\t nameIdx = this._names.indexOf(mapping.name);\n\t result += base64VLQ.encode(nameIdx - previousName);\n\t previousName = nameIdx;\n\t }\n\t }\n\t }\n\t\n\t return result;\n\t };\n\t\n\t SourceMapGenerator.prototype._generateSourcesContent =\n\t function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n\t return aSources.map(function (source) {\n\t if (!this._sourcesContents) {\n\t return null;\n\t }\n\t if (aSourceRoot != null) {\n\t source = util.relative(aSourceRoot, source);\n\t }\n\t var key = util.toSetString(source);\n\t return Object.prototype.hasOwnProperty.call(this._sourcesContents,\n\t key)\n\t ? this._sourcesContents[key]\n\t : null;\n\t }, this);\n\t };\n\t\n\t /**\n\t * Externalize the source map.\n\t */\n\t SourceMapGenerator.prototype.toJSON =\n\t function SourceMapGenerator_toJSON() {\n\t var map = {\n\t version: this._version,\n\t sources: this._sources.toArray(),\n\t names: this._names.toArray(),\n\t mappings: this._serializeMappings()\n\t };\n\t if (this._file != null) {\n\t map.file = this._file;\n\t }\n\t if (this._sourceRoot != null) {\n\t map.sourceRoot = this._sourceRoot;\n\t }\n\t if (this._sourcesContents) {\n\t map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n\t }\n\t\n\t return map;\n\t };\n\t\n\t /**\n\t * Render the source map being generated to a string.\n\t */\n\t SourceMapGenerator.prototype.toString =\n\t function SourceMapGenerator_toString() {\n\t return JSON.stringify(this.toJSON());\n\t };\n\t\n\t exports.SourceMapGenerator = SourceMapGenerator;\n\t}\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t *\n\t * Based on the Base 64 VLQ implementation in Closure Compiler:\n\t * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n\t *\n\t * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n\t * Redistribution and use in source and binary forms, with or without\n\t * modification, are permitted provided that the following conditions are\n\t * met:\n\t *\n\t * * Redistributions of source code must retain the above copyright\n\t * notice, this list of conditions and the following disclaimer.\n\t * * Redistributions in binary form must reproduce the above\n\t * copyright notice, this list of conditions and the following\n\t * disclaimer in the documentation and/or other materials provided\n\t * with the distribution.\n\t * * Neither the name of Google Inc. nor the names of its\n\t * contributors may be used to endorse or promote products derived\n\t * from this software without specific prior written permission.\n\t *\n\t * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\t * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n\t * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n\t * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n\t * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n\t * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n\t * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n\t * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n\t * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\t * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n\t * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t */\n\t{\n\t var base64 = __webpack_require__(3);\n\t\n\t // A single base 64 digit can contain 6 bits of data. For the base 64 variable\n\t // length quantities we use in the source map spec, the first bit is the sign,\n\t // the next four bits are the actual value, and the 6th bit is the\n\t // continuation bit. The continuation bit tells us whether there are more\n\t // digits in this value following this digit.\n\t //\n\t // Continuation\n\t // | Sign\n\t // | |\n\t // V V\n\t // 101011\n\t\n\t var VLQ_BASE_SHIFT = 5;\n\t\n\t // binary: 100000\n\t var VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\t\n\t // binary: 011111\n\t var VLQ_BASE_MASK = VLQ_BASE - 1;\n\t\n\t // binary: 100000\n\t var VLQ_CONTINUATION_BIT = VLQ_BASE;\n\t\n\t /**\n\t * Converts from a two-complement value to a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n\t * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n\t */\n\t function toVLQSigned(aValue) {\n\t return aValue < 0\n\t ? ((-aValue) << 1) + 1\n\t : (aValue << 1) + 0;\n\t }\n\t\n\t /**\n\t * Converts to a two-complement value from a value where the sign bit is\n\t * placed in the least significant bit. For example, as decimals:\n\t * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n\t * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n\t */\n\t function fromVLQSigned(aValue) {\n\t var isNegative = (aValue & 1) === 1;\n\t var shifted = aValue >> 1;\n\t return isNegative\n\t ? -shifted\n\t : shifted;\n\t }\n\t\n\t /**\n\t * Returns the base 64 VLQ encoded value.\n\t */\n\t exports.encode = function base64VLQ_encode(aValue) {\n\t var encoded = \"\";\n\t var digit;\n\t\n\t var vlq = toVLQSigned(aValue);\n\t\n\t do {\n\t digit = vlq & VLQ_BASE_MASK;\n\t vlq >>>= VLQ_BASE_SHIFT;\n\t if (vlq > 0) {\n\t // There are still more digits in this value, so we must make sure the\n\t // continuation bit is marked.\n\t digit |= VLQ_CONTINUATION_BIT;\n\t }\n\t encoded += base64.encode(digit);\n\t } while (vlq > 0);\n\t\n\t return encoded;\n\t };\n\t\n\t /**\n\t * Decodes the next base 64 VLQ value from the given string and returns the\n\t * value and the rest of the string via the out parameter.\n\t */\n\t exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n\t var strLen = aStr.length;\n\t var result = 0;\n\t var shift = 0;\n\t var continuation, digit;\n\t\n\t do {\n\t if (aIndex >= strLen) {\n\t throw new Error(\"Expected more digits in base 64 VLQ value.\");\n\t }\n\t\n\t digit = base64.decode(aStr.charCodeAt(aIndex++));\n\t if (digit === -1) {\n\t throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n\t }\n\t\n\t continuation = !!(digit & VLQ_CONTINUATION_BIT);\n\t digit &= VLQ_BASE_MASK;\n\t result = result + (digit << shift);\n\t shift += VLQ_BASE_SHIFT;\n\t } while (continuation);\n\t\n\t aOutParam.value = fromVLQSigned(result);\n\t aOutParam.rest = aIndex;\n\t };\n\t}\n\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\t\n\t /**\n\t * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n\t */\n\t exports.encode = function (number) {\n\t if (0 <= number && number < intToCharMap.length) {\n\t return intToCharMap[number];\n\t }\n\t throw new TypeError(\"Must be between 0 and 63: \" + number);\n\t };\n\t\n\t /**\n\t * Decode a single base 64 character code digit to an integer. Returns -1 on\n\t * failure.\n\t */\n\t exports.decode = function (charCode) {\n\t var bigA = 65; // 'A'\n\t var bigZ = 90; // 'Z'\n\t\n\t var littleA = 97; // 'a'\n\t var littleZ = 122; // 'z'\n\t\n\t var zero = 48; // '0'\n\t var nine = 57; // '9'\n\t\n\t var plus = 43; // '+'\n\t var slash = 47; // '/'\n\t\n\t var littleOffset = 26;\n\t var numberOffset = 52;\n\t\n\t // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n\t if (bigA <= charCode && charCode <= bigZ) {\n\t return (charCode - bigA);\n\t }\n\t\n\t // 26 - 51: abcdefghijklmnopqrstuvwxyz\n\t if (littleA <= charCode && charCode <= littleZ) {\n\t return (charCode - littleA + littleOffset);\n\t }\n\t\n\t // 52 - 61: 0123456789\n\t if (zero <= charCode && charCode <= nine) {\n\t return (charCode - zero + numberOffset);\n\t }\n\t\n\t // 62: +\n\t if (charCode == plus) {\n\t return 62;\n\t }\n\t\n\t // 63: /\n\t if (charCode == slash) {\n\t return 63;\n\t }\n\t\n\t // Invalid base64 digit.\n\t return -1;\n\t };\n\t}\n\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t /**\n\t * This is a helper function for getting values from parameter/options\n\t * objects.\n\t *\n\t * @param args The object we are extracting values from\n\t * @param name The name of the property we are getting.\n\t * @param defaultValue An optional value to return if the property is missing\n\t * from the object. If this is not specified and the property is missing, an\n\t * error will be thrown.\n\t */\n\t function getArg(aArgs, aName, aDefaultValue) {\n\t if (aName in aArgs) {\n\t return aArgs[aName];\n\t } else if (arguments.length === 3) {\n\t return aDefaultValue;\n\t } else {\n\t throw new Error('\"' + aName + '\" is a required argument.');\n\t }\n\t }\n\t exports.getArg = getArg;\n\t\n\t var urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\n\t var dataUrlRegexp = /^data:.+\\,.+$/;\n\t\n\t function urlParse(aUrl) {\n\t var match = aUrl.match(urlRegexp);\n\t if (!match) {\n\t return null;\n\t }\n\t return {\n\t scheme: match[1],\n\t auth: match[2],\n\t host: match[3],\n\t port: match[4],\n\t path: match[5]\n\t };\n\t }\n\t exports.urlParse = urlParse;\n\t\n\t function urlGenerate(aParsedUrl) {\n\t var url = '';\n\t if (aParsedUrl.scheme) {\n\t url += aParsedUrl.scheme + ':';\n\t }\n\t url += '//';\n\t if (aParsedUrl.auth) {\n\t url += aParsedUrl.auth + '@';\n\t }\n\t if (aParsedUrl.host) {\n\t url += aParsedUrl.host;\n\t }\n\t if (aParsedUrl.port) {\n\t url += \":\" + aParsedUrl.port\n\t }\n\t if (aParsedUrl.path) {\n\t url += aParsedUrl.path;\n\t }\n\t return url;\n\t }\n\t exports.urlGenerate = urlGenerate;\n\t\n\t /**\n\t * Normalizes a path, or the path portion of a URL:\n\t *\n\t * - Replaces consequtive slashes with one slash.\n\t * - Removes unnecessary '.' parts.\n\t * - Removes unnecessary '<dir>/..' parts.\n\t *\n\t * Based on code in the Node.js 'path' core module.\n\t *\n\t * @param aPath The path or url to normalize.\n\t */\n\t function normalize(aPath) {\n\t var path = aPath;\n\t var url = urlParse(aPath);\n\t if (url) {\n\t if (!url.path) {\n\t return aPath;\n\t }\n\t path = url.path;\n\t }\n\t var isAbsolute = exports.isAbsolute(path);\n\t\n\t var parts = path.split(/\\/+/);\n\t for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n\t part = parts[i];\n\t if (part === '.') {\n\t parts.splice(i, 1);\n\t } else if (part === '..') {\n\t up++;\n\t } else if (up > 0) {\n\t if (part === '') {\n\t // The first part is blank if the path is absolute. Trying to go\n\t // above the root is a no-op. Therefore we can remove all '..' parts\n\t // directly after the root.\n\t parts.splice(i + 1, up);\n\t up = 0;\n\t } else {\n\t parts.splice(i, 2);\n\t up--;\n\t }\n\t }\n\t }\n\t path = parts.join('/');\n\t\n\t if (path === '') {\n\t path = isAbsolute ? '/' : '.';\n\t }\n\t\n\t if (url) {\n\t url.path = path;\n\t return urlGenerate(url);\n\t }\n\t return path;\n\t }\n\t exports.normalize = normalize;\n\t\n\t /**\n\t * Joins two paths/URLs.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be joined with the root.\n\t *\n\t * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n\t * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n\t * first.\n\t * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n\t * is updated with the result and aRoot is returned. Otherwise the result\n\t * is returned.\n\t * - If aPath is absolute, the result is aPath.\n\t * - Otherwise the two paths are joined with a slash.\n\t * - Joining for example 'http://' and 'www.example.com' is also supported.\n\t */\n\t function join(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t if (aPath === \"\") {\n\t aPath = \".\";\n\t }\n\t var aPathUrl = urlParse(aPath);\n\t var aRootUrl = urlParse(aRoot);\n\t if (aRootUrl) {\n\t aRoot = aRootUrl.path || '/';\n\t }\n\t\n\t // `join(foo, '//www.example.org')`\n\t if (aPathUrl && !aPathUrl.scheme) {\n\t if (aRootUrl) {\n\t aPathUrl.scheme = aRootUrl.scheme;\n\t }\n\t return urlGenerate(aPathUrl);\n\t }\n\t\n\t if (aPathUrl || aPath.match(dataUrlRegexp)) {\n\t return aPath;\n\t }\n\t\n\t // `join('http://', 'www.example.com')`\n\t if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n\t aRootUrl.host = aPath;\n\t return urlGenerate(aRootUrl);\n\t }\n\t\n\t var joined = aPath.charAt(0) === '/'\n\t ? aPath\n\t : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\t\n\t if (aRootUrl) {\n\t aRootUrl.path = joined;\n\t return urlGenerate(aRootUrl);\n\t }\n\t return joined;\n\t }\n\t exports.join = join;\n\t\n\t exports.isAbsolute = function (aPath) {\n\t return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n\t };\n\t\n\t /**\n\t * Make a path relative to a URL or another path.\n\t *\n\t * @param aRoot The root path or URL.\n\t * @param aPath The path or URL to be made relative to aRoot.\n\t */\n\t function relative(aRoot, aPath) {\n\t if (aRoot === \"\") {\n\t aRoot = \".\";\n\t }\n\t\n\t aRoot = aRoot.replace(/\\/$/, '');\n\t\n\t // It is possible for the path to be above the root. In this case, simply\n\t // checking whether the root is a prefix of the path won't work. Instead, we\n\t // need to remove components from the root one by one, until either we find\n\t // a prefix that fits, or we run out of components to remove.\n\t var level = 0;\n\t while (aPath.indexOf(aRoot + '/') !== 0) {\n\t var index = aRoot.lastIndexOf(\"/\");\n\t if (index < 0) {\n\t return aPath;\n\t }\n\t\n\t // If the only part of the root that is left is the scheme (i.e. http://,\n\t // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n\t // have exhausted all components, so the path is not relative to the root.\n\t aRoot = aRoot.slice(0, index);\n\t if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n\t return aPath;\n\t }\n\t\n\t ++level;\n\t }\n\t\n\t // Make sure we add a \"../\" for each component we removed from the root.\n\t return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n\t }\n\t exports.relative = relative;\n\t\n\t /**\n\t * Because behavior goes wacky when you set `__proto__` on objects, we\n\t * have to prefix all the strings in our set with an arbitrary character.\n\t *\n\t * See https://github.com/mozilla/source-map/pull/31 and\n\t * https://github.com/mozilla/source-map/issues/30\n\t *\n\t * @param String aStr\n\t */\n\t function toSetString(aStr) {\n\t return '$' + aStr;\n\t }\n\t exports.toSetString = toSetString;\n\t\n\t function fromSetString(aStr) {\n\t return aStr.substr(1);\n\t }\n\t exports.fromSetString = fromSetString;\n\t\n\t /**\n\t * Comparator between two mappings where the original positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same original source/line/column, but different generated\n\t * line and column the same. Useful when searching for a mapping with a\n\t * stubbed out mapping.\n\t */\n\t function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n\t var cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0 || onlyCompareOriginal) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t }\n\t exports.compareByOriginalPositions = compareByOriginalPositions;\n\t\n\t /**\n\t * Comparator between two mappings with deflated source and name indices where\n\t * the generated positions are compared.\n\t *\n\t * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n\t * mappings with the same generated line and column, but different\n\t * source/name/original line and column the same. Useful when searching for a\n\t * mapping with a stubbed out mapping.\n\t */\n\t function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0 || onlyCompareGenerated) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.source - mappingB.source;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return mappingA.name - mappingB.name;\n\t }\n\t exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\t\n\t function strcmp(aStr1, aStr2) {\n\t if (aStr1 === aStr2) {\n\t return 0;\n\t }\n\t\n\t if (aStr1 > aStr2) {\n\t return 1;\n\t }\n\t\n\t return -1;\n\t }\n\t\n\t /**\n\t * Comparator between two mappings with inflated source and name strings where\n\t * the generated positions are compared.\n\t */\n\t function compareByGeneratedPositionsInflated(mappingA, mappingB) {\n\t var cmp = mappingA.generatedLine - mappingB.generatedLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = strcmp(mappingA.source, mappingB.source);\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalLine - mappingB.originalLine;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t cmp = mappingA.originalColumn - mappingB.originalColumn;\n\t if (cmp !== 0) {\n\t return cmp;\n\t }\n\t\n\t return strcmp(mappingA.name, mappingB.name);\n\t }\n\t exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n\t}\n\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t var util = __webpack_require__(4);\n\t\n\t /**\n\t * A data structure which is a combination of an array and a set. Adding a new\n\t * member is O(1), testing for membership is O(1), and finding the index of an\n\t * element is O(1). Removing elements from the set is not supported. Only\n\t * strings are supported for membership.\n\t */\n\t function ArraySet() {\n\t this._array = [];\n\t this._set = {};\n\t }\n\t\n\t /**\n\t * Static method for creating ArraySet instances from an existing array.\n\t */\n\t ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n\t var set = new ArraySet();\n\t for (var i = 0, len = aArray.length; i < len; i++) {\n\t set.add(aArray[i], aAllowDuplicates);\n\t }\n\t return set;\n\t };\n\t\n\t /**\n\t * Return how many unique items are in this ArraySet. If duplicates have been\n\t * added, than those do not count towards the size.\n\t *\n\t * @returns Number\n\t */\n\t ArraySet.prototype.size = function ArraySet_size() {\n\t return Object.getOwnPropertyNames(this._set).length;\n\t };\n\t\n\t /**\n\t * Add the given string to this set.\n\t *\n\t * @param String aStr\n\t */\n\t ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n\t var sStr = util.toSetString(aStr);\n\t var isDuplicate = this._set.hasOwnProperty(sStr);\n\t var idx = this._array.length;\n\t if (!isDuplicate || aAllowDuplicates) {\n\t this._array.push(aStr);\n\t }\n\t if (!isDuplicate) {\n\t this._set[sStr] = idx;\n\t }\n\t };\n\t\n\t /**\n\t * Is the given string a member of this set?\n\t *\n\t * @param String aStr\n\t */\n\t ArraySet.prototype.has = function ArraySet_has(aStr) {\n\t var sStr = util.toSetString(aStr);\n\t return this._set.hasOwnProperty(sStr);\n\t };\n\t\n\t /**\n\t * What is the index of the given string in the array?\n\t *\n\t * @param String aStr\n\t */\n\t ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n\t var sStr = util.toSetString(aStr);\n\t if (this._set.hasOwnProperty(sStr)) {\n\t return this._set[sStr];\n\t }\n\t throw new Error('\"' + aStr + '\" is not in the set.');\n\t };\n\t\n\t /**\n\t * What is the element at the given index?\n\t *\n\t * @param Number aIdx\n\t */\n\t ArraySet.prototype.at = function ArraySet_at(aIdx) {\n\t if (aIdx >= 0 && aIdx < this._array.length) {\n\t return this._array[aIdx];\n\t }\n\t throw new Error('No element indexed by ' + aIdx);\n\t };\n\t\n\t /**\n\t * Returns the array representation of this set (which has the proper indices\n\t * indicated by indexOf). Note that this is a copy of the internal array used\n\t * for storing the members so that no one can mess with internal state.\n\t */\n\t ArraySet.prototype.toArray = function ArraySet_toArray() {\n\t return this._array.slice();\n\t };\n\t\n\t exports.ArraySet = ArraySet;\n\t}\n\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2014 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t var util = __webpack_require__(4);\n\t\n\t /**\n\t * Determine whether mappingB is after mappingA with respect to generated\n\t * position.\n\t */\n\t function generatedPositionAfter(mappingA, mappingB) {\n\t // Optimized for most common case\n\t var lineA = mappingA.generatedLine;\n\t var lineB = mappingB.generatedLine;\n\t var columnA = mappingA.generatedColumn;\n\t var columnB = mappingB.generatedColumn;\n\t return lineB > lineA || lineB == lineA && columnB >= columnA ||\n\t util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n\t }\n\t\n\t /**\n\t * A data structure to provide a sorted view of accumulated mappings in a\n\t * performance conscious manner. It trades a neglibable overhead in general\n\t * case for a large speedup in case of mappings being added in order.\n\t */\n\t function MappingList() {\n\t this._array = [];\n\t this._sorted = true;\n\t // Serves as infimum\n\t this._last = {generatedLine: -1, generatedColumn: 0};\n\t }\n\t\n\t /**\n\t * Iterate through internal items. This method takes the same arguments that\n\t * `Array.prototype.forEach` takes.\n\t *\n\t * NOTE: The order of the mappings is NOT guaranteed.\n\t */\n\t MappingList.prototype.unsortedForEach =\n\t function MappingList_forEach(aCallback, aThisArg) {\n\t this._array.forEach(aCallback, aThisArg);\n\t };\n\t\n\t /**\n\t * Add the given source mapping.\n\t *\n\t * @param Object aMapping\n\t */\n\t MappingList.prototype.add = function MappingList_add(aMapping) {\n\t if (generatedPositionAfter(this._last, aMapping)) {\n\t this._last = aMapping;\n\t this._array.push(aMapping);\n\t } else {\n\t this._sorted = false;\n\t this._array.push(aMapping);\n\t }\n\t };\n\t\n\t /**\n\t * Returns the flat, sorted array of mappings. The mappings are sorted by\n\t * generated position.\n\t *\n\t * WARNING: This method returns internal data without copying, for\n\t * performance. The return value must NOT be mutated, and should be treated as\n\t * an immutable borrow. If you want to take ownership, you must make your own\n\t * copy.\n\t */\n\t MappingList.prototype.toArray = function MappingList_toArray() {\n\t if (!this._sorted) {\n\t this._array.sort(util.compareByGeneratedPositionsInflated);\n\t this._sorted = true;\n\t }\n\t return this._array;\n\t };\n\t\n\t exports.MappingList = MappingList;\n\t}\n\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t var util = __webpack_require__(4);\n\t var binarySearch = __webpack_require__(8);\n\t var ArraySet = __webpack_require__(5).ArraySet;\n\t var base64VLQ = __webpack_require__(2);\n\t var quickSort = __webpack_require__(9).quickSort;\n\t\n\t function SourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t return sourceMap.sections != null\n\t ? new IndexedSourceMapConsumer(sourceMap)\n\t : new BasicSourceMapConsumer(sourceMap);\n\t }\n\t\n\t SourceMapConsumer.fromSourceMap = function(aSourceMap) {\n\t return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n\t }\n\t\n\t /**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\t SourceMapConsumer.prototype._version = 3;\n\t\n\t // `__generatedMappings` and `__originalMappings` are arrays that hold the\n\t // parsed mapping coordinates from the source map's \"mappings\" attribute. They\n\t // are lazily instantiated, accessed via the `_generatedMappings` and\n\t // `_originalMappings` getters respectively, and we only parse the mappings\n\t // and create these arrays once queried for a source location. We jump through\n\t // these hoops because there can be many thousands of mappings, and parsing\n\t // them is expensive, so we only want to do it if we must.\n\t //\n\t // Each object in the arrays is of the form:\n\t //\n\t // {\n\t // generatedLine: The line number in the generated code,\n\t // generatedColumn: The column number in the generated code,\n\t // source: The path to the original source file that generated this\n\t // chunk of code,\n\t // originalLine: The line number in the original source that\n\t // corresponds to this chunk of generated code,\n\t // originalColumn: The column number in the original source that\n\t // corresponds to this chunk of generated code,\n\t // name: The name of the original symbol which generated this chunk of\n\t // code.\n\t // }\n\t //\n\t // All properties except for `generatedLine` and `generatedColumn` can be\n\t // `null`.\n\t //\n\t // `_generatedMappings` is ordered by the generated positions.\n\t //\n\t // `_originalMappings` is ordered by the original positions.\n\t\n\t SourceMapConsumer.prototype.__generatedMappings = null;\n\t Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n\t get: function () {\n\t if (!this.__generatedMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__generatedMappings;\n\t }\n\t });\n\t\n\t SourceMapConsumer.prototype.__originalMappings = null;\n\t Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n\t get: function () {\n\t if (!this.__originalMappings) {\n\t this._parseMappings(this._mappings, this.sourceRoot);\n\t }\n\t\n\t return this.__originalMappings;\n\t }\n\t });\n\t\n\t SourceMapConsumer.prototype._charIsMappingSeparator =\n\t function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n\t var c = aStr.charAt(index);\n\t return c === \";\" || c === \",\";\n\t };\n\t\n\t /**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\t SourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t throw new Error(\"Subclasses must implement _parseMappings\");\n\t };\n\t\n\t SourceMapConsumer.GENERATED_ORDER = 1;\n\t SourceMapConsumer.ORIGINAL_ORDER = 2;\n\t\n\t SourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n\t SourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\t\n\t /**\n\t * Iterate over each mapping between an original source/line/column and a\n\t * generated line/column in this source map.\n\t *\n\t * @param Function aCallback\n\t * The function that is called with each mapping.\n\t * @param Object aContext\n\t * Optional. If specified, this object will be the value of `this` every\n\t * time that `aCallback` is called.\n\t * @param aOrder\n\t * Either `SourceMapConsumer.GENERATED_ORDER` or\n\t * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n\t * iterate over the mappings sorted by the generated file's line/column\n\t * order or the original's source/line/column order, respectively. Defaults to\n\t * `SourceMapConsumer.GENERATED_ORDER`.\n\t */\n\t SourceMapConsumer.prototype.eachMapping =\n\t function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n\t var context = aContext || null;\n\t var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\t\n\t var mappings;\n\t switch (order) {\n\t case SourceMapConsumer.GENERATED_ORDER:\n\t mappings = this._generatedMappings;\n\t break;\n\t case SourceMapConsumer.ORIGINAL_ORDER:\n\t mappings = this._originalMappings;\n\t break;\n\t default:\n\t throw new Error(\"Unknown order of iteration.\");\n\t }\n\t\n\t var sourceRoot = this.sourceRoot;\n\t mappings.map(function (mapping) {\n\t var source = mapping.source === null ? null : this._sources.at(mapping.source);\n\t if (source != null && sourceRoot != null) {\n\t source = util.join(sourceRoot, source);\n\t }\n\t return {\n\t source: source,\n\t generatedLine: mapping.generatedLine,\n\t generatedColumn: mapping.generatedColumn,\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: mapping.name === null ? null : this._names.at(mapping.name)\n\t };\n\t }, this).forEach(aCallback, context);\n\t };\n\t\n\t /**\n\t * Returns all generated line and column information for the original source,\n\t * line, and column provided. If no column is provided, returns all mappings\n\t * corresponding to a either the line we are searching for or the next\n\t * closest line that has any mappings. Otherwise, returns all mappings\n\t * corresponding to the given line and either the column we are searching for\n\t * or the next closest column that has any offsets.\n\t *\n\t * The only argument is an object with the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: Optional. the column number in the original source.\n\t *\n\t * and an array of objects is returned, each with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\t SourceMapConsumer.prototype.allGeneratedPositionsFor =\n\t function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n\t var line = util.getArg(aArgs, 'line');\n\t\n\t // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n\t // returns the index of the closest mapping less than the needle. By\n\t // setting needle.originalColumn to 0, we thus find the last mapping for\n\t // the given line, provided such a mapping exists.\n\t var needle = {\n\t source: util.getArg(aArgs, 'source'),\n\t originalLine: line,\n\t originalColumn: util.getArg(aArgs, 'column', 0)\n\t };\n\t\n\t if (this.sourceRoot != null) {\n\t needle.source = util.relative(this.sourceRoot, needle.source);\n\t }\n\t if (!this._sources.has(needle.source)) {\n\t return [];\n\t }\n\t needle.source = this._sources.indexOf(needle.source);\n\t\n\t var mappings = [];\n\t\n\t var index = this._findMapping(needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t binarySearch.LEAST_UPPER_BOUND);\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (aArgs.column === undefined) {\n\t var originalLine = mapping.originalLine;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we found. Since\n\t // mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we found.\n\t while (mapping && mapping.originalLine === originalLine) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t } else {\n\t var originalColumn = mapping.originalColumn;\n\t\n\t // Iterate until either we run out of mappings, or we run into\n\t // a mapping for a different line than the one we were searching for.\n\t // Since mappings are sorted, this is guaranteed to find all mappings for\n\t // the line we are searching for.\n\t while (mapping &&\n\t mapping.originalLine === line &&\n\t mapping.originalColumn == originalColumn) {\n\t mappings.push({\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t });\n\t\n\t mapping = this._originalMappings[++index];\n\t }\n\t }\n\t }\n\t\n\t return mappings;\n\t };\n\t\n\t exports.SourceMapConsumer = SourceMapConsumer;\n\t\n\t /**\n\t * A BasicSourceMapConsumer instance represents a parsed source map which we can\n\t * query for information about the original file positions by giving it a file\n\t * position in the generated source.\n\t *\n\t * The only parameter is the raw source map (either as a JSON string, or\n\t * already parsed to an object). According to the spec, source maps have the\n\t * following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - sources: An array of URLs to the original source files.\n\t * - names: An array of identifiers which can be referrenced by individual mappings.\n\t * - sourceRoot: Optional. The URL root from which all sources are relative.\n\t * - sourcesContent: Optional. An array of contents of the original source files.\n\t * - mappings: A string of base64 VLQs which contain the actual mappings.\n\t * - file: Optional. The generated file this source map is associated with.\n\t *\n\t * Here is an example source map, taken from the source map spec[0]:\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"out.js\",\n\t * sourceRoot : \"\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AA,AB;;ABCDE;\"\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n\t */\n\t function BasicSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sources = util.getArg(sourceMap, 'sources');\n\t // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n\t // requires the array) to play nice here.\n\t var names = util.getArg(sourceMap, 'names', []);\n\t var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n\t var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n\t var mappings = util.getArg(sourceMap, 'mappings');\n\t var file = util.getArg(sourceMap, 'file', null);\n\t\n\t // Once again, Sass deviates from the spec and supplies the version as a\n\t // string rather than a number, so we use loose equality checking here.\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t sources = sources\n\t // Some source maps produce relative source paths like \"./foo.js\" instead of\n\t // \"foo.js\". Normalize these first so that future comparisons will succeed.\n\t // See bugzil.la/1090768.\n\t .map(util.normalize)\n\t // Always ensure that absolute sources are internally stored relative to\n\t // the source root, if the source root is absolute. Not doing this would\n\t // be particularly problematic when the source root is a prefix of the\n\t // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n\t .map(function (source) {\n\t return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n\t ? util.relative(sourceRoot, source)\n\t : source;\n\t });\n\t\n\t // Pass `true` below to allow duplicate names and sources. While source maps\n\t // are intended to be compressed and deduplicated, the TypeScript compiler\n\t // sometimes generates source maps with duplicates in them. See Github issue\n\t // #72 and bugzil.la/889492.\n\t this._names = ArraySet.fromArray(names, true);\n\t this._sources = ArraySet.fromArray(sources, true);\n\t\n\t this.sourceRoot = sourceRoot;\n\t this.sourcesContent = sourcesContent;\n\t this._mappings = mappings;\n\t this.file = file;\n\t }\n\t\n\t BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\t BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\t\n\t /**\n\t * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n\t *\n\t * @param SourceMapGenerator aSourceMap\n\t * The source map that will be consumed.\n\t * @returns BasicSourceMapConsumer\n\t */\n\t BasicSourceMapConsumer.fromSourceMap =\n\t function SourceMapConsumer_fromSourceMap(aSourceMap) {\n\t var smc = Object.create(BasicSourceMapConsumer.prototype);\n\t\n\t var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n\t var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n\t smc.sourceRoot = aSourceMap._sourceRoot;\n\t smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n\t smc.sourceRoot);\n\t smc.file = aSourceMap._file;\n\t\n\t // Because we are modifying the entries (by converting string sources and\n\t // names to indices into the sources and names ArraySets), we have to make\n\t // a copy of the entry or else bad things happen. Shared mutable state\n\t // strikes again! See github issue #191.\n\t\n\t var generatedMappings = aSourceMap._mappings.toArray().slice();\n\t var destGeneratedMappings = smc.__generatedMappings = [];\n\t var destOriginalMappings = smc.__originalMappings = [];\n\t\n\t for (var i = 0, length = generatedMappings.length; i < length; i++) {\n\t var srcMapping = generatedMappings[i];\n\t var destMapping = new Mapping;\n\t destMapping.generatedLine = srcMapping.generatedLine;\n\t destMapping.generatedColumn = srcMapping.generatedColumn;\n\t\n\t if (srcMapping.source) {\n\t destMapping.source = sources.indexOf(srcMapping.source);\n\t destMapping.originalLine = srcMapping.originalLine;\n\t destMapping.originalColumn = srcMapping.originalColumn;\n\t\n\t if (srcMapping.name) {\n\t destMapping.name = names.indexOf(srcMapping.name);\n\t }\n\t\n\t destOriginalMappings.push(destMapping);\n\t }\n\t\n\t destGeneratedMappings.push(destMapping);\n\t }\n\t\n\t quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\t\n\t return smc;\n\t };\n\t\n\t /**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\t BasicSourceMapConsumer.prototype._version = 3;\n\t\n\t /**\n\t * The list of original sources.\n\t */\n\t Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t return this._sources.toArray().map(function (s) {\n\t return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n\t }, this);\n\t }\n\t });\n\t\n\t /**\n\t * Provide the JIT with a nice shape / hidden class.\n\t */\n\t function Mapping() {\n\t this.generatedLine = 0;\n\t this.generatedColumn = 0;\n\t this.source = null;\n\t this.originalLine = null;\n\t this.originalColumn = null;\n\t this.name = null;\n\t }\n\t\n\t /**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\t BasicSourceMapConsumer.prototype._parseMappings =\n\t function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t var generatedLine = 1;\n\t var previousGeneratedColumn = 0;\n\t var previousOriginalLine = 0;\n\t var previousOriginalColumn = 0;\n\t var previousSource = 0;\n\t var previousName = 0;\n\t var length = aStr.length;\n\t var index = 0;\n\t var cachedSegments = {};\n\t var temp = {};\n\t var originalMappings = [];\n\t var generatedMappings = [];\n\t var mapping, str, segment, end, value;\n\t\n\t while (index < length) {\n\t if (aStr.charAt(index) === ';') {\n\t generatedLine++;\n\t index++;\n\t previousGeneratedColumn = 0;\n\t }\n\t else if (aStr.charAt(index) === ',') {\n\t index++;\n\t }\n\t else {\n\t mapping = new Mapping();\n\t mapping.generatedLine = generatedLine;\n\t\n\t // Because each offset is encoded relative to the previous one,\n\t // many segments often have the same encoding. We can exploit this\n\t // fact by caching the parsed variable length fields of each segment,\n\t // allowing us to avoid a second parse if we encounter the same\n\t // segment again.\n\t for (end = index; end < length; end++) {\n\t if (this._charIsMappingSeparator(aStr, end)) {\n\t break;\n\t }\n\t }\n\t str = aStr.slice(index, end);\n\t\n\t segment = cachedSegments[str];\n\t if (segment) {\n\t index += str.length;\n\t } else {\n\t segment = [];\n\t while (index < end) {\n\t base64VLQ.decode(aStr, index, temp);\n\t value = temp.value;\n\t index = temp.rest;\n\t segment.push(value);\n\t }\n\t\n\t if (segment.length === 2) {\n\t throw new Error('Found a source, but no line and column');\n\t }\n\t\n\t if (segment.length === 3) {\n\t throw new Error('Found a source and line, but no column');\n\t }\n\t\n\t cachedSegments[str] = segment;\n\t }\n\t\n\t // Generated column.\n\t mapping.generatedColumn = previousGeneratedColumn + segment[0];\n\t previousGeneratedColumn = mapping.generatedColumn;\n\t\n\t if (segment.length > 1) {\n\t // Original source.\n\t mapping.source = previousSource + segment[1];\n\t previousSource += segment[1];\n\t\n\t // Original line.\n\t mapping.originalLine = previousOriginalLine + segment[2];\n\t previousOriginalLine = mapping.originalLine;\n\t // Lines are stored 0-based\n\t mapping.originalLine += 1;\n\t\n\t // Original column.\n\t mapping.originalColumn = previousOriginalColumn + segment[3];\n\t previousOriginalColumn = mapping.originalColumn;\n\t\n\t if (segment.length > 4) {\n\t // Original name.\n\t mapping.name = previousName + segment[4];\n\t previousName += segment[4];\n\t }\n\t }\n\t\n\t generatedMappings.push(mapping);\n\t if (typeof mapping.originalLine === 'number') {\n\t originalMappings.push(mapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t this.__generatedMappings = generatedMappings;\n\t\n\t quickSort(originalMappings, util.compareByOriginalPositions);\n\t this.__originalMappings = originalMappings;\n\t };\n\t\n\t /**\n\t * Find the mapping that best matches the hypothetical \"needle\" mapping that\n\t * we are searching for in the given \"haystack\" of mappings.\n\t */\n\t BasicSourceMapConsumer.prototype._findMapping =\n\t function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n\t aColumnName, aComparator, aBias) {\n\t // To return the position we are searching for, we must first find the\n\t // mapping for the given position and then return the opposite position it\n\t // points to. Because the mappings are sorted, we can use binary search to\n\t // find the best mapping.\n\t\n\t if (aNeedle[aLineName] <= 0) {\n\t throw new TypeError('Line must be greater than or equal to 1, got '\n\t + aNeedle[aLineName]);\n\t }\n\t if (aNeedle[aColumnName] < 0) {\n\t throw new TypeError('Column must be greater than or equal to 0, got '\n\t + aNeedle[aColumnName]);\n\t }\n\t\n\t return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n\t };\n\t\n\t /**\n\t * Compute the last column for each generated mapping. The last column is\n\t * inclusive.\n\t */\n\t BasicSourceMapConsumer.prototype.computeColumnSpans =\n\t function SourceMapConsumer_computeColumnSpans() {\n\t for (var index = 0; index < this._generatedMappings.length; ++index) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t // Mappings do not contain a field for the last generated columnt. We\n\t // can come up with an optimistic estimate, however, by assuming that\n\t // mappings are contiguous (i.e. given two consecutive mappings, the\n\t // first mapping ends where the second one starts).\n\t if (index + 1 < this._generatedMappings.length) {\n\t var nextMapping = this._generatedMappings[index + 1];\n\t\n\t if (mapping.generatedLine === nextMapping.generatedLine) {\n\t mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n\t continue;\n\t }\n\t }\n\t\n\t // The last mapping for each line spans the entire line.\n\t mapping.lastGeneratedColumn = Infinity;\n\t }\n\t };\n\t\n\t /**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\t BasicSourceMapConsumer.prototype.originalPositionFor =\n\t function SourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._generatedMappings,\n\t \"generatedLine\",\n\t \"generatedColumn\",\n\t util.compareByGeneratedPositionsDeflated,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._generatedMappings[index];\n\t\n\t if (mapping.generatedLine === needle.generatedLine) {\n\t var source = util.getArg(mapping, 'source', null);\n\t if (source !== null) {\n\t source = this._sources.at(source);\n\t if (this.sourceRoot != null) {\n\t source = util.join(this.sourceRoot, source);\n\t }\n\t }\n\t var name = util.getArg(mapping, 'name', null);\n\t if (name !== null) {\n\t name = this._names.at(name);\n\t }\n\t return {\n\t source: source,\n\t line: util.getArg(mapping, 'originalLine', null),\n\t column: util.getArg(mapping, 'originalColumn', null),\n\t name: name\n\t };\n\t }\n\t }\n\t\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t };\n\t\n\t /**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\t BasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function BasicSourceMapConsumer_hasContentsOfAllSources() {\n\t if (!this.sourcesContent) {\n\t return false;\n\t }\n\t return this.sourcesContent.length >= this._sources.size() &&\n\t !this.sourcesContent.some(function (sc) { return sc == null; });\n\t };\n\t\n\t /**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\t BasicSourceMapConsumer.prototype.sourceContentFor =\n\t function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t if (!this.sourcesContent) {\n\t return null;\n\t }\n\t\n\t if (this.sourceRoot != null) {\n\t aSource = util.relative(this.sourceRoot, aSource);\n\t }\n\t\n\t if (this._sources.has(aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(aSource)];\n\t }\n\t\n\t var url;\n\t if (this.sourceRoot != null\n\t && (url = util.urlParse(this.sourceRoot))) {\n\t // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n\t // many users. We can help them out when they expect file:// URIs to\n\t // behave like it would if they were running a local HTTP server. See\n\t // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n\t var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n\t if (url.scheme == \"file\"\n\t && this._sources.has(fileUriAbsPath)) {\n\t return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n\t }\n\t\n\t if ((!url.path || url.path == \"/\")\n\t && this._sources.has(\"/\" + aSource)) {\n\t return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n\t }\n\t }\n\t\n\t // This function is used recursively from\n\t // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n\t // don't want to throw if we can't find the source - we just want to\n\t // return null, so we provide a flag to exit gracefully.\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t /**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n\t * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\t BasicSourceMapConsumer.prototype.generatedPositionFor =\n\t function SourceMapConsumer_generatedPositionFor(aArgs) {\n\t var source = util.getArg(aArgs, 'source');\n\t if (this.sourceRoot != null) {\n\t source = util.relative(this.sourceRoot, source);\n\t }\n\t if (!this._sources.has(source)) {\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t }\n\t source = this._sources.indexOf(source);\n\t\n\t var needle = {\n\t source: source,\n\t originalLine: util.getArg(aArgs, 'line'),\n\t originalColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t var index = this._findMapping(\n\t needle,\n\t this._originalMappings,\n\t \"originalLine\",\n\t \"originalColumn\",\n\t util.compareByOriginalPositions,\n\t util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n\t );\n\t\n\t if (index >= 0) {\n\t var mapping = this._originalMappings[index];\n\t\n\t if (mapping.source === needle.source) {\n\t return {\n\t line: util.getArg(mapping, 'generatedLine', null),\n\t column: util.getArg(mapping, 'generatedColumn', null),\n\t lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n\t };\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null,\n\t lastColumn: null\n\t };\n\t };\n\t\n\t exports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\t\n\t /**\n\t * An IndexedSourceMapConsumer instance represents a parsed source map which\n\t * we can query for information. It differs from BasicSourceMapConsumer in\n\t * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n\t * input.\n\t *\n\t * The only parameter is a raw source map (either as a JSON string, or already\n\t * parsed to an object). According to the spec for indexed source maps, they\n\t * have the following attributes:\n\t *\n\t * - version: Which version of the source map spec this map is following.\n\t * - file: Optional. The generated file this source map is associated with.\n\t * - sections: A list of section definitions.\n\t *\n\t * Each value under the \"sections\" field has two fields:\n\t * - offset: The offset into the original specified at which this section\n\t * begins to apply, defined as an object with a \"line\" and \"column\"\n\t * field.\n\t * - map: A source map definition. This source map could also be indexed,\n\t * but doesn't have to be.\n\t *\n\t * Instead of the \"map\" field, it's also possible to have a \"url\" field\n\t * specifying a URL to retrieve a source map from, but that's currently\n\t * unsupported.\n\t *\n\t * Here's an example source map, taken from the source map spec[0], but\n\t * modified to omit a section which uses the \"url\" field.\n\t *\n\t * {\n\t * version : 3,\n\t * file: \"app.js\",\n\t * sections: [{\n\t * offset: {line:100, column:10},\n\t * map: {\n\t * version : 3,\n\t * file: \"section.js\",\n\t * sources: [\"foo.js\", \"bar.js\"],\n\t * names: [\"src\", \"maps\", \"are\", \"fun\"],\n\t * mappings: \"AAAA,E;;ABCDE;\"\n\t * }\n\t * }],\n\t * }\n\t *\n\t * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n\t */\n\t function IndexedSourceMapConsumer(aSourceMap) {\n\t var sourceMap = aSourceMap;\n\t if (typeof aSourceMap === 'string') {\n\t sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n\t }\n\t\n\t var version = util.getArg(sourceMap, 'version');\n\t var sections = util.getArg(sourceMap, 'sections');\n\t\n\t if (version != this._version) {\n\t throw new Error('Unsupported version: ' + version);\n\t }\n\t\n\t this._sources = new ArraySet();\n\t this._names = new ArraySet();\n\t\n\t var lastOffset = {\n\t line: -1,\n\t column: 0\n\t };\n\t this._sections = sections.map(function (s) {\n\t if (s.url) {\n\t // The url field will require support for asynchronicity.\n\t // See https://github.com/mozilla/source-map/issues/16\n\t throw new Error('Support for url field in sections not implemented.');\n\t }\n\t var offset = util.getArg(s, 'offset');\n\t var offsetLine = util.getArg(offset, 'line');\n\t var offsetColumn = util.getArg(offset, 'column');\n\t\n\t if (offsetLine < lastOffset.line ||\n\t (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n\t throw new Error('Section offsets must be ordered and non-overlapping.');\n\t }\n\t lastOffset = offset;\n\t\n\t return {\n\t generatedOffset: {\n\t // The offset fields are 0-based, but we use 1-based indices when\n\t // encoding/decoding from VLQ.\n\t generatedLine: offsetLine + 1,\n\t generatedColumn: offsetColumn + 1\n\t },\n\t consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n\t }\n\t });\n\t }\n\t\n\t IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n\t IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\t\n\t /**\n\t * The version of the source mapping spec that we are consuming.\n\t */\n\t IndexedSourceMapConsumer.prototype._version = 3;\n\t\n\t /**\n\t * The list of original sources.\n\t */\n\t Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n\t get: function () {\n\t var sources = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n\t sources.push(this._sections[i].consumer.sources[j]);\n\t }\n\t }\n\t return sources;\n\t }\n\t });\n\t\n\t /**\n\t * Returns the original source, line, and column information for the generated\n\t * source's line and column positions provided. The only argument is an object\n\t * with the following properties:\n\t *\n\t * - line: The line number in the generated source.\n\t * - column: The column number in the generated source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - source: The original source file, or null.\n\t * - line: The line number in the original source, or null.\n\t * - column: The column number in the original source, or null.\n\t * - name: The original identifier, or null.\n\t */\n\t IndexedSourceMapConsumer.prototype.originalPositionFor =\n\t function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n\t var needle = {\n\t generatedLine: util.getArg(aArgs, 'line'),\n\t generatedColumn: util.getArg(aArgs, 'column')\n\t };\n\t\n\t // Find the section containing the generated position we're trying to map\n\t // to an original position.\n\t var sectionIndex = binarySearch.search(needle, this._sections,\n\t function(needle, section) {\n\t var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n\t if (cmp) {\n\t return cmp;\n\t }\n\t\n\t return (needle.generatedColumn -\n\t section.generatedOffset.generatedColumn);\n\t });\n\t var section = this._sections[sectionIndex];\n\t\n\t if (!section) {\n\t return {\n\t source: null,\n\t line: null,\n\t column: null,\n\t name: null\n\t };\n\t }\n\t\n\t return section.consumer.originalPositionFor({\n\t line: needle.generatedLine -\n\t (section.generatedOffset.generatedLine - 1),\n\t column: needle.generatedColumn -\n\t (section.generatedOffset.generatedLine === needle.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t bias: aArgs.bias\n\t });\n\t };\n\t\n\t /**\n\t * Return true if we have the source content for every source in the source\n\t * map, false otherwise.\n\t */\n\t IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n\t function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n\t return this._sections.every(function (s) {\n\t return s.consumer.hasContentsOfAllSources();\n\t });\n\t };\n\t\n\t /**\n\t * Returns the original source content. The only argument is the url of the\n\t * original source file. Returns null if no original source content is\n\t * available.\n\t */\n\t IndexedSourceMapConsumer.prototype.sourceContentFor =\n\t function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t var content = section.consumer.sourceContentFor(aSource, true);\n\t if (content) {\n\t return content;\n\t }\n\t }\n\t if (nullOnMissing) {\n\t return null;\n\t }\n\t else {\n\t throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n\t }\n\t };\n\t\n\t /**\n\t * Returns the generated line and column information for the original source,\n\t * line, and column positions provided. The only argument is an object with\n\t * the following properties:\n\t *\n\t * - source: The filename of the original source.\n\t * - line: The line number in the original source.\n\t * - column: The column number in the original source.\n\t *\n\t * and an object is returned with the following properties:\n\t *\n\t * - line: The line number in the generated source, or null.\n\t * - column: The column number in the generated source, or null.\n\t */\n\t IndexedSourceMapConsumer.prototype.generatedPositionFor =\n\t function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t\n\t // Only consider this section if the requested source is in the list of\n\t // sources of the consumer.\n\t if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n\t continue;\n\t }\n\t var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n\t if (generatedPosition) {\n\t var ret = {\n\t line: generatedPosition.line +\n\t (section.generatedOffset.generatedLine - 1),\n\t column: generatedPosition.column +\n\t (section.generatedOffset.generatedLine === generatedPosition.line\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0)\n\t };\n\t return ret;\n\t }\n\t }\n\t\n\t return {\n\t line: null,\n\t column: null\n\t };\n\t };\n\t\n\t /**\n\t * Parse the mappings in a string in to a data structure which we can easily\n\t * query (the ordered arrays in the `this.__generatedMappings` and\n\t * `this.__originalMappings` properties).\n\t */\n\t IndexedSourceMapConsumer.prototype._parseMappings =\n\t function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n\t this.__generatedMappings = [];\n\t this.__originalMappings = [];\n\t for (var i = 0; i < this._sections.length; i++) {\n\t var section = this._sections[i];\n\t var sectionMappings = section.consumer._generatedMappings;\n\t for (var j = 0; j < sectionMappings.length; j++) {\n\t var mapping = sectionMappings[j];\n\t\n\t var source = section.consumer._sources.at(mapping.source);\n\t if (section.consumer.sourceRoot !== null) {\n\t source = util.join(section.consumer.sourceRoot, source);\n\t }\n\t this._sources.add(source);\n\t source = this._sources.indexOf(source);\n\t\n\t var name = section.consumer._names.at(mapping.name);\n\t this._names.add(name);\n\t name = this._names.indexOf(name);\n\t\n\t // The mappings coming from the consumer for the section have\n\t // generated positions relative to the start of the section, so we\n\t // need to offset them to be relative to the start of the concatenated\n\t // generated file.\n\t var adjustedMapping = {\n\t source: source,\n\t generatedLine: mapping.generatedLine +\n\t (section.generatedOffset.generatedLine - 1),\n\t generatedColumn: mapping.generatedColumn +\n\t (section.generatedOffset.generatedLine === mapping.generatedLine\n\t ? section.generatedOffset.generatedColumn - 1\n\t : 0),\n\t originalLine: mapping.originalLine,\n\t originalColumn: mapping.originalColumn,\n\t name: name\n\t };\n\t\n\t this.__generatedMappings.push(adjustedMapping);\n\t if (typeof adjustedMapping.originalLine === 'number') {\n\t this.__originalMappings.push(adjustedMapping);\n\t }\n\t }\n\t }\n\t\n\t quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n\t quickSort(this.__originalMappings, util.compareByOriginalPositions);\n\t };\n\t\n\t exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n\t}\n\n\n/***/ },\n/* 8 */\n/***/ function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t exports.GREATEST_LOWER_BOUND = 1;\n\t exports.LEAST_UPPER_BOUND = 2;\n\t\n\t /**\n\t * Recursive implementation of binary search.\n\t *\n\t * @param aLow Indices here and lower do not contain the needle.\n\t * @param aHigh Indices here and higher do not contain the needle.\n\t * @param aNeedle The element being searched for.\n\t * @param aHaystack The non-empty array being searched.\n\t * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t */\n\t function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n\t // This function terminates when one of the following is true:\n\t //\n\t // 1. We find the exact element we are looking for.\n\t //\n\t // 2. We did not find the exact element, but we can return the index of\n\t // the next-closest element.\n\t //\n\t // 3. We did not find the exact element, and there is no next-closest\n\t // element than the one we are searching for, so we return -1.\n\t var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n\t var cmp = aCompare(aNeedle, aHaystack[mid], true);\n\t if (cmp === 0) {\n\t // Found the element we are looking for.\n\t return mid;\n\t }\n\t else if (cmp > 0) {\n\t // Our needle is greater than aHaystack[mid].\n\t if (aHigh - mid > 1) {\n\t // The element is in the upper half.\n\t return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // The exact needle element was not found in this haystack. Determine if\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return aHigh < aHaystack.length ? aHigh : -1;\n\t } else {\n\t return mid;\n\t }\n\t }\n\t else {\n\t // Our needle is less than aHaystack[mid].\n\t if (mid - aLow > 1) {\n\t // The element is in the lower half.\n\t return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n\t }\n\t\n\t // we are in termination case (3) or (2) and return the appropriate thing.\n\t if (aBias == exports.LEAST_UPPER_BOUND) {\n\t return mid;\n\t } else {\n\t return aLow < 0 ? -1 : aLow;\n\t }\n\t }\n\t }\n\t\n\t /**\n\t * This is an implementation of binary search which will always try and return\n\t * the index of the closest element if there is no exact hit. This is because\n\t * mappings between original and generated line/col pairs are single points,\n\t * and there is an implicit region between each of them, so a miss just means\n\t * that you aren't on the very start of a region.\n\t *\n\t * @param aNeedle The element you are looking for.\n\t * @param aHaystack The array that is being searched.\n\t * @param aCompare A function which takes the needle and an element in the\n\t * array and returns -1, 0, or 1 depending on whether the needle is less\n\t * than, equal to, or greater than the element, respectively.\n\t * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n\t * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n\t * closest element that is smaller than or greater than the one we are\n\t * searching for, respectively, if the exact element cannot be found.\n\t * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n\t */\n\t exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n\t if (aHaystack.length === 0) {\n\t return -1;\n\t }\n\t\n\t var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n\t aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n\t if (index < 0) {\n\t return -1;\n\t }\n\t\n\t // We have found either the exact element, or the next-closest element than\n\t // the one we are searching for. However, there may be more than one such\n\t // element. Make sure we always return the smallest of these.\n\t while (index - 1 >= 0) {\n\t if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n\t break;\n\t }\n\t --index;\n\t }\n\t\n\t return index;\n\t };\n\t}\n\n\n/***/ },\n/* 9 */\n/***/ function(module, exports) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t // It turns out that some (most?) JavaScript engines don't self-host\n\t // `Array.prototype.sort`. This makes sense because C++ will likely remain\n\t // faster than JS when doing raw CPU-intensive sorting. However, when using a\n\t // custom comparator function, calling back and forth between the VM's C++ and\n\t // JIT'd JS is rather slow *and* loses JIT type information, resulting in\n\t // worse generated code for the comparator function than would be optimal. In\n\t // fact, when sorting with a comparator, these costs outweigh the benefits of\n\t // sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n\t // a ~3500ms mean speed-up in `bench/bench.html`.\n\t\n\t /**\n\t * Swap the elements indexed by `x` and `y` in the array `ary`.\n\t *\n\t * @param {Array} ary\n\t * The array.\n\t * @param {Number} x\n\t * The index of the first item.\n\t * @param {Number} y\n\t * The index of the second item.\n\t */\n\t function swap(ary, x, y) {\n\t var temp = ary[x];\n\t ary[x] = ary[y];\n\t ary[y] = temp;\n\t }\n\t\n\t /**\n\t * Returns a random integer within the range `low .. high` inclusive.\n\t *\n\t * @param {Number} low\n\t * The lower bound on the range.\n\t * @param {Number} high\n\t * The upper bound on the range.\n\t */\n\t function randomIntInRange(low, high) {\n\t return Math.round(low + (Math.random() * (high - low)));\n\t }\n\t\n\t /**\n\t * The Quick Sort algorithm.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t * @param {Number} p\n\t * Start index of the array\n\t * @param {Number} r\n\t * End index of the array\n\t */\n\t function doQuickSort(ary, comparator, p, r) {\n\t // If our lower bound is less than our upper bound, we (1) partition the\n\t // array into two pieces and (2) recurse on each half. If it is not, this is\n\t // the empty array and our base case.\n\t\n\t if (p < r) {\n\t // (1) Partitioning.\n\t //\n\t // The partitioning chooses a pivot between `p` and `r` and moves all\n\t // elements that are less than or equal to the pivot to the before it, and\n\t // all the elements that are greater than it after it. The effect is that\n\t // once partition is done, the pivot is in the exact place it will be when\n\t // the array is put in sorted order, and it will not need to be moved\n\t // again. This runs in O(n) time.\n\t\n\t // Always choose a random pivot so that an input array which is reverse\n\t // sorted does not cause O(n^2) running time.\n\t var pivotIndex = randomIntInRange(p, r);\n\t var i = p - 1;\n\t\n\t swap(ary, pivotIndex, r);\n\t var pivot = ary[r];\n\t\n\t // Immediately after `j` is incremented in this loop, the following hold\n\t // true:\n\t //\n\t // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n\t //\n\t // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n\t for (var j = p; j < r; j++) {\n\t if (comparator(ary[j], pivot) <= 0) {\n\t i += 1;\n\t swap(ary, i, j);\n\t }\n\t }\n\t\n\t swap(ary, i + 1, j);\n\t var q = i + 1;\n\t\n\t // (2) Recurse on each half.\n\t\n\t doQuickSort(ary, comparator, p, q - 1);\n\t doQuickSort(ary, comparator, q + 1, r);\n\t }\n\t }\n\t\n\t /**\n\t * Sort the given array in-place with the given comparator function.\n\t *\n\t * @param {Array} ary\n\t * An array to sort.\n\t * @param {function} comparator\n\t * Function to use to compare two items.\n\t */\n\t exports.quickSort = function (ary, comparator) {\n\t doQuickSort(ary, comparator, 0, ary.length - 1);\n\t };\n\t}\n\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* -*- Mode: js; js-indent-level: 2; -*- */\n\t/*\n\t * Copyright 2011 Mozilla Foundation and contributors\n\t * Licensed under the New BSD license. See LICENSE or:\n\t * http://opensource.org/licenses/BSD-3-Clause\n\t */\n\t{\n\t var SourceMapGenerator = __webpack_require__(1).SourceMapGenerator;\n\t var util = __webpack_require__(4);\n\t\n\t // Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n\t // operating systems these days (capturing the result).\n\t var REGEX_NEWLINE = /(\\r?\\n)/;\n\t\n\t // Newline character code for charCodeAt() comparisons\n\t var NEWLINE_CODE = 10;\n\t\n\t // Private symbol for identifying `SourceNode`s when multiple versions of\n\t // the source-map library are loaded. This MUST NOT CHANGE across\n\t // versions!\n\t var isSourceNode = \"$$$isSourceNode$$$\";\n\t\n\t /**\n\t * SourceNodes provide a way to abstract over interpolating/concatenating\n\t * snippets of generated JavaScript source code while maintaining the line and\n\t * column information associated with the original source code.\n\t *\n\t * @param aLine The original line number.\n\t * @param aColumn The original column number.\n\t * @param aSource The original source's filename.\n\t * @param aChunks Optional. An array of strings which are snippets of\n\t * generated JS, or other SourceNodes.\n\t * @param aName The original identifier.\n\t */\n\t function SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n\t this.children = [];\n\t this.sourceContents = {};\n\t this.line = aLine == null ? null : aLine;\n\t this.column = aColumn == null ? null : aColumn;\n\t this.source = aSource == null ? null : aSource;\n\t this.name = aName == null ? null : aName;\n\t this[isSourceNode] = true;\n\t if (aChunks != null) this.add(aChunks);\n\t }\n\t\n\t /**\n\t * Creates a SourceNode from generated code and a SourceMapConsumer.\n\t *\n\t * @param aGeneratedCode The generated code\n\t * @param aSourceMapConsumer The SourceMap for the generated code\n\t * @param aRelativePath Optional. The path that relative sources in the\n\t * SourceMapConsumer should be relative to.\n\t */\n\t SourceNode.fromStringWithSourceMap =\n\t function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n\t // The SourceNode we want to fill with the generated code\n\t // and the SourceMap\n\t var node = new SourceNode();\n\t\n\t // All even indices of this array are one line of the generated code,\n\t // while all odd indices are the newlines between two adjacent lines\n\t // (since `REGEX_NEWLINE` captures its match).\n\t // Processed fragments are removed from this array, by calling `shiftNextLine`.\n\t var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n\t var shiftNextLine = function() {\n\t var lineContents = remainingLines.shift();\n\t // The last line of a file might not have a newline.\n\t var newLine = remainingLines.shift() || \"\";\n\t return lineContents + newLine;\n\t };\n\t\n\t // We need to remember the position of \"remainingLines\"\n\t var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\t\n\t // The generate SourceNodes we need a code range.\n\t // To extract it current and last mapping is used.\n\t // Here we store the last mapping.\n\t var lastMapping = null;\n\t\n\t aSourceMapConsumer.eachMapping(function (mapping) {\n\t if (lastMapping !== null) {\n\t // We add the code from \"lastMapping\" to \"mapping\":\n\t // First check if there is a new line in between.\n\t if (lastGeneratedLine < mapping.generatedLine) {\n\t // Associate first line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t lastGeneratedLine++;\n\t lastGeneratedColumn = 0;\n\t // The remaining code is added without mapping\n\t } else {\n\t // There is no new line in between.\n\t // Associate the code between \"lastGeneratedColumn\" and\n\t // \"mapping.generatedColumn\" with \"lastMapping\"\n\t var nextLine = remainingLines[0];\n\t var code = nextLine.substr(0, mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t remainingLines[0] = nextLine.substr(mapping.generatedColumn -\n\t lastGeneratedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t addMappingWithCode(lastMapping, code);\n\t // No more remaining code, continue\n\t lastMapping = mapping;\n\t return;\n\t }\n\t }\n\t // We add the generated code until the first mapping\n\t // to the SourceNode without any mapping.\n\t // Each line is added as separate string.\n\t while (lastGeneratedLine < mapping.generatedLine) {\n\t node.add(shiftNextLine());\n\t lastGeneratedLine++;\n\t }\n\t if (lastGeneratedColumn < mapping.generatedColumn) {\n\t var nextLine = remainingLines[0];\n\t node.add(nextLine.substr(0, mapping.generatedColumn));\n\t remainingLines[0] = nextLine.substr(mapping.generatedColumn);\n\t lastGeneratedColumn = mapping.generatedColumn;\n\t }\n\t lastMapping = mapping;\n\t }, this);\n\t // We have processed all mappings.\n\t if (remainingLines.length > 0) {\n\t if (lastMapping) {\n\t // Associate the remaining code in the current line with \"lastMapping\"\n\t addMappingWithCode(lastMapping, shiftNextLine());\n\t }\n\t // and add the remaining lines without any mapping\n\t node.add(remainingLines.join(\"\"));\n\t }\n\t\n\t // Copy sourcesContent into SourceNode\n\t aSourceMapConsumer.sources.forEach(function (sourceFile) {\n\t var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n\t if (content != null) {\n\t if (aRelativePath != null) {\n\t sourceFile = util.join(aRelativePath, sourceFile);\n\t }\n\t node.setSourceContent(sourceFile, content);\n\t }\n\t });\n\t\n\t return node;\n\t\n\t function addMappingWithCode(mapping, code) {\n\t if (mapping === null || mapping.source === undefined) {\n\t node.add(code);\n\t } else {\n\t var source = aRelativePath\n\t ? util.join(aRelativePath, mapping.source)\n\t : mapping.source;\n\t node.add(new SourceNode(mapping.originalLine,\n\t mapping.originalColumn,\n\t source,\n\t code,\n\t mapping.name));\n\t }\n\t }\n\t };\n\t\n\t /**\n\t * Add a chunk of generated JS to this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\t SourceNode.prototype.add = function SourceNode_add(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t aChunk.forEach(function (chunk) {\n\t this.add(chunk);\n\t }, this);\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t if (aChunk) {\n\t this.children.push(aChunk);\n\t }\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t };\n\t\n\t /**\n\t * Add a chunk of generated JS to the beginning of this source node.\n\t *\n\t * @param aChunk A string snippet of generated JS code, another instance of\n\t * SourceNode, or an array where each member is one of those things.\n\t */\n\t SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n\t if (Array.isArray(aChunk)) {\n\t for (var i = aChunk.length-1; i >= 0; i--) {\n\t this.prepend(aChunk[i]);\n\t }\n\t }\n\t else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n\t this.children.unshift(aChunk);\n\t }\n\t else {\n\t throw new TypeError(\n\t \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n\t );\n\t }\n\t return this;\n\t };\n\t\n\t /**\n\t * Walk over the tree of JS snippets in this node and its children. The\n\t * walking function is called once for each snippet of JS and is passed that\n\t * snippet and the its original associated source's line/column location.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\t SourceNode.prototype.walk = function SourceNode_walk(aFn) {\n\t var chunk;\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t chunk = this.children[i];\n\t if (chunk[isSourceNode]) {\n\t chunk.walk(aFn);\n\t }\n\t else {\n\t if (chunk !== '') {\n\t aFn(chunk, { source: this.source,\n\t line: this.line,\n\t column: this.column,\n\t name: this.name });\n\t }\n\t }\n\t }\n\t };\n\t\n\t /**\n\t * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n\t * each of `this.children`.\n\t *\n\t * @param aSep The separator.\n\t */\n\t SourceNode.prototype.join = function SourceNode_join(aSep) {\n\t var newChildren;\n\t var i;\n\t var len = this.children.length;\n\t if (len > 0) {\n\t newChildren = [];\n\t for (i = 0; i < len-1; i++) {\n\t newChildren.push(this.children[i]);\n\t newChildren.push(aSep);\n\t }\n\t newChildren.push(this.children[i]);\n\t this.children = newChildren;\n\t }\n\t return this;\n\t };\n\t\n\t /**\n\t * Call String.prototype.replace on the very right-most source snippet. Useful\n\t * for trimming whitespace from the end of a source node, etc.\n\t *\n\t * @param aPattern The pattern to replace.\n\t * @param aReplacement The thing to replace the pattern with.\n\t */\n\t SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n\t var lastChild = this.children[this.children.length - 1];\n\t if (lastChild[isSourceNode]) {\n\t lastChild.replaceRight(aPattern, aReplacement);\n\t }\n\t else if (typeof lastChild === 'string') {\n\t this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n\t }\n\t else {\n\t this.children.push(''.replace(aPattern, aReplacement));\n\t }\n\t return this;\n\t };\n\t\n\t /**\n\t * Set the source content for a source file. This will be added to the SourceMapGenerator\n\t * in the sourcesContent field.\n\t *\n\t * @param aSourceFile The filename of the source file\n\t * @param aSourceContent The content of the source file\n\t */\n\t SourceNode.prototype.setSourceContent =\n\t function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n\t this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n\t };\n\t\n\t /**\n\t * Walk over the tree of SourceNodes. The walking function is called for each\n\t * source file content and is passed the filename and source content.\n\t *\n\t * @param aFn The traversal function.\n\t */\n\t SourceNode.prototype.walkSourceContents =\n\t function SourceNode_walkSourceContents(aFn) {\n\t for (var i = 0, len = this.children.length; i < len; i++) {\n\t if (this.children[i][isSourceNode]) {\n\t this.children[i].walkSourceContents(aFn);\n\t }\n\t }\n\t\n\t var sources = Object.keys(this.sourceContents);\n\t for (var i = 0, len = sources.length; i < len; i++) {\n\t aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n\t }\n\t };\n\t\n\t /**\n\t * Return the string representation of this source node. Walks over the tree\n\t * and concatenates all the various snippets together to one string.\n\t */\n\t SourceNode.prototype.toString = function SourceNode_toString() {\n\t var str = \"\";\n\t this.walk(function (chunk) {\n\t str += chunk;\n\t });\n\t return str;\n\t };\n\t\n\t /**\n\t * Returns the string representation of this source node along with a source\n\t * map.\n\t */\n\t SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n\t var generated = {\n\t code: \"\",\n\t line: 1,\n\t column: 0\n\t };\n\t var map = new SourceMapGenerator(aArgs);\n\t var sourceMappingActive = false;\n\t var lastOriginalSource = null;\n\t var lastOriginalLine = null;\n\t var lastOriginalColumn = null;\n\t var lastOriginalName = null;\n\t this.walk(function (chunk, original) {\n\t generated.code += chunk;\n\t if (original.source !== null\n\t && original.line !== null\n\t && original.column !== null) {\n\t if(lastOriginalSource !== original.source\n\t || lastOriginalLine !== original.line\n\t || lastOriginalColumn !== original.column\n\t || lastOriginalName !== original.name) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t lastOriginalSource = original.source;\n\t lastOriginalLine = original.line;\n\t lastOriginalColumn = original.column;\n\t lastOriginalName = original.name;\n\t sourceMappingActive = true;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t }\n\t });\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t }\n\t for (var idx = 0, length = chunk.length; idx < length; idx++) {\n\t if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n\t generated.line++;\n\t generated.column = 0;\n\t // Mappings end at eol\n\t if (idx + 1 === length) {\n\t lastOriginalSource = null;\n\t sourceMappingActive = false;\n\t } else if (sourceMappingActive) {\n\t map.addMapping({\n\t source: original.source,\n\t original: {\n\t line: original.line,\n\t column: original.column\n\t },\n\t generated: {\n\t line: generated.line,\n\t column: generated.column\n\t },\n\t name: original.name\n\t });\n\t }\n\t } else {\n\t generated.column++;\n\t }\n\t }\n\t });\n\t this.walkSourceContents(function (sourceFile, sourceContent) {\n\t map.setSourceContent(sourceFile, sourceContent);\n\t });\n\t\n\t return { code: generated.code, map: map };\n\t };\n\t\n\t exports.SourceNode = SourceNode;\n\t}\n\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** source-map.min.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap a7d787c028005295f8d2\n **/","/*\n * Copyright 2009-2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE.txt or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\nexports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;\nexports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;\nexports.SourceNode = require('./lib/source-node').SourceNode;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./source-map.js\n ** module id = 0\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n var base64VLQ = require('./base64-vlq');\n var util = require('./util');\n var ArraySet = require('./array-set').ArraySet;\n var MappingList = require('./mapping-list').MappingList;\n\n /**\n * An instance of the SourceMapGenerator represents a source map which is\n * being built incrementally. You may pass an object with the following\n * properties:\n *\n * - file: The filename of the generated source.\n * - sourceRoot: A root for all relative URLs in this source map.\n */\n function SourceMapGenerator(aArgs) {\n if (!aArgs) {\n aArgs = {};\n }\n this._file = util.getArg(aArgs, 'file', null);\n this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);\n this._skipValidation = util.getArg(aArgs, 'skipValidation', false);\n this._sources = new ArraySet();\n this._names = new ArraySet();\n this._mappings = new MappingList();\n this._sourcesContents = null;\n }\n\n SourceMapGenerator.prototype._version = 3;\n\n /**\n * Creates a new SourceMapGenerator based on a SourceMapConsumer\n *\n * @param aSourceMapConsumer The SourceMap.\n */\n SourceMapGenerator.fromSourceMap =\n function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {\n var sourceRoot = aSourceMapConsumer.sourceRoot;\n var generator = new SourceMapGenerator({\n file: aSourceMapConsumer.file,\n sourceRoot: sourceRoot\n });\n aSourceMapConsumer.eachMapping(function (mapping) {\n var newMapping = {\n generated: {\n line: mapping.generatedLine,\n column: mapping.generatedColumn\n }\n };\n\n if (mapping.source != null) {\n newMapping.source = mapping.source;\n if (sourceRoot != null) {\n newMapping.source = util.relative(sourceRoot, newMapping.source);\n }\n\n newMapping.original = {\n line: mapping.originalLine,\n column: mapping.originalColumn\n };\n\n if (mapping.name != null) {\n newMapping.name = mapping.name;\n }\n }\n\n generator.addMapping(newMapping);\n });\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n generator.setSourceContent(sourceFile, content);\n }\n });\n return generator;\n };\n\n /**\n * Add a single mapping from original source line and column to the generated\n * source's line and column for this source map being created. The mapping\n * object should have the following properties:\n *\n * - generated: An object with the generated line and column positions.\n * - original: An object with the original line and column positions.\n * - source: The original source file (relative to the sourceRoot).\n * - name: An optional original token name for this mapping.\n */\n SourceMapGenerator.prototype.addMapping =\n function SourceMapGenerator_addMapping(aArgs) {\n var generated = util.getArg(aArgs, 'generated');\n var original = util.getArg(aArgs, 'original', null);\n var source = util.getArg(aArgs, 'source', null);\n var name = util.getArg(aArgs, 'name', null);\n\n if (!this._skipValidation) {\n this._validateMapping(generated, original, source, name);\n }\n\n if (source != null && !this._sources.has(source)) {\n this._sources.add(source);\n }\n\n if (name != null && !this._names.has(name)) {\n this._names.add(name);\n }\n\n this._mappings.add({\n generatedLine: generated.line,\n generatedColumn: generated.column,\n originalLine: original != null && original.line,\n originalColumn: original != null && original.column,\n source: source,\n name: name\n });\n };\n\n /**\n * Set the source content for a source file.\n */\n SourceMapGenerator.prototype.setSourceContent =\n function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {\n var source = aSourceFile;\n if (this._sourceRoot != null) {\n source = util.relative(this._sourceRoot, source);\n }\n\n if (aSourceContent != null) {\n // Add the source content to the _sourcesContents map.\n // Create a new _sourcesContents map if the property is null.\n if (!this._sourcesContents) {\n this._sourcesContents = {};\n }\n this._sourcesContents[util.toSetString(source)] = aSourceContent;\n } else if (this._sourcesContents) {\n // Remove the source file from the _sourcesContents map.\n // If the _sourcesContents map is empty, set the property to null.\n delete this._sourcesContents[util.toSetString(source)];\n if (Object.keys(this._sourcesContents).length === 0) {\n this._sourcesContents = null;\n }\n }\n };\n\n /**\n * Applies the mappings of a sub-source-map for a specific source file to the\n * source map being generated. Each mapping to the supplied source file is\n * rewritten using the supplied source map. Note: The resolution for the\n * resulting mappings is the minimium of this map and the supplied map.\n *\n * @param aSourceMapConsumer The source map to be applied.\n * @param aSourceFile Optional. The filename of the source file.\n * If omitted, SourceMapConsumer's file property will be used.\n * @param aSourceMapPath Optional. The dirname of the path to the source map\n * to be applied. If relative, it is relative to the SourceMapConsumer.\n * This parameter is needed when the two source maps aren't in the same\n * directory, and the source map to be applied contains relative source\n * paths. If so, those relative source paths need to be rewritten\n * relative to the SourceMapGenerator.\n */\n SourceMapGenerator.prototype.applySourceMap =\n function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {\n var sourceFile = aSourceFile;\n // If aSourceFile is omitted, we will use the file property of the SourceMap\n if (aSourceFile == null) {\n if (aSourceMapConsumer.file == null) {\n throw new Error(\n 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +\n 'or the source map\\'s \"file\" property. Both were omitted.'\n );\n }\n sourceFile = aSourceMapConsumer.file;\n }\n var sourceRoot = this._sourceRoot;\n // Make \"sourceFile\" relative if an absolute Url is passed.\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n // Applying the SourceMap can add and remove items from the sources and\n // the names array.\n var newSources = new ArraySet();\n var newNames = new ArraySet();\n\n // Find mappings for the \"sourceFile\"\n this._mappings.unsortedForEach(function (mapping) {\n if (mapping.source === sourceFile && mapping.originalLine != null) {\n // Check if it can be mapped by the source map, then update the mapping.\n var original = aSourceMapConsumer.originalPositionFor({\n line: mapping.originalLine,\n column: mapping.originalColumn\n });\n if (original.source != null) {\n // Copy mapping\n mapping.source = original.source;\n if (aSourceMapPath != null) {\n mapping.source = util.join(aSourceMapPath, mapping.source)\n }\n if (sourceRoot != null) {\n mapping.source = util.relative(sourceRoot, mapping.source);\n }\n mapping.originalLine = original.line;\n mapping.originalColumn = original.column;\n if (original.name != null) {\n mapping.name = original.name;\n }\n }\n }\n\n var source = mapping.source;\n if (source != null && !newSources.has(source)) {\n newSources.add(source);\n }\n\n var name = mapping.name;\n if (name != null && !newNames.has(name)) {\n newNames.add(name);\n }\n\n }, this);\n this._sources = newSources;\n this._names = newNames;\n\n // Copy sourcesContents of applied map.\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aSourceMapPath != null) {\n sourceFile = util.join(aSourceMapPath, sourceFile);\n }\n if (sourceRoot != null) {\n sourceFile = util.relative(sourceRoot, sourceFile);\n }\n this.setSourceContent(sourceFile, content);\n }\n }, this);\n };\n\n /**\n * A mapping can have one of the three levels of data:\n *\n * 1. Just the generated position.\n * 2. The Generated position, original position, and original source.\n * 3. Generated and original position, original source, as well as a name\n * token.\n *\n * To maintain consistency, we validate that any new mapping being added falls\n * in to one of these categories.\n */\n SourceMapGenerator.prototype._validateMapping =\n function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,\n aName) {\n if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aGenerated.line > 0 && aGenerated.column >= 0\n && !aOriginal && !aSource && !aName) {\n // Case 1.\n return;\n }\n else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated\n && aOriginal && 'line' in aOriginal && 'column' in aOriginal\n && aGenerated.line > 0 && aGenerated.column >= 0\n && aOriginal.line > 0 && aOriginal.column >= 0\n && aSource) {\n // Cases 2 and 3.\n return;\n }\n else {\n throw new Error('Invalid mapping: ' + JSON.stringify({\n generated: aGenerated,\n source: aSource,\n original: aOriginal,\n name: aName\n }));\n }\n };\n\n /**\n * Serialize the accumulated mappings in to the stream of base 64 VLQs\n * specified by the source map format.\n */\n SourceMapGenerator.prototype._serializeMappings =\n function SourceMapGenerator_serializeMappings() {\n var previousGeneratedColumn = 0;\n var previousGeneratedLine = 1;\n var previousOriginalColumn = 0;\n var previousOriginalLine = 0;\n var previousName = 0;\n var previousSource = 0;\n var result = '';\n var mapping;\n var nameIdx;\n var sourceIdx;\n\n var mappings = this._mappings.toArray();\n for (var i = 0, len = mappings.length; i < len; i++) {\n mapping = mappings[i];\n\n if (mapping.generatedLine !== previousGeneratedLine) {\n previousGeneratedColumn = 0;\n while (mapping.generatedLine !== previousGeneratedLine) {\n result += ';';\n previousGeneratedLine++;\n }\n }\n else {\n if (i > 0) {\n if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {\n continue;\n }\n result += ',';\n }\n }\n\n result += base64VLQ.encode(mapping.generatedColumn\n - previousGeneratedColumn);\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (mapping.source != null) {\n sourceIdx = this._sources.indexOf(mapping.source);\n result += base64VLQ.encode(sourceIdx - previousSource);\n previousSource = sourceIdx;\n\n // lines are stored 0-based in SourceMap spec version 3\n result += base64VLQ.encode(mapping.originalLine - 1\n - previousOriginalLine);\n previousOriginalLine = mapping.originalLine - 1;\n\n result += base64VLQ.encode(mapping.originalColumn\n - previousOriginalColumn);\n previousOriginalColumn = mapping.originalColumn;\n\n if (mapping.name != null) {\n nameIdx = this._names.indexOf(mapping.name);\n result += base64VLQ.encode(nameIdx - previousName);\n previousName = nameIdx;\n }\n }\n }\n\n return result;\n };\n\n SourceMapGenerator.prototype._generateSourcesContent =\n function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {\n return aSources.map(function (source) {\n if (!this._sourcesContents) {\n return null;\n }\n if (aSourceRoot != null) {\n source = util.relative(aSourceRoot, source);\n }\n var key = util.toSetString(source);\n return Object.prototype.hasOwnProperty.call(this._sourcesContents,\n key)\n ? this._sourcesContents[key]\n : null;\n }, this);\n };\n\n /**\n * Externalize the source map.\n */\n SourceMapGenerator.prototype.toJSON =\n function SourceMapGenerator_toJSON() {\n var map = {\n version: this._version,\n sources: this._sources.toArray(),\n names: this._names.toArray(),\n mappings: this._serializeMappings()\n };\n if (this._file != null) {\n map.file = this._file;\n }\n if (this._sourceRoot != null) {\n map.sourceRoot = this._sourceRoot;\n }\n if (this._sourcesContents) {\n map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);\n }\n\n return map;\n };\n\n /**\n * Render the source map being generated to a string.\n */\n SourceMapGenerator.prototype.toString =\n function SourceMapGenerator_toString() {\n return JSON.stringify(this.toJSON());\n };\n\n exports.SourceMapGenerator = SourceMapGenerator;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/source-map-generator.js\n ** module id = 1\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n *\n * Based on the Base 64 VLQ implementation in Closure Compiler:\n * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java\n *\n * Copyright 2011 The Closure Compiler Authors. All rights reserved.\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and/or other materials provided\n * with the distribution.\n * * Neither the name of Google Inc. nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n{\n var base64 = require('./base64');\n\n // A single base 64 digit can contain 6 bits of data. For the base 64 variable\n // length quantities we use in the source map spec, the first bit is the sign,\n // the next four bits are the actual value, and the 6th bit is the\n // continuation bit. The continuation bit tells us whether there are more\n // digits in this value following this digit.\n //\n // Continuation\n // | Sign\n // | |\n // V V\n // 101011\n\n var VLQ_BASE_SHIFT = 5;\n\n // binary: 100000\n var VLQ_BASE = 1 << VLQ_BASE_SHIFT;\n\n // binary: 011111\n var VLQ_BASE_MASK = VLQ_BASE - 1;\n\n // binary: 100000\n var VLQ_CONTINUATION_BIT = VLQ_BASE;\n\n /**\n * Converts from a two-complement value to a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)\n * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)\n */\n function toVLQSigned(aValue) {\n return aValue < 0\n ? ((-aValue) << 1) + 1\n : (aValue << 1) + 0;\n }\n\n /**\n * Converts to a two-complement value from a value where the sign bit is\n * placed in the least significant bit. For example, as decimals:\n * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1\n * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2\n */\n function fromVLQSigned(aValue) {\n var isNegative = (aValue & 1) === 1;\n var shifted = aValue >> 1;\n return isNegative\n ? -shifted\n : shifted;\n }\n\n /**\n * Returns the base 64 VLQ encoded value.\n */\n exports.encode = function base64VLQ_encode(aValue) {\n var encoded = \"\";\n var digit;\n\n var vlq = toVLQSigned(aValue);\n\n do {\n digit = vlq & VLQ_BASE_MASK;\n vlq >>>= VLQ_BASE_SHIFT;\n if (vlq > 0) {\n // There are still more digits in this value, so we must make sure the\n // continuation bit is marked.\n digit |= VLQ_CONTINUATION_BIT;\n }\n encoded += base64.encode(digit);\n } while (vlq > 0);\n\n return encoded;\n };\n\n /**\n * Decodes the next base 64 VLQ value from the given string and returns the\n * value and the rest of the string via the out parameter.\n */\n exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {\n var strLen = aStr.length;\n var result = 0;\n var shift = 0;\n var continuation, digit;\n\n do {\n if (aIndex >= strLen) {\n throw new Error(\"Expected more digits in base 64 VLQ value.\");\n }\n\n digit = base64.decode(aStr.charCodeAt(aIndex++));\n if (digit === -1) {\n throw new Error(\"Invalid base64 digit: \" + aStr.charAt(aIndex - 1));\n }\n\n continuation = !!(digit & VLQ_CONTINUATION_BIT);\n digit &= VLQ_BASE_MASK;\n result = result + (digit << shift);\n shift += VLQ_BASE_SHIFT;\n } while (continuation);\n\n aOutParam.value = fromVLQSigned(result);\n aOutParam.rest = aIndex;\n };\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/base64-vlq.js\n ** module id = 2\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');\n\n /**\n * Encode an integer in the range of 0 to 63 to a single base 64 digit.\n */\n exports.encode = function (number) {\n if (0 <= number && number < intToCharMap.length) {\n return intToCharMap[number];\n }\n throw new TypeError(\"Must be between 0 and 63: \" + number);\n };\n\n /**\n * Decode a single base 64 character code digit to an integer. Returns -1 on\n * failure.\n */\n exports.decode = function (charCode) {\n var bigA = 65; // 'A'\n var bigZ = 90; // 'Z'\n\n var littleA = 97; // 'a'\n var littleZ = 122; // 'z'\n\n var zero = 48; // '0'\n var nine = 57; // '9'\n\n var plus = 43; // '+'\n var slash = 47; // '/'\n\n var littleOffset = 26;\n var numberOffset = 52;\n\n // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n if (bigA <= charCode && charCode <= bigZ) {\n return (charCode - bigA);\n }\n\n // 26 - 51: abcdefghijklmnopqrstuvwxyz\n if (littleA <= charCode && charCode <= littleZ) {\n return (charCode - littleA + littleOffset);\n }\n\n // 52 - 61: 0123456789\n if (zero <= charCode && charCode <= nine) {\n return (charCode - zero + numberOffset);\n }\n\n // 62: +\n if (charCode == plus) {\n return 62;\n }\n\n // 63: /\n if (charCode == slash) {\n return 63;\n }\n\n // Invalid base64 digit.\n return -1;\n };\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/base64.js\n ** module id = 3\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n /**\n * This is a helper function for getting values from parameter/options\n * objects.\n *\n * @param args The object we are extracting values from\n * @param name The name of the property we are getting.\n * @param defaultValue An optional value to return if the property is missing\n * from the object. If this is not specified and the property is missing, an\n * error will be thrown.\n */\n function getArg(aArgs, aName, aDefaultValue) {\n if (aName in aArgs) {\n return aArgs[aName];\n } else if (arguments.length === 3) {\n return aDefaultValue;\n } else {\n throw new Error('\"' + aName + '\" is a required argument.');\n }\n }\n exports.getArg = getArg;\n\n var urlRegexp = /^(?:([\\w+\\-.]+):)?\\/\\/(?:(\\w+:\\w+)@)?([\\w.]*)(?::(\\d+))?(\\S*)$/;\n var dataUrlRegexp = /^data:.+\\,.+$/;\n\n function urlParse(aUrl) {\n var match = aUrl.match(urlRegexp);\n if (!match) {\n return null;\n }\n return {\n scheme: match[1],\n auth: match[2],\n host: match[3],\n port: match[4],\n path: match[5]\n };\n }\n exports.urlParse = urlParse;\n\n function urlGenerate(aParsedUrl) {\n var url = '';\n if (aParsedUrl.scheme) {\n url += aParsedUrl.scheme + ':';\n }\n url += '//';\n if (aParsedUrl.auth) {\n url += aParsedUrl.auth + '@';\n }\n if (aParsedUrl.host) {\n url += aParsedUrl.host;\n }\n if (aParsedUrl.port) {\n url += \":\" + aParsedUrl.port\n }\n if (aParsedUrl.path) {\n url += aParsedUrl.path;\n }\n return url;\n }\n exports.urlGenerate = urlGenerate;\n\n /**\n * Normalizes a path, or the path portion of a URL:\n *\n * - Replaces consequtive slashes with one slash.\n * - Removes unnecessary '.' parts.\n * - Removes unnecessary '<dir>/..' parts.\n *\n * Based on code in the Node.js 'path' core module.\n *\n * @param aPath The path or url to normalize.\n */\n function normalize(aPath) {\n var path = aPath;\n var url = urlParse(aPath);\n if (url) {\n if (!url.path) {\n return aPath;\n }\n path = url.path;\n }\n var isAbsolute = exports.isAbsolute(path);\n\n var parts = path.split(/\\/+/);\n for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {\n part = parts[i];\n if (part === '.') {\n parts.splice(i, 1);\n } else if (part === '..') {\n up++;\n } else if (up > 0) {\n if (part === '') {\n // The first part is blank if the path is absolute. Trying to go\n // above the root is a no-op. Therefore we can remove all '..' parts\n // directly after the root.\n parts.splice(i + 1, up);\n up = 0;\n } else {\n parts.splice(i, 2);\n up--;\n }\n }\n }\n path = parts.join('/');\n\n if (path === '') {\n path = isAbsolute ? '/' : '.';\n }\n\n if (url) {\n url.path = path;\n return urlGenerate(url);\n }\n return path;\n }\n exports.normalize = normalize;\n\n /**\n * Joins two paths/URLs.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be joined with the root.\n *\n * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a\n * scheme-relative URL: Then the scheme of aRoot, if any, is prepended\n * first.\n * - Otherwise aPath is a path. If aRoot is a URL, then its path portion\n * is updated with the result and aRoot is returned. Otherwise the result\n * is returned.\n * - If aPath is absolute, the result is aPath.\n * - Otherwise the two paths are joined with a slash.\n * - Joining for example 'http://' and 'www.example.com' is also supported.\n */\n function join(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n if (aPath === \"\") {\n aPath = \".\";\n }\n var aPathUrl = urlParse(aPath);\n var aRootUrl = urlParse(aRoot);\n if (aRootUrl) {\n aRoot = aRootUrl.path || '/';\n }\n\n // `join(foo, '//www.example.org')`\n if (aPathUrl && !aPathUrl.scheme) {\n if (aRootUrl) {\n aPathUrl.scheme = aRootUrl.scheme;\n }\n return urlGenerate(aPathUrl);\n }\n\n if (aPathUrl || aPath.match(dataUrlRegexp)) {\n return aPath;\n }\n\n // `join('http://', 'www.example.com')`\n if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {\n aRootUrl.host = aPath;\n return urlGenerate(aRootUrl);\n }\n\n var joined = aPath.charAt(0) === '/'\n ? aPath\n : normalize(aRoot.replace(/\\/+$/, '') + '/' + aPath);\n\n if (aRootUrl) {\n aRootUrl.path = joined;\n return urlGenerate(aRootUrl);\n }\n return joined;\n }\n exports.join = join;\n\n exports.isAbsolute = function (aPath) {\n return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);\n };\n\n /**\n * Make a path relative to a URL or another path.\n *\n * @param aRoot The root path or URL.\n * @param aPath The path or URL to be made relative to aRoot.\n */\n function relative(aRoot, aPath) {\n if (aRoot === \"\") {\n aRoot = \".\";\n }\n\n aRoot = aRoot.replace(/\\/$/, '');\n\n // It is possible for the path to be above the root. In this case, simply\n // checking whether the root is a prefix of the path won't work. Instead, we\n // need to remove components from the root one by one, until either we find\n // a prefix that fits, or we run out of components to remove.\n var level = 0;\n while (aPath.indexOf(aRoot + '/') !== 0) {\n var index = aRoot.lastIndexOf(\"/\");\n if (index < 0) {\n return aPath;\n }\n\n // If the only part of the root that is left is the scheme (i.e. http://,\n // file:///, etc.), one or more slashes (/), or simply nothing at all, we\n // have exhausted all components, so the path is not relative to the root.\n aRoot = aRoot.slice(0, index);\n if (aRoot.match(/^([^\\/]+:\\/)?\\/*$/)) {\n return aPath;\n }\n\n ++level;\n }\n\n // Make sure we add a \"../\" for each component we removed from the root.\n return Array(level + 1).join(\"../\") + aPath.substr(aRoot.length + 1);\n }\n exports.relative = relative;\n\n /**\n * Because behavior goes wacky when you set `__proto__` on objects, we\n * have to prefix all the strings in our set with an arbitrary character.\n *\n * See https://github.com/mozilla/source-map/pull/31 and\n * https://github.com/mozilla/source-map/issues/30\n *\n * @param String aStr\n */\n function toSetString(aStr) {\n return '$' + aStr;\n }\n exports.toSetString = toSetString;\n\n function fromSetString(aStr) {\n return aStr.substr(1);\n }\n exports.fromSetString = fromSetString;\n\n /**\n * Comparator between two mappings where the original positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same original source/line/column, but different generated\n * line and column the same. Useful when searching for a mapping with a\n * stubbed out mapping.\n */\n function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {\n var cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0 || onlyCompareOriginal) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n }\n exports.compareByOriginalPositions = compareByOriginalPositions;\n\n /**\n * Comparator between two mappings with deflated source and name indices where\n * the generated positions are compared.\n *\n * Optionally pass in `true` as `onlyCompareGenerated` to consider two\n * mappings with the same generated line and column, but different\n * source/name/original line and column the same. Useful when searching for a\n * mapping with a stubbed out mapping.\n */\n function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0 || onlyCompareGenerated) {\n return cmp;\n }\n\n cmp = mappingA.source - mappingB.source;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return mappingA.name - mappingB.name;\n }\n exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;\n\n function strcmp(aStr1, aStr2) {\n if (aStr1 === aStr2) {\n return 0;\n }\n\n if (aStr1 > aStr2) {\n return 1;\n }\n\n return -1;\n }\n\n /**\n * Comparator between two mappings with inflated source and name strings where\n * the generated positions are compared.\n */\n function compareByGeneratedPositionsInflated(mappingA, mappingB) {\n var cmp = mappingA.generatedLine - mappingB.generatedLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.generatedColumn - mappingB.generatedColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = strcmp(mappingA.source, mappingB.source);\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalLine - mappingB.originalLine;\n if (cmp !== 0) {\n return cmp;\n }\n\n cmp = mappingA.originalColumn - mappingB.originalColumn;\n if (cmp !== 0) {\n return cmp;\n }\n\n return strcmp(mappingA.name, mappingB.name);\n }\n exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/util.js\n ** module id = 4\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n var util = require('./util');\n\n /**\n * A data structure which is a combination of an array and a set. Adding a new\n * member is O(1), testing for membership is O(1), and finding the index of an\n * element is O(1). Removing elements from the set is not supported. Only\n * strings are supported for membership.\n */\n function ArraySet() {\n this._array = [];\n this._set = {};\n }\n\n /**\n * Static method for creating ArraySet instances from an existing array.\n */\n ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {\n var set = new ArraySet();\n for (var i = 0, len = aArray.length; i < len; i++) {\n set.add(aArray[i], aAllowDuplicates);\n }\n return set;\n };\n\n /**\n * Return how many unique items are in this ArraySet. If duplicates have been\n * added, than those do not count towards the size.\n *\n * @returns Number\n */\n ArraySet.prototype.size = function ArraySet_size() {\n return Object.getOwnPropertyNames(this._set).length;\n };\n\n /**\n * Add the given string to this set.\n *\n * @param String aStr\n */\n ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {\n var sStr = util.toSetString(aStr);\n var isDuplicate = this._set.hasOwnProperty(sStr);\n var idx = this._array.length;\n if (!isDuplicate || aAllowDuplicates) {\n this._array.push(aStr);\n }\n if (!isDuplicate) {\n this._set[sStr] = idx;\n }\n };\n\n /**\n * Is the given string a member of this set?\n *\n * @param String aStr\n */\n ArraySet.prototype.has = function ArraySet_has(aStr) {\n var sStr = util.toSetString(aStr);\n return this._set.hasOwnProperty(sStr);\n };\n\n /**\n * What is the index of the given string in the array?\n *\n * @param String aStr\n */\n ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {\n var sStr = util.toSetString(aStr);\n if (this._set.hasOwnProperty(sStr)) {\n return this._set[sStr];\n }\n throw new Error('\"' + aStr + '\" is not in the set.');\n };\n\n /**\n * What is the element at the given index?\n *\n * @param Number aIdx\n */\n ArraySet.prototype.at = function ArraySet_at(aIdx) {\n if (aIdx >= 0 && aIdx < this._array.length) {\n return this._array[aIdx];\n }\n throw new Error('No element indexed by ' + aIdx);\n };\n\n /**\n * Returns the array representation of this set (which has the proper indices\n * indicated by indexOf). Note that this is a copy of the internal array used\n * for storing the members so that no one can mess with internal state.\n */\n ArraySet.prototype.toArray = function ArraySet_toArray() {\n return this._array.slice();\n };\n\n exports.ArraySet = ArraySet;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/array-set.js\n ** module id = 5\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2014 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n var util = require('./util');\n\n /**\n * Determine whether mappingB is after mappingA with respect to generated\n * position.\n */\n function generatedPositionAfter(mappingA, mappingB) {\n // Optimized for most common case\n var lineA = mappingA.generatedLine;\n var lineB = mappingB.generatedLine;\n var columnA = mappingA.generatedColumn;\n var columnB = mappingB.generatedColumn;\n return lineB > lineA || lineB == lineA && columnB >= columnA ||\n util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;\n }\n\n /**\n * A data structure to provide a sorted view of accumulated mappings in a\n * performance conscious manner. It trades a neglibable overhead in general\n * case for a large speedup in case of mappings being added in order.\n */\n function MappingList() {\n this._array = [];\n this._sorted = true;\n // Serves as infimum\n this._last = {generatedLine: -1, generatedColumn: 0};\n }\n\n /**\n * Iterate through internal items. This method takes the same arguments that\n * `Array.prototype.forEach` takes.\n *\n * NOTE: The order of the mappings is NOT guaranteed.\n */\n MappingList.prototype.unsortedForEach =\n function MappingList_forEach(aCallback, aThisArg) {\n this._array.forEach(aCallback, aThisArg);\n };\n\n /**\n * Add the given source mapping.\n *\n * @param Object aMapping\n */\n MappingList.prototype.add = function MappingList_add(aMapping) {\n if (generatedPositionAfter(this._last, aMapping)) {\n this._last = aMapping;\n this._array.push(aMapping);\n } else {\n this._sorted = false;\n this._array.push(aMapping);\n }\n };\n\n /**\n * Returns the flat, sorted array of mappings. The mappings are sorted by\n * generated position.\n *\n * WARNING: This method returns internal data without copying, for\n * performance. The return value must NOT be mutated, and should be treated as\n * an immutable borrow. If you want to take ownership, you must make your own\n * copy.\n */\n MappingList.prototype.toArray = function MappingList_toArray() {\n if (!this._sorted) {\n this._array.sort(util.compareByGeneratedPositionsInflated);\n this._sorted = true;\n }\n return this._array;\n };\n\n exports.MappingList = MappingList;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/mapping-list.js\n ** module id = 6\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n var util = require('./util');\n var binarySearch = require('./binary-search');\n var ArraySet = require('./array-set').ArraySet;\n var base64VLQ = require('./base64-vlq');\n var quickSort = require('./quick-sort').quickSort;\n\n function SourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n return sourceMap.sections != null\n ? new IndexedSourceMapConsumer(sourceMap)\n : new BasicSourceMapConsumer(sourceMap);\n }\n\n SourceMapConsumer.fromSourceMap = function(aSourceMap) {\n return BasicSourceMapConsumer.fromSourceMap(aSourceMap);\n }\n\n /**\n * The version of the source mapping spec that we are consuming.\n */\n SourceMapConsumer.prototype._version = 3;\n\n // `__generatedMappings` and `__originalMappings` are arrays that hold the\n // parsed mapping coordinates from the source map's \"mappings\" attribute. They\n // are lazily instantiated, accessed via the `_generatedMappings` and\n // `_originalMappings` getters respectively, and we only parse the mappings\n // and create these arrays once queried for a source location. We jump through\n // these hoops because there can be many thousands of mappings, and parsing\n // them is expensive, so we only want to do it if we must.\n //\n // Each object in the arrays is of the form:\n //\n // {\n // generatedLine: The line number in the generated code,\n // generatedColumn: The column number in the generated code,\n // source: The path to the original source file that generated this\n // chunk of code,\n // originalLine: The line number in the original source that\n // corresponds to this chunk of generated code,\n // originalColumn: The column number in the original source that\n // corresponds to this chunk of generated code,\n // name: The name of the original symbol which generated this chunk of\n // code.\n // }\n //\n // All properties except for `generatedLine` and `generatedColumn` can be\n // `null`.\n //\n // `_generatedMappings` is ordered by the generated positions.\n //\n // `_originalMappings` is ordered by the original positions.\n\n SourceMapConsumer.prototype.__generatedMappings = null;\n Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {\n get: function () {\n if (!this.__generatedMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__generatedMappings;\n }\n });\n\n SourceMapConsumer.prototype.__originalMappings = null;\n Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {\n get: function () {\n if (!this.__originalMappings) {\n this._parseMappings(this._mappings, this.sourceRoot);\n }\n\n return this.__originalMappings;\n }\n });\n\n SourceMapConsumer.prototype._charIsMappingSeparator =\n function SourceMapConsumer_charIsMappingSeparator(aStr, index) {\n var c = aStr.charAt(index);\n return c === \";\" || c === \",\";\n };\n\n /**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\n SourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n throw new Error(\"Subclasses must implement _parseMappings\");\n };\n\n SourceMapConsumer.GENERATED_ORDER = 1;\n SourceMapConsumer.ORIGINAL_ORDER = 2;\n\n SourceMapConsumer.GREATEST_LOWER_BOUND = 1;\n SourceMapConsumer.LEAST_UPPER_BOUND = 2;\n\n /**\n * Iterate over each mapping between an original source/line/column and a\n * generated line/column in this source map.\n *\n * @param Function aCallback\n * The function that is called with each mapping.\n * @param Object aContext\n * Optional. If specified, this object will be the value of `this` every\n * time that `aCallback` is called.\n * @param aOrder\n * Either `SourceMapConsumer.GENERATED_ORDER` or\n * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to\n * iterate over the mappings sorted by the generated file's line/column\n * order or the original's source/line/column order, respectively. Defaults to\n * `SourceMapConsumer.GENERATED_ORDER`.\n */\n SourceMapConsumer.prototype.eachMapping =\n function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {\n var context = aContext || null;\n var order = aOrder || SourceMapConsumer.GENERATED_ORDER;\n\n var mappings;\n switch (order) {\n case SourceMapConsumer.GENERATED_ORDER:\n mappings = this._generatedMappings;\n break;\n case SourceMapConsumer.ORIGINAL_ORDER:\n mappings = this._originalMappings;\n break;\n default:\n throw new Error(\"Unknown order of iteration.\");\n }\n\n var sourceRoot = this.sourceRoot;\n mappings.map(function (mapping) {\n var source = mapping.source === null ? null : this._sources.at(mapping.source);\n if (source != null && sourceRoot != null) {\n source = util.join(sourceRoot, source);\n }\n return {\n source: source,\n generatedLine: mapping.generatedLine,\n generatedColumn: mapping.generatedColumn,\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: mapping.name === null ? null : this._names.at(mapping.name)\n };\n }, this).forEach(aCallback, context);\n };\n\n /**\n * Returns all generated line and column information for the original source,\n * line, and column provided. If no column is provided, returns all mappings\n * corresponding to a either the line we are searching for or the next\n * closest line that has any mappings. Otherwise, returns all mappings\n * corresponding to the given line and either the column we are searching for\n * or the next closest column that has any offsets.\n *\n * The only argument is an object with the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: Optional. the column number in the original source.\n *\n * and an array of objects is returned, each with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\n SourceMapConsumer.prototype.allGeneratedPositionsFor =\n function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {\n var line = util.getArg(aArgs, 'line');\n\n // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping\n // returns the index of the closest mapping less than the needle. By\n // setting needle.originalColumn to 0, we thus find the last mapping for\n // the given line, provided such a mapping exists.\n var needle = {\n source: util.getArg(aArgs, 'source'),\n originalLine: line,\n originalColumn: util.getArg(aArgs, 'column', 0)\n };\n\n if (this.sourceRoot != null) {\n needle.source = util.relative(this.sourceRoot, needle.source);\n }\n if (!this._sources.has(needle.source)) {\n return [];\n }\n needle.source = this._sources.indexOf(needle.source);\n\n var mappings = [];\n\n var index = this._findMapping(needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n binarySearch.LEAST_UPPER_BOUND);\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (aArgs.column === undefined) {\n var originalLine = mapping.originalLine;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we found. Since\n // mappings are sorted, this is guaranteed to find all mappings for\n // the line we found.\n while (mapping && mapping.originalLine === originalLine) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n } else {\n var originalColumn = mapping.originalColumn;\n\n // Iterate until either we run out of mappings, or we run into\n // a mapping for a different line than the one we were searching for.\n // Since mappings are sorted, this is guaranteed to find all mappings for\n // the line we are searching for.\n while (mapping &&\n mapping.originalLine === line &&\n mapping.originalColumn == originalColumn) {\n mappings.push({\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n });\n\n mapping = this._originalMappings[++index];\n }\n }\n }\n\n return mappings;\n };\n\n exports.SourceMapConsumer = SourceMapConsumer;\n\n /**\n * A BasicSourceMapConsumer instance represents a parsed source map which we can\n * query for information about the original file positions by giving it a file\n * position in the generated source.\n *\n * The only parameter is the raw source map (either as a JSON string, or\n * already parsed to an object). According to the spec, source maps have the\n * following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - sources: An array of URLs to the original source files.\n * - names: An array of identifiers which can be referrenced by individual mappings.\n * - sourceRoot: Optional. The URL root from which all sources are relative.\n * - sourcesContent: Optional. An array of contents of the original source files.\n * - mappings: A string of base64 VLQs which contain the actual mappings.\n * - file: Optional. The generated file this source map is associated with.\n *\n * Here is an example source map, taken from the source map spec[0]:\n *\n * {\n * version : 3,\n * file: \"out.js\",\n * sourceRoot : \"\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AA,AB;;ABCDE;\"\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#\n */\n function BasicSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sources = util.getArg(sourceMap, 'sources');\n // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which\n // requires the array) to play nice here.\n var names = util.getArg(sourceMap, 'names', []);\n var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);\n var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);\n var mappings = util.getArg(sourceMap, 'mappings');\n var file = util.getArg(sourceMap, 'file', null);\n\n // Once again, Sass deviates from the spec and supplies the version as a\n // string rather than a number, so we use loose equality checking here.\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n sources = sources\n // Some source maps produce relative source paths like \"./foo.js\" instead of\n // \"foo.js\". Normalize these first so that future comparisons will succeed.\n // See bugzil.la/1090768.\n .map(util.normalize)\n // Always ensure that absolute sources are internally stored relative to\n // the source root, if the source root is absolute. Not doing this would\n // be particularly problematic when the source root is a prefix of the\n // source (valid, but why??). See github issue #199 and bugzil.la/1188982.\n .map(function (source) {\n return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)\n ? util.relative(sourceRoot, source)\n : source;\n });\n\n // Pass `true` below to allow duplicate names and sources. While source maps\n // are intended to be compressed and deduplicated, the TypeScript compiler\n // sometimes generates source maps with duplicates in them. See Github issue\n // #72 and bugzil.la/889492.\n this._names = ArraySet.fromArray(names, true);\n this._sources = ArraySet.fromArray(sources, true);\n\n this.sourceRoot = sourceRoot;\n this.sourcesContent = sourcesContent;\n this._mappings = mappings;\n this.file = file;\n }\n\n BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;\n\n /**\n * Create a BasicSourceMapConsumer from a SourceMapGenerator.\n *\n * @param SourceMapGenerator aSourceMap\n * The source map that will be consumed.\n * @returns BasicSourceMapConsumer\n */\n BasicSourceMapConsumer.fromSourceMap =\n function SourceMapConsumer_fromSourceMap(aSourceMap) {\n var smc = Object.create(BasicSourceMapConsumer.prototype);\n\n var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);\n var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);\n smc.sourceRoot = aSourceMap._sourceRoot;\n smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),\n smc.sourceRoot);\n smc.file = aSourceMap._file;\n\n // Because we are modifying the entries (by converting string sources and\n // names to indices into the sources and names ArraySets), we have to make\n // a copy of the entry or else bad things happen. Shared mutable state\n // strikes again! See github issue #191.\n\n var generatedMappings = aSourceMap._mappings.toArray().slice();\n var destGeneratedMappings = smc.__generatedMappings = [];\n var destOriginalMappings = smc.__originalMappings = [];\n\n for (var i = 0, length = generatedMappings.length; i < length; i++) {\n var srcMapping = generatedMappings[i];\n var destMapping = new Mapping;\n destMapping.generatedLine = srcMapping.generatedLine;\n destMapping.generatedColumn = srcMapping.generatedColumn;\n\n if (srcMapping.source) {\n destMapping.source = sources.indexOf(srcMapping.source);\n destMapping.originalLine = srcMapping.originalLine;\n destMapping.originalColumn = srcMapping.originalColumn;\n\n if (srcMapping.name) {\n destMapping.name = names.indexOf(srcMapping.name);\n }\n\n destOriginalMappings.push(destMapping);\n }\n\n destGeneratedMappings.push(destMapping);\n }\n\n quickSort(smc.__originalMappings, util.compareByOriginalPositions);\n\n return smc;\n };\n\n /**\n * The version of the source mapping spec that we are consuming.\n */\n BasicSourceMapConsumer.prototype._version = 3;\n\n /**\n * The list of original sources.\n */\n Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {\n get: function () {\n return this._sources.toArray().map(function (s) {\n return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;\n }, this);\n }\n });\n\n /**\n * Provide the JIT with a nice shape / hidden class.\n */\n function Mapping() {\n this.generatedLine = 0;\n this.generatedColumn = 0;\n this.source = null;\n this.originalLine = null;\n this.originalColumn = null;\n this.name = null;\n }\n\n /**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\n BasicSourceMapConsumer.prototype._parseMappings =\n function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n var generatedLine = 1;\n var previousGeneratedColumn = 0;\n var previousOriginalLine = 0;\n var previousOriginalColumn = 0;\n var previousSource = 0;\n var previousName = 0;\n var length = aStr.length;\n var index = 0;\n var cachedSegments = {};\n var temp = {};\n var originalMappings = [];\n var generatedMappings = [];\n var mapping, str, segment, end, value;\n\n while (index < length) {\n if (aStr.charAt(index) === ';') {\n generatedLine++;\n index++;\n previousGeneratedColumn = 0;\n }\n else if (aStr.charAt(index) === ',') {\n index++;\n }\n else {\n mapping = new Mapping();\n mapping.generatedLine = generatedLine;\n\n // Because each offset is encoded relative to the previous one,\n // many segments often have the same encoding. We can exploit this\n // fact by caching the parsed variable length fields of each segment,\n // allowing us to avoid a second parse if we encounter the same\n // segment again.\n for (end = index; end < length; end++) {\n if (this._charIsMappingSeparator(aStr, end)) {\n break;\n }\n }\n str = aStr.slice(index, end);\n\n segment = cachedSegments[str];\n if (segment) {\n index += str.length;\n } else {\n segment = [];\n while (index < end) {\n base64VLQ.decode(aStr, index, temp);\n value = temp.value;\n index = temp.rest;\n segment.push(value);\n }\n\n if (segment.length === 2) {\n throw new Error('Found a source, but no line and column');\n }\n\n if (segment.length === 3) {\n throw new Error('Found a source and line, but no column');\n }\n\n cachedSegments[str] = segment;\n }\n\n // Generated column.\n mapping.generatedColumn = previousGeneratedColumn + segment[0];\n previousGeneratedColumn = mapping.generatedColumn;\n\n if (segment.length > 1) {\n // Original source.\n mapping.source = previousSource + segment[1];\n previousSource += segment[1];\n\n // Original line.\n mapping.originalLine = previousOriginalLine + segment[2];\n previousOriginalLine = mapping.originalLine;\n // Lines are stored 0-based\n mapping.originalLine += 1;\n\n // Original column.\n mapping.originalColumn = previousOriginalColumn + segment[3];\n previousOriginalColumn = mapping.originalColumn;\n\n if (segment.length > 4) {\n // Original name.\n mapping.name = previousName + segment[4];\n previousName += segment[4];\n }\n }\n\n generatedMappings.push(mapping);\n if (typeof mapping.originalLine === 'number') {\n originalMappings.push(mapping);\n }\n }\n }\n\n quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);\n this.__generatedMappings = generatedMappings;\n\n quickSort(originalMappings, util.compareByOriginalPositions);\n this.__originalMappings = originalMappings;\n };\n\n /**\n * Find the mapping that best matches the hypothetical \"needle\" mapping that\n * we are searching for in the given \"haystack\" of mappings.\n */\n BasicSourceMapConsumer.prototype._findMapping =\n function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,\n aColumnName, aComparator, aBias) {\n // To return the position we are searching for, we must first find the\n // mapping for the given position and then return the opposite position it\n // points to. Because the mappings are sorted, we can use binary search to\n // find the best mapping.\n\n if (aNeedle[aLineName] <= 0) {\n throw new TypeError('Line must be greater than or equal to 1, got '\n + aNeedle[aLineName]);\n }\n if (aNeedle[aColumnName] < 0) {\n throw new TypeError('Column must be greater than or equal to 0, got '\n + aNeedle[aColumnName]);\n }\n\n return binarySearch.search(aNeedle, aMappings, aComparator, aBias);\n };\n\n /**\n * Compute the last column for each generated mapping. The last column is\n * inclusive.\n */\n BasicSourceMapConsumer.prototype.computeColumnSpans =\n function SourceMapConsumer_computeColumnSpans() {\n for (var index = 0; index < this._generatedMappings.length; ++index) {\n var mapping = this._generatedMappings[index];\n\n // Mappings do not contain a field for the last generated columnt. We\n // can come up with an optimistic estimate, however, by assuming that\n // mappings are contiguous (i.e. given two consecutive mappings, the\n // first mapping ends where the second one starts).\n if (index + 1 < this._generatedMappings.length) {\n var nextMapping = this._generatedMappings[index + 1];\n\n if (mapping.generatedLine === nextMapping.generatedLine) {\n mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;\n continue;\n }\n }\n\n // The last mapping for each line spans the entire line.\n mapping.lastGeneratedColumn = Infinity;\n }\n };\n\n /**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\n BasicSourceMapConsumer.prototype.originalPositionFor =\n function SourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._generatedMappings,\n \"generatedLine\",\n \"generatedColumn\",\n util.compareByGeneratedPositionsDeflated,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._generatedMappings[index];\n\n if (mapping.generatedLine === needle.generatedLine) {\n var source = util.getArg(mapping, 'source', null);\n if (source !== null) {\n source = this._sources.at(source);\n if (this.sourceRoot != null) {\n source = util.join(this.sourceRoot, source);\n }\n }\n var name = util.getArg(mapping, 'name', null);\n if (name !== null) {\n name = this._names.at(name);\n }\n return {\n source: source,\n line: util.getArg(mapping, 'originalLine', null),\n column: util.getArg(mapping, 'originalColumn', null),\n name: name\n };\n }\n }\n\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n };\n\n /**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\n BasicSourceMapConsumer.prototype.hasContentsOfAllSources =\n function BasicSourceMapConsumer_hasContentsOfAllSources() {\n if (!this.sourcesContent) {\n return false;\n }\n return this.sourcesContent.length >= this._sources.size() &&\n !this.sourcesContent.some(function (sc) { return sc == null; });\n };\n\n /**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\n BasicSourceMapConsumer.prototype.sourceContentFor =\n function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n if (!this.sourcesContent) {\n return null;\n }\n\n if (this.sourceRoot != null) {\n aSource = util.relative(this.sourceRoot, aSource);\n }\n\n if (this._sources.has(aSource)) {\n return this.sourcesContent[this._sources.indexOf(aSource)];\n }\n\n var url;\n if (this.sourceRoot != null\n && (url = util.urlParse(this.sourceRoot))) {\n // XXX: file:// URIs and absolute paths lead to unexpected behavior for\n // many users. We can help them out when they expect file:// URIs to\n // behave like it would if they were running a local HTTP server. See\n // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.\n var fileUriAbsPath = aSource.replace(/^file:\\/\\//, \"\");\n if (url.scheme == \"file\"\n && this._sources.has(fileUriAbsPath)) {\n return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]\n }\n\n if ((!url.path || url.path == \"/\")\n && this._sources.has(\"/\" + aSource)) {\n return this.sourcesContent[this._sources.indexOf(\"/\" + aSource)];\n }\n }\n\n // This function is used recursively from\n // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we\n // don't want to throw if we can't find the source - we just want to\n // return null, so we provide a flag to exit gracefully.\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n /**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or\n * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\n BasicSourceMapConsumer.prototype.generatedPositionFor =\n function SourceMapConsumer_generatedPositionFor(aArgs) {\n var source = util.getArg(aArgs, 'source');\n if (this.sourceRoot != null) {\n source = util.relative(this.sourceRoot, source);\n }\n if (!this._sources.has(source)) {\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n }\n source = this._sources.indexOf(source);\n\n var needle = {\n source: source,\n originalLine: util.getArg(aArgs, 'line'),\n originalColumn: util.getArg(aArgs, 'column')\n };\n\n var index = this._findMapping(\n needle,\n this._originalMappings,\n \"originalLine\",\n \"originalColumn\",\n util.compareByOriginalPositions,\n util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)\n );\n\n if (index >= 0) {\n var mapping = this._originalMappings[index];\n\n if (mapping.source === needle.source) {\n return {\n line: util.getArg(mapping, 'generatedLine', null),\n column: util.getArg(mapping, 'generatedColumn', null),\n lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)\n };\n }\n }\n\n return {\n line: null,\n column: null,\n lastColumn: null\n };\n };\n\n exports.BasicSourceMapConsumer = BasicSourceMapConsumer;\n\n /**\n * An IndexedSourceMapConsumer instance represents a parsed source map which\n * we can query for information. It differs from BasicSourceMapConsumer in\n * that it takes \"indexed\" source maps (i.e. ones with a \"sections\" field) as\n * input.\n *\n * The only parameter is a raw source map (either as a JSON string, or already\n * parsed to an object). According to the spec for indexed source maps, they\n * have the following attributes:\n *\n * - version: Which version of the source map spec this map is following.\n * - file: Optional. The generated file this source map is associated with.\n * - sections: A list of section definitions.\n *\n * Each value under the \"sections\" field has two fields:\n * - offset: The offset into the original specified at which this section\n * begins to apply, defined as an object with a \"line\" and \"column\"\n * field.\n * - map: A source map definition. This source map could also be indexed,\n * but doesn't have to be.\n *\n * Instead of the \"map\" field, it's also possible to have a \"url\" field\n * specifying a URL to retrieve a source map from, but that's currently\n * unsupported.\n *\n * Here's an example source map, taken from the source map spec[0], but\n * modified to omit a section which uses the \"url\" field.\n *\n * {\n * version : 3,\n * file: \"app.js\",\n * sections: [{\n * offset: {line:100, column:10},\n * map: {\n * version : 3,\n * file: \"section.js\",\n * sources: [\"foo.js\", \"bar.js\"],\n * names: [\"src\", \"maps\", \"are\", \"fun\"],\n * mappings: \"AAAA,E;;ABCDE;\"\n * }\n * }],\n * }\n *\n * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt\n */\n function IndexedSourceMapConsumer(aSourceMap) {\n var sourceMap = aSourceMap;\n if (typeof aSourceMap === 'string') {\n sourceMap = JSON.parse(aSourceMap.replace(/^\\)\\]\\}'/, ''));\n }\n\n var version = util.getArg(sourceMap, 'version');\n var sections = util.getArg(sourceMap, 'sections');\n\n if (version != this._version) {\n throw new Error('Unsupported version: ' + version);\n }\n\n this._sources = new ArraySet();\n this._names = new ArraySet();\n\n var lastOffset = {\n line: -1,\n column: 0\n };\n this._sections = sections.map(function (s) {\n if (s.url) {\n // The url field will require support for asynchronicity.\n // See https://github.com/mozilla/source-map/issues/16\n throw new Error('Support for url field in sections not implemented.');\n }\n var offset = util.getArg(s, 'offset');\n var offsetLine = util.getArg(offset, 'line');\n var offsetColumn = util.getArg(offset, 'column');\n\n if (offsetLine < lastOffset.line ||\n (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {\n throw new Error('Section offsets must be ordered and non-overlapping.');\n }\n lastOffset = offset;\n\n return {\n generatedOffset: {\n // The offset fields are 0-based, but we use 1-based indices when\n // encoding/decoding from VLQ.\n generatedLine: offsetLine + 1,\n generatedColumn: offsetColumn + 1\n },\n consumer: new SourceMapConsumer(util.getArg(s, 'map'))\n }\n });\n }\n\n IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);\n IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;\n\n /**\n * The version of the source mapping spec that we are consuming.\n */\n IndexedSourceMapConsumer.prototype._version = 3;\n\n /**\n * The list of original sources.\n */\n Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {\n get: function () {\n var sources = [];\n for (var i = 0; i < this._sections.length; i++) {\n for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {\n sources.push(this._sections[i].consumer.sources[j]);\n }\n }\n return sources;\n }\n });\n\n /**\n * Returns the original source, line, and column information for the generated\n * source's line and column positions provided. The only argument is an object\n * with the following properties:\n *\n * - line: The line number in the generated source.\n * - column: The column number in the generated source.\n *\n * and an object is returned with the following properties:\n *\n * - source: The original source file, or null.\n * - line: The line number in the original source, or null.\n * - column: The column number in the original source, or null.\n * - name: The original identifier, or null.\n */\n IndexedSourceMapConsumer.prototype.originalPositionFor =\n function IndexedSourceMapConsumer_originalPositionFor(aArgs) {\n var needle = {\n generatedLine: util.getArg(aArgs, 'line'),\n generatedColumn: util.getArg(aArgs, 'column')\n };\n\n // Find the section containing the generated position we're trying to map\n // to an original position.\n var sectionIndex = binarySearch.search(needle, this._sections,\n function(needle, section) {\n var cmp = needle.generatedLine - section.generatedOffset.generatedLine;\n if (cmp) {\n return cmp;\n }\n\n return (needle.generatedColumn -\n section.generatedOffset.generatedColumn);\n });\n var section = this._sections[sectionIndex];\n\n if (!section) {\n return {\n source: null,\n line: null,\n column: null,\n name: null\n };\n }\n\n return section.consumer.originalPositionFor({\n line: needle.generatedLine -\n (section.generatedOffset.generatedLine - 1),\n column: needle.generatedColumn -\n (section.generatedOffset.generatedLine === needle.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n bias: aArgs.bias\n });\n };\n\n /**\n * Return true if we have the source content for every source in the source\n * map, false otherwise.\n */\n IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =\n function IndexedSourceMapConsumer_hasContentsOfAllSources() {\n return this._sections.every(function (s) {\n return s.consumer.hasContentsOfAllSources();\n });\n };\n\n /**\n * Returns the original source content. The only argument is the url of the\n * original source file. Returns null if no original source content is\n * available.\n */\n IndexedSourceMapConsumer.prototype.sourceContentFor =\n function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n var content = section.consumer.sourceContentFor(aSource, true);\n if (content) {\n return content;\n }\n }\n if (nullOnMissing) {\n return null;\n }\n else {\n throw new Error('\"' + aSource + '\" is not in the SourceMap.');\n }\n };\n\n /**\n * Returns the generated line and column information for the original source,\n * line, and column positions provided. The only argument is an object with\n * the following properties:\n *\n * - source: The filename of the original source.\n * - line: The line number in the original source.\n * - column: The column number in the original source.\n *\n * and an object is returned with the following properties:\n *\n * - line: The line number in the generated source, or null.\n * - column: The column number in the generated source, or null.\n */\n IndexedSourceMapConsumer.prototype.generatedPositionFor =\n function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n\n // Only consider this section if the requested source is in the list of\n // sources of the consumer.\n if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {\n continue;\n }\n var generatedPosition = section.consumer.generatedPositionFor(aArgs);\n if (generatedPosition) {\n var ret = {\n line: generatedPosition.line +\n (section.generatedOffset.generatedLine - 1),\n column: generatedPosition.column +\n (section.generatedOffset.generatedLine === generatedPosition.line\n ? section.generatedOffset.generatedColumn - 1\n : 0)\n };\n return ret;\n }\n }\n\n return {\n line: null,\n column: null\n };\n };\n\n /**\n * Parse the mappings in a string in to a data structure which we can easily\n * query (the ordered arrays in the `this.__generatedMappings` and\n * `this.__originalMappings` properties).\n */\n IndexedSourceMapConsumer.prototype._parseMappings =\n function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {\n this.__generatedMappings = [];\n this.__originalMappings = [];\n for (var i = 0; i < this._sections.length; i++) {\n var section = this._sections[i];\n var sectionMappings = section.consumer._generatedMappings;\n for (var j = 0; j < sectionMappings.length; j++) {\n var mapping = sectionMappings[j];\n\n var source = section.consumer._sources.at(mapping.source);\n if (section.consumer.sourceRoot !== null) {\n source = util.join(section.consumer.sourceRoot, source);\n }\n this._sources.add(source);\n source = this._sources.indexOf(source);\n\n var name = section.consumer._names.at(mapping.name);\n this._names.add(name);\n name = this._names.indexOf(name);\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n var adjustedMapping = {\n source: source,\n generatedLine: mapping.generatedLine +\n (section.generatedOffset.generatedLine - 1),\n generatedColumn: mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name: name\n };\n\n this.__generatedMappings.push(adjustedMapping);\n if (typeof adjustedMapping.originalLine === 'number') {\n this.__originalMappings.push(adjustedMapping);\n }\n }\n }\n\n quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);\n quickSort(this.__originalMappings, util.compareByOriginalPositions);\n };\n\n exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/source-map-consumer.js\n ** module id = 7\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n exports.GREATEST_LOWER_BOUND = 1;\n exports.LEAST_UPPER_BOUND = 2;\n\n /**\n * Recursive implementation of binary search.\n *\n * @param aLow Indices here and lower do not contain the needle.\n * @param aHigh Indices here and higher do not contain the needle.\n * @param aNeedle The element being searched for.\n * @param aHaystack The non-empty array being searched.\n * @param aCompare Function which takes two elements and returns -1, 0, or 1.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n */\n function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {\n // This function terminates when one of the following is true:\n //\n // 1. We find the exact element we are looking for.\n //\n // 2. We did not find the exact element, but we can return the index of\n // the next-closest element.\n //\n // 3. We did not find the exact element, and there is no next-closest\n // element than the one we are searching for, so we return -1.\n var mid = Math.floor((aHigh - aLow) / 2) + aLow;\n var cmp = aCompare(aNeedle, aHaystack[mid], true);\n if (cmp === 0) {\n // Found the element we are looking for.\n return mid;\n }\n else if (cmp > 0) {\n // Our needle is greater than aHaystack[mid].\n if (aHigh - mid > 1) {\n // The element is in the upper half.\n return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // The exact needle element was not found in this haystack. Determine if\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return aHigh < aHaystack.length ? aHigh : -1;\n } else {\n return mid;\n }\n }\n else {\n // Our needle is less than aHaystack[mid].\n if (mid - aLow > 1) {\n // The element is in the lower half.\n return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);\n }\n\n // we are in termination case (3) or (2) and return the appropriate thing.\n if (aBias == exports.LEAST_UPPER_BOUND) {\n return mid;\n } else {\n return aLow < 0 ? -1 : aLow;\n }\n }\n }\n\n /**\n * This is an implementation of binary search which will always try and return\n * the index of the closest element if there is no exact hit. This is because\n * mappings between original and generated line/col pairs are single points,\n * and there is an implicit region between each of them, so a miss just means\n * that you aren't on the very start of a region.\n *\n * @param aNeedle The element you are looking for.\n * @param aHaystack The array that is being searched.\n * @param aCompare A function which takes the needle and an element in the\n * array and returns -1, 0, or 1 depending on whether the needle is less\n * than, equal to, or greater than the element, respectively.\n * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or\n * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the\n * closest element that is smaller than or greater than the one we are\n * searching for, respectively, if the exact element cannot be found.\n * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.\n */\n exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {\n if (aHaystack.length === 0) {\n return -1;\n }\n\n var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,\n aCompare, aBias || exports.GREATEST_LOWER_BOUND);\n if (index < 0) {\n return -1;\n }\n\n // We have found either the exact element, or the next-closest element than\n // the one we are searching for. However, there may be more than one such\n // element. Make sure we always return the smallest of these.\n while (index - 1 >= 0) {\n if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {\n break;\n }\n --index;\n }\n\n return index;\n };\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/binary-search.js\n ** module id = 8\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n // It turns out that some (most?) JavaScript engines don't self-host\n // `Array.prototype.sort`. This makes sense because C++ will likely remain\n // faster than JS when doing raw CPU-intensive sorting. However, when using a\n // custom comparator function, calling back and forth between the VM's C++ and\n // JIT'd JS is rather slow *and* loses JIT type information, resulting in\n // worse generated code for the comparator function than would be optimal. In\n // fact, when sorting with a comparator, these costs outweigh the benefits of\n // sorting in C++. By using our own JS-implemented Quick Sort (below), we get\n // a ~3500ms mean speed-up in `bench/bench.html`.\n\n /**\n * Swap the elements indexed by `x` and `y` in the array `ary`.\n *\n * @param {Array} ary\n * The array.\n * @param {Number} x\n * The index of the first item.\n * @param {Number} y\n * The index of the second item.\n */\n function swap(ary, x, y) {\n var temp = ary[x];\n ary[x] = ary[y];\n ary[y] = temp;\n }\n\n /**\n * Returns a random integer within the range `low .. high` inclusive.\n *\n * @param {Number} low\n * The lower bound on the range.\n * @param {Number} high\n * The upper bound on the range.\n */\n function randomIntInRange(low, high) {\n return Math.round(low + (Math.random() * (high - low)));\n }\n\n /**\n * The Quick Sort algorithm.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n * @param {Number} p\n * Start index of the array\n * @param {Number} r\n * End index of the array\n */\n function doQuickSort(ary, comparator, p, r) {\n // If our lower bound is less than our upper bound, we (1) partition the\n // array into two pieces and (2) recurse on each half. If it is not, this is\n // the empty array and our base case.\n\n if (p < r) {\n // (1) Partitioning.\n //\n // The partitioning chooses a pivot between `p` and `r` and moves all\n // elements that are less than or equal to the pivot to the before it, and\n // all the elements that are greater than it after it. The effect is that\n // once partition is done, the pivot is in the exact place it will be when\n // the array is put in sorted order, and it will not need to be moved\n // again. This runs in O(n) time.\n\n // Always choose a random pivot so that an input array which is reverse\n // sorted does not cause O(n^2) running time.\n var pivotIndex = randomIntInRange(p, r);\n var i = p - 1;\n\n swap(ary, pivotIndex, r);\n var pivot = ary[r];\n\n // Immediately after `j` is incremented in this loop, the following hold\n // true:\n //\n // * Every element in `ary[p .. i]` is less than or equal to the pivot.\n //\n // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.\n for (var j = p; j < r; j++) {\n if (comparator(ary[j], pivot) <= 0) {\n i += 1;\n swap(ary, i, j);\n }\n }\n\n swap(ary, i + 1, j);\n var q = i + 1;\n\n // (2) Recurse on each half.\n\n doQuickSort(ary, comparator, p, q - 1);\n doQuickSort(ary, comparator, q + 1, r);\n }\n }\n\n /**\n * Sort the given array in-place with the given comparator function.\n *\n * @param {Array} ary\n * An array to sort.\n * @param {function} comparator\n * Function to use to compare two items.\n */\n exports.quickSort = function (ary, comparator) {\n doQuickSort(ary, comparator, 0, ary.length - 1);\n };\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/quick-sort.js\n ** module id = 9\n ** module chunks = 0\n **/","/* -*- Mode: js; js-indent-level: 2; -*- */\n/*\n * Copyright 2011 Mozilla Foundation and contributors\n * Licensed under the New BSD license. See LICENSE or:\n * http://opensource.org/licenses/BSD-3-Clause\n */\n{\n var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;\n var util = require('./util');\n\n // Matches a Windows-style `\\r\\n` newline or a `\\n` newline used by all other\n // operating systems these days (capturing the result).\n var REGEX_NEWLINE = /(\\r?\\n)/;\n\n // Newline character code for charCodeAt() comparisons\n var NEWLINE_CODE = 10;\n\n // Private symbol for identifying `SourceNode`s when multiple versions of\n // the source-map library are loaded. This MUST NOT CHANGE across\n // versions!\n var isSourceNode = \"$$$isSourceNode$$$\";\n\n /**\n * SourceNodes provide a way to abstract over interpolating/concatenating\n * snippets of generated JavaScript source code while maintaining the line and\n * column information associated with the original source code.\n *\n * @param aLine The original line number.\n * @param aColumn The original column number.\n * @param aSource The original source's filename.\n * @param aChunks Optional. An array of strings which are snippets of\n * generated JS, or other SourceNodes.\n * @param aName The original identifier.\n */\n function SourceNode(aLine, aColumn, aSource, aChunks, aName) {\n this.children = [];\n this.sourceContents = {};\n this.line = aLine == null ? null : aLine;\n this.column = aColumn == null ? null : aColumn;\n this.source = aSource == null ? null : aSource;\n this.name = aName == null ? null : aName;\n this[isSourceNode] = true;\n if (aChunks != null) this.add(aChunks);\n }\n\n /**\n * Creates a SourceNode from generated code and a SourceMapConsumer.\n *\n * @param aGeneratedCode The generated code\n * @param aSourceMapConsumer The SourceMap for the generated code\n * @param aRelativePath Optional. The path that relative sources in the\n * SourceMapConsumer should be relative to.\n */\n SourceNode.fromStringWithSourceMap =\n function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {\n // The SourceNode we want to fill with the generated code\n // and the SourceMap\n var node = new SourceNode();\n\n // All even indices of this array are one line of the generated code,\n // while all odd indices are the newlines between two adjacent lines\n // (since `REGEX_NEWLINE` captures its match).\n // Processed fragments are removed from this array, by calling `shiftNextLine`.\n var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);\n var shiftNextLine = function() {\n var lineContents = remainingLines.shift();\n // The last line of a file might not have a newline.\n var newLine = remainingLines.shift() || \"\";\n return lineContents + newLine;\n };\n\n // We need to remember the position of \"remainingLines\"\n var lastGeneratedLine = 1, lastGeneratedColumn = 0;\n\n // The generate SourceNodes we need a code range.\n // To extract it current and last mapping is used.\n // Here we store the last mapping.\n var lastMapping = null;\n\n aSourceMapConsumer.eachMapping(function (mapping) {\n if (lastMapping !== null) {\n // We add the code from \"lastMapping\" to \"mapping\":\n // First check if there is a new line in between.\n if (lastGeneratedLine < mapping.generatedLine) {\n // Associate first line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n lastGeneratedLine++;\n lastGeneratedColumn = 0;\n // The remaining code is added without mapping\n } else {\n // There is no new line in between.\n // Associate the code between \"lastGeneratedColumn\" and\n // \"mapping.generatedColumn\" with \"lastMapping\"\n var nextLine = remainingLines[0];\n var code = nextLine.substr(0, mapping.generatedColumn -\n lastGeneratedColumn);\n remainingLines[0] = nextLine.substr(mapping.generatedColumn -\n lastGeneratedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n addMappingWithCode(lastMapping, code);\n // No more remaining code, continue\n lastMapping = mapping;\n return;\n }\n }\n // We add the generated code until the first mapping\n // to the SourceNode without any mapping.\n // Each line is added as separate string.\n while (lastGeneratedLine < mapping.generatedLine) {\n node.add(shiftNextLine());\n lastGeneratedLine++;\n }\n if (lastGeneratedColumn < mapping.generatedColumn) {\n var nextLine = remainingLines[0];\n node.add(nextLine.substr(0, mapping.generatedColumn));\n remainingLines[0] = nextLine.substr(mapping.generatedColumn);\n lastGeneratedColumn = mapping.generatedColumn;\n }\n lastMapping = mapping;\n }, this);\n // We have processed all mappings.\n if (remainingLines.length > 0) {\n if (lastMapping) {\n // Associate the remaining code in the current line with \"lastMapping\"\n addMappingWithCode(lastMapping, shiftNextLine());\n }\n // and add the remaining lines without any mapping\n node.add(remainingLines.join(\"\"));\n }\n\n // Copy sourcesContent into SourceNode\n aSourceMapConsumer.sources.forEach(function (sourceFile) {\n var content = aSourceMapConsumer.sourceContentFor(sourceFile);\n if (content != null) {\n if (aRelativePath != null) {\n sourceFile = util.join(aRelativePath, sourceFile);\n }\n node.setSourceContent(sourceFile, content);\n }\n });\n\n return node;\n\n function addMappingWithCode(mapping, code) {\n if (mapping === null || mapping.source === undefined) {\n node.add(code);\n } else {\n var source = aRelativePath\n ? util.join(aRelativePath, mapping.source)\n : mapping.source;\n node.add(new SourceNode(mapping.originalLine,\n mapping.originalColumn,\n source,\n code,\n mapping.name));\n }\n }\n };\n\n /**\n * Add a chunk of generated JS to this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\n SourceNode.prototype.add = function SourceNode_add(aChunk) {\n if (Array.isArray(aChunk)) {\n aChunk.forEach(function (chunk) {\n this.add(chunk);\n }, this);\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n if (aChunk) {\n this.children.push(aChunk);\n }\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n };\n\n /**\n * Add a chunk of generated JS to the beginning of this source node.\n *\n * @param aChunk A string snippet of generated JS code, another instance of\n * SourceNode, or an array where each member is one of those things.\n */\n SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {\n if (Array.isArray(aChunk)) {\n for (var i = aChunk.length-1; i >= 0; i--) {\n this.prepend(aChunk[i]);\n }\n }\n else if (aChunk[isSourceNode] || typeof aChunk === \"string\") {\n this.children.unshift(aChunk);\n }\n else {\n throw new TypeError(\n \"Expected a SourceNode, string, or an array of SourceNodes and strings. Got \" + aChunk\n );\n }\n return this;\n };\n\n /**\n * Walk over the tree of JS snippets in this node and its children. The\n * walking function is called once for each snippet of JS and is passed that\n * snippet and the its original associated source's line/column location.\n *\n * @param aFn The traversal function.\n */\n SourceNode.prototype.walk = function SourceNode_walk(aFn) {\n var chunk;\n for (var i = 0, len = this.children.length; i < len; i++) {\n chunk = this.children[i];\n if (chunk[isSourceNode]) {\n chunk.walk(aFn);\n }\n else {\n if (chunk !== '') {\n aFn(chunk, { source: this.source,\n line: this.line,\n column: this.column,\n name: this.name });\n }\n }\n }\n };\n\n /**\n * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between\n * each of `this.children`.\n *\n * @param aSep The separator.\n */\n SourceNode.prototype.join = function SourceNode_join(aSep) {\n var newChildren;\n var i;\n var len = this.children.length;\n if (len > 0) {\n newChildren = [];\n for (i = 0; i < len-1; i++) {\n newChildren.push(this.children[i]);\n newChildren.push(aSep);\n }\n newChildren.push(this.children[i]);\n this.children = newChildren;\n }\n return this;\n };\n\n /**\n * Call String.prototype.replace on the very right-most source snippet. Useful\n * for trimming whitespace from the end of a source node, etc.\n *\n * @param aPattern The pattern to replace.\n * @param aReplacement The thing to replace the pattern with.\n */\n SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {\n var lastChild = this.children[this.children.length - 1];\n if (lastChild[isSourceNode]) {\n lastChild.replaceRight(aPattern, aReplacement);\n }\n else if (typeof lastChild === 'string') {\n this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);\n }\n else {\n this.children.push(''.replace(aPattern, aReplacement));\n }\n return this;\n };\n\n /**\n * Set the source content for a source file. This will be added to the SourceMapGenerator\n * in the sourcesContent field.\n *\n * @param aSourceFile The filename of the source file\n * @param aSourceContent The content of the source file\n */\n SourceNode.prototype.setSourceContent =\n function SourceNode_setSourceContent(aSourceFile, aSourceContent) {\n this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;\n };\n\n /**\n * Walk over the tree of SourceNodes. The walking function is called for each\n * source file content and is passed the filename and source content.\n *\n * @param aFn The traversal function.\n */\n SourceNode.prototype.walkSourceContents =\n function SourceNode_walkSourceContents(aFn) {\n for (var i = 0, len = this.children.length; i < len; i++) {\n if (this.children[i][isSourceNode]) {\n this.children[i].walkSourceContents(aFn);\n }\n }\n\n var sources = Object.keys(this.sourceContents);\n for (var i = 0, len = sources.length; i < len; i++) {\n aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);\n }\n };\n\n /**\n * Return the string representation of this source node. Walks over the tree\n * and concatenates all the various snippets together to one string.\n */\n SourceNode.prototype.toString = function SourceNode_toString() {\n var str = \"\";\n this.walk(function (chunk) {\n str += chunk;\n });\n return str;\n };\n\n /**\n * Returns the string representation of this source node along with a source\n * map.\n */\n SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {\n var generated = {\n code: \"\",\n line: 1,\n column: 0\n };\n var map = new SourceMapGenerator(aArgs);\n var sourceMappingActive = false;\n var lastOriginalSource = null;\n var lastOriginalLine = null;\n var lastOriginalColumn = null;\n var lastOriginalName = null;\n this.walk(function (chunk, original) {\n generated.code += chunk;\n if (original.source !== null\n && original.line !== null\n && original.column !== null) {\n if(lastOriginalSource !== original.source\n || lastOriginalLine !== original.line\n || lastOriginalColumn !== original.column\n || lastOriginalName !== original.name) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n lastOriginalSource = original.source;\n lastOriginalLine = original.line;\n lastOriginalColumn = original.column;\n lastOriginalName = original.name;\n sourceMappingActive = true;\n } else if (sourceMappingActive) {\n map.addMapping({\n generated: {\n line: generated.line,\n column: generated.column\n }\n });\n lastOriginalSource = null;\n sourceMappingActive = false;\n }\n for (var idx = 0, length = chunk.length; idx < length; idx++) {\n if (chunk.charCodeAt(idx) === NEWLINE_CODE) {\n generated.line++;\n generated.column = 0;\n // Mappings end at eol\n if (idx + 1 === length) {\n lastOriginalSource = null;\n sourceMappingActive = false;\n } else if (sourceMappingActive) {\n map.addMapping({\n source: original.source,\n original: {\n line: original.line,\n column: original.column\n },\n generated: {\n line: generated.line,\n column: generated.column\n },\n name: original.name\n });\n }\n } else {\n generated.column++;\n }\n }\n });\n this.walkSourceContents(function (sourceFile, sourceContent) {\n map.setSourceContent(sourceFile, sourceContent);\n });\n\n return { code: generated.code, map: map };\n };\n\n exports.SourceNode = SourceNode;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./lib/source-node.js\n ** module id = 10\n ** module chunks = 0\n **/"],"sourceRoot":""} \ No newline at end of file
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/array-set.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/array-set.js
deleted file mode 100644
index 0ffbb9fd98..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/array-set.js
+++ /dev/null
@@ -1,104 +0,0 @@
-/* -*- Mode: js; js-indent-level: 2; -*- */
-/*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
-{
- var util = require('./util');
-
- /**
- * A data structure which is a combination of an array and a set. Adding a new
- * member is O(1), testing for membership is O(1), and finding the index of an
- * element is O(1). Removing elements from the set is not supported. Only
- * strings are supported for membership.
- */
- function ArraySet() {
- this._array = [];
- this._set = {};
- }
-
- /**
- * Static method for creating ArraySet instances from an existing array.
- */
- ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
- var set = new ArraySet();
- for (var i = 0, len = aArray.length; i < len; i++) {
- set.add(aArray[i], aAllowDuplicates);
- }
- return set;
- };
-
- /**
- * Return how many unique items are in this ArraySet. If duplicates have been
- * added, than those do not count towards the size.
- *
- * @returns Number
- */
- ArraySet.prototype.size = function ArraySet_size() {
- return Object.getOwnPropertyNames(this._set).length;
- };
-
- /**
- * Add the given string to this set.
- *
- * @param String aStr
- */
- ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
- var sStr = util.toSetString(aStr);
- var isDuplicate = this._set.hasOwnProperty(sStr);
- var idx = this._array.length;
- if (!isDuplicate || aAllowDuplicates) {
- this._array.push(aStr);
- }
- if (!isDuplicate) {
- this._set[sStr] = idx;
- }
- };
-
- /**
- * Is the given string a member of this set?
- *
- * @param String aStr
- */
- ArraySet.prototype.has = function ArraySet_has(aStr) {
- var sStr = util.toSetString(aStr);
- return this._set.hasOwnProperty(sStr);
- };
-
- /**
- * What is the index of the given string in the array?
- *
- * @param String aStr
- */
- ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
- var sStr = util.toSetString(aStr);
- if (this._set.hasOwnProperty(sStr)) {
- return this._set[sStr];
- }
- throw new Error('"' + aStr + '" is not in the set.');
- };
-
- /**
- * What is the element at the given index?
- *
- * @param Number aIdx
- */
- ArraySet.prototype.at = function ArraySet_at(aIdx) {
- if (aIdx >= 0 && aIdx < this._array.length) {
- return this._array[aIdx];
- }
- throw new Error('No element indexed by ' + aIdx);
- };
-
- /**
- * Returns the array representation of this set (which has the proper indices
- * indicated by indexOf). Note that this is a copy of the internal array used
- * for storing the members so that no one can mess with internal state.
- */
- ArraySet.prototype.toArray = function ArraySet_toArray() {
- return this._array.slice();
- };
-
- exports.ArraySet = ArraySet;
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/base64-vlq.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/base64-vlq.js
deleted file mode 100644
index f2a07f7c37..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/base64-vlq.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/* -*- Mode: js; js-indent-level: 2; -*- */
-/*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- *
- * Based on the Base 64 VLQ implementation in Closure Compiler:
- * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
- *
- * Copyright 2011 The Closure Compiler Authors. All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-{
- var base64 = require('./base64');
-
- // A single base 64 digit can contain 6 bits of data. For the base 64 variable
- // length quantities we use in the source map spec, the first bit is the sign,
- // the next four bits are the actual value, and the 6th bit is the
- // continuation bit. The continuation bit tells us whether there are more
- // digits in this value following this digit.
- //
- // Continuation
- // | Sign
- // | |
- // V V
- // 101011
-
- var VLQ_BASE_SHIFT = 5;
-
- // binary: 100000
- var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
-
- // binary: 011111
- var VLQ_BASE_MASK = VLQ_BASE - 1;
-
- // binary: 100000
- var VLQ_CONTINUATION_BIT = VLQ_BASE;
-
- /**
- * Converts from a two-complement value to a value where the sign bit is
- * placed in the least significant bit. For example, as decimals:
- * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
- * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
- */
- function toVLQSigned(aValue) {
- return aValue < 0
- ? ((-aValue) << 1) + 1
- : (aValue << 1) + 0;
- }
-
- /**
- * Converts to a two-complement value from a value where the sign bit is
- * placed in the least significant bit. For example, as decimals:
- * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
- * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
- */
- function fromVLQSigned(aValue) {
- var isNegative = (aValue & 1) === 1;
- var shifted = aValue >> 1;
- return isNegative
- ? -shifted
- : shifted;
- }
-
- /**
- * Returns the base 64 VLQ encoded value.
- */
- exports.encode = function base64VLQ_encode(aValue) {
- var encoded = "";
- var digit;
-
- var vlq = toVLQSigned(aValue);
-
- do {
- digit = vlq & VLQ_BASE_MASK;
- vlq >>>= VLQ_BASE_SHIFT;
- if (vlq > 0) {
- // There are still more digits in this value, so we must make sure the
- // continuation bit is marked.
- digit |= VLQ_CONTINUATION_BIT;
- }
- encoded += base64.encode(digit);
- } while (vlq > 0);
-
- return encoded;
- };
-
- /**
- * Decodes the next base 64 VLQ value from the given string and returns the
- * value and the rest of the string via the out parameter.
- */
- exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
- var strLen = aStr.length;
- var result = 0;
- var shift = 0;
- var continuation, digit;
-
- do {
- if (aIndex >= strLen) {
- throw new Error("Expected more digits in base 64 VLQ value.");
- }
-
- digit = base64.decode(aStr.charCodeAt(aIndex++));
- if (digit === -1) {
- throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
- }
-
- continuation = !!(digit & VLQ_CONTINUATION_BIT);
- digit &= VLQ_BASE_MASK;
- result = result + (digit << shift);
- shift += VLQ_BASE_SHIFT;
- } while (continuation);
-
- aOutParam.value = fromVLQSigned(result);
- aOutParam.rest = aIndex;
- };
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/base64.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/base64.js
deleted file mode 100644
index dfda6ce186..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/base64.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- Mode: js; js-indent-level: 2; -*- */
-/*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
-{
- var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
-
- /**
- * Encode an integer in the range of 0 to 63 to a single base 64 digit.
- */
- exports.encode = function (number) {
- if (0 <= number && number < intToCharMap.length) {
- return intToCharMap[number];
- }
- throw new TypeError("Must be between 0 and 63: " + number);
- };
-
- /**
- * Decode a single base 64 character code digit to an integer. Returns -1 on
- * failure.
- */
- exports.decode = function (charCode) {
- var bigA = 65; // 'A'
- var bigZ = 90; // 'Z'
-
- var littleA = 97; // 'a'
- var littleZ = 122; // 'z'
-
- var zero = 48; // '0'
- var nine = 57; // '9'
-
- var plus = 43; // '+'
- var slash = 47; // '/'
-
- var littleOffset = 26;
- var numberOffset = 52;
-
- // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
- if (bigA <= charCode && charCode <= bigZ) {
- return (charCode - bigA);
- }
-
- // 26 - 51: abcdefghijklmnopqrstuvwxyz
- if (littleA <= charCode && charCode <= littleZ) {
- return (charCode - littleA + littleOffset);
- }
-
- // 52 - 61: 0123456789
- if (zero <= charCode && charCode <= nine) {
- return (charCode - zero + numberOffset);
- }
-
- // 62: +
- if (charCode == plus) {
- return 62;
- }
-
- // 63: /
- if (charCode == slash) {
- return 63;
- }
-
- // Invalid base64 digit.
- return -1;
- };
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/binary-search.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/binary-search.js
deleted file mode 100644
index 03161e6bf3..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/binary-search.js
+++ /dev/null
@@ -1,112 +0,0 @@
-/* -*- Mode: js; js-indent-level: 2; -*- */
-/*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
-{
- exports.GREATEST_LOWER_BOUND = 1;
- exports.LEAST_UPPER_BOUND = 2;
-
- /**
- * Recursive implementation of binary search.
- *
- * @param aLow Indices here and lower do not contain the needle.
- * @param aHigh Indices here and higher do not contain the needle.
- * @param aNeedle The element being searched for.
- * @param aHaystack The non-empty array being searched.
- * @param aCompare Function which takes two elements and returns -1, 0, or 1.
- * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
- * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- */
- function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
- // This function terminates when one of the following is true:
- //
- // 1. We find the exact element we are looking for.
- //
- // 2. We did not find the exact element, but we can return the index of
- // the next-closest element.
- //
- // 3. We did not find the exact element, and there is no next-closest
- // element than the one we are searching for, so we return -1.
- var mid = Math.floor((aHigh - aLow) / 2) + aLow;
- var cmp = aCompare(aNeedle, aHaystack[mid], true);
- if (cmp === 0) {
- // Found the element we are looking for.
- return mid;
- }
- else if (cmp > 0) {
- // Our needle is greater than aHaystack[mid].
- if (aHigh - mid > 1) {
- // The element is in the upper half.
- return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
- }
-
- // The exact needle element was not found in this haystack. Determine if
- // we are in termination case (3) or (2) and return the appropriate thing.
- if (aBias == exports.LEAST_UPPER_BOUND) {
- return aHigh < aHaystack.length ? aHigh : -1;
- } else {
- return mid;
- }
- }
- else {
- // Our needle is less than aHaystack[mid].
- if (mid - aLow > 1) {
- // The element is in the lower half.
- return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
- }
-
- // we are in termination case (3) or (2) and return the appropriate thing.
- if (aBias == exports.LEAST_UPPER_BOUND) {
- return mid;
- } else {
- return aLow < 0 ? -1 : aLow;
- }
- }
- }
-
- /**
- * This is an implementation of binary search which will always try and return
- * the index of the closest element if there is no exact hit. This is because
- * mappings between original and generated line/col pairs are single points,
- * and there is an implicit region between each of them, so a miss just means
- * that you aren't on the very start of a region.
- *
- * @param aNeedle The element you are looking for.
- * @param aHaystack The array that is being searched.
- * @param aCompare A function which takes the needle and an element in the
- * array and returns -1, 0, or 1 depending on whether the needle is less
- * than, equal to, or greater than the element, respectively.
- * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
- * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
- */
- exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
- if (aHaystack.length === 0) {
- return -1;
- }
-
- var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
- aCompare, aBias || exports.GREATEST_LOWER_BOUND);
- if (index < 0) {
- return -1;
- }
-
- // We have found either the exact element, or the next-closest element than
- // the one we are searching for. However, there may be more than one such
- // element. Make sure we always return the smallest of these.
- while (index - 1 >= 0) {
- if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
- break;
- }
- --index;
- }
-
- return index;
- };
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/mapping-list.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/mapping-list.js
deleted file mode 100644
index 287a6076a8..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/mapping-list.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- Mode: js; js-indent-level: 2; -*- */
-/*
- * Copyright 2014 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
-{
- var util = require('./util');
-
- /**
- * Determine whether mappingB is after mappingA with respect to generated
- * position.
- */
- function generatedPositionAfter(mappingA, mappingB) {
- // Optimized for most common case
- var lineA = mappingA.generatedLine;
- var lineB = mappingB.generatedLine;
- var columnA = mappingA.generatedColumn;
- var columnB = mappingB.generatedColumn;
- return lineB > lineA || lineB == lineA && columnB >= columnA ||
- util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
- }
-
- /**
- * A data structure to provide a sorted view of accumulated mappings in a
- * performance conscious manner. It trades a neglibable overhead in general
- * case for a large speedup in case of mappings being added in order.
- */
- function MappingList() {
- this._array = [];
- this._sorted = true;
- // Serves as infimum
- this._last = {generatedLine: -1, generatedColumn: 0};
- }
-
- /**
- * Iterate through internal items. This method takes the same arguments that
- * `Array.prototype.forEach` takes.
- *
- * NOTE: The order of the mappings is NOT guaranteed.
- */
- MappingList.prototype.unsortedForEach =
- function MappingList_forEach(aCallback, aThisArg) {
- this._array.forEach(aCallback, aThisArg);
- };
-
- /**
- * Add the given source mapping.
- *
- * @param Object aMapping
- */
- MappingList.prototype.add = function MappingList_add(aMapping) {
- if (generatedPositionAfter(this._last, aMapping)) {
- this._last = aMapping;
- this._array.push(aMapping);
- } else {
- this._sorted = false;
- this._array.push(aMapping);
- }
- };
-
- /**
- * Returns the flat, sorted array of mappings. The mappings are sorted by
- * generated position.
- *
- * WARNING: This method returns internal data without copying, for
- * performance. The return value must NOT be mutated, and should be treated as
- * an immutable borrow. If you want to take ownership, you must make your own
- * copy.
- */
- MappingList.prototype.toArray = function MappingList_toArray() {
- if (!this._sorted) {
- this._array.sort(util.compareByGeneratedPositionsInflated);
- this._sorted = true;
- }
- return this._array;
- };
-
- exports.MappingList = MappingList;
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/quick-sort.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/quick-sort.js
deleted file mode 100644
index f92823cea5..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/quick-sort.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: js; js-indent-level: 2; -*- */
-/*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
-{
- // It turns out that some (most?) JavaScript engines don't self-host
- // `Array.prototype.sort`. This makes sense because C++ will likely remain
- // faster than JS when doing raw CPU-intensive sorting. However, when using a
- // custom comparator function, calling back and forth between the VM's C++ and
- // JIT'd JS is rather slow *and* loses JIT type information, resulting in
- // worse generated code for the comparator function than would be optimal. In
- // fact, when sorting with a comparator, these costs outweigh the benefits of
- // sorting in C++. By using our own JS-implemented Quick Sort (below), we get
- // a ~3500ms mean speed-up in `bench/bench.html`.
-
- /**
- * Swap the elements indexed by `x` and `y` in the array `ary`.
- *
- * @param {Array} ary
- * The array.
- * @param {Number} x
- * The index of the first item.
- * @param {Number} y
- * The index of the second item.
- */
- function swap(ary, x, y) {
- var temp = ary[x];
- ary[x] = ary[y];
- ary[y] = temp;
- }
-
- /**
- * Returns a random integer within the range `low .. high` inclusive.
- *
- * @param {Number} low
- * The lower bound on the range.
- * @param {Number} high
- * The upper bound on the range.
- */
- function randomIntInRange(low, high) {
- return Math.round(low + (Math.random() * (high - low)));
- }
-
- /**
- * The Quick Sort algorithm.
- *
- * @param {Array} ary
- * An array to sort.
- * @param {function} comparator
- * Function to use to compare two items.
- * @param {Number} p
- * Start index of the array
- * @param {Number} r
- * End index of the array
- */
- function doQuickSort(ary, comparator, p, r) {
- // If our lower bound is less than our upper bound, we (1) partition the
- // array into two pieces and (2) recurse on each half. If it is not, this is
- // the empty array and our base case.
-
- if (p < r) {
- // (1) Partitioning.
- //
- // The partitioning chooses a pivot between `p` and `r` and moves all
- // elements that are less than or equal to the pivot to the before it, and
- // all the elements that are greater than it after it. The effect is that
- // once partition is done, the pivot is in the exact place it will be when
- // the array is put in sorted order, and it will not need to be moved
- // again. This runs in O(n) time.
-
- // Always choose a random pivot so that an input array which is reverse
- // sorted does not cause O(n^2) running time.
- var pivotIndex = randomIntInRange(p, r);
- var i = p - 1;
-
- swap(ary, pivotIndex, r);
- var pivot = ary[r];
-
- // Immediately after `j` is incremented in this loop, the following hold
- // true:
- //
- // * Every element in `ary[p .. i]` is less than or equal to the pivot.
- //
- // * Every element in `ary[i+1 .. j-1]` is greater than the pivot.
- for (var j = p; j < r; j++) {
- if (comparator(ary[j], pivot) <= 0) {
- i += 1;
- swap(ary, i, j);
- }
- }
-
- swap(ary, i + 1, j);
- var q = i + 1;
-
- // (2) Recurse on each half.
-
- doQuickSort(ary, comparator, p, q - 1);
- doQuickSort(ary, comparator, q + 1, r);
- }
- }
-
- /**
- * Sort the given array in-place with the given comparator function.
- *
- * @param {Array} ary
- * An array to sort.
- * @param {function} comparator
- * Function to use to compare two items.
- */
- exports.quickSort = function (ary, comparator) {
- doQuickSort(ary, comparator, 0, ary.length - 1);
- };
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/source-map-consumer.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/source-map-consumer.js
deleted file mode 100644
index 242f21c6c5..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/source-map-consumer.js
+++ /dev/null
@@ -1,1082 +0,0 @@
-/* -*- Mode: js; js-indent-level: 2; -*- */
-/*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
-{
- var util = require('./util');
- var binarySearch = require('./binary-search');
- var ArraySet = require('./array-set').ArraySet;
- var base64VLQ = require('./base64-vlq');
- var quickSort = require('./quick-sort').quickSort;
-
- function SourceMapConsumer(aSourceMap) {
- var sourceMap = aSourceMap;
- if (typeof aSourceMap === 'string') {
- sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
- }
-
- return sourceMap.sections != null
- ? new IndexedSourceMapConsumer(sourceMap)
- : new BasicSourceMapConsumer(sourceMap);
- }
-
- SourceMapConsumer.fromSourceMap = function(aSourceMap) {
- return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
- }
-
- /**
- * The version of the source mapping spec that we are consuming.
- */
- SourceMapConsumer.prototype._version = 3;
-
- // `__generatedMappings` and `__originalMappings` are arrays that hold the
- // parsed mapping coordinates from the source map's "mappings" attribute. They
- // are lazily instantiated, accessed via the `_generatedMappings` and
- // `_originalMappings` getters respectively, and we only parse the mappings
- // and create these arrays once queried for a source location. We jump through
- // these hoops because there can be many thousands of mappings, and parsing
- // them is expensive, so we only want to do it if we must.
- //
- // Each object in the arrays is of the form:
- //
- // {
- // generatedLine: The line number in the generated code,
- // generatedColumn: The column number in the generated code,
- // source: The path to the original source file that generated this
- // chunk of code,
- // originalLine: The line number in the original source that
- // corresponds to this chunk of generated code,
- // originalColumn: The column number in the original source that
- // corresponds to this chunk of generated code,
- // name: The name of the original symbol which generated this chunk of
- // code.
- // }
- //
- // All properties except for `generatedLine` and `generatedColumn` can be
- // `null`.
- //
- // `_generatedMappings` is ordered by the generated positions.
- //
- // `_originalMappings` is ordered by the original positions.
-
- SourceMapConsumer.prototype.__generatedMappings = null;
- Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
- get: function () {
- if (!this.__generatedMappings) {
- this._parseMappings(this._mappings, this.sourceRoot);
- }
-
- return this.__generatedMappings;
- }
- });
-
- SourceMapConsumer.prototype.__originalMappings = null;
- Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
- get: function () {
- if (!this.__originalMappings) {
- this._parseMappings(this._mappings, this.sourceRoot);
- }
-
- return this.__originalMappings;
- }
- });
-
- SourceMapConsumer.prototype._charIsMappingSeparator =
- function SourceMapConsumer_charIsMappingSeparator(aStr, index) {
- var c = aStr.charAt(index);
- return c === ";" || c === ",";
- };
-
- /**
- * Parse the mappings in a string in to a data structure which we can easily
- * query (the ordered arrays in the `this.__generatedMappings` and
- * `this.__originalMappings` properties).
- */
- SourceMapConsumer.prototype._parseMappings =
- function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
- throw new Error("Subclasses must implement _parseMappings");
- };
-
- SourceMapConsumer.GENERATED_ORDER = 1;
- SourceMapConsumer.ORIGINAL_ORDER = 2;
-
- SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
- SourceMapConsumer.LEAST_UPPER_BOUND = 2;
-
- /**
- * Iterate over each mapping between an original source/line/column and a
- * generated line/column in this source map.
- *
- * @param Function aCallback
- * The function that is called with each mapping.
- * @param Object aContext
- * Optional. If specified, this object will be the value of `this` every
- * time that `aCallback` is called.
- * @param aOrder
- * Either `SourceMapConsumer.GENERATED_ORDER` or
- * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
- * iterate over the mappings sorted by the generated file's line/column
- * order or the original's source/line/column order, respectively. Defaults to
- * `SourceMapConsumer.GENERATED_ORDER`.
- */
- SourceMapConsumer.prototype.eachMapping =
- function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
- var context = aContext || null;
- var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
-
- var mappings;
- switch (order) {
- case SourceMapConsumer.GENERATED_ORDER:
- mappings = this._generatedMappings;
- break;
- case SourceMapConsumer.ORIGINAL_ORDER:
- mappings = this._originalMappings;
- break;
- default:
- throw new Error("Unknown order of iteration.");
- }
-
- var sourceRoot = this.sourceRoot;
- mappings.map(function (mapping) {
- var source = mapping.source === null ? null : this._sources.at(mapping.source);
- if (source != null && sourceRoot != null) {
- source = util.join(sourceRoot, source);
- }
- return {
- source: source,
- generatedLine: mapping.generatedLine,
- generatedColumn: mapping.generatedColumn,
- originalLine: mapping.originalLine,
- originalColumn: mapping.originalColumn,
- name: mapping.name === null ? null : this._names.at(mapping.name)
- };
- }, this).forEach(aCallback, context);
- };
-
- /**
- * Returns all generated line and column information for the original source,
- * line, and column provided. If no column is provided, returns all mappings
- * corresponding to a either the line we are searching for or the next
- * closest line that has any mappings. Otherwise, returns all mappings
- * corresponding to the given line and either the column we are searching for
- * or the next closest column that has any offsets.
- *
- * The only argument is an object with the following properties:
- *
- * - source: The filename of the original source.
- * - line: The line number in the original source.
- * - column: Optional. the column number in the original source.
- *
- * and an array of objects is returned, each with the following properties:
- *
- * - line: The line number in the generated source, or null.
- * - column: The column number in the generated source, or null.
- */
- SourceMapConsumer.prototype.allGeneratedPositionsFor =
- function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
- var line = util.getArg(aArgs, 'line');
-
- // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
- // returns the index of the closest mapping less than the needle. By
- // setting needle.originalColumn to 0, we thus find the last mapping for
- // the given line, provided such a mapping exists.
- var needle = {
- source: util.getArg(aArgs, 'source'),
- originalLine: line,
- originalColumn: util.getArg(aArgs, 'column', 0)
- };
-
- if (this.sourceRoot != null) {
- needle.source = util.relative(this.sourceRoot, needle.source);
- }
- if (!this._sources.has(needle.source)) {
- return [];
- }
- needle.source = this._sources.indexOf(needle.source);
-
- var mappings = [];
-
- var index = this._findMapping(needle,
- this._originalMappings,
- "originalLine",
- "originalColumn",
- util.compareByOriginalPositions,
- binarySearch.LEAST_UPPER_BOUND);
- if (index >= 0) {
- var mapping = this._originalMappings[index];
-
- if (aArgs.column === undefined) {
- var originalLine = mapping.originalLine;
-
- // Iterate until either we run out of mappings, or we run into
- // a mapping for a different line than the one we found. Since
- // mappings are sorted, this is guaranteed to find all mappings for
- // the line we found.
- while (mapping && mapping.originalLine === originalLine) {
- mappings.push({
- line: util.getArg(mapping, 'generatedLine', null),
- column: util.getArg(mapping, 'generatedColumn', null),
- lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
- });
-
- mapping = this._originalMappings[++index];
- }
- } else {
- var originalColumn = mapping.originalColumn;
-
- // Iterate until either we run out of mappings, or we run into
- // a mapping for a different line than the one we were searching for.
- // Since mappings are sorted, this is guaranteed to find all mappings for
- // the line we are searching for.
- while (mapping &&
- mapping.originalLine === line &&
- mapping.originalColumn == originalColumn) {
- mappings.push({
- line: util.getArg(mapping, 'generatedLine', null),
- column: util.getArg(mapping, 'generatedColumn', null),
- lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
- });
-
- mapping = this._originalMappings[++index];
- }
- }
- }
-
- return mappings;
- };
-
- exports.SourceMapConsumer = SourceMapConsumer;
-
- /**
- * A BasicSourceMapConsumer instance represents a parsed source map which we can
- * query for information about the original file positions by giving it a file
- * position in the generated source.
- *
- * The only parameter is the raw source map (either as a JSON string, or
- * already parsed to an object). According to the spec, source maps have the
- * following attributes:
- *
- * - version: Which version of the source map spec this map is following.
- * - sources: An array of URLs to the original source files.
- * - names: An array of identifiers which can be referrenced by individual mappings.
- * - sourceRoot: Optional. The URL root from which all sources are relative.
- * - sourcesContent: Optional. An array of contents of the original source files.
- * - mappings: A string of base64 VLQs which contain the actual mappings.
- * - file: Optional. The generated file this source map is associated with.
- *
- * Here is an example source map, taken from the source map spec[0]:
- *
- * {
- * version : 3,
- * file: "out.js",
- * sourceRoot : "",
- * sources: ["foo.js", "bar.js"],
- * names: ["src", "maps", "are", "fun"],
- * mappings: "AA,AB;;ABCDE;"
- * }
- *
- * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
- */
- function BasicSourceMapConsumer(aSourceMap) {
- var sourceMap = aSourceMap;
- if (typeof aSourceMap === 'string') {
- sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
- }
-
- var version = util.getArg(sourceMap, 'version');
- var sources = util.getArg(sourceMap, 'sources');
- // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
- // requires the array) to play nice here.
- var names = util.getArg(sourceMap, 'names', []);
- var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
- var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
- var mappings = util.getArg(sourceMap, 'mappings');
- var file = util.getArg(sourceMap, 'file', null);
-
- // Once again, Sass deviates from the spec and supplies the version as a
- // string rather than a number, so we use loose equality checking here.
- if (version != this._version) {
- throw new Error('Unsupported version: ' + version);
- }
-
- sources = sources
- // Some source maps produce relative source paths like "./foo.js" instead of
- // "foo.js". Normalize these first so that future comparisons will succeed.
- // See bugzil.la/1090768.
- .map(util.normalize)
- // Always ensure that absolute sources are internally stored relative to
- // the source root, if the source root is absolute. Not doing this would
- // be particularly problematic when the source root is a prefix of the
- // source (valid, but why??). See github issue #199 and bugzil.la/1188982.
- .map(function (source) {
- return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source)
- ? util.relative(sourceRoot, source)
- : source;
- });
-
- // Pass `true` below to allow duplicate names and sources. While source maps
- // are intended to be compressed and deduplicated, the TypeScript compiler
- // sometimes generates source maps with duplicates in them. See Github issue
- // #72 and bugzil.la/889492.
- this._names = ArraySet.fromArray(names, true);
- this._sources = ArraySet.fromArray(sources, true);
-
- this.sourceRoot = sourceRoot;
- this.sourcesContent = sourcesContent;
- this._mappings = mappings;
- this.file = file;
- }
-
- BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
- BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
-
- /**
- * Create a BasicSourceMapConsumer from a SourceMapGenerator.
- *
- * @param SourceMapGenerator aSourceMap
- * The source map that will be consumed.
- * @returns BasicSourceMapConsumer
- */
- BasicSourceMapConsumer.fromSourceMap =
- function SourceMapConsumer_fromSourceMap(aSourceMap) {
- var smc = Object.create(BasicSourceMapConsumer.prototype);
-
- var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
- var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
- smc.sourceRoot = aSourceMap._sourceRoot;
- smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
- smc.sourceRoot);
- smc.file = aSourceMap._file;
-
- // Because we are modifying the entries (by converting string sources and
- // names to indices into the sources and names ArraySets), we have to make
- // a copy of the entry or else bad things happen. Shared mutable state
- // strikes again! See github issue #191.
-
- var generatedMappings = aSourceMap._mappings.toArray().slice();
- var destGeneratedMappings = smc.__generatedMappings = [];
- var destOriginalMappings = smc.__originalMappings = [];
-
- for (var i = 0, length = generatedMappings.length; i < length; i++) {
- var srcMapping = generatedMappings[i];
- var destMapping = new Mapping;
- destMapping.generatedLine = srcMapping.generatedLine;
- destMapping.generatedColumn = srcMapping.generatedColumn;
-
- if (srcMapping.source) {
- destMapping.source = sources.indexOf(srcMapping.source);
- destMapping.originalLine = srcMapping.originalLine;
- destMapping.originalColumn = srcMapping.originalColumn;
-
- if (srcMapping.name) {
- destMapping.name = names.indexOf(srcMapping.name);
- }
-
- destOriginalMappings.push(destMapping);
- }
-
- destGeneratedMappings.push(destMapping);
- }
-
- quickSort(smc.__originalMappings, util.compareByOriginalPositions);
-
- return smc;
- };
-
- /**
- * The version of the source mapping spec that we are consuming.
- */
- BasicSourceMapConsumer.prototype._version = 3;
-
- /**
- * The list of original sources.
- */
- Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
- get: function () {
- return this._sources.toArray().map(function (s) {
- return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
- }, this);
- }
- });
-
- /**
- * Provide the JIT with a nice shape / hidden class.
- */
- function Mapping() {
- this.generatedLine = 0;
- this.generatedColumn = 0;
- this.source = null;
- this.originalLine = null;
- this.originalColumn = null;
- this.name = null;
- }
-
- /**
- * Parse the mappings in a string in to a data structure which we can easily
- * query (the ordered arrays in the `this.__generatedMappings` and
- * `this.__originalMappings` properties).
- */
- BasicSourceMapConsumer.prototype._parseMappings =
- function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
- var generatedLine = 1;
- var previousGeneratedColumn = 0;
- var previousOriginalLine = 0;
- var previousOriginalColumn = 0;
- var previousSource = 0;
- var previousName = 0;
- var length = aStr.length;
- var index = 0;
- var cachedSegments = {};
- var temp = {};
- var originalMappings = [];
- var generatedMappings = [];
- var mapping, str, segment, end, value;
-
- while (index < length) {
- if (aStr.charAt(index) === ';') {
- generatedLine++;
- index++;
- previousGeneratedColumn = 0;
- }
- else if (aStr.charAt(index) === ',') {
- index++;
- }
- else {
- mapping = new Mapping();
- mapping.generatedLine = generatedLine;
-
- // Because each offset is encoded relative to the previous one,
- // many segments often have the same encoding. We can exploit this
- // fact by caching the parsed variable length fields of each segment,
- // allowing us to avoid a second parse if we encounter the same
- // segment again.
- for (end = index; end < length; end++) {
- if (this._charIsMappingSeparator(aStr, end)) {
- break;
- }
- }
- str = aStr.slice(index, end);
-
- segment = cachedSegments[str];
- if (segment) {
- index += str.length;
- } else {
- segment = [];
- while (index < end) {
- base64VLQ.decode(aStr, index, temp);
- value = temp.value;
- index = temp.rest;
- segment.push(value);
- }
-
- if (segment.length === 2) {
- throw new Error('Found a source, but no line and column');
- }
-
- if (segment.length === 3) {
- throw new Error('Found a source and line, but no column');
- }
-
- cachedSegments[str] = segment;
- }
-
- // Generated column.
- mapping.generatedColumn = previousGeneratedColumn + segment[0];
- previousGeneratedColumn = mapping.generatedColumn;
-
- if (segment.length > 1) {
- // Original source.
- mapping.source = previousSource + segment[1];
- previousSource += segment[1];
-
- // Original line.
- mapping.originalLine = previousOriginalLine + segment[2];
- previousOriginalLine = mapping.originalLine;
- // Lines are stored 0-based
- mapping.originalLine += 1;
-
- // Original column.
- mapping.originalColumn = previousOriginalColumn + segment[3];
- previousOriginalColumn = mapping.originalColumn;
-
- if (segment.length > 4) {
- // Original name.
- mapping.name = previousName + segment[4];
- previousName += segment[4];
- }
- }
-
- generatedMappings.push(mapping);
- if (typeof mapping.originalLine === 'number') {
- originalMappings.push(mapping);
- }
- }
- }
-
- quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated);
- this.__generatedMappings = generatedMappings;
-
- quickSort(originalMappings, util.compareByOriginalPositions);
- this.__originalMappings = originalMappings;
- };
-
- /**
- * Find the mapping that best matches the hypothetical "needle" mapping that
- * we are searching for in the given "haystack" of mappings.
- */
- BasicSourceMapConsumer.prototype._findMapping =
- function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
- aColumnName, aComparator, aBias) {
- // To return the position we are searching for, we must first find the
- // mapping for the given position and then return the opposite position it
- // points to. Because the mappings are sorted, we can use binary search to
- // find the best mapping.
-
- if (aNeedle[aLineName] <= 0) {
- throw new TypeError('Line must be greater than or equal to 1, got '
- + aNeedle[aLineName]);
- }
- if (aNeedle[aColumnName] < 0) {
- throw new TypeError('Column must be greater than or equal to 0, got '
- + aNeedle[aColumnName]);
- }
-
- return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
- };
-
- /**
- * Compute the last column for each generated mapping. The last column is
- * inclusive.
- */
- BasicSourceMapConsumer.prototype.computeColumnSpans =
- function SourceMapConsumer_computeColumnSpans() {
- for (var index = 0; index < this._generatedMappings.length; ++index) {
- var mapping = this._generatedMappings[index];
-
- // Mappings do not contain a field for the last generated columnt. We
- // can come up with an optimistic estimate, however, by assuming that
- // mappings are contiguous (i.e. given two consecutive mappings, the
- // first mapping ends where the second one starts).
- if (index + 1 < this._generatedMappings.length) {
- var nextMapping = this._generatedMappings[index + 1];
-
- if (mapping.generatedLine === nextMapping.generatedLine) {
- mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
- continue;
- }
- }
-
- // The last mapping for each line spans the entire line.
- mapping.lastGeneratedColumn = Infinity;
- }
- };
-
- /**
- * Returns the original source, line, and column information for the generated
- * source's line and column positions provided. The only argument is an object
- * with the following properties:
- *
- * - line: The line number in the generated source.
- * - column: The column number in the generated source.
- * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
- * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
- *
- * and an object is returned with the following properties:
- *
- * - source: The original source file, or null.
- * - line: The line number in the original source, or null.
- * - column: The column number in the original source, or null.
- * - name: The original identifier, or null.
- */
- BasicSourceMapConsumer.prototype.originalPositionFor =
- function SourceMapConsumer_originalPositionFor(aArgs) {
- var needle = {
- generatedLine: util.getArg(aArgs, 'line'),
- generatedColumn: util.getArg(aArgs, 'column')
- };
-
- var index = this._findMapping(
- needle,
- this._generatedMappings,
- "generatedLine",
- "generatedColumn",
- util.compareByGeneratedPositionsDeflated,
- util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
- );
-
- if (index >= 0) {
- var mapping = this._generatedMappings[index];
-
- if (mapping.generatedLine === needle.generatedLine) {
- var source = util.getArg(mapping, 'source', null);
- if (source !== null) {
- source = this._sources.at(source);
- if (this.sourceRoot != null) {
- source = util.join(this.sourceRoot, source);
- }
- }
- var name = util.getArg(mapping, 'name', null);
- if (name !== null) {
- name = this._names.at(name);
- }
- return {
- source: source,
- line: util.getArg(mapping, 'originalLine', null),
- column: util.getArg(mapping, 'originalColumn', null),
- name: name
- };
- }
- }
-
- return {
- source: null,
- line: null,
- column: null,
- name: null
- };
- };
-
- /**
- * Return true if we have the source content for every source in the source
- * map, false otherwise.
- */
- BasicSourceMapConsumer.prototype.hasContentsOfAllSources =
- function BasicSourceMapConsumer_hasContentsOfAllSources() {
- if (!this.sourcesContent) {
- return false;
- }
- return this.sourcesContent.length >= this._sources.size() &&
- !this.sourcesContent.some(function (sc) { return sc == null; });
- };
-
- /**
- * Returns the original source content. The only argument is the url of the
- * original source file. Returns null if no original source content is
- * available.
- */
- BasicSourceMapConsumer.prototype.sourceContentFor =
- function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
- if (!this.sourcesContent) {
- return null;
- }
-
- if (this.sourceRoot != null) {
- aSource = util.relative(this.sourceRoot, aSource);
- }
-
- if (this._sources.has(aSource)) {
- return this.sourcesContent[this._sources.indexOf(aSource)];
- }
-
- var url;
- if (this.sourceRoot != null
- && (url = util.urlParse(this.sourceRoot))) {
- // XXX: file:// URIs and absolute paths lead to unexpected behavior for
- // many users. We can help them out when they expect file:// URIs to
- // behave like it would if they were running a local HTTP server. See
- // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
- var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
- if (url.scheme == "file"
- && this._sources.has(fileUriAbsPath)) {
- return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
- }
-
- if ((!url.path || url.path == "/")
- && this._sources.has("/" + aSource)) {
- return this.sourcesContent[this._sources.indexOf("/" + aSource)];
- }
- }
-
- // This function is used recursively from
- // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
- // don't want to throw if we can't find the source - we just want to
- // return null, so we provide a flag to exit gracefully.
- if (nullOnMissing) {
- return null;
- }
- else {
- throw new Error('"' + aSource + '" is not in the SourceMap.');
- }
- };
-
- /**
- * Returns the generated line and column information for the original source,
- * line, and column positions provided. The only argument is an object with
- * the following properties:
- *
- * - source: The filename of the original source.
- * - line: The line number in the original source.
- * - column: The column number in the original source.
- * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
- * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
- * closest element that is smaller than or greater than the one we are
- * searching for, respectively, if the exact element cannot be found.
- * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
- *
- * and an object is returned with the following properties:
- *
- * - line: The line number in the generated source, or null.
- * - column: The column number in the generated source, or null.
- */
- BasicSourceMapConsumer.prototype.generatedPositionFor =
- function SourceMapConsumer_generatedPositionFor(aArgs) {
- var source = util.getArg(aArgs, 'source');
- if (this.sourceRoot != null) {
- source = util.relative(this.sourceRoot, source);
- }
- if (!this._sources.has(source)) {
- return {
- line: null,
- column: null,
- lastColumn: null
- };
- }
- source = this._sources.indexOf(source);
-
- var needle = {
- source: source,
- originalLine: util.getArg(aArgs, 'line'),
- originalColumn: util.getArg(aArgs, 'column')
- };
-
- var index = this._findMapping(
- needle,
- this._originalMappings,
- "originalLine",
- "originalColumn",
- util.compareByOriginalPositions,
- util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
- );
-
- if (index >= 0) {
- var mapping = this._originalMappings[index];
-
- if (mapping.source === needle.source) {
- return {
- line: util.getArg(mapping, 'generatedLine', null),
- column: util.getArg(mapping, 'generatedColumn', null),
- lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
- };
- }
- }
-
- return {
- line: null,
- column: null,
- lastColumn: null
- };
- };
-
- exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
-
- /**
- * An IndexedSourceMapConsumer instance represents a parsed source map which
- * we can query for information. It differs from BasicSourceMapConsumer in
- * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
- * input.
- *
- * The only parameter is a raw source map (either as a JSON string, or already
- * parsed to an object). According to the spec for indexed source maps, they
- * have the following attributes:
- *
- * - version: Which version of the source map spec this map is following.
- * - file: Optional. The generated file this source map is associated with.
- * - sections: A list of section definitions.
- *
- * Each value under the "sections" field has two fields:
- * - offset: The offset into the original specified at which this section
- * begins to apply, defined as an object with a "line" and "column"
- * field.
- * - map: A source map definition. This source map could also be indexed,
- * but doesn't have to be.
- *
- * Instead of the "map" field, it's also possible to have a "url" field
- * specifying a URL to retrieve a source map from, but that's currently
- * unsupported.
- *
- * Here's an example source map, taken from the source map spec[0], but
- * modified to omit a section which uses the "url" field.
- *
- * {
- * version : 3,
- * file: "app.js",
- * sections: [{
- * offset: {line:100, column:10},
- * map: {
- * version : 3,
- * file: "section.js",
- * sources: ["foo.js", "bar.js"],
- * names: ["src", "maps", "are", "fun"],
- * mappings: "AAAA,E;;ABCDE;"
- * }
- * }],
- * }
- *
- * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
- */
- function IndexedSourceMapConsumer(aSourceMap) {
- var sourceMap = aSourceMap;
- if (typeof aSourceMap === 'string') {
- sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
- }
-
- var version = util.getArg(sourceMap, 'version');
- var sections = util.getArg(sourceMap, 'sections');
-
- if (version != this._version) {
- throw new Error('Unsupported version: ' + version);
- }
-
- this._sources = new ArraySet();
- this._names = new ArraySet();
-
- var lastOffset = {
- line: -1,
- column: 0
- };
- this._sections = sections.map(function (s) {
- if (s.url) {
- // The url field will require support for asynchronicity.
- // See https://github.com/mozilla/source-map/issues/16
- throw new Error('Support for url field in sections not implemented.');
- }
- var offset = util.getArg(s, 'offset');
- var offsetLine = util.getArg(offset, 'line');
- var offsetColumn = util.getArg(offset, 'column');
-
- if (offsetLine < lastOffset.line ||
- (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
- throw new Error('Section offsets must be ordered and non-overlapping.');
- }
- lastOffset = offset;
-
- return {
- generatedOffset: {
- // The offset fields are 0-based, but we use 1-based indices when
- // encoding/decoding from VLQ.
- generatedLine: offsetLine + 1,
- generatedColumn: offsetColumn + 1
- },
- consumer: new SourceMapConsumer(util.getArg(s, 'map'))
- }
- });
- }
-
- IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
- IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
-
- /**
- * The version of the source mapping spec that we are consuming.
- */
- IndexedSourceMapConsumer.prototype._version = 3;
-
- /**
- * The list of original sources.
- */
- Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
- get: function () {
- var sources = [];
- for (var i = 0; i < this._sections.length; i++) {
- for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
- sources.push(this._sections[i].consumer.sources[j]);
- }
- }
- return sources;
- }
- });
-
- /**
- * Returns the original source, line, and column information for the generated
- * source's line and column positions provided. The only argument is an object
- * with the following properties:
- *
- * - line: The line number in the generated source.
- * - column: The column number in the generated source.
- *
- * and an object is returned with the following properties:
- *
- * - source: The original source file, or null.
- * - line: The line number in the original source, or null.
- * - column: The column number in the original source, or null.
- * - name: The original identifier, or null.
- */
- IndexedSourceMapConsumer.prototype.originalPositionFor =
- function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
- var needle = {
- generatedLine: util.getArg(aArgs, 'line'),
- generatedColumn: util.getArg(aArgs, 'column')
- };
-
- // Find the section containing the generated position we're trying to map
- // to an original position.
- var sectionIndex = binarySearch.search(needle, this._sections,
- function(needle, section) {
- var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
- if (cmp) {
- return cmp;
- }
-
- return (needle.generatedColumn -
- section.generatedOffset.generatedColumn);
- });
- var section = this._sections[sectionIndex];
-
- if (!section) {
- return {
- source: null,
- line: null,
- column: null,
- name: null
- };
- }
-
- return section.consumer.originalPositionFor({
- line: needle.generatedLine -
- (section.generatedOffset.generatedLine - 1),
- column: needle.generatedColumn -
- (section.generatedOffset.generatedLine === needle.generatedLine
- ? section.generatedOffset.generatedColumn - 1
- : 0),
- bias: aArgs.bias
- });
- };
-
- /**
- * Return true if we have the source content for every source in the source
- * map, false otherwise.
- */
- IndexedSourceMapConsumer.prototype.hasContentsOfAllSources =
- function IndexedSourceMapConsumer_hasContentsOfAllSources() {
- return this._sections.every(function (s) {
- return s.consumer.hasContentsOfAllSources();
- });
- };
-
- /**
- * Returns the original source content. The only argument is the url of the
- * original source file. Returns null if no original source content is
- * available.
- */
- IndexedSourceMapConsumer.prototype.sourceContentFor =
- function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
- for (var i = 0; i < this._sections.length; i++) {
- var section = this._sections[i];
-
- var content = section.consumer.sourceContentFor(aSource, true);
- if (content) {
- return content;
- }
- }
- if (nullOnMissing) {
- return null;
- }
- else {
- throw new Error('"' + aSource + '" is not in the SourceMap.');
- }
- };
-
- /**
- * Returns the generated line and column information for the original source,
- * line, and column positions provided. The only argument is an object with
- * the following properties:
- *
- * - source: The filename of the original source.
- * - line: The line number in the original source.
- * - column: The column number in the original source.
- *
- * and an object is returned with the following properties:
- *
- * - line: The line number in the generated source, or null.
- * - column: The column number in the generated source, or null.
- */
- IndexedSourceMapConsumer.prototype.generatedPositionFor =
- function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
- for (var i = 0; i < this._sections.length; i++) {
- var section = this._sections[i];
-
- // Only consider this section if the requested source is in the list of
- // sources of the consumer.
- if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
- continue;
- }
- var generatedPosition = section.consumer.generatedPositionFor(aArgs);
- if (generatedPosition) {
- var ret = {
- line: generatedPosition.line +
- (section.generatedOffset.generatedLine - 1),
- column: generatedPosition.column +
- (section.generatedOffset.generatedLine === generatedPosition.line
- ? section.generatedOffset.generatedColumn - 1
- : 0)
- };
- return ret;
- }
- }
-
- return {
- line: null,
- column: null
- };
- };
-
- /**
- * Parse the mappings in a string in to a data structure which we can easily
- * query (the ordered arrays in the `this.__generatedMappings` and
- * `this.__originalMappings` properties).
- */
- IndexedSourceMapConsumer.prototype._parseMappings =
- function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
- this.__generatedMappings = [];
- this.__originalMappings = [];
- for (var i = 0; i < this._sections.length; i++) {
- var section = this._sections[i];
- var sectionMappings = section.consumer._generatedMappings;
- for (var j = 0; j < sectionMappings.length; j++) {
- var mapping = sectionMappings[j];
-
- var source = section.consumer._sources.at(mapping.source);
- if (section.consumer.sourceRoot !== null) {
- source = util.join(section.consumer.sourceRoot, source);
- }
- this._sources.add(source);
- source = this._sources.indexOf(source);
-
- var name = section.consumer._names.at(mapping.name);
- this._names.add(name);
- name = this._names.indexOf(name);
-
- // The mappings coming from the consumer for the section have
- // generated positions relative to the start of the section, so we
- // need to offset them to be relative to the start of the concatenated
- // generated file.
- var adjustedMapping = {
- source: source,
- generatedLine: mapping.generatedLine +
- (section.generatedOffset.generatedLine - 1),
- generatedColumn: mapping.generatedColumn +
- (section.generatedOffset.generatedLine === mapping.generatedLine
- ? section.generatedOffset.generatedColumn - 1
- : 0),
- originalLine: mapping.originalLine,
- originalColumn: mapping.originalColumn,
- name: name
- };
-
- this.__generatedMappings.push(adjustedMapping);
- if (typeof adjustedMapping.originalLine === 'number') {
- this.__originalMappings.push(adjustedMapping);
- }
- }
- }
-
- quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated);
- quickSort(this.__originalMappings, util.compareByOriginalPositions);
- };
-
- exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/source-map-generator.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/source-map-generator.js
deleted file mode 100644
index ffc76cdf51..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/source-map-generator.js
+++ /dev/null
@@ -1,396 +0,0 @@
-/* -*- Mode: js; js-indent-level: 2; -*- */
-/*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
-{
- var base64VLQ = require('./base64-vlq');
- var util = require('./util');
- var ArraySet = require('./array-set').ArraySet;
- var MappingList = require('./mapping-list').MappingList;
-
- /**
- * An instance of the SourceMapGenerator represents a source map which is
- * being built incrementally. You may pass an object with the following
- * properties:
- *
- * - file: The filename of the generated source.
- * - sourceRoot: A root for all relative URLs in this source map.
- */
- function SourceMapGenerator(aArgs) {
- if (!aArgs) {
- aArgs = {};
- }
- this._file = util.getArg(aArgs, 'file', null);
- this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
- this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
- this._sources = new ArraySet();
- this._names = new ArraySet();
- this._mappings = new MappingList();
- this._sourcesContents = null;
- }
-
- SourceMapGenerator.prototype._version = 3;
-
- /**
- * Creates a new SourceMapGenerator based on a SourceMapConsumer
- *
- * @param aSourceMapConsumer The SourceMap.
- */
- SourceMapGenerator.fromSourceMap =
- function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
- var sourceRoot = aSourceMapConsumer.sourceRoot;
- var generator = new SourceMapGenerator({
- file: aSourceMapConsumer.file,
- sourceRoot: sourceRoot
- });
- aSourceMapConsumer.eachMapping(function (mapping) {
- var newMapping = {
- generated: {
- line: mapping.generatedLine,
- column: mapping.generatedColumn
- }
- };
-
- if (mapping.source != null) {
- newMapping.source = mapping.source;
- if (sourceRoot != null) {
- newMapping.source = util.relative(sourceRoot, newMapping.source);
- }
-
- newMapping.original = {
- line: mapping.originalLine,
- column: mapping.originalColumn
- };
-
- if (mapping.name != null) {
- newMapping.name = mapping.name;
- }
- }
-
- generator.addMapping(newMapping);
- });
- aSourceMapConsumer.sources.forEach(function (sourceFile) {
- var content = aSourceMapConsumer.sourceContentFor(sourceFile);
- if (content != null) {
- generator.setSourceContent(sourceFile, content);
- }
- });
- return generator;
- };
-
- /**
- * Add a single mapping from original source line and column to the generated
- * source's line and column for this source map being created. The mapping
- * object should have the following properties:
- *
- * - generated: An object with the generated line and column positions.
- * - original: An object with the original line and column positions.
- * - source: The original source file (relative to the sourceRoot).
- * - name: An optional original token name for this mapping.
- */
- SourceMapGenerator.prototype.addMapping =
- function SourceMapGenerator_addMapping(aArgs) {
- var generated = util.getArg(aArgs, 'generated');
- var original = util.getArg(aArgs, 'original', null);
- var source = util.getArg(aArgs, 'source', null);
- var name = util.getArg(aArgs, 'name', null);
-
- if (!this._skipValidation) {
- this._validateMapping(generated, original, source, name);
- }
-
- if (source != null && !this._sources.has(source)) {
- this._sources.add(source);
- }
-
- if (name != null && !this._names.has(name)) {
- this._names.add(name);
- }
-
- this._mappings.add({
- generatedLine: generated.line,
- generatedColumn: generated.column,
- originalLine: original != null && original.line,
- originalColumn: original != null && original.column,
- source: source,
- name: name
- });
- };
-
- /**
- * Set the source content for a source file.
- */
- SourceMapGenerator.prototype.setSourceContent =
- function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
- var source = aSourceFile;
- if (this._sourceRoot != null) {
- source = util.relative(this._sourceRoot, source);
- }
-
- if (aSourceContent != null) {
- // Add the source content to the _sourcesContents map.
- // Create a new _sourcesContents map if the property is null.
- if (!this._sourcesContents) {
- this._sourcesContents = {};
- }
- this._sourcesContents[util.toSetString(source)] = aSourceContent;
- } else if (this._sourcesContents) {
- // Remove the source file from the _sourcesContents map.
- // If the _sourcesContents map is empty, set the property to null.
- delete this._sourcesContents[util.toSetString(source)];
- if (Object.keys(this._sourcesContents).length === 0) {
- this._sourcesContents = null;
- }
- }
- };
-
- /**
- * Applies the mappings of a sub-source-map for a specific source file to the
- * source map being generated. Each mapping to the supplied source file is
- * rewritten using the supplied source map. Note: The resolution for the
- * resulting mappings is the minimium of this map and the supplied map.
- *
- * @param aSourceMapConsumer The source map to be applied.
- * @param aSourceFile Optional. The filename of the source file.
- * If omitted, SourceMapConsumer's file property will be used.
- * @param aSourceMapPath Optional. The dirname of the path to the source map
- * to be applied. If relative, it is relative to the SourceMapConsumer.
- * This parameter is needed when the two source maps aren't in the same
- * directory, and the source map to be applied contains relative source
- * paths. If so, those relative source paths need to be rewritten
- * relative to the SourceMapGenerator.
- */
- SourceMapGenerator.prototype.applySourceMap =
- function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
- var sourceFile = aSourceFile;
- // If aSourceFile is omitted, we will use the file property of the SourceMap
- if (aSourceFile == null) {
- if (aSourceMapConsumer.file == null) {
- throw new Error(
- 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
- 'or the source map\'s "file" property. Both were omitted.'
- );
- }
- sourceFile = aSourceMapConsumer.file;
- }
- var sourceRoot = this._sourceRoot;
- // Make "sourceFile" relative if an absolute Url is passed.
- if (sourceRoot != null) {
- sourceFile = util.relative(sourceRoot, sourceFile);
- }
- // Applying the SourceMap can add and remove items from the sources and
- // the names array.
- var newSources = new ArraySet();
- var newNames = new ArraySet();
-
- // Find mappings for the "sourceFile"
- this._mappings.unsortedForEach(function (mapping) {
- if (mapping.source === sourceFile && mapping.originalLine != null) {
- // Check if it can be mapped by the source map, then update the mapping.
- var original = aSourceMapConsumer.originalPositionFor({
- line: mapping.originalLine,
- column: mapping.originalColumn
- });
- if (original.source != null) {
- // Copy mapping
- mapping.source = original.source;
- if (aSourceMapPath != null) {
- mapping.source = util.join(aSourceMapPath, mapping.source)
- }
- if (sourceRoot != null) {
- mapping.source = util.relative(sourceRoot, mapping.source);
- }
- mapping.originalLine = original.line;
- mapping.originalColumn = original.column;
- if (original.name != null) {
- mapping.name = original.name;
- }
- }
- }
-
- var source = mapping.source;
- if (source != null && !newSources.has(source)) {
- newSources.add(source);
- }
-
- var name = mapping.name;
- if (name != null && !newNames.has(name)) {
- newNames.add(name);
- }
-
- }, this);
- this._sources = newSources;
- this._names = newNames;
-
- // Copy sourcesContents of applied map.
- aSourceMapConsumer.sources.forEach(function (sourceFile) {
- var content = aSourceMapConsumer.sourceContentFor(sourceFile);
- if (content != null) {
- if (aSourceMapPath != null) {
- sourceFile = util.join(aSourceMapPath, sourceFile);
- }
- if (sourceRoot != null) {
- sourceFile = util.relative(sourceRoot, sourceFile);
- }
- this.setSourceContent(sourceFile, content);
- }
- }, this);
- };
-
- /**
- * A mapping can have one of the three levels of data:
- *
- * 1. Just the generated position.
- * 2. The Generated position, original position, and original source.
- * 3. Generated and original position, original source, as well as a name
- * token.
- *
- * To maintain consistency, we validate that any new mapping being added falls
- * in to one of these categories.
- */
- SourceMapGenerator.prototype._validateMapping =
- function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
- aName) {
- if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
- && aGenerated.line > 0 && aGenerated.column >= 0
- && !aOriginal && !aSource && !aName) {
- // Case 1.
- return;
- }
- else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
- && aOriginal && 'line' in aOriginal && 'column' in aOriginal
- && aGenerated.line > 0 && aGenerated.column >= 0
- && aOriginal.line > 0 && aOriginal.column >= 0
- && aSource) {
- // Cases 2 and 3.
- return;
- }
- else {
- throw new Error('Invalid mapping: ' + JSON.stringify({
- generated: aGenerated,
- source: aSource,
- original: aOriginal,
- name: aName
- }));
- }
- };
-
- /**
- * Serialize the accumulated mappings in to the stream of base 64 VLQs
- * specified by the source map format.
- */
- SourceMapGenerator.prototype._serializeMappings =
- function SourceMapGenerator_serializeMappings() {
- var previousGeneratedColumn = 0;
- var previousGeneratedLine = 1;
- var previousOriginalColumn = 0;
- var previousOriginalLine = 0;
- var previousName = 0;
- var previousSource = 0;
- var result = '';
- var mapping;
- var nameIdx;
- var sourceIdx;
-
- var mappings = this._mappings.toArray();
- for (var i = 0, len = mappings.length; i < len; i++) {
- mapping = mappings[i];
-
- if (mapping.generatedLine !== previousGeneratedLine) {
- previousGeneratedColumn = 0;
- while (mapping.generatedLine !== previousGeneratedLine) {
- result += ';';
- previousGeneratedLine++;
- }
- }
- else {
- if (i > 0) {
- if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
- continue;
- }
- result += ',';
- }
- }
-
- result += base64VLQ.encode(mapping.generatedColumn
- - previousGeneratedColumn);
- previousGeneratedColumn = mapping.generatedColumn;
-
- if (mapping.source != null) {
- sourceIdx = this._sources.indexOf(mapping.source);
- result += base64VLQ.encode(sourceIdx - previousSource);
- previousSource = sourceIdx;
-
- // lines are stored 0-based in SourceMap spec version 3
- result += base64VLQ.encode(mapping.originalLine - 1
- - previousOriginalLine);
- previousOriginalLine = mapping.originalLine - 1;
-
- result += base64VLQ.encode(mapping.originalColumn
- - previousOriginalColumn);
- previousOriginalColumn = mapping.originalColumn;
-
- if (mapping.name != null) {
- nameIdx = this._names.indexOf(mapping.name);
- result += base64VLQ.encode(nameIdx - previousName);
- previousName = nameIdx;
- }
- }
- }
-
- return result;
- };
-
- SourceMapGenerator.prototype._generateSourcesContent =
- function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
- return aSources.map(function (source) {
- if (!this._sourcesContents) {
- return null;
- }
- if (aSourceRoot != null) {
- source = util.relative(aSourceRoot, source);
- }
- var key = util.toSetString(source);
- return Object.prototype.hasOwnProperty.call(this._sourcesContents,
- key)
- ? this._sourcesContents[key]
- : null;
- }, this);
- };
-
- /**
- * Externalize the source map.
- */
- SourceMapGenerator.prototype.toJSON =
- function SourceMapGenerator_toJSON() {
- var map = {
- version: this._version,
- sources: this._sources.toArray(),
- names: this._names.toArray(),
- mappings: this._serializeMappings()
- };
- if (this._file != null) {
- map.file = this._file;
- }
- if (this._sourceRoot != null) {
- map.sourceRoot = this._sourceRoot;
- }
- if (this._sourcesContents) {
- map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
- }
-
- return map;
- };
-
- /**
- * Render the source map being generated to a string.
- */
- SourceMapGenerator.prototype.toString =
- function SourceMapGenerator_toString() {
- return JSON.stringify(this.toJSON());
- };
-
- exports.SourceMapGenerator = SourceMapGenerator;
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/source-node.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/source-node.js
deleted file mode 100644
index 8b0fd59184..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/source-node.js
+++ /dev/null
@@ -1,408 +0,0 @@
-/* -*- Mode: js; js-indent-level: 2; -*- */
-/*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
-{
- var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;
- var util = require('./util');
-
- // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
- // operating systems these days (capturing the result).
- var REGEX_NEWLINE = /(\r?\n)/;
-
- // Newline character code for charCodeAt() comparisons
- var NEWLINE_CODE = 10;
-
- // Private symbol for identifying `SourceNode`s when multiple versions of
- // the source-map library are loaded. This MUST NOT CHANGE across
- // versions!
- var isSourceNode = "$$$isSourceNode$$$";
-
- /**
- * SourceNodes provide a way to abstract over interpolating/concatenating
- * snippets of generated JavaScript source code while maintaining the line and
- * column information associated with the original source code.
- *
- * @param aLine The original line number.
- * @param aColumn The original column number.
- * @param aSource The original source's filename.
- * @param aChunks Optional. An array of strings which are snippets of
- * generated JS, or other SourceNodes.
- * @param aName The original identifier.
- */
- function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
- this.children = [];
- this.sourceContents = {};
- this.line = aLine == null ? null : aLine;
- this.column = aColumn == null ? null : aColumn;
- this.source = aSource == null ? null : aSource;
- this.name = aName == null ? null : aName;
- this[isSourceNode] = true;
- if (aChunks != null) this.add(aChunks);
- }
-
- /**
- * Creates a SourceNode from generated code and a SourceMapConsumer.
- *
- * @param aGeneratedCode The generated code
- * @param aSourceMapConsumer The SourceMap for the generated code
- * @param aRelativePath Optional. The path that relative sources in the
- * SourceMapConsumer should be relative to.
- */
- SourceNode.fromStringWithSourceMap =
- function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
- // The SourceNode we want to fill with the generated code
- // and the SourceMap
- var node = new SourceNode();
-
- // All even indices of this array are one line of the generated code,
- // while all odd indices are the newlines between two adjacent lines
- // (since `REGEX_NEWLINE` captures its match).
- // Processed fragments are removed from this array, by calling `shiftNextLine`.
- var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
- var shiftNextLine = function() {
- var lineContents = remainingLines.shift();
- // The last line of a file might not have a newline.
- var newLine = remainingLines.shift() || "";
- return lineContents + newLine;
- };
-
- // We need to remember the position of "remainingLines"
- var lastGeneratedLine = 1, lastGeneratedColumn = 0;
-
- // The generate SourceNodes we need a code range.
- // To extract it current and last mapping is used.
- // Here we store the last mapping.
- var lastMapping = null;
-
- aSourceMapConsumer.eachMapping(function (mapping) {
- if (lastMapping !== null) {
- // We add the code from "lastMapping" to "mapping":
- // First check if there is a new line in between.
- if (lastGeneratedLine < mapping.generatedLine) {
- // Associate first line with "lastMapping"
- addMappingWithCode(lastMapping, shiftNextLine());
- lastGeneratedLine++;
- lastGeneratedColumn = 0;
- // The remaining code is added without mapping
- } else {
- // There is no new line in between.
- // Associate the code between "lastGeneratedColumn" and
- // "mapping.generatedColumn" with "lastMapping"
- var nextLine = remainingLines[0];
- var code = nextLine.substr(0, mapping.generatedColumn -
- lastGeneratedColumn);
- remainingLines[0] = nextLine.substr(mapping.generatedColumn -
- lastGeneratedColumn);
- lastGeneratedColumn = mapping.generatedColumn;
- addMappingWithCode(lastMapping, code);
- // No more remaining code, continue
- lastMapping = mapping;
- return;
- }
- }
- // We add the generated code until the first mapping
- // to the SourceNode without any mapping.
- // Each line is added as separate string.
- while (lastGeneratedLine < mapping.generatedLine) {
- node.add(shiftNextLine());
- lastGeneratedLine++;
- }
- if (lastGeneratedColumn < mapping.generatedColumn) {
- var nextLine = remainingLines[0];
- node.add(nextLine.substr(0, mapping.generatedColumn));
- remainingLines[0] = nextLine.substr(mapping.generatedColumn);
- lastGeneratedColumn = mapping.generatedColumn;
- }
- lastMapping = mapping;
- }, this);
- // We have processed all mappings.
- if (remainingLines.length > 0) {
- if (lastMapping) {
- // Associate the remaining code in the current line with "lastMapping"
- addMappingWithCode(lastMapping, shiftNextLine());
- }
- // and add the remaining lines without any mapping
- node.add(remainingLines.join(""));
- }
-
- // Copy sourcesContent into SourceNode
- aSourceMapConsumer.sources.forEach(function (sourceFile) {
- var content = aSourceMapConsumer.sourceContentFor(sourceFile);
- if (content != null) {
- if (aRelativePath != null) {
- sourceFile = util.join(aRelativePath, sourceFile);
- }
- node.setSourceContent(sourceFile, content);
- }
- });
-
- return node;
-
- function addMappingWithCode(mapping, code) {
- if (mapping === null || mapping.source === undefined) {
- node.add(code);
- } else {
- var source = aRelativePath
- ? util.join(aRelativePath, mapping.source)
- : mapping.source;
- node.add(new SourceNode(mapping.originalLine,
- mapping.originalColumn,
- source,
- code,
- mapping.name));
- }
- }
- };
-
- /**
- * Add a chunk of generated JS to this source node.
- *
- * @param aChunk A string snippet of generated JS code, another instance of
- * SourceNode, or an array where each member is one of those things.
- */
- SourceNode.prototype.add = function SourceNode_add(aChunk) {
- if (Array.isArray(aChunk)) {
- aChunk.forEach(function (chunk) {
- this.add(chunk);
- }, this);
- }
- else if (aChunk[isSourceNode] || typeof aChunk === "string") {
- if (aChunk) {
- this.children.push(aChunk);
- }
- }
- else {
- throw new TypeError(
- "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
- );
- }
- return this;
- };
-
- /**
- * Add a chunk of generated JS to the beginning of this source node.
- *
- * @param aChunk A string snippet of generated JS code, another instance of
- * SourceNode, or an array where each member is one of those things.
- */
- SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
- if (Array.isArray(aChunk)) {
- for (var i = aChunk.length-1; i >= 0; i--) {
- this.prepend(aChunk[i]);
- }
- }
- else if (aChunk[isSourceNode] || typeof aChunk === "string") {
- this.children.unshift(aChunk);
- }
- else {
- throw new TypeError(
- "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
- );
- }
- return this;
- };
-
- /**
- * Walk over the tree of JS snippets in this node and its children. The
- * walking function is called once for each snippet of JS and is passed that
- * snippet and the its original associated source's line/column location.
- *
- * @param aFn The traversal function.
- */
- SourceNode.prototype.walk = function SourceNode_walk(aFn) {
- var chunk;
- for (var i = 0, len = this.children.length; i < len; i++) {
- chunk = this.children[i];
- if (chunk[isSourceNode]) {
- chunk.walk(aFn);
- }
- else {
- if (chunk !== '') {
- aFn(chunk, { source: this.source,
- line: this.line,
- column: this.column,
- name: this.name });
- }
- }
- }
- };
-
- /**
- * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
- * each of `this.children`.
- *
- * @param aSep The separator.
- */
- SourceNode.prototype.join = function SourceNode_join(aSep) {
- var newChildren;
- var i;
- var len = this.children.length;
- if (len > 0) {
- newChildren = [];
- for (i = 0; i < len-1; i++) {
- newChildren.push(this.children[i]);
- newChildren.push(aSep);
- }
- newChildren.push(this.children[i]);
- this.children = newChildren;
- }
- return this;
- };
-
- /**
- * Call String.prototype.replace on the very right-most source snippet. Useful
- * for trimming whitespace from the end of a source node, etc.
- *
- * @param aPattern The pattern to replace.
- * @param aReplacement The thing to replace the pattern with.
- */
- SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
- var lastChild = this.children[this.children.length - 1];
- if (lastChild[isSourceNode]) {
- lastChild.replaceRight(aPattern, aReplacement);
- }
- else if (typeof lastChild === 'string') {
- this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
- }
- else {
- this.children.push(''.replace(aPattern, aReplacement));
- }
- return this;
- };
-
- /**
- * Set the source content for a source file. This will be added to the SourceMapGenerator
- * in the sourcesContent field.
- *
- * @param aSourceFile The filename of the source file
- * @param aSourceContent The content of the source file
- */
- SourceNode.prototype.setSourceContent =
- function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
- this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
- };
-
- /**
- * Walk over the tree of SourceNodes. The walking function is called for each
- * source file content and is passed the filename and source content.
- *
- * @param aFn The traversal function.
- */
- SourceNode.prototype.walkSourceContents =
- function SourceNode_walkSourceContents(aFn) {
- for (var i = 0, len = this.children.length; i < len; i++) {
- if (this.children[i][isSourceNode]) {
- this.children[i].walkSourceContents(aFn);
- }
- }
-
- var sources = Object.keys(this.sourceContents);
- for (var i = 0, len = sources.length; i < len; i++) {
- aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
- }
- };
-
- /**
- * Return the string representation of this source node. Walks over the tree
- * and concatenates all the various snippets together to one string.
- */
- SourceNode.prototype.toString = function SourceNode_toString() {
- var str = "";
- this.walk(function (chunk) {
- str += chunk;
- });
- return str;
- };
-
- /**
- * Returns the string representation of this source node along with a source
- * map.
- */
- SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
- var generated = {
- code: "",
- line: 1,
- column: 0
- };
- var map = new SourceMapGenerator(aArgs);
- var sourceMappingActive = false;
- var lastOriginalSource = null;
- var lastOriginalLine = null;
- var lastOriginalColumn = null;
- var lastOriginalName = null;
- this.walk(function (chunk, original) {
- generated.code += chunk;
- if (original.source !== null
- && original.line !== null
- && original.column !== null) {
- if(lastOriginalSource !== original.source
- || lastOriginalLine !== original.line
- || lastOriginalColumn !== original.column
- || lastOriginalName !== original.name) {
- map.addMapping({
- source: original.source,
- original: {
- line: original.line,
- column: original.column
- },
- generated: {
- line: generated.line,
- column: generated.column
- },
- name: original.name
- });
- }
- lastOriginalSource = original.source;
- lastOriginalLine = original.line;
- lastOriginalColumn = original.column;
- lastOriginalName = original.name;
- sourceMappingActive = true;
- } else if (sourceMappingActive) {
- map.addMapping({
- generated: {
- line: generated.line,
- column: generated.column
- }
- });
- lastOriginalSource = null;
- sourceMappingActive = false;
- }
- for (var idx = 0, length = chunk.length; idx < length; idx++) {
- if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
- generated.line++;
- generated.column = 0;
- // Mappings end at eol
- if (idx + 1 === length) {
- lastOriginalSource = null;
- sourceMappingActive = false;
- } else if (sourceMappingActive) {
- map.addMapping({
- source: original.source,
- original: {
- line: original.line,
- column: original.column
- },
- generated: {
- line: generated.line,
- column: generated.column
- },
- name: original.name
- });
- }
- } else {
- generated.column++;
- }
- }
- });
- this.walkSourceContents(function (sourceFile, sourceContent) {
- map.setSourceContent(sourceFile, sourceContent);
- });
-
- return { code: generated.code, map: map };
- };
-
- exports.SourceNode = SourceNode;
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/util.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/util.js
deleted file mode 100644
index 4581590224..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/lib/util.js
+++ /dev/null
@@ -1,369 +0,0 @@
-/* -*- Mode: js; js-indent-level: 2; -*- */
-/*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
-{
- /**
- * This is a helper function for getting values from parameter/options
- * objects.
- *
- * @param args The object we are extracting values from
- * @param name The name of the property we are getting.
- * @param defaultValue An optional value to return if the property is missing
- * from the object. If this is not specified and the property is missing, an
- * error will be thrown.
- */
- function getArg(aArgs, aName, aDefaultValue) {
- if (aName in aArgs) {
- return aArgs[aName];
- } else if (arguments.length === 3) {
- return aDefaultValue;
- } else {
- throw new Error('"' + aName + '" is a required argument.');
- }
- }
- exports.getArg = getArg;
-
- var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
- var dataUrlRegexp = /^data:.+\,.+$/;
-
- function urlParse(aUrl) {
- var match = aUrl.match(urlRegexp);
- if (!match) {
- return null;
- }
- return {
- scheme: match[1],
- auth: match[2],
- host: match[3],
- port: match[4],
- path: match[5]
- };
- }
- exports.urlParse = urlParse;
-
- function urlGenerate(aParsedUrl) {
- var url = '';
- if (aParsedUrl.scheme) {
- url += aParsedUrl.scheme + ':';
- }
- url += '//';
- if (aParsedUrl.auth) {
- url += aParsedUrl.auth + '@';
- }
- if (aParsedUrl.host) {
- url += aParsedUrl.host;
- }
- if (aParsedUrl.port) {
- url += ":" + aParsedUrl.port
- }
- if (aParsedUrl.path) {
- url += aParsedUrl.path;
- }
- return url;
- }
- exports.urlGenerate = urlGenerate;
-
- /**
- * Normalizes a path, or the path portion of a URL:
- *
- * - Replaces consequtive slashes with one slash.
- * - Removes unnecessary '.' parts.
- * - Removes unnecessary '<dir>/..' parts.
- *
- * Based on code in the Node.js 'path' core module.
- *
- * @param aPath The path or url to normalize.
- */
- function normalize(aPath) {
- var path = aPath;
- var url = urlParse(aPath);
- if (url) {
- if (!url.path) {
- return aPath;
- }
- path = url.path;
- }
- var isAbsolute = exports.isAbsolute(path);
-
- var parts = path.split(/\/+/);
- for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
- part = parts[i];
- if (part === '.') {
- parts.splice(i, 1);
- } else if (part === '..') {
- up++;
- } else if (up > 0) {
- if (part === '') {
- // The first part is blank if the path is absolute. Trying to go
- // above the root is a no-op. Therefore we can remove all '..' parts
- // directly after the root.
- parts.splice(i + 1, up);
- up = 0;
- } else {
- parts.splice(i, 2);
- up--;
- }
- }
- }
- path = parts.join('/');
-
- if (path === '') {
- path = isAbsolute ? '/' : '.';
- }
-
- if (url) {
- url.path = path;
- return urlGenerate(url);
- }
- return path;
- }
- exports.normalize = normalize;
-
- /**
- * Joins two paths/URLs.
- *
- * @param aRoot The root path or URL.
- * @param aPath The path or URL to be joined with the root.
- *
- * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
- * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
- * first.
- * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
- * is updated with the result and aRoot is returned. Otherwise the result
- * is returned.
- * - If aPath is absolute, the result is aPath.
- * - Otherwise the two paths are joined with a slash.
- * - Joining for example 'http://' and 'www.example.com' is also supported.
- */
- function join(aRoot, aPath) {
- if (aRoot === "") {
- aRoot = ".";
- }
- if (aPath === "") {
- aPath = ".";
- }
- var aPathUrl = urlParse(aPath);
- var aRootUrl = urlParse(aRoot);
- if (aRootUrl) {
- aRoot = aRootUrl.path || '/';
- }
-
- // `join(foo, '//www.example.org')`
- if (aPathUrl && !aPathUrl.scheme) {
- if (aRootUrl) {
- aPathUrl.scheme = aRootUrl.scheme;
- }
- return urlGenerate(aPathUrl);
- }
-
- if (aPathUrl || aPath.match(dataUrlRegexp)) {
- return aPath;
- }
-
- // `join('http://', 'www.example.com')`
- if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
- aRootUrl.host = aPath;
- return urlGenerate(aRootUrl);
- }
-
- var joined = aPath.charAt(0) === '/'
- ? aPath
- : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
-
- if (aRootUrl) {
- aRootUrl.path = joined;
- return urlGenerate(aRootUrl);
- }
- return joined;
- }
- exports.join = join;
-
- exports.isAbsolute = function (aPath) {
- return aPath.charAt(0) === '/' || !!aPath.match(urlRegexp);
- };
-
- /**
- * Make a path relative to a URL or another path.
- *
- * @param aRoot The root path or URL.
- * @param aPath The path or URL to be made relative to aRoot.
- */
- function relative(aRoot, aPath) {
- if (aRoot === "") {
- aRoot = ".";
- }
-
- aRoot = aRoot.replace(/\/$/, '');
-
- // It is possible for the path to be above the root. In this case, simply
- // checking whether the root is a prefix of the path won't work. Instead, we
- // need to remove components from the root one by one, until either we find
- // a prefix that fits, or we run out of components to remove.
- var level = 0;
- while (aPath.indexOf(aRoot + '/') !== 0) {
- var index = aRoot.lastIndexOf("/");
- if (index < 0) {
- return aPath;
- }
-
- // If the only part of the root that is left is the scheme (i.e. http://,
- // file:///, etc.), one or more slashes (/), or simply nothing at all, we
- // have exhausted all components, so the path is not relative to the root.
- aRoot = aRoot.slice(0, index);
- if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
- return aPath;
- }
-
- ++level;
- }
-
- // Make sure we add a "../" for each component we removed from the root.
- return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
- }
- exports.relative = relative;
-
- /**
- * Because behavior goes wacky when you set `__proto__` on objects, we
- * have to prefix all the strings in our set with an arbitrary character.
- *
- * See https://github.com/mozilla/source-map/pull/31 and
- * https://github.com/mozilla/source-map/issues/30
- *
- * @param String aStr
- */
- function toSetString(aStr) {
- return '$' + aStr;
- }
- exports.toSetString = toSetString;
-
- function fromSetString(aStr) {
- return aStr.substr(1);
- }
- exports.fromSetString = fromSetString;
-
- /**
- * Comparator between two mappings where the original positions are compared.
- *
- * Optionally pass in `true` as `onlyCompareGenerated` to consider two
- * mappings with the same original source/line/column, but different generated
- * line and column the same. Useful when searching for a mapping with a
- * stubbed out mapping.
- */
- function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
- var cmp = mappingA.source - mappingB.source;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalLine - mappingB.originalLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalColumn - mappingB.originalColumn;
- if (cmp !== 0 || onlyCompareOriginal) {
- return cmp;
- }
-
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.generatedLine - mappingB.generatedLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- return mappingA.name - mappingB.name;
- }
- exports.compareByOriginalPositions = compareByOriginalPositions;
-
- /**
- * Comparator between two mappings with deflated source and name indices where
- * the generated positions are compared.
- *
- * Optionally pass in `true` as `onlyCompareGenerated` to consider two
- * mappings with the same generated line and column, but different
- * source/name/original line and column the same. Useful when searching for a
- * mapping with a stubbed out mapping.
- */
- function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
- var cmp = mappingA.generatedLine - mappingB.generatedLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
- if (cmp !== 0 || onlyCompareGenerated) {
- return cmp;
- }
-
- cmp = mappingA.source - mappingB.source;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalLine - mappingB.originalLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalColumn - mappingB.originalColumn;
- if (cmp !== 0) {
- return cmp;
- }
-
- return mappingA.name - mappingB.name;
- }
- exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
-
- function strcmp(aStr1, aStr2) {
- if (aStr1 === aStr2) {
- return 0;
- }
-
- if (aStr1 > aStr2) {
- return 1;
- }
-
- return -1;
- }
-
- /**
- * Comparator between two mappings with inflated source and name strings where
- * the generated positions are compared.
- */
- function compareByGeneratedPositionsInflated(mappingA, mappingB) {
- var cmp = mappingA.generatedLine - mappingB.generatedLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = strcmp(mappingA.source, mappingB.source);
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalLine - mappingB.originalLine;
- if (cmp !== 0) {
- return cmp;
- }
-
- cmp = mappingA.originalColumn - mappingB.originalColumn;
- if (cmp !== 0) {
- return cmp;
- }
-
- return strcmp(mappingA.name, mappingB.name);
- }
- exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/package.json b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/package.json
deleted file mode 100644
index 347af4c1b5..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/package.json
+++ /dev/null
@@ -1,240 +0,0 @@
-{
- "_args": [
- [
- "source-map@~0.5.0",
- "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast"
- ]
- ],
- "_from": "source-map@>=0.5.0 <0.6.0",
- "_id": "source-map@0.5.3",
- "_inCache": true,
- "_installable": true,
- "_location": "/readable-stream/unreachable-branch-transform/recast/source-map",
- "_npmUser": {
- "email": "fitzgen@gmail.com",
- "name": "nickfitzgerald"
- },
- "_npmVersion": "1.4.9",
- "_phantomChildren": {},
- "_requested": {
- "name": "source-map",
- "raw": "source-map@~0.5.0",
- "rawSpec": "~0.5.0",
- "scope": null,
- "spec": ">=0.5.0 <0.6.0",
- "type": "range"
- },
- "_requiredBy": [
- "/readable-stream/unreachable-branch-transform/recast"
- ],
- "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.3.tgz",
- "_shasum": "82674b85a71b0be76c3e7416d15e9f5252eb3be0",
- "_shrinkwrap": null,
- "_spec": "source-map@~0.5.0",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast",
- "author": {
- "email": "nfitzgerald@mozilla.com",
- "name": "Nick Fitzgerald"
- },
- "bugs": {
- "url": "https://github.com/mozilla/source-map/issues"
- },
- "contributors": [
- {
- "email": "tobias.koppers@googlemail.com",
- "name": "Tobias Koppers"
- },
- {
- "email": "duncan@dweebd.com",
- "name": "Duncan Beevers"
- },
- {
- "email": "scrane@mozilla.com",
- "name": "Stephen Crane"
- },
- {
- "email": "seddon.ryan@gmail.com",
- "name": "Ryan Seddon"
- },
- {
- "email": "miles.elam@deem.com",
- "name": "Miles Elam"
- },
- {
- "email": "mihai.bazon@gmail.com",
- "name": "Mihai Bazon"
- },
- {
- "email": "github.public.email@michael.ficarra.me",
- "name": "Michael Ficarra"
- },
- {
- "email": "todd@twolfson.com",
- "name": "Todd Wolfson"
- },
- {
- "email": "alexander@solovyov.net",
- "name": "Alexander Solovyov"
- },
- {
- "email": "fgnass@gmail.com",
- "name": "Felix Gnass"
- },
- {
- "email": "conrad.irwin@gmail.com",
- "name": "Conrad Irwin"
- },
- {
- "email": "usrbincc@yahoo.com",
- "name": "usrbincc"
- },
- {
- "email": "glasser@davidglasser.net",
- "name": "David Glasser"
- },
- {
- "email": "chase@newrelic.com",
- "name": "Chase Douglas"
- },
- {
- "email": "evan.exe@gmail.com",
- "name": "Evan Wallace"
- },
- {
- "email": "fayearthur@gmail.com",
- "name": "Heather Arthur"
- },
- {
- "email": "hughskennedy@gmail.com",
- "name": "Hugh Kennedy"
- },
- {
- "email": "glasser@davidglasser.net",
- "name": "David Glasser"
- },
- {
- "email": "simon.lydell@gmail.com",
- "name": "Simon Lydell"
- },
- {
- "email": "jellyes2@gmail.com",
- "name": "Jmeas Smith"
- },
- {
- "email": "mzgoddard@gmail.com",
- "name": "Michael Z Goddard"
- },
- {
- "email": "azu@users.noreply.github.com",
- "name": "azu"
- },
- {
- "email": "john@gozde.ca",
- "name": "John Gozde"
- },
- {
- "email": "akirkton@truefitinnovation.com",
- "name": "Adam Kirkton"
- },
- {
- "email": "christopher.montgomery@dowjones.com",
- "name": "Chris Montgomery"
- },
- {
- "email": "jryans@gmail.com",
- "name": "J. Ryan Stinnett"
- },
- {
- "email": "jherrington@walmartlabs.com",
- "name": "Jack Herrington"
- },
- {
- "email": "jeffpalentine@gmail.com",
- "name": "Chris Truter"
- },
- {
- "email": "daniel@danielespeset.com",
- "name": "Daniel Espeset"
- },
- {
- "email": "jamie.lf.wong@gmail.com",
- "name": "Jamie Wong"
- },
- {
- "email": "ejpbruel@mozilla.com",
- "name": "Eddy Bruël"
- },
- {
- "email": "hawkrives@gmail.com",
- "name": "Hawken Rives"
- },
- {
- "email": "giladp007@gmail.com",
- "name": "Gilad Peleg"
- },
- {
- "email": "djchie.dev@gmail.com",
- "name": "djchie"
- },
- {
- "email": "garysye@gmail.com",
- "name": "Gary Ye"
- },
- {
- "email": "nicolas.lalevee@hibnet.org",
- "name": "Nicolas Lalevée"
- }
- ],
- "dependencies": {},
- "description": "Generates and consumes source maps",
- "devDependencies": {
- "doctoc": "^0.15.0",
- "webpack": "^1.12.0"
- },
- "directories": {},
- "dist": {
- "shasum": "82674b85a71b0be76c3e7416d15e9f5252eb3be0",
- "tarball": "https://registry.npmjs.org/source-map/-/source-map-0.5.3.tgz"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "files": [
- "source-map.js",
- "lib/",
- "dist/source-map.debug.js",
- "dist/source-map.js",
- "dist/source-map.min.js",
- "dist/source-map.min.js.map"
- ],
- "homepage": "https://github.com/mozilla/source-map",
- "license": "BSD-3-Clause",
- "main": "./source-map.js",
- "maintainers": [
- {
- "email": "mozilla-developer-tools@googlegroups.com",
- "name": "mozilla-devtools"
- },
- {
- "email": "dherman@mozilla.com",
- "name": "mozilla"
- },
- {
- "email": "fitzgen@gmail.com",
- "name": "nickfitzgerald"
- }
- ],
- "name": "source-map",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git+ssh://git@github.com/mozilla/source-map.git"
- },
- "scripts": {
- "build": "webpack --color",
- "test": "node test/run-tests.js",
- "toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md"
- },
- "version": "0.5.3"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/source-map.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/source-map.js
deleted file mode 100644
index bc88fe820c..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/node_modules/source-map/source-map.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * Copyright 2009-2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE.txt or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
-exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;
-exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;
-exports.SourceNode = require('./lib/source-node').SourceNode;
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/package.json b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/package.json
deleted file mode 100644
index d23aed14af..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/node_modules/recast/package.json
+++ /dev/null
@@ -1,102 +0,0 @@
-{
- "_args": [
- [
- "recast@^0.11.4",
- "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform"
- ]
- ],
- "_from": "recast@>=0.11.4 <0.12.0",
- "_id": "recast@0.11.5",
- "_inCache": true,
- "_installable": true,
- "_location": "/readable-stream/unreachable-branch-transform/recast",
- "_nodeVersion": "4.2.4",
- "_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/recast-0.11.5.tgz_1460645169588_0.9154388136230409"
- },
- "_npmUser": {
- "email": "bn@cs.stanford.edu",
- "name": "benjamn"
- },
- "_npmVersion": "3.3.9",
- "_phantomChildren": {},
- "_requested": {
- "name": "recast",
- "raw": "recast@^0.11.4",
- "rawSpec": "^0.11.4",
- "scope": null,
- "spec": ">=0.11.4 <0.12.0",
- "type": "range"
- },
- "_requiredBy": [
- "/readable-stream/unreachable-branch-transform"
- ],
- "_resolved": "https://registry.npmjs.org/recast/-/recast-0.11.5.tgz",
- "_shasum": "a85d6333586eeaec508498e1e4c4690a14cb662b",
- "_shrinkwrap": null,
- "_spec": "recast@^0.11.4",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform",
- "author": {
- "email": "bn@cs.stanford.edu",
- "name": "Ben Newman"
- },
- "browser": {
- "fs": false
- },
- "bugs": {
- "url": "https://github.com/benjamn/recast/issues"
- },
- "dependencies": {
- "ast-types": "0.8.16",
- "esprima": "~2.7.1",
- "private": "~0.1.5",
- "source-map": "~0.5.0"
- },
- "description": "JavaScript syntax tree transformer, nondestructive pretty-printer, and automatic source map generator",
- "devDependencies": {
- "babylon": "~6.4.2",
- "esprima-fb": "^15001.1001.0-dev-harmony-fb",
- "mocha": "~2.2.5"
- },
- "directories": {},
- "dist": {
- "shasum": "a85d6333586eeaec508498e1e4c4690a14cb662b",
- "tarball": "https://registry.npmjs.org/recast/-/recast-0.11.5.tgz"
- },
- "engines": {
- "node": ">= 0.8"
- },
- "gitHead": "47398cf78c9e9c0ce779c86140810528258e607d",
- "homepage": "http://github.com/benjamn/recast",
- "keywords": [
- "ast",
- "rewriting",
- "refactoring",
- "codegen",
- "syntax",
- "transformation",
- "parsing",
- "pretty-printing"
- ],
- "license": "MIT",
- "main": "main.js",
- "maintainers": [
- {
- "email": "bn@cs.stanford.edu",
- "name": "benjamn"
- }
- ],
- "name": "recast",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/benjamn/recast.git"
- },
- "scripts": {
- "debug": "node ./node_modules/mocha/bin/mocha --debug-brk --reporter spec",
- "test": "node ./node_modules/mocha/bin/mocha --reporter spec --full-trace"
- },
- "version": "0.11.5"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/package.json b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/package.json
deleted file mode 100644
index ee4e7050f1..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/package.json
+++ /dev/null
@@ -1,94 +0,0 @@
-{
- "_args": [
- [
- "unreachable-branch-transform@~0.5.0",
- "/Users/rebecca/code/npm/node_modules/readable-stream"
- ]
- ],
- "_from": "unreachable-branch-transform@>=0.5.0 <0.6.0",
- "_id": "unreachable-branch-transform@0.5.1",
- "_inCache": true,
- "_installable": true,
- "_location": "/readable-stream/unreachable-branch-transform",
- "_nodeVersion": "5.10.1",
- "_npmOperationalInternal": {
- "host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/unreachable-branch-transform-0.5.1.tgz_1460612866423_0.1859290194697678"
- },
- "_npmUser": {
- "email": "zertosh@gmail.com",
- "name": "zertosh"
- },
- "_npmVersion": "3.8.3",
- "_phantomChildren": {},
- "_requested": {
- "name": "unreachable-branch-transform",
- "raw": "unreachable-branch-transform@~0.5.0",
- "rawSpec": "~0.5.0",
- "scope": null,
- "spec": ">=0.5.0 <0.6.0",
- "type": "range"
- },
- "_requiredBy": [
- "/readable-stream"
- ],
- "_resolved": "https://registry.npmjs.org/unreachable-branch-transform/-/unreachable-branch-transform-0.5.1.tgz",
- "_shasum": "5e0a5da810b4f4cc6866afc28b59aa6e8c84db5d",
- "_shrinkwrap": null,
- "_spec": "unreachable-branch-transform@~0.5.0",
- "_where": "/Users/rebecca/code/npm/node_modules/readable-stream",
- "author": {
- "email": "zertosh@gmail.com",
- "name": "Andres Suarez"
- },
- "bugs": {
- "url": "https://github.com/zertosh/unreachable-branch-transform/issues"
- },
- "dependencies": {
- "esmangle-evaluator": "^1.0.0",
- "recast": "^0.11.4"
- },
- "description": "Browserify transform to remove unreachable code",
- "devDependencies": {
- "browserify": "^13.0.0",
- "tap": "^5.7.1"
- },
- "directories": {},
- "dist": {
- "shasum": "5e0a5da810b4f4cc6866afc28b59aa6e8c84db5d",
- "tarball": "https://registry.npmjs.org/unreachable-branch-transform/-/unreachable-branch-transform-0.5.1.tgz"
- },
- "files": [
- "README.md",
- "index.js",
- "unreachableBranchTransformer.js"
- ],
- "gitHead": "9b47a0aea78a873a4d3efb4e48d0455ed8d72d01",
- "homepage": "https://github.com/zertosh/unreachable-branch-transform",
- "keywords": [
- "browserify",
- "browserify-transform",
- "transform",
- "minify",
- "unreachable"
- ],
- "license": "MIT",
- "main": "index.js",
- "maintainers": [
- {
- "email": "zertosh@gmail.com",
- "name": "zertosh"
- }
- ],
- "name": "unreachable-branch-transform",
- "optionalDependencies": {},
- "readme": "ERROR: No README data found!",
- "repository": {
- "type": "git",
- "url": "git://github.com/zertosh/unreachable-branch-transform.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "version": "0.5.1"
-}
diff --git a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/unreachableBranchTransformer.js b/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/unreachableBranchTransformer.js
deleted file mode 100644
index 7469897dad..0000000000
--- a/deps/npm/node_modules/readable-stream/node_modules/unreachable-branch-transform/unreachableBranchTransformer.js
+++ /dev/null
@@ -1,97 +0,0 @@
-var Evaluator = require('esmangle-evaluator');
-
-var recast = require('recast');
-var types = recast.types;
-var b = types.builders;
-
-var VISITOR_METHODS = {
- visitLogicalExpression: visitLogicalExp,
- visitIfStatement: visitCondition,
- visitConditionalExpression: visitCondition
-};
-
-module.exports = function(branch) {
- recast.visit(branch, VISITOR_METHODS);
- return branch;
-};
-
-
-/**
- * "||" and "&&"
- */
-function visitLogicalExp(path) {
- var leftEval = Evaluator.booleanCondition(path.node.left);
-
- if (typeof leftEval !== 'boolean') {
- // console.log('___ %s ___', path.node.operator);
- this.traverse(path);
- return;
- }
-
- var leftSideEffect = Evaluator.hasSideEffect(path.node.left);
- if (leftSideEffect) {
- this.traverse(path);
- return;
- }
-
- if (leftEval === true && path.node.operator === '||') {
- // console.log('true || ___');
- path.replace(path.node.left);
- recast.visit(path, VISITOR_METHODS);
- return false;
- }
-
- if (leftEval === true && path.node.operator === '&&') {
- // console.log('true && ___');
- path.replace(path.node.right);
- recast.visit(path, VISITOR_METHODS);
- return false;
- }
-
- if (leftEval === false && path.node.operator === '&&') {
- // console.log('false && ___');
- path.replace(path.node.left);
- recast.visit(path, VISITOR_METHODS);
- return false;
- }
-
- if (leftEval === false && path.node.operator === '||') {
- // console.log('false || ___');
- path.replace(path.node.right);
- recast.visit(path, VISITOR_METHODS);
- return false;
- }
-}
-
-/**
- * "if" and ternary "?"
- */
-function visitCondition(path) {
- var testEval = Evaluator.booleanCondition(path.node.test);
-
- if (typeof testEval !== 'boolean') {
- // console.log('if/? ___');
- this.traverse(path);
- return;
- }
-
- var testSideEffect = Evaluator.hasSideEffect(path.node.test);
- if (testSideEffect) {
- this.traverse(path);
- return;
- }
-
- if (testEval === true) {
- // console.log('if/? (true)');
- path.replace(path.value.consequent);
- recast.visit(path, VISITOR_METHODS);
- return false;
- }
-
- if (testEval === false) {
- // console.log('if/? (false)');
- path.replace(path.value.alternate);
- recast.visit(path, VISITOR_METHODS);
- return false;
- }
-}
diff --git a/deps/npm/node_modules/readable-stream/package.json b/deps/npm/node_modules/readable-stream/package.json
index c480daa337..ef5ff11b1d 100644
--- a/deps/npm/node_modules/readable-stream/package.json
+++ b/deps/npm/node_modules/readable-stream/package.json
@@ -1,35 +1,40 @@
{
"_args": [
[
- "readable-stream@latest",
- "/Users/rebecca/code/npm"
+ {
+ "name": "readable-stream",
+ "raw": "readable-stream@2.1.3",
+ "rawSpec": "2.1.3",
+ "scope": null,
+ "spec": "2.1.3",
+ "type": "version"
+ },
+ "/Users/zkat/Documents/code/npm"
]
],
- "_from": "readable-stream@latest",
- "_id": "readable-stream@2.1.0",
+ "_from": "readable-stream@2.1.3",
+ "_id": "readable-stream@2.1.3",
"_inCache": true,
"_installable": true,
"_location": "/readable-stream",
- "_nodeVersion": "5.10.1",
+ "_nodeVersion": "5.11.0",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
- "tmp": "tmp/readable-stream-2.1.0.tgz_1460568003255_0.9190005895216018"
+ "tmp": "tmp/readable-stream-2.1.3.tgz_1463587875388_0.811288726516068"
},
"_npmUser": {
"email": "calvin.metcalf@gmail.com",
"name": "cwmma"
},
- "_npmVersion": "3.8.3",
- "_phantomChildren": {
- "inherits": "2.0.1"
- },
+ "_npmVersion": "3.8.6",
+ "_phantomChildren": {},
"_requested": {
"name": "readable-stream",
- "raw": "readable-stream@latest",
- "rawSpec": "latest",
+ "raw": "readable-stream@2.1.3",
+ "rawSpec": "2.1.3",
"scope": null,
- "spec": "latest",
- "type": "tag"
+ "spec": "2.1.3",
+ "type": "version"
},
"_requiredBy": [
"/",
@@ -39,35 +44,29 @@
"/tap",
"/tap/tap-parser"
],
- "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.0.tgz",
- "_shasum": "36f42ea0424eb29a985e4a81d31be2f96e1f2f80",
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.3.tgz",
+ "_shasum": "9db8ec4025b4c71e69aec60b453b590c8afeb0df",
"_shrinkwrap": null,
- "_spec": "readable-stream@latest",
- "_where": "/Users/rebecca/code/npm",
+ "_spec": "readable-stream@2.1.3",
+ "_where": "/Users/zkat/Documents/code/npm",
"browser": {
"util": false
},
- "browserify": {
- "transform": [
- "inline-process-browser",
- "unreachable-branch-transform"
- ]
- },
"bugs": {
"url": "https://github.com/nodejs/readable-stream/issues"
},
"dependencies": {
+ "buffer-shims": "^1.0.0",
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
- "inline-process-browser": "~2.0.1",
"isarray": "~1.0.0",
"process-nextick-args": "~1.0.6",
"string_decoder": "~0.10.x",
- "unreachable-branch-transform": "~0.5.0",
"util-deprecate": "~1.0.1"
},
"description": "Streams3, a user-land copy of the stream library from Node.js",
"devDependencies": {
+ "assert": "~1.4.0",
"nyc": "^6.4.0",
"tap": "~0.7.1",
"tape": "~4.5.1",
@@ -75,10 +74,10 @@
},
"directories": {},
"dist": {
- "shasum": "36f42ea0424eb29a985e4a81d31be2f96e1f2f80",
- "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.0.tgz"
+ "shasum": "9db8ec4025b4c71e69aec60b453b590c8afeb0df",
+ "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.1.3.tgz"
},
- "gitHead": "4c2d8e2639ffd516b12544ce0c117cc0345daa3f",
+ "gitHead": "abcff84645534aaedaed4192c4ce788af9112bc2",
"homepage": "https://github.com/nodejs/readable-stream#readme",
"keywords": [
"readable",
@@ -125,5 +124,5 @@
"test": "tap test/parallel/*.js test/ours/*.js",
"write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml"
},
- "version": "2.1.0"
+ "version": "2.1.3"
}
diff --git a/deps/npm/node_modules/readable-stream/readable.js b/deps/npm/node_modules/readable-stream/readable.js
index 0b0228a36d..be2688a071 100644
--- a/deps/npm/node_modules/readable-stream/readable.js
+++ b/deps/npm/node_modules/readable-stream/readable.js
@@ -11,8 +11,6 @@ exports.Duplex = require('./lib/_stream_duplex.js');
exports.Transform = require('./lib/_stream_transform.js');
exports.PassThrough = require('./lib/_stream_passthrough.js');
-// inline-process-browser and unreachable-branch-transform make sure this is
-// removed in browserify builds
-if (!process.browser && process.env.READABLE_STREAM === 'disable') {
- module.exports = require('stream');
+if (!process.browser && process.env.READABLE_STREAM === 'disable' && Stream) {
+ module.exports = Stream;
}
diff --git a/deps/npm/node_modules/realize-package-specifier/index.js b/deps/npm/node_modules/realize-package-specifier/index.js
index 935f600b0a..eae8fbaf82 100644
--- a/deps/npm/node_modules/realize-package-specifier/index.js
+++ b/deps/npm/node_modules/realize-package-specifier/index.js
@@ -33,7 +33,9 @@ module.exports = function (spec, where, cb) {
dep.name = null
}
}
- if (dep.type == "local" || dep.type == "directory") dep.spec = specpath
+ if (dep.type == "local" || dep.type == "directory") {
+ dep.spec = path.resolve(specpath)
+ }
cb(null, dep)
}
}
diff --git a/deps/npm/node_modules/which/.npmignore b/deps/npm/node_modules/which/.npmignore
deleted file mode 100644
index 0ac606ffcb..0000000000
--- a/deps/npm/node_modules/which/.npmignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.nyc_output/
-coverage/
-node_modules/
diff --git a/deps/npm/node_modules/which/.travis.yml b/deps/npm/node_modules/which/.travis.yml
deleted file mode 100644
index 7f22ad5a13..0000000000
--- a/deps/npm/node_modules/which/.travis.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-sudo: false
-language: node_js
-node_js:
- - '0.10'
- - '0.12'
- - '4'
diff --git a/deps/npm/node_modules/which/CHANGELOG.md b/deps/npm/node_modules/which/CHANGELOG.md
new file mode 100644
index 0000000000..8309580424
--- /dev/null
+++ b/deps/npm/node_modules/which/CHANGELOG.md
@@ -0,0 +1,118 @@
+# Changes
+
+
+## v1.2.9
+
+* fix for paths starting with ../
+* Remove unused `is-absolute` module
+
+## v1.2.8
+
+* bullet items in changelog that contain (but don't start with) #
+
+## v1.2.7
+
+* strip 'update changelog' changelog entries out of changelog
+
+## v1.2.6
+
+* make the changelog bulleted
+
+## v1.2.5
+
+* make a changelog, and keep it up to date
+* don't include tests in package
+* Properly handle relative-path executables
+* appveyor
+* Attach error code to Not Found error
+* Make tests pass on Windows
+
+## v1.2.4
+
+* Fix typo
+
+## v1.2.3
+
+* update isexe, fix regression in pathExt handling
+
+## v1.2.2
+
+* update deps, use isexe module, test windows
+
+## v1.2.1
+
+* Sometimes windows PATH entries are quoted
+* Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode.
+* doc cli
+
+## v1.2.0
+
+* Add support for opt.all and -as cli flags
+* test the bin
+* update travis
+* Allow checking for multiple programs in bin/which
+* tap 2
+
+## v1.1.2
+
+* travis
+* Refactored and fixed undefined error on Windows
+* Support strict mode
+
+## v1.1.1
+
+* test +g exes against secondary groups, if available
+* Use windows exe semantics on cygwin & msys
+* cwd should be first in path on win32, not last
+* Handle lower-case 'env.Path' on Windows
+* Update docs
+* use single-quotes
+
+## v1.1.0
+
+* Add tests, depend on is-absolute
+
+## v1.0.9
+
+* which.js: root is allowed to execute files owned by anyone
+
+## v1.0.8
+
+* don't use graceful-fs
+
+## v1.0.7
+
+* add license to package.json
+
+## v1.0.6
+
+* isc license
+
+## 1.0.5
+
+* Awful typo
+
+## 1.0.4
+
+* Test for path absoluteness properly
+* win: Allow '' as a pathext if cmd has a . in it
+
+## 1.0.3
+
+* Remove references to execPath
+* Make `which.sync()` work on Windows by honoring the PATHEXT variable.
+* Make `isExe()` always return true on Windows.
+* MIT
+
+## 1.0.2
+
+* Only files can be exes
+
+## 1.0.1
+
+* Respect the PATHEXT env for win32 support
+* should 0755 the bin
+* binary
+* guts
+* package
+* 1st
diff --git a/deps/npm/node_modules/which/changelog.sh b/deps/npm/node_modules/which/changelog.sh
new file mode 100644
index 0000000000..360e54af40
--- /dev/null
+++ b/deps/npm/node_modules/which/changelog.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+(
+ echo '# Changes'
+ echo ''
+ git log --first-parent --pretty=format:'%s' \
+ | grep -v '^update changelog' \
+ | perl -p -e 's/^((v?[0-9]+\.?)+)$/\n## \1\n/g' \
+ | perl -p -e 's/^([^#\s].*)$/* \1/g'
+)> CHANGELOG.md
diff --git a/deps/npm/node_modules/which/node_modules/is-absolute/LICENSE b/deps/npm/node_modules/which/node_modules/is-absolute/LICENSE
deleted file mode 100644
index 904ab073b7..0000000000
--- a/deps/npm/node_modules/which/node_modules/is-absolute/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014-2015, Jon Schlinkert.Copyright (c) 2009-2015, TJ Holowaychuk.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/which/node_modules/is-absolute/README.md b/deps/npm/node_modules/which/node_modules/is-absolute/README.md
deleted file mode 100644
index 2347828a3e..0000000000
--- a/deps/npm/node_modules/which/node_modules/is-absolute/README.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# is-absolute [![NPM version](https://badge.fury.io/js/is-absolute.svg)](http://badge.fury.io/js/is-absolute) [![Build Status](https://travis-ci.org/jonschlinkert/is-absolute.svg)](https://travis-ci.org/jonschlinkert/is-absolute)
-
-> Return true if a file path is absolute.
-
-Based on the `isAbsolute` utility method in [express](https://github.com/visionmedia/express).
-
-## Install with [npm](npmjs.org)
-
-```bash
-npm i is-absolute --save
-```
-
-## Usage
-
-```js
-var isAbsolute = require('is-absolute');
-console.log(isAbsolute('a/b/c.js'));
-//=> 'false';
-```
-
-## Running tests
-Install dev dependencies.
-
-```bash
-npm i -d && npm test
-```
-
-
-## Contributing
-Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/is-absolute/issues)
-
-
-## Other projects
-* [is-relative](https://github.com/jonschlinkert/is-relative): Returns `true` if the path appears to be relative.
-* [is-dotfile](https://github.com/regexps/is-dotfile): Return true if a file path is (or has) a dotfile.
-* [is-glob](https://github.com/jonschlinkert/is-glob): Returns `true` if the given string looks like a glob pattern.
-* [cwd](https://github.com/jonschlinkert/cwd): Node.js util for easily getting the current working directory of a project based on package.json or the given path.
-* [git-config-path](https://github.com/jonschlinkert/git-config-path): Resolve the path to the user's global .gitconfig.
-
-## Author
-
-**Jon Schlinkert**
-
-+ [github/jonschlinkert](https://github.com/jonschlinkert)
-+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
-
-## License
-Copyright (c) 2014-2015 Jon Schlinkert
-Released under the MIT license
-
-***
-
-_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on March 05, 2015._
diff --git a/deps/npm/node_modules/which/node_modules/is-absolute/index.js b/deps/npm/node_modules/which/node_modules/is-absolute/index.js
deleted file mode 100644
index 9df4d5c240..0000000000
--- a/deps/npm/node_modules/which/node_modules/is-absolute/index.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/*!
- * is-absolute <https://github.com/jonschlinkert/is-absolute>
- *
- * Copyright (c) 2014-2015, Jon Schlinkert.
- * Licensed under the MIT License.
- */
-
-'use strict';
-
-var isRelative = require('is-relative');
-
-module.exports = function isAbsolute(filepath) {
- if ('/' === filepath[0]) {
- return true;
- }
- if (':' === filepath[1] && '\\' === filepath[2]) {
- return true;
- }
- // Microsoft Azure absolute filepath
- if ('\\\\' == filepath.substring(0, 2)) {
- return true;
- }
- if (!isRelative(filepath)) {
- return true;
- }
-};
diff --git a/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/LICENSE-MIT b/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/LICENSE-MIT
deleted file mode 100644
index b576e8d484..0000000000
--- a/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/LICENSE-MIT
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Jon Schlinkert
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/README.md b/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/README.md
deleted file mode 100644
index 5d7a2a2aab..0000000000
--- a/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/README.md
+++ /dev/null
@@ -1,38 +0,0 @@
-# is-relative [![NPM version](https://badge.fury.io/js/is-relative.svg)](http://badge.fury.io/js/is-relative)
-
-> Returns `true` if the path appears to be relative.
-
-## Install
-### Install with [npm](npmjs.org)
-
-```bash
-npm i is-relative --save
-```
-
-## Usage
-### [isRelative](index.js#L16)
-
-* `filepath` **{String}**: Path to test.
-* `returns`: {Boolean}
-
-```js
-var isRelative = require('is-relative');
-isRelative('README.md');
-//=> true
-```
-
-
-## Author
-
-**Jon Schlinkert**
-
-+ [github/jonschlinkert](https://github.com/jonschlinkert)
-+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
-
-## License
-Copyright (c) 2014 Jon Schlinkert
-Released under the MIT license
-
-***
-
-_This file was generated by [verb](https://github.com/assemble/verb) on November 17, 2014._ \ No newline at end of file
diff --git a/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/index.js b/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/index.js
deleted file mode 100644
index ffc760a82a..0000000000
--- a/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/index.js
+++ /dev/null
@@ -1,21 +0,0 @@
-'use strict';
-
-/**
- * ```js
- * var isRelative = require('is-relative');
- * isRelative('README.md');
- * //=> true
- * ```
- *
- * @name isRelative
- * @param {String} `filepath` Path to test.
- * @return {Boolean}
- * @api public
- */
-
-module.exports = function isRelative(filepath) {
- if (typeof filepath !== 'string') {
- throw new Error('isRelative expects a string.');
- }
- return !/^([a-z]+:)?[\\\/]/i.test(filepath);
-}; \ No newline at end of file
diff --git a/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/package.json b/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/package.json
deleted file mode 100644
index d582081dd1..0000000000
--- a/deps/npm/node_modules/which/node_modules/is-absolute/node_modules/is-relative/package.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
- "name": "is-relative",
- "description": "Returns `true` if the path appears to be relative.",
- "version": "0.1.3",
- "homepage": "https://github.com/jonschlinkert/is-relative",
- "author": {
- "name": "Jon Schlinkert",
- "url": "https://github.com/jonschlinkert"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/jonschlinkert/is-relative.git"
- },
- "bugs": {
- "url": "https://github.com/jonschlinkert/is-relative/issues"
- },
- "licenses": [
- {
- "type": "MIT",
- "url": "https://github.com/jonschlinkert/is-relative/blob/master/LICENSE-MIT"
- }
- ],
- "keywords": [
- "absolute",
- "check",
- "file",
- "filepath",
- "is",
- "normalize",
- "path",
- "path.relative",
- "relative",
- "resolve",
- "slash",
- "slashes",
- "uri",
- "url"
- ],
- "main": "index.js",
- "files": [
- "index.js",
- "LICENSE-MIT"
- ],
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha -R spec"
- },
- "devDependencies": {
- "mocha": "*",
- "verb": ">= 0.2.6",
- "verb-tag-jscomments": "^0.1.4"
- },
- "_id": "is-relative@0.1.3",
- "_shasum": "905fee8ae86f45b3ec614bc3c15c869df0876e82",
- "_from": "is-relative@>=0.1.0 <0.2.0",
- "_npmVersion": "1.4.9",
- "_npmUser": {
- "name": "jonschlinkert",
- "email": "github@sellside.com"
- },
- "maintainers": [
- {
- "name": "jonschlinkert",
- "email": "github@sellside.com"
- }
- ],
- "dist": {
- "shasum": "905fee8ae86f45b3ec614bc3c15c869df0876e82",
- "tarball": "http://registry.npmjs.org/is-relative/-/is-relative-0.1.3.tgz"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.1.3.tgz",
- "readme": "ERROR: No README data found!"
-}
diff --git a/deps/npm/node_modules/which/node_modules/is-absolute/package.json b/deps/npm/node_modules/which/node_modules/is-absolute/package.json
deleted file mode 100644
index 4f954b855f..0000000000
--- a/deps/npm/node_modules/which/node_modules/is-absolute/package.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
- "name": "is-absolute",
- "description": "Return true if a file path is absolute.",
- "version": "0.1.7",
- "homepage": "https://github.com/jonschlinkert/is-absolute",
- "author": {
- "name": "Jon Schlinkert",
- "url": "https://github.com/jonschlinkert"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/jonschlinkert/is-absolute.git"
- },
- "bugs": {
- "url": "https://github.com/jonschlinkert/is-absolute/issues"
- },
- "license": {
- "type": "MIT",
- "url": "https://github.com/jonschlinkert/is-absolute/blob/master/LICENSE"
- },
- "files": [
- "index.js"
- ],
- "main": "index.js",
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "mocha"
- },
- "dependencies": {
- "is-relative": "^0.1.0"
- },
- "devDependencies": {
- "mocha": "*"
- },
- "keywords": [
- "absolute",
- "check",
- "file",
- "filepath",
- "is",
- "normalize",
- "path",
- "path.relative",
- "relative",
- "resolve",
- "slash",
- "slashes",
- "uri",
- "url"
- ],
- "gitHead": "90cca7b671620bf28b778a61fddc8a986a2e1095",
- "_id": "is-absolute@0.1.7",
- "_shasum": "847491119fccb5fb436217cc737f7faad50f603f",
- "_from": "is-absolute@>=0.1.7 <0.2.0",
- "_npmVersion": "2.5.1",
- "_nodeVersion": "0.12.0",
- "_npmUser": {
- "name": "jonschlinkert",
- "email": "github@sellside.com"
- },
- "maintainers": [
- {
- "name": "jonschlinkert",
- "email": "github@sellside.com"
- }
- ],
- "dist": {
- "shasum": "847491119fccb5fb436217cc737f7faad50f603f",
- "tarball": "http://registry.npmjs.org/is-absolute/-/is-absolute-0.1.7.tgz"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.1.7.tgz",
- "readme": "ERROR: No README data found!"
-}
diff --git a/deps/npm/node_modules/which/node_modules/isexe/LICENSE b/deps/npm/node_modules/which/node_modules/isexe/LICENSE
new file mode 100644
index 0000000000..19129e315f
--- /dev/null
+++ b/deps/npm/node_modules/which/node_modules/isexe/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/which/node_modules/isexe/package.json b/deps/npm/node_modules/which/node_modules/isexe/package.json
index 49aeeab2a3..9f0f9d2aed 100644
--- a/deps/npm/node_modules/which/node_modules/isexe/package.json
+++ b/deps/npm/node_modules/which/node_modules/isexe/package.json
@@ -6,16 +6,20 @@
]
],
"_from": "isexe@>=1.1.1 <2.0.0",
- "_id": "isexe@1.1.1",
+ "_id": "isexe@1.1.2",
"_inCache": true,
"_installable": true,
"_location": "/which/isexe",
"_nodeVersion": "4.0.0",
+ "_npmOperationalInternal": {
+ "host": "packages-9-west.internal.npmjs.com",
+ "tmp": "tmp/isexe-1.1.2.tgz_1454992795963_0.7608721863944083"
+ },
"_npmUser": {
"email": "i@izs.me",
"name": "isaacs"
},
- "_npmVersion": "2.14.15",
+ "_npmVersion": "3.7.0",
"_phantomChildren": {},
"_requested": {
"name": "isexe",
@@ -28,8 +32,8 @@
"_requiredBy": [
"/which"
],
- "_resolved": "https://registry.npmjs.org/isexe/-/isexe-1.1.1.tgz",
- "_shasum": "f0d4793ed2fb5c46bfdeab760bbb965f4485a66c",
+ "_resolved": "https://registry.npmjs.org/isexe/-/isexe-1.1.2.tgz",
+ "_shasum": "36f3e22e60750920f5e7241a476a8c6a42275ad0",
"_shrinkwrap": null,
"_spec": "isexe@^1.1.1",
"_where": "/Users/rebecca/code/npm/node_modules/which",
@@ -52,18 +56,18 @@
"test": "test"
},
"dist": {
- "shasum": "f0d4793ed2fb5c46bfdeab760bbb965f4485a66c",
- "tarball": "http://registry.npmjs.org/isexe/-/isexe-1.1.1.tgz"
+ "shasum": "36f3e22e60750920f5e7241a476a8c6a42275ad0",
+ "tarball": "http://registry.npmjs.org/isexe/-/isexe-1.1.2.tgz"
},
- "gitHead": "af83031caed58654ad9d20b98eb710d383618ad7",
+ "gitHead": "1882eed72c2ba152f4dd1336d857b0755ae306d9",
"homepage": "https://github.com/isaacs/isexe#readme",
"keywords": [],
"license": "ISC",
"main": "index.js",
"maintainers": [
{
- "name": "isaacs",
- "email": "i@izs.me"
+ "email": "i@izs.me",
+ "name": "isaacs"
}
],
"name": "isexe",
@@ -76,5 +80,5 @@
"scripts": {
"test": "tap test/*.js --branches=100 --statements=100 --functions=100 --lines=100"
},
- "version": "1.1.1"
+ "version": "1.1.2"
}
diff --git a/deps/npm/node_modules/which/package.json b/deps/npm/node_modules/which/package.json
index 04f90fa687..9f1f7a9fcd 100644
--- a/deps/npm/node_modules/which/package.json
+++ b/deps/npm/node_modules/which/package.json
@@ -1,42 +1,54 @@
{
"_args": [
[
- "which@~1.2.1",
- "/Users/rebecca/code/npm"
+ {
+ "name": "which",
+ "raw": "which@1.2.9",
+ "rawSpec": "1.2.9",
+ "scope": null,
+ "spec": "1.2.9",
+ "type": "version"
+ },
+ "/Users/zkat/Documents/code/npm"
]
],
- "_from": "which@>=1.2.1 <1.3.0",
- "_id": "which@1.2.4",
+ "_from": "which@1.2.9",
+ "_id": "which@1.2.9",
"_inCache": true,
"_installable": true,
"_location": "/which",
- "_nodeVersion": "4.0.0",
+ "_nodeVersion": "4.4.4",
+ "_npmOperationalInternal": {
+ "host": "packages-16-east.internal.npmjs.com",
+ "tmp": "tmp/which-1.2.9.tgz_1463603459182_0.9633393425028771"
+ },
"_npmUser": {
"email": "i@izs.me",
"name": "isaacs"
},
- "_npmVersion": "2.14.15",
+ "_npmVersion": "3.9.1",
"_phantomChildren": {},
"_requested": {
"name": "which",
- "raw": "which@~1.2.1",
- "rawSpec": "~1.2.1",
+ "raw": "which@1.2.9",
+ "rawSpec": "1.2.9",
"scope": null,
- "spec": ">=1.2.1 <1.3.0",
- "type": "range"
+ "spec": "1.2.9",
+ "type": "version"
},
"_requiredBy": [
"/",
"/node-gyp",
- "/standard/standard-format/esformatter/npm-run/npm-path",
+ "/tap/foreground-child",
"/tap/foreground-child/cross-spawn-async",
- "/tap/nyc/istanbul"
+ "/tap/nyc/istanbul",
+ "/tap/nyc/spawn-wrap"
],
- "_resolved": "https://registry.npmjs.org/which/-/which-1.2.4.tgz",
- "_shasum": "1557f96080604e5b11b3599eb9f45b50a9efd722",
+ "_resolved": "https://registry.npmjs.org/which/-/which-1.2.9.tgz",
+ "_shasum": "0b3a0e5c073bc10ca7b9ec13534eeef8a71ab61f",
"_shrinkwrap": null,
- "_spec": "which@~1.2.1",
- "_where": "/Users/rebecca/code/npm",
+ "_spec": "which@1.2.9",
+ "_where": "/Users/zkat/Documents/code/npm",
"author": {
"email": "i@izs.me",
"name": "Isaac Z. Schlueter",
@@ -49,7 +61,6 @@
"url": "https://github.com/isaacs/node-which/issues"
},
"dependencies": {
- "is-absolute": "^0.1.7",
"isexe": "^1.1.1"
},
"description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
@@ -60,17 +71,21 @@
},
"directories": {},
"dist": {
- "shasum": "1557f96080604e5b11b3599eb9f45b50a9efd722",
- "tarball": "http://registry.npmjs.org/which/-/which-1.2.4.tgz"
+ "shasum": "0b3a0e5c073bc10ca7b9ec13534eeef8a71ab61f",
+ "tarball": "https://registry.npmjs.org/which/-/which-1.2.9.tgz"
},
- "gitHead": "1375684d40af9de2ecc527d1ab9b87b537d7a1cc",
+ "files": [
+ "which.js",
+ "bin/which"
+ ],
+ "gitHead": "34aac93a4c4ee9e3c7a49fe09778ca942e636cce",
"homepage": "https://github.com/isaacs/node-which#readme",
"license": "ISC",
"main": "which.js",
"maintainers": [
{
- "name": "isaacs",
- "email": "i@izs.me"
+ "email": "i@izs.me",
+ "name": "isaacs"
}
],
"name": "which",
@@ -81,7 +96,9 @@
"url": "git://github.com/isaacs/node-which.git"
},
"scripts": {
+ "changelog": "bash changelog.sh",
+ "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}",
"test": "tap test/*.js --cov"
},
- "version": "1.2.4"
+ "version": "1.2.9"
}
diff --git a/deps/npm/node_modules/which/test/basic.js b/deps/npm/node_modules/which/test/basic.js
deleted file mode 100644
index 54c8d2384d..0000000000
--- a/deps/npm/node_modules/which/test/basic.js
+++ /dev/null
@@ -1,120 +0,0 @@
-var t = require('tap')
-var fs = require('fs')
-var rimraf = require('rimraf')
-var mkdirp = require('mkdirp')
-var fixture = __dirname + '/fixture'
-var which = require('../which.js')
-var path = require('path')
-
-var isWindows = process.platform === 'win32' ||
- process.env.OSTYPE === 'cygwin' ||
- process.env.OSTYPE === 'msys'
-
-var skip = { skip: isWindows ? 'not relevant on windows' : false }
-
-t.test('setup', function (t) {
- rimraf.sync(fixture)
- mkdirp.sync(fixture)
- fs.writeFileSync(fixture + '/foo.sh', 'echo foo\n')
- t.end()
-})
-
-t.test('does not find non-executable', skip, function (t) {
- t.plan(2)
-
- t.test('absolute', function (t) {
- t.plan(2)
- which(fixture + '/foo.sh', function (er) {
- t.isa(er, Error)
- })
-
- t.throws(function () {
- which.sync(fixture + '/foo.sh')
- })
- })
-
- t.test('with path', function (t) {
- t.plan(2)
- which('foo.sh', { path: fixture }, function (er) {
- t.isa(er, Error)
- })
-
- t.throws(function () {
- which.sync('foo.sh', { path: fixture })
- })
- })
-})
-
-t.test('make executable', function (t) {
- fs.chmodSync(fixture + '/foo.sh', '0755')
- t.end()
-})
-
-t.test('find when executable', function (t) {
- var opt = { pathExt: '.sh' }
- var expect = path.resolve(fixture, 'foo.sh').toLowerCase()
- var PATH = process.env.PATH || process.env.Path
-
- t.test('absolute', function (t) {
- runTest(fixture + '/foo.sh', t)
- })
-
- t.test('with process.env.PATH', function (t) {
- process.env.PATH = process.env.Path = fixture
- runTest('foo.sh', t)
- })
-
- t.test('with process.env.Path', {
- skip: isWindows ? false : 'Only for Windows'
- }, function (t) {
- process.env.PATH = ""
- process.env.Path = fixture
- runTest('foo.sh', t)
- })
-
- t.test('with pathExt', {
- skip: isWindows ? false : 'Only for Windows'
- }, function (t) {
- var pe = process.env.PATHEXT
- process.env.PATHEXT = '.SH'
-
- t.test('foo.sh', function (t) {
- runTest('foo.sh', t)
- })
- t.test('foo', function (t) {
- runTest('foo', t)
- })
- t.test('replace', function (t) {
- process.env.PATHEXT = pe
- t.end()
- })
- t.end()
- })
-
- t.test('with path opt', function (t) {
- opt.path = fixture
- runTest('foo.sh', t)
- })
-
- function runTest(exec, t) {
- t.plan(2)
-
- var found = which.sync(exec, opt).toLowerCase()
- t.equal(found, expect)
-
- which(exec, opt, function (er, found) {
- if (er)
- throw er
- t.equal(found.toLowerCase(), expect)
- t.end()
- process.env.PATH = PATH
- })
- }
-
- t.end()
-})
-
-t.test('clean', function (t) {
- rimraf.sync(fixture)
- t.end()
-})
diff --git a/deps/npm/node_modules/which/test/bin.js b/deps/npm/node_modules/which/test/bin.js
deleted file mode 100644
index ff7eb530c7..0000000000
--- a/deps/npm/node_modules/which/test/bin.js
+++ /dev/null
@@ -1,119 +0,0 @@
-var t = require('tap')
-var spawn = require('child_process').spawn
-var node = process.execPath
-var bin = require.resolve('../bin/which')
-
-function which (args, extraPath, cb) {
- if (typeof extraPath === 'function')
- cb = extraPath, extraPath = null
-
- var options = {}
- if (extraPath) {
- var sep = process.platform === 'win32' ? ';' : ':'
- var p = process.env.PATH + sep + extraPath
- options.env = Object.keys(process.env).reduce(function (env, k) {
- if (!k.match(/^path$/i))
- env[k] = process.env[k]
- return env
- }, { PATH: p })
- }
-
- var out = ''
- var err = ''
- var child = spawn(node, [bin].concat(args), options)
- child.stdout.on('data', function (c) {
- out += c
- })
- child.stderr.on('data', function (c) {
- err += c
- })
- child.on('close', function (code, signal) {
- cb(code, signal, out.trim(), err.trim())
- })
-}
-
-t.test('finds node', function (t) {
- which('node', function (code, signal, out, err) {
- t.equal(signal, null)
- t.equal(code, 0)
- t.equal(err, '')
- t.match(out, /[\\\/]node(\.exe)?$/)
- t.end()
- })
-})
-
-t.test('does not find flergyderp', function (t) {
- which('flergyderp', function (code, signal, out, err) {
- t.equal(signal, null)
- t.equal(code, 1)
- t.equal(err, '')
- t.match(out, '')
- t.end()
- })
-})
-
-t.test('finds node and tap', function (t) {
- which(['node', 'tap'], function (code, signal, out, err) {
- t.equal(signal, null)
- t.equal(code, 0)
- t.equal(err, '')
- t.match(out.split(/\n/), [
- /[\\\/]node(\.exe)?$/,
- /[\\\/]tap(\.cmd)?$/
- ])
- t.end()
- })
-})
-
-t.test('finds node and tap, but not flergyderp', function (t) {
- which(['node', 'flergyderp', 'tap'], function (code, signal, out, err) {
- t.equal(signal, null)
- t.equal(code, 1)
- t.equal(err, '')
- t.match(out.split(/\n/), [
- /[\\\/]node(\.exe)?$/,
- /[\\\/]tap(\.cmd)?$/
- ])
- t.end()
- })
-})
-
-t.test('cli flags', function (t) {
- var p = require('path').dirname(bin)
- var cases = [ '-a', '-s', '-as', '-sa' ]
- t.plan(cases.length)
- cases.forEach(function (c) {
- t.test(c, function (t) {
- which(['which', c], p, function (code, signal, out, err) {
- t.equal(signal, null)
- t.equal(code, 0)
- t.equal(err, '')
- if (/s/.test(c))
- t.equal(out, '', 'should be silent')
- else if (/a/.test(c))
- t.ok(out.split(/\n/).length > 1, 'should have more than 1 result')
- t.end()
- })
- })
- })
-})
-
-t.test('shows usage', function (t) {
- which([], function (code, signal, out, err) {
- t.equal(signal, null)
- t.equal(code, 1)
- t.equal(err, 'usage: which [-as] program ...')
- t.equal(out, '')
- t.end()
- })
-})
-
-t.test('complains about unknown flag', function (t) {
- which(['node', '-sax'], function (code, signal, out, err) {
- t.equal(signal, null)
- t.equal(code, 1)
- t.equal(out, '')
- t.equal(err, 'which: illegal option -- x\nusage: which [-as] program ...')
- t.end()
- })
-})
diff --git a/deps/npm/node_modules/which/test/windows.js b/deps/npm/node_modules/which/test/windows.js
deleted file mode 100644
index 1d5e4294a6..0000000000
--- a/deps/npm/node_modules/which/test/windows.js
+++ /dev/null
@@ -1,10 +0,0 @@
-// pretend to be Windows.
-if (process.platform === 'win32') {
- var t = require('tap')
- t.plan(0, 'already on windows')
- process.exit(0)
-}
-
-process.env.Path = process.env.PATH.split(':').join(';')
-process.env.OSTYPE = 'cygwin'
-require('./basic.js')
diff --git a/deps/npm/node_modules/which/which.js b/deps/npm/node_modules/which/which.js
index 5cf0124d78..b61da894ff 100644
--- a/deps/npm/node_modules/which/which.js
+++ b/deps/npm/node_modules/which/which.js
@@ -9,9 +9,15 @@ var path = require('path')
var COLON = isWindows ? ';' : ':'
var isexe = require('isexe')
var fs = require('fs')
-var isAbsolute = require('is-absolute')
-function getPathInfo(cmd, opt) {
+function getNotFoundError (cmd) {
+ var er = new Error('not found: ' + cmd)
+ er.code = 'ENOENT'
+
+ return er
+}
+
+function getPathInfo (cmd, opt) {
var colon = opt.colon || COLON
var pathEnv = opt.path || process.env.Path || process.env.PATH || ''
var pathExt = ['']
@@ -31,9 +37,9 @@ function getPathInfo(cmd, opt) {
pathExt.unshift('')
}
- // If it's absolute, then we don't bother searching the pathenv.
+ // If it has a slash, then we don't bother searching the pathenv.
// just check the file itself, and that's it.
- if (isAbsolute(cmd))
+ if (cmd.match(/\//) || isWindows && cmd.match(/\\/))
pathEnv = ['']
return {
@@ -60,14 +66,17 @@ function which (cmd, opt, cb) {
if (opt.all && found.length)
return cb(null, found)
else
- return cb(new Error('not found: '+cmd))
+ return cb(getNotFoundError(cmd))
}
var pathPart = pathEnv[i]
if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
pathPart = pathPart.slice(1, -1)
- var p = path.resolve(pathPart, cmd)
+ var p = path.join(pathPart, cmd)
+ if (!pathPart && (/^\.[\\\/]/).test(cmd)) {
+ p = cmd.slice(0, 2) + p
+ }
;(function E (ii, ll) {
if (ii === ll) return F(i + 1, l)
var ext = pathExt[ii]
@@ -99,6 +108,9 @@ function whichSync (cmd, opt) {
pathPart = pathPart.slice(1, -1)
var p = path.join(pathPart, cmd)
+ if (!pathPart && /^\.[\\\/]/.test(cmd)) {
+ p = cmd.slice(0, 2) + p
+ }
for (var j = 0, ll = pathExt.length; j < ll; j ++) {
var cur = p + pathExt[j]
var is
@@ -117,5 +129,5 @@ function whichSync (cmd, opt) {
if (opt.all && found.length)
return found
- throw new Error('not found: '+cmd)
+ throw getNotFoundError(cmd)
}
diff --git a/deps/npm/package.json b/deps/npm/package.json
index 567aafb9a1..1623994091 100644
--- a/deps/npm/package.json
+++ b/deps/npm/package.json
@@ -1,5 +1,5 @@
{
- "version": "3.8.9",
+ "version": "3.9.3",
"name": "npm",
"description": "a package manager for JavaScript",
"keywords": [
@@ -44,24 +44,24 @@
"fs-vacuum": "~1.2.9",
"fs-write-stream-atomic": "~1.0.8",
"fstream": "~1.0.8",
- "fstream-npm": "~1.0.7",
+ "fstream-npm": "~1.1.0",
"glob": "~7.0.3",
- "graceful-fs": "~4.1.3",
+ "graceful-fs": "~4.1.4",
"has-unicode": "~2.0.0",
- "hosted-git-info": "~2.1.4",
+ "hosted-git-info": "~2.1.5",
"iferr": "~0.1.5",
- "inflight": "~1.0.4",
+ "inflight": "~1.0.5",
"inherits": "~2.0.1",
"ini": "~1.3.4",
- "init-package-json": "~1.9.3",
+ "init-package-json": "~1.9.4",
"lockfile": "~1.0.1",
- "lodash._baseuniq": "~4.5.1",
+ "lodash._baseuniq": "~4.6.0",
"lodash.clonedeep": "~4.3.2",
"lodash.isarray": "~4.0.0",
- "lodash.keys": "~4.0.6",
- "lodash.union": "~4.3.0",
- "lodash.uniq": "~4.2.1",
- "lodash.without": "~4.1.2",
+ "lodash.keys": "~4.0.7",
+ "lodash.union": "~4.4.0",
+ "lodash.uniq": "~4.3.0",
+ "lodash.without": "~4.2.0",
"mkdirp": "~0.5.1",
"node-gyp": "~3.3.1",
"nopt": "~3.0.6",
@@ -81,8 +81,8 @@
"read-cmd-shim": "~1.0.1",
"read-installed": "~4.0.3",
"read-package-json": "~2.0.4",
- "read-package-tree": "~5.1.2",
- "readable-stream": "~2.1.0",
+ "read-package-tree": "~5.1.4",
+ "readable-stream": "~2.1.3",
"realize-package-specifier": "~3.0.3",
"request": "~2.72.0",
"retry": "~0.9.0",
@@ -99,7 +99,7 @@
"unique-filename": "~1.1.0",
"unpipe": "~1.0.0",
"validate-npm-package-name": "~2.2.2",
- "which": "~1.2.4",
+ "which": "~1.2.9",
"wrappy": "~1.0.1",
"write-file-atomic": "~1.1.4"
},
@@ -196,7 +196,7 @@
"npm-registry-mock": "~1.0.1",
"require-inject": "~1.3.1",
"sprintf-js": "~1.0.3",
- "standard": "~5.4.1",
+ "standard": "~6.0.8",
"tacks": "~1.2.1",
"tap": "~5.7.1"
},
@@ -204,7 +204,7 @@
"dumpconf": "env | grep npm | sort | uniq",
"prepublish": "node bin/npm-cli.js prune --prefix=. --no-global && rimraf test/*/*/node_modules && make doc-clean && make -j4 doc",
"preversion": "bash scripts/update-authors.sh && git add AUTHORS && git commit -m \"update AUTHORS\" || true",
- "tap": "tap --timeout 240",
+ "tap": "tap --coverage --reporter=classic --timeout 300",
"test": "standard && npm run test-tap",
"test-tap": "npm run tap -- \"test/tap/*.js\"",
"test-node": "\"$NODE\" \"node_modules/.bin/tap\" --timeout 240 \"test/tap/*.js\""
diff --git a/deps/npm/test/common-tap.js b/deps/npm/test/common-tap.js
index d7e9c8f7d0..847c87ba0f 100644
--- a/deps/npm/test/common-tap.js
+++ b/deps/npm/test/common-tap.js
@@ -1,3 +1,8 @@
+'use strict'
+var fs = require('graceful-fs')
+var readCmdShim = require('read-cmd-shim')
+var isWindows = require('../lib/utils/is-windows.js')
+
// cheesy hackaround for test deps (read: nock) that rely on setImmediate
if (!global.setImmediate || !require('timers').setImmediate) {
require('timers').setImmediate = global.setImmediate = function () {
@@ -25,9 +30,12 @@ process.env.random_env_var = 'foo'
process.env.npm_config_node_version = process.version.replace(/-.*$/, '')
var bin = exports.bin = require.resolve('../bin/npm-cli.js')
+
var chain = require('slide').chain
var once = require('once')
+var nodeBin = exports.nodeBin = process.env.npm_node_execpath || process.env.NODE || process.execPath
+
exports.npm = function (cmd, opts, cb) {
cb = once(cb)
cmd = [bin].concat(cmd)
@@ -40,8 +48,7 @@ exports.npm = function (cmd, opts, cb) {
var stdout = ''
var stderr = ''
- var node = process.execPath
- var child = spawn(node, cmd, opts)
+ var child = spawn(nodeBin, cmd, opts)
if (child.stderr) {
child.stderr.on('data', function (chunk) {
@@ -88,3 +95,27 @@ exports.makeGitRepo = function (params, cb) {
chain(commands, cb)
}
+
+exports.readBinLink = function (path) {
+ if (isWindows) {
+ return readCmdShim.sync(path)
+ } else {
+ return fs.readlinkSync(path)
+ }
+}
+
+exports.skipIfWindows = function (why) {
+ if (!isWindows) return
+ console.log('1..1')
+ if (!why) why = 'this test not available on windows'
+ console.log('ok 1 # skip ' + why)
+ process.exit(0)
+}
+
+exports.pendIfWindows = function (why) {
+ if (!isWindows) return
+ console.log('1..1')
+ if (!why) why = 'this test is pending further changes on windows'
+ console.log('not ok 1 # todo ' + why)
+ process.exit(0)
+}
diff --git a/deps/npm/test/fixtures/config/userconfig-with-gc b/deps/npm/test/fixtures/config/userconfig-with-gc
new file mode 100644
index 0000000000..62ad80be11
--- /dev/null
+++ b/deps/npm/test/fixtures/config/userconfig-with-gc
@@ -0,0 +1,22 @@
+globalconfig=/Users/zkat/Documents/code/npm/test/fixtures/config/globalconfig
+email=i@izs.me
+env-thing=asdf
+init.author.name=Isaac Z. Schlueter
+init.author.email=i@izs.me
+init.author.url=http://blog.izs.me/
+init.version=1.2.3
+proprietary-attribs=false
+npm:publishtest=true
+_npmjs.org:couch=https://admin:password@localhost:5984/registry
+npm-www:nocache=1
+sign-git-tag=false
+message=v%s
+strict-ssl=false
+_auth="dXNlcm5hbWU6cGFzc3dvcmQ="
+
+[_token]
+AuthSession=yabba-dabba-doodle
+version=1
+expires=1345001053415
+path=/
+httponly=true
diff --git a/deps/npm/test/tap/00-config-setup.js b/deps/npm/test/tap/00-config-setup.js
index 0310f48d5c..7303c8328f 100644
--- a/deps/npm/test/tap/00-config-setup.js
+++ b/deps/npm/test/tap/00-config-setup.js
@@ -21,7 +21,7 @@ exports.ucData =
'sign-git-tag': true,
message: 'v%s',
'strict-ssl': false,
- 'tmp': process.env.HOME + '/.tmp',
+ 'tmp': path.normalize(process.env.HOME + '/.tmp'),
_auth: 'dXNlcm5hbWU6cGFzc3dvcmQ=',
_token:
{ AuthSession: 'yabba-dabba-doodle',
@@ -38,10 +38,10 @@ Object.keys(process.env).forEach(function (k) {
}
})
process.env.npm_config_userconfig = exports.userconfig
-process.env.npm_config_other_env_thing = 1000
+process.env.npm_config_other_env_thing = '1000'
process.env.random_env_var = 'asdf'
process.env.npm_config__underbar_env_thing = 'underful'
-process.env.NPM_CONFIG_UPPERCASE_ENV_THING = 42
+process.env.NPM_CONFIG_UPPERCASE_ENV_THING = '42'
exports.envData = {
userconfig: exports.userconfig,
@@ -61,11 +61,11 @@ try {
fs.statSync(projectConf)
} catch (er) {
// project conf not found, probably working with packed npm
- fs.writeFileSync(projectConf, function () {/*
+ fs.writeFileSync(projectConf, function () { /*
save-prefix = ~
proprietary-attribs = false
legacy-bundling = true
- */}.toString().split('\n').slice(1, -1).join('\n'))
+ */ }.toString().split('\n').slice(1, -1).join('\n'))
}
var projectRc = path.join(__dirname, '..', 'fixtures', 'config', '.npmrc')
diff --git a/deps/npm/test/tap/bugs.js b/deps/npm/test/tap/bugs.js
index 090c2b9cb2..8b992fd7be 100644
--- a/deps/npm/test/tap/bugs.js
+++ b/deps/npm/test/tap/bugs.js
@@ -1,9 +1,6 @@
-if (process.platform === 'win32') {
- console.error('skipping test, because windows and shebangs')
- process.exit(0)
-}
-
var common = require('../common-tap.js')
+common.pendIfWindows('not working because Windows and shebangs')
+
var mr = require('npm-registry-mock')
var test = require('tap').test
diff --git a/deps/npm/test/tap/builtin-config.js b/deps/npm/test/tap/builtin-config.js
index bb08767c56..22a447c9cf 100644
--- a/deps/npm/test/tap/builtin-config.js
+++ b/deps/npm/test/tap/builtin-config.js
@@ -14,7 +14,7 @@ var folder = path.resolve(__dirname, 'builtin-config')
var test = require('tap').test
var npm = path.resolve(__dirname, '../..')
var spawn = require('child_process').spawn
-var node = process.execPath
+var node = common.nodeBin
test('setup', function (t) {
t.plan(1)
@@ -34,9 +34,10 @@ test('install npm into first folder', function (t) {
'--prefix=' + folder + '/first',
'--ignore-scripts',
'--cache=' + folder + '/cache',
- '--loglevel=silent',
- '--tmp=' + folder + '/tmp']
- common.npm(args, {stdio: 'inherit'}, function (er, code) {
+ '--tmp=' + folder + '/tmp',
+ '--loglevel=warn',
+ '--progress']
+ common.npm(args, {}, function (er, code) {
if (er) throw er
t.equal(code, 0)
t.end()
@@ -49,8 +50,7 @@ test('write npmrc file', function (t) {
'--prefix=' + folder + '/first',
'--cache=' + folder + '/cache',
'--tmp=' + folder + '/tmp',
- '--',
- node, __filename, 'write-builtin', process.pid
+ '--', node, __filename, 'write-builtin', process.pid
],
{'stdio': 'inherit'},
function (er, code) {
@@ -73,9 +73,9 @@ test('use first npm to install second npm', function (t) {
{},
function (er, code, so) {
if (er) throw er
- t.equal(code, 0)
+ t.equal(code, 0, 'got npm root')
var root = so.trim()
- t.ok(fs.statSync(root).isDirectory())
+ t.ok(fs.statSync(root).isDirectory(), 'npm root is dir')
var bin = path.resolve(root, 'npm/bin/npm-cli.js')
spawn(
@@ -84,14 +84,16 @@ test('use first npm to install second npm', function (t) {
bin,
'install', npm,
'-g',
+ '--ignore-scripts',
'--prefix=' + folder + '/second',
'--cache=' + folder + '/cache',
'--tmp=' + folder + '/tmp'
- ]
+ ],
+ {}
)
.on('error', function (er) { throw er })
.on('close', function (code) {
- t.equal(code, 0, 'code is zero')
+ t.equal(code, 0, 'second npm install')
t.end()
})
}
@@ -120,9 +122,9 @@ test('verify that the builtin config matches', function (t) {
var secondRoot = so.trim()
var firstRc = path.resolve(firstRoot, 'npm', 'npmrc')
var secondRc = path.resolve(secondRoot, 'npm', 'npmrc')
- var firstData = fs.readFileSync(firstRc, 'utf8')
- var secondData = fs.readFileSync(secondRc, 'utf8')
- t.equal(firstData, secondData)
+ var firstData = fs.readFileSync(firstRc, 'utf8').split(/\r?\n/)
+ var secondData = fs.readFileSync(secondRc, 'utf8').split(/\r?\n/)
+ t.isDeeply(firstData, secondData)
t.end()
})
})
diff --git a/deps/npm/test/tap/bundled-dependencies-no-pkgjson.js b/deps/npm/test/tap/bundled-dependencies-no-pkgjson.js
new file mode 100644
index 0000000000..44eb47a03a
--- /dev/null
+++ b/deps/npm/test/tap/bundled-dependencies-no-pkgjson.js
@@ -0,0 +1,47 @@
+var test = require('tap').test
+var path = require('path')
+var fs = require('graceful-fs')
+
+var mkdirp = require('mkdirp')
+var rimraf = require('rimraf')
+var common = require('../common-tap.js')
+
+var dir = path.resolve(__dirname, 'bundled-dependencies-no-pkgjson')
+var pkg = path.resolve(dir, 'pkg-with-bundled-dep')
+var dep = path.resolve(pkg, 'node_modules', 'a-bundled-dep')
+
+var pkgJson = JSON.stringify({
+ name: 'pkg-with-bundled-dep',
+ version: '1.0.0',
+ dependencies: {
+ },
+ bundledDependencies: [
+ 'a-bundled-dep'
+ ]
+}, null, 2) + '\n'
+
+test('setup', function (t) {
+ mkdirp.sync(path.join(dir, 'node_modules'))
+ mkdirp.sync(dep)
+
+ fs.writeFileSync(path.resolve(pkg, 'package.json'), pkgJson)
+ fs.writeFileSync(path.resolve(dep, 'index.js'), '')
+ t.end()
+})
+
+test('proper error on bundled dep with no package.json', function (t) {
+ t.plan(3)
+ var npmArgs = ['install', './' + path.basename(pkg)]
+
+ common.npm(npmArgs, { cwd: dir }, function (err, code, stdout, stderr) {
+ t.ifError(err, 'npm ran without issue')
+ t.notEqual(code, 0)
+ t.like(stderr, /ENOENT/, 'ENOENT should be in stderr')
+ t.end()
+ })
+})
+
+test('cleanup', function (t) {
+ rimraf.sync(dir)
+ t.end()
+})
diff --git a/deps/npm/test/tap/cache-ls-filenames.js b/deps/npm/test/tap/cache-ls-filenames.js
new file mode 100644
index 0000000000..c67bca25f3
--- /dev/null
+++ b/deps/npm/test/tap/cache-ls-filenames.js
@@ -0,0 +1,51 @@
+var t = require('tap')
+var path = require('path')
+var fs = require('fs')
+var mkdirp = require('mkdirp')
+var rimraf = require('rimraf')
+var spawn = require('child_process').spawn
+var npm = require.resolve('../../bin/npm-cli.js')
+var dir = path.resolve(__dirname, 'cache-ls-filenames')
+var node = process.execPath
+
+t.test('setup', function (t) {
+ rimraf.sync(dir)
+ mkdirp.sync(dir + '/a/b/c/d')
+ for (var i = 0; i < 5; i++) {
+ fs.writeFileSync(dir + '/file-' + i, 'x\n')
+ fs.writeFileSync(dir + '/a/b/file-' + i, 'x\n')
+ }
+ t.end()
+})
+
+function test (t, args) {
+ var child = spawn(node, [npm, 'cache', 'ls', '--cache=' + dir].concat(args))
+ var out = ''
+ child.stdout.on('data', function (c) {
+ out += c
+ })
+ child.on('close', function (code, signal) {
+ t.equal(code, 0)
+ t.equal(signal, null)
+ out.trim().split(/[\n\r]+/).map(function (filename) {
+ return filename.replace(/^~/, process.env.HOME)
+ }).forEach(function (file) {
+ // verify that all exist
+ t.ok(fs.existsSync(file), 'exists: ' + file)
+ })
+ t.end()
+ })
+}
+
+t.test('without path arg', function (t) {
+ test(t, [])
+})
+
+t.test('with path arg', function (t) {
+ test(t, ['a'])
+})
+
+t.test('cleanup', function (t) {
+ rimraf.sync(dir)
+ t.end()
+})
diff --git a/deps/npm/test/tap/cache-shasum.js b/deps/npm/test/tap/cache-shasum.js
index 90915ed850..40495c0995 100644
--- a/deps/npm/test/tap/cache-shasum.js
+++ b/deps/npm/test/tap/cache-shasum.js
@@ -1,4 +1,3 @@
-var npm = require.resolve('../../')
var test = require('tap').test
var path = require('path')
var rimraf = require('rimraf')
@@ -6,7 +5,6 @@ var mkdirp = require('mkdirp')
var mr = require('npm-registry-mock')
var common = require('../common-tap.js')
var cache = path.resolve(__dirname, 'cache-shasum')
-var spawn = require('child_process').spawn
var sha = require('sha')
var server
@@ -21,20 +19,15 @@ test('mock reg', function (t) {
})
test('npm cache add request', function (t) {
- var c = spawn(process.execPath, [
- npm, 'cache', 'add', 'request@2.27.0',
+ common.npm([
+ 'cache', 'add', 'request@2.27.0',
'--cache=' + cache,
'--registry=' + common.registry,
- '--loglevel=quiet'
- ])
- c.stderr.pipe(process.stderr)
-
- c.stdout.on('data', function (d) {
- t.fail('Should not get data on stdout: ' + d)
- })
-
- c.on('close', function (code) {
- t.notOk(code, 'exit ok')
+ '--loglevel=error'
+ ], {}, function (err, code, stdout) {
+ if (err) throw err
+ t.is(code, 0, 'cmd ran without error')
+ t.is(stdout, '', 'should not get data on stdout')
t.end()
})
})
@@ -53,6 +46,5 @@ test('compare', function (t) {
test('cleanup', function (t) {
server.close()
- rimraf.sync(cache)
- t.end()
+ rimraf(cache, t.end)
})
diff --git a/deps/npm/test/tap/check-permissions.js b/deps/npm/test/tap/check-permissions.js
index d3c0c6da25..0a5f2e038a 100644
--- a/deps/npm/test/tap/check-permissions.js
+++ b/deps/npm/test/tap/check-permissions.js
@@ -78,9 +78,14 @@ function writableTests (t, writable) {
writable(writableDir, function (er) {
t.error(er, 'writable dir is writable')
})
- writable(nonWritableDir, function (er) {
- t.ok(er, 'non-writable dir resulted in an error')
- })
+ if (process.platform !== 'win32') {
+ // Windows folders cannot be set to be read-only.
+ writable(nonWritableDir, function (er) {
+ t.ok(er, 'non-writable dir resulted in an error')
+ })
+ } else {
+ t.pass('windows folders cannot be read-only')
+ }
}
function cleanup () {
diff --git a/deps/npm/test/tap/config-basic.js b/deps/npm/test/tap/config-basic.js
index ff33181470..cabfa24396 100644
--- a/deps/npm/test/tap/config-basic.js
+++ b/deps/npm/test/tap/config-basic.js
@@ -11,7 +11,6 @@ var projectData = {
var ucData = common.ucData
var envData = common.envData
-var envDataFix = common.envDataFix
var gcData = { 'package-config:foo': 'boo' }
@@ -19,9 +18,17 @@ var biData = {}
var cli = { foo: 'bar', umask: parseInt('022', 8) }
+var expectNames = [
+ 'cli',
+ 'envData',
+ 'projectData',
+ 'ucData',
+ 'gcData',
+ 'biData'
+]
var expectList = [
cli,
- envDataFix,
+ envData,
projectData,
ucData,
gcData,
@@ -31,7 +38,7 @@ var expectList = [
var expectSources = {
cli: { data: cli },
env: {
- data: envDataFix,
+ data: envData,
source: envData,
prefix: ''
},
@@ -53,17 +60,31 @@ var expectSources = {
builtin: { data: biData }
}
+function isDeeplyDetails (t, aa, bb, msg, seen) {
+ if (aa == null && bb == null) return t.pass(msg)
+ if (typeof bb !== 'object') return t.is(aa, bb, msg)
+ if (!seen) seen = []
+ for (var kk in seen) if (seen[kk] === aa || seen[kk] === bb) return
+ seen.push(aa, bb)
+ t.is(Object.keys(aa).length, Object.keys(bb).length, msg + ': # of elements')
+ Object.keys(bb).forEach(function (key) {
+ isDeeplyDetails(t, aa[key], bb[key], msg + ' -> ' + key, seen)
+ })
+}
+
test('no builtin', function (t) {
t.comment(process.env)
npmconf.load(cli, function (er, conf) {
if (er) throw er
- t.same(conf.list, expectList, 'config properties in list format match expected')
- t.same(conf.sources, expectSources, 'config by source matches expected')
+ expectNames.forEach(function (name, ii) {
+ isDeeplyDetails(t, conf.list[ii], expectList[ii], 'config properities list: ' + name)
+ })
+ isDeeplyDetails(t, conf.sources, expectSources, 'config by source')
t.same(npmconf.rootConf.list, [], 'root configuration is empty')
- t.equal(npmconf.rootConf.root, npmconf.defs.defaults, 'defaults match up')
- t.equal(conf.root, npmconf.defs.defaults, 'current root config matches defaults')
- t.equal(conf.get('umask'), parseInt('022', 8), 'umask is as expected')
- t.equal(conf.get('heading'), 'npm', 'config name is as expected')
+ isDeeplyDetails(t, npmconf.rootConf.root, npmconf.defs.defaults, 'defaults')
+ isDeeplyDetails(t, conf.root, npmconf.defs.defaults, 'current root config is defaults')
+ t.is(conf.get('umask'), parseInt('022', 8), 'umask is as expected')
+ t.is(conf.get('heading'), 'npm', 'config name is as expected')
t.end()
})
})
diff --git a/deps/npm/test/tap/config-certfile.js b/deps/npm/test/tap/config-certfile.js
index 223ff34196..4b960672ad 100644
--- a/deps/npm/test/tap/config-certfile.js
+++ b/deps/npm/test/tap/config-certfile.js
@@ -12,7 +12,8 @@ test('cafile loads as ca', function (t) {
if (er) throw er
t.same(conf.get('cafile'), cafile)
- t.same(conf.get('ca').join('\n'), fs.readFileSync(cafile, 'utf8').trim())
+ var ca = fs.readFileSync(cafile, 'utf8').trim()
+ t.same(conf.get('ca').join(ca.match(/\r/g) ? '\r\n' : '\n'), ca)
t.end()
})
})
diff --git a/deps/npm/test/tap/config-edit.js b/deps/npm/test/tap/config-edit.js
index f9e09aba3a..7d6eb2588d 100644
--- a/deps/npm/test/tap/config-edit.js
+++ b/deps/npm/test/tap/config-edit.js
@@ -8,7 +8,7 @@ var common = require('../common-tap.js')
var pkg = path.resolve(__dirname, 'npm-global-edit')
-var editorSrc = function () {/*
+var editorSrc = function () { /*
#!/usr/bin/env node
var fs = require('fs')
if (fs.existsSync(process.argv[2])) {
@@ -17,7 +17,7 @@ if (fs.existsSync(process.argv[2])) {
console.log('error')
process.exit(1)
}
-*/}.toString().split('\n').slice(1, -1).join('\n')
+*/ }.toString().split('\n').slice(1, -1).join('\n')
var editorPath = path.join(pkg, 'editor')
test('setup', function (t) {
@@ -38,7 +38,9 @@ test('saving configs', function (t) {
cwd: pkg,
env: {
PATH: process.env.PATH,
- EDITOR: editorPath
+ // We rely on the cwd + relative path combo here because otherwise,
+ // this test will break if there's spaces in the editorPath
+ EDITOR: 'node editor'
}
}
common.npm(
diff --git a/deps/npm/test/tap/dedupe-scoped.js b/deps/npm/test/tap/dedupe-scoped.js
index bc352356d4..bcd520420b 100644
--- a/deps/npm/test/tap/dedupe-scoped.js
+++ b/deps/npm/test/tap/dedupe-scoped.js
@@ -11,12 +11,12 @@ var modules = join(pkg, 'node_modules')
var EXEC_OPTS = { cwd: pkg }
-var body = function () {/*
-@scope/shared@2.1.6 node_modules/first/node_modules/@scope/shared -> node_modules/@scope/shared
-firstUnique@0.6.0 node_modules/first/node_modules/firstUnique -> node_modules/firstUnique
-secondUnique@1.2.0 node_modules/second/node_modules/secondUnique -> node_modules/secondUnique
-- @scope/shared@2.1.6 node_modules/second/node_modules/@scope/shared
-*/}.toString().split('\n').slice(1, -1)
+var body = [
+ '@scope/shared@2.1.6 node_modules/first/node_modules/@scope/shared -> node_modules/@scope/shared',
+ 'firstUnique@0.6.0 node_modules/first/node_modules/firstUnique -> node_modules/firstUnique',
+ 'secondUnique@1.2.0 node_modules/second/node_modules/secondUnique -> node_modules/secondUnique',
+ '- @scope/shared@2.1.6 node_modules/second/node_modules/@scope/shared'
+]
var deduper = {
'name': 'dedupe',
@@ -79,7 +79,7 @@ test('dedupe finds the common scoped modules and moves it up one level', functio
t.notOk(code, 'npm ran without issue')
t.notOk(stderr, 'npm printed no errors')
t.same(
- stdout.trim().split('\n').map(ltrimm),
+ stdout.trim().replace(/\\/g, '/').split('\n').map(ltrimm),
body.map(ltrimm),
'got expected output'
)
diff --git a/deps/npm/test/tap/do-not-remove-other-bins.js b/deps/npm/test/tap/do-not-remove-other-bins.js
index af6de62305..6fec728d43 100644
--- a/deps/npm/test/tap/do-not-remove-other-bins.js
+++ b/deps/npm/test/tap/do-not-remove-other-bins.js
@@ -93,7 +93,7 @@ test('verify bins', function (t) {
var bin = path.dirname(
path.resolve(
installBin,
- fs.readlinkSync(path.join(installBin, 'testbin'))))
+ common.readBinLink(path.join(installBin, 'testbin'))))
t.is(bin, path.join(installPath, 'node_modules', 'b'))
t.end()
})
@@ -114,7 +114,7 @@ test('verify postremoval bins', function (t) {
var bin = path.dirname(
path.resolve(
installBin,
- fs.readlinkSync(path.join(installBin, 'testbin'))))
+ common.readBinLink(path.join(installBin, 'testbin'))))
t.is(bin, path.join(installPath, 'node_modules', 'b'))
t.end()
})
diff --git a/deps/npm/test/tap/extraneous-dep-cycle-ls-ok.js b/deps/npm/test/tap/extraneous-dep-cycle-ls-ok.js
index 23b7519361..767cb6d7ff 100644
--- a/deps/npm/test/tap/extraneous-dep-cycle-ls-ok.js
+++ b/deps/npm/test/tap/extraneous-dep-cycle-ls-ok.js
@@ -57,7 +57,7 @@ var expected = pkg + '\n' +
' └── moduleB@1.0.0\n\n'
test('extraneous-dep-cycle', function (t) {
- common.npm(['ls'], {cwd: pkg}, function (er, code, stdout, stderr) {
+ common.npm(['ls', '--unicode=true'], {cwd: pkg}, function (er, code, stdout, stderr) {
t.ifErr(er, 'install finished successfully')
t.is(stdout, expected, 'ls output shows module')
t.end()
diff --git a/deps/npm/test/tap/gently-rm-linked-module.js b/deps/npm/test/tap/gently-rm-linked-module.js
index 1ffe7a8208..aeae71eee0 100644
--- a/deps/npm/test/tap/gently-rm-linked-module.js
+++ b/deps/npm/test/tap/gently-rm-linked-module.js
@@ -1,28 +1,52 @@
+var common = require('../common-tap.js')
+
var basename = require('path').basename
var resolve = require('path').resolve
var fs = require('graceful-fs')
var test = require('tap').test
-var mkdirp = require('mkdirp')
var rimraf = require('rimraf')
-
-var common = require('../common-tap.js')
+var Tacks = require('tacks')
+var File = Tacks.File
+var Dir = Tacks.Dir
+var Symlink = Tacks.Symlink
+var extend = Object.assign || require('util')._extend
+var isWindows = require('../../lib/utils/is-windows.js')
var base = resolve(__dirname, basename(__filename, '.js'))
-var pkg = resolve(base, 'gently-rm-linked')
-var dep = resolve(base, 'test-linked')
-var glb = resolve(base, 'test-global')
-var lnk = resolve(base, 'test-global-link')
+var fixture = new Tacks(Dir({
+ 'working-dir': Dir({
+ 'node_modules': Dir({}) // so it doesn't try to install into npm's own node_modules
+ }),
+ 'test-module': Dir({
+ 'package.json': File({
+ name: '@test/linked',
+ version: '1.0.0',
+ bin: {
+ linked: './index.js'
+ }
+ }),
+ 'index.js': File("module.exports = function () { console.log('whoop whoop') }")
+ }),
+ 'global-dir': Dir({}),
+ 'linked-global-dir': Symlink('global-dir')
+}))
-var EXEC_OPTS = { cwd: pkg }
+var workingDir = resolve(base, 'working-dir')
+var toInstall = resolve(base, 'test-module')
+var linkedGlobal = resolve(base, 'linked-global-dir')
-var index = "module.exports = function () { console.log('whoop whoop') }"
+var env = extend({}, process.env)
-var fixture = {
- name: '@test/linked',
- version: '1.0.0',
- bin: {
- linked: './index.js'
- }
+// We set the global install location via env var here
+// instead of passing it in via `--prefix` because
+// `--prefix` ALSO changes the current package location.
+// And we don't ue the PREFIX env var because
+// npm_config_prefix takes precedence over it and is
+// passed in when running from the npm test suite.
+env.npm_config_prefix = linkedGlobal
+var EXEC_OPTS = {
+ cwd: workingDir,
+ env: env
}
test('setup', function (t) {
@@ -36,32 +60,41 @@ test('install and link', function (t) {
// link our test module into the global folder
common.npm(
[
- '--prefix', lnk,
'--loglevel', 'error',
'link',
- dep
+ toInstall
],
EXEC_OPTS,
- function (er, code, stdout, stderr) {
+ function (er, code) {
if (er) throw er
t.is(code, 0, 'link succeeded')
- t.is(stderr, '', 'no log output')
- t.ok(doesModuleExist(), 'installed ok')
+ var globalBin = resolve(linkedGlobal, isWindows ? '.' : 'bin', 'linked')
+ var globalModule = resolve(linkedGlobal, isWindows ? '.' : 'lib', 'node_modules', '@test', 'linked')
+ var localBin = resolve(workingDir, 'node_modules', '.bin', 'linked')
+ var localModule = resolve(workingDir, 'node_modules', '@test', 'linked')
+ try {
+ t.ok(fs.statSync(globalBin), 'global bin exists')
+ t.is(fs.lstatSync(globalModule).isSymbolicLink(), true, 'global module is link')
+ t.ok(fs.statSync(localBin), 'local bin exists')
+ t.is(fs.lstatSync(localModule).isSymbolicLink(), true, 'local module is link')
+ } catch (ex) {
+ t.ifError(ex, 'linking happened')
+ }
+ if (code !== 0) return t.end()
// and try removing it and make sure that succeeds
common.npm(
[
'--global',
- '--prefix', lnk,
'--loglevel', 'error',
'rm', '@test/linked'
],
EXEC_OPTS,
- function (er, code, stdout, stderr) {
+ function (er, code) {
if (er) throw er
t.is(code, 0, 'rm succeeded')
- t.is(stderr, '', 'no log output')
- t.notOk(doesModuleExist(), 'removed ok')
+ t.throws(function () { fs.statSync(globalBin) }, 'global bin removed')
+ t.throws(function () { fs.statSync(globalModule) }, 'global module removed')
t.end()
}
)
@@ -75,32 +108,11 @@ test('cleanup', function (t) {
t.end()
})
-function doesModuleExist () {
- var binPath = resolve(lnk, 'bin', 'linked')
- var pkgPath = resolve(lnk, 'lib', 'node_modules', '@test', 'linked')
- try {
- fs.statSync(binPath)
- fs.statSync(pkgPath)
- return true
- } catch (ex) {
- return false
- }
-}
-
function cleanup () {
- rimraf.sync(pkg)
- rimraf.sync(dep)
- rimraf.sync(lnk)
- rimraf.sync(glb)
+ fixture.remove(base)
+ rimraf.sync(base)
}
function setup () {
- mkdirp.sync(pkg)
- mkdirp.sync(glb)
- fs.symlinkSync(glb, lnk)
- // so it doesn't try to install into npm's own node_modules
- mkdirp.sync(resolve(pkg, 'node_modules'))
- mkdirp.sync(dep)
- fs.writeFileSync(resolve(dep, 'package.json'), JSON.stringify(fixture))
- fs.writeFileSync(resolve(dep, 'index.js'), index)
+ fixture.create(base)
}
diff --git a/deps/npm/test/tap/gently-rm-symlinked-global-dir.js b/deps/npm/test/tap/gently-rm-symlinked-global-dir.js
index 93ed3edaa4..b159a4ec2f 100644
--- a/deps/npm/test/tap/gently-rm-symlinked-global-dir.js
+++ b/deps/npm/test/tap/gently-rm-symlinked-global-dir.js
@@ -1,10 +1,11 @@
+var common = require('../common-tap.js')
+
var resolve = require('path').resolve
var fs = require('graceful-fs')
var test = require('tap').test
var mkdirp = require('mkdirp')
var rimraf = require('rimraf')
-
-var common = require('../common-tap.js')
+var isWindows = require('../../lib/utils/is-windows.js')
var pkg = resolve(__dirname, 'gently-rm-linked')
var dep = resolve(__dirname, 'test-linked')
@@ -36,6 +37,7 @@ test('install and link', function (t) {
'--global',
'--prefix', lnk,
'--loglevel', 'silent',
+ '--unicode', 'false',
'install', '../test-linked'
],
EXEC_OPTS,
@@ -52,6 +54,7 @@ test('install and link', function (t) {
'--global',
'--prefix', lnk,
'--loglevel', 'silent',
+ '--unicode', 'false',
'install', '../test-linked'
],
EXEC_OPTS,
@@ -84,15 +87,20 @@ function removeBlank (line) {
return line !== ''
}
+function resolvePath () {
+ return resolve.apply(null, Array.prototype.slice.call(arguments)
+ .filter(function (arg) { return arg }))
+}
+
function verify (t, stdout) {
- var binPath = resolve(lnk, 'bin', 'linked')
- var pkgPath = resolve(lnk, 'lib', 'node_modules', '@test', 'linked')
- var trgPath = resolve(pkgPath, 'index.js')
+ var binPath = resolvePath(lnk, !isWindows && 'bin', 'linked')
+ var pkgPath = resolvePath(lnk, !isWindows && 'lib', 'node_modules', '@test', 'linked')
+ var trgPath = resolvePath(pkgPath, 'index.js')
t.deepEqual(
stdout.split('\n').filter(removeBlank),
[ binPath + ' -> ' + trgPath,
- resolve(lnk, 'lib'),
- '└── @test/linked@1.0.0 '
+ resolvePath(lnk, !isWindows && 'lib'),
+ '`-- @test/linked@1.0.0 '
],
'got expected install output'
)
@@ -108,7 +116,7 @@ function cleanup () {
function setup () {
mkdirp.sync(pkg)
mkdirp.sync(glb)
- fs.symlinkSync(glb, lnk)
+ fs.symlinkSync(glb, lnk, 'junction')
// so it doesn't try to install into npm's own node_modules
mkdirp.sync(resolve(pkg, 'node_modules'))
mkdirp.sync(dep)
diff --git a/deps/npm/test/tap/git-cache-locking.js b/deps/npm/test/tap/git-cache-locking.js
index e08c96e1b7..29ab5709b9 100644
--- a/deps/npm/test/tap/git-cache-locking.js
+++ b/deps/npm/test/tap/git-cache-locking.js
@@ -6,6 +6,7 @@ var mkdirp = require('mkdirp')
var pkg = path.resolve(__dirname, 'git-cache-locking')
var tmp = path.join(pkg, 'tmp')
var cache = path.join(pkg, 'cache')
+var shallowClone = Object.assign || require('util')._extend
test('setup', function (t) {
rimraf.sync(pkg)
@@ -17,6 +18,12 @@ test('git-cache-locking: install a git dependency', function (t) {
// disable git integration tests on Travis.
if (process.env.TRAVIS) return t.end()
+ var gitEnv = shallowClone({}, process.env)
+ gitEnv.npm_config_cache = cache
+ gitEnv.npm_config_tmp = tmp
+ gitEnv.npm_config_prefix = pkg
+ gitEnv.npm_config_global = 'false'
+
// package c depends on a.git#master and b.git#master
// package b depends on a.git#master
common.npm([
@@ -24,17 +31,9 @@ test('git-cache-locking: install a git dependency', function (t) {
'git://github.com/nigelzor/npm-4503-c.git'
], {
cwd: pkg,
- env: {
- npm_config_cache: cache,
- npm_config_tmp: tmp,
- npm_config_prefix: pkg,
- npm_config_global: 'false',
- HOME: process.env.HOME,
- Path: process.env.PATH,
- PATH: process.env.PATH
- }
+ env: gitEnv
}, function (err, code, stdout, stderr) {
- t.ifErr(err, 'npm install finished without error')
+ if (err) throw err
t.equal(0, code, 'npm install should succeed')
t.end()
})
diff --git a/deps/npm/test/tap/git-cache-no-hooks.js b/deps/npm/test/tap/git-cache-no-hooks.js
index cfc2d1dc62..0021064cea 100644
--- a/deps/npm/test/tap/git-cache-no-hooks.js
+++ b/deps/npm/test/tap/git-cache-no-hooks.js
@@ -1,12 +1,11 @@
var test = require('tap').test
var fs = require('fs')
var path = require('path')
+var common = require('../common-tap.js')
var rimraf = require('rimraf')
var mkdirp = require('mkdirp')
-var spawn = require('child_process').spawn
-var npmCli = require.resolve('../../bin/npm-cli.js')
-var node = process.execPath
var pkg = path.resolve(__dirname, 'git-cache-no-hooks')
+var osenv = require('osenv')
var tmp = path.join(pkg, 'tmp')
var cache = path.join(pkg, 'cache')
@@ -23,27 +22,15 @@ test('git-cache-no-hooks: install a git dependency', function (t) {
// disable git integration tests on Travis.
if (process.env.TRAVIS) return t.end()
- var command = [
- npmCli,
- 'install',
- 'git://github.com/nigelzor/npm-4503-a.git'
- ]
- var child = spawn(node, command, {
- cwd: pkg,
- env: {
- 'npm_config_cache': cache,
- 'npm_config_tmp': tmp,
- 'npm_config_prefix': pkg,
- 'npm_config_global': 'false',
- 'npm_config_umask': '00',
- HOME: process.env.HOME,
- Path: process.env.PATH,
- PATH: process.env.PATH
- },
- stdio: 'inherit'
- })
-
- child.on('close', function (code) {
+ common.npm([
+ 'install', 'git://github.com/nigelzor/npm-4503-a.git',
+ '--cache', cache,
+ '--tmp', tmp
+ ], {
+ cwd: pkg
+ }, function (err, code, stdout, stderr) {
+ t.ifErr(err, 'npm completed')
+ t.equal(stderr, '', 'no error output')
t.equal(code, 0, 'npm install should succeed')
// verify permissions on git hooks
@@ -57,6 +44,7 @@ test('git-cache-no-hooks: install a git dependency', function (t) {
})
test('cleanup', function (t) {
+ process.chdir(osenv.tmpdir())
rimraf.sync(pkg)
t.end()
})
diff --git a/deps/npm/test/tap/git-dependency-install-link.js b/deps/npm/test/tap/git-dependency-install-link.js
index 8af1b853ad..1bf839f302 100644
--- a/deps/npm/test/tap/git-dependency-install-link.js
+++ b/deps/npm/test/tap/git-dependency-install-link.js
@@ -13,6 +13,7 @@ var common = require('../common-tap.js')
var pkg = resolve(__dirname, 'git-dependency-install-link')
var repo = resolve(__dirname, 'git-dependency-install-link-repo')
+var prefix = resolve(__dirname, 'git-dependency-install-link-prefix')
var cache = resolve(pkg, 'cache')
var daemon
@@ -25,6 +26,7 @@ var EXEC_OPTS = {
cwd: pkg,
cache: cache
}
+process.env.npm_config_prefix = prefix
var pjParent = JSON.stringify({
name: 'parent',
@@ -63,7 +65,7 @@ test('setup', function (t) {
test('install from git repo [no --link]', function (t) {
process.chdir(pkg)
- common.npm(['install', '--loglevel', 'error'], EXEC_OPTS, function (err, code, stdout, stderr) {
+ common.npm(['install'], EXEC_OPTS, function (err, code, stdout, stderr) {
t.ifError(err, 'npm install failed')
t.dissimilar(stderr, /Command failed:/, 'expect git to succeed')
@@ -82,11 +84,13 @@ test('install from git repo [with --link]', function (t) {
process.chdir(pkg)
rimraf.sync(resolve(pkg, 'node_modules'))
- common.npm(['install', '--link', '--loglevel', 'error'], EXEC_OPTS, function (err, code, stdout, stderr) {
+ common.npm(['install', '--link'], EXEC_OPTS, function (err, code, stdout, stderr) {
t.ifError(err, 'npm install --link failed')
+ t.equal(code, 0, 'npm install --link returned non-0 code')
t.dissimilar(stderr, /Command failed:/, 'expect git to succeed')
t.dissimilar(stderr, /version not found/, 'should not go to repository')
+ t.equal(stderr, '', 'no actual output on stderr')
readJson(resolve(pkg, 'node_modules', 'child', 'package.json'), function (err, data) {
t.ifError(err, 'error reading child package.json')
@@ -170,5 +174,6 @@ function setup (cb) {
function cleanup () {
process.chdir(osenv.tmpdir())
rimraf.sync(repo)
+ rimraf.sync(prefix)
rimraf.sync(pkg)
}
diff --git a/deps/npm/test/tap/git-npmignore.js b/deps/npm/test/tap/git-npmignore.js
index 4cd9898722..6b99bdf1fa 100644
--- a/deps/npm/test/tap/git-npmignore.js
+++ b/deps/npm/test/tap/git-npmignore.js
@@ -1,21 +1,50 @@
-var cat = require('graceful-fs').writeFileSync
-var exec = require('child_process').exec
+var child_process = require('child_process')
var readdir = require('graceful-fs').readdirSync
+var path = require('path')
var resolve = require('path').resolve
-var mkdirp = require('mkdirp')
var rimraf = require('rimraf')
var test = require('tap').test
-var tmpdir = require('osenv').tmpdir
var which = require('which')
var common = require('../common-tap.js')
+var escapeArg = require('../../lib/utils/escape-arg.js')
+var Tacks = require('tacks')
+var Dir = Tacks.Dir
+var File = Tacks.File
+
+var fixture = new Tacks(Dir({
+ deps: Dir({
+ gitch: Dir({
+ '.npmignore': File(
+ 't.js\n'
+ ),
+ '.gitignore': File(
+ 'node_modules/\n'
+ ),
+ 'a.js': File(
+ "console.log('hi');"
+ ),
+ 't.js': File(
+ "require('tap').test(function (t) { t.pass('I am a test!'); t.end(); });"
+ ),
+ 'package.json': File({
+ name: 'gitch',
+ version: '1.0.0',
+ private: true,
+ main: 'a.js'
+ })
+ })
+ }),
+ 'node_modules': Dir({
+ })
+}))
-var pkg = resolve(__dirname, 'git-npmignore')
-var dep = resolve(pkg, 'deps', 'gitch')
+var testdir = resolve(__dirname, path.basename(__filename, '.js'))
+var dep = resolve(testdir, 'deps', 'gitch')
var packname = 'gitch-1.0.0.tgz'
-var packed = resolve(pkg, packname)
-var modules = resolve(pkg, 'node_modules')
+var packed = resolve(testdir, packname)
+var modules = resolve(testdir, 'node_modules')
var installed = resolve(modules, 'gitch')
var expected = [
'a.js',
@@ -23,18 +52,11 @@ var expected = [
'.npmignore'
].sort()
-var EXEC_OPTS = { cwd: pkg }
-
-var gitignore = 'node_modules/\n'
-var npmignore = 't.js\n'
+var NPM_OPTS = { cwd: testdir }
-var a = "console.log('hi');"
-var t = "require('tap').test(function (t) { t.pass('I am a test!'); t.end(); });"
-var fixture = {
- 'name': 'gitch',
- 'version': '1.0.0',
- 'private': true,
- 'main': 'a.js'
+function exec (todo, opts, cb) {
+ console.log(' # EXEC:', todo)
+ child_process.exec(todo, opts, cb)
}
test('setup', function (t) {
@@ -50,7 +72,10 @@ test('npm pack directly from directory', function (t) {
})
test('npm pack via git', function (t) {
- packInstallTest('git+file://' + dep, t)
+ var urlPath = dep
+ .replace(/\\/g, '/') // fixup slashes for Windows
+ .replace(/^\/+/, '') // remove any leading slashes
+ packInstallTest('git+file:///' + urlPath, t)
})
test('cleanup', function (t) {
@@ -60,31 +85,32 @@ test('cleanup', function (t) {
})
function packInstallTest (spec, t) {
+ console.log(' # pack', spec)
common.npm(
[
- '--loglevel', 'silent',
+ '--loglevel', 'error',
'pack', spec
],
- EXEC_OPTS,
+ NPM_OPTS,
function (err, code, stdout, stderr) {
- t.ifError(err, 'npm pack ran without error')
- t.notOk(code, 'npm pack exited cleanly')
- t.notOk(stderr, 'npm pack ran silently')
- t.equal(stdout.trim(), packname, 'got expected package name')
+ if (err) throw err
+ t.is(code, 0, 'npm pack exited cleanly')
+ t.is(stderr, '', 'npm pack ran silently')
+ t.is(stdout.trim(), packname, 'got expected package name')
common.npm(
[
- '--loglevel', 'silent',
+ '--loglevel', 'error',
'install', packed
],
- EXEC_OPTS,
+ NPM_OPTS,
function (err, code, stdout, stderr) {
- t.ifError(err, 'npm install ran without error')
- t.notOk(code, 'npm install exited cleanly')
- t.notOk(stderr, 'npm install ran silently')
+ if (err) throw err
+ t.is(code, 0, 'npm install exited cleanly')
+ t.is(stderr, '', 'npm install ran silently')
var actual = readdir(installed).sort()
- t.same(actual, expected, 'no unexpected files in packed directory')
+ t.isDeeply(actual, expected, 'no unexpected files in packed directory')
rimraf(packed, function () {
t.end()
@@ -96,72 +122,71 @@ function packInstallTest (spec, t) {
}
function cleanup () {
- process.chdir(tmpdir())
- rimraf.sync(pkg)
+ fixture.remove(testdir)
+ rimraf.sync(testdir)
}
function setup (cb) {
cleanup()
- mkdirp.sync(modules)
- mkdirp.sync(dep)
-
- process.chdir(dep)
-
- cat(resolve(dep, '.npmignore'), npmignore)
- cat(resolve(dep, '.gitignore'), gitignore)
- cat(resolve(dep, 'a.js'), a)
- cat(resolve(dep, 't.js'), t)
- cat(resolve(dep, 'package.json'), JSON.stringify(fixture))
+ fixture.create(testdir)
common.npm(
[
- '--loglevel', 'silent',
+ '--loglevel', 'error',
'cache', 'clean'
],
- EXEC_OPTS,
+ NPM_OPTS,
function (er, code, _, stderr) {
if (er) return cb(er)
if (code) return cb(new Error('npm cache nonzero exit: ' + code))
if (stderr) return cb(new Error('npm cache clean error: ' + stderr))
- which('git', function found (er, git) {
+ which('git', function found (er, gitPath) {
if (er) return cb(er)
- exec(git + ' init', init)
+ var git = escapeArg(gitPath)
+
+ exec(git + ' init', {cwd: dep}, init)
function init (er, _, stderr) {
if (er) return cb(er)
if (stderr) return cb(new Error('git init error: ' + stderr))
- exec(git + " config user.name 'Phantom Faker'", user)
+ exec(git + " config user.name 'Phantom Faker'", {cwd: dep}, user)
}
function user (er, _, stderr) {
if (er) return cb(er)
if (stderr) return cb(new Error('git config error: ' + stderr))
- exec(git + ' config user.email nope@not.real', email)
+ exec(git + ' config user.email nope@not.real', {cwd: dep}, email)
}
function email (er, _, stderr) {
if (er) return cb(er)
if (stderr) return cb(new Error('git config error: ' + stderr))
- exec(git + ' add .', addAll)
+ exec(git + ' config core.autocrlf input', {cwd: dep}, autocrlf)
+ }
+
+ function autocrlf (er, _, stderr) {
+ if (er) return cb(er)
+ if (stderr) return cb(new Error('git config error: ' + stderr))
+
+ exec(git + ' add .', {cwd: dep}, addAll)
}
function addAll (er, _, stderr) {
if (er) return cb(er)
if (stderr) return cb(new Error('git add . error: ' + stderr))
- exec(git + ' commit -m boot', commit)
+ exec(git + ' commit -m boot', {cwd: dep}, commit)
}
function commit (er, _, stderr) {
if (er) return cb(er)
if (stderr) return cb(new Error('git commit error: ' + stderr))
-
cb()
}
})
diff --git a/deps/npm/test/tap/github-shortcut.js b/deps/npm/test/tap/github-shortcut.js
index 1b01de4cff..c0a67d21a4 100644
--- a/deps/npm/test/tap/github-shortcut.js
+++ b/deps/npm/test/tap/github-shortcut.js
@@ -32,10 +32,10 @@ test('github-shortcut', function (t) {
'child_process': {
'execFile': function (cmd, args, options, cb) {
process.nextTick(function () {
- if (args[0] !== 'clone') return cb(null, '', '')
+ if (args.indexOf('clone') === -1) return cb(null, '', '')
var cloneUrl = cloneUrls.shift()
if (cloneUrl) {
- t.is(args[3], cloneUrl[0], cloneUrl[1])
+ t.is(args[args.length - 2], cloneUrl[0], cloneUrl[1])
} else {
t.fail('too many attempts to clone')
}
@@ -52,8 +52,8 @@ test('github-shortcut', function (t) {
loglevel: 'silent'
}
t.plan(1 + cloneUrls.length)
- npm.load(opts, function (er) {
- t.ifError(er, 'npm loaded without error')
+ npm.load(opts, function (err) {
+ t.ifError(err, 'npm loaded without error')
npm.commands.install(['foo/private'], function (er, result) {
t.end()
})
diff --git a/deps/npm/test/tap/graceful-restart.js b/deps/npm/test/tap/graceful-restart.js
index 21da0d9904..56513fbf7e 100644
--- a/deps/npm/test/tap/graceful-restart.js
+++ b/deps/npm/test/tap/graceful-restart.js
@@ -70,7 +70,7 @@ test('graceless restart', function (t) {
createChild(['run-script', 'restart'], function (err, code, out) {
t.ifError(err, 'restart finished successfully')
t.equal(code, 0, 'npm run-script exited with code')
- t.equal(out, outGraceless, 'expected all scripts to run')
+ t.equal(out.replace(/\r/g, ''), outGraceless, 'expected all scripts to run')
t.end()
})
})
@@ -80,7 +80,7 @@ test('graceful restart', function (t) {
createChild(['run-script', 'restart'], function (err, code, out) {
t.ifError(err, 'restart finished successfully')
t.equal(code, 0, 'npm run-script exited with code')
- t.equal(out, outGraceful, 'expected only *restart scripts to run')
+ t.equal(out.replace(/\r/g, ''), outGraceful, 'expected only *restart scripts to run')
t.end()
})
})
diff --git a/deps/npm/test/tap/install-bad-man.js b/deps/npm/test/tap/install-bad-man.js
index 756b4a5902..226d0b24fc 100644
--- a/deps/npm/test/tap/install-bad-man.js
+++ b/deps/npm/test/tap/install-bad-man.js
@@ -21,6 +21,8 @@ var json = {
man: [ './install-bad-man.1.lol' ]
}
+common.pendIfWindows('man pages do not get installed on Windows')
+
test('setup', function (t) {
setup()
t.pass('setup ran')
diff --git a/deps/npm/test/tap/install-link-scripts.js b/deps/npm/test/tap/install-link-scripts.js
index 5ad2feafe8..acc88b4b2c 100644
--- a/deps/npm/test/tap/install-link-scripts.js
+++ b/deps/npm/test/tap/install-link-scripts.js
@@ -24,15 +24,15 @@ var dependency = {
name: 'dep',
version: '1.0.0',
scripts: {
- install: './bin/foo'
+ install: 'node ./bin/foo'
}
}
-var foo = function () {/*
+var foo = function () { /*
#!/usr/bin/env node
console.log('hey sup')
-*/}.toString().split('\n').slice(1, -1).join('\n')
+*/ }.toString().split('\n').slice(1, -1).join('\n')
process.env.npm_config_prefix = tmp
diff --git a/deps/npm/test/tap/install-man.js b/deps/npm/test/tap/install-man.js
index d309788b25..d24819ca78 100644
--- a/deps/npm/test/tap/install-man.js
+++ b/deps/npm/test/tap/install-man.js
@@ -11,6 +11,8 @@ var common = require('../common-tap.js')
var pkg = resolve(__dirname, 'install-man')
var target = resolve(__dirname, 'install-man-target')
+common.pendIfWindows('man pages do not get installed on Windows')
+
var EXEC_OPTS = {
cwd: target
}
diff --git a/deps/npm/test/tap/install-save-local.js b/deps/npm/test/tap/install-save-local.js
index a9de5ba194..1bc739cb89 100644
--- a/deps/npm/test/tap/install-save-local.js
+++ b/deps/npm/test/tap/install-save-local.js
@@ -53,7 +53,7 @@ test('\'npm install --save ../local/path\' should save to package.json', functio
var pkgJson = JSON.parse(fs.readFileSync(pkg + '/package.json', 'utf8'))
t.is(Object.keys(pkgJson.dependencies).length, 1, 'only one dep')
t.ok(
- /file:.*?[/]package-local-dependency$/.test(pkgJson.dependencies['package-local-dependency']),
+ /file:.*?[/\\]package-local-dependency$/.test(pkgJson.dependencies['package-local-dependency']),
'local package saved correctly'
)
t.end()
@@ -82,7 +82,7 @@ test('\'npm install --save-dev ../local/path\' should save to package.json', fun
var pkgJson = JSON.parse(fs.readFileSync(pkg + '/package.json', 'utf8'))
t.is(Object.keys(pkgJson.devDependencies).length, 1, 'only one dep')
t.ok(
- /file:.*?[/]package-local-dev-dependency$/.test(pkgJson.devDependencies['package-local-dev-dependency']),
+ /file:.*?[/\\]package-local-dev-dependency$/.test(pkgJson.devDependencies['package-local-dev-dependency']),
'local package saved correctly'
)
diff --git a/deps/npm/test/tap/install-scoped-already-installed.js b/deps/npm/test/tap/install-scoped-already-installed.js
index f3c191ddb0..58966b047c 100644
--- a/deps/npm/test/tap/install-scoped-already-installed.js
+++ b/deps/npm/test/tap/install-scoped-already-installed.js
@@ -125,7 +125,7 @@ test('cleanup', function (t) {
})
function contains (list, element) {
- var matcher = new RegExp(element + '$')
+ var matcher = new RegExp(element.replace(/\//g, '[\\\\/]') + '$')
for (var i = 0; i < list.length; ++i) {
if (matcher.test(list[i])) {
return true
diff --git a/deps/npm/test/tap/install-scoped-link.js b/deps/npm/test/tap/install-scoped-link.js
index 029acb3813..9171b8f46f 100644
--- a/deps/npm/test/tap/install-scoped-link.js
+++ b/deps/npm/test/tap/install-scoped-link.js
@@ -8,6 +8,8 @@ var osenv = require('osenv')
var rimraf = require('rimraf')
var test = require('tap').test
+var escapeExecPath = require('../../lib/utils/escape-exec-path')
+
var common = require('../common-tap.js')
var pkg = path.join(__dirname, 'install-scoped-link')
@@ -16,7 +18,7 @@ var modules = path.join(work, 'node_modules')
var EXEC_OPTS = { cwd: work }
-var world = 'console.log("hello blrbld")\n'
+var world = '#!/usr/bin/env node\nconsole.log("hello blrbld")\n'
var json = {
name: '@scoped/package',
@@ -61,7 +63,7 @@ test('installing package with links', function (t) {
var hello = path.join(modules, '.bin', 'hello')
t.ok(existsSync(hello), 'binary link exists')
- exec('node ' + hello, function (err, stdout, stderr) {
+ exec(escapeExecPath(hello), function (err, stdout, stderr) {
t.ifError(err, 'command ran fine')
t.notOk(stderr, 'got no error output back')
t.equal(stdout, 'hello blrbld\n', 'output was as expected')
diff --git a/deps/npm/test/tap/legacy-bundled-git.js b/deps/npm/test/tap/legacy-bundled-git.js
index 355f9467c1..15fbac84ea 100644
--- a/deps/npm/test/tap/legacy-bundled-git.js
+++ b/deps/npm/test/tap/legacy-bundled-git.js
@@ -69,8 +69,6 @@ test('bundled-git', function (t) {
common.npm(['install', '--global-style', fixturepath], {cwd: basepath}, installCheckAndTest)
function installCheckAndTest (err, code, stdout, stderr) {
if (err) throw err
- console.error(stderr)
- console.log(stdout)
t.is(code, 0, 'install went ok')
var actual = require(path.resolve(installedpath, 'node_modules/glob/node_modules/minimatch/package.json'))
@@ -82,8 +80,6 @@ test('bundled-git', function (t) {
}
function removeCheckAndDone (err, code, stdout, stderr) {
if (err) throw err
- console.error(stderr)
- console.log(stdout)
t.is(code, 0, 'remove went ok')
t.done()
}
diff --git a/deps/npm/test/tap/legacy-missing-bindir.js b/deps/npm/test/tap/legacy-missing-bindir.js
index a55703bebd..2285f8d2a7 100644
--- a/deps/npm/test/tap/legacy-missing-bindir.js
+++ b/deps/npm/test/tap/legacy-missing-bindir.js
@@ -48,8 +48,6 @@ test('missing-bindir', function (t) {
function installCheckAndTest (err, code, stdout, stderr) {
if (err) throw err
- if (stderr) console.error(stderr)
- console.log(stdout)
t.is(code, 0, 'install went ok')
t.is(installedExists('README'), true, 'README')
t.is(installedExists('package.json'), true, 'package.json')
@@ -58,8 +56,6 @@ test('missing-bindir', function (t) {
function removeCheckAndDone (err, code, stdout, stderr) {
if (err) throw err
- console.error(stderr)
- console.log(stdout)
t.is(code, 0, 'remove went ok')
t.done()
}
diff --git a/deps/npm/test/tap/legacy-npm-self-install.js b/deps/npm/test/tap/legacy-npm-self-install.js
index 313c059493..57880496c7 100644
--- a/deps/npm/test/tap/legacy-npm-self-install.js
+++ b/deps/npm/test/tap/legacy-npm-self-install.js
@@ -50,7 +50,7 @@ test('npm-self-install', function (t) {
env.npm_config_user_agent = null
env.npm_config_color = 'always'
env.npm_config_progress = 'always'
- var PATH = env.PATH.split(pathsep)
+ var PATH = env.PATH ? env.PATH.split(pathsep) : []
var binpath = isWin32 ? globalpath : path.join(globalpath, 'bin')
var cmdname = isWin32 ? 'npm.cmd' : 'npm'
PATH.unshift(binpath)
@@ -63,7 +63,7 @@ test('npm-self-install', function (t) {
if (err) throw err
t.is(code, 0, 'install went ok')
t.is(exists(binpath, cmdname), true, 'binary was installed')
- t.is(exists(globalpath, 'lib', 'node_modules', 'npm'), true, 'module path exists')
+ t.is(exists(globalpath, isWin32 ? '' : 'lib', 'node_modules', 'npm'), true, 'module path exists')
common.npm(['ls', '--json', '--depth=0'], {cwd: basepath, env: env}, lsCheckAndRemove)
}
function lsCheckAndRemove (err, code, stdout, stderr) {
@@ -73,7 +73,7 @@ test('npm-self-install', function (t) {
var installed = JSON.parse(stdout.trim())
t.is(Object.keys(installed.dependencies).length, 1, 'one thing installed')
t.is(path.resolve(globalpath, installed.dependencies.npm.from), tarball, 'and it was our npm tarball')
- common.npm(['rm', 'npm'], {cwd: basepath, env: env, stdio: 'inherit'}, removeCheck)
+ common.npm(['rm', 'npm'], {cwd: basepath, env: env}, removeCheck)
}
function removeCheck (err, code) {
if (err) throw err
diff --git a/deps/npm/test/tap/legacy-test-package.js b/deps/npm/test/tap/legacy-test-package.js
index b0cbaa01a5..d94666b43e 100644
--- a/deps/npm/test/tap/legacy-test-package.js
+++ b/deps/npm/test/tap/legacy-test-package.js
@@ -36,24 +36,18 @@ test('test-package', function (t) {
function installCheckAndTest (err, code, stdout, stderr) {
if (err) throw err
- console.error(stderr)
- console.log(stdout)
t.is(code, 0, 'install went ok')
common.npm(['test'], {cwd: installedpath}, testCheckAndRemove)
}
function testCheckAndRemove (err, code, stdout, stderr) {
if (err) throw err
- console.error(stderr)
- console.log(stdout)
t.is(code, 0, 'npm test w/o test is ok')
common.npm(['rm', fixturepath], {cwd: basepath}, removeCheckAndDone)
}
function removeCheckAndDone (err, code, stdout, stderr) {
if (err) throw err
- console.error(stderr)
- console.log(stdout)
t.is(code, 0, 'remove went ok')
t.done()
}
diff --git a/deps/npm/test/tap/legacy-url-dep.js b/deps/npm/test/tap/legacy-url-dep.js
index 9807d6916a..46378cd3ef 100644
--- a/deps/npm/test/tap/legacy-url-dep.js
+++ b/deps/npm/test/tap/legacy-url-dep.js
@@ -37,8 +37,6 @@ test('url-dep', function (t) {
common.npm(['install', fixturepath], {cwd: basepath}, installCheckAndTest)
function installCheckAndTest (err, code, stdout, stderr) {
if (err) throw err
- console.error(stderr)
- console.log(stdout)
t.is(code, 0, 'install went ok')
t.done()
}
diff --git a/deps/npm/test/tap/lifecycle-path.js b/deps/npm/test/tap/lifecycle-path.js
index 39761b48d7..3264fe87be 100644
--- a/deps/npm/test/tap/lifecycle-path.js
+++ b/deps/npm/test/tap/lifecycle-path.js
@@ -7,54 +7,45 @@ var rimraf = require('rimraf')
var test = require('tap').test
var common = require('../common-tap.js')
+var isWindows = require('../../lib/utils/is-windows.js')
var pkg = path.resolve(__dirname, 'lifecycle-path')
-var link = path.resolve(pkg, 'node-bin')
var PATH
-if (process.platform === 'win32') {
+if (isWindows) {
// On Windows the 'comspec' environment variable is used,
// so cmd.exe does not need to be on the path.
- PATH = 'C:\\foo\\bar'
+ PATH = path.dirname(process.env.ComSpec)
} else {
// On non-Windows, without the path to the shell, nothing usually works.
PATH = '/bin:/usr/bin'
}
-var printPath = 'console.log(process.env.PATH)\n'
-
-var json = {
- name: 'glorb',
- version: '1.2.3',
- scripts: {
- path: './node-bin/node print-path.js'
- }
-}
-
test('setup', function (t) {
cleanup()
mkdirp.sync(pkg)
fs.writeFileSync(
path.join(pkg, 'package.json'),
- JSON.stringify(json, null, 2)
+ JSON.stringify({}, null, 2)
)
- fs.writeFileSync(path.join(pkg, 'print-path.js'), printPath)
- fs.symlinkSync(path.dirname(process.execPath), link, 'dir')
t.end()
})
test('make sure the path is correct', function (t) {
- common.npm(['run-script', 'path'], {
+ common.npm(['run-script', 'env'], {
cwd: pkg,
env: {
- PATH: PATH,
- stdio: [ 0, 'pipe', 2 ]
- }
+ PATH: PATH
+ },
+ stdio: [ 0, 'pipe', 2 ]
}, function (er, code, stdout) {
if (er) throw er
t.equal(code, 0, 'exit code')
- // remove the banner, we just care about the last line
- stdout = stdout.trim().split(/\r|\n/).pop()
+ var lineMatch = function (line) {
+ return /^PATH=/i.test(line)
+ }
+ // extract just the path value
+ stdout = stdout.split(/\r?\n/).filter(lineMatch).pop().replace(/^PATH=/, '')
var pathSplit = process.platform === 'win32' ? ';' : ':'
var root = path.resolve(__dirname, '../..')
var actual = stdout.split(pathSplit).map(function (p) {
@@ -63,15 +54,19 @@ test('make sure the path is correct', function (t) {
}
return p.replace(/\\/g, '/')
})
+ // spawn-wrap adds itself to the path when coverage is enabled
+ actual = actual.filter(function (p) {
+ return !p.match(/\.node-spawn-wrap/)
+ })
// get the ones we tacked on, then the system-specific requirements
var expect = [
'{{ROOT}}/bin/node-gyp-bin',
'{{ROOT}}/test/tap/lifecycle-path/node_modules/.bin',
path.dirname(process.execPath)
- ].concat(PATH.split(pathSplit).map(function (p) {
+ ].concat(PATH.split(pathSplit)).map(function (p) {
return p.replace(/\\/g, '/')
- }))
+ })
t.same(actual, expect)
t.end()
})
diff --git a/deps/npm/test/tap/logout-scoped.js b/deps/npm/test/tap/logout-scoped.js
index 1323a4d32e..db99320478 100644
--- a/deps/npm/test/tap/logout-scoped.js
+++ b/deps/npm/test/tap/logout-scoped.js
@@ -12,11 +12,11 @@ var pkg = path.resolve(__dirname, 'logout')
var outfile = path.join(pkg, '_npmrc')
var opts = { cwd: pkg }
-var contents = function () {/*
+var contents = function () { /*
foo=boo
@bar:registry=http://localhost:1337
//localhost:1337/:_authToken=glarb
-*/}.toString().split('\n').slice(1, -1).join('\n')
+*/ }.toString().split('\n').slice(1, -1).join('\n')
function mocks (server) {
server.delete('/-/user/token/glarb')
@@ -47,7 +47,7 @@ test('npm logout', function (t) {
t.notOk(code, 'exited OK')
var config = fs.readFileSync(outfile, 'utf8')
- t.equal(config, 'foo=boo\n', 'creds gone')
+ t.equal(config.trim(), 'foo=boo', 'creds gone')
s.close()
t.end()
}
diff --git a/deps/npm/test/tap/logout.js b/deps/npm/test/tap/logout.js
index ebe0f51ba1..d62cb4fffc 100644
--- a/deps/npm/test/tap/logout.js
+++ b/deps/npm/test/tap/logout.js
@@ -12,10 +12,10 @@ var pkg = path.resolve(__dirname, 'logout')
var outfile = path.join(pkg, '_npmrc')
var opts = { cwd: pkg }
-var contents = function () {/*
+var contents = function () { /*
foo=boo
//localhost:1337/:_authToken=glarb
-*/}.toString().split('\n').slice(1, -1).join('\n')
+*/ }.toString().split('\n').slice(1, -1).join('\n')
function mocks (server) {
server.delete('/-/user/token/glarb')
@@ -45,7 +45,7 @@ test('npm logout', function (t) {
t.notOk(code, 'exited OK')
var config = fs.readFileSync(outfile, 'utf8')
- t.equal(config, 'foo=boo\n', 'creds gone')
+ t.notMatch(config, /localhost/, 'creds gone')
s.close()
t.end()
}
diff --git a/deps/npm/test/tap/ls-l-depth-0.js b/deps/npm/test/tap/ls-l-depth-0.js
index 24fa062908..3958520943 100644
--- a/deps/npm/test/tap/ls-l-depth-0.js
+++ b/deps/npm/test/tap/ls-l-depth-0.js
@@ -53,6 +53,7 @@ test('#6311: npm ll --depth=0 duplicates listing', function (t) {
[
'--loglevel', 'silent',
'--registry', common.registry,
+ '--unicode=true',
'install', dep
],
EXEC_OPTS,
@@ -72,6 +73,7 @@ test('#6311: npm ll --depth=0 duplicates listing', function (t) {
[
'--loglevel', 'silent',
'ls', '--long',
+ '--unicode=true',
'--depth', '0'
],
EXEC_OPTS,
diff --git a/deps/npm/test/tap/ls.js b/deps/npm/test/tap/ls.js
new file mode 100644
index 0000000000..acec723afb
--- /dev/null
+++ b/deps/npm/test/tap/ls.js
@@ -0,0 +1,188 @@
+'use strict'
+var test = require('tap').test
+var path = require('path')
+var rimraf = require('rimraf')
+var common = require('../common-tap.js')
+var basepath = path.resolve(__dirname, path.basename(__filename, '.js'))
+var fixturepath = path.resolve(basepath, 'npm-test-files')
+var pkgpath = path.resolve(fixturepath, 'npm-test-ls')
+var Tacks = require('tacks')
+var File = Tacks.File
+var Dir = Tacks.Dir
+
+test('ls without arg', function (t) {
+ var fixture = new Tacks(
+ Dir({
+ 'npm-test-ls': Dir({
+ 'package.json': File({
+ name: 'npm-test-ls',
+ version: '1.0.0',
+ dependencies: {
+ 'dep': 'file:../dep'
+ }
+ })
+ }),
+ 'dep': Dir({
+ 'package.json': File({
+ name: 'dep',
+ version: '1.0.0'
+ })
+ })
+ })
+ )
+ withFixture(t, fixture, function (done) {
+ common.npm([
+ 'ls', '--json'
+ ], {
+ cwd: pkgpath
+ }, function (err, code, stdout, stderr) {
+ t.ifErr(err, 'ls succeeded')
+ t.equal(0, code, 'exit 0 on ls')
+ var pkg = JSON.parse(stdout)
+ var deps = pkg.dependencies
+ t.ok(deps.dep, 'dep present')
+ done()
+ })
+ })
+})
+
+test('ls with filter arg', function (t) {
+ var fixture = new Tacks(
+ Dir({
+ 'npm-test-ls': Dir({
+ 'package.json': File({
+ name: 'npm-test-ls',
+ version: '1.0.0',
+ dependencies: {
+ 'dep': 'file:../dep'
+ }
+ })
+ }),
+ 'dep': Dir({
+ 'package.json': File({
+ name: 'dep',
+ version: '1.0.0'
+ })
+ }),
+ 'otherdep': Dir({
+ 'package.json': File({
+ name: 'otherdep',
+ version: '1.0.0'
+ })
+ })
+ })
+ )
+ withFixture(t, fixture, function (done) {
+ common.npm([
+ 'ls', 'dep',
+ '--json'
+ ], {
+ cwd: path.join(fixturepath, 'npm-test-ls')
+ }, function (err, code, stdout, stderr) {
+ t.ifErr(err, 'ls succeeded')
+ t.equal(0, code, 'exit 0 on ls')
+ var pkg = JSON.parse(stdout)
+ var deps = pkg.dependencies
+ t.ok(deps.dep, 'dep present')
+ t.notOk(deps.otherdep, 'other dep not present')
+ done()
+ })
+ })
+})
+
+test('ls with missing filtered arg', function (t) {
+ var fixture = new Tacks(
+ Dir({
+ 'npm-test-ls': Dir({
+ 'package.json': File({
+ name: 'npm-test-ls',
+ version: '1.0.0',
+ dependencies: {
+ 'dep': 'file:../dep'
+ }
+ })
+ }),
+ 'dep': Dir({
+ 'package.json': File({
+ name: 'dep',
+ version: '1.0.0'
+ })
+ })
+ })
+ )
+ withFixture(t, fixture, function (done) {
+ common.npm([
+ 'ls', 'notadep',
+ '--json'
+ ], {
+ cwd: path.join(fixturepath, 'npm-test-ls')
+ }, function (err, code, stdout, stderr) {
+ t.ifErr(err, 'ls succeeded')
+ t.equal(1, code, 'exit 1 on ls')
+ var pkg = JSON.parse(stdout)
+ var deps = pkg.dependencies
+ t.notOk(deps, 'deps missing')
+ t.done()
+ })
+ })
+})
+
+test('ls with prerelease pkg', function (t) {
+ var fixture = new Tacks(
+ Dir({
+ 'npm-test-ls': Dir({
+ 'package.json': File({
+ name: 'npm-test-ls',
+ version: '1.0.0',
+ dependencies: {
+ 'dep': 'file:../dep'
+ }
+ })
+ }),
+ 'dep': Dir({
+ 'package.json': File({
+ name: 'dep',
+ version: '1.0.0-pre'
+ })
+ })
+ })
+ )
+ withFixture(t, fixture, function (done) {
+ common.npm([
+ 'ls', 'dep',
+ '--json'
+ ], {
+ cwd: path.join(fixturepath, 'npm-test-ls')
+ }, function (err, code, stdout, stderr) {
+ t.ifErr(err, 'ls succeeded')
+ t.equal(0, code, 'exit 0 on ls')
+ var pkg = JSON.parse(stdout)
+ var deps = pkg.dependencies
+ t.ok(deps.dep, 'dep present')
+ t.done()
+ })
+ })
+})
+
+test('cleanup', function (t) {
+ rimraf.sync(basepath)
+ t.done()
+})
+
+function withFixture (t, fixture, tester) {
+ fixture.create(fixturepath)
+ common.npm(['install'], {
+ cwd: path.join(fixturepath, 'npm-test-ls')
+ }, checkAndTest)
+ function checkAndTest (err, code) {
+ if (err) throw err
+ t.is(code, 0, 'install went ok')
+ tester(removeAndDone)
+ }
+ function removeAndDone (err) {
+ if (err) throw err
+ fixture.remove(fixturepath)
+ rimraf.sync(basepath)
+ t.done()
+ }
+}
diff --git a/deps/npm/test/tap/no-global-warns.js b/deps/npm/test/tap/no-global-warns.js
index 2d831eaae9..cae62fff99 100644
--- a/deps/npm/test/tap/no-global-warns.js
+++ b/deps/npm/test/tap/no-global-warns.js
@@ -14,13 +14,7 @@ var toInstall = path.join(base, 'to-install')
var config = 'prefix = ' + base
var configPath = path.join(base, '_npmrc')
-var extend = Object.assign || require('util')._extend
-
-var OPTS = {
- env: extend({
- 'npm_config_userconfig': configPath
- }, process.env)
-}
+var OPTS = { }
var installJSON = {
name: 'to-install',
@@ -40,11 +34,18 @@ test('setup', function (t) {
})
test('no-global-warns', function (t) {
- common.npm(['install', '-g', toInstall], OPTS, function (err, code, stdout, stderr) {
- t.ifError(err, 'installed w/o error')
- t.is(stderr, '', 'no warnings printed to stderr')
- t.end()
- })
+ common.npm(
+ [
+ 'install', '-g',
+ '--userconfig=' + configPath,
+ toInstall
+ ],
+ OPTS,
+ function (err, code, stdout, stderr) {
+ t.ifError(err, 'installed w/o error')
+ t.is(stderr, '', 'no warnings printed to stderr')
+ t.end()
+ })
})
test('cleanup', function (t) {
diff --git a/deps/npm/test/tap/optional-metadep-rollback-collision.js b/deps/npm/test/tap/optional-metadep-rollback-collision.js
index d5116f30fc..a9294858d2 100644
--- a/deps/npm/test/tap/optional-metadep-rollback-collision.js
+++ b/deps/npm/test/tap/optional-metadep-rollback-collision.js
@@ -63,7 +63,7 @@ var opdep_json = {
}
}
-var badServer = function () {/*
+var badServer = function () { /*
var createServer = require('http').createServer
var spawn = require('child_process').spawn
var fs = require('fs')
@@ -98,9 +98,9 @@ if (process.argv[2]) {
fs.writeFileSync(pidfile, child.pid + '\n')
}
-*/}.toString().split('\n').slice(1, -1).join('\n')
+*/ }.toString().split('\n').slice(1, -1).join('\n')
-var blart = function () {/*
+var blart = function () { /*
var rando = require('crypto').randomBytes
var resolve = require('path').resolve
@@ -152,7 +152,7 @@ mkdirp(BASEDIR, function go () {
keepItGoingLouder = {}
}, 3 * 1000)
})
-*/}.toString().split('\n').slice(1, -1).join('\n')
+*/ }.toString().split('\n').slice(1, -1).join('\n')
test('setup', function (t) {
cleanup()
diff --git a/deps/npm/test/tap/outdated-depth-deep.js b/deps/npm/test/tap/outdated-depth-deep.js
index 27c5f3e9fc..682b1ca958 100644
--- a/deps/npm/test/tap/outdated-depth-deep.js
+++ b/deps/npm/test/tap/outdated-depth-deep.js
@@ -2,7 +2,6 @@ var common = require('../common-tap')
var path = require('path')
var test = require('tap').test
var rimraf = require('rimraf')
-var npm = require('../../')
var mr = require('npm-registry-mock')
var pkg = path.resolve(__dirname, 'outdated-depth-deep')
var cache = path.resolve(pkg, 'cache')
@@ -41,38 +40,50 @@ test('setup', function (t) {
})
test('outdated depth deep (9999)', function (t) {
- var underscoreOutdated = ['underscore', '1.3.1', '1.3.1', '1.5.1', '1.3.1']
- var childPkg = path.resolve(pkg, 'node_modules', 'npm-test-peer-deps')
+ var conf = [
+ '--registry', common.registry,
+ '--cache', cache
+ ]
- var expected = [ [childPkg].concat(underscoreOutdated).concat([null]),
- [pkg].concat(underscoreOutdated).concat([null]) ]
+ var server
+ mr({ port: common.port }, thenTopLevelInstall)
- process.chdir(pkg)
+ function thenTopLevelInstall (err, s) {
+ if (err) throw err
+ server = s
+ common.npm(conf.concat(['install', '.']), {cwd: pkg}, thenDeepInstall)
+ }
+
+ function thenDeepInstall (err, code, stdout, stderr) {
+ if (err) throw err
+ t.is(code, 0, 'install completed successfully')
+ t.is('', stderr, 'no error output')
+ var depPath = path.join(pkg, 'node_modules', 'npm-test-peer-deps')
+ common.npm(conf.concat(['install', 'underscore']), {cwd: depPath}, thenRunOutdated)
+ }
+
+ function thenRunOutdated (err, code, stdout, stderr) {
+ if (err) throw err
+ t.is(code, 0, 'deep install completed successfully')
+ t.is('', stderr, 'no error output')
+ common.npm(conf.concat(['outdated', '--depth', 9999]), {cwd: pkg}, thenValidateOutput)
+ }
- mr({ port: common.port }, function (er, s) {
- npm.load({
- cache: cache,
- loglevel: 'silent',
- registry: common.registry,
- depth: 9999
- },
- function () {
- npm.install('.', function (er) {
- if (er) throw new Error(er)
- var nodepath = process.env.npm_node_execpath || process.env.NODE || process.execPath
- var clibin = path.resolve(__dirname, '../../bin/npm-cli.js')
- npm.explore('npm-test-peer-deps', nodepath, clibin, 'install', 'underscore', function (er) {
- if (er) throw new Error(er)
- npm.outdated(function (err, d) {
- if (err) throw new Error(err)
- t.deepEqual(d, expected)
- s.close()
- t.end()
- })
- })
- })
- })
- })
+ function thenValidateOutput (err, code, stdout, stderr) {
+ if (err) throw err
+ t.is(code, 0, 'outdated completed successfully')
+ t.is('', stderr, 'no error output')
+ t.match(
+ stdout,
+ /underscore.*1\.3\.1.*1\.3\.1.*1\.5\.1.*whatever\n/g,
+ 'child package listed')
+ t.match(
+ stdout,
+ /underscore.*1\.3\.1.*1\.3\.1.*1\.5\.1.*whatever > npm-test-peer-deps/g,
+ 'child package listed')
+ server.close()
+ t.end()
+ }
})
test('cleanup', function (t) {
diff --git a/deps/npm/test/tap/outdated-depth-integer.js b/deps/npm/test/tap/outdated-depth-integer.js
index a1fc2b99d2..32bf785f27 100644
--- a/deps/npm/test/tap/outdated-depth-integer.js
+++ b/deps/npm/test/tap/outdated-depth-integer.js
@@ -3,7 +3,8 @@ var test = require('tap').test
var rimraf = require('rimraf')
var npm = require('../../')
var mr = require('npm-registry-mock')
-var pkg = __dirname + '/outdated-depth-integer'
+var path = require('path')
+var pkg = path.resolve('outdated-depth-integer')
var osenv = require('osenv')
var mkdirp = require('mkdirp')
diff --git a/deps/npm/test/tap/outdated.js b/deps/npm/test/tap/outdated.js
index c5ce8d182f..3a46705e38 100644
--- a/deps/npm/test/tap/outdated.js
+++ b/deps/npm/test/tap/outdated.js
@@ -104,7 +104,7 @@ test('it should not throw', function (t) {
}
npm.outdated(function (er, d) {
t.ifError(er, 'outdated success')
-
+ output = output.map(function (x) { return x.replace(/\r/g, '') })
console.log = originalLog
t.same(output, expOut)
diff --git a/deps/npm/test/tap/publish-access-unscoped-restricted-fails.js b/deps/npm/test/tap/publish-access-unscoped-restricted-fails.js
index 4c7fce7351..660d0f48d7 100644
--- a/deps/npm/test/tap/publish-access-unscoped-restricted-fails.js
+++ b/deps/npm/test/tap/publish-access-unscoped-restricted-fails.js
@@ -4,59 +4,35 @@ var path = require('path')
var test = require('tap').test
var mkdirp = require('mkdirp')
var rimraf = require('rimraf')
-
-var npm = require('../../')
var common = require('../common-tap.js')
var pkg = path.join(__dirname, 'publish-access-unscoped')
test('setup', function (t) {
- mkdirp(path.join(pkg, 'cache'), function () {
- var configuration = {
- cache: path.join(pkg, 'cache'),
- loglevel: 'silent',
- registry: common.registry
- }
-
- npm.load(configuration, next)
- })
-
- function next (er) {
- t.ifError(er, 'npm loaded successfully')
-
- process.chdir(pkg)
- fs.writeFile(
- path.join(pkg, 'package.json'),
- JSON.stringify({
- name: 'publish-access',
- version: '1.2.5'
- }),
- 'ascii',
- function (er) {
- t.ifError(er)
-
- t.pass('setup done')
- t.end()
- }
- )
- }
+ mkdirp.sync(pkg)
+ fs.writeFileSync(
+ path.join(pkg, 'package.json'),
+ JSON.stringify({
+ name: 'publish-access',
+ version: '1.2.5'
+ }))
+ t.pass('setup done')
+ t.end()
})
test('unscoped packages cannot be restricted', function (t) {
- npm.config.set('access', 'restricted')
- npm.commands.publish([], false, function (er) {
- t.ok(er, 'got an error back')
- t.equal(er.message, "Can't restrict access to unscoped packages.")
+ var args = ['--access=restricted', '--loglevel=warn', '--registry=' + common.registry]
+ var opts = {stdio: [0, 1, 'pipe'], cwd: pkg}
+ common.npm(['publish'].concat(args), opts, function (err, code, stdout, stderr) {
+ if (err) throw err
+ t.notEqual(code, 0, 'publish not successful')
+ t.match(stderr, "Can't restrict access to unscoped packages.")
t.end()
})
})
test('cleanup', function (t) {
- process.chdir(__dirname)
- rimraf(pkg, function (er) {
- t.ifError(er)
-
- t.end()
- })
+ rimraf.sync(pkg)
+ t.end()
})
diff --git a/deps/npm/test/tap/publish-config.js b/deps/npm/test/tap/publish-config.js
index 57070f78ba..399fd0f93b 100644
--- a/deps/npm/test/tap/publish-config.js
+++ b/deps/npm/test/tap/publish-config.js
@@ -29,7 +29,7 @@ test(function (t) {
res.end(JSON.stringify({
error: 'sshhh. naptime nao. \\^O^/ <(YAWWWWN!)'
}))
- child.kill('SIGHUP')
+ child.kill('SIGINT')
}).listen(common.port, function () {
t.pass('server is listening')
diff --git a/deps/npm/test/tap/registry.js b/deps/npm/test/tap/registry.js
index 7b17192f66..d8ec4a204e 100644
--- a/deps/npm/test/tap/registry.js
+++ b/deps/npm/test/tap/registry.js
@@ -31,6 +31,8 @@ var extend = Object.assign || require('util')._extend
function runTests () {
var env = extend({ TAP: 1 }, process.env)
env.npm = npmExec
+ // TODO: fix tap and / or nyc to handle nested invocations properly
+ env.COVERALLS_REPO_TOKEN = ''
var opts = {
cwd: ca,
@@ -49,7 +51,7 @@ function runTests () {
env: env,
stdio: 'inherit'
}
- common.npm(['test', '--', '-Rtap'], opts, function (err, code) {
+ common.npm(['test', '--', '-Rtap', '--no-coverage'], opts, function (err, code) {
if (err) { throw err }
if (code) {
return test('need test to work', function (t) {
diff --git a/deps/npm/test/tap/repo.js b/deps/npm/test/tap/repo.js
index 292415705e..e2751573d0 100644
--- a/deps/npm/test/tap/repo.js
+++ b/deps/npm/test/tap/repo.js
@@ -1,8 +1,3 @@
-if (process.platform === 'win32') {
- console.error('skipping test, because windows and shebangs')
- process.exit(0)
-}
-
var common = require('../common-tap.js')
var mr = require('npm-registry-mock')
@@ -10,15 +5,18 @@ var test = require('tap').test
var rimraf = require('rimraf')
var fs = require('fs')
var path = require('path')
+var fakeBrowser = path.join(__dirname, '_script.sh')
var outFile = path.join(__dirname, '/_output')
var opts = { cwd: __dirname }
+common.pendIfWindows('This is trickier to convert without opening new shells')
+
test('setup', function (t) {
var s = '#!/usr/bin/env bash\n' +
'echo \"$@\" > ' + JSON.stringify(__dirname) + '/_output\n'
- fs.writeFileSync(__dirname + '/_script.sh', s, 'ascii')
- fs.chmodSync(__dirname + '/_script.sh', '0755')
+ fs.writeFileSync(fakeBrowser, s, 'ascii')
+ fs.chmodSync(fakeBrowser, '0755')
t.pass('made script')
t.end()
})
@@ -29,7 +27,7 @@ test('npm repo underscore', function (t) {
'repo', 'underscore',
'--registry=' + common.registry,
'--loglevel=silent',
- '--browser=' + __dirname + '/_script.sh'
+ '--browser=' + fakeBrowser
], opts, function (err, code, stdout, stderr) {
t.ifError(err, 'repo command ran without error')
t.equal(code, 0, 'exit ok')
@@ -48,7 +46,7 @@ test('npm repo optimist - github (https://)', function (t) {
'repo', 'optimist',
'--registry=' + common.registry,
'--loglevel=silent',
- '--browser=' + __dirname + '/_script.sh'
+ '--browser=' + fakeBrowser
], opts, function (err, code, stdout, stderr) {
t.ifError(err, 'repo command ran without error')
t.equal(code, 0, 'exit ok')
@@ -67,7 +65,7 @@ test('npm repo npm-test-peer-deps - no repo', function (t) {
'repo', 'npm-test-peer-deps',
'--registry=' + common.registry,
'--loglevel=silent',
- '--browser=' + __dirname + '/_script.sh'
+ '--browser=' + fakeBrowser
], opts, function (err, code, stdout, stderr) {
t.ifError(err, 'repo command ran without error')
t.equal(code, 1, 'exit not ok')
@@ -83,7 +81,7 @@ test('npm repo test-repo-url-http - non-github (http://)', function (t) {
'repo', 'test-repo-url-http',
'--registry=' + common.registry,
'--loglevel=silent',
- '--browser=' + __dirname + '/_script.sh'
+ '--browser=' + fakeBrowser
], opts, function (err, code, stdout, stderr) {
t.ifError(err, 'repo command ran without error')
t.equal(code, 0, 'exit ok')
@@ -102,7 +100,7 @@ test('npm repo test-repo-url-https - non-github (https://)', function (t) {
'repo', 'test-repo-url-https',
'--registry=' + common.registry,
'--loglevel=silent',
- '--browser=' + __dirname + '/_script.sh'
+ '--browser=' + fakeBrowser
], opts, function (err, code, stdout, stderr) {
t.ifError(err, 'repo command ran without error')
t.equal(code, 0, 'exit ok')
@@ -121,7 +119,7 @@ test('npm repo test-repo-url-ssh - non-github (ssh://)', function (t) {
'repo', 'test-repo-url-ssh',
'--registry=' + common.registry,
'--loglevel=silent',
- '--browser=' + __dirname + '/_script.sh'
+ '--browser=' + fakeBrowser
], opts, function (err, code, stdout, stderr) {
t.ifError(err, 'repo command ran without error')
t.equal(code, 0, 'exit ok')
@@ -135,7 +133,7 @@ test('npm repo test-repo-url-ssh - non-github (ssh://)', function (t) {
})
test('cleanup', function (t) {
- fs.unlinkSync(__dirname + '/_script.sh')
+ fs.unlinkSync(fakeBrowser)
t.pass('cleaned up')
t.end()
})
diff --git a/deps/npm/test/tap/retry-on-stale-cache.js b/deps/npm/test/tap/retry-on-stale-cache.js
new file mode 100644
index 0000000000..3a7f5c206c
--- /dev/null
+++ b/deps/npm/test/tap/retry-on-stale-cache.js
@@ -0,0 +1,195 @@
+var path = require('path')
+
+var mr = require('npm-registry-mock')
+var test = require('tap').test
+var common = require('../common-tap')
+var extend = Object.assign || require('util')._extend
+var Tacks = require('tacks')
+var Dir = Tacks.Dir
+var File = Tacks.File
+
+var workdir = path.join(__dirname, path.basename(__filename, '.js'))
+var cachedir = path.join(workdir, 'cache')
+var modulesdir = path.join(workdir, 'modules')
+var oldModule = path.join(modulesdir, 'good-night-0.1.0.tgz')
+var newModule = path.join(modulesdir, 'good-night-1.0.0.tgz')
+
+var config = [
+ '--cache', cachedir,
+ '--prefix', workdir,
+ '--registry', common.registry
+]
+
+var fixture = new Tacks(Dir({
+ 'cache': Dir(),
+ 'modules': Dir({
+ 'good-night-0.1.0.tgz': File(new Buffer(
+ '1f8b0800000000000003ed934f4bc43010c57beea7187a59056dd36eff80' +
+ 'de85050541c1f3d8c634da4e4a925a8af8dd6db7bb8ba0e0c15559e9eff2' +
+ '206f929909bc06f327143c6826f51f8d2267cf30c6d2388641c32c61ef75' +
+ '4d9426e084519a25491645cbcc61e192c5d1e0ef7b90cf688d453d8cf2dd' +
+ '77a65d60a707c28b0b031e61cdbd33f08452c52949515aef64729eb93652' +
+ 'd168323ff4d9f6bce026d7b2b11bafef11b1eb3a221a2aa6126c6da9f4e8' +
+ '5e691f6e908a1a697b5ff346196995eec7023399c1c7fe95cc3999f57077' +
+ 'b717d7979efbeafef5a7fd2336b90f6a943484ff477a7c917f96c5bbfc87' +
+ '493ae63f627138e7ff37c815195571bf52e268b1820e0d0825498055d069' +
+ '6939d8521ab86f2dace0815715a0a9386f16c7e7730c676666660e9837c0' +
+ 'f6795d000c0000',
+ 'hex'
+ )),
+ 'good-night-1.0.0.tgz': File(new Buffer(
+ '1f8b0800000000000003ed954d6bc24010863dfb2bb6b9a8503793b849a0' +
+ 'eda5979efa052d484184252e495a331b76d78a94fef76e8cf683163cd42a' +
+ '957d2e03796777268187543c7de299f0aba6d2472db1b5650020668cd81a' +
+ '24117cae4bc23822ad208c93284a1208c216040318c436dff6223f31d386' +
+ '2bbbca6fef69de85bcd77fc24b9b583ce4a5f04e88974939e96391e5c63b' +
+ '6e9267a17421b10e030a14d6cf2742a7aaa8cc2a5b2c38e7f3f91c116d47' +
+ 'd3c2672697aa4eaf1425771c2725c7f579252aa90b23d5a26ed04de87f9f' +
+ '3f2d52817ab9dcf0fee2f6d26bbfb6f7fdd10e8895f77ec90bb4f2ffc98c' +
+ '0dfe439c7cf81fc4b5ff213070feef8254a2965341a732eb76b4cef39c12' +
+ 'e456eb52d82a29198dc637639f9c751fce8796eba35ea777ea0c3c14d6fe' +
+ '532314f62ba9ccf6676cf21fbefcff59ed3f4b22e7ff2e60110bc37d2fe1' +
+ '70381c8e9df306642df14500100000',
+ 'hex'
+ ))
+ })
+}))
+
+var server
+
+// In this test we mock a situation where the user has a package in his cache,
+// a newer version of the package is published, and the user tried to install
+// said new version while requestion that the cache be used.
+// npm should see that it doesn't have the package in its cache and hit the
+// registry.
+var onlyOldMetadata = {
+ 'name': 'good-night',
+ 'dist-tags': {
+ 'latest': '0.1.0'
+ },
+ 'versions': {
+ '0.1.0': {
+ 'name': 'good-night',
+ 'version': '0.1.0',
+ 'dist': {
+ 'shasum': '2a746d49dd074ba0ec2d6ff13babd40c658d89eb',
+ 'tarball': 'http://localhost:' + common.port + '/good-night/-/good-night-0.1.0.tgz'
+ }
+ }
+ }
+}
+
+var oldAndNewMetadata = extend({}, onlyOldMetadata)
+oldAndNewMetadata['dist-tags'] = { latest: '1.0.0' }
+oldAndNewMetadata.versions = extend({
+ '1.0.0': {
+ 'name': 'good-night',
+ 'version': '1.0.0',
+ 'dist': {
+ 'shasum': 'f377bf002a0a8fc4085d347a160a790b76896bc3',
+ 'tarball': 'http://localhost:' + common.port + '/good-night/-/good-night-1.0.0.tgz'
+ }
+ }
+}, oldAndNewMetadata.versions)
+
+function setup () {
+ cleanup()
+ fixture.create(workdir)
+}
+
+function cleanup () {
+ fixture.remove(workdir)
+}
+
+test('setup', function (t) {
+ setup()
+ t.end()
+})
+
+test('setup initial server', function (t) {
+ mr({
+ port: common.port,
+ throwOnUnmatched: true
+ }, function (err, s) {
+ t.ifError(err, 'registry mocked successfully')
+ server = s
+
+ server.get('/good-night')
+ .many({ min: 1, max: 1 })
+ .reply(200, onlyOldMetadata)
+ server.get('/good-night/-/good-night-0.1.0.tgz')
+ .many({ min: 1, max: 1 })
+ .replyWithFile(200, oldModule)
+
+ t.end()
+ })
+})
+
+test('install initial version', function (t) {
+ common.npm(config.concat([
+ 'install', 'good-night'
+ ]), {stdio: 'inherit'}, function (err, code) {
+ if (err) throw err
+ t.is(code, 0, 'initial install succeeded')
+ server.done()
+ t.end()
+ })
+})
+
+test('cleanup initial server', function (t) {
+ server.close()
+ t.end()
+})
+
+test('setup new server', function (t) {
+ mr({
+ port: common.port,
+ throwOnUnmatched: true
+ }, function (err, s) {
+ t.ifError(err, 'registry mocked successfully')
+ server = s
+
+ server.get('/good-night')
+ .many({ min: 1, max: 1 })
+ .reply(200, oldAndNewMetadata)
+
+ server.get('/good-night/-/good-night-1.0.0.tgz')
+ .many({ min: 1, max: 1 })
+ .replyWithFile(200, newModule)
+
+ t.end()
+ })
+})
+
+test('install new version', function (t) {
+ common.npm(config.concat([
+ '--cache-min', 'Infinity',
+ 'install', 'good-night@1.0.0'
+ ]), {stdio: 'inherit'}, function (err, code) {
+ if (err) throw err
+ t.is(code, 0, 'install succeeded')
+
+ t.end()
+ })
+})
+
+test('install does not hit server again', function (t) {
+ // The mock server route definitions ensure we don't hit the server again
+ common.npm(config.concat([
+ '--cache-min', 'Infinity',
+ 'install', 'good-night'
+ ]), {stdio: [0, 'pipe', 2]}, function (err, code, stdout) {
+ if (err) throw err
+ t.is(code, 0, 'install succeeded')
+
+ t.match(stdout, /@1\.0\.0/, 'installed latest version')
+ server.done()
+ t.end()
+ })
+})
+
+test('cleanup', function (t) {
+ server.close()
+ cleanup()
+ t.end()
+})
diff --git a/deps/npm/test/tap/scripts-whitespace-windows.js b/deps/npm/test/tap/scripts-whitespace-windows.js
index bff0e534ef..27a04601c7 100644
--- a/deps/npm/test/tap/scripts-whitespace-windows.js
+++ b/deps/npm/test/tap/scripts-whitespace-windows.js
@@ -37,12 +37,12 @@ var dependency = {
var extend = Object.assign || require('util')._extend
-var foo = function () {/*
+var foo = function () { /*
#!/usr/bin/env node
if (process.argv.length === 8)
console.log('npm-test-fine')
-*/}.toString().split('\n').slice(1, -1).join('\n')
+*/ }.toString().split('\n').slice(1, -1).join('\n')
test('setup', function (t) {
cleanup()
diff --git a/deps/npm/test/tap/shrinkwrap-nested.js b/deps/npm/test/tap/shrinkwrap-nested.js
new file mode 100644
index 0000000000..92c81f29e3
--- /dev/null
+++ b/deps/npm/test/tap/shrinkwrap-nested.js
@@ -0,0 +1,153 @@
+'use strict'
+var test = require('tap').test
+var Tacks = require('tacks')
+var File = Tacks.File
+var Dir = Tacks.Dir
+var fs = require('fs')
+var path = require('path')
+var common = require('../common-tap.js')
+
+var testdir = path.resolve(__dirname, path.basename(__filename, '.js'))
+var modAdir = path.resolve(testdir, 'modA')
+var modB1dir = path.resolve(testdir, 'modB@1')
+var modB2dir = path.resolve(testdir, 'modB@2')
+var modCdir = path.resolve(testdir, 'modC')
+
+var fixture = new Tacks(Dir({
+ 'package.json': File({
+ dependencies: {
+ modA: 'file://' + modAdir,
+ modC: 'file://' + modCdir
+ }
+ }),
+ 'npm-shrinkwrap.json': File({
+ dependencies: {
+ modA: {
+ version: '1.0.0',
+ from: 'modA',
+ resolved: 'file://' + modAdir
+ },
+ modB: {
+ version: '1.0.0',
+ from: 'modB@1',
+ resolved: 'file://' + modB1dir
+ }
+ }
+ }),
+ 'modA': Dir({
+ 'package.json': File({
+ name: 'modA',
+ version: '1.0.0',
+ dependencies: {
+ 'modB': 'file://' + modB1dir
+ }
+ })
+ }),
+ 'modB@1': Dir({
+ 'package.json': File({
+ name: 'modB',
+ version: '1.0.0'
+ }),
+ 'B1': File('')
+ }),
+ 'modB@2': Dir({
+ 'package.json': File({
+ name: 'modB',
+ version: '2.0.0'
+ }),
+ 'B2': File('')
+ }),
+ 'modC': Dir({
+ 'package.json': File({
+ name: 'modC',
+ version: '1.0.0',
+ dependencies: {
+ 'modB': 'file://' + modB2dir
+ }
+ })
+ })
+}))
+
+var newShrinkwrap = new Tacks(Dir({
+ 'npm-shrinkwrap.json': File({
+ dependencies: {
+ modA: {
+ version: '1.0.0',
+ from: 'modA',
+ resolved: 'file://' + modAdir
+ },
+ modB: {
+ version: '1.0.0',
+ from: 'modB@1',
+ resolved: 'file://' + modB1dir
+ },
+ modC: {
+ version: '1.0.0',
+ from: 'modC',
+ resolved: 'file://' + modCdir,
+ dependencies: {
+ modB: {
+ version: '1.0.0',
+ from: 'modB@1',
+ resolved: 'file://' + modB1dir
+ }
+ }
+ }
+ }
+ }),
+ 'node_modules': Dir({
+ 'modB@1': Dir({
+ 'package.json': File({
+ _requested: {
+ name: 'modB',
+ raw: 'modB@file:' + modB1dir,
+ rawSpec: 'file:' + modB1dir,
+ scope: null,
+ spec: modB1dir,
+ type: 'directory'
+ },
+ dependencies: { },
+ devDependencies: { },
+ name: 'modB',
+ optionalDependencies: { },
+ readme: 'ERROR: No README data found!',
+ version: '1.0.0'
+ })
+ })
+ })
+}))
+
+function setup () {
+ fixture.create(testdir)
+}
+
+function cleanup () {
+ fixture.remove(testdir)
+}
+
+test('setup', function (t) {
+ cleanup()
+ setup()
+ common.npm(['install'], {cwd: testdir, stdio: [0, 2, 2]}, function (err, code) {
+ if (err) throw err
+ t.is(code, 0)
+ t.end()
+ })
+})
+
+test('incremental install', function (t) {
+ newShrinkwrap.create(testdir)
+ common.npm(['install'], {cwd: testdir, stdio: [0, 2, 2]}, function (err, code) {
+ if (err) throw err
+ t.is(code, 0, 'npm itself completed ok')
+ fs.stat(path.join(testdir, 'node_modules', 'modC', 'node_modules', 'modB', 'B1'), function (missing) {
+ t.ok(!missing, 'modC got the updated version of modB')
+ t.end()
+ })
+ })
+})
+
+test('cleanup', function (t) {
+ cleanup()
+ t.end()
+})
diff --git a/deps/npm/test/tap/shrinkwrap-version-match.js b/deps/npm/test/tap/shrinkwrap-version-match.js
index cb4e925504..7d9fed729a 100644
--- a/deps/npm/test/tap/shrinkwrap-version-match.js
+++ b/deps/npm/test/tap/shrinkwrap-version-match.js
@@ -1,8 +1,9 @@
'use strict'
var test = require('tap').test
+var Tacks = require('tacks')
+var File = Tacks.File
+var Dir = Tacks.Dir
var fs = require('fs')
-var mkdirp = require('mkdirp')
-var rimraf = require('rimraf')
var path = require('path')
var common = require('../common-tap.js')
@@ -11,77 +12,68 @@ var modAdir = path.resolve(testdir, 'modA')
var modB1dir = path.resolve(testdir, 'modB@1')
var modB2dir = path.resolve(testdir, 'modB@2')
var modCdir = path.resolve(testdir, 'modC')
-var testjson = {
- dependencies: {
- modA: 'file://' + modAdir,
- modC: 'file://' + modCdir
- }
-}
-var testshrinkwrap = {
- dependencies: {
- modA: {
+
+var fixture = new Tacks(Dir({
+ 'package.json': File({
+ dependencies: {
+ modA: 'file://' + modAdir,
+ modC: 'file://' + modCdir
+ }
+ }),
+ 'npm-shrinkwrap.json': File({
+ dependencies: {
+ modA: {
+ version: '1.0.0',
+ from: 'modA',
+ resolved: 'file://' + modAdir
+ },
+ modB: {
+ version: '1.0.0',
+ from: 'modB@1',
+ resolved: 'file://' + modB1dir
+ }
+ }
+ }),
+ 'modA': Dir({
+ 'package.json': File({
+ name: 'modA',
version: '1.0.0',
- from: 'modA',
- resolved: 'file://' + modAdir
- },
- modB: {
+ dependencies: {
+ 'modB': 'file://' + modB1dir
+ }
+ })
+ }),
+ 'modB@1': Dir({
+ 'package.json': File({
+ name: 'modB',
+ version: '1.0.0'
+ }),
+ 'B1': File('')
+ }),
+ 'modB@2': Dir({
+ 'package.json': File({
+ name: 'modB',
+ version: '2.0.0'
+ }),
+ 'B2': File('')
+ }),
+ 'modC': Dir({
+ 'package.json': File({
+ name: 'modC',
version: '1.0.0',
- from: 'modB@1',
- resolved: 'file://' + modB1dir
- }
- }
-}
-var modAjson = {
- name: 'modA',
- version: '1.0.0',
- dependencies: {
- 'modB': 'file://' + modB1dir
- }
-}
-var modCjson = {
- name: 'modC',
- version: '1.0.0',
- dependencies: {
- 'modB': 'file://' + modB2dir
- }
-}
-var modB1json = {
- name: 'modB',
- version: '1.0.0'
-}
-var modB2json = {
- name: 'modB',
- version: '2.0.0'
-}
-
-function writepjson (dir, content) {
- writejson(dir, 'package.json', content)
-}
-function writejson (dir, file, content) {
- writefile(dir, file, JSON.stringify(content, null, 2))
-}
-function writefile (dir, file, content) {
- fs.writeFileSync(path.join(dir, file), content)
-}
+ dependencies: {
+ 'modB': 'file://' + modB2dir
+ }
+ })
+ })
+}))
function setup () {
- mkdirp.sync(testdir)
- writepjson(testdir, testjson)
- writejson(testdir, 'npm-shrinkwrap.json', testshrinkwrap)
- mkdirp.sync(modAdir)
- writepjson(modAdir, modAjson)
- mkdirp.sync(modB1dir)
- writepjson(modB1dir, modB1json)
- writefile(modB1dir, 'B1', '')
- mkdirp.sync(modB2dir)
- writepjson(modB2dir, modB2json)
- writefile(modB2dir, 'B2', '')
- mkdirp.sync(modCdir)
- writepjson(modCdir, modCjson)
+ fixture.create(testdir)
}
function cleanup () {
- rimraf.sync(testdir)
+ fixture.remove(testdir)
}
test('setup', function (t) {
diff --git a/deps/npm/test/tap/sorted-package-json.js b/deps/npm/test/tap/sorted-package-json.js
index 427212ff56..557f3dc53d 100644
--- a/deps/npm/test/tap/sorted-package-json.js
+++ b/deps/npm/test/tap/sorted-package-json.js
@@ -2,9 +2,6 @@ var test = require('tap').test
var path = require('path')
var rimraf = require('rimraf')
var mkdirp = require('mkdirp')
-var spawn = require('child_process').spawn
-var npm = require.resolve('../../bin/npm-cli.js')
-var node = process.execPath
var pkg = path.resolve(__dirname, 'sorted-package-json')
var tmp = path.join(pkg, 'tmp')
var cache = path.join(pkg, 'cache')
@@ -12,36 +9,31 @@ var fs = require('fs')
var common = require('../common-tap.js')
var mr = require('npm-registry-mock')
var osenv = require('osenv')
+var packageJson = path.resolve(pkg, 'package.json')
-test('sorting dependencies', function (t) {
- var packageJson = path.resolve(pkg, 'package.json')
-
- cleanup()
- mkdirp.sync(cache)
- mkdirp.sync(tmp)
+test('setup', function (t) {
setup()
+ t.pass('setup success')
+ t.done()
+})
+test('sorting dependencies', function (t) {
var before = JSON.parse(fs.readFileSync(packageJson).toString())
mr({ port: common.port }, function (er, s) {
// underscore is already in the package.json,
// but --save will trigger a rewrite with sort
- var child = spawn(node, [npm, 'install', '--save', 'underscore@1.3.3', '--no-progress', '--loglevel=error'], {
- cwd: pkg,
- env: {
- 'npm_config_registry': common.registry,
- 'npm_config_cache': cache,
- 'npm_config_tmp': tmp,
- 'npm_config_prefix': pkg,
- 'npm_config_global': 'false',
- HOME: process.env.HOME,
- Path: process.env.PATH,
- PATH: process.env.PATH
- },
- stdio: ['ignore', 'ignore', process.stderr]
- })
-
- child.on('close', function (code) {
+ common.npm([
+ 'install',
+ '--save', 'underscore@1.3.3',
+ '--no-progress',
+ '--cache', cache,
+ '--tmp', tmp,
+ '--registry', common.registry
+ ], {
+ cwd: pkg
+ }, function (err, code, stdout, stderr) {
+ t.ifError(err, 'no error')
t.equal(code, 0, 'npm install exited with code')
var result = fs.readFileSync(packageJson).toString()
var resultAsJson = JSON.parse(result)
@@ -68,9 +60,10 @@ test('cleanup', function (t) {
})
function setup () {
+ cleanup()
mkdirp.sync(pkg)
- fs.writeFileSync(path.resolve(pkg, 'package.json'), JSON.stringify({
+ fs.writeFileSync(packageJson, JSON.stringify({
'name': 'sorted-package-json',
'version': '0.0.0',
'description': '',
@@ -91,4 +84,6 @@ function cleanup () {
process.chdir(osenv.tmpdir())
rimraf.sync(cache)
rimraf.sync(pkg)
+ mkdirp.sync(cache)
+ mkdirp.sync(tmp)
}
diff --git a/deps/npm/test/tap/spawn-enoent-help.js b/deps/npm/test/tap/spawn-enoent-help.js
index 716f6ebd15..d4a6fcdd83 100644
--- a/deps/npm/test/tap/spawn-enoent-help.js
+++ b/deps/npm/test/tap/spawn-enoent-help.js
@@ -6,6 +6,8 @@ var common = require('../common-tap.js')
var pkg = path.resolve(__dirname, 'spawn-enoent-help')
+common.pendIfWindows('man pages are not built on Windows')
+
test('setup', function (t) {
rimraf.sync(pkg)
mkdirp.sync(pkg)
diff --git a/deps/npm/test/tap/symlink-cycle.js b/deps/npm/test/tap/symlink-cycle.js
index b09b25acc8..62aa8e0674 100644
--- a/deps/npm/test/tap/symlink-cycle.js
+++ b/deps/npm/test/tap/symlink-cycle.js
@@ -57,5 +57,5 @@ function setup () {
path.join(cycle, 'package.json'),
JSON.stringify(cycleJSON, null, 2)
)
- fs.symlinkSync(cycle, path.join(cycle, 'node_modules', 'cycle'))
+ fs.symlinkSync(cycle, path.join(cycle, 'node_modules', 'cycle'), 'junction')
}
diff --git a/deps/npm/test/tap/umask-lifecycle.js b/deps/npm/test/tap/umask-lifecycle.js
index aa07084f15..c4c3233637 100644
--- a/deps/npm/test/tap/umask-lifecycle.js
+++ b/deps/npm/test/tap/umask-lifecycle.js
@@ -6,24 +6,30 @@ var rimraf = require('rimraf')
var test = require('tap').test
var sprintf = require('sprintf-js').sprintf
+var escapeExecPath = require('../../lib/utils/escape-exec-path.js')
+var escapeArg = require('../../lib/utils/escape-arg.js')
var common = require('../common-tap.js')
var pkg = path.resolve(__dirname, 'umask-lifecycle')
+var nodeCmd = escapeExecPath(common.nodeBin)
+var npmCmd = nodeCmd + ' ' + escapeArg(common.bin)
+var umaskScript = npmCmd + ' config get umask && ' + nodeCmd + ' -pe "[process.env.npm_config_umask, process.umask()]"'
+
var pj = JSON.stringify({
name: 'x',
version: '1.2.3',
- scripts: { umask: '$npm_execpath config get umask && echo "$npm_config_umask" && node -pe "process.umask()"' }
+ scripts: { umask: umaskScript }
}, null, 2) + '\n'
var umask = process.umask()
var expected = [
'',
'> x@1.2.3 umask ' + path.join(__dirname, 'umask-lifecycle'),
- '> $npm_execpath config get umask && echo "$npm_config_umask" && node -pe "process.umask()"',
+ '> ' + umaskScript,
'',
sprintf('%04o', umask),
- sprintf('%04o', umask),
- sprintf('%d', umask),
+ "[ '" + sprintf('%04o', umask) + "', " +
+ sprintf('%d', umask) + ' ]',
''
].join('\n')
diff --git a/deps/npm/test/tap/unit-child-path.js b/deps/npm/test/tap/unit-child-path.js
index 5e9b452a38..902e8f5ec7 100644
--- a/deps/npm/test/tap/unit-child-path.js
+++ b/deps/npm/test/tap/unit-child-path.js
@@ -1,9 +1,16 @@
'use strict'
var test = require('tap').test
var childPath = require('../../lib/utils/child-path.js')
+var path = require('path')
test('childPath', function (t) {
- t.is(childPath('/path/to', {name: 'abc'}), '/path/to/node_modules/abc', 'basic use')
- t.is(childPath('/path/to', {package: {name: '@zed/abc'}}), '/path/to/node_modules/@zed/abc', 'scoped use')
+ t.is(
+ path.resolve(childPath('/path/to', {name: 'abc'})),
+ path.resolve('/path/to/node_modules/abc'),
+ 'basic use')
+ t.is(
+ path.resolve(childPath('/path/to', {package: {name: '@zed/abc'}})),
+ path.resolve('/path/to/node_modules/@zed/abc'),
+ 'scoped use')
t.end()
})
diff --git a/deps/npm/test/tap/unit-gentlyrm.js b/deps/npm/test/tap/unit-gentlyrm.js
index 8e61be1964..8ea0a11fc2 100644
--- a/deps/npm/test/tap/unit-gentlyrm.js
+++ b/deps/npm/test/tap/unit-gentlyrm.js
@@ -1,6 +1,7 @@
'use strict'
var test = require('tap').test
var requireInject = require('require-inject')
+var path = require('path')
function error (code) {
var er = new Error()
@@ -8,11 +9,54 @@ function error (code) {
return er
}
+function platformPath (unixPath) {
+ if (unixPath[0] === '/') {
+ return path.resolve(unixPath)
+ } else {
+ return path.join.apply(path, unixPath.split('/'))
+ }
+}
+
+function makeObjUsePlatformPaths (obj) {
+ if (typeof obj === 'string') {
+ return platformPath(obj)
+ } else if (obj == null || typeof obj !== 'object') {
+ return obj
+ } else {
+ Object.keys(obj).forEach(function (key) {
+ var newKey = platformPath(key)
+ obj[key] = makeObjUsePlatformPaths(obj[key])
+ if (newKey !== key) {
+ obj[newKey] = obj[key]
+ delete obj[key]
+ }
+ })
+ }
+ return obj
+}
+
+function makeArgsUsePlatformPaths (fn) {
+ return function () {
+ var args = Array.prototype.slice.call(arguments)
+ return fn.apply(null, makeObjUsePlatformPaths(args))
+ }
+}
+
+function pathIs (t, arg1, arg2, msg) {
+ t.is(arg1, makeObjUsePlatformPaths(arg2), msg)
+}
+
+function pathIsDeeply (t, arg1, arg2, msg) {
+ t.isDeeply(arg1, makeObjUsePlatformPaths(arg2), msg)
+}
+
function mockWith (fixture) {
+ makeObjUsePlatformPaths(fixture)
return {
'../../lib/npm.js': {},
'graceful-fs': {
lstat: function (path, cb) {
+ path = platformPath(path)
var entry = fixture[path]
if (!entry) return cb(error('ENOENT'))
cb(null, {
@@ -22,6 +66,7 @@ function mockWith (fixture) {
})
},
readlink: function (path, cb) {
+ path = platformPath(path)
var entry = fixture[path]
if (!entry) return cb(error('ENOENT'))
if (entry.type !== 'symlink') return cb(error('EINVAL'))
@@ -29,6 +74,7 @@ function mockWith (fixture) {
}
},
'read-cmd-shim': function (path, cb) {
+ path = platformPath(path)
var entry = fixture[path]
if (!entry) return cb(error('ENOENT'))
if (entry.type === 'directory') return cb(error('EISDIR'))
@@ -51,7 +97,7 @@ test('readLinkOrShim', function (t) {
})
var gentlyRm = requireInject('../../lib/utils/gently-rm.js', mocks)
- var readLinkOrShim = gentlyRm._readLinkOrShim
+ var readLinkOrShim = makeArgsUsePlatformPaths(gentlyRm._readLinkOrShim)
readLinkOrShim('/path/to/nowhere', function (er, path) {
t.is(er && er.code, 'ENOENT', 'missing files are errors')
@@ -61,19 +107,19 @@ test('readLinkOrShim', function (t) {
})
readLinkOrShim('/path/to/directory', function (er, path) {
t.ifError(er, "reading dirs isn't an error")
- t.is(path, null, 'reading non links/cmdshims gives us null')
+ pathIs(t, path, null, 'reading non links/cmdshims gives us null')
})
readLinkOrShim('/path/to/file', function (er, path) {
t.ifError(er, "reading non-cmdshim files isn't an error")
- t.is(path, null, 'reading non links/cmdshims gives us null')
+ pathIs(t, path, null, 'reading non links/cmdshims gives us null')
})
readLinkOrShim('/path/to/link', function (er, path) {
t.ifError(er, "reading links isn't an error")
- t.is(path, '../to/file', 'reading links works')
+ pathIs(t, path, '../to/file', 'reading links works')
})
readLinkOrShim('/path/to/cmdshim', function (er, path) {
t.ifError(er, "reading cmdshims isn't an error")
- t.is(path, '../to/file', 'reading cmdshims works')
+ pathIs(t, path, '../to/file', 'reading cmdshims works')
})
t.done()
})
@@ -89,26 +135,30 @@ test('resolveSymlink', function (t) {
})
var gentlyRm = requireInject('../../lib/utils/gently-rm.js', mocks)
- var resolveSymlink = gentlyRm._resolveSymlink
+ var resolveSymlink = makeArgsUsePlatformPaths(gentlyRm._resolveSymlink)
resolveSymlink('/path/to/nowhere', function (er, path) {
t.is(er && er.code, 'ENOENT', 'missing files are errors')
})
+
+ // these aren't symlinks so we get back what we passed in
resolveSymlink('/path/to/directory', function (er, path) {
t.ifError(er, "reading dirs isn't an error")
- t.is(path, '/path/to/directory', 'reading non links/cmdshims gives us path we passed in')
+ pathIs(t, path, '/path/to/directory', 'reading non links/cmdshims gives us path we passed in')
})
resolveSymlink('/path/to/file', function (er, path) {
t.ifError(er, "reading non-cmdshim files isn't an error")
- t.is(path, '/path/to/file', 'reading non links/cmdshims gives us the path we passed in')
+ pathIs(t, path, '/path/to/file', 'reading non links/cmdshims gives us the path we passed in')
})
+
+ // these are symlinks so the resolved version is platform specific
resolveSymlink('/path/to/link', function (er, path) {
t.ifError(er, "reading links isn't an error")
- t.is(path, '/path/to/file', 'reading links works')
+ pathIs(t, path, '/path/to/file', 'reading links works')
})
resolveSymlink('/path/to/cmdshim', function (er, path) {
t.ifError(er, "reading cmdshims isn't an error")
- t.is(path, '/path/to/file', 'reading cmdshims works')
+ pathIs(t, path, '/path/to/file', 'reading cmdshims works')
})
t.done()
})
@@ -128,48 +178,48 @@ test('readAllLinks', function (t) {
})
var gentlyRm = requireInject('../../lib/utils/gently-rm.js', mocks)
- var readAllLinks = gentlyRm._readAllLinks
+ var readAllLinks = makeArgsUsePlatformPaths(gentlyRm._readAllLinks)
readAllLinks('/path/to/nowhere', function (er, path) {
t.is(er && er.code, 'ENOENT', 'missing files are errors')
})
readAllLinks('/path/to/directory', function (er, path) {
t.ifError(er, "reading dirs isn't an error")
- t.isDeeply(path, ['/path/to/directory'], 'reading non links/cmdshims gives us path we passed in')
+ pathIsDeeply(t, path, ['/path/to/directory'], 'reading non links/cmdshims gives us path we passed in')
})
readAllLinks('/path/to/file', function (er, path) {
t.ifError(er, "reading non-cmdshim files isn't an error")
- t.isDeeply(path, ['/path/to/file'], 'reading non links/cmdshims gives us the path we passed in')
+ pathIsDeeply(t, path, ['/path/to/file'], 'reading non links/cmdshims gives us the path we passed in')
})
readAllLinks('/path/to/linktobad', function (er, path) {
t.is(er && er.code, 'ENOENT', 'links to missing files are errors')
})
- readAllLinks('/path/to/link', function (er, path) {
+ readAllLinks('/path/to/link', function (er, results) {
t.ifError(er, "reading links isn't an error")
- t.isDeeply(path, ['/path/to/link', '/path/to/file'], 'reading links works')
+ pathIsDeeply(t, results, ['/path/to/link', '/path/to/file'], 'reading links works')
})
readAllLinks('/path/to/cmdshim', function (er, path) {
t.ifError(er, "reading cmdshims isn't an error")
- t.isDeeply(path, ['/path/to/cmdshim', '/path/to/file'], 'reading cmdshims works')
+ pathIsDeeply(t, path, ['/path/to/cmdshim', '/path/to/file'], 'reading cmdshims works')
})
readAllLinks('/path/to/linktolink', function (er, path) {
t.ifError(er, "reading link to link isn't an error")
- t.isDeeply(path, ['/path/to/linktolink', '/path/to/link', '/path/to/file'], 'reading link to link works')
+ pathIsDeeply(t, path, ['/path/to/linktolink', '/path/to/link', '/path/to/file'], 'reading link to link works')
})
readAllLinks('/path/to/linktolink^2', function (er, path) {
t.ifError(er, "reading link to link to link isn't an error")
- t.isDeeply(path, ['/path/to/linktolink^2', '/path/to/linktolink', '/path/to/link', '/path/to/file'], 'reading link to link to link works')
+ pathIsDeeply(t, path, ['/path/to/linktolink^2', '/path/to/linktolink', '/path/to/link', '/path/to/file'], 'reading link to link to link works')
})
readAllLinks('/path/to/linktocmdshim', function (er, path) {
t.ifError(er, "reading link to cmdshim isn't an error")
- t.isDeeply(path, ['/path/to/linktocmdshim', '/path/to/cmdshim', '/path/to/file'], 'reading link to cmdshim works')
+ pathIsDeeply(t, path, ['/path/to/linktocmdshim', '/path/to/cmdshim', '/path/to/file'], 'reading link to cmdshim works')
})
t.done()
})
test('areAnyInsideAny', function (t) {
var gentlyRm = requireInject('../../lib/utils/gently-rm.js', mockWith({}))
- var areAnyInsideAny = gentlyRm._areAnyInsideAny
+ var areAnyInsideAny = makeArgsUsePlatformPaths(gentlyRm._areAnyInsideAny)
var noneOneToOne = areAnyInsideAny(['/abc'], ['/xyz'])
t.is(noneOneToOne, false, 'none inside: one to one')
@@ -181,42 +231,42 @@ test('areAnyInsideAny', function (t) {
t.is(noneManyToMany, false, 'none inside: many to many')
var oneToOne = areAnyInsideAny(['/one/toOne'], ['/one'])
- t.isDeeply(oneToOne, {target: '/one/toOne', path: '/one'}, 'first: one to one')
+ pathIsDeeply(t, oneToOne, {target: '/one/toOne', path: '/one'}, 'first: one to one')
var firstOneToMany = areAnyInsideAny(['/abc/def'], ['/abc', '/def', '/ghi'])
- t.isDeeply(firstOneToMany, {target: '/abc/def', path: '/abc'}, 'first: one to many')
+ pathIsDeeply(t, firstOneToMany, {target: '/abc/def', path: '/abc'}, 'first: one to many')
var secondOneToMany = areAnyInsideAny(['/def/ghi'], ['/abc', '/def', '/ghi'])
- t.isDeeply(secondOneToMany, {target: '/def/ghi', path: '/def'}, 'second: one to many')
+ pathIsDeeply(t, secondOneToMany, {target: '/def/ghi', path: '/def'}, 'second: one to many')
var lastOneToMany = areAnyInsideAny(['/ghi/jkl'], ['/abc', '/def', '/ghi'])
- t.isDeeply(lastOneToMany, {target: '/ghi/jkl', path: '/ghi'}, 'last: one to many')
+ pathIsDeeply(t, lastOneToMany, {target: '/ghi/jkl', path: '/ghi'}, 'last: one to many')
var firstManyToOne = areAnyInsideAny(['/abc/def', '/uvw/def', '/xyz/def'], ['/abc'])
- t.isDeeply(firstManyToOne, {target: '/abc/def', path: '/abc'}, 'first: many to one')
+ pathIsDeeply(t, firstManyToOne, {target: '/abc/def', path: '/abc'}, 'first: many to one')
var secondManyToOne = areAnyInsideAny(['/abc/def', '/uvw/def', '/xyz/def'], ['/uvw'])
- t.isDeeply(secondManyToOne, {target: '/uvw/def', path: '/uvw'}, 'second: many to one')
+ pathIsDeeply(t, secondManyToOne, {target: '/uvw/def', path: '/uvw'}, 'second: many to one')
var lastManyToOne = areAnyInsideAny(['/abc/def', '/uvw/def', '/xyz/def'], ['/xyz'])
- t.isDeeply(lastManyToOne, {target: '/xyz/def', path: '/xyz'}, 'last: many to one')
+ pathIsDeeply(t, lastManyToOne, {target: '/xyz/def', path: '/xyz'}, 'last: many to one')
var firstToFirst = areAnyInsideAny(['/abc/def', '/uvw/def', '/xyz/def'], ['/abc', '/uvw', '/xyz'])
- t.isDeeply(firstToFirst, {target: '/abc/def', path: '/abc'}, 'first to first: many to many')
+ pathIsDeeply(t, firstToFirst, {target: '/abc/def', path: '/abc'}, 'first to first: many to many')
var firstToSecond = areAnyInsideAny(['/abc/def', '/uvw/def', '/xyz/def'], ['/nope', '/abc', '/xyz'])
- t.isDeeply(firstToSecond, {target: '/abc/def', path: '/abc'}, 'first to second: many to many')
+ pathIsDeeply(t, firstToSecond, {target: '/abc/def', path: '/abc'}, 'first to second: many to many')
var firstToLast = areAnyInsideAny(['/abc/def', '/uvw/def', '/xyz/def'], ['/nope', '/nooo', '/abc'])
- t.isDeeply(firstToLast, {target: '/abc/def', path: '/abc'}, 'first to last: many to many')
+ pathIsDeeply(t, firstToLast, {target: '/abc/def', path: '/abc'}, 'first to last: many to many')
var secondToFirst = areAnyInsideAny(['/!!!', '/abc/def', '/xyz/def'], ['/abc', '/uvw', '/xyz'])
- t.isDeeply(secondToFirst, {target: '/abc/def', path: '/abc'}, 'second to first: many to many')
+ pathIsDeeply(t, secondToFirst, {target: '/abc/def', path: '/abc'}, 'second to first: many to many')
var secondToSecond = areAnyInsideAny(['/!!!', '/abc/def', '/xyz/def'], ['/nope', '/abc', '/xyz'])
- t.isDeeply(secondToSecond, {target: '/abc/def', path: '/abc'}, 'second to second: many to many')
+ pathIsDeeply(t, secondToSecond, {target: '/abc/def', path: '/abc'}, 'second to second: many to many')
var secondToLast = areAnyInsideAny(['/!!!', '/abc/def', '/uvw/def'], ['/nope', '/nooo', '/abc'])
- t.isDeeply(secondToLast, {target: '/abc/def', path: '/abc'}, 'second to last: many to many')
+ pathIsDeeply(t, secondToLast, {target: '/abc/def', path: '/abc'}, 'second to last: many to many')
var lastToFirst = areAnyInsideAny(['/!!!', '/???', '/abc/def'], ['/abc', '/uvw', '/xyz'])
- t.isDeeply(lastToFirst, {target: '/abc/def', path: '/abc'}, 'last to first: many to many')
+ pathIsDeeply(t, lastToFirst, {target: '/abc/def', path: '/abc'}, 'last to first: many to many')
var lastToSecond = areAnyInsideAny(['/!!!', '/???', '/abc/def'], ['/nope', '/abc', '/xyz'])
- t.isDeeply(lastToSecond, {target: '/abc/def', path: '/abc'}, 'last to second: many to many')
+ pathIsDeeply(t, lastToSecond, {target: '/abc/def', path: '/abc'}, 'last to second: many to many')
var lastToLast = areAnyInsideAny(['/!!!', '/???', '/abc/def'], ['/nope', '/nooo', '/abc'])
- t.isDeeply(lastToLast, {target: '/abc/def', path: '/abc'}, 'last to last: many to many')
+ pathIsDeeply(t, lastToLast, {target: '/abc/def', path: '/abc'}, 'last to last: many to many')
t.done()
})
@@ -233,11 +283,11 @@ test('isEverInside', function (t) {
})
var gentlyRm = requireInject('../../lib/utils/gently-rm.js', mocks)
- var isEverInside = gentlyRm._isEverInside
+ var isEverInside = makeArgsUsePlatformPaths(gentlyRm._isEverInside)
isEverInside('/path/to/file', ['/path/to', '/path/to/invalid'], function (er, inside) {
t.ifError(er)
- t.isDeeply(inside, {target: '/path/to/file', path: '/path/to'}, 'bad paths are ignored if something matches')
+ pathIsDeeply(t, inside, {target: '/path/to/file', path: '/path/to'}, 'bad paths are ignored if something matches')
})
isEverInside('/path/to/invalid', ['/path/to/invalid'], function (er, inside) {
@@ -255,20 +305,20 @@ test('isEverInside', function (t) {
isEverInside('/path/to/file', ['/path/to'], function (er, inside) {
t.ifError(er)
- t.isDeeply(inside, {target: '/path/to/file', path: '/path/to'}, 'plain file in plain path')
+ pathIsDeeply(t, inside, {target: '/path/to/file', path: '/path/to'}, 'plain file in plain path')
})
isEverInside('/path/other/link', ['/path/to'], function (er, inside) {
t.ifError(er)
- t.isDeeply(inside, {target: '/path/to/file', path: '/path/to'}, 'link in plain path')
+ pathIsDeeply(t, inside, {target: '/path/to/file', path: '/path/to'}, 'link in plain path')
})
isEverInside('/path/to/file', ['/linkpath'], function (er, inside) {
t.ifError(er)
- t.isDeeply(inside, {target: '/path/to/file', path: '/path/to'}, 'plain file in link path')
+ pathIsDeeply(t, inside, {target: '/path/to/file', path: '/path/to'}, 'plain file in link path')
})
isEverInside('/path/other/link', ['/linkpath'], function (er, inside) {
t.ifError(er)
- t.isDeeply(inside, {target: '/path/to/file', path: '/path/to'}, 'link in link path')
+ pathIsDeeply(t, inside, {target: '/path/to/file', path: '/path/to'}, 'link in link path')
})
t.done()
@@ -276,15 +326,15 @@ test('isEverInside', function (t) {
test('isSafeToRm', function (t) {
var gentlyRm = requireInject('../../lib/utils/gently-rm.js', mockWith({}))
- var isSafeToRm = gentlyRm._isSafeToRm
+ var isSafeToRm = makeArgsUsePlatformPaths(gentlyRm._isSafeToRm)
t.plan(12)
function testIsSafeToRm (t, parent, target, shouldPath, shouldBase, msg) {
isSafeToRm(parent, target, function (er, path, base) {
t.ifError(er, msg + ' no error')
- t.is(path, shouldPath, msg + ' path')
- t.is(base, shouldBase, msg + ' base')
+ pathIs(t, path, shouldPath, msg + ' path')
+ pathIs(t, base, shouldBase, msg + ' base')
})
}
diff --git a/deps/npm/test/tap/unit-link.js b/deps/npm/test/tap/unit-link.js
new file mode 100644
index 0000000000..e4b9094068
--- /dev/null
+++ b/deps/npm/test/tap/unit-link.js
@@ -0,0 +1,281 @@
+'use strict'
+var util = require('util')
+var test = require('tap').test
+var requireInject = require('require-inject')
+var dezalgo = require('dezalgo')
+var mkdirp = require('mkdirp')
+var path = require('path')
+
+test('gently/force', function (t) {
+ t.plan(5)
+
+ linkOk(t, 'gently=true, force=false, works', {
+ // args
+ from: 'wibble',
+ to: '/foo/bar/baz',
+ gently: true,
+ abs: true,
+ force: false,
+
+ // expect
+ rm: {'/foo/bar/baz': {gently: true}},
+ mkdir: {'/foo/bar': true},
+ lstat: {'/foo/bar/wibble': {isLink: false}},
+ stat: {'/foo/bar/wibble': true},
+ symlink: {'/foo/bar/wibble': {'/foo/bar/baz': 'junction'}},
+ readlink: {}
+ })
+
+ linkNotOk(t, 'gently=true, force=false, does not work', {
+ // args
+ from: 'wibble',
+ to: '/foo/bar/baz',
+ gently: true,
+ abs: true,
+ force: false,
+
+ // expect
+ rm: {'/foo/bar/baz': {gently: false}},
+ mkdir: {'/foo/bar': true},
+ lstat: {'/foo/bar/wibble': {isLink: false}},
+ stat: {'/foo/bar/wibble': true},
+ symlink: {'/foo/bar/wibble': {'/foo/bar/baz': 'junction'}},
+ readlink: {}
+ })
+
+ linkOk(t, 'gently=false, force=false, aok', {
+ // args
+ from: 'wibble',
+ to: '/foo/bar/baz',
+ gently: false,
+ abs: true,
+ force: false,
+
+ // expect
+ rm: {'/foo/bar/baz': {gently: false}},
+ mkdir: {'/foo/bar': true},
+ lstat: {'/foo/bar/wibble': {isLink: false}},
+ stat: {'/foo/bar/wibble': true},
+ symlink: {'/foo/bar/wibble': {'/foo/bar/baz': 'junction'}},
+ readlink: {}
+ })
+
+ linkOk(t, 'gently=true, force=true, aok', {
+ // args
+ from: 'wibble',
+ to: '/foo/bar/baz',
+ gently: true,
+ abs: true,
+ force: true,
+
+ // expect
+ rm: {'/foo/bar/baz': {gently: false}},
+ mkdir: {'/foo/bar': true},
+ lstat: {'/foo/bar/wibble': {isLink: false}},
+ stat: {'/foo/bar/wibble': true},
+ symlink: {'/foo/bar/wibble': {'/foo/bar/baz': 'junction'}},
+ readlink: {}
+ })
+
+ linkOk(t, 'gently=false, force=true, aok', {
+ // args
+ from: 'wibble',
+ to: '/foo/bar/baz',
+ gently: false,
+ abs: true,
+ force: true,
+
+ // expect
+ rm: {'/foo/bar/baz': {gently: false}},
+ mkdir: {'/foo/bar': true},
+ lstat: {'/foo/bar/wibble': {isLink: false}},
+ stat: {'/foo/bar/wibble': true},
+ symlink: {'/foo/bar/wibble': {'/foo/bar/baz': 'junction'}},
+ readlink: {}
+ })
+})
+
+test('abs, noabs', function (t) {
+ t.plan(4)
+
+ linkOk(t, 'abs', {
+ // args
+ from: 'wibble',
+ to: '/foo/bar/baz',
+ gently: true,
+ abs: true,
+ force: false,
+
+ // expect
+ rm: {'/foo/bar/baz': {gently: true}},
+ mkdir: {'/foo/bar': true},
+ lstat: {'/foo/bar/wibble': {isLink: false}},
+ stat: {'/foo/bar/wibble': true},
+ symlink: {'/foo/bar/wibble': {'/foo/bar/baz': 'junction'}},
+ readlink: {}
+ })
+
+ linkOk(t, 'relative', {
+ // args
+ from: 'wibble',
+ to: '/foo/bar/baz',
+ gently: true,
+ abs: false,
+ force: false,
+
+ // expect
+ rm: {'/foo/bar/baz': {gently: true}},
+ mkdir: {'/foo/bar': true},
+ lstat: {'/foo/bar/wibble': {isLink: false}},
+ stat: {'/foo/bar/wibble': true},
+ symlink: {'wibble': {'/foo/bar/baz': 'junction'}},
+ readlink: {}
+ })
+
+ linkOk(t, 'relative ..', {
+ // args
+ from: '../wibble/bark/blump',
+ to: '/foo/bar/baz',
+ gently: true,
+ abs: false,
+ force: false,
+
+ // expect
+ rm: {'/foo/bar/baz': {gently: true}},
+ mkdir: {'/foo/bar': true},
+ lstat: {'/foo/wibble/bark/blump': {isLink: false}},
+ stat: {'/foo/wibble/bark/blump': true},
+ symlink: {'../wibble/bark/blump': {'/foo/bar/baz': 'junction'}},
+ readlink: {}
+ })
+
+ linkOk(t, 'relative .. deep', {
+ // args
+ from: 'zib/zap/../../../wibble/bark/blump',
+ to: '/foo/bar/baz',
+ gently: true,
+ abs: false,
+ force: false,
+
+ // expect
+ rm: {'/foo/bar/baz': {gently: true}},
+ mkdir: {'/foo/bar': true},
+ lstat: {'/foo/wibble/bark/blump': {isLink: false}},
+ stat: {'/foo/wibble/bark/blump': true},
+ symlink: {'../wibble/bark/blump': {'/foo/bar/baz': 'junction'}},
+ readlink: {}
+ })
+})
+
+function linkOk (t, msg, opts) {
+ testLink(opts, function (err) {
+ t.ifError(err, msg)
+ })
+}
+
+function linkNotOk (t, msg, opts) {
+ testLink(opts, function (err) {
+ t.ok(err, msg)
+ })
+}
+
+function platformPath (unixPath) {
+ if (unixPath[0] === '/') {
+ return path.resolve(unixPath)
+ } else {
+ return path.join.apply(path, unixPath.split('/'))
+ }
+}
+
+function platformerize (obj) {
+ Object.keys(obj).forEach(function (key) {
+ var newKey = platformPath(key)
+ if (typeof obj[key] === 'object') {
+ platformerize(obj[key])
+ } else if (typeof obj[key] === 'string') {
+ obj[key] = platformPath(obj[key])
+ }
+ if (newKey !== key) {
+ obj[newKey] = obj[key]
+ delete obj[key]
+ }
+ })
+}
+
+function testLink (opts, cb) {
+ var mkdirpMock = dezalgo(function (dir, cb) {
+ if (opts.mkdir[dir]) {
+ cb()
+ } else {
+ cb(new Error('mkdirp failed: ' + util.inspect(dir)))
+ }
+ })
+ // sync version used by istanbul for test coverage
+ // we shouldn't have to do this ;.;
+ // require-inject and/or instanbul will need patching
+ mkdirpMock.sync = mkdirp.sync
+
+ // convert any paths in our opts into platform specific paths, for windows support.
+ platformerize(opts)
+
+ var link = requireInject('../../lib/utils/link.js', {
+ '../../lib/npm.js': {
+ config: {
+ get: function (name) {
+ if (name !== 'force') return new Error('unknown config key: ' + name)
+ return opts.force
+ }
+ }
+ },
+ '../../lib/utils/gently-rm.js': dezalgo(function (toRemove, gently, cb) {
+ if (opts.rm[toRemove] && opts.rm[toRemove].gently === gently) {
+ cb()
+ } else {
+ cb(new Error('Removing toRemove: ' + util.inspect(toRemove) +
+ ' gently: ' + util.inspect(gently) +
+ ' not allowed: ' + util.inspect(opts.rm)))
+ }
+ }),
+ 'mkdirp': mkdirpMock,
+ 'graceful-fs': {
+ 'stat': dezalgo(function (file, cb) {
+ if (opts.stat[file]) {
+ cb(null, {})
+ } else {
+ cb(new Error('stat failed for: ' + util.inspect(file)))
+ }
+ }),
+ 'lstat': dezalgo(function (file, cb) {
+ if (opts.lstat[file]) {
+ var linkStat = opts.lstat[file]
+ cb(null, {
+ isSymbolicLink: function () {
+ return linkStat.isLink
+ }
+ })
+ } else {
+ cb(new Error('lstat failed for: ' + util.inspect(file)))
+ }
+ }),
+ 'symlink': dezalgo(function (from, to, type, cb) {
+ if (!cb) {
+ cb = type
+ type = null
+ }
+ if (opts.symlink[from] && opts.symlink[from][to] === type) {
+ cb()
+ } else {
+ cb(new Error('symlink failed from: ' + util.inspect(from) + ' to: ' + util.inspect(to) + ' type: ' + util.inspect(type)))
+ }
+ }),
+ 'readlink': function (file, cb) {
+ if (opts.readlink[file]) {
+ cb()
+ } else {
+ cb(new Error('readlink failed for: ' + util.inspect(file)))
+ }
+ }
+ }
+ })
+ link(opts.from, opts.to, opts.gently, opts.abs, cb)
+}
diff --git a/deps/npm/test/tap/unpack-foreign-tarball.js b/deps/npm/test/tap/unpack-foreign-tarball.js
index 56d707c31a..d128e94d8c 100644
--- a/deps/npm/test/tap/unpack-foreign-tarball.js
+++ b/deps/npm/test/tap/unpack-foreign-tarball.js
@@ -21,8 +21,7 @@ var EXEC_OPTS = {
'npm_config_cache': cache,
'npm_config_tmp': tmp
},
- cwd: pkg,
- stdio: [ 'pipe', 'pipe', 2 ]
+ cwd: pkg
}
function verify (t, files, err, code) {
diff --git a/deps/npm/test/tap/unpublish-config.js b/deps/npm/test/tap/unpublish-config.js
index d6e18eb024..92a0c731fe 100644
--- a/deps/npm/test/tap/unpublish-config.js
+++ b/deps/npm/test/tap/unpublish-config.js
@@ -44,7 +44,7 @@ test('cursory test of unpublishing with config', function (t) {
res.end(JSON.stringify({
error: 'shh no tears, only dreams now'
}))
- child.kill('SIGHUP')
+ child.kill('SIGINT')
}).listen(common.port, function () {
t.pass('server is listening')
diff --git a/deps/npm/test/tap/verify-no-lifecycle-on-repo.js b/deps/npm/test/tap/verify-no-lifecycle-on-repo.js
index 29f79e2983..eedaa756b8 100644
--- a/deps/npm/test/tap/verify-no-lifecycle-on-repo.js
+++ b/deps/npm/test/tap/verify-no-lifecycle-on-repo.js
@@ -4,7 +4,8 @@ var fs = require('graceful-fs')
var mkdirp = require('mkdirp')
var rimraf = require('rimraf')
var test = require('tap').test
-var common = require('../common-tap.js')
+var requireInject = require('require-inject')
+require('../common-tap.js')
var base = path.join(__dirname, path.basename(__filename, '.js'))
@@ -20,6 +21,17 @@ var baseJSON = {
}
}
+var lastOpened
+var npm = requireInject.installGlobally('../../lib/npm.js', {
+ '../../lib/utils/lifecycle.js': function (pkg, stage, wd, unsafe, failOk, cb) {
+ cb(new Error("Shouldn't be calling lifecycle scripts"))
+ },
+ opener: function (url, options, cb) {
+ lastOpened = {url: url, options: options}
+ cb()
+ }
+})
+
test('setup', function (t) {
cleanup()
setup()
@@ -27,11 +39,14 @@ test('setup', function (t) {
})
test('repo', function (t) {
- common.npm(['repo', '--browser=echo'], {cwd: base}, function (er, code, stdout, stderr) {
- t.ifError(er, 'npm config ran without issue')
- t.is(code, 0, 'exited with a non-error code')
- t.is(stderr, '', 'Ran without errors')
- t.end()
+ process.chdir(base)
+ npm.load({browser: 'echo'}, function () {
+ npm.commands.repo([], function (err) {
+ t.ifError(err, 'no errors')
+ t.match(lastOpened.url, baseJSON.repository.url, 'opened the right url')
+ t.is(lastOpened.options.command, 'echo', 'opened with a specified browser')
+ t.end()
+ })
})
})
diff --git a/deps/npm/test/tap/version-lifecycle.js b/deps/npm/test/tap/version-lifecycle.js
index 5d78b71d59..3b4fb50b24 100644
--- a/deps/npm/test/tap/version-lifecycle.js
+++ b/deps/npm/test/tap/version-lifecycle.js
@@ -21,11 +21,10 @@ test('npm version <semver> with failing preversion lifecycle script', function (
version: '0.0.0',
description: 'Test for npm version if preversion script fails',
scripts: {
- preversion: './fail.sh'
+ preversion: 'node ./fail.js'
}
}), 'utf8')
- fs.writeFileSync(path.resolve(pkg, 'fail.sh'), 'exit 50', 'utf8')
- fs.chmodSync(path.resolve(pkg, 'fail.sh'), 448)
+ fs.writeFileSync(path.resolve(pkg, 'fail.js'), 'process.exit(50)', 'utf8')
npm.load({cache: cache, 'sign-git-tag': false, registry: common.registry}, function () {
var version = require('../../lib/version')
version(['patch'], function (err) {
@@ -44,11 +43,10 @@ test('npm version <semver> with failing version lifecycle script', function (t)
version: '0.0.0',
description: 'Test for npm version if postversion script fails',
scripts: {
- version: './fail.sh'
+ version: 'node ./fail.js'
}
}), 'utf8')
- fs.writeFileSync(path.resolve(pkg, 'fail.sh'), 'exit 50', 'utf8')
- fs.chmodSync(path.resolve(pkg, 'fail.sh'), 448)
+ fs.writeFileSync(path.resolve(pkg, 'fail.js'), 'process.exit(50)', 'utf8')
npm.load({cache: cache, 'sign-git-tag': false, registry: common.registry}, function () {
var version = require('../../lib/version')
version(['patch'], function (err) {
@@ -67,11 +65,10 @@ test('npm version <semver> with failing postversion lifecycle script', function
version: '0.0.0',
description: 'Test for npm version if postversion script fails',
scripts: {
- postversion: './fail.sh'
+ postversion: 'node ./fail.js'
}
}), 'utf8')
- fs.writeFileSync(path.resolve(pkg, 'fail.sh'), 'exit 50', 'utf8')
- fs.chmodSync(path.resolve(pkg, 'fail.sh'), 448)
+ fs.writeFileSync(path.resolve(pkg, 'fail.js'), 'process.exit(50)', 'utf8')
npm.load({cache: cache, 'sign-git-tag': false, registry: common.registry}, function () {
var version = require('../../lib/version')
version(['patch'], function (err) {
@@ -90,9 +87,9 @@ test('npm version <semver> execution order', function (t) {
version: '0.0.0',
description: 'Test for npm version if postversion script fails',
scripts: {
- preversion: './preversion.sh',
- version: './version.sh',
- postversion: './postversion.sh'
+ preversion: 'node ./preversion.js',
+ version: 'node ./version.js',
+ postversion: 'node ./postversion.js'
}
}), 'utf8')
makeScript('preversion')
@@ -143,14 +140,31 @@ function setup () {
}
function makeScript (lifecycle) {
- var contents = [
- 'cp package.json ' + lifecycle + '-package.json',
- 'git add ' + lifecycle + '-package.json',
- 'git status --porcelain > ' + lifecycle + '-git.txt'
- ].join('\n')
- var scriptPath = path.join(pkg, lifecycle + '.sh')
- fs.writeFileSync(scriptPath, contents, 'utf-8')
- fs.chmodSync(scriptPath, 448)
+ function contents (lifecycle) {
+ var fs = require('fs')
+ var exec = require('child_process').exec
+ fs.createReadStream('package.json')
+ .pipe(fs.createWriteStream(lifecycle + '-package.json'))
+ .on('close', function () {
+ exec(
+ 'git add ' + lifecycle + '-package.json',
+ function () {
+ exec(
+ 'git status --porcelain',
+ function (err, stdout) {
+ if (err) throw err
+ fs.writeFileSync(lifecycle + '-git.txt', stdout)
+ }
+ )
+ }
+ )
+ })
+ }
+ var scriptPath = path.join(pkg, lifecycle + '.js')
+ fs.writeFileSync(
+ scriptPath,
+ '(' + contents.toString() + ')(\'' + lifecycle + '\')',
+ 'utf-8')
}
function readPackage (lifecycle) {
diff --git a/deps/npm/test/tap/version-update-shrinkwrap.js b/deps/npm/test/tap/version-update-shrinkwrap.js
index c51ab2cb0d..d9f54d6872 100644
--- a/deps/npm/test/tap/version-update-shrinkwrap.js
+++ b/deps/npm/test/tap/version-update-shrinkwrap.js
@@ -110,15 +110,12 @@ test('npm version <semver> updates shrinkwrap and updates git', function (t) {
})
test('cleanup', function (t) {
- // windows fix for locked files
- process.chdir(osenv.tmpdir())
-
- rimraf.sync(pkg)
+ cleanup()
t.end()
})
function setup () {
- rimraf.sync(pkg)
+ cleanup()
mkdirp.sync(pkg)
mkdirp.sync(cache)
var contents = {
@@ -132,3 +129,10 @@ function setup () {
fs.writeFileSync(path.resolve(pkg, 'npm-shrinkwrap.json'), JSON.stringify(contents), 'utf8')
process.chdir(pkg)
}
+
+function cleanup () {
+ // windows fix for locked files
+ process.chdir(osenv.tmpdir())
+ rimraf.sync(cache)
+ rimraf.sync(pkg)
+}