Skip to content

Commit 0a32bbc

Browse files
committed
Node v4 requires "use strict" to allow block scoped let & const
Node v4: replaced "spread" operator with "apply"
1 parent 5644b1a commit 0a32bbc

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ matrix:
1313
node_js: '7'
1414
env: WEBPACK_VERSION="2.2.0" JOB_PART=test
1515
- os: linux
16-
node_js: '4.3'
16+
node_js: '4'
1717
env: WEBPACK_VERSION="2.2.0" JOB_PART=test
1818
- os: linux
1919
node_js: '6'

test/basicTest.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Node v4 requires "use strict" to allow block scoped let & const
2+
"use strict";
3+
14
describe("basic tests", function() {
25
var path = require("path");
36

test/utils.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Node v4 requires "use strict" to allow block scoped let & const
2+
"use strict";
3+
14
var MemoryFS = require("memory-fs");
25
var realFs = require("fs");
36
var webpack = require("webpack");
@@ -39,9 +42,9 @@ module.exports = {
3942
compiler.inputFileSystem[fn] = function(_path) {
4043
// Fallback to real FS if file is not in the memoryFS
4144
if (fs.existsSync(_path)) {
42-
return fs["mem" + fn](...arguments);
45+
return fs["mem" + fn].apply(fs, arguments);
4346
} else {
44-
return realFs[fn](...arguments);
47+
return realFs[fn].apply(realFs, arguments);
4548
}
4649
};
4750
});

0 commit comments

Comments
 (0)