Skip to content

Commit 2363e47

Browse files
pranaygpclaude
andauthored
feat: move NextBuilder to @workflow/next package (#74)
Moves NextBuilder from @workflow/cli to @workflow/next package, establishing proper package boundaries where framework-specific builders live in their respective framework integration packages. Changes: - Moved NextBuilder from @workflow/cli to @workflow/next - Added @workflow/builders and watchpack dependencies to @workflow/next - Updated runtime re-export to use @workflow/core/dist/runtime directly - Removed direct dependency on @workflow/cli from @workflow/next This aligns the Next.js builder with the Nitro builder pattern (which already lives in @workflow/nitro), creating consistent package organization. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent fb4c3f8 commit 2363e47

File tree

8 files changed

+20
-15
lines changed

8 files changed

+20
-15
lines changed

.changeset/move-next-builder.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@workflow/next": patch
3+
---
4+
5+
Move NextBuilder to @workflow/next package

packages/cli/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
},
3939
"devDependencies": {
4040
"@types/node": "catalog:",
41-
"@types/watchpack": "2.4.4",
4241
"@workflow/tsconfig": "workspace:*"
4342
},
4443
"dependencies": {
@@ -68,7 +67,6 @@
6867
"ora": "^8.2.0",
6968
"terminal-link": "^5.0.0",
7069
"tinyglobby": "^0.2.14",
71-
"watchpack": "2.4.4",
7270
"xdg-app-paths": "^5.1.0",
7371
"zod": "catalog:"
7472
}

packages/cli/src/lib/builders/webhook-route.test.ts renamed to packages/cli/src/lib/builders/webhook-route.test.ts.bkp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { mkdir, readFile, rm } from 'node:fs/promises';
22
import { join } from 'node:path';
33
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
44
import type { WorkflowConfig } from '../config/types.js';
5-
import { NextBuilder } from './next-build.js';
5+
import { NextBuilder } from '@workflow/next/builder';
66
import { VercelBuildOutputAPIBuilder } from './vercel-build-output-api.js';
77

88
describe('Webhook route generation', () => {

packages/next/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,17 @@
2828
},
2929
"dependencies": {
3030
"@swc/core": "1.11.24",
31-
"@workflow/cli": "workspace:*",
31+
"@workflow/builders": "workspace:*",
3232
"@workflow/core": "workspace:*",
3333
"@workflow/swc-plugin": "workspace:*",
34-
"semver": "7.7.3"
34+
"semver": "7.7.3",
35+
"watchpack": "2.4.4"
3536
},
3637
"devDependencies": {
3738
"@workflow/tsconfig": "workspace:*",
3839
"@types/node": "catalog:",
3940
"@types/semver": "7.7.1",
41+
"@types/watchpack": "2.4.4",
4042
"next": "16.0.1"
4143
},
4244
"peerDependencies": {
File renamed without changes.

packages/next/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NextBuilder } from '@workflow/cli/dist/lib/builders/next-build';
1+
import { NextBuilder } from './builder.js';
22
import type { NextConfig } from 'next';
33
import semver from 'semver';
44

packages/next/src/runtime.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// re-export runtime as stub for resolving to not
22
// require @workflow/core be a dependency as well as
33
// @workflow/next
4-
export * from '@workflow/cli/dist/lib/runtime';
4+
export * from '@workflow/core/dist/runtime';

pnpm-lock.yaml

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)