Replace a deprecated UI5 API
ProprietaryReplaces a deprecated UI5 API with its successor, adding the sap.ui.define dependency or import the successor needs and dropping the one the replacement leaves unread. The API is named either by the global chain it is written as — jQuery.sap.assert(x) becoming a dependency on sap/base/assert and an assert(x) — or by the module a binding stands for, so that Configuration.getCalendarType() becomes Formatting.getCalendarType().
io. moderne. javascript. ui5. ReplaceUi5ApiOptional
The global chain the deprecated API is written as. Exclusive with module and member, and one of the two ways of naming the API is required.
The module the deprecated member is reached on. Given together with member, and exclusive with global.
The deprecated member reached on module.
The module that succeeds it, bound to a dependency or import. Leaving this unset renames a member where it is.
A browser global that succeeds it, where the successor is not a UI5 module.
The member to reach on the successor, where it is named differently. Leaving this unset keeps whatever the scope preserves of the chain as it was written.
Whether the deprecated API is matched as a call rather than a plain property access.
How far in from the matched node the replacement reaches: 0 is the node itself, and each further level drops one property access from its right. Defaults to 0 for an access and 1 for a call.
Whether the replacement holds only where nothing reads the call's value, which is when a differing return type stops mattering.
mod run . --recipe= io. moderne. javascript. ui5. ReplaceUi5ApiInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.