Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support xs file.js instead of xs -s file.js #2

Open
mathiasbynens opened this issue Jun 28, 2019 · 1 comment
Open

Support xs file.js instead of xs -s file.js #2

mathiasbynens opened this issue Jun 28, 2019 · 1 comment

Comments

@mathiasbynens
Copy link

All other JS engines provided by jsvu support running scripts by simply passing a file name with no flags:

v8 file.js
chakra file.js
spidermonkey file.js
jsc file.js

However, xs needs the -s flag:

xs -s file.js

...because "without -e, -m or -s, strings are paths to test262 cases or directories".

Since the common case for external users seems to be running scripts, and not tests, can this be reconsidered? Specifically, I'd suggest the following changes:

  • xs file.js defaults to an implicit -s, and runs file.js as a script
  • xs file.mjs defaults to an implicit -m, and runs file.mjs as a module (matching V8, JSC, and Node.js)
  • a new flag is added to cover the Test262 cases/directories use case

WDYT?

@acutmore
Copy link

This seems to be working now ./xs now prints that the cli args are only considered paths to test262 tests if ../harness exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants