{"id":15029525,"url":"https://github.com/googlechromelabs/jsvu","last_synced_at":"2025-05-13T19:09:41.993Z","repository":{"id":43579820,"uuid":"112520958","full_name":"GoogleChromeLabs/jsvu","owner":"GoogleChromeLabs","description":"JavaScript (engine) Version Updater","archived":false,"fork":false,"pushed_at":"2025-04-23T07:04:33.000Z","size":199,"stargazers_count":1958,"open_issues_count":28,"forks_count":93,"subscribers_count":48,"default_branch":"main","last_synced_at":"2025-04-27T05:43:01.721Z","etag":null,"topics":["installer","installer-script","javascript","javascript-engine"],"latest_commit_sha":null,"homepage":"https://mths.be/jsvu","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoogleChromeLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-11-29T19:53:47.000Z","updated_at":"2025-04-27T05:21:30.000Z","dependencies_parsed_at":"2023-11-24T10:44:12.090Z","dependency_job_id":"f0c72629-8df4-45eb-b20d-a02151da5a7c","html_url":"https://github.com/GoogleChromeLabs/jsvu","commit_stats":{"total_commits":168,"total_committers":24,"mean_commits":7.0,"dds":"0.18452380952380953","last_synced_commit":"7f5c1563fa38a57b524d0232755d491218482fb5"},"previous_names":[],"tags_count":69,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleChromeLabs%2Fjsvu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleChromeLabs%2Fjsvu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleChromeLabs%2Fjsvu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleChromeLabs%2Fjsvu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoogleChromeLabs","download_url":"https://codeload.github.com/GoogleChromeLabs/jsvu/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251094580,"owners_count":21535324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["installer","installer-script","javascript","javascript-engine"],"created_at":"2024-09-24T20:10:54.505Z","updated_at":"2025-04-27T05:43:05.061Z","avatar_url":"https://github.com/GoogleChromeLabs.png","language":"JavaScript","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 \u003cb\u003eJ\u003c/b\u003eava\u003cb\u003eS\u003c/b\u003ecript (engine) \u003cb\u003eV\u003c/b\u003eersion \u003cb\u003eU\u003c/b\u003epdater.\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` \u0026 `hermes-repl`  | ✅      | ✅         | ❌      | ✅               | ❌        | ✅        |\n| [**JavaScriptCore**][jsc] | `javascriptcore` or `jsc` | ✅      | ✅         | ❌      | ✅ \u003csup\u003e\\*\u003c/sup\u003e | ❌        | ✅        |\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\u003csup\u003e\\*\u003c/sup\u003e 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 \u0026\u0026 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","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglechromelabs%2Fjsvu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglechromelabs%2Fjsvu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglechromelabs%2Fjsvu/lists"}