Skip to content

Commit a6c3c90

Browse files
lubieowocekdy1
authored andcommitted
Revert "move workUnitAsyncStorage into "client/components"" (#71058)
Reverts #71046 #71051 fixed the underlying issue, so we don't need this anymore.
1 parent 3cf7c70 commit a6c3c90

25 files changed

Lines changed: 33 additions & 33 deletions

File tree

packages/next/src/server/after/after.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { workAsyncStorage } from '../../client/components/work-async-storage.external'
2-
import { workUnitAsyncStorage } from '../../client/components/work-unit-async-storage.external'
2+
import { workUnitAsyncStorage } from '../../server/app-render/work-unit-async-storage.external'
33
import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'
44

55
import { markCurrentScopeAsDynamic } from '../app-render/dynamic-rendering'

packages/next/src/server/app-render/action-handler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http'
22
import type { SizeLimit } from '../../types'
3-
import type { RequestStore } from '../../client/components/work-unit-async-storage.external'
3+
import type { RequestStore } from '../../server/app-render/work-unit-async-storage.external'
44
import type { AppRenderContext, GenerateFlight } from './app-render'
55
import type { AppPageModule } from '../../server/route-modules/app-page/module'
66
import type { BaseNextRequest, BaseNextResponse } from '../base-http'

packages/next/src/server/app-render/app-render.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type {
1212
InitialRSCPayload,
1313
} from './types'
1414
import type { WorkStore } from '../../client/components/work-async-storage.external'
15-
import type { RequestStore } from '../../client/components/work-unit-async-storage.external'
15+
import type { RequestStore } from '../../server/app-render/work-unit-async-storage.external'
1616
import type { NextParsedUrlQuery } from '../request-meta'
1717
import type { LoaderTree } from '../lib/app-dir-module'
1818
import type { AppPageModule } from '../route-modules/app-page/module'
@@ -151,7 +151,7 @@ import { waitAtLeastOneReactRenderTask } from '../../lib/scheduler'
151151
import {
152152
workUnitAsyncStorage,
153153
type PrerenderStore,
154-
} from '../../client/components/work-unit-async-storage.external'
154+
} from './work-unit-async-storage.external'
155155
import { CacheSignal } from './cache-signal'
156156
import { getTracedMetadata } from '../lib/trace/utils'
157157

packages/next/src/server/app-render/create-component-tree.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { NextNodeServerSpan } from '../lib/trace/constants'
2020
import { StaticGenBailoutError } from '../../client/components/static-generation-bailout'
2121
import type { LoadingModuleData } from '../../shared/lib/app-router-context.shared-runtime'
2222
import type { Params } from '../request/params'
23-
import { workUnitAsyncStorage } from '../../client/components/work-unit-async-storage.external'
23+
import { workUnitAsyncStorage } from './work-unit-async-storage.external'
2424

2525
/**
2626
* Use the provided loader tree to create the React Component tree.

packages/next/src/server/app-render/dynamic-rendering.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222

2323
import type { WorkStore } from '../../client/components/work-async-storage.external'
24-
import type { WorkUnitStore } from '../../client/components/work-unit-async-storage.external'
24+
import type { WorkUnitStore } from '../../server/app-render/work-unit-async-storage.external'
2525

2626
// Once postpone is in stable we should switch to importing the postpone export directly
2727
import React from 'react'
@@ -32,7 +32,7 @@ import {
3232
workUnitAsyncStorage,
3333
type PrerenderStoreLegacy,
3434
type PrerenderStoreModern,
35-
} from '../../client/components/work-unit-async-storage.external'
35+
} from './work-unit-async-storage.external'
3636
import { workAsyncStorage } from '../../client/components/work-async-storage.external'
3737
import { makeHangingPromise } from '../dynamic-rendering-utils'
3838
import {

packages/next/src/server/app-render/entry-base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export { prerender } from 'react-server-dom-webpack/static.edge'
1212
import LayoutRouter from '../../client/components/layout-router'
1313
import RenderFromTemplateContext from '../../client/components/render-from-template-context'
1414
import { workAsyncStorage } from '../../client/components/work-async-storage.external'
15-
import { workUnitAsyncStorage } from '../../client/components/work-unit-async-storage.external'
15+
import { workUnitAsyncStorage } from './work-unit-async-storage.external'
1616
import { actionAsyncStorage } from '../../client/components/action-async-storage.external'
1717
import { ClientPageRoot } from '../../client/components/client-page'
1818
import { ClientSegmentRoot } from '../../client/components/client-segment'

packages/next/src/client/components/work-unit-async-storage-instance.ts renamed to packages/next/src/server/app-render/work-unit-async-storage-instance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createAsyncLocalStorage } from './async-local-storage'
1+
import { createAsyncLocalStorage } from '../../client/components/async-local-storage'
22
import type { WorkUnitAsyncStorage } from './work-unit-async-storage.external'
33

44
export const workUnitAsyncStorage: WorkUnitAsyncStorage =

packages/next/src/client/components/work-unit-async-storage.external.ts renamed to packages/next/src/server/app-render/work-unit-async-storage.external.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import type { DraftModeProvider } from '../../server/async-storage/draft-mode-pr
33
import type { ResponseCookies } from '../../server/web/spec-extension/cookies'
44
import type { ReadonlyHeaders } from '../../server/web/spec-extension/adapters/headers'
55
import type { ReadonlyRequestCookies } from '../../server/web/spec-extension/adapters/request-cookies'
6-
import type { CacheSignal } from '../../server/app-render/cache-signal'
7-
import type { DynamicTrackingState } from '../../server/app-render/dynamic-rendering'
6+
import type { CacheSignal } from './cache-signal'
7+
import type { DynamicTrackingState } from './dynamic-rendering'
88

99
// Share the instance module in the next-shared layer
1010
import { workUnitAsyncStorage } from './work-unit-async-storage-instance' with { 'turbopack-transition': 'next-shared' }

packages/next/src/server/async-storage/with-request-store.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { AsyncLocalStorage } from 'async_hooks'
44
import type {
55
RequestStore,
66
WorkUnitStore,
7-
} from '../../client/components/work-unit-async-storage.external'
7+
} from '../../server/app-render/work-unit-async-storage.external'
88
import type { RenderOpts } from '../app-render/types'
99
import type { WithStore } from './with-store'
1010
import type { NextRequest } from '../web/spec-extension/request'

packages/next/src/server/lib/patch-fetch.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { AsyncLocalStorage } from 'node:async_hooks'
2-
import type { WorkUnitStore } from '../../client/components/work-unit-async-storage.external'
2+
import type { WorkUnitStore } from '../../server/app-render/work-unit-async-storage.external'
33
import type { WorkStore } from '../../client/components/work-async-storage.external'
44
import type { IncrementalCache } from './incremental-cache'
55
import { createPatchedFetcher } from './patch-fetch'

0 commit comments

Comments
 (0)