Access raw query string via WorkUnitStore - #97219
Conversation
Instead of passing the raw query params through the various render paths, put them on the WorkUnitStore. This is setup for a future change where we'll need to be able to materialize a search params object via the SegmentStore. To keep a single source of truth, this removes all the other ways of accessing the query string. No behavior change.
Failing test suitesCommit: f13a77b | About building and testing Next.js
Expand output● segment cache (search params) › stores prefetched data by its rewritten search params, not the original ones ● segment cache (search params) › handles rewrites to the same page but with different search params ● segment cache (search params) › handles rewrites to the same page but with no search params
Expand output● app dir - basic › searchParams prop › server component › should have the correct search params on rewrite ● app dir - basic › searchParams prop › server component › should have the correct search params on middleware rewrite
Expand output● app dir - basic › searchParams prop › server component › should have the correct search params on rewrite ● app dir - basic › searchParams prop › server component › should have the correct search params on middleware rewrite
Expand output● segment cache (search params) › stores prefetched data by its rewritten search params, not the original ones ● segment cache (search params) › handles rewrites to the same page but with different search params ● segment cache (search params) › handles rewrites to the same page but with no search params
Expand output● app dir - basic › searchParams prop › server component › should have the correct search params on rewrite ● app dir - basic › searchParams prop › server component › should have the correct search params on middleware rewrite
Expand output● app dir - basic › searchParams prop › server component › should have the correct search params on rewrite ● app dir - basic › searchParams prop › server component › should have the correct search params on middleware rewrite
Expand output● app dir - basic › searchParams prop › server component › should have the correct search params on rewrite ● app dir - basic › searchParams prop › server component › should have the correct search params on middleware rewrite
Expand output● segment cache (search params) › stores prefetched data by its rewritten search params, not the original ones ● segment cache (search params) › handles rewrites to the same page but with different search params ● segment cache (search params) › handles rewrites to the same page but with no search params
Expand output● app dir - basic › searchParams prop › server component › should have the correct search params on rewrite ● app dir - basic › searchParams prop › server component › should have the correct search params on middleware rewrite
Expand output● app dir - basic › searchParams prop › server component › should have the correct search params on rewrite ● app dir - basic › searchParams prop › server component › should have the correct search params on middleware rewrite |
Stats from current PR🔴 1 regression, 4 improvements
📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
Build Cache
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📝 Changed Files (22 files)Files with changes:
View diffsapp-page-exp..ntime.dev.jsfailed to diffapp-page-exp..time.prod.jsfailed to diffapp-page-tur..ntime.dev.jsfailed to diffapp-page-tur..time.prod.jsfailed to diffapp-page-tur..ntime.dev.jsfailed to diffapp-page-tur..time.prod.jsDiff too large to display app-page.runtime.dev.jsfailed to diffapp-page.runtime.prod.jsfailed to diffapp-route-ex..ntime.dev.jsDiff too large to display app-route-ex..time.prod.jsDiff too large to display app-route-tu..ntime.dev.jsDiff too large to display app-route-tu..time.prod.jsDiff too large to display app-route-tu..ntime.dev.jsDiff too large to display app-route-tu..time.prod.jsDiff too large to display app-route.runtime.dev.jsDiff too large to display app-route.ru..time.prod.jsDiff too large to display pages-api.ru..time.prod.jsDiff too large to display pages.runtime.prod.jsDiff too large to display use-cache-pr..ntime.dev.jsDiff too large to display use-cache-pr..ntime.dev.jsDiff too large to display use-cache-pr..ntime.dev.jsDiff too large to display use-cache-pr..ntime.dev.jsDiff too large to display 📎 Tarball URLCommit: f13a77b |
Instead of passing the raw query params through the various render paths, put them on the WorkUnitStore.
This is setup for a future change where we'll need to be able to materialize a search params object via the SegmentStore. To keep a single source of truth, this removes all the other ways of accessing the query string.
No behavior change.