diff --git a/.changeset/fix-turbopack-content-condition-deferred.md b/.changeset/fix-turbopack-content-condition-deferred.md new file mode 100644 index 0000000000..b89432f08e --- /dev/null +++ b/.changeset/fix-turbopack-content-condition-deferred.md @@ -0,0 +1,5 @@ +--- +'@workflow/next': patch +--- + +Always apply turbopack content condition regardless of builder mode to prevent the workflow loader from running on every JS/TS file when lazy discovery is enabled. diff --git a/.changeset/update-vercel-queue.md b/.changeset/update-vercel-queue.md new file mode 100644 index 0000000000..2eee0a37b6 --- /dev/null +++ b/.changeset/update-vercel-queue.md @@ -0,0 +1,7 @@ +--- +"@workflow/world-local": patch +"@workflow/world-postgres": patch +"@workflow/world-vercel": patch +--- + +Update @vercel/queue from 0.2.1 to 0.3.0 diff --git a/packages/next/src/index.ts b/packages/next/src/index.ts index 3efa9a40a5..cbe22fd806 100644 --- a/packages/next/src/index.ts +++ b/packages/next/src/index.ts @@ -462,10 +462,6 @@ export function withWorkflow( const supportsTurboCondition = semver.gte(nextVersion, 'v16.0.0'); const useDeferredBuilder = shouldUseDeferredBuilder(nextVersion); - // Deferred builder discovers files via loader socket notifications, so - // turbopack content conditions are only needed with the eager builder. - const shouldApplyTurboCondition = - supportsTurboCondition && !useDeferredBuilder; const shouldWatch = process.env.NODE_ENV === 'development'; let workflowBuilderPromise: Promise | undefined; const distDir = nextConfig.distDir || '.next'; @@ -573,7 +569,7 @@ export function withWorkflow( '*.cts', ]) { nextConfig.turbopack.rules[key] = { - ...(shouldApplyTurboCondition + ...(supportsTurboCondition ? { condition: { // Use 'all' to combine: must match content AND must NOT be in generated path diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b942d74a8b..c9702b13e7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,8 +22,8 @@ catalogs: specifier: 3.2.0 version: 3.2.0 '@vercel/queue': - specifier: 0.2.1 - version: 0.2.1 + specifier: 0.3.0 + version: 0.3.0 '@vitest/coverage-v8': specifier: ^4.0.18 version: 4.0.18 @@ -1325,7 +1325,7 @@ importers: dependencies: '@vercel/queue': specifier: 'catalog:' - version: 0.2.1 + version: 0.3.0 '@workflow/errors': specifier: workspace:* version: link:../errors @@ -1371,7 +1371,7 @@ importers: dependencies: '@vercel/queue': specifier: 'catalog:' - version: 0.2.1 + version: 0.3.0 '@workflow/errors': specifier: workspace:* version: link:../errors @@ -1478,7 +1478,7 @@ importers: version: 3.2.0 '@vercel/queue': specifier: 'catalog:' - version: 0.2.1 + version: 0.3.0 '@workflow/errors': specifier: workspace:* version: link:../errors @@ -8274,8 +8274,8 @@ packages: resolution: {integrity: sha512-4Uk9LOvDPVYqBJGrNDk4fdLte4CmFERXCUJI2y7SRYX1d//dI96Ww7sgKZF4+YDj/YaBXoCZ11AU0HYkVwW9Eg==} engines: {node: '>=20.0.0'} - '@vercel/queue@0.2.1': - resolution: {integrity: sha512-18jVWNj/jroyQ+/GM3XFyr1/deFkinosg7RKjovrJbgQRRjusq9Y+pSGOKfpzus6vVRun2mqDlNI82hm5Rwi5Q==} + '@vercel/queue@0.3.0': + resolution: {integrity: sha512-TGZlA2GGZtUVR592d5ORAqZXqWqUs7JD8MjazXMv07AxpsbLtUAbCxXOqRj/weoX7j6LrfZfD6cGfd7Llk24/Q==} engines: {node: '>=20.0.0'} '@vercel/react-router@1.2.6': @@ -23095,7 +23095,7 @@ snapshots: picocolors: 1.1.1 optional: true - '@vercel/queue@0.2.1': + '@vercel/queue@0.3.0': dependencies: '@vercel/oidc': 3.2.0 minimatch: 10.2.4 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index cac40c1282..3b2e3c1952 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -12,7 +12,7 @@ catalog: "@types/node": 22.19.0 "@vercel/functions": ^3.4.3 "@vercel/oidc": 3.2.0 - "@vercel/queue": 0.2.1 + "@vercel/queue": 0.3.0 "@vitest/coverage-v8": ^4.0.18 ai: 6.0.116 enhanced-resolve: 5.19.0