feat(autofix): Fix additional deprecated Core APIs#639
Merged
Conversation
maxreichmann
force-pushed
the
autofix-deprecated-core-apis
branch
4 times, most recently
from
April 29, 2025 09:34
7c8c5bc to
bb20759
Compare
RandomByte
previously requested changes
May 12, 2025
d3xter666
force-pushed
the
autofix-deprecated-core-apis
branch
2 times, most recently
from
May 15, 2025 08:06
fc44eab to
5fa49bb
Compare
maxreichmann
commented
May 16, 2025
matz3
reviewed
May 26, 2025
d3xter666
marked this pull request as ready for review
May 27, 2025 08:48
matz3
reviewed
May 27, 2025
| sap.ui.define(["./library", "sap/ui/core/Control", "./ExampleRenderer", "sap/ui/core/Lib"], function (library, Control, ExampleRenderer, Lib) { | ||
| "use strict"; | ||
|
|
||
| sap.ui.getCore().getLibraryResourceBundle("library.with.custom.paths", "en_US"); |
Member
There was a problem hiding this comment.
This is currently not fixed, but it should be, right?
matz3
reviewed
May 27, 2025
| return fixHints; | ||
| } | ||
|
|
||
| function extractKeyValuePairs(jsonLikeStr: string) { |
Member
There was a problem hiding this comment.
We already have the relevant information accessible via AST nodes, so I don't think we should parse the argument ourselves here. The input is based on node.getText(). We even have already code that can analyze object structures, which is used for certain checks in SourceFileLinter.
matz3
reviewed
May 27, 2025
| name: fixHints.exportCodeToBeUsed.args[0].value.replace(/^['"]+|['"]+$/g, ""), | ||
| url: libOptionsExpression.url, | ||
| }; | ||
| fixHints.exportCodeToBeUsed.args[0].value = JSON.stringify(newArg); |
Member
There was a problem hiding this comment.
Here the comments in the code get lost. Also, the used quotes in the code will be always replaced by double-quotes.
| extractKeyValuePairs(fixHints.exportCodeToBeUsed.args[1].value) as {async: boolean; url?: string}; | ||
| if (libOptionsExpression.async === true) { | ||
| const newArg = { | ||
| name: fixHints.exportCodeToBeUsed.args[0].value.replace(/^['"]+|['"]+$/g, ""), |
Member
There was a problem hiding this comment.
Using back-ticks as first arg (library name) results into quoted backticks.
d3xter666
force-pushed
the
autofix-deprecated-core-apis
branch
from
May 27, 2025 13:07
43442c9 to
756264a
Compare
d3xter666
force-pushed
the
autofix-deprecated-core-base
branch
from
May 27, 2025 14:12
d0120ff to
b272a5a
Compare
d3xter666
force-pushed
the
autofix-deprecated-core-apis
branch
from
May 27, 2025 14:23
756264a to
cbc6e6a
Compare
d3xter666
marked this pull request as draft
May 28, 2025 07:00
d3xter666
force-pushed
the
autofix-deprecated-core-apis
branch
2 times, most recently
from
May 28, 2025 07:46
0c07e32 to
cb85a25
Compare
This was referenced May 28, 2025
d3xter666
force-pushed
the
autofix-deprecated-core-base
branch
from
May 28, 2025 11:07
8372914 to
79ea741
Compare
d3xter666
force-pushed
the
autofix-deprecated-core-apis
branch
3 times, most recently
from
May 29, 2025 07:12
f033503 to
0b46e18
Compare
d3xter666
marked this pull request as ready for review
May 29, 2025 08:25
d3xter666
force-pushed
the
autofix-deprecated-core-apis
branch
from
June 2, 2025 11:22
c815258 to
1eafe45
Compare
matz3
approved these changes
Jun 5, 2025
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA: CPOUI5FOUNDATION-991
Enhances #671 by enabling more complex autofixes where migration depends on the provided arguments.
Resolves partially: #619
Follow up PRs:
#675