Skip to content

deps: migrate from @tanstack/dom-vite to @tanstack/redact#881

Merged
tannerlinsley merged 1 commit intomainfrom
taren/migrate-to-redact
Apr 30, 2026
Merged

deps: migrate from @tanstack/dom-vite to @tanstack/redact#881
tannerlinsley merged 1 commit intomainfrom
taren/migrate-to-redact

Conversation

@tannerlinsley
Copy link
Copy Markdown
Member

@tannerlinsley tannerlinsley commented Apr 30, 2026

Summary

Migrate from the now-deprecated 6-package shim layout (`@tanstack/{react,react-dom,react-dom-server,dom-core,scheduler,dom-vite}@0.1.0-alpha.*`) to the consolidated `@tanstack/redact` package. The old packages are deprecated on npm with a redirect to redact.

Changes

  • `package.json`: drop `@tanstack/dom-vite@0.1.0-alpha.8`, add `@tanstack/redact@^0.0.3`.
  • `vite.config.ts`:
    • `import { tanstackDom } from '@tanstack/dom-vite'` → `import { redact } from '@tanstack/redact/vite'`
    • `tanstackDom()` → `redact()`
    • `serverVariantAliases` targets `@tanstack/react-dom-server` → `@tanstack/redact/server`

Test plan

  • `pnpm husky` (format + lint + tsc + smoke) passes 4/4 with the published `@tanstack/redact@0.0.3`:
    ```
    ✓ home page
    ✓ query docs
    ✓ router docs
    ✓ table docs
    ```
  • Net diff: -36 lines (mostly lockfile reduction from 6 packages → 1)

Background

`@tanstack/redact` 0.0.3 includes two fixes that landed during this migration:

  1. 0.0.2 — exports field switched from `import` to `default` so RSC + other condition contexts can resolve subpaths.
  2. 0.0.3 — `resolve.alias` scoped to client+ssr environments only, so the RSC environment keeps using real React (where Flight serialization needs the real `ReactSharedInternals.d` field that the redact shim deliberately doesn't have). Caught when the docs routes (`/query/`, `/router/`, `/table/`) all 500'd in the smoke test.

Summary by CodeRabbit

  • Chores
    • Updated development dependencies and Vite configuration, replacing the build tooling plugin to use an updated TanStack package variant.

The previous 6-package shim layout (@tanstack/{react,react-dom,
react-dom-server,dom-core,scheduler,dom-vite}) was consolidated into
a single @tanstack/redact package with subpath exports. The old
packages are deprecated on npm and redirect to redact.

Changes:
  - package.json: drop @tanstack/dom-vite@0.1.0-alpha.8, add
    @tanstack/redact@^0.0.3
  - vite.config.ts: import { redact } from '@tanstack/redact/vite';
    tanstackDom() -> redact(); serverVariantAliases targets
    @tanstack/react-dom-server -> @tanstack/redact/server.

Verified locally: dev server boots clean, all four husky smoke
routes pass (home + query/router/table docs).
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 30, 2026

Deploy Preview for tanstack ready!

Name Link
🔨 Latest commit 18a2499
🔍 Latest deploy log https://app.netlify.com/projects/tanstack/deploys/69f3c84ce94db10008a2071c
😎 Deploy Preview https://deploy-preview-881--tanstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 49
Accessibility: 90
Best Practices: 83
SEO: 97
PWA: 70
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 748589f4-5a24-4869-843f-5052a36a4acb

📥 Commits

Reviewing files that changed from the base of the PR and between 61c45aa and 18a2499.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • package.json
  • vite.config.ts

📝 Walkthrough

Walkthrough

This pull request replaces the TanStack package @tanstack/dom-vite (alpha version) with @tanstack/redact (stable version) in development dependencies. The Vite configuration is updated to import and use the new package's plugin and server-side resolution targets accordingly.

Changes

Cohort / File(s) Summary
Dependency Update
package.json
Replaces @tanstack/dom-vite@0.1.0-alpha.8 with @tanstack/redact@^0.0.3 in devDependencies.
Build Configuration Update
vite.config.ts
Updates Vite plugin import and configuration to use @tanstack/redact/vite instead of @tanstack/dom-vite; retargets server-side runtime aliases for react-dom/server.* and react-dom/static* to @tanstack/redact/server.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A newer tool hops into view,
Redact replaces what once was true,
With cleaner builds and steadier ground,
Our vite config spins around—
From alpha dreams to stable shore! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch taren/migrate-to-redact

Review rate limit: 4/5 reviews remaining, refill in 12 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@tannerlinsley tannerlinsley merged commit f1dec64 into main Apr 30, 2026
6 of 8 checks passed
@tannerlinsley tannerlinsley deleted the taren/migrate-to-redact branch April 30, 2026 21:24
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.

1 participant