feat(core): Add afterAllSetup hook for integrations#10345
Merged
Conversation
Contributor
size-limit report 📦
|
Lms24
approved these changes
Jan 25, 2024
packages/types/src/integration.ts
Outdated
| * This hook is triggered after `setupOnce()` and `setup()` have been called for all integrations. | ||
| * You can use it if it is important that all other integrations have been run before. | ||
| */ | ||
| afterSetup?(client: Client): void; |
Member
There was a problem hiding this comment.
l: wdyt about afterIntegrationsSetup or afterAllSetup? To me afterSetup conveys more that it'd be called once the integration implementing it was set up.
Don't wanna 🚲 shed to long though, I'm also fine if we leave it as is.
Member
Author
There was a problem hiding this comment.
let's go with afterAllSetup then 👍
Member
Author
|
cc @billyvg we can also use this for the replay & replay canvas integrations I think, to make the dependency a bit simpler! |
afterSetup hook for integrationsafterAllSetup hook for integrations
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds a new hook to integrations which runs after all integrations have run their
setuphooks.This can be used to handle integrations that depend on each other.
The only timing guarantee is that
afterAllSetupwill be called after every integration has runsetupOnceandsetup.