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

Enable typescript support by default #4200

Closed
wants to merge 6 commits into from

Conversation

szkiba
Copy link
Contributor

@szkiba szkiba commented Jan 20, 2025

What?

Enable typescript support by default.

Why?

k6 v0.52.0 introduced experimental support for TypeScript as an opt-in feature. To enable this, users must specify experimental_enhanced as a compatibility mode when running the k6 run command.

After six months, this feature can now be regarded as stable and is set as the default for executing scripts. In contrast, the current default extended mode is available as an opt-out option.

Checklist

  • I have performed a self-review of my code.
  • I have added tests for my changes.
  • I have run linter locally (make lint) and all checks pass.
  • I have run tests locally (make tests) and all tests pass.
  • I have commented on my code, particularly in hard-to-understand areas.

Related PR(s)/Issue(s)

Closes #4194

@szkiba szkiba linked an issue Jan 20, 2025 that may be closed by this pull request
@szkiba szkiba marked this pull request as ready for review January 20, 2025 13:10
@szkiba szkiba requested a review from a team as a code owner January 20, 2025 13:10
@szkiba szkiba requested review from mstoykov and inancgumus and removed request for a team January 20, 2025 13:10
@andrewslotin andrewslotin requested review from oleiade and removed request for inancgumus January 20, 2025 13:12
Copy link
Contributor

@mstoykov mstoykov left a comment

Choose a reason for hiding this comment

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

The request changes is just so it doesn't get merged by accident.

This introduces 2 breaking changes:

  1. with removign experimental_enhanced as compatiblity mode it will break anyone who is using it, including any archives made with it.
  2. as Discussion about global and experimental_enhanced #3860 explained *enhanced doesn't alias global to globalThis and this is likely going to break even more scripts given the usage statistics we have.

Additionally as discussed in #3864 we kind of want to remove compatibility-mode now, arguably this should have never been part of it but separate option, but alas.

I would prefer if I take over this and remove the dependancy on compatibility-mode for this and just enable it by default. The question is do we add an option a kin to node to disable/enable this or is that not relevant as it only is enabled on files with .ts file extension?

@szkiba
Copy link
Contributor Author

szkiba commented Jan 24, 2025

Please go ahead. I would be happy if you would take it.

@mstoykov mstoykov mentioned this pull request Jan 28, 2025
5 tasks
@mstoykov
Copy link
Contributor

Closing in favor of #4292

@mstoykov mstoykov closed this Jan 29, 2025
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

Successfully merging this pull request may close these issues.

Enable TypeScript support by default
2 participants