Skip to content

Commit a236f66

Browse files
author
bweigel
committed
don't filter files when injecting
1 parent 3d030a5 commit a236f66

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/inject.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ function injectRequirements(requirementsPath, packagePath, options) {
5050
* @param {string} module module to keep
5151
* @return {Promise} the JSZip object written out.
5252
*/
53-
function moveModuleUp(source, target, module, options) {
53+
function injectSourceCode(source, target, module, options) {
5454
const targetZip = new JSZip();
5555

5656
return fse
5757
.readFileAsync(source)
5858
.then(buffer => JSZip.loadAsync(buffer))
59-
.then(sourceZip => sourceZip.filter(file => file.startsWith(module + '/')))
59+
.then(sourceZip => sourceZip.filter(() => true))
6060
.map(srcZipObj => {
6161
let targetName;
6262

@@ -102,7 +102,7 @@ function injectAllRequirements(funcArtifact) {
102102
`${func.module}-${func.name}.zip`
103103
);
104104
func.package.artifact = newArtifact;
105-
return moveModuleUp(
105+
return injectSourceCode(
106106
artifact,
107107
newArtifact,
108108
func.module,

0 commit comments

Comments
 (0)