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] Add Library/Component preload exclude configuration #573

Merged
merged 26 commits into from
Feb 9, 2021

Conversation

matz3
Copy link
Member

@matz3 matz3 commented Jan 25, 2021

JIRA: CPOUI5FOUNDATION-233

@matz3 matz3 requested a review from RandomByte January 25, 2021 17:22
@coveralls
Copy link

coveralls commented Jan 25, 2021

Coverage Status

Coverage increased (+0.07%) to 93.906% when pulling 172bb9d on preload-excludes into 17561bb on master.

@RandomByte
Copy link
Member

sap.ui.core excludes from .library look like this:

"builder": {
      "libraryPreload": {
            "excludes": [
                  "jquery-*.js",
                  "sap-*",
                  "sap/ui/core/plugin/DeclarativeSupport.js",
                  "sap/ui/core/plugin/LessSupport.js",
                  "sap/ui/debug/**",
                  "sap/ui/core/support/",
                  "sap/ui/qunit/**",
                  "sap/ui/test/**",
                  "testsuite/**",
                  "jquery-ui-core.js",
                  "jquery-ui-datepicker.js",
                  "jquery-ui-position.js",
                  "sap/ui/model/odata/datajs.js",
                  "sap/ui/thirdparty/bignumber.js",
                  "sap/ui/thirdparty/blanket.js",
                  "sap/ui/thirdparty/d3.js",
                  "sap/ui/thirdparty/datajs.js",
                  "sap/ui/thirdparty/es6-object-assign.js",
                  "sap/ui/thirdparty/es6-string-methods.js",
                  "sap/ui/thirdparty/flexie.js",
                  "sap/ui/thirdparty/handlebars.js",
                  "sap/ui/thirdparty/IPv6.js",
                  "sap/ui/thirdparty/iscroll.js",
                  "sap/ui/thirdparty/iscroll-lite.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-widget.js",
                  "sap/ui/thirdparty/jqueryui/jquery-effect*.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-effect.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-effect-blind.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-effect-bounce.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-effect-clip.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-effect-drop.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-effect-explode.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-effect-fade.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-effect-fold.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-effect-highlight.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-effect-pulsate.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-effect-scale.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-effect-shake.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-effect-slide.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-effect-transfer.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-mouse.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-draggable.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-resizable.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-selectable.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-sortable.js",
                  "sap/ui/thirdparty/jqueryui/jquery-ui-droppable.js",
                  "sap/ui/thirdparty/jszip.js",
                  "sap/ui/thirdparty/klay.js",
                  "sap/ui/thirdparty/less.js",
                  "sap/ui/thirdparty/mobify-carousel.js",
                  "sap/ui/thirdparty/mobiscroll/js/mobiscroll-core.js",
                  "sap/ui/thirdparty/mobiscroll/js/mobiscroll-scroller.js",
                  "sap/ui/thirdparty/mobiscroll/js/mobiscroll-datetime.js",
                  "sap/ui/thirdparty/punycode.js",
                  "sap/ui/thirdparty/qunit-2.js",
                  "sap/ui/thirdparty/qunit-composite.js",
                  "sap/ui/thirdparty/qunit-reporter-junit.js",
                  "sap/ui/thirdparty/qunit.js",
                  "sap/ui/thirdparty/RequestRecorder.js",
                  "sap/ui/thirdparty/require.js",
                  "sap/ui/thirdparty/SecondLevelDomains.js",
                  "sap/ui/thirdparty/sinon-4.js",
                  "sap/ui/thirdparty/sinon-ie.js",
                  "sap/ui/thirdparty/sinon-qunit.js",
                  "sap/ui/thirdparty/sinon-server.js",
                  "sap/ui/thirdparty/sinon.js",
                  "sap/ui/thirdparty/swipe-view.js",
                  "sap/ui/thirdparty/unorm.js",
                  "sap/ui/thirdparty/unormdata.js",
                  "sap/ui/thirdparty/URITemplate.js",
                  "sap/ui/thirdparty/vkbeautify.js",
                  "sap/ui/thirdparty/zyngascroll.js",
                  "sap/ui/thirdparty/hyphenopoly/**"
            ]
      }
}

@matz3
Copy link
Member Author

matz3 commented Feb 2, 2021

@RandomByte for sap.ui.core library-preload.js we need to have a custom bundle definition, as there are multiple namespaces to be included.

@matz3 matz3 marked this pull request as ready for review February 4, 2021 15:30
lib/tasks/bundlers/generateComponentPreload.js Outdated Show resolved Hide resolved
lib/tasks/bundlers/generateComponentPreload.js Outdated Show resolved Hide resolved
lib/tasks/bundlers/generateLibraryPreload.js Outdated Show resolved Hide resolved
lib/lbt/resources/ResourceFilterList.js Show resolved Hide resolved
This prevents potential misinterpretation of paths that start with +, -
or !

Calling negatFilters an even number of times will give now always return
a value that is semantically equal to the initial input.
@matz3 matz3 changed the title [FEATURE] Library/Component preload exclude configuration [FEATURE] Add Library/Component preload exclude configuration Feb 9, 2021
@matz3 matz3 merged commit f1644a4 into master Feb 9, 2021
@matz3 matz3 deleted the preload-excludes branch February 9, 2021 16:23
Copy link
Contributor

@KlattG KlattG left a comment

Choose a reason for hiding this comment

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

Do I need to look at the files in ~/test/ as well?

@RandomByte
Copy link
Member

@KlattG I applied your feedback in a follow-up pull request: #584

RandomByte added a commit that referenced this pull request Feb 12, 2021
RandomByte added a commit that referenced this pull request Mar 9, 2021
…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 added a commit that referenced this pull request Mar 9, 2021
…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
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.

5 participants