-
Notifications
You must be signed in to change notification settings - Fork 158
refactor: extract queue trigger configuration constants #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 3f2990b The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
69042df to
c1efef8
Compare
dae68ac to
c1e7d6c
Compare
There was a problem hiding this 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 buildResult:
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'.There was a problem hiding this 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 buildResult:
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'.There was a problem hiding this 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 typecheckResult: 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/builderspackages/cli/src/lib/builders/vercel-build-output-api.ts- imports from@workflow/builderspackages/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.
There was a problem hiding this 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 buildResult:
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'.There was a problem hiding this 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 buildResult:
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'.There was a problem hiding this 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/nextResult:
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'.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 Build Fix:
The TypeScript configuration was overriding the base configuration's modern module resolution with the legacy "moduleResolution": "node" setting, preventing proper resolution of the @workflow/core/runtime import.
View Details
📝 Patch Details
diff --git a/packages/next/tsconfig.json b/packages/next/tsconfig.json
index 1397247..3628e17 100644
--- a/packages/next/tsconfig.json
+++ b/packages/next/tsconfig.json
@@ -2,9 +2,7 @@
"extends": "@workflow/tsconfig/base.json",
"compilerOptions": {
"outDir": "dist",
- "target": "es2022",
- "module": "commonjs",
- "moduleResolution": "node"
+ "target": "es2022"
},
"include": ["src"],
"exclude": ["node_modules", "**/*.test.ts"]
Analysis
TypeScript module resolution error in @workflow/next package
What fails: TypeScript compilation fails in src/runtime.ts at line 4, column 15, when attempting to import from @workflow/core/runtime
How to reproduce:
cd packages/next && pnpm run buildResult:
src/runtime.ts(4,15): error TS2307: Cannot find module '@workflow/core/runtime' or its corresponding type declarations.
There are types at '/vercel/path0/packages/next/node_modules/@workflow/core/dist/runtime.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.Root cause: The packages/next/tsconfig.json was overriding the base configuration's moduleResolution: "node16" with moduleResolution: "node", which cannot properly resolve package.json exports for the @workflow/core/runtime subpath import.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 Build Fix:
The TypeScript module resolution setting "node" cannot resolve ES module imports from @workflow/core/runtime, causing build compilation to fail. Updated to "bundler" resolution with "ES2022" module format to properly handle mixed module types.
View Details
📝 Patch Details
diff --git a/packages/next/tsconfig.json b/packages/next/tsconfig.json
index 1397247..47f244f 100644
--- a/packages/next/tsconfig.json
+++ b/packages/next/tsconfig.json
@@ -3,8 +3,8 @@
"compilerOptions": {
"outDir": "dist",
"target": "es2022",
- "module": "commonjs",
- "moduleResolution": "node"
+ "module": "ES2022",
+ "moduleResolution": "bundler"
},
"include": ["src"],
"exclude": ["node_modules", "**/*.test.ts"]
Analysis
TypeScript module resolution failure prevents build compilation
What fails: TypeScript compiler fails on packages/next/src/runtime.ts(4,15) due to module resolution mismatch between CommonJS and ES modules
How to reproduce:
cd packages/next && pnpm run buildResult:
src/runtime.ts(4,15): error TS2307: Cannot find module '@workflow/core/runtime' or its corresponding type declarations.
There are types at '/vercel/path0/packages/next/node_modules/@workflow/core/dist/runtime.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 Build Fix:
The TypeScript configuration overrides the base moduleResolution setting with legacy "node" resolution, preventing import of @workflow/core/runtime in modern ES module workspace setup.
View Details
📝 Patch Details
diff --git a/packages/next/tsconfig.json b/packages/next/tsconfig.json
index 1397247..a78dbf4 100644
--- a/packages/next/tsconfig.json
+++ b/packages/next/tsconfig.json
@@ -1,10 +1,7 @@
{
"extends": "@workflow/tsconfig/base.json",
"compilerOptions": {
- "outDir": "dist",
- "target": "es2022",
- "module": "commonjs",
- "moduleResolution": "node"
+ "outDir": "dist"
},
"include": ["src"],
"exclude": ["node_modules", "**/*.test.ts"]
Analysis
TypeScript module resolution failure in @workflow/next package
What fails: TypeScript compilation in packages/next/src/runtime.ts fails with module resolution error for @workflow/core/runtime import
How to reproduce:
cd packages/next && pnpm run buildResult:
src/runtime.ts(4,15): error TS2307: Cannot find module '@workflow/core/runtime' or its corresponding type declarations.
There are types at '/vercel/path0/packages/next/node_modules/@workflow/core/dist/runtime.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 Build Fix:
The TypeScript configuration uses legacy moduleResolution: "node" which cannot resolve imports from ESM packages like @workflow/core. The error suggests updating to modern module resolution.
View Details
📝 Patch Details
diff --git a/packages/next/tsconfig.json b/packages/next/tsconfig.json
index 1397247..615e7d9 100644
--- a/packages/next/tsconfig.json
+++ b/packages/next/tsconfig.json
@@ -3,8 +3,8 @@
"compilerOptions": {
"outDir": "dist",
"target": "es2022",
- "module": "commonjs",
- "moduleResolution": "node"
+ "module": "nodenext",
+ "moduleResolution": "nodenext"
},
"include": ["src"],
"exclude": ["node_modules", "**/*.test.ts"]
Analysis
TypeScript module resolution error in @workflow/next package
What fails: TypeScript compiler fails on src/runtime.ts due to incompatible module resolution settings when importing from @workflow/core/runtime
How to reproduce:
cd packages/next && pnpm run buildResult:
src/runtime.ts(4,15): error TS2307: Cannot find module '@workflow/core/runtime' or its corresponding type declarations.
There are types at '/vercel/sandbox/primary/packages/next/node_modules/@workflow/core/dist/runtime.d.ts', but this result could not be resolved under your current 'moduleResolution' setting. Consider updating to 'node16', 'nodenext', or 'bundler'.
8696674 to
4f44c89
Compare
ff5da65 to
ff3bb3f
Compare
ff3bb3f to
c92ceeb
Compare
4f44c89 to
2363e47
Compare
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 <[email protected]>
c92ceeb to
3f2990b
Compare

Consolidates duplicated queue trigger configurations into shared constants
in @workflow/builders package, eliminating repetition across multiple builders.
Changes:
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 [email protected]