./packages/inngest/README.md
Package detail
inngest
Official SDK for Inngest.com. Inngest is the reliability layer for modern applications. Inngest combines durable execution, events, and queues into a zero-infra platform with built-in observability.
readme
changelog
inngest
3.35.0
Minor Changes
#912
a641cc2
Thanks @jpwilliams! - Adds afetch
export from"inngest"
to allow any library that accepts a Fetch API-compatible function to automatically turn any call into a durable step if used within the context of an Inngest Function.By default, if called outside of the context of an Inngest Function (or within an existing step), it will fall back to using the global
fetch
, or a fallback of the user's choice.// Basic use import { fetch } from "inngest"; const api = new MyProductApi({ fetch });
// With a fallback import { fetch } from "inngest"; const api = new MyProductApi({ fetch: fetch.config({ fallback: myCustomFetchFallback, }), });
// Remove the default fallback and error if called outside an Inngest Function import { fetch } from "inngest"; const api = new MyProductApi({ fetch: fetch.config({ fallback: undefined, }), });
It's also available within a function as
step.fetch
.inngest.createFunction( { id: "my-fn", }, { event: "my-event", }, async ({ step }) => { const api = new MyProductApi({ fetch: step.fetch }); }, );
3.34.5
Patch Changes
#944
54b860a
Thanks @amh4r! - Use x-inngest-event-id-seed header instead of event idempotency ID#937
c6e9131
Thanks @jpwilliams! - Normalize headers in"inngest/lambda"
- mocked requests with non-lowercase headers are now handled#945
4506581
Thanks @jpwilliams! - BumpresolveAfterPending()
microtask shim count to100
, reducing parallel index warnings
3.34.4
Patch Changes
- #942
3903aa7
Thanks @jpwilliams! - Addinngest/function.cancelled
event to known internal schemas
3.34.3
Patch Changes
- #938
efd658c
Thanks @anafilipadealmeida! - Update description forbatchSize
; pricing plans decide on max limits
3.34.2
Patch Changes
- #934
abae7fc
Thanks @jpwilliams! - RequirerunId
when publishing realtime messages
3.34.1
Patch Changes
- #925
11fd15b
Thanks @jpwilliams! - ExportfastifyPlugin
as a named export to resolve CJS<->ESM interop issues
3.34.0
Minor Changes
#919
ebeaaff
Thanks @jpwilliams! - AdddependencyInjectionMiddleware()
, allowing you to easily add data to function inputimport { dependencyInjectionMiddleware } from "inngest"; const prisma = new Prisma(); const inngest = new Inngest({ id: "my-app", middleware: [dependencyInjectionMiddleware({ prisma })], });
Patch Changes
- #922
3374187
Thanks @jpwilliams! -Error.cause
can now be anyunknown
value, though we still attempt to recursively expand causes until we hit anunknown
value
3.33.0
Minor Changes
#918
a305a15
Thanks @jpwilliams! - Add support for Temporal APIs.inngest.createFunction( { id: "my-fn", }, { event: "test/hello.world", }, async ({ event, step }) => { // sleep with a `Temporal.Duration` await step.sleep("😴", Temporal.Duration.from({ seconds: 10 })); await step.sleep("😴", Temporal.Duration.from({ minutes: 5 })); await step.sleep("😴", Temporal.Duration.from({ hours: 1 })); // sleepUntil using a `Temporal.Instant` or `Temporal.ZonedDateTime` await step.sleepUntil( "😴", Temporal.Instant.from("2025-03-19T12:00:00Z"), ); await step.sleepUntil( "😴", Temporal.ZonedDateTime.from("2025-03-19T12:00[Europe/London]"), ); // sleepUntil also works with relative time const now = Temporal.Instant.from(event.user.createdAtISO); await step.sleepUntil( "😴", now.add(Temporal.Duration.from({ minutes: 30 })), ); }, );
Patch Changes
#745
ff01cd2
Thanks @jpwilliams! - Fix rare body reuse when parsing failure returns frominngest.send()
andstep.sendEvent()
#916
ab835ee
Thanks @BrunoScheufler! - - Connect: Allow supplying Inngest env as environment variable#913
b090e27
Thanks @jpwilliams! - Export theversion
of the package#921
374727f
Thanks @BrunoScheufler! - connect: Include RunID in acks / sdk response
3.32.9
Patch Changes
3.32.8
Patch Changes
- #910
d184913
Thanks @jpwilliams! - FixshouldOptimizeParallelism()
error when attempting to serve functions using multiple versions ofinngest
3.32.7
Patch Changes
- #889
5d5bd10
Thanks @jpwilliams! - Automatically set all AI models exports in step tooling based on@inngest/ai
version
3.32.6
Patch Changes
#892
cb165d1
Thanks @jpwilliams! - Add APIs in preparation for realtime calls#892
cb165d1
Thanks @jpwilliams! - AddexecutingStep
as an ALS property, allowing async contexts to ascertain whether we are in or out of a step
3.32.5
Patch Changes
- #885
90f7c77
Thanks @charlypoly! - chore: bump@inngest/ai
3.32.4
Patch Changes
- #879
94ce222
Thanks @charlypoly! - chore(inngest): bump@inngest/ai
3.32.3
Patch Changes
- #877
b9a6e89
Thanks @jpwilliams! -getAsyncCtx()
now correctly finds context when called within:step.run()
calls- Middleware hooks
3.32.2
Patch Changes
#875
80837fd
Thanks @jpwilliams! - Connect now sets the connection state toCLOSING
while handling and flushing any pending messages instead of immediately going toCLOSED
Updated dependencies [
6e8b258
]:
3.32.1
Patch Changes
- #872
5c87495
Thanks @jpwilliams! - Upgrade to@inngest/ai@0.0.5
for better cross-package compatibility
3.32.0
Minor Changes
- #862
4330563
Thanks @jpwilliams! - Allow opting in to optimized parallelism
Patch Changes
#862
4330563
Thanks @jpwilliams! - Optimize step data that's been promisified using@inngest/test
or middleware
3.31.13
Patch Changes
#865
b2ff76d
Thanks @jpwilliams! - Ensure support fortypescript@~5.8.0
No notable changes have been made, though minor TypeScript versions often affect transpiled outputs.
3.31.12
Patch Changes
#864
e47965e
Thanks @jpwilliams! - Fix event sending failing in some edge environments due to not findingglobal.crypto
orglobalThis.crypto
when creating idempotency IDs#856
cd63ce3
Thanks @BrunoScheufler! - - Connect: Prefer functions passed throughapps
but fall back to functions registered on the client#858
ce0c5a8
Thanks @jpwilliams! - Optimize function memoization
3.31.11
Patch Changes
- #851
7f96793
Thanks @BrunoScheufler! - Connect: Allow multi-app connections
3.31.10
Patch Changes
- #852
518a5b8
Thanks @charlypoly! - chore: bump@inngest/ai
to0.0.4
3.31.9
Patch Changes
3.31.8
Patch Changes
- #845
a2aadb1
Thanks @BrunoScheufler! - - Connect: Forward tracing and parse user tracing headers
3.31.7
Patch Changes
- #842
4237efd
Thanks @jpwilliams! - Allow for use ofexactOptionalPropertyTypes: true
when serving
3.31.6
Patch Changes
- #840
b24fd30
Thanks @BrunoScheufler! - Sync: Provide app version in register request
3.31.5
Patch Changes
#837
cb00a46
Thanks @BrunoScheufler! - Connect: Rename buildId -> appVersion#838
ece27d7
Thanks @amh4r! - Fix missing env for introspection and in-band sync
3.31.4
Patch Changes
- #834
b304e1c
Thanks @BrunoScheufler! - - Remove connect from inngest client, split out intoinngest/connect
3.31.3
Patch Changes
- #831
c331190
Thanks @BrunoScheufler! - - Read signing key from env var for connect
3.31.2
Patch Changes
#824
1d72eae
Thanks @BrunoScheufler! - - Handle immediate WebSocket failure when connecting to gateway#822
1136087
Thanks @jpwilliams! - Sending events now has retries, backing off over 5 attempts
3.31.1
Patch Changes
#817
446be1b
Thanks @jpwilliams! -serve()
andconnect()
now have looser typing forclient
andfunctions
, resulting in easier use of multipleinngest
packages in a single process#823
f1d2385
Thanks @jpwilliams! - Allow wildcard event typing with.fromRecord()
The following schema is now valid:
export const schemas = new EventSchemas().fromRecord<{ "app/blog.post.*": | { name: "app/blog.post.created"; data: { postId: string; authorId: string; createdAt: string; }; } | { name: "app/blog.post.published"; data: { postId: string; authorId: string; publishedAt: string; }; }; }>();
When creating a function, this allows you to appropriately type narrow the event to pull out the correct data:
inngest.createFunction( { id: "my-fn" }, { event: "app/blog.post.*" }, async ({ event }) => { if (event.name === "app/blog.post.created") { console.log("Blog post created at:", event.data.createdAt); } else if (event.name === "app/blog.post.published") { console.log("Blog post published at:", event.data.publishedAt); } }, );
#825
661ed7b
Thanks @jpwilliams! - If nofunctions
are provided toinngest.connect()
, it will now use any functions that have been created with the client insteadUpdated dependencies [
fadd94a
]:
3.31.0
Minor Changes
#820
cb02190
Thanks @amh4r! - Make INNGEST_ALLOW_IN_BAND_SYNC opt out#813
f42ab05
Thanks @BrunoScheufler! - Add initialconnect()
support
Patch Changes
#818
c99b05f
Thanks @BrunoScheufler! - Add reconnection support toconnect()
#819
7a5f4a5
Thanks @jpwilliams! - Setinngest
's ALS in global state to be able access it across versions and package boundaries
3.30.0
Minor Changes
#805
9f4244f
Thanks @jpwilliams! - You can now add adescription
when creating an Inngest function#804
7459239
Thanks @jpwilliams! - AddInngestFunction#absoluteId()
to get the absolute ID of anInngestFunction
Patch Changes
#803
008d971
Thanks @jpwilliams! -myFn["client"]
is now typed#802
32518bf
Thanks @jpwilliams! - Use@inngest/ai
to expose AI models, adapters, and typesUpdated dependencies [
32518bf
]:
3.29.3
Patch Changes
#798
f426ba6
Thanks @jpwilliams! - Fix named functions returningnever[]
for their parameters when passed tostep.run()
// This now works step.run("", function named() {});
3.29.2
Patch Changes
3.29.1
Patch Changes
- #794
6ffe983
Thanks @djfarrelly! - Fix inline example to match v3
3.29.0
Minor Changes
- #788
bf1c0d1
Thanks @djfarrelly! - Add vanilla Node.js serve handler
3.28.0
Minor Changes
#776
0dbcc87
Thanks @jpwilliams! - Add experimentalgetAsyncCtx()
, allowing the retrieval of a run's input (event
,step
,runId
, etc) from the relevant async chain.import { getAsyncCtx } from "inngest/experimental"; const ctx = await getAsyncCtx();
Patch Changes
- #776
0dbcc87
Thanks @jpwilliams! - Use@inngest/test@workspace:^
internally for testing
3.27.5
Patch Changes
3.27.4
Patch Changes
- #770
3aab141
Thanks @jpwilliams! - Widen theAiAdapter
types to allow for easy overrides
3.27.3
Patch Changes
- #768
af66ad5
Thanks @charlypoly! - Addo1-preview
ando1-mini
to possible OpenAI models
3.27.2
Patch Changes
- #766
fa74c6a
Thanks @jpwilliams! - Add missingfinish_reason
to OpenAI output types
3.27.1
Patch Changes
3.27.0
Minor Changes
Patch Changes
#760
efc6c79
Thanks @jpwilliams! - Ensure support fortypescript@~5.7.0
No notable changes have been made, though minor TypeScript versions often affect transpiled outputs.
3.26.3
Patch Changes
#758
8af4c25
Thanks @jpwilliams! - Fix OpenAItools
types - not properly scoped#757
36b61f0
Thanks @jpwilliams! - Fix false indeterminate function warning#756
7916c06
Thanks @jpwilliams! - Expose a type that lists theAiAdapter
for each format
3.26.2
Patch Changes
- #754
2e42438
Thanks @jpwilliams! - Move AI providers to instead be adapters and models
3.26.1
Patch Changes
- #752
290ad29
Thanks @jpwilliams! - Allow editingstep.ai.infer()
3.26.0
Minor Changes
- #747
871a958
Thanks @jacobheric! - Addstep.ai.*()
tooling, allowing users to leverage AI workflows within Inngest functions
3.25.1
Patch Changes
#737
aff2a3c
Thanks @jpwilliams! - Fix response signing being able to fail silently
3.25.0
Minor Changes
3.24.0
Minor Changes
- #685
801946b
Thanks @jpwilliams! - Add"inngest/nitro"
serve handler
Patch Changes
#729
511c2a1
Thanks @amh4r! - Fix crash when receiving a PUT without a body#685
801946b
Thanks @jpwilliams! - Fix imports requiring internal extensions when being consumed by true ESM
3.23.1
Patch Changes
#657
7ca9537
Thanks @jpwilliams! - ExposeEventSchemas
inInngest
instances#311
a53356a
Thanks @jpwilliams! - Add streaming capabilities to"inngest/cloudflare"
handler
3.23.0
Minor Changes
- #702
4df5a01
Thanks @jpwilliams! - Add support for in-band syncing
Patch Changes
- #721
59fa466
Thanks @jpwilliams! - Support Next.js 15 in serve handler typing
3.22.13
Patch Changes
#709
3041afe
Thanks @jpwilliams! - Ensure support for TypeScript 5.6No changes to any runtime/user-facing code has been made, but TS upgrades often alter emitted files, so the package will be bumped for folks to take advantage of any performance/compatibility improvments there.
3.22.12
Patch Changes
- #710
fc3f1e5
Thanks @jpwilliams! - Allow access to userland promises when executing for@inngest/test
3.22.11
Patch Changes
- #707
8c4b9ce
Thanks @goodoldneon! - Fix probe response sig with streaming
3.22.10
Patch Changes
- #705
f229dea
Thanks @goszczynskip! - Fix required type annotation typescript errors;inngest/types
is now exported with a warning within the module covering its usage
3.22.9
Patch Changes
- #688
58549f3
Thanks @jpwilliams! - Expose some internal execution logic to make way for a new@inngest/test
package
3.22.8
Patch Changes
#697
56ed5c1
Thanks @jpwilliams! - Merge given env vars withprocess.env
to support partial env shims like Hono in AWS Lambda#696
9169d0e
Thanks @albertchae! - Fix typos in debounce documentation
3.22.7
Patch Changes
- #687
9f0bdc6
Thanks @MonsterDeveloper! - Add exports forJsonError
type to fix a TypeScript error when using Inngest in projects withcomposite
setting intsconfig
.
3.22.6
Patch Changes
- #690
6a97e1c
Thanks @goodoldneon! - Fix 401 on missing sig header during inspection
3.22.5
Patch Changes
#682
2019fe2
Thanks @goodoldneon! - Fix empty response body when streaming#684
ae7ea5c
Thanks @jpwilliams! - Allow passingerror
when transforming outputs in middleware
3.22.4
Patch Changes
- #674
4100172
Thanks @jpwilliams! - Add trust probes and response signing for syncing validation
3.22.3
Patch Changes
- #677
f4c3dc4
Thanks @goodoldneon! - Fix wrong URL when INNGEST_DEV=1
3.22.2
Patch Changes
- #671
4f91d9c
Thanks @jpwilliams! - Add de(serialization) ofError.cause
, meaning nested errors can now be correctly used withStepError
3.22.1
Patch Changes
- #667
7e0fd10
Thanks @goodoldneon! - Fix event key hash exists when event key is not set
3.22.0
Minor Changes
- #665
1a4962d
Thanks @jpwilliams! - Addinngest.setEnvVars(env)
to set env vars late on the client
3.21.2
Patch Changes
- #660
4ba0ccb
Thanks @jpwilliams! - Revert not allowing objectish ([]
) values inevent.data
3.21.1
Patch Changes
#655
12df420
Thanks @jpwilliams! - Do not allow objectish[]
for an event'sdata
when providing schemasThis helps solve an issue whereby types would be happy but sending an event fails at runtime.
3.21.0
Minor Changes
#651
a527cd3
Thanks @jpwilliams! - Add a newonFunctionRun.finished
middleware hook, allowing you to hook into a run finishing successfully or failingnew InngestMiddleware({ name: "My Middleware", init() { return { onFunctionRun() { finished({ result }) { // ... }, }, }; }, });
#650
db9ed0e
Thanks @jpwilliams! - Allow specifying anenv
when sending events via the clientawait inngest.send({ name: "my.event" }, { env: "my-custom-env" });
Patch Changes
#646
0c5865c
Thanks @jpwilliams! - Fix circularctx
type in middleware for TS <5.1#651
a527cd3
Thanks @jpwilliams! - FixbeforeExecution()
hook order when all state has been used running beforeafterMemoization()
3.20.0
Minor Changes
- #645
809b4ef
Thanks @BrunoScheufler! - Introduces support for thekey
expression on the batchEvents configuration. This can be used to batch events by customer. For more details, check out the batching documentation!
3.19.22
Patch Changes
#644
7eb27e4
Thanks @jpwilliams! - Loosen typing onmatch
options and mark as deprecated to remove performance concerns in codebases with a very large number of event types; allmatch
fields are now simply typed asstring
#641
99f196a
Thanks @jpwilliams! - Remove incorrect type showing internal events instep.waitForEvent()
3.19.21
Patch Changes
- #622
c041d6f
Thanks @jpwilliams! - Fix rare theoretical checkpoint hang
3.19.20
Patch Changes
#636
b0e6237
Thanks @goodoldneon! - Fix inferred dev mode resulting in contacting the production API when fetching large state#634
ac402ef
Thanks @jpwilliams! - Change an error when function configuration is invalid to a warning instead
3.19.19
Patch Changes
#631
ac6796c
Thanks @jpwilliams! - Fix exception being thrown fromdebug
when used with Nitro running on Cloudflare Pages191fe36
Thanks @jpwilliams! - Fix failure handlers incorrectly inheriting config options such asbatchEvents
andconcurrency
from their parent function#630
d4de6d7
Thanks @stefanosala! - Fix missing config fields such asconcurrency
when validating
3.19.18
Patch Changes
#625
3ae2c9b
Thanks @goodoldneon! - Clearly log invalid function configurations for users, circumventing non-exhaustive typing for extraneous properties in client and function config#628
996c0c5
Thanks @goodoldneon! - Removed inspect message
3.19.17
Patch Changes
#623
cc96657
Thanks @jpwilliams! - Upgraded TypeScript to 5.5.No change in behaviour or downstream compatibility is expected, but emitted declaration files will still change, so the patch version will bump for all affected packages.
#626
6e41c90
Thanks @cohlar! - ExportScheduledTimerEventPayload
for ESM
3.19.16
Patch Changes
#618
1f0cb29
Thanks @MonsterDeveloper! - ExposeInngestFunction#createExecution()
as aprotected
method to allow custom unit testing.Note that this is an internal API and can change at any time; first-party testing tools will be adde at a later date.
3.19.15
Patch Changes
- #619
7542fc2
Thanks @jpwilliams! -"inngest/cloudflare"
serve handler now supports both Cloudflare Pages Functions and Cloudflare Workers
3.19.14
Patch Changes
#611
f36c442
Thanks @jpwilliams! - Add support for globalNetlify.env
objects when accessing environment variables#614
7970faa
Thanks @goodoldneon! - Fix attempting to register without a path when using a URL fromINNGEST_DEV
#615
baa9e5e
Thanks @jpwilliams! - Add maximum recursion depth for object path typing forstep.waitForEvent()
'smatch
andcancelOn
3.19.13
Patch Changes
- #612
2d6e4e1
Thanks @goodoldneon! - Fix event key appearing invalid when securely introspected via the dashboard
3.19.12
Patch Changes
- #604
8b41f6b
Thanks @jpwilliams! - Give allserve()
-related peer dependencies a wider range and make them optional, silencing warnings when installinginngest
3.19.11
Patch Changes
#597
cf22183
Thanks @jpwilliams! - Fix serve handler'sfetch
implementation incorrectly being marked as custom if no customfetch
is given tonew Inngest()
#597
cf22183
Thanks @jpwilliams! - Reduce incorrect occurences of the following log when a call withfetch
failsA request failed when using a custom fetch implementation; this may be a misconfiguration. Make sure that your fetch client is correctly bound to the global scope.
3.19.10
Patch Changes
- #599
a2e7bd7
Thanks @jpwilliams! - Widen@sveltejs/kit
peer dep range to>=1.27.3
from^1.27.3
3.19.9
Patch Changes
#595
dd7f5ac
Thanks @jpwilliams! - Set explicit return types for"inngest/fastify"
for JSR publishing519d66b
Thanks @jpwilliams! - Allowed secure introspection of the Inngest endpoint for improved debugging and observability#594
41b02b2
Thanks @jpwilliams! - Fix typing for"inngest/lambda"
handler being incorrect Proxy type
3.19.8
Patch Changes
#584
ab21a6e
Thanks @jpwilliams! - Add JSR badge toREADME.md
#587
c51c3df
Thanks @jpwilliams! - Documented all entrypoints with@module
comments
3.19.7
Patch Changes
- #582
5d1ad4a
Thanks @jpwilliams! - Allow in-CI changes when publishing to JSR; mostly a vanity bump
3.19.6
Patch Changes
- #580
d8a2de0
Thanks @jpwilliams! - Vanity bump for JSR deploy
3.19.5
Patch Changes
- #576
f1be005
Thanks @jpwilliams! - Fix function-level middleware typing being missing; only client-level was providing types
3.19.4
Patch Changes
#571
67ca3aa
Thanks @jpwilliams! - Fix"inngest/hono"
serve handler not handling relative and absolutereq.url
#571
67ca3aa
Thanks @jpwilliams! - Fix"inngest/hono"
serve handler not parsing environment variables
3.19.3
Patch Changes
- #573
2b208af
Thanks @goodoldneon! - More gracefully handle non-JSON sync responses.
3.19.2
Patch Changes
- #569
f79e3e2
Thanks @goodoldneon! - Omitid
when specifying an event forstep.invoke()
; idempotency IDs are not used here
3.19.1
Patch Changes
- #561
405733f
Thanks @jpwilliams! - Optimize memoization of steps, providing a performance improvement of up 48x for very high step counts
3.19.0
Minor Changes
- #539
24f1e7d
Thanks @prettyirrelevant! - Added framework support for Hono
3.18.1
Patch Changes
#520
0703740
Thanks @jpwilliams! - Add selective header forwarding when sending events, allowing context propagation when tracing fanouts 👀#549
f759de1
Thanks @maktouch! - Add step name or ID when there’s a NESTING_STEPS error
3.18.0
Minor Changes
- #541
52431a6
Thanks @goodoldneon! - Add signing key rotation support
3.17.0
Minor Changes
3.16.2
Patch Changes
#538
d9d57c4
Thanks @jpwilliams! - Fix{ name: string; }
objects being filtered out ofstep.run()
responses when nullable or a union#536
73e04a5
Thanks @jpwilliams! - Do not swallow JSON parsing errors when syncing#535
09ef143
Thanks @jpwilliams! - Fix sending events sometimes returning generic errors when we can be more specific
3.16.1
Patch Changes
#518
bc494da
Thanks @jpwilliams! - INN-2861 No longer executestep.sendEvent()
inlineTo send an event in a function without making it a step function, use
inngest.send()
instead.#519
775fee7
Thanks @jpwilliams! - When timing out during parallel recovery, will now prefer logging the step's name instead of its internal hashed ID#517
f8a8f7b
Thanks @wtachau! - FixRetryAfterError
comments; it accepts milliseconds as anumber
, not seconds#521
9aa3979
Thanks @jpwilliams! - INN-2880 Add warning iffetch
fails and is a custom implementation
3.16.0
Minor Changes
- #497
e12c8a6
Thanks @jpwilliams! - Add the ability to define multiple triggers when creating a function
3.15.5
Patch Changes
#512
8f03159
Thanks @jpwilliams! - Fix union step outputs sometimes being typed asany
#512
8f03159
Thanks @jpwilliams! - Fix step output typing (Jsonify
) removing detail from mapped object types with overrides#512
8f03159
Thanks @jpwilliams! - Fix step output typing (Jsonify
) omittingunknown
and literals
3.15.4
Patch Changes
- #507
882ace7
Thanks @jpwilliams! - FixGetFunctionOutput
andstep.invoke()
typing sometimes resulting in{}
3.15.3
Patch Changes
- #500
f21ebed
Thanks @jpwilliams! - Add support for `typescript@5.4`
3.15.2
Patch Changes
- #503
f6088e0
Thanks @jpwilliams! - FixonSendEvent.transformInput()
middleware hooks not running forstep.invoke()
payloads
3.15.1
Patch Changes
- #501
0048c94
Thanks @jpwilliams! - Fix failures forcomposite: true
errors
3.15.0
Minor Changes
- #488
3d2429d
Thanks @jpwilliams! - INN-2754 Add support forINNGEST_DEV
and theisDev
option, allowing a devleoper to explicitly set either Cloud or Dev mode
Patch Changes
- #498
7c5b92e
Thanks @sylwiavargas! - Add keywords to the npm package
3.14.2
Patch Changes
#492
ad67476
Thanks @jpwilliams! - Fix delayed environment variables not using event key in"inngest/cloudflare"
#489
244b6bd
Thanks @jpwilliams! - Add generic function invocation event to all event schemas
3.14.1
Patch Changes
- #493
adaa948
Thanks @goodoldneon! - Fix registration reusing deployment IDs when reusing connections in serverless or serverful
3.14.0
Minor Changes
- #484
c2b6ec5
Thanks @jpwilliams! - Addtimeout
tostep.invoke()
options
Patch Changes
#480
e1940e4
Thanks @jpwilliams! - FixGetEvents<>
helper returning internal events by default#479
1b2eaed
Thanks @jpwilliams! - Fix requiring enum value when using an internal event as a trigger#485
16973c0
Thanks @jpwilliams! - Fix API failures being masked at runtime when fetching large step data or event batches fails
3.13.0
Minor Changes
- #475
16f02e9
Thanks @jpwilliams! - Add"inngest/bun"
serve handler for use withBun.serve()
Patch Changes
#476
4d52f01
Thanks @jpwilliams! - Makedata.error
parsing forinngest/function.failed
more resilient#478
9887ac4
Thanks @jpwilliams! - Remove sendinghash
when syncing#474
b3a7b39
Thanks @jpwilliams! - Improve UI when showing an unhandledStepError
3.12.0
Minor Changes
- #411
3b35c1c
Thanks @jpwilliams! - Add handling of per-step errors and returning step names during error cases to better display issues in the UI
Patch Changes
- #469
2f01a27
Thanks @dependabot! - Bump vite from 4.5.1 to 4.5.2 for a security fix
3.11.0
Minor Changes
Patch Changes
#463
61562bd
Thanks @jpwilliams! - Fixdata
not being required during invocation with a schema+reference#462
c449efe
Thanks @jpwilliams! - Fix not allowing a single-elementconcurrency
option in function definitions#466
ecde5b6
Thanks @jpwilliams! - Fix some out-of-date comments and examples
3.10.0
Minor Changes
#449
a452cf1
Thanks @jpwilliams! - AddreferenceFunction()
, allowing easier, typed invocation of functions across apps and languages#459
eec41d2
Thanks @jpwilliams! - Add newInngest.Any
andInngestFunction.Any
type helpers
Patch Changes
- #460
a225206
Thanks @MonsterDeveloper! - Add exports forFinishedEventPayload
andContext
types to fix a TypeScript error when using Inngest in projects withcomposite
setting intsconfig
.
3.9.0
Minor Changes
- #453
be6eb2a
Thanks @jpwilliams! - PassreqArgs
toonFunctionRun
middleware hook to be able to use request values within an Inngest function
3.8.0
Minor Changes
- #441
cb0496a
Thanks @djfarrelly! - Add new"inngest/astro"
serve handler
3.7.4
Patch Changes
#434
cb953ee
Thanks @jpwilliams! - Fix bad wildcard exportinngest/components/*
for ESM/CJS compatibility#440
0fc642d
Thanks @jpwilliams! - Fix an issue where Sentry's wrapping ofinngest/express
caused Sentry to throw a runtime error during instantiation
3.7.3
Patch Changes
- #432
ce354f3
Thanks @jpwilliams! - Add ability to usez.discriminatedUnion
andz.union
in schemas
3.7.2
Patch Changes
#426
49a58d1
Thanks @jpwilliams! - Fix internalinngest/*
events not being present when usingnew EventSchemas()
#427
5cf349c
Thanks @jpwilliams! - FixEventPayload.id
missing from typing when attempting to send events withinngest.send()
orstep.sendEvent()
3.7.1
Patch Changes
- #421
471d11f
Thanks @jpwilliams! - Fix serverless use ofinngest/next
withnext@>=13.0.0 <13.5.0
failing to return a response, as well asnext@>=13.5.0
logging the same error
3.7.0
Minor Changes
- #368
e7e845e
Thanks @jpwilliams! - Addstep.invoke()
, providing the ability to directly invoke a function as a step
Patch Changes
- #415
ea8dc6f
Thanks @jpwilliams! - Move to Apache License 2.0
3.6.2
Patch Changes
#409
b56a33e
Thanks @jpwilliams! - Support Remix env vars on Cloudflare Pages viacontext.env
#400
428a591
Thanks @jpwilliams! - Fix Next.js 13 host being stubborn when relying onreq.url
for hosts such ashost.docker.internal
#408
4066217
Thanks @jpwilliams! - ForwardX-Inngest-Server-Kind
headers to assist in preventing some issues with registration handshakes#406
be5544b
Thanks @jpwilliams! - Fix correctness issues in generated*.d.ts
files, causing errors for some versions/configurations of TypeScript withskipLibCheck: false
3.6.1
Patch Changes
#401
c77f6d7
Thanks @tonyhb! - Remove "Step already exists; automatically indexing" log#395
aebc2c4
Thanks @jpwilliams! - FixhasEventKey
inGET
request always returningtrue
3.6.0
Minor Changes
- #393
f9fca66
Thanks @jpwilliams! - Added a new"inngest/koa"
serve handler. See the Framework: Koa docs and theframework-koa
example to get started.
3.5.0
Minor Changes
- #299
ac61617
Thanks @jpwilliams! - Added a new"inngest/sveltekit"
serve handler. See the Framework: Sveltekit docs and theframework-sveltekit
example to get started.
3.4.4
Patch Changes
- #388
b4432d8
Thanks @jpwilliams! - Removed "No signing key provided" warning during local development
3.4.3
Patch Changes
- #385
cdf02a3
Thanks @MonsterDeveloper! - Add exports forInngestFunction
,FunctionTrigger
, andHandler
types to fix a TypeScript error when using Inngest in projects withcomposite
setting intsconfig
.
3.4.2
Patch Changes
#378
b83f925
Thanks @jpwilliams! - AddINNGEST_API_BASE_URL
andINNGEST_EVENT_API_BASE_URL
, used for internal testing#382
0002afa
Thanks @tonyhb! - Remove verbose event keys warning
3.4.1
Patch Changes
#371
d45bfbd
Thanks @jpwilliams! - RemoveJsonifyObject<>
wrapper from step output - it's now clearer to see the actual type of a step's result#375
e19f9b4
Thanks @jpwilliams! - Fix failing to parseBigInt
during step/function result serialization; it is now correctly typed and returned asnever
#374
dcafc2b
Thanks @jpwilliams! - Fixed an issue where an error log wasn't shown if execution result parsing failed, such as in the case of serialization failures
3.4.0
Minor Changes
Patch Changes
- #369
e1046cd
Thanks @jpwilliams! - ChangeNo request version
log from warn to debug
3.3.0
Minor Changes
- #329
2837296
Thanks @jpwilliams! - AddedGetStepTools<typeof inngest>
andGetFunctionInput<typeof inngest>
helper types to aid in building function factories. See TypeScript Helpers - Inngest Documentation for more information.
3.2.1
Patch Changes
- #360
260dd75
Thanks @jpwilliams! - Inngest errors now appear more succintly in UIs, free of ANSI codes and verbose information
3.2.0
Minor Changes
- #362
6bc91d0
Thanks @jpwilliams! - Add ability to manage function run priorities using a newpriority.run
config option - see the Priority documentation for more information.
Patch Changes
#357
9140b66
Thanks @jpwilliams! - Stop "Failed to send event" errors occuring in local development when missing an event key#359
7f70546
Thanks @goodoldneon! - Internally, steps now return adisplayName
to be used within Inngest's UIs
3.1.1
Patch Changes
#354
e2f68d6
Thanks @jpwilliams! - Fix path matching types getting lost in certain recursive event types#350
933b998
Thanks @jpwilliams! - Separate Zod typing from library, enabling minor-agnostic versioning support
3.1.0
Minor Changes
- #338
ef35fea
Thanks @jpwilliams! - Adddebounce
configuration option. See Debounce documentation for more information.
Patch Changes
- #337
672c428
Thanks @jpwilliams! - EnsurefromRecord<>()
doesn't accept clashing names
3.0.2
Patch Changes
#348
ebb245f
Thanks @jpwilliams! - Fix"inngest/next"
types not inferring fromdefineProperties
#346
c14bbb3
Thanks @jpwilliams! - FixwaitForEvent
potentially dropping some fields when being parsed
3.0.1
Patch Changes
#339
bf8b004
Thanks @jpwilliams! - Bumpnext
to13
; keep up-to-date with their only supported major to support typing#343
77c7f66
Thanks @tonyhb! - Allow steps to execute with null data
3.0.0
Major Changes
#294
f2f4856
Thanks @jpwilliams! - Clients and functions now require IDsWhen instantiating a client using
new Inngest()
or creating a function viainngest.createFunction()
, it's now required to pass anid
instead of aname
.Previously only
name
was required, but this implied that the value was safe to change. Internally, we used this name to produce an ID which was used during deployments and executions.See the v3 migration guide.
#294
f2f4856
Thanks @jpwilliams! - Refactored available environment variables and configurationThe arrangement of environment variables available has shifted a lot over the course of v2, so in v3 we've streamlined what's available and how they're used.
See the v3 migration guide.
#294
f2f4856
Thanks @jpwilliams! - In v2, providing afns
option when creating a function -- an object of functions -- would wrap those passed functions instep.run()
, meaning you can run code inside your function without thestep.run()
boilerplate.This wasn't a very well advertised feature and had some drawbacks, so we're instead replacing it with some optional middleware.
See the v3 migration guide.
#294
f2f4856
Thanks @jpwilliams! - Serving functions could become a bit unwieldy with the format we had, so we've slightly altered how you serve your functions to ensure proper discoverability of options and aid in readability when revisiting the code.See the v3 migration guide.
#294
f2f4856
Thanks @jpwilliams! - Shorthand function creation removedinngest.createFunction()
can no longer take a string as the first or second arguments; an object is now required to aid in the discoverability of options and configuration.See the v3 migration guide.
#294
f2f4856
Thanks @jpwilliams! - All steps require IDsWhen using any step.* tool, an ID is now required to ensure that determinism across changes to a function is easier to reason about for the user and the underlying engine.
The addition of these IDs allows you to deploy hotfixes and logic changes to long-running functions without fear of errors, failures, or panics. Beforehand, any changes to a function resulted in an irrecoverable error if step definitions changed. With this, changes to a function are smartly applied by default.
See the v3 migration guide.
Patch Changes
- #333
67bda66
Thanks @goodoldneon! - (Internal) Fix missing name onNonRetriableError
, ensuring it's correctly (de)serialized
2.7.2
Patch Changes
- #323
3b2efa6
Thanks @jpwilliams! - Better error handling for.sendEvent()
errors from Inngest API, ensuring easier debugging when failing to send events - partial of #256
2.7.1
Patch Changes
- #325
b8858c9
Thanks @jpwilliams! - Hotfix: EnsureProxyLogger
(and some other used classes/types) is correctly exported from"inngest"
2.7.0
Minor Changes
#313
32c34b3
Thanks @jpwilliams! - Add ability to declare and send events without payloads, e.g.inngest.send({ name: "my.event" });
#310
696c411
Thanks @michealroberts! - Added h3 framework server handler
Patch Changes
- #319
71b7d26
Thanks @jpwilliams! - Add ESM exports toinngest
package to avoid extension imports
2.6.1
Patch Changes
- #312
ca6d6aa
Thanks @mmachatschek! - chore: update cross-fetch to ^4.0.0 package
2.6.0
Minor Changes
#202
21053ed
Thanks @djfarrelly! - Add support for Fastify, either via a custom.route()
or using a Fastify pluginimport Fastify from "fastify"; import inngestFastify, { serve } from "inngest/fastify"; import { functions, inngest } from "./inngest"; const fastify = Fastify({ logger: true, }); // The lead maintainer of Fastify recommends using this as a plugin: fastify.register(inngestFastify, { client: inngest, functions, options: {}, }); // We do also export `serve()` if you want to use it directly, though. fastify.route({ method: ["GET", "POST", "PUT"], handler: serve(inngest, functions), url: "/api/inngest", }); fastify.listen({ port: 3000 }, function (err, address) { if (err) { fastify.log.error(err); process.exit(1); } });
#298
4984aa8
Thanks [@z.object({](https://github.com/z.object({), [@z.object({](https://github.com/z.object({)! - Add the ability to provide Zod schemas usingz.object()
instead of requiring a record format// Previously we supported this new EventSchemas().fromZod({ "test.event": { data: z.object({ a: z.string() }), b: z.number() }), }, }); // Now we ALSO support this new EventSchemas().fromZod([ z.object({ name: z.literal("test.event"), data: z.object({ a: z.string() }), b: z.number() }), }), ]);
This should help if you wish to declare your events piece-by-piece instead of in a single object.
const firstEvent = z.object({ name: z.literal("app/user.created"), data: z.object({ id: z.string() }), }); const secondEvent = z.object({ name: z.literal("shop/product.deleted"), data: z.object({ id: z.string() }), }); new EventSchemas().fromZod([firstEvent, secondEvent]);
You can use the exported
LiteralZodEventSchema
type to provide some autocomplete when writing your events, too.const ShopProductOrdered = z.object({ name: z.literal("shop/product.ordered"), data: z.object({ productId: z.string() }), }) satisfies LiteralZodEventSchema;
2.5.2
Patch Changes
#305
10220af
Thanks @jpwilliams! - Always attempt accessing the dev server if theINNGEST_DEVSERVER_URL
environment variable is specifiedThis helps some situations where a user may want to run integration tests against a deployed or otherwise production build, using the Inngest Dev Server to do so.
2.5.1
Patch Changes
- #302
5b2bfac
Thanks @jpwilliams! - Removepreinstall
script frominngest
package causing errors when consuming the package
2.5.0
Minor Changes
#289
b04d904
Thanks @jpwilliams! - Addattempt
number to SDK function contextinngest.createFunction( { name: "Example Function" }, { event: "app/user.created" }, async ({ attempt }) => { // ... }, );
Patch Changes
#293
424bfb2
Thanks @jpwilliams! - Addkey
toconcurrency
types#290
b62c88b
Thanks @jpwilliams! - Support Vercel's Express (@vercel/node
) in"inngest/express"
serve handler#286
5587a15
Thanks @jpwilliams! - Updated contribution guidelines
2.4.1
Patch Changes
- f2ffc8b: Fix
cross-fetch
import issue in testing environemtnst. API package also uses customfetch
passed via arguments. - acfa07c: Throw error when using
inngest/express
and not using a body parser - b535e1e: Ensure users are not allowed to configure batching with cancellation or rate limiting, as these features do not yet function together
- c271eb1: Add
x-inngest-no-retry: true
header when non-retriable for internal executor changes - 2a93f0b: Fix
onFailure
functions missing types applied by middleware
2.4.0
Minor Changes
- 6cb6719: Allow filtering of events within triggers
Patch Changes
- 55c889c: Expose raw error message if status is unknown
2.3.0
Minor Changes
- 7792a62: Add support for streaming to
inngest/remix
2.2.1
Patch Changes
- 1120e29: Genercize mixed async error; the same symptom can be caused by a few different errors
2.2.0
Minor Changes
d0a8976: Add support for batching events.
Introduces a new configuration to function configurations.
batchEvents?: { maxSize: 100, timeout: "5s" }
This will take Inngest start execution when one of the following conditions are met.
- The batch is full
- Time is up
When the SDK gets invoked, the list of events will be available via a newly exported field
events
.createFunction( { name: "my func", batchEvents: { maxSize: 100, timeout: "5s" } }, { event: "my/event" }, async ({ event, events, step }) => { // events is accessible with the list of events // event will still be a single event object, which will be the // 1st event of the list. const result = step.run("do something with events", () => { return events.map(() => doSomething()); }); return { success: true, result }; }, );
Patch Changes
- 591f73d: Set
ts
field on sent events if undefined - 1cbf65e: Alter registration response to include
modified
for deployment deduplication
2.1.0
Minor Changes
- b74477f: Add optional
id
property to all step tooling, allowing users to override state recovery
2.0.2
Patch Changes
- 023d761: Harden error serialization to ensure uncaught exceptions don't slip through during function runs
2.0.1
Patch Changes
- 3ef0b36: Add better visibility into serve handlers issues
- 4226b85: Fix middleware
transformOutput
hook not running if an asynchronous, non-step function's body threw - cc3929d: Fix a very rare bug in which
step.sleep()
hashing could produce different IDs across different executions
2.0.0
Major Changes
- 4f29f5c: Removed
tools
parameter (breaking). This was marked as@deprecated
in v1, but is being fully removed in v2. Usestep
instead. See the v2 migration guide. - 4f29f5c: Renamed
throttle
torateLimit
. See the v2 migration guide. - 4f29f5c: Added the ability to provide middleware when defining Inngest clients and functions, hooking into a client's lifecycle to add custom functionality like error monitoring, data transformations, and more. See Advanced: Middleware - Inngest Documentation.
- 4f29f5c: Removed ability to
serve()
without a client (breaking). See the v2 migration guide. - 4f29f5c: Better event schema definitions (breaking), providing an extensible metho of creating and maintaining event payloads with a variety of native tools and third-party libraries. See Defining Event Payload Types - Inngest Documentation.
- 4f29f5c: Removed some overloads of
inngest.send()
to provide a better TS experience when sending events (breaking). See the v2 migration guide.
Minor Changes
- 4f29f5c: Added a
logger
to Inngest functions in addition to allowing users to provide a custom logger to reliably push logs to external services and handle flushing on serverless environments. See Logging in Inngest - Inngest Documentation. - 4f29f5c: Add
GetEvents<>
export which can be used to pull final event types from an Inngest client. See Defining Event Payload Types. - 4f29f5c: Add ability to provide
concurrency: { limit: number }
in function config, ready for more config options.
Patch Changes
- b62cd6d: Update landing page vite dependency to v3.2.7
1.9.4
Patch Changes
- 7d025d6: Fix
NonRetriableError
not working when thrown from within a step
1.9.3
Patch Changes
- 64c397e: Handle circular JSON errors while stringifying across the SDK
1.9.2
Patch Changes
- 71b1a17: Fix Vercel platform check to support local dev while using
vercel env pull
1.9.1
Patch Changes
- 49ddbb5: Add platform deploy checks
1.9.0
Minor Changes
- 48d94a2: Allow user provided logger to be used within functions (experimental)
1.8.5
Patch Changes
- 34f9ee8: INN-1253 Show actionable error when steps are nested
1.8.4
Patch Changes
- aaac9e5: When recommending event key fixes, recommend setting env vars first
1.8.3
Patch Changes
- c09261b: INN-1348 Throw an actionable error when we detect mixed async logic
- 98c15b3: INN-1347 Fix deadlock when an async function finds a step
1.8.2
Patch Changes
- 5462bdd: Ensure Inngest client's env object is used within serve()
- 0b0c0ad: Add consistent type imports for slightly better tree-shaking
1.8.1
Patch Changes
- 5573be3: INN-1270 Create an internal handler to enforce more actionable user-facing errors
1.8.0
Minor Changes
- 65966f5: INN-1087 Add edge streaming support to
"inngest/next"
serve handler
Patch Changes
- 164fd5c: INN-1266 Fix bad link for fetching Inngest signing key on landing page
1.7.1
Patch Changes
- 34b6d39: INN-1240 Add
queueMicrotask()
fallback for restrictive environments
1.7.0
Minor Changes
- c999896: INN-1029 Add
env
option toInngest
client to explicitly push to a particular Inngest env
Patch Changes
- 131727a: Adjust README to have a slightly clearer intro
- c999896: INN-1186 Send
x-inngest-platform
andx-inngest-framework
headers during registration - 0728308: Expose run ID to function executions for user-managed logging and tracing
- 3ac579f: Warn users when some functions appear undefined when serving
- eb1ea34: Allow signing keys with multiple prefixes, as required for branch environment support
1.6.1
Patch Changes
a840e67: INN-1126 Execute a step early if it's the only pending item during a discovery
This reduces the number of "Function steps" used for simple step functions.
1.6.0
Minor Changes
- c7d1bee: Add
onFailure
handler tocreateFunction
options, allowing you to specify a new function to run when the initial handler fails
1.5.4
Patch Changes
- 071fe89: INN-1054 Ensure serve handlers return
any
instead ofunknown
so that they don't needlessly conflict with user types
1.5.3
Patch Changes
906aca5: INN-1009 Show warnings when using the package with TS versions
<4.7.2
and Node versions<14
This includes tests to assert we appropriately support these versions now and in the future.
ca7d79e: Detect env vars from Node and Deno in serve handlers (INN-1012)
1.5.2
Patch Changes
- 2d6e0b5: Fix infinite type instantiation using a looping type in serve handlers (thanks for the report, @grempe)
1.5.1
Patch Changes
- 0836145: Refactor
InngestCommHandler
to better detect env and reduce duplication (INN-997)
1.5.0
Minor Changes
- ac81320: Add
"inngest/lambda"
serve handler for AWS Lambda environments - f73a346: Add
"inngest/edge"
serve handler for use in v8 edge runtimes
1.4.1
Patch Changes
43162d3: The "Connected to
inngest dev
" pill at the top of the SDK's landing page now links to the connected dev server.Thanks, @khill-fbmc!
56b8e9a: Removes many
any
types from the internal and public APIs.Affects the public API, so will therefore be a package bump, but shouldn't affect any expected areas of use.
a45601e: Update dependency typescript to v5
Including a bump for this as it does seem to fix some complex inference for future features.
1.4.0
Minor Changes
- ebb8740: Add ability to control the concurrency of a specific function via the
concurrency
option when creating an Inngest function - e61cf0f: Add
cancelOn
option when creating a function, allowing you cancel execution of a function based on incoming events.
1.3.5
Patch Changes
a4f8ae8: Fixes a typing bug where both
event
andcron
could be specified as a trigger at the same time.Multiple event triggers will be coming in a later update, but not in this format.
d6a8329: Ensure signatures are not validated during development
- 950a2bc: Ensure
inngest.send()
andstep.sendEvent()
can be given an empty array without error