-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
chore(cognito): reorganize identity providers structure so that UserPoolIdentityProviderBase is not exported #10925
Conversation
…oolIdentityProviderBase is not exported we had split out identity providers to have a file per provider. however, in this organization we were exporting the base class which we did not intend to. the `UserPoolIdentityProviderBase` class cannot be moved to a separate file (i.e. private folder) as JSII will be unable to resolve type. following our typical pattern of containing all extensions of the base class within a single file `user-pool-idp.ts` and moved all the tests over as well. BREAKING CHANGE: the `UserPoolIdentityProviderBase` abstract class has been removed. Use the `UserPoolIdentityProvider*` classes directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about instead moving UserPoolIdentifyProviderBase off into a separate file, maybe under lib/private/
? How complicated would that look?
I like the separate file structure we already have and want to see if we can maintain that.
/** | ||
* Properties to create a new instance of UserPoolIdentityProvider | ||
*/ | ||
export interface UserPoolIdentityProviderProps { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this also be non-exported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about instead moving UserPoolIdentifyProviderBase off into a separate file, maybe under
lib/private/
? How complicated would that look?
I like the separate file structure we already have and want to see if we can maintain that.
this is actually what I initially tried (mentioned it in the commit body) but JSII will not allow it. I also tried to preserve the structure initially.
as for the props, we need to export it as it's an extended interface. All our constructs export the base interface. (jsii also throws an error if you exclude it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, that's fine.
Can we open issues two separate issues in the JSII repo for these? I'd like to hear from the JSII team if this is unsupported for a reason or just a gap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nija-at - since they both hit the same error message within JSII (for props and for a base class that's in a private module / not explicitly exported from the module), I've created aws/jsii#2159
happy to separate it out based on the guidance in the issue though!
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
…hat base class is not exported (#11056) This reverts commit from #10925 which folded all implementations of `UserPoolIdentityProviderBase` into a single file. It was desirable to maintain our original code organization but we also did not want to export the base class In light of guidance provided in aws/jsii#2159, reverted back to original code organization and added the `@internal` decorator on the base class in a private directory ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
we had split our identity providers to have a file per provider.
however, in this organization we were exporting the base class which
we did not intend to.
the
UserPoolIdentityProviderBase
class cannot be moved to a separatefile (i.e. private folder) as JSII will be unable to resolve type.
updated to follow our typical pattern of containing all extensions of the base
class within a single file
user-pool-idp.ts
and moved all the testsover as well.
BREAKING CHANGE: the
UserPoolIdentityProviderBase
abstract class has been removed. Use theUserPoolIdentityProvider*
classes directly.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license