k6
k6 copied to clipboard
PoC ESM support
This is not a final PR it is here mostly to discuss whether the changes presented here are satisfying our needs.
This PR will need to be merged after the goja PR (to be done) with the ESM support is merged.
TODO:
- [ ] A lot more tests especially with multiple commonjs and not commonjs modules
- [ ] Support go modules that are Cyclic Module Records and them requesting (at least) other go modules. This is needed for k6/ws -> k6/http.CookieJar
- [ ] Support import.meta and dynamic import - the later likely will not be enabled by default in k6 at least for now.
- [ ] Cleaning up and fixing
require
andopen
as they need GetActiveScriptOrModule from the specification to be written correctly ;(.