Conversation
✅ Deploy Preview for fakerjs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #3558 +/- ##
=======================================
Coverage 98.88% 98.88%
=======================================
Files 886 886
Lines 3062 3062
Branches 540 556 +16
=======================================
Hits 3028 3028
Misses 30 30
Partials 4 4 🚀 New features to boost your workflow:
|
|
I'll need to verify that this build works as expected using the playground. Might take some time, as it doesn't have any priority for me right now. |
Sure, take your time. This is not a breaking change and can theoretically merged any time. I use it already in unuse and here I checked it in the preview docs console. |
c5533ae to
d676f11
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the build toolchain from tsup to tsdown, a Rust-based rewrite of tsup using VoidZero rolldown. The migration aims to improve build performance (from 11-12s to 7s locally, 8s to 5s in CI) while maintaining equivalent functionality.
- Replaces tsup configuration with tsdown configuration using simplified entry patterns
- Updates package.json scripts and dependencies to use tsdown instead of tsup
- Cleans up package.json exports structure by removing redundant nested "default" objects
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tsup.config.ts | Removes the existing tsup configuration file |
| tsdown.config.ts | Adds new tsdown configuration with simplified glob patterns and publint integration |
| package.json | Updates build scripts, dependencies, and cleans up exports structure |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
|
It took some time - sorry about that. Multiple things:
@Shinigami92 are you up to the task? |
|
Yes, can look into that. |
d676f11 to
18a3919
Compare
|
@xDivisionByZerox updated everything
I'm not sure if you e.g. forget to clean something or not, however, tsdown is checking the exports field with publint and on my machine everything looks fine 🤔 |
You are right. I honestly can't tell you what the problem was (invalid dependency cache, legacy artifacts or whatever) - i can now get the project to build on my machine as well. I'm running into the next problem, tho. I cannot get the CJS (Jest) playground to run probably with a locally linked dependency. You might want to give it a try, because I'm currently at my limit with this jest configuration nonsense... |
| "types": "./dist/locale/*.d.ts", | ||
| "default": "./dist/locale/*.js" |
There was a problem hiding this comment.
I assume this change originates from the removed CJS support?
|
I played a bit with the bundler options for #3748 . And it looks like adding https://rolldown.rs/reference/OutputOptions.comments Also if I interpret the OP correctly, then tsdown produces smaller bundle sizes either way, so I will refrain from analysing too deeply why a particular import ended up in the final bundle or not. We probably should add a tsdown project to our playground to help comparing final vite/tsup/tsdown builds with each other. We might be able to put them all in one project and just call them with different aliases e.g. |
|
@Shinigami92 Can you estimate, when you have time to tackle the remaining tests? |
It's a bit hard for me to make promises, because I just landed in my new job, am a bit ill the last 4 days, managing hobbies like gaming and series. |
18a3919 to
22084c5
Compare
Hey @xDivisionByZerox & @ST-DDT, I updated this PR and tried it locally with faker-playground. |
|
Does it need the allowJs always or just with the tsdown build? |
I just wanted to respond with obviously tsdown only..., but then checked out everything manually and you are right 😲 our jest-cjs playground is just "broken"/miss-configured and fixed by adding this without it, it fails in both cases, with it it works green with both cases |
tsup got a rewrite in Rust using VoidZero rolldown named tsdown
this PR migrates from tsup to tsdown
performance for a build run on my windows PC is
pnpm run buildfrom 11s-12s to 7sGitHub Actions CI
tsdown size is also a bit smaller than tsup