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

[💡 Feature]: ESM Compatibility #8306

Closed
11 of 14 tasks
christian-bromann opened this issue May 4, 2022 · 3 comments
Closed
11 of 14 tasks

[💡 Feature]: ESM Compatibility #8306

christian-bromann opened this issue May 4, 2022 · 3 comments
Milestone

Comments

@christian-bromann
Copy link
Member

christian-bromann commented May 4, 2022

Is your feature request related to a problem?

Our goal for v8 is to deliver WebdriverIO packages for more than just Node.js environments. As a first step, let's make WebdriverIO ESM compatible (for that see v8 branch). Next is to make all community packages compatible by moving them to ESM otherwise they can't be used in v8. The packages owned by this community are tracked here:

Describe the solution you'd like.

Make sure that all packages are exported and published in way to be used using CJS and ESM.

‼️ Attention ‼️

Anyone who likes us to support in this effort, just pick one of the packages above and help transform them into ESM. You can follow this example commit to get a sense of what needs to be changed. Also this: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c is a good resource.

Updates

  • 2022/07/05: it seems that the best tool to compile a hybrid modules is unbuild, I am currently adding this build step to the v8 branch - the only problem is what to do with modules that only support ESM
  • 2022/07/07: it turns out that there is absolutely no need to transpile WebdriverIO packages into CJS. When using the testrunner we can dynamically import the cli as ESM module and for the webdriverio, webdriver and devtools packages we can just provide a CJS shim and import the ESM version too.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@christian-bromann christian-bromann added this to the v8 milestone May 4, 2022
@christian-bromann christian-bromann added Expensable $25 💸 help wanted Issues that are free to take by anyone interested labels May 4, 2022
@christian-bromann christian-bromann added the Tracking 🗒 Tracking issues label Jun 29, 2022
@christian-bromann
Copy link
Member Author

With e970be9 we finalised the ESM transition of the core modules. It is not required for services and reporters to transition to ESM before the v8 release. Therefor we can close this and mark it as done 🎉

@christian-bromann christian-bromann removed help wanted Issues that are free to take by anyone interested Tracking 🗒 Tracking issues Expensable $25 💸 labels Jul 7, 2022
@Badisi
Copy link
Contributor

Badisi commented Jul 7, 2022

Well done !
Any chance to see it released under a "next" channel, so we can start playing with it ?

@christian-bromann
Copy link
Member Author

Any chance to see it released under a "next" channel, so we can start playing with it ?

Over the next days once the v8 build is green.

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