refactor!: rename to @tanstack/redact and consolidate into single package#2
Merged
tannerlinsley merged 2 commits intomainfrom Apr 28, 2026
Merged
Conversation
…ngle package
The previous 6-package layout (@tanstack/{react,react-dom,react-dom-server,
dom-core,scheduler,dom-vite}) was performing a contract we don't have —
React only splits react/react-dom because the renderer is theoretically
swappable. We have one renderer. The split was buying us nothing concrete
and costing real debugging hours (workspace:* version mismatches on
pnpm pack, ReactSharedInternals duplication when one copy was inlined via
Cloudflare's noExternal and another pre-bundled into deps_ssr).
Now ships as a single @tanstack/redact (0.1.0-alpha.10) with subpath
exports:
/ react entry
/jsx-runtime
/dom createPortal, flushSync, resource hint stubs
/dom-client createRoot, hydrateRoot
/dom-test-utils
/server renderToString, renderToReadableStream, …
/scheduler
/vite redact() plugin (was tanstackDom)
/features/* per-feature index/full/stub modules for bundler
aliasing without the Vite plugin
/_all registration primitives (registerRenderer,
registerTypeMatcher, installCapability, …) +
core types for custom-feature authors
Public API renames:
tanstackDom() -> redact()
TanStackDom* -> Redact*
Cross-cutting fixes captured in this commit:
- ReactSharedInternals stashed on globalThis under a registered
Symbol so duplicate package copies (Cloudflare worker noExternal +
deps_ssr pre-bundle, pnpm strict + tarball install, etc.) share
a single backing object. SSR dispatcher installed by one copy is
visible to hooks called through the other.
- Add useSyncExternalStoreWithSelector to the main entry's named
exports — was added to hooks.ts in a prior change but missed in
the index.ts re-export, breaking link-time consumers via the
use-sync-external-store/shim alias (e.g. @tanstack/react-store).
- Vite plugin's ALIASES map reordered so most-specific subpath
aliases (react-dom/server, react-dom/client, …) match before less-
specific prefixes (react-dom). The new layout doesn't preserve the
old prefix-coincidence the previous order relied on.
- tests/public-exports.test.ts: inline-snapshots every public
subpath's named-export set, guarding against silent link-time
drift from missing re-exports.
All 707 tests pass. Sizes: full preset 9.07 KB gz, nano 6.75 KB gz.
The previous 0.1.0-alpha.* numbering was inherited from the now-deprecated
multi-package layout (@tanstack/{react,react-dom,react-dom-server,
dom-core,scheduler,dom-vite}). @tanstack/redact has zero published
versions on npm — start the package's history fresh at 0.0.1 and drop
the 'next' dist-tag (no need to gate against a stale 'latest' on a
brand-new package).
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@tanstack/{react,react-dom,react-dom-server,dom-core,scheduler,dom-vite}collapse into@tanstack/redactwith subpath exports (./jsx-runtime,./dom,./dom-client,./dom-test-utils,./server,./scheduler,./vite,./features/*,./_all).tanstackDom()→redact(), typesTanStackDom*→Redact*.@tanstack/redact@0.0.1on npm (fresh package, fresh version — old@tanstack/{react,…}@0.1.0-alpha.*packages are deprecated).ReactSharedInternalsis now aglobalThis-stashed singleton viaSymbol.for, so duplicate package copies (Cloudflare workernoExternal: trueinlined +deps_ssrpre-bundled, pnpm strict + tarball install, etc.) share state. SSR dispatcher installed by one copy is visible to hooks called through the other.useSyncExternalStoreWithSelectorproperly exported from the main entry — was added tohooks.tspreviously but missed inindex.ts's re-export, breaking link-time consumers via theuse-sync-external-store/shimalias (e.g.@tanstack/react-store).react-dom/server,react-dom/client, …) match before less-specific prefixes (react-dom). The new layout doesn't preserve the prefix-coincidence the previous order relied on.tests/public-exports.test.ts: inline-snapshots every public subpath's named-export set, guarding against silent link-time export drift.Test plan
pnpm test— 707/707 unit + integration tests passnode scripts/build.mjs— clean build, 233 files in distnode scripts/size.mjs— full preset 9.07 KB gz, nano 6.75 KB gz (no regression)npm publish --dry-run— package metadata clean$_TSRcleaned up after hydrate fires), SPA navigation works without full reload, browser console clean@tanstack/redact@0.0.1underlatesttagBreaking changes
This is a name-and-layout change — the entire previous API moved to a new package and new shape. The old
@tanstack/{react,react-dom,…}packages will be deprecated separately with anpm deprecateredirect.