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

feat: added typescript testcaferc configuration file support #8039

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

Bayheck
Copy link
Collaborator

@Bayheck Bayheck commented Oct 11, 2023

Purpose

Describe the problem you want to address or the feature you want to implement.
Added support for TypeScript configuration file (testcaferc.ts) so TS code can be referenced in global hooks and similar functionality. However, defining options for testcaferc.ts compilation itself is only possible from CLI. We can define them using
--compiler-options. If no options are provided in CLI we use default compiler with default compilation options.

Approach

Describe how your changes address the issue or implement the desired functionality in as much detail as possible.
Added new methods in \src\configuration\testcafe-configuration.ts: _readTsConfigurationFileContent, _isTSConfiguration and _readConfigurationOptions.

Added new method in \src\compiler\test-file\formats\typescript\compiler.ts: compileConfiguration.

Inside testcafe-configuration.ts If config file is a ts config, then call _readTsConfigurationFileContent.

Also in \src\index.js pass compilerOptions to configuration.init().

Wrote tests for testing the above mentioned functionality inside \test\server\configuration-test.js

Provide a link to the existing issue(s), if any.
closes #7373

Pre-Merge TODO

  • Write tests for your proposed changes
  • Make sure that existing tests do not fail

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Oct 11, 2023
@Bayheck Bayheck temporarily deployed to CI October 11, 2023 14:32 — with GitHub Actions Inactive
@PavelMor25 PavelMor25 removed the STATE: Need response An issue that requires a response or attention from the team. label Oct 13, 2023
@Bayheck Bayheck temporarily deployed to CI October 13, 2023 15:53 — with GitHub Actions Inactive
@Bayheck Bayheck temporarily deployed to CI October 18, 2023 17:18 — with GitHub Actions Inactive
@Bayheck Bayheck temporarily deployed to CI October 21, 2023 17:10 — with GitHub Actions Inactive
@Bayheck Bayheck temporarily deployed to CI October 21, 2023 17:24 — with GitHub Actions Inactive
@Bayheck Bayheck temporarily deployed to CI October 21, 2023 17:35 — with GitHub Actions Inactive
@Bayheck Bayheck temporarily deployed to CI October 30, 2023 05:07 — with GitHub Actions Inactive
@Bayheck Bayheck temporarily deployed to CI October 30, 2023 05:23 — with GitHub Actions Inactive
Copy link
Collaborator

@aleks-pro aleks-pro left a comment

Choose a reason for hiding this comment

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

@lukas-zech-software
Copy link

is there any progress here?

We could really use this feature and everything in this PR seem Green and Approved.
Anything missing?

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Jan 24, 2024
@PavelMor25 PavelMor25 added STATE: Need response An issue that requires a response or attention from the team. and removed STATE: Need response An issue that requires a response or attention from the team. labels Jan 25, 2024
@Bayheck
Copy link
Collaborator Author

Bayheck commented Jan 25, 2024

@lukas-zech-software
We are not merging this PR since we think this feature still needs improvement. I cannot give you an ETA at this time since my predictions may not be accurate.

@Bayheck Bayheck removed the STATE: Need response An issue that requires a response or attention from the team. label Jan 25, 2024
@Jackman3005
Copy link

So excited for this!

@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Feb 21, 2024
@aleks-pro aleks-pro removed the STATE: Need response An issue that requires a response or attention from the team. label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for TypeScript configuration file
5 participants