feat(core): adds flag to allow analytics.ready() to run even if plugin fails on ready#1282
Open
rmachado-studocu wants to merge 1 commit intosegmentio:masterfrom
Open
Conversation
🦋 Changeset detectedLatest commit: 922fdac 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 |
9ce37d2 to
47bda2b
Compare
Author
|
An alternative to this implementation could be to instead implement a new function for this. Example: readySettled: (cb, onPluginReadyError) => {
// here would be the Promise.allSettled()
} |
Author
|
Hi @silesky and @MichaelGHSeg (sorry for the tags), Is this something you'd see being implemented or no? Just to understand how to proceed with this feature. |
silesky
reviewed
Apr 30, 2025
47bda2b to
6b0d9fe
Compare
* Adds `onPluginReadyError` which is passed as a `catch` of each plugin's `ready()` call.
6b0d9fe to
922fdac
Compare
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.
What does this PR do
analytics.ready()to usePromise.allSettled()and extracting only the successfully readied plugins.onPluginReadyError- error handler for plugins that error in thereadystageIf
onPluginReadyErroris provided, this function will be used as.catch()of theplugin.readypromises.Closes #1281
yarn changeset. Read about changesets here).