Skip to content

chore: migrate to tsdown#1129

Merged
lishaduck merged 47 commits intomainfrom
tsdown
Jan 3, 2026
Merged

chore: migrate to tsdown#1129
lishaduck merged 47 commits intomainfrom
tsdown

Conversation

@lishaduck
Copy link
Copy Markdown
Member

@lishaduck lishaduck commented Dec 26, 2025

PR Checklist

Overview

Should still probably get split up...

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Dec 26, 2025

🦋 Changeset detected

Latest commit: 58e07df

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 24 packages
Name Type
@flint.fyi/plugin-performance Patch
@flint.fyi/plugin-spelling Patch
@flint.fyi/plugin-browser Patch
@flint.fyi/plugin-astro Patch
@flint.fyi/plugin-flint Patch
@flint.fyi/plugin-react Patch
@flint.fyi/plugin-solid Patch
@flint.fyi/comparisons Patch
@flint.fyi/plugin-next Patch
@flint.fyi/plugin-node Patch
@flint.fyi/plugin-nuxt Patch
@flint.fyi/rule-tester Patch
@flint.fyi/plugin-jsx Patch
@flint.fyi/ts-patch Patch
flint Patch
@flint.fyi/utils Patch
@flint.fyi/core Patch
@flint.fyi/json Patch
@flint.fyi/site Patch
@flint.fyi/text Patch
@flint.fyi/yaml Patch
@flint.fyi/cli Patch
@flint.fyi/md Patch
@flint.fyi/ts Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel bot commented Dec 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
flint Ready Ready Preview, Comment Jan 3, 2026 7:20pm

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 26, 2025

👋 Hi @lishaduck, thanks for the pull request! A scan flagged a concern with it. Could you please take a look?

[pr-task-completion] This PR's body is missing [x] checks on the following tasks from the PR template.

Repositories often provide a set of tasks that pull request authors are expected to complete. Those tasks should be marked as completed with a [x] in the pull request description. Please complete those tasks and mark the checks as [x] completed.

🗺️ This message was posted automatically by OctoGuide: a bot for GitHub repository best practices.

@lishaduck
Copy link
Copy Markdown
Member Author

lishaduck commented Dec 26, 2025

If there is a backing issue, add a 'fixes #...' link to the pull request body

I have? It seems GH is buggy as usual, and has taken to ignoring 'fixes' sometimes.

Well, it's fixed now (hehe), but #1151 is really really broken instead 😬

JoshuaKGoldberg pushed a commit that referenced this pull request Dec 28, 2025
<!-- 👋 Hi, thanks for sending a PR to flint! ❤️‍🔥
Please fill out all fields below and make sure each item is true and [x]
checked.
Otherwise we may not be able to review your PR. -->

## PR Checklist

- [x] Addresses an existing open issue: fixes #1139
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/flint/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/flint/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

<!-- Description of what is changed and how the code change does that.
-->
Extracted from #1129

🔥
@auvred
Copy link
Copy Markdown
Member

auvred commented Dec 31, 2025

I looked into tools to automate references generation because this is pretty unwieldy, but it looks like the only tool that does it the way we needed it is nx, and that seems a bit overkill.

Internal lint rule could help with that! Especially with an autofixer

@lishaduck
Copy link
Copy Markdown
Member Author

lishaduck commented Dec 31, 2025

Should I make a changeset? This isn't forward-facing, but we should probably ensure we republish all of the packages.

@JoshuaKGoldberg
Copy link
Copy Markdown
Collaborator

Yeah, just to be safe let's do that.

"compilerOptions": {
"outDir": "lib",
"rootDir": "src"
"tsBuildInfoFile": "node_modules/.cache/tsbuild/info.json",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Question] Are these necessary? Why not go with the default?

Copy link
Copy Markdown
Member Author

@lishaduck lishaduck Dec 31, 2025

Choose a reason for hiding this comment

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

Yes, we require setting them to disambiguate between , .test, & .src. Putting them in node_modules/.cache/tsbuild was a matter of preference (to prevent #1129 (comment) and to collocate with the tsbuild output). We could totally put them in as tsconfig.tsbuildinfo, tsconfig.src.tsbuildinfo, tsconfig.test.tsbuildinfo, tsconfig.bin.tsbuildinfo, but that gets noisy quickly.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmm. I was a little uneasy with the @flint.fyi/source in package.json, and now this is a second unusual (to me?) configuration point I haven't seen used elsewhere. What is it about our setups that's forcing these unusual config options uses?

Copy link
Copy Markdown
Member Author

@lishaduck lishaduck Dec 31, 2025

Choose a reason for hiding this comment

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

I was a little uneasy with the @flint.fyi/source in package.json

That's fair, but I'd like to note that offical TS team recommends it as the way to use type-stripping. It's not so much unusual, it's that most projects of our scale haven't migrated to erasableSyntaxOnly, so it's only smaller projects like tinyglobby that use it (irrc tinyglobby uses it, don't quote me, I didn't double-check).

(to me?) configuration point I haven't seen used elsewhere

Really? tbh I'd never seen a project (before Flint) that didn't customize tsbuildinfo when using incremental.

What is it about our setups that's forcing these unusual config options uses?

  1. Being relatively non-trivial
  2. Being a monorepo
  3. Adopting newer features most non-trivial monorepos haven't migrated to yet.

Again, I don't think it's so much that options are unusual, it's that the projects you use and the projects I use are generally of different scales.

I was curious, so I ran a quick sourcegraph search of tsBuildInfoFile, which returns >10k results for tsconfig.json, so, again, I don't think it's very unusual to set it, just that it might be unusual in your circles.

EDIT: typescript-eslint uses it :) (not much, surprisingly. I'm curious how they do it now...) https://github.com/search?q=repo%3Atypescript-eslint%2Ftypescript-eslint%20tsBuildInfoFile&type=code

Copy link
Copy Markdown
Member Author

@lishaduck lishaduck Jan 1, 2026

Choose a reason for hiding this comment

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

EDIT: typescript-eslint uses it :) (not much, surprisingly. I'm curious how they do it now...) https://github.com/search?q=repo%3Atypescript-eslint%2Ftypescript-eslint%20tsBuildInfoFile&type=code

I took a closer look to see how typescript-eslint was using it, given I assume you'd be more comfortable with that approach. It looks like in typescript-eslint, y'all are doing the same thing I'm doing, but you just do it in the more centralized (and thus implicit) manner.
I don't totally love the approach y'all took to centralize it (I don't love how crowded it makes the root, for one), but now that I see how y'all did it, I think I could adapt it pretty nicely here as well.

I assume you'd like that, I'd like that too, I don't know if we want to make it block getting this in. On one hand, auvred said he'd prefer this to land before #1179, but at the same time, a followup would be equally conflicty (though less so than #1201).
I say that because I'm going to try to resist working on Flint tomorrow (gotta finish polishing my WashU app & get back to the MIT app), but we'll see. I don't see myself resisting the lure of code for more than a day though, so 🫡

G'night! Happy new years! (3 more minutes for me 🎉)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I assume you'd like that

Heh, I wasn't on point for setting up tseslint's tooling. That was JamesHenry. I just ramp up to review the PRs once in a while and maybe try to tweak things when they break.

This whole area isn't something I'm very ramped up on. And IMO none of this is blocking - we can always change it later!

Proposal: how about we...

  • Wait today since you're working on your future (whoo! 🎓)
  • See if @auvred has preferences
  • Go with whatever you two prefer tomorrow?

I'm personally happy as long as it all works. From my perspective, it's a win-win:

  • If we do it a way I'm accustomed to: I'm comfortable
  • If we do it some new way: I learn a new thing and get to try it out for reference later

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm personally happy as long as it all works.

+1! This is a tooling setup, we can always change it at any moment if we find something we don't like. Let's merge it?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

:shipit: !

@lishaduck whenever you feel comfortable, all you!

Copy link
Copy Markdown
Member Author

@lishaduck lishaduck Jan 1, 2026

Choose a reason for hiding this comment

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

Sounds good to me! :shipit:

(I am aware that there are conflicts. Feel free to fix them yourself if it's blocking something, or else I'll get it to tomorrow)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Resolved conflicts. 👍🏻

No need for this anymore 🧹
@lishaduck
Copy link
Copy Markdown
Member Author

lishaduck commented Jan 2, 2026

I tried the tsdown 0.19 beta, but the exports generation still isn't quite where we want it. Put up rolldown/tsdown#685 to fix that.

I think we leave it for a followup like #1129 (comment). :shipit:

EDIT: Filed #1251

Copy link
Copy Markdown
Collaborator

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

🚢

@lishaduck
Copy link
Copy Markdown
Member Author

Self merging once CI passed given everyone approves and this is particularly conflict-prone.

@lishaduck lishaduck enabled auto-merge (squash) January 3, 2026 19:20
@lishaduck lishaduck merged commit 602c75c into main Jan 3, 2026
7 checks passed
@lishaduck lishaduck deleted the tsdown branch January 3, 2026 19:22
lishaduck added a commit that referenced this pull request Jan 3, 2026
<!-- 👋 Hi, thanks for sending a PR to flint! ❤️‍🔥
Please fill out all fields below and make sure each item is true and [x]
checked.
Otherwise we may not be able to review your PR. -->

## PR Checklist

- [x] Addresses an existing open issue: fixes #1152
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/flint/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/flint/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

<!-- Description of what is changed and how the code change does that.
-->
Relands #1174.
Marking as draft, despite being ready for review, to prevent accidental
remerges before #1129.

🔥

---------

Co-authored-by: Josh Goldberg <git@joshuakgoldberg.com>
@lishaduck lishaduck mentioned this pull request Jan 3, 2026
3 tasks
lishaduck added a commit that referenced this pull request Jan 3, 2026
<!-- 👋 Hi, thanks for sending a PR to flint! ❤️‍🔥
Please fill out all fields below and make sure each item is true and [x]
checked.
Otherwise we may not be able to review your PR. -->

## PR Checklist

- [x] Addresses an existing open issue: fixes #1248
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/flint-fyi/flint/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/flint-fyi/flint/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

<!-- Description of what is changed and how the code change does that.
-->
Fixes broken merge of #1129 & #1201
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.

🛠 Tooling: move to tsdown

3 participants