Skip to content

Releases: inngest/inngest-js

[email protected]

31 Jan 16:37
73f0bfd
Compare
Choose a tag to compare

Patch Changes

[email protected]

31 Jan 14:19
c31d8f0
Compare
Choose a tag to compare

Patch Changes

[email protected]

30 Jan 17:42
125e19f
Compare
Choose a tag to compare

Patch Changes

  • #817 446be1b Thanks @jpwilliams! - serve() and connect() now have looser typing for client and functions, resulting in easier use of multiple inngest 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 no functions are provided to inngest.connect(), it will now use any functions that have been created with the client instead

  • Updated dependencies [fadd94a]:

@inngest/[email protected]

30 Jan 17:42
125e19f
Compare
Choose a tag to compare

Patch Changes

[email protected]

28 Jan 23:39
2a50641
Compare
Choose a tag to compare

Minor Changes

Patch Changes

@inngest/[email protected]

17 Jan 20:55
2b66aaf
Compare
Choose a tag to compare

Patch Changes

[email protected]

16 Jan 14:10
4b9c001
Compare
Choose a tag to compare

Minor Changes

Patch Changes

@inngest/[email protected]

16 Jan 14:10
4b9c001
Compare
Choose a tag to compare

Patch Changes

[email protected]

10 Jan 19:50
8d1d6d7
Compare
Choose a tag to compare

Patch Changes

  • #798 f426ba6 Thanks @jpwilliams! - Fix named functions returning never[] for their parameters when passed to step.run()

    // This now works
    step.run("", function named() {});

[email protected]

09 Jan 11:30
aae2967
Compare
Choose a tag to compare

Patch Changes