fix(lit-query): migrate to standard tsdown build so 'build' output is cached by nx and 'test:build' passes - #10943
fix(lit-query): migrate to standard tsdown build so 'build' output is cached by nx and 'test:build' passes#10943sukvvon wants to merge 9 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe Changeslit-query tsup build migration
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change standardizes lit-query’s build output and updates related package configuration without any identified current-head merge-blocking risk; it is merge-ready after normal checks and review. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 Changeset Version Preview9 package(s) bumped directly, 16 bumped as dependents. 🟨 Minor bumps
🟩 Patch bumps
|
|
View your CI Pipeline Execution ↗ for commit 0f92519
☁️ Nx Cloud last updated this comment at |
size-limit report 📦
|
22891f4 to
703f2f7
Compare
…ached by nx and 'test:build' passes
703f2f7 to
5dae012
Compare
…to 'vite.config.ts' to match react-query, drop obsolete knip 'src/tests' ignore
0dac11a to
f8f010c
Compare
…d-tsup-build # Conflicts: # packages/lit-query/tsconfig.build.cjs.json
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
…instead of 'tsup'
🎯 Changes
lit-query was the only package building with a non-standard
tsctwo-pass setup (dist/ESM +dist-cjs/CJS viabuild:cjs+write-cjs-package.mjs). Itsdist-cjs/output is not part of nx'sbuild.outputs({projectRoot}/build,{projectRoot}/dist), so on a CI cache-hitdist-cjs/is not restored andpublint --strictfails withdist-cjs/index.js does not exist, breaking@tanstack/lit-query:test:build.This migrates lit-query to the standard
tsdownbuild used by the other adapters (react-query as the reference), producing a singlebuild/directory (build/modern+build/legacy, each with.js/.cjs/.d.ts/.d.cts).build/is already in nx'sbuild.outputs, so the cache-hit failure is resolved without touchingnx.json. While here, the rest of the package config is aligned with react-query for consistency.Build migration:
tsdown.config.tsandtsconfig.prod.json, and addroot.tsdown.config.jsas a symlink to the sharedscripts/getTsdownConfig.js(matching every other adapter).tsconfig.jsonto extend the root config (drop the per-packageNodeNextoverride — this also fixes@tanstack/lit-query:test:typesfailing to typecheck@tanstack/query-test-utils's extension-less relative imports).package.json:build→tsdown --tsconfig tsconfig.prod.json, pointmain/module/types/exports/filesatbuild/, drop thetest:buildcjs-smoke step.tsconfig.build.json,tsconfig.build.cjs.json,scripts/write-cjs-package.mjs,scripts/check-cjs-types-smoke.mjs.eslint.config.jsignores and the perf scripts (scripts/measure-bundle.mjs,scripts/l3-stress.mjs) atbuild/modern, and drop the staledist-cjsentry from.gitignore.Config alignment with react-query:
package.jsonfields (scripts block first, thentype/types/main/module/exports/sideEffects/files/deps).cleanalso removes./dist-ts,compile→tsc --build,test:eslint/lint:fixuse--concurrency=auto,test:lib→vitest,test:lib:dev→pnpm run test:lib --watch. lit-specific scripts (test:typessingle-tsc --noEmit,measure:bundle*,perf:l3*,test:watch) are kept as-is.vitest.config.ts→vite.config.tsand addtest.nameplus the standardistanbulcoverage block (enabled on CI).packages/lit-querysrc/testsignore from the rootknip.json(the renamedvite.config.tslets knip detect the test entry automatically, like the other adapters).Runtime output is unchanged: the named exports are identical (52),
attwpasses on node10/node16 (CJS/ESM)/bundler, andpublint --strictreportsAll good!.✅ Checklist
pnpm run test:pr.🚀 Release Impact
Summary by CodeRabbit
Build & Packaging
@tanstack/lit-queryto a standardized build process.Testing