Skip to content

Commit

Permalink
Fix issue in dependency handling, improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
codeworrior committed Dec 29, 2019
1 parent dcb2252 commit f72c914
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 10 deletions.
6 changes: 1 addition & 5 deletions lib/processors/resourceListCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,6 @@ class ResourceInfo {
}
return result;
}

isEmpty() {
return this.i18nLocale == null && this.i18nName == null && this.isDebug == false && this.theme == null && this.merged == false;
}
}

/**
Expand Down Expand Up @@ -412,7 +408,7 @@ class ResourceCollector {
resourceInfo.condRequired = resourceInfo.condRequired || new Set();
info.dependencies.forEach((dep) => {
if ( info.isConditionalDependency(dep) ) {
resourceInfo.condRequired.push(dep);
resourceInfo.condRequired.add(dep);
} else if ( !info.isImplicitDependency(dep) ) {
resourceInfo.required.add(dep);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sap.ui.define([
) {
"use strict";

return Control.extend("library.n.Button", {
return Control.extend("library.n.Button", {
metadata : {
library : "library.n",
properties : {
Expand Down Expand Up @@ -44,6 +44,13 @@ sap.ui.define([
oRm.close("span");
oRm.close("button");
}
},
helper: function(sCalendarType) {
var sCalendar = "sap/ui/core/date/" + sCalendarType;
sap.ui.require(["sap/ui/core/format/DateFormat", sCalendar], function(DateFormat, Calendar) {
DateFormat.getInstance();
new Calendar();
});
}
});

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,23 @@
"required": [
"library/n/library.js",
"sap/ui/core/Control.js"
]
],
"condRequired": [
"sap/ui/core/format/DateFormat.js"
],
"dynRequired": true
},
{
"name": "Button.js",
"module": "library/n/Button.js",
"required": [
"library/n/library.js",
"sap/ui/core/Control.js"
]
],
"condRequired": [
"sap/ui/core/format/DateFormat.js"
],
"dynRequired": true
},
{
"name": "changeHandler/SplitButton-dbg.js",
Expand Down
9 changes: 8 additions & 1 deletion test/fixtures/library.n/src/library/n/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ sap.ui.define([
) {
"use strict";

return Control.extend("library.n.Button", {
return Control.extend("library.n.Button", {
metadata : {
library : "library.n",
properties : {
Expand Down Expand Up @@ -42,6 +42,13 @@ sap.ui.define([
oRm.close("span");
oRm.close("button");
}
},
helper: function(sCalendarType) {
var sCalendar = "sap/ui/core/date/" + sCalendarType;
sap.ui.require(["sap/ui/core/format/DateFormat", sCalendar], function(DateFormat, Calendar) {
DateFormat.getInstance();
new Calendar();
});
}
});

Expand Down

0 comments on commit f72c914

Please sign in to comment.