Skip to content

Conversation

@jonkoops
Copy link
Contributor

@jonkoops jonkoops commented Feb 3, 2022

Updates the type definitions of the JavaScript adapter to use modern ES module syntax. This removes the needless namespacing and replaces it with named export statements.

Note that the diff in Github looks intimidating, but this is mostly due to indentation changes so I recommend to review the diff locally in your IDE.

Closes #9045.

@jonkoops jonkoops force-pushed the esm-compatible-types branch from a05db0f to 2f56f0b Compare February 3, 2022 11:16
@jonkoops jonkoops added area/adapter/javascript kind/enhancement Categorizes a PR related to an enhancement labels Feb 3, 2022
@jonkoops jonkoops self-assigned this Feb 3, 2022
@jonkoops jonkoops force-pushed the esm-compatible-types branch from 2f56f0b to 3f1a038 Compare February 8, 2022 20:33
@jonkoops jonkoops marked this pull request as ready for review February 9, 2022 10:29
edewit
edewit previously approved these changes Feb 9, 2022
Copy link
Contributor

@mhajas mhajas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes @jonkoops! I added one comment into the code.

mhajas
mhajas previously approved these changes Feb 16, 2022
Copy link
Contributor

@mhajas mhajas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change @jonkoops!

@jonkoops jonkoops force-pushed the esm-compatible-types branch from 9dbbb3d to fdafd6a Compare February 16, 2022 18:48
@jonkoops
Copy link
Contributor Author

jonkoops commented Feb 16, 2022

@mhajas I've added some more changes for backwards compatibility here. This allows the namespaces to work as before whilst preserving the ES module support. As well as an extra change to allow Keycloak and KeycloakAuthorization to be constructed using new or invoking it as a function.

Copy link
Contributor

@ssilvert ssilvert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@ssilvert ssilvert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite ready to merge yet. Jon is going to do a sanity check on the Account UI.

@abstractj abstractj merged commit 43ef7f1 into keycloak:main Feb 16, 2022
@jonkoops jonkoops deleted the esm-compatible-types branch February 17, 2022 10:23
@jonkoops jonkoops added this to the 18.0.0 milestone Feb 17, 2022
@stianst stianst modified the milestones: 18.0.0, 17.1.0 Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/adapter/javascript kind/enhancement Categorizes a PR related to an enhancement team/ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keycloak import in TypeScript without allowSyntheticDefaultImports

6 participants