Skip to content

Commit cdcbd4c

Browse files
committed
Revert "Flatten result of bundling (array of arrays of resources) before writing"
This reverts commit 9dcbb64.
1 parent 9dcbb64 commit cdcbd4c

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

lib/tasks/bundlers/generateComponentPreload.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const path = require("path");
22
const moduleBundler = require("../../processors/bundlers/moduleBundler");
33
const ReaderCollectionPrioritized = require("@ui5/fs").ReaderCollectionPrioritized;
4-
const flatten = require("arr-flatten");
54

65
/**
76
* Task to for application bundling.
@@ -21,10 +20,9 @@ module.exports = function({workspace, dependencies, options}) {
2120
name: `generateComponentPreload - prioritize workspace over dependencies: ${options.projectName}`,
2221
readers: [workspace, dependencies]
2322
});
24-
console.log(workspace);
23+
2524
return combo.byGlob("/resources/**/*.{js,json,xml,html,properties,library}")
2625
.then(async (resources) => {
27-
console.log(resources.map((res) => res.getPath()));
2826
let namespaces = [];
2927
if (options.paths) {
3028
namespaces = await Promise.all(options.paths.map(async (componentPath) => {
@@ -105,7 +103,7 @@ module.exports = function({workspace, dependencies, options}) {
105103
}
106104
}
107105
})
108-
]).then(flatten);
106+
]);
109107
}));
110108
})
111109
.then((processedResources) => {

lib/tasks/bundlers/generateLibraryPreload.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const log = require("@ui5/logger").getLogger("builder:tasks:bundlers:generateLibraryPreload");
22
const moduleBundler = require("../../processors/bundlers/moduleBundler");
33
const ReaderCollectionPrioritized = require("@ui5/fs").ReaderCollectionPrioritized;
4-
const flatten = require("arr-flatten");
54

65
function getBundleDefinition(namespace, h2) {
76
let h2infix = h2 ? "h2-" : "";
@@ -214,7 +213,7 @@ module.exports = function({workspace, dependencies, options}) {
214213
log.verbose(`Could not determine library namespace from file "${libraryIndicatorPath}" for project ${options.projectName}. Skipping library preload bundling.`);
215214
return Promise.resolve();
216215
}
217-
})).then(flatten);
216+
}));
218217
});
219218
});
220219
});

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@
101101
"@ui5/fs": "^0.0.1",
102102
"@ui5/logger": "^0.0.1",
103103
"archiver": "^2.1.0",
104-
"arr-flatten": "1.1.0",
105104
"escope": "^3.6.0",
106105
"esprima": "^2.7.2",
107106
"estraverse": "^4.2.0",

0 commit comments

Comments
 (0)