Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] ApplicationFormatter: Implement manifest.appdescr_variant fallback #545

Merged
merged 4 commits into from
Dec 7, 2020

Conversation

RandomByte
Copy link
Member

@RandomByte RandomByte commented Nov 19, 2020

App Variants typically do not have a manifest.json (they only add that during the build) but a manifest.appdescr_variant.

During the project namespace detection, in case no manifest.json is present (error ENOENT), we now attempt a fallback to manifest.appdescr_variant (if present).

For more information see:

JIRA: CPOUI5FOUNDATION-284

@RandomByte RandomByte changed the title [WIP] ApplicationFormatter: Immplement manifest.appdescr_variant fallback [WIP] ApplicationFormatter: Implement manifest.appdescr_variant fallback Nov 19, 2020
@RandomByte RandomByte force-pushed the app-variant-namespace-fallback branch from 62a05b1 to 838af70 Compare November 19, 2020 12:56
@coveralls
Copy link

coveralls commented Nov 19, 2020

Coverage Status

Coverage increased (+0.0007%) to 93.196% when pulling bb6774f on app-variant-namespace-fallback into 2457d6e on master.

@RandomByte RandomByte force-pushed the app-variant-namespace-fallback branch from 838af70 to 7f6ea90 Compare December 2, 2020 20:53
…allback

App Variants typically do not have a manifest.json (they only add that
during the build) but a manifest.appdescr_variant.

During the project namespace detection, in case no manifest.json is
present (error ENOENT), we now attempt a fallback to
manifest.appdescr_variant (if present).

For more information see:
* https://help.sap.com/viewer/a7b390faab1140c087b8926571e942b7/202009.000/en-US/af47058ad66144579db6a990f3b7b919.html
* https://blogs.sap.com/2020/07/15/adaptation-project-your-one-stop-tool-for-extending-sapui5-applications/

JIRA: CPOUI5FOUNDATION-284
@RandomByte RandomByte force-pushed the app-variant-namespace-fallback branch from 7f6ea90 to 4127a48 Compare December 2, 2020 20:54
@RandomByte RandomByte changed the title [WIP] ApplicationFormatter: Implement manifest.appdescr_variant fallback ApplicationFormatter: Implement manifest.appdescr_variant fallback Dec 2, 2020
@RandomByte RandomByte marked this pull request as ready for review December 2, 2020 20:56
@RandomByte RandomByte requested a review from matz3 December 2, 2020 20:56
@RandomByte RandomByte changed the title ApplicationFormatter: Implement manifest.appdescr_variant fallback [FEATURE] ApplicationFormatter: Implement manifest.appdescr_variant fallback Dec 2, 2020
Copy link

@aleksandr-suvorov aleksandr-suvorov left a comment

Choose a reason for hiding this comment

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

Great, I've tested that on our projects, thank you!

const project = createMockProject();
const applicationFormatter = new ApplicationFormatter({project});
const getJsonStub = sinon.stub(applicationFormatter, "getJson")
.onFirstCall().rejects({message: "No such stable or directory: manifest.json", code: "ENOENT"})
Copy link
Member

Choose a reason for hiding this comment

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

"No such stable"? 🏇🏻 🤔

@RandomByte RandomByte merged commit 6d44481 into master Dec 7, 2020
@RandomByte RandomByte deleted the app-variant-namespace-fallback branch December 7, 2020 14:24
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.

4 participants