feat: Autofix Core API (complex cases)#675
Merged
Merged
Conversation
matz3
reviewed
May 28, 2025
| const potentialLibNamespace = node.text; | ||
|
|
||
| // Check libs from the manifest | ||
| const manifest = JSON.parse(this.manifestContent ?? "{}") as SAPJSONSchemaForWebApplicationManifestFile; |
Member
There was a problem hiding this comment.
Can't we just re-use the existing logic that extracts manifest.json information instead of doing it again here?
(see https://github.com/SAP/ui5-linter/blob/7b1e6dd11d06c22a200b381ee08a4127431b22de/src/linter/lintWorkspace.ts#L173)
We could change this to a broader scope, like getInformationFromManifest, and then returning an object with the relevant details.
Member
Author
There was a problem hiding this comment.
I just split the existing solution into separate PRs and now I'll do the refactorings
Member
There was a problem hiding this comment.
Ah, sorry for the premature review 😄
|
|
||
| if (manifestLibs[potentialLibNamespace]) { | ||
| return true; | ||
| } else if (manifest?.["sap.app"]?.id === potentialLibNamespace) { |
Member
There was a problem hiding this comment.
This check should only be done when the project is a library.
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
d3xter666
force-pushed
the
autofix-determine-library-resource
branch
from
May 28, 2025 08:41
56ebba1 to
66098d1
Compare
This was referenced May 28, 2025
d3xter666
force-pushed
the
autofix-deprecated-core-apis
branch
from
May 28, 2025 11:20
f67bfba to
d4eed0f
Compare
d3xter666
force-pushed
the
autofix-determine-library-resource
branch
from
May 28, 2025 11:36
08844d2 to
4ad1d98
Compare
d3xter666
force-pushed
the
autofix-deprecated-core-apis
branch
2 times, most recently
from
May 29, 2025 07:12
f033503 to
0b46e18
Compare
d3xter666
force-pushed
the
autofix-determine-library-resource
branch
2 times, most recently
from
May 29, 2025 08:32
18ec577 to
5015376
Compare
d3xter666
force-pushed
the
autofix-deprecated-core-apis
branch
2 times, most recently
from
May 30, 2025 16:07
3360082 to
c815258
Compare
d3xter666
force-pushed
the
autofix-determine-library-resource
branch
from
May 30, 2025 16:21
bcf4001 to
c0ed35a
Compare
d3xter666
added a commit
that referenced
this pull request
Jun 2, 2025
JIRA: CPOUI5FOUNDATION-991 This is the first (base) chunk of several PRs related to the Core APIs autofix. All of the other PRs would build on top of it. Here we migrate the trivial cases where replacements are 1:1 Resolves partially: #619 Follow up PRs: #639 #675 --------- Co-authored-by: Max Reichmann <max.reichmann@sap.com>
d3xter666
force-pushed
the
autofix-deprecated-core-apis
branch
from
June 2, 2025 11:22
c815258 to
1eafe45
Compare
d3xter666
added a commit
that referenced
this pull request
Jun 5, 2025
Member
Author
|
Will be merged after: #662 |
d3xter666
force-pushed
the
autofix-determine-library-resource
branch
2 times, most recently
from
June 17, 2025 10:27
9467ff9 to
c17665e
Compare
d3xter666
marked this pull request as ready for review
June 17, 2025 11:38
d3xter666
force-pushed
the
autofix-determine-library-resource
branch
from
June 18, 2025 06:58
3fff6d0 to
6e4f54c
Compare
RandomByte
requested changes
Jun 18, 2025
d3xter666
force-pushed
the
autofix-determine-library-resource
branch
2 times, most recently
from
June 19, 2025 13:03
8c700dd to
c40e64f
Compare
Co-authored-by: Merlin Beutlberger <m.beutlberger@sap.com>
Co-authored-by: Merlin Beutlberger <m.beutlberger@sap.com>
Co-authored-by: Merlin Beutlberger <m.beutlberger@sap.com>
Co-authored-by: Merlin Beutlberger <m.beutlberger@sap.com>
d3xter666
force-pushed
the
autofix-determine-library-resource
branch
from
June 20, 2025 15:07
fa4649a to
8e43420
Compare
RandomByte
approved these changes
Jun 20, 2025
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
#675
Enables
getLibraryResourceBundlemigration by checking whethersLibrary(the first argument) is an actual SAPUI5 library. The check is performed as follows:libsinmanifest.jsonReolves partially: #619