Skip to content

Update to correct exports for CJS#10199

Merged
christian-bromann merged 1 commit intowebdriverio:mainfrom
DirkoOdendaal:bugfix/properly-export-in-commonjs
Apr 17, 2023
Merged

Update to correct exports for CJS#10199
christian-bromann merged 1 commit intowebdriverio:mainfrom
DirkoOdendaal:bugfix/properly-export-in-commonjs

Conversation

@DirkoOdendaal
Copy link
Contributor

@DirkoOdendaal DirkoOdendaal commented Apr 17, 2023

Proposed changes

Fixes #10198

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Further comments

Update to using correct exports for CJS.

Reviewers: @webdriverio/project-committers

@DirkoOdendaal
Copy link
Contributor Author

@christian-bromann So I just tested the wdio/cli CJS setup that I made last week... and I did not do the exports correct. This should fix that issue. Sorry about that.

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to prevent regression on this again, can we add a test to https://github.com/webdriverio/webdriverio/tree/main/e2e/interop where files are loaded in CJS context? Just import Launcher and run and see if they are from type function

@christian-bromann christian-bromann added the PR: Bug Fix 🐛 PRs that contain bug fixes label Apr 17, 2023
Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will go ahead and add this interop test myself as I am wanting to run a new release.

Thanks for the fix 🎉

@christian-bromann christian-bromann merged commit a0bbaea into webdriverio:main Apr 17, 2023
christian-bromann added a commit that referenced this pull request Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Bug Fix 🐛 PRs that contain bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: @wdio/cli CJS build SyntaxError

2 participants