-
Couldn't load subscription status.
- Fork 55
refactor: standardize method naming and clarify log messages #79
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
base: pranaygp/deduplicate-config-generation
Are you sure you want to change the base?
refactor: standardize method naming and clarify log messages #79
Conversation
🦋 Changeset detectedLatest commit: 1e73424 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.
|
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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 @workflow/builders package was missing exports for STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER constants that were being imported by the @workflow/next package, causing TypeScript compilation to fail.
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 because STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER are not exported 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 module index file, causing TypeScript compilation failures 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 TypeScript exports cause build failure
What fails: TypeScript compiler fails on 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 module entry point, causing TypeScript compilation failures 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 lines 7-8 due to missing exports for STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER from @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.
🔧 Build Fix:
The constants STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER were defined in constants.ts but not exported from the main module 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 package
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 package
How to reproduce:
pnpm install
cd packages/errors && pnpm run build
cd ../builders && pnpm run build
cd ../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:
Missing exports for STEP_QUEUE_TRIGGER and WORKFLOW_QUEUE_TRIGGER constants that are defined in constants.ts but not exported from the package index.
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 in packages/next/src/next-builder.ts due to missing exports from @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/cli/src/lib/builders/base-builder.ts (line 525):
Incomplete refactoring: The method buildClientLibrary() was not renamed to createClientLibrary() in this file, while the same method was renamed in packages/builders/src/base-builder.ts. This breaks the established naming convention pattern and leaves inconsistent code.
View Details
📝 Patch Details
diff --git a/packages/cli/src/lib/builders/base-builder.ts b/packages/cli/src/lib/builders/base-builder.ts
index 9ac184c..32f8afc 100644
--- a/packages/cli/src/lib/builders/base-builder.ts
+++ b/packages/cli/src/lib/builders/base-builder.ts
@@ -522,7 +522,7 @@ export const POST = workflowEntrypoint(workflowCode);`;
await interimBundleCtx.dispose();
}
- protected async buildClientLibrary(): Promise<void> {
+ protected async createClientLibrary(): Promise<void> {
if (!this.config.clientBundlePath) {
// Silently exit since no client bundle was requested
return;
Analysis
Incomplete refactoring: buildClientLibrary() not renamed to createClientLibrary()
What fails: Method naming inconsistency in packages/cli/src/lib/builders/base-builder.ts - the method buildClientLibrary() at line 525 violates the established naming convention pattern while all other protected methods use the create* prefix.
How to reproduce:
# Examine both base-builder files:
grep "protected async.*ClientLibrary" packages/builders/src/base-builder.ts
grep "protected async.*ClientLibrary" packages/cli/src/lib/builders/base-builder.tsWhat was happening:
packages/builders/src/base-builder.tsline 525:protected async createClientLibrary()packages/cli/src/lib/builders/base-builder.tsline 525:protected async buildClientLibrary()← inconsistent
The refactoring PR introduced a clear naming pattern where protected/shared methods in BaseBuilder use the create* prefix (e.g., createStepsBundle, createWorkflowsBundle, createWebhookBundle). However, the CLI's base-builder.ts was not updated, leaving one method with the outdated build* prefix.
Expected behavior: All protected methods in BaseBuilder should follow the create* naming convention for consistency.
Fix applied: Renamed buildClientLibrary() to createClientLibrary() in packages/cli/src/lib/builders/base-builder.ts to align with the established pattern and match the implementation in packages/builders/src/base-builder.ts.
e832c5b to
9290a95
Compare
80c6b7d to
a2278db
Compare
Improves code consistency by standardizing method naming conventions and clarifying log messages across builders. Changes: - Renamed buildClientLibrary() to createClientLibrary() in BaseBuilder to match the convention where "create" is used for protected/shared methods - Updated all callers in StandaloneBuilder and VercelBuildOutputAPIBuilder - Clarified log messages in StandaloneBuilder by removing "Vercel API" prefix since this builder is framework-agnostic This establishes a clear pattern: - Public/template methods in subclasses: build* (buildStepsFunction, etc.) - Protected/shared methods in BaseBuilder: create* (createStepsBundle, etc.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
9290a95 to
1e73424
Compare
a2278db to
5a75dcb
Compare

Improves code consistency by standardizing method naming conventions and
clarifying log messages across builders.
Changes:
the convention where "create" is used for protected/shared methods
since this builder is framework-agnostic
This establishes a clear pattern:
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com