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

Add support for TypeScript config files (.size-limit.ts, .size-limit.mts, .size-limit.cts) #355

Merged
merged 28 commits into from
Mar 13, 2024

Conversation

aryaemami59
Copy link
Contributor

@aryaemami59 aryaemami59 commented Mar 12, 2024

This PR:

  • Adds jiti as a dependency.
  • Adds support for loading TypeScript config files (.size-limit.ts, .size-limit.mts, .size-limit.cts).
  • Adds fixtures to test every single file extension/module type combo to make sure the library is fully capable of handling different configuration flles.
  • Test performance to make sure extra overhead was not accumulated.
  • Adds unit tests to test edge cases.

packages/size-limit/index.d.ts Outdated Show resolved Hide resolved
@ai
Copy link
Owner

ai commented Mar 12, 2024

You may want to add *.d.ts file to c8 config to move it from coverage check

@ai ai marked this pull request as ready for review March 13, 2024 15:46
@ai ai merged commit b36e823 into ai:main Mar 13, 2024
3 checks passed
@ai
Copy link
Owner

ai commented Mar 13, 2024

Thanks. Released in 11.1.

@aryaemami59 aryaemami59 deleted the support-ts-config-files branch March 13, 2024 16:16
@aryaemami59
Copy link
Contributor Author

@ai Awesome thank you so much!

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.

2 participants