-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Build DepCache files (*-h2-preload.js) for HTTP/2 support
- implement a new bundle section type 'depcache' in the lbt builder - ignore pseudo-dependencies 'require', 'module' and 'exports' in the dependency analyzer (so that they don't appear in the dependency cache) - add configuration in the library and component preload bundlers to create bundles with the new section types in parallel to the existing preload bundles (using an '-h2-preload' suffix) - switch application.g, application.h and library.h fixtures to use evo bundle format by adding a dependency to the sap.ui.core substitute fixture - add the newly created h2-preload bundles to the set of expected files - add a test scenario 'library.j' that runs the library bundle generation (in order to improve code coverage)
- Loading branch information
1 parent
05d4127
commit a2b9599
Showing
31 changed files
with
436 additions
and
171 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
6 changes: 6 additions & 0 deletions
6
test/expected/build/application.g/dest/Component-h2-preload.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
sap.ui.require.preload({ | ||
"application/g/manifest.json":'{"_version":"1.1.0","sap.app":{"_version":"1.1.0","id":"application.g","type":"application","applicationVersion":{"version":"1.2.2"},"embeds":["embedded"],"title":"{{title}}"}}' | ||
}); | ||
sap.ui.loader.config({depCacheUI5:{ | ||
"application/g/Component.js": ["sap/ui/core/UIComponent.js"] | ||
}}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
jQuery.sap.registerPreloadedModules({ | ||
"version":"2.0", | ||
"modules":{ | ||
sap.ui.require.preload({ | ||
"application/g/Component.js":function(){sap.ui.define(["sap/ui/core/UIComponent"],function(n){"use strict";return n.extend("application.g.Component",{metadata:{manifest:"json"}})}); | ||
}, | ||
"application/g/manifest.json":'{"_version":"1.1.0","sap.app":{"_version":"1.1.0","id":"application.g","type":"application","applicationVersion":{"version":"1.2.2"},"embeds":["embedded"],"title":"{{title}}"}}' | ||
}}); | ||
}); |
6 changes: 6 additions & 0 deletions
6
test/expected/build/application.g/dest/subcomponentA/Component-h2-preload.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
sap.ui.require.preload({ | ||
"application/g/subcomponentA/manifest.json":'{"_version":"1.1.0","sap.app":{"_version":"1.1.0","id":"application.g.subcomponentA","type":"application","applicationVersion":{"version":"1.2.2"},"embeds":["embedded"],"title":"{{title}}"}}' | ||
}); | ||
sap.ui.loader.config({depCacheUI5:{ | ||
"application/g/subcomponentA/Component.js": ["sap/ui/core/UIComponent.js"] | ||
}}); |
6 changes: 2 additions & 4 deletions
6
test/expected/build/application.g/dest/subcomponentA/Component-preload.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
jQuery.sap.registerPreloadedModules({ | ||
"version":"2.0", | ||
"modules":{ | ||
sap.ui.require.preload({ | ||
"application/g/subcomponentA/Component.js":function(){sap.ui.define(["sap/ui/core/UIComponent"],function(n){"use strict";return n.extend("application.g.subcomponentA.Component",{metadata:{manifest:"json"}})}); | ||
}, | ||
"application/g/subcomponentA/manifest.json":'{"_version":"1.1.0","sap.app":{"_version":"1.1.0","id":"application.g.subcomponentA","type":"application","applicationVersion":{"version":"1.2.2"},"embeds":["embedded"],"title":"{{title}}"}}' | ||
}}); | ||
}); |
6 changes: 6 additions & 0 deletions
6
test/expected/build/application.g/dest/subcomponentB/Component-h2-preload.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
sap.ui.require.preload({ | ||
"application/g/subcomponentB/manifest.json":'{"_version":"1.1.0","sap.app":{"_version":"1.1.0","id":"application.g.subcomponentB","type":"application","applicationVersion":{"version":"1.2.2"},"embeds":["embedded"],"title":"{{title}}"}}' | ||
}); | ||
sap.ui.loader.config({depCacheUI5:{ | ||
"application/g/subcomponentB/Component.js": ["sap/ui/core/UIComponent.js"] | ||
}}); |
6 changes: 2 additions & 4 deletions
6
test/expected/build/application.g/dest/subcomponentB/Component-preload.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
jQuery.sap.registerPreloadedModules({ | ||
"version":"2.0", | ||
"modules":{ | ||
sap.ui.require.preload({ | ||
"application/g/subcomponentB/Component.js":function(){sap.ui.define(["sap/ui/core/UIComponent"],function(n){"use strict";return n.extend("application.g.subcomponentB.Component",{metadata:{manifest:"json"}})}); | ||
}, | ||
"application/g/subcomponentB/manifest.json":'{"_version":"1.1.0","sap.app":{"_version":"1.1.0","id":"application.g.subcomponentB","type":"application","applicationVersion":{"version":"1.2.2"},"embeds":["embedded"],"title":"{{title}}"}}' | ||
}}); | ||
}); |
6 changes: 2 additions & 4 deletions
6
test/expected/build/application.h/dest/sectionsA/customBundle.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
jQuery.sap.registerPreloadedModules({ | ||
"version":"2.0", | ||
"modules":{ | ||
sap.ui.require.preload({ | ||
"application/h/sectionsA/section1.js":function(){sap.ui.define(["sap/m/Button"],function(n){console.log("Section 1 included")}); | ||
}, | ||
"application/h/sectionsA/section3.js":function(){sap.ui.define(["sap/m/Button"],function(n){console.log("Section 3 included")}); | ||
} | ||
}}); | ||
}); |
6 changes: 2 additions & 4 deletions
6
test/expected/build/application.h/dest/sectionsB/customBundle.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
jQuery.sap.registerPreloadedModules({ | ||
"version":"2.0", | ||
"modules":{ | ||
sap.ui.require.preload({ | ||
"application/h/sectionsB/section1.js":function(){sap.ui.define(["sap/m/Button"],function(n){console.log("Section 1 included")}); | ||
}, | ||
"application/h/sectionsB/section2.js":function(){sap.ui.define(["sap/m/Button"],function(n){console.log("Section 2 included")}); | ||
}, | ||
"application/h/sectionsB/section3.js":function(){sap.ui.define(["sap/m/Button"],function(n){console.log("Section 3 included")}); | ||
} | ||
}}); | ||
}); |
3 changes: 3 additions & 0 deletions
3
test/expected/build/library.h/dest/resources/library/h/components/Component-h2-preload.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
sap.ui.loader.config({depCacheUI5:{ | ||
"library/h/components/Component.js": ["sap/ui/core/UIComponent.js"] | ||
}}); |
3 changes: 3 additions & 0 deletions
3
...build/library.h/dest/resources/library/h/components/subcomponent1/Component-h2-preload.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
sap.ui.loader.config({depCacheUI5:{ | ||
"library/h/components/subcomponent1/Component.js": ["sap/ui/core/UIComponent.js"] | ||
}}); |
Oops, something went wrong.