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

[FIX] LibraryFormatter: Do not throw for missing .library in legacy OpenUI5 theme libraries #593

Merged
merged 1 commit into from
Mar 9, 2021

Conversation

RandomByte
Copy link
Member

@RandomByte RandomByte commented Mar 9, 2021

Exception handling was already in place for legacy OpenUI5 theme
libraries that still use type 'library' instead of 'theme-library': #437

This allowed them to still be formatted even though they are missing a
.library file.

However, the newly added preload exclude configuration fallback for
framework libraries also requires a .library file and did not make the
mentioned exception for legacy OpenUI5 theme libraries: #573

This fix adds that exception and the tests that were missing from #437

…penUI5 theme libraries

Exception handling was already in place for legacy OpenUI5 theme
libraries that still use type 'library' instead of 'theme-library':
#437

This allowed them to still be formatted even though they are missing a
.library file.

However, the newly added preload exclude configuration fallback for
framework libraries also requires a .library file and did not make the
mentioned exception for legacy OpenUI5 theme libraries:
#573

This fix adds that exception and the tests that were missing from
#437
@RandomByte RandomByte requested a review from matz3 March 9, 2021 14:38
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 94.004% when pulling 103eb4c on fix-legacy-theme-lib-build into b7b1a33 on master.

sinon.stub(libraryFormatter, "validate").resolves();

await t.notThrowsAsync(libraryFormatter.format(), "Does not throw for missing .library");
t.deepEqual(myProject.metadata.copyright, legacyThemeLibTree.metadata.copyright, "Copyright was not altered");
Copy link
Member

Choose a reason for hiding this comment

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

Probably a leftover from another test, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Well yes but I still found it to be valid

@RandomByte RandomByte merged commit f7e22ba into master Mar 9, 2021
@RandomByte RandomByte deleted the fix-legacy-theme-lib-build branch March 9, 2021 16:29
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.

3 participants