Home / Companies / Inngest / Blog / Post Details
Content Deep Dive

TypeScript SDK v4: Rewritten Middleware, Composable Triggers, Faster Steps

Blog post from Inngest

Post Details
Company
Date Published
Author
Linell Bonnette and Aaron Harper
Word Count
1,563
Language
-
Hacker News Points
-
Summary

The Inngest TypeScript SDK v4 introduces a comprehensive overhaul with key enhancements including a rewritten middleware system, type-safe trigger helpers, structured logging, and improved parallel step execution. The middleware system now utilizes a class-based approach with lifecycle hooks for better integration across function execution phases, while type-safe trigger helpers replace the centralized EventSchemas, allowing event types to be defined alongside functions for scalability and runtime validation. Structured logging adopts an object-first format, supporting custom loggers, and the optimizeParallelism feature is enabled by default for more efficient parallel workloads. Additionally, checkpointing is automatically activated, reducing latency in sequential tasks, and the API has been streamlined for greater consistency, with changes such as lazy initialization for edge environments and modifications to function triggers and server options. Upgrading to v4 involves notable breaking changes, but the transition is guided by a detailed migration guide to assist developers in adapting to the new architecture.