-
Notifications
You must be signed in to change notification settings - Fork 80
refactor: deduplicate package.json and .vc-config.json generation #77
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 6377dc7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 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 |
69042df to
c1efef8
Compare
003572a to
80c6b7d
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:
The STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER constants were defined in constants.ts but missing from the main exports in index.ts, causing TypeScript compilation errors 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 @workflow/builders
How to reproduce:
cd packages/builders && pnpm build
cd ../next && pnpm 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 module's main index file, causing import failures in other 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 at lines 7-8 due to missing exports STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER from the @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 from @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 not exported from the main entry point, 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 in @workflow/next package
What fails: TypeScript compiler fails on packages/next/src/next-builder.ts due to missing exports for STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER from @workflow/builders package
How to reproduce:
pnpm 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'.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 TypeScript compilation errors when importing 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 in @workflow/next
What fails: TypeScript compiler fails on packages/next/src/next-builder.ts due to missing exports from @workflow/builders package
How to reproduce:
cd packages/next && pnpm 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'.c1efef8 to
ed3fe8c
Compare
80c6b7d to
a2278db
Compare
c92ceeb to
3f2990b
Compare
b3da019 to
9a111f9
Compare
Extracts repeated package.json and .vc-config.json generation logic into reusable helper methods in BaseBuilder, eliminating code duplication across VercelBuildOutputAPIBuilder. Changes: - Added createPackageJson() helper method to BaseBuilder - Added createVcConfig() helper method with sensible defaults - Updated VercelBuildOutputAPIBuilder (both in @workflow/builders and @workflow/cli) to use the new helper methods - Reduced configuration code from ~20 lines per function to ~3 lines This makes the build code more maintainable and ensures consistent configuration across all Vercel Build Output API functions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
9a111f9 to
6377dc7
Compare

Extracts repeated package.json and .vc-config.json generation logic into
reusable helper methods in BaseBuilder, eliminating code duplication across
VercelBuildOutputAPIBuilder.
Changes:
to use the new helper methods
This makes the build code more maintainable and ensures consistent configuration
across all Vercel Build Output API functions.
🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]