Skip to content

How to use forks of eshost in eshost-cli #146

@leotm

Description

@leotm

test262-fyi/eshost example (shoutout @CanadaHonk)

➜  gh repo clone bterlson/eshost-cli && cd eshost-cli
# use latest commit: github.com/test262-fyi/eshost/commit/84df3ecc26788cd49dc6be53451336624db98047
➜  sed -i '' 's/"eshost": "\^9.0.0"/"eshost": "git+https:\/\/github.com\/test262-fyi\/eshost.git#84df3ecc26788cd49dc6be53451336624db98047"/' package.json
➜  sed -i '' 's/"version": "9.0.0"/"version": "9.0.0-alpha"/' package.json
➜  npm pack
➜  npm uninstall -g eshost-cli
➜  npm install -g eshost-cli-9.0.0-alpha.tgz
➜  cd .. && rm -rf eshost-cli # good neighbours clean up
➜  npm list -g eshost-cli # eshost-cli@9.0.0-alpha 🎉

(or to keep the repo locally for monkey patching via symlink)

➜  gh repo clone bterlson/eshost-cli && cd eshost-cli
➜  sed -i '' 's/"eshost": "\^9.0.0"/"eshost": "git+https:\/\/github.com\/test262-fyi\/eshost.git#84df3ecc26788cd49dc6be53451336624db98047"/' package.json
➜  sed -i '' 's/"version": "9.0.0"/"version": "9.0.0-alpha"/' package.json
➜  npm uninstall -g eshost-cli
➜  npm install -g # symlink to local dir
➜  npm list -g eshost-cli # eshost-cli@9.0.0-alpha 🎉

Hermes now works (upstream fix awaiting review/merge)

➜  eshost -e "42"
#### engine262
42

#### hermes
42

#### javascriptcore
42

#### spidermonkey
42

#### v8
42

#### xs
42

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions