Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
67639f1
refactor: tsdown
lishaduck Dec 26, 2025
bbabb56
chore: attw
lishaduck Dec 27, 2025
a024277
feat: extract out ts patching package
lishaduck Dec 28, 2025
1c36ef2
Merge branch 'main'
JoshuaKGoldberg Dec 28, 2025
967a64d
Merge branch 'main'
JoshuaKGoldberg Dec 28, 2025
8d7351f
fix: delete tsconfig.tsbuildinfos again
lishaduck Dec 28, 2025
55bcbfb
improvements
lishaduck Dec 28, 2025
a43eb4d
fix: knip
lishaduck Dec 28, 2025
73c3a6e
fix lockfile
lishaduck Dec 28, 2025
e9d570a
ci: cleanup
lishaduck Dec 28, 2025
7918250
fix: typechecking
lishaduck Dec 28, 2025
3270fd0
chore: drop spelling because I'm here
lishaduck Dec 28, 2025
e7e8a06
fix: wrap test name in quotes 😂
lishaduck Dec 28, 2025
3516a84
ci: create .astro before linting
lishaduck Dec 28, 2025
fbead69
ci: satiate the knip ✂️
lishaduck Dec 28, 2025
e5af340
Merge branch 'main' into tsdown
lishaduck Dec 29, 2025
b9acbd8
fix: let tsdown build references
lishaduck Dec 29, 2025
077ff4b
ci: drop now-redundant tsc build
lishaduck Dec 29, 2025
4a88c0c
chore: js isn't real
lishaduck Dec 29, 2025
79705fd
Merge branch 'main' into ts-patch
lishaduck Dec 29, 2025
e87589b
rm tsconfig.tsbuildinfo
lishaduck Dec 29, 2025
3972957
simpler
lishaduck Dec 29, 2025
908a76f
chore: drop unneeded node types
lishaduck Dec 29, 2025
bc4e440
fix: simpler design
lishaduck Dec 29, 2025
5c796d3
fix: lints
lishaduck Dec 29, 2025
bfe3d95
even smaller package
lishaduck Dec 29, 2025
d189bda
drop more typescripts
lishaduck Dec 29, 2025
252d2a7
improve packaging
lishaduck Dec 29, 2025
74c9865
Merge branch 'ts-patch' into tsdown
lishaduck Dec 29, 2025
e9a3c66
fix: references with simpler setup
lishaduck Dec 29, 2025
b2e9e18
fix: source map subpath
lishaduck Dec 29, 2025
ad79e2c
Merge branch 'ts-patch' into tsdown
lishaduck Dec 29, 2025
b9f6166
fix: drop entries from publishconfig
lishaduck Dec 29, 2025
d710005
chore: improve internal tsconfig options for improved dx (#1174)
lishaduck Dec 30, 2025
8dbeb23
Revert "chore: improve internal tsconfig options for improved dx (#11…
lishaduck Dec 30, 2025
675d0cd
Merge branch 'main' into tsdown
lishaduck Dec 30, 2025
85e44df
Revert "chore: drop spelling because I'm here"
lishaduck Dec 30, 2025
b00e4df
diff
lishaduck Dec 30, 2025
9b887c9
refactor: use tsconfig.test.json
lishaduck Dec 30, 2025
dee7258
Merge branch 'main' into tsdown
lishaduck Dec 30, 2025
b910535
Merge branch 'main' into tsdown
lishaduck Dec 30, 2025
e453268
chore: attw only in ci
lishaduck Dec 31, 2025
940face
chore: add changeset
lishaduck Jan 1, 2026
6d71229
chore: remove root lib from prettier
lishaduck Jan 1, 2026
bf64e6d
Merge branch 'main' into tsdown
lishaduck Jan 2, 2026
a80eda5
Merge branch 'main' into tsdown
lishaduck Jan 2, 2026
58e07df
Merge branch 'main' into tsdown
lishaduck Jan 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .changeset/slimy-readers-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
"@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
---

chore: rework packaging with tsdown
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ indent_style = tab
end_of_line = lf
insert_final_newline = true
quote_type = double

[*.yaml]
indent_style = space
20 changes: 10 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,40 @@ jobs:
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: ./.github/actions/prepare
- run: pnpm build --noCheck
- run: pnpm run -r build
- run: pnpm flint
- run: pnpm run build
- run: pnpm run -r build # Build packages/site
- run: pnpm run flint
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: ./.github/actions/prepare
- run: pnpm build --noCheck
- run: pnpm run -r build
- run: pnpm lint
- run: pnpm run build
- run: pnpm run -r prebuild # Generate packages/site/.astro without a full build.
- run: pnpm run lint
lint_knip:
name: Lint Knip
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: ./.github/actions/prepare
- run: pnpm build
- run: pnpm lint:knip
- run: pnpm run build # Knip requires all exports to be generated.
- run: pnpm run lint:knip
lint_packages:
name: Lint Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: ./.github/actions/prepare
- run: pnpm lint:packages
- run: pnpm run lint:packages
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: ./.github/actions/prepare
- run: pnpm build --noCheck
- run: pnpm run build # https://github.com/vitest-dev/vitest/discussions/9353
- run: pnpm run test

name: CI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-setup-steps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: ./.github/actions/prepare
- run: pnpm build --noCheck
- run: pnpm build

name: Copilot Setup Steps

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ node_modules
packages/*/.astro
packages/*/dist
packages/*/lib
tsconfig.tsbuildinfo
tsconfig.vitest-temp.json
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/.all-contributorsrc
/.husky
/lib
/pnpm-lock.yaml
5 changes: 3 additions & 2 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"node_modules",
"packages/comparisons/src/data.json",
"packages/site/dist",
"pnpm-lock.yaml",
"tsconfig.tsbuildinfo"
"pnpm-lock.yaml"
],
"words": [
"affordances",
Expand All @@ -31,8 +30,10 @@
"aria-setsize",
"aria-valuenow",
"aria-valuetext",
"attw",
"autolinks",
"auvred",
"azat-io",
"bday",
"codemod",
"contentinfo",
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
},
"type": "module",
"scripts": {
"build": "tsc -b",
"build": "tsdown",
"flint": "node packages/flint/bin/index.js",
"format": "prettier .",
"lint": "eslint . --max-warnings 0",
"lint:knip": "knip",
"lint:packages": "pnpm dedupe --check",
"prepare": "husky",
"test": "vitest"
"test": "vitest --typecheck"
},
"lint-staged": {
"*": "prettier --ignore-unknown --write"
},
"devDependencies": {
"@arethetypeswrong/core": "^0.18.2",
"@changesets/cli": "2.29.7",
"@eslint-community/eslint-plugin-eslint-comments": "4.5.0",
"@eslint/js": "9.39.1",
Expand Down Expand Up @@ -58,6 +58,7 @@
"prettier-plugin-packagejson": "2.5.20",
"prettier-plugin-sentences-per-line": "0.2.0",
"prettier-plugin-sh": "0.18.0",
"tsdown": "0.18.3",
"typescript": "5.9.3",
"typescript-eslint": "8.50.0",
"vitest": "4.0.15"
Expand Down
16 changes: 12 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@
"sideEffects": false,
"type": "module",
"exports": {
".": "./lib/index.js"
".": {
"@flint.fyi/source": "./src/index.ts",
"default": "./lib/index.js"
}
},
"files": [
"lib/",
"!lib/**/*.map"
"!lib/**/*.map",
"!lib/**/*.test.*"
],
"dependencies": {
"@flint.fyi/core": "workspace:",
Expand All @@ -34,7 +38,8 @@
"wrap-ansi": "^9.0.2"
},
"devDependencies": {
"prettier": "3.7.4"
"prettier": "3.7.4",
"tsdown": "0.18.3"
},
"peerDependencies": {
"prettier": "^3.7.4"
Expand All @@ -43,6 +48,9 @@
"node": ">=24.0.0"
},
"publishConfig": {
"access": "public"
"access": "public",
"exports": {
".": "./lib/index.js"
}
}
}
7 changes: 0 additions & 7 deletions packages/cli/src/packageData.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/cli/src/runCli.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { parseArgs } from "node:util";

import packageData from "../package.json" with { type: "json" };
import { findConfigFileName } from "./findConfigFileName.js";
import { options } from "./options.js";
import { packageData } from "./packageData.js";
import { createRendererFactory } from "./renderers/createRendererFactory.js";
import { runCliOnce } from "./runCliOnce.js";
import { runCliWatch } from "./runCliWatch.js";
Expand Down
8 changes: 5 additions & 3 deletions packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"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. 👍🏻

"rootDir": "src/",
"outDir": "lib/",
"types": ["node"]
},
"extends": "../../tsconfig.base.json",
"include": ["src"],
"include": ["src", "package.json"],
"references": [{ "path": "../core" }, { "path": "../utils" }]
}
15 changes: 15 additions & 0 deletions packages/cli/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineConfig } from "tsdown";

export default defineConfig({
attw: {
enabled: "ci-only",
profile: "esm-only",
},
clean: ["./node_modules/.cache/tsbuild/"],
dts: { build: true, incremental: true },
entry: ["src/index.ts"],
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.

In addition, we should be able to use this after the next tsdown minor:

exports: {
	devExports: "@flint.fyi/source",
	packageJson: false
},

failOnWarn: true,
fixedExtension: false,
outDir: "lib",
unbundle: true,
});
16 changes: 13 additions & 3 deletions packages/comparisons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,29 @@
"sideEffects": false,
"type": "module",
"exports": {
".": "./lib/index.js"
".": {
"@flint.fyi/source": "./src/index.ts",
"default": "./lib/index.js"
}
},
"files": [
"lib/",
"!lib/**/*.map"
"!lib/**/*.map",
"!lib/**/*.test.*"
],
"dependencies": {
"prettier": "3.7.4"
},
"devDependencies": {
"tsdown": "0.18.3"
},
"engines": {
"node": ">=24.0.0"
},
"publishConfig": {
"access": "public"
"access": "public",
"exports": {
".": "./lib/index.js"
}
}
}
6 changes: 4 additions & 2 deletions packages/comparisons/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"compilerOptions": {
"outDir": "lib",
"rootDir": "src"
"tsBuildInfoFile": "node_modules/.cache/tsbuild/info.json",
"rootDir": "src/",
"outDir": "lib/",
"types": ["node"]
},
"extends": "../../tsconfig.base.json",
"include": ["src", "src/data.json"]
Expand Down
15 changes: 15 additions & 0 deletions packages/comparisons/tsdown.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { defineConfig } from "tsdown";

export default defineConfig({
attw: {
enabled: "ci-only",
profile: "esm-only",
},
clean: ["./node_modules/.cache/tsbuild/"],
dts: { build: true, incremental: true },
entry: ["src/index.ts"],
failOnWarn: true,
fixedExtension: false,
outDir: "lib",
unbundle: true,
});
14 changes: 11 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@
"sideEffects": false,
"type": "module",
"exports": {
".": "./lib/index.js"
".": {
"@flint.fyi/source": "./src/index.ts",
"default": "./lib/index.js"
}
},
"files": [
"lib/",
"!lib/**/*.map"
"!lib/**/*.map",
"!lib/**/*.test.*"
],
"dependencies": {
"@flint.fyi/utils": "workspace:",
Expand All @@ -30,12 +34,16 @@
},
"devDependencies": {
"@types/omit-empty": "1.0.4",
"tsdown": "0.18.3",
"vitest": "4.0.15"
},
"engines": {
"node": ">=24.0.0"
},
"publishConfig": {
"access": "public"
"access": "public",
"exports": {
".": "./lib/index.js"
}
}
}
2 changes: 1 addition & 1 deletion packages/core/src/plugins/createPlugin.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { assertType, describe, expectTypeOf, it } from "vitest";
import { FilesValue } from "../types/files.js";
import { createPlugin } from "./createPlugin.js";

describe(createPlugin, () => {
describe("createPlugin", () => {
it("should type files as undefined w/o files property", () => {
const plugin = createPlugin({
name: "test",
Expand Down
11 changes: 5 additions & 6 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"compilerOptions": {
"outDir": "lib",
"rootDir": "src"
},
"extends": "../../tsconfig.base.json",
"include": ["src"],
"references": [{ "path": "../utils" }]
"include": [],
"references": [
{ "path": "./tsconfig.src.json" },
{ "path": "./tsconfig.test.json" }
]
}
12 changes: 12 additions & 0 deletions packages/core/tsconfig.src.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuild/info.src.json",
"rootDir": "src/",
"outDir": "lib/",
"types": ["node"]
},
"extends": "../../tsconfig.base.json",
"include": ["src"],
"exclude": ["src/**/*.test.ts"],
"references": [{ "path": "../utils" }]
}
11 changes: 11 additions & 0 deletions packages/core/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"compilerOptions": {
"tsBuildInfoFile": "node_modules/.cache/tsbuild/info.test.json",
"rootDir": "src/",
"outDir": "node_modules/.cache/tsbuild/test",
"types": ["node"]
},
"extends": "../../tsconfig.base.json",
"include": ["src/**/*.test.ts"],
"references": [{ "path": "./tsconfig.src.json" }]
}
Loading