fix(token-providers): break dependency cycle with sso-oidc #5049
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.
Description
client-sso-oidc is used in token-providers. However, that client may use token providers in its default credential chain. This would create a cyclical dependency chain that breaks
yarn build:all
and turbopack.This PR proposes that a minimal bundle of the parts of the sso-oidc client are included within token-providers for its use. This increases (before minification) the size of the token-providers package by 76K. To compare, the full sso-oidc client is 112K.
This means a savings of 36K when not using the full sso-oidc client, but a redundancy of 76K when doing so.
The alternative of making the client a peer dependency would be better, but the loss of a required dependency may be too disruptive of a breaking change.
Testing
existing unit tests