fix(nest): derive workflow builder defaults#2723
Conversation
🦋 Changeset detectedLatest commit: 50cda84 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 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 |
📊 Benchmark Results
workflow with no steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Next.js (Turbopack) | Express workflow with 1 step💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) workflow with 10 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) workflow with 25 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) workflow with 50 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) Promise.all with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) Promise.all with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) Promise.all with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) Promise.race with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) Promise.race with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) Promise.race with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) workflow with 10 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) workflow with 25 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) workflow with 50 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) workflow with 10 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) workflow with 25 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) workflow with 50 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) stream pipeline with 5 transform steps (1MB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) 10 parallel streams (1MB each)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) fan-out fan-in 10 streams (1MB each)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
|
🧪 E2E Test Results✅ All tests passed Summary
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
✅ 📋 Other
|
| function readJsonIfExists<T extends object>(path: string): T | undefined { | ||
| if (!existsSync(path)) return undefined; | ||
|
|
||
| const value = JSON.parse(readFileSync(path, 'utf-8')); |
There was a problem hiding this comment.
| const value = JSON.parse(readFileSync(path, 'utf-8')); | |
| let value: unknown; | |
| try { | |
| value = JSON.parse(readFileSync(path, 'utf-8')); | |
| } catch { | |
| // Config files such as tsconfig.json are commonly authored as JSONC | |
| // (with comments / trailing commas), which JSON.parse cannot handle. | |
| // Fall back to defaults instead of crashing app startup / the build. | |
| return undefined; | |
| } |
readJsonIfExists calls JSON.parse without a try/catch, so a JSONC tsconfig.json (comments/trailing commas) throws an uncaught error that crashes WorkflowModule.forRoot() at module-load time instead of falling back to defaults.
Refs #2716.
Summary
nest-cli.json#sourceRoot.swcrcandtsconfig.jsonprojectRootfrom the nearest workspace root while keeping explicit Workflow options as overridesVerification
PATH="/tmp/workflow-pnpm10-bin:/Users/nathancolosimo/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH" pnpm --filter @workflow/nest testPATH="/tmp/workflow-pnpm10-bin:/Users/nathancolosimo/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH" pnpm turbo build --filter @workflow/nestDocs Preview
Pending Vercel preview comment. This PR updates:
docs/content/docs/v4/getting-started/nestjs.mdx->/docs/getting-started/nestjsdocs/content/docs/v5/getting-started/nestjs.mdx->/v5/docs/getting-started/nestjsNote: local commits are using
HUSKY=0because the current local pre-commit hook invokes pnpm 11, which rejects this repo's current pnpm config layout before code checks run. The focused package tests passed with the pinned pnpm 10 path.