![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
eshost-cli
Advanced tools
eshost-cli makes it easy to run and compare ECMAScript code uniformly across a number of runtimes. Support for runtimes is provided by the library eshost. Every host is initialized with the eshost runtime API available which provides a uniform way to print, create realms, and eval code.
See eshost's supported hosts for a list of hosts, download/build locations, and other information.
See --help
output for the full details. Basic usage:
eshost --add <host name> <host type> <host path> --args <optional arguments>
.esvu
-installed hosts using eshost --configure-esvu
.jsvu
-installed hosts using eshost --configure-jsvu
.-e
: eshost -e "[1,2,3].length"
.-x
: eshost -x "foo = 42; print(foo);"
eshost path/to/script.js
.-m
:
eshost -me "foo = 42"
(this example should result in errors!)eshost -mx "foo = 42; print(foo);"
(this example should result in errors!).mjs
extension: eshost file.mjs
; or by using the -m
option: eshost -m file.js
Manually, using esvu
:
npm install esvu -g;
export PATH="${HOME}/.esvu/bin:${PATH}";
esvu --engines=all;
export ESHOST_PATH_CHAKRA=`which chakra`;
export ESHOST_PATH_ENGINE262=`which engine262`;
export ESHOST_PATH_HERMES=`which hermes`;
export ESHOST_PATH_JAVASCRIPTCORE=`which javascriptcore`;
export ESHOST_PATH_QUICKJS=`which qjs-for-eshost`;
export ESHOST_PATH_SPIDERMONKEY=`which spidermonkey`;
export ESHOST_PATH_V8=`which v8`;
export ESHOST_PATH_XS=`which xs`;
npm install -g eshost-cli;
eshost --add "chakra" ch $ESHOST_PATH_CHAKRA;
eshost --add "engine262" engine262 $ESHOST_PATH_ENGINE262;
eshost --add "hermes" hermes $ESHOST_PATH_HERMES;
eshost --add "javascriptcore" jsc $ESHOST_PATH_JAVASCRIPTCORE;
eshost --add "quickjs" qjs $ESHOST_PATH_QUICKJS;
eshost --add "spidermonkey" jsshell $ESHOST_PATH_SPIDERMONKEY;
eshost --add "v8" d8 $ESHOST_PATH_V8;
eshost --add "xs" xs $ESHOST_PATH_XS;
Manually, using jsvu
:
# Engine262
git clone https://github.com/devsnek/engine262.git;
cd engine262 && npm install && npm run build && npm link;
cd ~/
# Everything else...
npm install -g jsvu;
export PATH="${HOME}/.jsvu:${PATH}";
jsvu --engines=chakra,hermes,javascriptcore,spidermonkey,v8,xs
export ESHOST_PATH_CHAKRA=`which chakra`;
export ESHOST_PATH_ENGINE262=`which engine262`;
export ESHOST_PATH_HERMES=`which hermes`;
export ESHOST_PATH_JAVASCRIPTCORE=`which javascriptcore`;
export ESHOST_PATH_QUICKJS=`which qjs-for-eshost`;
export ESHOST_PATH_SPIDERMONKEY=`which spidermonkey`;
export ESHOST_PATH_V8=`which v8`;
export ESHOST_PATH_XS=`which xs`;
npm install -g eshost-cli;
eshost --add "chakra" ch $ESHOST_PATH_CHAKRA;
eshost --add "engine262" engine262 $ESHOST_PATH_ENGINE262;
eshost --add "hermes" hermes $ESHOST_PATH_HERMES;
eshost --add "javascriptcore" jsc $ESHOST_PATH_JAVASCRIPTCORE;
eshost --add "quickjs" qjs $ESHOST_PATH_QUICKJS;
eshost --add "spidermonkey" jsshell $ESHOST_PATH_SPIDERMONKEY;
eshost --add "v8" d8 $ESHOST_PATH_V8;
eshost --add "xs" xs $ESHOST_PATH_XS;
if [ "$(uname)" = Darwin ]; then wget https://bellard.org/quickjs/quickjs-2021-03-27.tar.xz; tar -xf quickjs-2021-03-27.tar.xz;
cd quickjs-2021-03-27 && make; if [ -f "$PWD/run-test262" ]; then ln -s $PWD/run-test262 /usr/local/bin/qjs-for-eshost; fi; fi;
Manually, using jsvu
:
git clone https://github.com/devsnek/engine262.git
cd .\engine262
npm install
npm run build
npm link
set NPM_GLOBAL_MODULE_PATH=%APPDATA%\npm\
set PATH=%PATH;%NPM_GLOBAL_MODULE_PATH%
where engine262
npm install jsvu
jsvu --os=win64 --engines="chakra,spidermonkey,v8,xs"
set PATH=%PATH;%USERPROFILE%\.jsvu\
set ESHOST_CHAKRA=%USERPROFILE%\.jsvu\chakra.cmd
set ESHOST_ENGINE262=%NPM_GLOBAL_MODULE_PATH%\engine262.cmd
set ESHOST_SPIDERMONKEY=%USERPROFILE%\.jsvu\spidermonkey.cmd
set ESHOST_V8=%USERPROFILE%\.jsvu\v8.cmd
set ESHOST_XS=%USERPROFILE%\.jsvu\xs.cmd
npm install -g eshost-cli;
eshost --add "chakra" ch %ESHOST_CHAKRA%
eshost --add "engine262" engine262 %ESHOST_ENGINE262%
eshost --add "spidermonkey" jsshell %ESHOST_SPIDERMONKEY%
eshost --add "v8" d8 %ESHOST_V8%
eshost --add "xs" xs %ESHOST_XS%
$ npm install -g eshost-cli
$ eshost --help
$ eshost --add <name> <type> <path to host executable> --args <optional arguments>
$ eshost -e "Map.length"
#### chakra
0
#### engine262
0
#### javascriptcore
0
#### spidermonkey
0
#### v8
0
#### xs
0
$ eshost --configure-esvu --esvu-prefix esvu
$ eshost --tags esvu-web -itsx "let a = 40+2; print(a)"
## Source
let a = 40+2; print(a)
┌──────────┬────┐
│ esvu-ch │ 42 │
│ esvu-jsc │ │
│ esvu-sm │ │
│ esvu-v8 │ │
└──────────┴────┘
$ eshost --configure-jsvu --jsvu-prefix jsvu
$ eshost --tags jsvu-web -itsx "let a = 40+2; print(a)"
## Source
let a = 40+2; print(a)
┌──────────┬────┐
│ jsvu-ch │ 42 │
│ jsvu-jsc │ │
│ jsvu-sm │ │
│ jsvu-v8 │ │
└──────────┴────┘
Files containing the imported modules must be located in the same directory that the "entry point" file is located. Please read and accept the following examples.
Executing a program with module dependencies, where the entry point is a ".mjs" file:
mkdir entry-point-mjs;
cd entry-point-mjs;
echo "export var a = 1;" >> export.mjs
echo "import {a} from './export.mjs'; print(a);" >> import.mjs
eshost --host="engine262,javascriptcore,spidermonkey,v8,xs" import.mjs
#### engine262
1
#### javascriptcore
1
#### spidermonkey
1
#### v8
1
#### xs
1
Executing a program with module dependencies, where the entry point is a ".js" file (Notice the use of the -m
flag, this is required for ".js" files):
mkdir entry-point-js;
cd entry-point-js;
echo "export var a = 1;" >> export.mjs
echo "import {a} from './export.mjs'; print(a);" >> import.js
eshost --host="engine262,javascriptcore,spidermonkey,v8,xs" -m import.js
#### engine262
1
#### javascriptcore
1
#### spidermonkey
1
#### v8
1
#### xs
1
Executing a multi-line program with module dependencies is not yet supported. Support is in progress.
You can --list
, --add
, --edit
, and --delete
hosts. Adding a host requires a name, type, and path to the runtime executable. You can optionally pass arguments using --args
. The same host can be added multiple times with different --args
which makes it easy to compare the output of runtimes given different options (e.g. by turning language features on and off).
Console hosts are either provided by the browser vendors or, more likely, built from source. The jsvu
CLI makes it easy to install and update the most common JavaScript engine binaries.
Host types are those provided by eshost, namely:
Host Type | All Acceptable type Values |
---|---|
ChakraCore | chakra , ch |
Engine262 | engine262 |
JavaScriptCore | javascriptcore , jsc |
Nashorn | nashorn |
Node | node |
QuickJS | qjs 1 |
SpiderMonkey | jsshell , spidermonkey , sm |
V8 | d8 , v8 |
XS | xs |
~/.jsvu/quickjs
WITH ESHOST-CLI. The main quickjs
binary does not support the eshost runtime API. For more, see Install and Configure Hosts.Host Type | All Acceptable type Values |
---|---|
chrome | chrome |
edge | edge |
firefox | firefox |
safari | safari |
FAQs
Run scripts in any ECMAScript host
The npm package eshost-cli receives a total of 3 weekly downloads. As such, eshost-cli popularity was classified as not popular.
We found that eshost-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.