Skip to content

Commit

Permalink
chore(scripts): add check for token-provider prefix when adding peerDeps
Browse files Browse the repository at this point in the history
  • Loading branch information
trivikr committed May 3, 2024
1 parent cff6ff6 commit 138fcc7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/update-versions/getUpdatedPackageJsonSection.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ export const getUpdatedPackageJsonSection = (section, depToVersionHash, { isPeer
}

// Use exact version for client peerDependencies in credential-provider packages.
if (packageName.startsWith("@aws-sdk/credential-provider") && key.startsWith("@aws-sdk/client-")) {
const moduleName = packageName.substring(packageName.indexOf("/") + 1);
const authProviderPrefixArray = ["credential-provider", "token-provider"];
if (
authProviderPrefixArray.some((authProviderPrefix) => moduleName.startsWith(authProviderPrefix)) &&
key.startsWith("@aws-sdk/client-")
) {
acc[key] = newVersion;
return acc;
}
Expand Down

0 comments on commit 138fcc7

Please sign in to comment.