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

chore: replace esno with tsx, migrate release script and playground to TypeScript #29

Merged
merged 1 commit into from
Feb 22, 2024
Merged

Conversation

wojtekmaj
Copy link
Contributor

  • Replaces esno with tsx. Quoting esno's own README:

    "From v0.15, esno is essentially an alias of tsx, with automated CJS/ESM mode and caching.".

    • There are no benefits of caching here since we're only parsing one TS file at a time.
    • Updated tsx version (now primary, not secondary dev dependency) uses same esbuild version as Vite, reducing the number of dependencies.
  • Migrates release script to TypeScript

    • require() is dead!
    • Minimal changes were required
  • Migrates playground to TypeScript

    • Set "type" to "module" - no more deprecated CJS Vite API warning!
    • Removed setupCounter(document.querySelector('#counter')) leftover - neither #counter or setupCounter function were present.

…o TypeScript

* Replaces esno with tsx. Quoting esno: "From v0.15, esno is essentially an alias of tsx, with automated CJS/ESM mode and caching.".
  * There are no benefits of caching here since we're only parsing one TS file at a time.
  * Updated tsx version uses same esbuild version as Vite, reducing the number of dependencies.
* Migrates release script to TypeScript
  * require() is dead!
  * Minimal changes were required
* Migrates playground to TypeScript
  * Set "type" to "module" - no more deprecated CJS Vite API warning!
  * Removed "setupCounter(document.querySelector('#counter'))" leftover - neither #counter or setupCounter function were present.
Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning this up! This looks great to me. I suppose at one point we also want to migrate the release script to something like: https://github.com/vitejs/vite-plugin-react/blob/40513235fb563041e757182f8d62ace8caa5a4e6/scripts/release.ts

@wojtekmaj
Copy link
Contributor Author

owen-wilson-wow-marley-and-me

That would be sweet!

In the meantime, I hope you'll enjoy this at least for a short while :D

@patak-dev patak-dev merged commit 5587f2c into vitejs:main Feb 22, 2024
1 check passed
@wojtekmaj wojtekmaj deleted the kill-js branch February 22, 2024 17:48
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.

3 participants