wdio-docker-service icon indicating copy to clipboard operation
wdio-docker-service copied to clipboard

Update service to ESM and WDIO v8

Open dons20 opened this issue 2 years ago • 15 comments
trafficstars

Description

This started as a small experiment to make some changes locally to update the service. I figured it may be a good idea to update this to use ESM as well as Node v20 since it's the latest LTS at this time.

Leaving this up as a draft to get some initial thoughts. I'm not particularly opinionated as to the direction this should go either. Will need to do additional testing so that everything is compatible, but hopefully some of these changes help 🙂

Checklist

  • [ ] Unit/Integration test added (if applicable)
  • [ ] Documentation added/updated (wiki or md)
  • [x] Code style is consistent with the rest of the project

dons20 avatar Oct 31 '23 06:10 dons20

@dons20 thanks for taking a stab at it. Happy to help if needed.

christian-bromann avatar Oct 31 '23 16:10 christian-bromann

Haven't forgotten about this one, I had some major PC issues. SSD failed but I got it replaced. Will have some changes out soon again.

dons20 avatar Nov 20 '23 05:11 dons20

Hey @dons20 , thanks for all your work so far! Let me know when you think this is ready for review!

christian-bromann avatar Dec 19 '23 19:12 christian-bromann

Will do, I only have to retest the test directory with these new changes. Everything else should be done

dons20 avatar Dec 20 '23 21:12 dons20

Back at it, pushed some of my changes, and I'll have some more incoming soon. Trying to get the local build and tests working fully.

dons20 avatar Jan 22 '24 04:01 dons20

Awesome, looking forward to the changes. Let me know when I can review something.

christian-bromann avatar Jan 22 '24 05:01 christian-bromann

I'm pretty happy with the results so far, and I think most of this can start to be reviewed, but you can let me know if I should take this out of draft yet. I still have these items on my todo list:

  • [ ] Fixing failing unit tests and verify coverage is displaying correctly
  • [ ] Fixing WDIO config so that it connects in its integration tests
  • [ ] Updating CJS directory to output the necessary cjs module (I took inspiration from some other services which implemented this such as wdio-nuxt-service)
  • [ ] Verifying output from build

dons20 avatar Jan 24 '24 15:01 dons20

Thanks for reviewing! Will go through the comments shortly

dons20 avatar Jan 24 '24 19:01 dons20

@dons20 any updates or anything I can help with?

christian-bromann avatar Feb 22 '24 03:02 christian-bromann

No updates yet, had a couple of busy weeks but I will make some updates in the coming days 🤞🏾

dons20 avatar Feb 27 '24 23:02 dons20

Would it help if I separated out the upgrade from v7 to v8 to fix the CI pipeline added in #132?

seanpoulter avatar Mar 06 '24 22:03 seanpoulter

@seanpoulter If that is something you can manage in a short period of time, then feel free to

dons20 avatar Mar 07 '24 18:03 dons20

It's probably no surprise but the update from v7 to v8 requires loading the ES Module @wdio/logger from the CJS code. I don't know how to do that as a concise change. :facepalm:

Let me know if there's anything else I can do to help.

seanpoulter avatar Mar 09 '24 04:03 seanpoulter

Totally understand. I'm pushing some changes within this weekend, hopefully it will advance this PR much further so it can cover all the concerns.

dons20 avatar Mar 09 '24 16:03 dons20

So recently I've been working on the unit tests as they were tricky to get started. After much debugging I had realized that one file was blocking the others from executing. Once I commented some of those tests, the others started running and I was able to fix the failing ones. There are about 20 to resolve on the unit tests side.

I'll continue chipping away at it in the coming days whenever I can find time. Just keeping everyone in the loop.

dons20 avatar Mar 17 '24 23:03 dons20