{"name":"jsvu","version":"2.5.0","keywords":["javascript engines","installer","chakra","chakracore","javascriptcore","jsc","spidermonkey","v8"],"author":{"url":"https://mathiasbynens.be/","name":"Mathias Bynens"},"license":"Apache-2.0","_id":"jsvu@2.5.0","maintainers":[{"name":"mathias","email":"mathias@qiwi.be"},{"name":"google-wombot","email":"node-team-npm+wombot@google.com"}],"homepage":"https://github.com/GoogleChromeLabs/jsvu","bugs":{"url":"https://github.com/GoogleChromeLabs/jsvu/issues"},"bin":{"jsvu":"cli.js"},"dist":{"shasum":"a79ffd02fa2507c868516bd5819244980068618b","tarball":"http://registry-npm.ywwl.com/jsvu/download/jsvu-2.5.0.tgz","fileCount":71,"integrity":"sha512-XvWlPtYSlHwNyvzonnRPQGf4XVfEPU1rmcHf9XDMPwETSc5ZkXacrnyVSRvO0mUjwfuuvho93iGxTGFfxdzC0A==","signatures":[{"sig":"MEQCICUHnMp9iFA3AByHuazBwDViVJflAZ3TEuZnfomzecYmAiAYAxQ9SdslkCWCDUVvvlWIysyL5ymIapZhdoikzGDrkA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":113617,"size":19891,"noattachment":false,"key":"/jsvu/-/jsvu-2.5.0.tgz"},"main":"cli.js","engines":{"node":">=18.0.0"},"gitHead":"f47bce34f3af97e64f9fd5fa0e1840138f85732d","scripts":{"test":"echo 'Use `npm run test-$os` where `$os` reflects your system.'; echo 'See `npm run` for the full list.' && exit 1","test-mac64":"npm link; jsvu --os=mac64 --engines=all && echo '{\"os\":\"mac64\",\"engines\":[\"chakra\",\"hermes\",\"javascriptcore\",\"spidermonkey\",\"v8\"],\"chakra\":\"0\",\"javascriptcore\":\"0\",\"spidermonkey\":\"0\",\"v8\":\"0\"}' > ~/.jsvu/status.json && jsvu","test-win32":"npm link; jsvu --os=win32 --engines=all && echo '{\"os\":\"win32\",\"engines\":[\"chakra\",\"javascriptcore\",\"spidermonkey\",\"v8\"],\"chakra\":\"0\",\"javascriptcore\":\"0\",\"spidermonkey\":\"0\",\"v8\":\"0\"}' > ~/.jsvu/status.json && jsvu","test-win64":"npm link; jsvu --os=win64 --engines=all && jsvu && echo '{\"os\":\"win64\",\"engines\":[\"chakra\",\"hermes\",\"javascriptcore\",\"spidermonkey\",\"v8\"],\"chakra\":\"0\",\"javascriptcore\":\"0\",\"spidermonkey\":\"0\",\"v8\":\"0\"}' > ~/.jsvu/status.json && jsvu","test-linux32":"npm link; jsvu --os=linux32 --engines=all && echo '{\"os\":\"linux32\",\"engines\":[\"chakra\",\"javascriptcore\",\"spidermonkey\",\"v8\"],\"chakra\":\"0\",\"javascriptcore\":\"0\",\"spidermonkey\":\"0\",\"v8\":\"0\"}' > ~/.jsvu/status.json && jsvu","test-linux64":"npm link; jsvu --os=linux64 --engines=all && echo '{\"os\":\"linux64\",\"engines\":[\"chakra\",\"hermes\",\"javascriptcore\",\"quickjs\",\"spidermonkey\",\"v8\"],\"chakra\":\"0\",\"javascriptcore\":\"0\",\"spidermonkey\":\"0\",\"v8\":\"0\"}' > ~/.jsvu/status.json && jsvu","test-mac64arm":"npm link; jsvu --os=mac64arm --engines=all && echo '{\"os\":\"mac64arm\",\"engines\":[\"chakra\",\"hermes\",\"javascriptcore\",\"spidermonkey\",\"v8\"],\"chakra\":\"0\",\"javascriptcore\":\"0\",\"spidermonkey\":\"0\",\"v8\":\"0\"}' > ~/.jsvu/status.json && jsvu"},"_npmUser":{"name":"google-wombot","email":"node-team-npm+wombot@google.com"},"repository":{"url":"git+https://github.com/GoogleChromeLabs/jsvu.git","type":"git"},"_npmVersion":"10.8.2","description":"JavaScript (engine) Version Updater","directories":{},"_nodeVersion":"18.20.5","dependencies":{"got":"^9.6.0","tar":"^4.4.10","glob":"^7.1.4","chalk":"^2.4.2","execa":"^2.0.4","tempy":"^0.5.0","mkdirp":"^0.5.1","tildify":"^2.0.0","fs-extra":"^8.1.0","inquirer":"^6.5.1","progress":"^2.0.3","untildify":"^4.0.0","extract-zip":"^1.6.7","update-notifier":"^3.0.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/jsvu_2.5.0_1733315802916_0.5848053258013051","host":"s3://npm-registry-packages"},"readme":"# jsvu [![Build status](https://github.com/GoogleChromeLabs/jsvu/actions/workflows/main.yml/badge.svg)](https://github.com/GoogleChromeLabs/jsvu/actions/workflows/main.yml) [![jsvu on npm](https://img.shields.io/npm/v/jsvu)](https://www.npmjs.com/package/jsvu)\n\n_jsvu_ is the <b>J</b>ava<b>S</b>cript (engine) <b>V</b>ersion <b>U</b>pdater.\n\n_jsvu_ makes it easy to install recent versions of various JavaScript engines without having to compile them from source.\n\n[![](screenshot.svg)](https://asciinema.org/a/rfS1M5ynKm1hGaBqJYJj0mGCi)\n\n## Installation\n\n**Note:** _jsvu_ requires Node.js v18+. (_jsvu_ follows the latest [active LTS](https://github.com/nodejs/Release#release-schedule) version of Node.)\n\nInstall the _jsvu_ CLI:\n\n```sh\nnpm install jsvu -g\n```\n\nModify your dotfiles (e.g. `~/.bashrc`) to add `~/.jsvu/bin` to your `PATH`:\n\n```sh\nexport PATH=\"${HOME}/.jsvu/bin:${PATH}\"\n```\n\nThen, run `jsvu`:\n\n```sh\njsvu\n```\n\nOn first run, `jsvu` prompts you for your operating system and architecture, and the list of JavaScript engines you wish to manage through `jsvu`. It then downloads and installs the latest version of each of the engines you selected.\n\nTo update the installed JavaScript engines later on, just run `jsvu` again.\n\n## Supported engines per OS\n\n| JavaScript engine         | Binary name               | `mac64` | `mac64arm` | `win32` | `win64`          | `linux32` | `linux64` |\n| ------------------------- | ------------------------- | ------- | ---------- | ------- | ---------------- | --------- | --------- |\n| [**GraalJS**][graaljs]    | `graaljs`                 | ✅      | ❌         | ❌      | ✅               | ❌        | ✅        |\n| [**Hermes**][hermes]      | `hermes` & `hermes-repl`  | ✅      | ✅         | ❌      | ✅               | ❌        | ✅        |\n| [**JavaScriptCore**][jsc] | `javascriptcore` or `jsc` | ✅      | ✅         | ❌      | ✅ <sup>\\*</sup> | ❌        | ✅        |\n| [**QuickJS-ng**][quickjs] | `quickjs`                 | ✅      | ✅         | ✅      | ✅               | ✅        | ✅        |\n| [**SpiderMonkey**][sm]    | `spidermonkey` or `sm`    | ✅      | ✅         | ✅      | ✅               | ✅        | ✅        |\n| [**V8**][v8]              | `v8`                      | ✅      | ✅         | ✅      | ✅               | ✅        | ✅        |\n| [**V8 debug**][v8]        | `v8-debug`                | ✅      | ✅         | ✅      | ✅               | ✅        | ✅        |\n| [**XS**][xs]              | `xs`                      | ✅      | ✅         | ❌      | ✅               | ❌        | ✅        |\n\n<sup>\\*</sup> JavaScriptCore requires external dependencies to run on Windows:\n- On 32-bit Windows, install [iTunes](https://www.apple.com/itunes/download/).\n- On 64-bit Windows, download the latest [`WebKitRequirements`](https://github.com/WebKitForWindows/WebKitRequirements/releases) and add its `bin64` directory to your `PATH`.\n\n[graaljs]: https://github.com/oracle/graaljs\n[hermes]: https://github.com/facebook/hermes/issues/17\n[jsc]: https://bugs.webkit.org/show_bug.cgi?id=179945\n[quickjs]: https://github.com/GoogleChromeLabs/jsvu/issues/141\n[sm]: https://bugzilla.mozilla.org/show_bug.cgi?id=1336514\n[v8]: https://bugs.chromium.org/p/chromium/issues/detail?id=936383\n[xs]: https://github.com/Moddable-OpenSource/moddable-xst\n\n## Integration with `eshost-cli`\n\n[`eshost-cli`](https://github.com/bterlson/eshost-cli) makes it easy to run and compare code in all JavaScript engines that `jsvu` installs.\n\nFirst, install `eshost-cli`:\n\n```sh\nnpm install -g eshost-cli\n```\n\nThen, either automatically configure `jsvu`-installed hosts:\n\n```sh\neshost --configure-jsvu\n```\n\n…or tell `eshost-cli` where `jsvu` installs each JavaScript engine following the instructions below.\n\n### Linux/Mac\n\n```sh\neshost --add 'GraalJS' graaljs ~/.jsvu/bin/graaljs\neshost --add 'JavaScriptCore' jsc ~/.jsvu/bin/javascriptcore\neshost --add 'QuickJS' qjs ~/.jsvu/bin/quickjs\neshost --add 'SpiderMonkey' jsshell ~/.jsvu/bin/spidermonkey\neshost --add 'V8 --harmony' d8 ~/.jsvu/bin/v8 --args '--harmony'\neshost --add 'V8' d8 ~/.jsvu/bin/v8\neshost --add 'XS' xs ~/.jsvu/bin/xs\n```\n\n### Windows\n\n```bat\neshost --add \"GraalJS\" graaljs \"%USERPROFILE%\\.jsvu\\bin\\graaljs.cmd\"\neshost --add \"JavaScriptCore\" jsc \"%USERPROFILE%\\.jsvu\\bin\\javascriptcore.cmd\"\neshost --add \"SpiderMonkey\" jsshell \"%USERPROFILE%\\.jsvu\\bin\\spidermonkey.cmd\"\neshost --add \"V8 --harmony\" d8 \"%USERPROFILE%\\.jsvu\\bin\\v8.cmd\" --args \"--harmony\"\neshost --add \"V8\" d8 \"%USERPROFILE%\\.jsvu\\bin\\v8.cmd\"\neshost --add \"XS\" xs \"%USERPROFILE%\\.jsvu\\bin\\xs.cmd\"\n```\n\nThat’s it! You can now run code snippets in all those engines with a single command:\n\n```sh\neshost -e 'new RegExp(\"\\n\").toString()' # https://crbug.com/v8/1982\n\neshost -e '(function maxCallStackSize() { try { return 1 + maxCallStackSize(); } catch (_) { return 1; }}())'\n\neshost -e 'Date.parse(\"1 Octopus 2018\")'\n```\n\n## Integration with non-interactive environments\n\nOn your personal devices, the only command you’ll ever need is `jsvu` as described above. There are no command-line flags to remember. 👋🏻\n\nHowever, there are use cases for running jsvu within non-interactive environments (e.g. as part of continuous integration), where it’s desirable to bypass the initial `jsvu` prompt asking to confirm your operating system, architecture, and the list of JavaScript engines to install. Here’s how to do that:\n\n```sh\njsvu --os=linux64 --engines=all\n# Equivalent to:\njsvu --os=linux64 --engines=graaljs,hermes,javascriptcore,quickjs,spidermonkey,v8,xs\n```\n\nIf the operating system and architecture are not known in advance, the `--os=default` flag attempts to guess the correct value from the running environment. This might not be right for example if running a 32-bit Node.js process on a 64-bit machine.\n\nNote that `--engines=all` does not install the `v8-debug` binaries.\n\n## Installing specific versions\n\njsvu also supports installing specific versions alongside the main engine binaries (which it keeps up to date). Here’s an example:\n\n```sh\njsvu v8@7.2.502\n```\n\nBinaries installed using this method are named `${BINARY}-${VERSION}`, so that the above example installs a binary named `v8-7.2.502`. This way, there’s never any conflict with the main `v8` binary, which jsvu can keep up to date.\n\nThis feature works for all the supported engines:\n\n```sh\njsvu graaljs@20.2.0\njsvu hermes@0.6.0\njsvu javascriptcore@242640\njsvu quickjs@2019-08-18\njsvu spidermonkey@66.0b13\njsvu v8@7.2.502\njsvu v8-debug@7.1.302\njsvu xs@8.7.0\n```\n\nIf you pass in an invalid version number, or if the JavaScript engine creators don’t provide a precompiled binary for that specific version, jsvu shows an error.\n\nAs a shorthand, for `v8` and `v8-debug` builds, jsvu can even figure out the last known good revision within a [milestone](https://v8.dev/docs/version-numbers). To install the latest available V8 v7.2.x for example, run:\n\n```sh\njsvu v8@7.2\n# jsvu figures out that this means v7.2.502, and then installs that version.\n```\n\n## Security considerations\n\n_jsvu_ avoids the need for `sudo` privileges by installing everything in `~/.jsvu/bin` rather than, say, `/usr/bin`.\n\n_jsvu_ downloads files over HTTPS, and only uses URLs that are controlled by the creators of the JavaScript engine or, in the case of JavaScriptCore on Linux, the port maintainers.\n\n## For maintainers\n\n### How to publish new releases\n\n1. On the `main` branch, bump the version number in `package.json`:\n\n    ```sh\n    npm version patch -m 'Release v%s'\n    ```\n\n    Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/).\n\n    Note that this produces a Git commit + tag.\n\n1. Push the release commit and tag:\n\n    ```sh\n    git push && git push --tags\n    ```\n\n    Our CI then automatically publishes the new release to npm.\n\n## Author\n\n[Mathias Bynens](https://mathiasbynens.be/) ([@mathias](https://twitter.com/mathias))\n","publish_time":1733315803223,"_cnpm_publish_time":1733315803223,"dist-tags":{"latest":"3.0.6"}}