Skip to content

Deprecate built-in Cordova adapters#297

Merged
pskopek merged 1 commit intokeycloak:mainfrom
jonkoops:deprecate-cordova-adapters
Apr 23, 2026
Merged

Deprecate built-in Cordova adapters#297
pskopek merged 1 commit intokeycloak:mainfrom
jonkoops:deprecate-cordova-adapters

Conversation

@jonkoops
Copy link
Copy Markdown
Contributor

@jonkoops jonkoops commented Apr 21, 2026

This PR introduces a shared deprecation utility and uses it to deprecate the built-in Cordova adapters ahead of their removal in the next major version.

A new internal module (lib/deprecations.js) provides a logDeprecation(code, message) function inspired by the Node.js deprecation system. Each deprecation is identified by a unique code (KC-DEP-###) and is emitted at most once per page load to avoid spamming the console.

The cordova and cordova-native adapters now emit runtime deprecation warnings (KC-DEP-001 and KC-DEP-002 respectively) when loaded, and the corresponding type definitions and cordovaOptions property are marked as deprecated. Release notes for 26.3.0 document the deprecation and provide a migration path to custom adapters.

Closes #271

@jonkoops jonkoops requested review from graziang and rmartinc April 21, 2026 10:55
@jonkoops jonkoops force-pushed the deprecate-cordova-adapters branch from d145089 to 050c03f Compare April 21, 2026 10:55
@jonkoops jonkoops changed the base branch from next to main April 21, 2026 10:56
@jonkoops jonkoops marked this pull request as draft April 21, 2026 10:57
@jonkoops jonkoops requested a review from pskopek April 21, 2026 10:57
@pskopek
Copy link
Copy Markdown
Contributor

pskopek commented Apr 21, 2026

It looks good! The release notes text is sufficient as well.

@jonkoops jonkoops force-pushed the deprecate-cordova-adapters branch from 050c03f to 098a2a6 Compare April 21, 2026 12:11
Copy link
Copy Markdown
Contributor

@rmartinc rmartinc left a comment

Choose a reason for hiding this comment

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

No problem with the cordova deprecation. @jonkoops Just add the signature and it's OK to me.

Add a deprecation utility (`logDeprecation`) that emits each warning
at most once per page load, keyed by a unique code (KC-DEP-###).

Use it to deprecate the built-in 'cordova' and 'cordova-native'
adapters at runtime, and mark them as deprecated in the type
definitions and documentation ahead of removal in the next major.

Closes keycloak#271

Signed-off-by: Jon Koops <[email protected]>
@jonkoops jonkoops force-pushed the deprecate-cordova-adapters branch from 098a2a6 to c9c5a22 Compare April 21, 2026 16:11
@jonkoops
Copy link
Copy Markdown
Contributor Author

@rmartinc Done!

@jonkoops jonkoops requested review from mposolda and rmartinc April 21, 2026 16:11
@jonkoops jonkoops marked this pull request as ready for review April 22, 2026 10:31
Copy link
Copy Markdown
Contributor

@rmartinc rmartinc left a comment

Choose a reason for hiding this comment

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

Thanks @jonkoops! LGTM!

@pskopek pskopek merged commit 46ad337 into keycloak:main Apr 23, 2026
4 checks passed
@jonkoops jonkoops deleted the deprecate-cordova-adapters branch April 23, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate Cordova support

3 participants