-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set inngest
's ALS in global state to access it across versions
#819
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🦋 Changeset detectedLatest commit: 639b80d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
BrunoScheufler
approved these changes
Jan 27, 2025
Merged
jpwilliams
pushed a commit
that referenced
this pull request
Jan 28, 2025
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## [email protected] ### Minor Changes - [#820](#820) [`cb02190`](cb02190) Thanks [@amh4r](https://github.com/amh4r)! - Make INNGEST_ALLOW_IN_BAND_SYNC opt out - [#813](#813) [`f42ab05`](f42ab05) Thanks [@BrunoScheufler](https://github.com/BrunoScheufler)! - Add initial `connect()` support ### Patch Changes - [#818](#818) [`c99b05f`](c99b05f) Thanks [@BrunoScheufler](https://github.com/BrunoScheufler)! - Add reconnection support to `connect()` - [#819](#819) [`7a5f4a5`](7a5f4a5) Thanks [@jpwilliams](https://github.com/jpwilliams)! - Set `inngest`'s ALS in global state to be able access it across versions and package boundaries Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This was referenced Jan 28, 2025
jpwilliams
added a commit
that referenced
this pull request
Jan 30, 2025
## Summary <!-- Succinctly describe your change, providing context, what you've changed, and why. --> Adds `Inngest.Like` and `InngestFunction.Like` for lighter type comparisons when comparing types across two different versions of `inngest`. This targets loosening types at two major boundaries: - `serve()`, which receives an `Inngest` client and an array of `InngestFunction`s - This also includes the `fastifyPlugin` we provide - `connect()`, which receives an array of `InngestFunction`s These boundaries only accepted `Inngest.Any` and `InngestFunction.Any` types, which are bound to their local package version. This change switches to duck typing for these boundaries, meaning a client from one version can be safely used as the client for another. ## Checklist <!-- Tick these items off as you progress. --> <!-- If an item isn't applicable, ideally please strikeout the item by wrapping it in "~~"" and suffix it with "N/A My reason for skipping this." --> <!-- e.g. "- [ ] ~~Added tests~~ N/A Only touches docs" --> - [ ] ~Added a [docs PR](https://github.com/inngest/website) that references this PR~ N/A KTLO - [ ] ~Added unit/integration tests~ N/A Existing - [x] Added changesets if applicable ## Related <!-- A space for any related links, issues, or PRs. --> <!-- Linear issues are autolinked. --> <!-- e.g. - INN-123 --> <!-- GitHub issues/PRs can be linked using shorthand. --> <!-- e.g. "- inngest/inngest#123" --> <!-- Feel free to remove this section if there are no applicable related links.--> - Complements #819 for better multi-version handling
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
⬆️ improvement
Performance, reliability, or usability improvements
📦 inngest
Affects the `inngest` package
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Moves
inngest
'sAsyncLocalStorage
usage to global state, ensuring we can accessinngest
context while using multiple versions and across boundaries.Checklist
Added a docs PR that references this PRN/A KTLOAdded unit/integration testsN/A Included; multi-process tests not included - testing with@inngest/agent-kit