Skip to content
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

fix(token-providers): break dependency cycle with sso-oidc #5049

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Aug 3, 2023

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

@kuhe
Copy link
Contributor Author

kuhe commented Aug 3, 2023

@aws-sdk/client-sso-oidc weekly downloads: 8,217,279
@aws-sdk/token-providers weekly downloads: 8,211,169

this implies only 5k direct downloads of client-sso-oidc

@kuhe kuhe marked this pull request as ready for review August 3, 2023 19:10
@kuhe kuhe requested a review from a team as a code owner August 3, 2023 19:10
@kuhe kuhe force-pushed the fix/cyclic-dependency branch from e69db17 to 6756bc5 Compare August 4, 2023 15:46
@kuhe kuhe merged commit d6977c9 into aws:main Aug 4, 2023
@kuhe kuhe deleted the fix/cyclic-dependency branch August 4, 2023 16:23
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants