Skip to content

Conversation

@pranaygp
Copy link
Collaborator

Consolidates duplicated queue trigger configurations into shared constants
in @workflow/builders package, eliminating repetition across multiple builders.

Changes:

  • Created STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER constants
  • Updated VercelBuildOutputAPIBuilder to use shared constants
  • Updated NextBuilder (both in @workflow/next and @workflow/cli) to use constants
  • Exported constants from @workflow/builders index

This ensures consistent queue configuration across all builders and makes
future updates to these settings easier to manage from a single location.

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

@changeset-bot
Copy link

changeset-bot bot commented Oct 26, 2025

🦋 Changeset detected

Latest commit: 4b285a1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@workflow/builders Patch
@workflow/cli Patch
@workflow/next Patch
@workflow/nitro Patch
workflow Patch
@workflow/world-testing Patch
@workflow/ai Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Contributor

vercel bot commented Oct 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview Comment Oct 26, 2025 7:06am
example-nextjs-workflow-webpack Ready Ready Preview Comment Oct 26, 2025 7:06am
example-workflow Ready Ready Preview Comment Oct 26, 2025 7:06am
workbench-nitro-workflow Ready Ready Preview Comment Oct 26, 2025 7:06am
workflow-docs Ready Ready Preview Comment Oct 26, 2025 7:06am

@pranaygp pranaygp marked this pull request as draft October 26, 2025 06:32
@pranaygp pranaygp marked this pull request as ready for review October 26, 2025 06:34
@pranaygp pranaygp force-pushed the pranaygp/extract-queue-trigger-config branch from 69042df to c1efef8 Compare October 26, 2025 06:44
@pranaygp pranaygp force-pushed the pranaygp/move-next-builder-to-next-package branch from dae68ac to c1e7d6c Compare October 26, 2025 06:44
Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 Build Fix:

Missing exports in @workflow/builders package caused TypeScript compilation to fail when trying to import STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER constants. These constants existed in constants.ts but were not exported from the main index file.

View Details
📝 Patch Details
diff --git a/packages/builders/src/index.ts b/packages/builders/src/index.ts
index 32a74a6..a305ca5 100644
--- a/packages/builders/src/index.ts
+++ b/packages/builders/src/index.ts
@@ -8,3 +8,4 @@ export { applySwcTransform } from './apply-swc-transform.js';
 export { createDiscoverEntriesPlugin } from './discover-entries-esbuild-plugin.js';
 export { createNodeModuleErrorPlugin } from './node-module-esbuild-plugin.js';
 export { createSwcPlugin } from './swc-esbuild-plugin.js';
+export { STEP_QUEUE_TRIGGER, WORKFLOW_QUEUE_TRIGGER } from './constants.js';

Analysis

Missing exports cause TypeScript compilation failure in @workflow/next package

What fails: TypeScript compiler fails on packages/next/src/next-builder.ts due to missing exports STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER from @workflow/builders

How to reproduce:

cd packages/next && pnpm run build

Result:

src/next-builder.ts(7,3): error TS2305: Module '"@workflow/builders"' has no exported member 'STEP_QUEUE_TRIGGER'.
src/next-builder.ts(8,3): error TS2305: Module '"@workflow/builders"' has no exported member 'WORKFLOW_QUEUE_TRIGGER'.

Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 Build Fix:

The STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER constants were defined in constants.ts but not exported from the main package index, causing import failures in dependent packages.

View Details
📝 Patch Details
diff --git a/packages/builders/src/index.ts b/packages/builders/src/index.ts
index 32a74a6..a305ca5 100644
--- a/packages/builders/src/index.ts
+++ b/packages/builders/src/index.ts
@@ -8,3 +8,4 @@ export { applySwcTransform } from './apply-swc-transform.js';
 export { createDiscoverEntriesPlugin } from './discover-entries-esbuild-plugin.js';
 export { createNodeModuleErrorPlugin } from './node-module-esbuild-plugin.js';
 export { createSwcPlugin } from './swc-esbuild-plugin.js';
+export { STEP_QUEUE_TRIGGER, WORKFLOW_QUEUE_TRIGGER } from './constants.js';

Analysis

Missing exports cause TypeScript compilation failure

What fails: TypeScript compiler fails on packages/next/src/next-builder.ts due to missing exports STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER from the @workflow/builders package

How to reproduce:

cd packages/next && pnpm run build

Result:

src/next-builder.ts(7,3): error TS2305: Module '"@workflow/builders"' has no exported member 'STEP_QUEUE_TRIGGER'.
src/next-builder.ts(8,3): error TS2305: Module '"@workflow/builders"' has no exported member 'WORKFLOW_QUEUE_TRIGGER'.

Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Comments:

packages/builders/src/index.ts (line 11):
The new constants STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER are not exported from the @workflow/builders package index, but multiple files are importing them from @workflow/builders expecting them to be available as package exports. This will cause runtime module resolution failures.

View Details
📝 Patch Details
diff --git a/packages/builders/src/index.ts b/packages/builders/src/index.ts
index 32a74a6..a305ca5 100644
--- a/packages/builders/src/index.ts
+++ b/packages/builders/src/index.ts
@@ -8,3 +8,4 @@ export { applySwcTransform } from './apply-swc-transform.js';
 export { createDiscoverEntriesPlugin } from './discover-entries-esbuild-plugin.js';
 export { createNodeModuleErrorPlugin } from './node-module-esbuild-plugin.js';
 export { createSwcPlugin } from './swc-esbuild-plugin.js';
+export { STEP_QUEUE_TRIGGER, WORKFLOW_QUEUE_TRIGGER } from './constants.js';

Analysis

Missing constant exports from @workflow/builders package index

What fails: TypeScript module resolution for STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER constants when imported from @workflow/builders package

How to reproduce:

cd packages/cli && pnpm run typecheck

Result: Compilation errors:

src/lib/builders/next-build.ts(7,3): error TS2305: Module '"@workflow/builders"' has no exported member 'STEP_QUEUE_TRIGGER'.
src/lib/builders/next-build.ts(8,3): error TS2305: Module '"@workflow/builders"' has no exported member 'WORKFLOW_QUEUE_TRIGGER'.
src/lib/builders/vercel-build-output-api.ts(5,3): error TS2305: Module '"@workflow/builders"' has no exported member 'STEP_QUEUE_TRIGGER'.
src/lib/builders/vercel-build-output-api.ts(6,3): error TS2305: Module '"@workflow/builders"' has no exported member 'WORKFLOW_QUEUE_TRIGGER'.

Expected: Constants should be exported from packages/builders/src/index.ts so they can be imported from @workflow/builders package entry point. The constants are defined in packages/builders/src/constants.ts but not re-exported by the package's public API.

Files affected:

  • packages/cli/src/lib/builders/next-build.ts - imports from @workflow/builders
  • packages/cli/src/lib/builders/vercel-build-output-api.ts - imports from @workflow/builders
  • packages/next/src/next-builder.ts - imports from @workflow/builders

Fix: Export the constants from the package index file so they are available via the public API.

Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 Build Fix:

The STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER constants were defined in constants.ts but not exported from the main module index, causing TypeScript compilation errors when other packages tried to import them.

View Details
📝 Patch Details
diff --git a/packages/builders/src/index.ts b/packages/builders/src/index.ts
index 32a74a6..a305ca5 100644
--- a/packages/builders/src/index.ts
+++ b/packages/builders/src/index.ts
@@ -8,3 +8,4 @@ export { applySwcTransform } from './apply-swc-transform.js';
 export { createDiscoverEntriesPlugin } from './discover-entries-esbuild-plugin.js';
 export { createNodeModuleErrorPlugin } from './node-module-esbuild-plugin.js';
 export { createSwcPlugin } from './swc-esbuild-plugin.js';
+export { STEP_QUEUE_TRIGGER, WORKFLOW_QUEUE_TRIGGER } from './constants.js';

Analysis

Missing exports cause TypeScript compilation failure

What fails: TypeScript compiler fails on packages/next/src/next-builder.ts lines 7-8 due to missing exports STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER from @workflow/builders module

How to reproduce:

cd packages/next && pnpm run build

Result:

src/next-builder.ts(7,3): error TS2305: Module '"@workflow/builders"' has no exported member 'STEP_QUEUE_TRIGGER'.
src/next-builder.ts(8,3): error TS2305: Module '"@workflow/builders"' has no exported member 'WORKFLOW_QUEUE_TRIGGER'.

Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 Build Fix:

The STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER constants were defined in constants.ts but not exported from the main index.ts file, causing TypeScript compilation errors when other packages tried to import them.

View Details
📝 Patch Details
diff --git a/packages/builders/src/index.ts b/packages/builders/src/index.ts
index 32a74a6..a305ca5 100644
--- a/packages/builders/src/index.ts
+++ b/packages/builders/src/index.ts
@@ -8,3 +8,4 @@ export { applySwcTransform } from './apply-swc-transform.js';
 export { createDiscoverEntriesPlugin } from './discover-entries-esbuild-plugin.js';
 export { createNodeModuleErrorPlugin } from './node-module-esbuild-plugin.js';
 export { createSwcPlugin } from './swc-esbuild-plugin.js';
+export { STEP_QUEUE_TRIGGER, WORKFLOW_QUEUE_TRIGGER } from './constants.js';

Analysis

Missing exports in @workflow/builders cause TypeScript compilation failure

What fails: TypeScript compiler fails on packages/next/src/next-builder.ts due to missing exports STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER from @workflow/builders module

How to reproduce:

cd packages/next && pnpm run build

Result:

src/next-builder.ts(7,3): error TS2305: Module '"@workflow/builders"' has no exported member 'STEP_QUEUE_TRIGGER'.
src/next-builder.ts(8,3): error TS2305: Module '"@workflow/builders"' has no exported member 'WORKFLOW_QUEUE_TRIGGER'.

@pranaygp pranaygp marked this pull request as draft October 26, 2025 06:49
@pranaygp pranaygp marked this pull request as ready for review October 26, 2025 06:50
Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 Build Fix:

The STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER constants were defined in constants.ts but missing from the main package exports, causing TypeScript compilation errors when other packages tried to import them.

View Details
📝 Patch Details
diff --git a/packages/builders/src/index.ts b/packages/builders/src/index.ts
index 32a74a6..a305ca5 100644
--- a/packages/builders/src/index.ts
+++ b/packages/builders/src/index.ts
@@ -8,3 +8,4 @@ export { applySwcTransform } from './apply-swc-transform.js';
 export { createDiscoverEntriesPlugin } from './discover-entries-esbuild-plugin.js';
 export { createNodeModuleErrorPlugin } from './node-module-esbuild-plugin.js';
 export { createSwcPlugin } from './swc-esbuild-plugin.js';
+export { STEP_QUEUE_TRIGGER, WORKFLOW_QUEUE_TRIGGER } from './constants.js';

Analysis

Missing exports cause TypeScript compilation failure

What fails: TypeScript compiler fails on packages/next/src/next-builder.ts due to missing exports STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER from @workflow/builders package

How to reproduce:

turbo run build --filter=@workflow/next

Result:

src/next-builder.ts(7,3): error TS2305: Module '"@workflow/builders"' has no exported member 'STEP_QUEUE_TRIGGER'.
src/next-builder.ts(8,3): error TS2305: Module '"@workflow/builders"' has no exported member 'WORKFLOW_QUEUE_TRIGGER'.

Consolidates duplicated queue trigger configurations into shared constants
in @workflow/builders package, eliminating repetition across multiple builders.

Changes:
- Created STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER constants
- Updated VercelBuildOutputAPIBuilder to use shared constants
- Updated NextBuilder (both in @workflow/next and @workflow/cli) to use constants
- Exported constants from @workflow/builders index

This ensures consistent queue configuration across all builders and makes
future updates to these settings easier to manage from a single location.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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.

2 participants