inngest / inngest-js

The developer platform for easily building reliable workflows with zero infrastructure for TypeScript & JavaScript
https://www.inngest.com/
GNU General Public License v3.0
414 stars 41 forks source link

Fix `Jsonify` issues, including preserving `unknown` types #512

Closed jpwilliams closed 7 months ago

jpwilliams commented 7 months ago

Summary

Jsonify is used to represent a step output going through serialization as it passes to and from an Inngest Server in JSON. This used to be part of the type-fest package, but we removed that when introducing support for TypeScript 5.4 in #500, as our version support range for TS exceeded what was provided by the type-fest package.

As part of that, we've pulled Jsonify into our code. There are some issues (in the related section) we can now fix much more easily.

The issue that motivated this change (#509) would also have been solved by allowing a developer to provide types that describe how the output of a step is transformed. This is available, but is a rare ask and needs time to implement.

Checklist

Related

changeset-bot[bot] commented 7 months ago

🦋 Changeset detected

Latest commit: aac0d42c3ec06edd54e428f3e86780c33376ca9e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------- | ----- | | inngest | Patch |

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

inngest-release-bot commented 7 months ago

A user has added the prerelease/inngest label, so this PR will be published to npm with the tag pr-512. It will be updated with the latest changes as you push commits to this PR.

You can install this prerelease version with:

npm install inngest@pr-512

The last release was built and published from aac0d42c3ec06edd54e428f3e86780c33376ca9e.