-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
tsConfigPath in wdio.conf #14664
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
tsConfigPath in wdio.conf #14664
Conversation
ce756ba to
25f8e98
Compare
christian-bromann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
christian-bromann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we reinstate docs around this option as well? I suggest to add some docs:
create-wdio
eslint-plugin-wdio
@wdio/allure-reporter
@wdio/appium-service
@wdio/browser-runner
@wdio/browserstack-service
@wdio/cli
@wdio/concise-reporter
@wdio/config
@wdio/cucumber-framework
@wdio/dot-reporter
@wdio/firefox-profile-service
@wdio/globals
@wdio/jasmine-framework
@wdio/json-reporter
@wdio/junit-reporter
@wdio/lighthouse-service
@wdio/local-runner
@wdio/logger
@wdio/mocha-framework
@wdio/protocols
@wdio/repl
@wdio/reporter
@wdio/runner
@wdio/sauce-service
@wdio/shared-store-service
@wdio/smoke-test-cjs-service
@wdio/smoke-test-reporter
@wdio/smoke-test-service
@wdio/spec-reporter
@wdio/static-server-service
@wdio/sumologic-reporter
@wdio/testingbot-service
@wdio/types
@wdio/utils
@wdio/webdriver-mock-service
@wdio/xvfb
webdriver
webdriverio
commit: |
Sure, is there anything particular that you want added? This is what's there currently: webdriverio/website/docs/Configuration.md Lines 532 to 539 in 25f8e98
webdriverio/website/docs/ConfigurationFile.md Lines 259 to 263 in 25f8e98
webdriverio/website/docs/TypeScript.md Lines 16 to 20 in 25f8e98
I'll have a look at those failures on the windows pipeline. It's something to do with the path separators being different. |
25f8e98 to
2b98fba
Compare
christian-bromann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
christian-bromann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sh41 it seems like some of the unit tests are legitimately failing on Windows. Mind taking a look?
Sure! I'll need to get the tests running in Windows so I can see what's going on, so might take a few days. |
43450a7 to
2bbc262
Compare
@christian-bromann I've updated the paths to be consistent on Windows and the pipeline now successfully passes in my own fork, so hopefully this is now good to go again. |
christian-bromann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
christian-bromann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sh41 it seems like the e2e tests are failing, mind taking a look?
|
Hi @christian-bromann, I was running node v24 locally which is able to handle TS files without any additional transpiling 🤦. I've now got v20.11.1, so I will rework the PR to work with that version. |
2bbc262 to
76dcc33
Compare
|
Commit 76dcc33 adds jiti as a dependency to the |
76dcc33 to
13dd1b9
Compare
|
HI @christian-bromann, the testing workflow passed. I received a failure notice for the continuous release workflow. My branch had merge conflicts with main so I've rebased and pushed again. Is the CR workflow something that I need to look at? |
|
Hi @christian-bromann, I've merged main to pick up #14748 which will hopefully resolve the failing workflow issue. 👍 |
…ing TSX_TSCONFIG_PATH
Enables parsing of TS config files, in order to read the tsConfig setting and run with TS support enabled.
24c0381 to
9372b64
Compare
christian-bromann
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
|
Hey sh41 👋 Thank you for your contribution to WebdriverIO! Your pull request has been marked as an "Expensable" contribution. We've sent you an email with further instructions on how to claim your expenses from our development fund. We are looking forward to more contributions from you in the future 🙌 Have a nice day, |
This reverts most of commit 6173b79. The introduction of jiti caused significant regressions for users with complex `wdio.conf.ts` files, as reported in webdriverio#14801. This change restores the previous import mechanism to resolve these issues. It retains the attempt to load the config file and parse the tsConfigPath setting from it, with a cache-busting mechanism to prevent Node from caching failed imports. Documentation has been updated to explain the limitations of this configuration method. Fixes webdriverio#14801
This reverts most of commit 6173b79. The introduction of jiti caused significant regressions for users with complex `wdio.conf.ts` files, as reported in webdriverio#14801. This change restores the previous import mechanism to resolve these issues. It retains the attempt to load the config file and parse the tsConfigPath setting from it, with a cache-busting mechanism to prevent Node from caching failed imports. Documentation has been updated to explain the limitations of this configuration method. Fixes webdriverio#14801
This reverts most of commit 6173b79. The introduction of jiti caused significant regressions for users with complex `wdio.conf.ts` files, as reported in webdriverio#14801. This change restores the previous import mechanism to resolve these issues. It retains the attempt to load the config file and parse the tsConfigPath setting from it, with a cache-busting mechanism to prevent Node from caching failed imports. Documentation has been updated to explain the limitations of this configuration method. Fixes webdriverio#14801
This reverts most of commit 6173b79. The introduction of jiti caused significant regressions for users with complex `wdio.conf.ts` files, as reported in webdriverio#14801. This change restores the previous import mechanism to resolve these issues. It retains the attempt to load the config file and parse the tsConfigPath setting from it, with a cache-busting mechanism to prevent Node from caching failed imports. Documentation has been updated to explain the limitations of this configuration method. Fixes webdriverio#14801
This reverts most of commit 6173b79. The introduction of jiti caused significant regressions for users with complex `wdio.conf.ts` files, as reported in webdriverio#14801. This change restores the previous import mechanism to resolve these issues. It retains the attempt to load the config file and parse the tsConfigPath setting from it, with a cache-busting mechanism to prevent Node from caching failed imports. Documentation has been updated to explain the limitations of this configuration method. Fixes webdriverio#14801
* 🐛⏪️ revert: "tsConfigPath in wdio.conf (#14664)" This reverts most of commit 6173b79. The introduction of jiti caused significant regressions for users with complex `wdio.conf.ts` files, as reported in #14801. This change restores the previous import mechanism to resolve these issues. It retains the attempt to load the config file and parse the tsConfigPath setting from it, with a cache-busting mechanism to prevent Node from caching failed imports. Documentation has been updated to explain the limitations of this configuration method. Fixes #14801 * ✅ Resolve vitest "Please remember to await the assertion" warnings An example of the warning in the test logs: ``` Promise returned by `expect(actual).rejects.toThrowError(expected)` was not awaited. Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. Please remember to await the assertion. at /home/steve/dev/webdriverio/packages/wdio-shared-store-service/tests/client.test.ts:38:43 ``` * ✅ Update mock path to match changes in webdriverio/guinea-pig#9 * ✅ Attempt to avert flaky tests by increasing the timeout. * ✅ limit the concurrent instances to one less than the number of CPUs * ✅ use `beforeEach` rather than `before` to give the tests a known starting state * ✅ disable infobars in the browser so that the viewport size is more predictable. * ✅ await async onComplete in isRunning test
Proposed changes
As per #14655 (comment) this PR is the start of an attempt to reinstate the tsConfigPath configuration file property. At the moment it is silently ignored.
This initial implementation is a naïve attempt to create tests that cover the functionality. I was surprised to find that TS config files are correctly parsed by the tests without needing to perform any additional gymnastics with jiti or similar.
Types of changes
Checklist
Backport Request
//: # (The current
mainbranch is the development branch for WebdriverIO v9. If your change should be released to the current major version of WebdriverIO (v8), please raise another PR with the same changes against thev8branch.)v9and doesn't need to be back-ported#XXXXXFurther comments
Reviewers: @webdriverio/project-committers