Commit Graph

4 Commits

Author SHA1 Message Date
davidot
7cbf4b90e8 LibJS: Implement ImportCall and HostImportModuleDynamically
This allows us to load modules from scripts.
This can be dangerous as it can load arbitrary files. Because of that it
fails and throws by default. Currently, only js and JavaScriptTestRunner
enable the default hook.

This also adds tests to test-js which test module code. Because we
form a spec perspective can't "enter" a module this is the easiest way
to run tests without having to modify test-js to have special cases for
modules.
To specify modules in test-js we use the extension '.mjs' this is to
ensure the files are not executed. We do still want to lint these files
so the prettier scripts have changed to look for '.mjs' files as well.
2022-01-22 01:21:18 +00:00
Jonathan Turner
0bf5669ba3
Meta: Get building on NixOS (#5005) 2021-01-22 17:44:05 +01:00
Andrew Kaster
9e5aa6f794 Meta: Only complain about linter tools if relevant files have changed 2021-01-10 16:39:21 +01:00
Linus Groh
ee719c23d4 Meta: Add lint-prettier.sh
This is a script similar to the clang-format one to ensure prettier
formatting of most JavaScript files.
2020-12-27 21:25:27 +01:00