diff --git a/package.json b/package.json index b8abac7..f09e59c 100644 --- a/package.json +++ b/package.json @@ -23,10 +23,10 @@ ], "license": "MIT", "engines": { - "node": ">=4" + "node": ">=6.11.5" }, "peerDependencies": { - "webpack": "^3 || ^2 || ^2.2.0-rc.0 || ^2.1.0-beta || ^1.12.6", + "webpack": "^4 || ^3 || ^2 || ^2.2.0-rc.0 || ^2.1.0-beta || ^1.12.6", "sass-extract": "^1.0.1 || ^2.0.0" }, "devDependencies": { @@ -34,7 +34,7 @@ "chai": "^4.1.2", "cz-conventional-changelog": "^2.1.0", "mocha": "^4.0.1", - "webpack": "^3.9.1" + "webpack": "^4.29.6" }, "config": { "commitizen": { diff --git a/test/index.js b/test/index.js index 7455fb6..d75505e 100644 --- a/test/index.js +++ b/test/index.js @@ -22,7 +22,7 @@ describe('sass-vars-loader', () => { expect(compiled.global.$e.sources).to.have.members([source]); expect(compiled.global.$f.sources).to.have.members([source]); - expect(stats.compilation.fileDependencies).to.have.members([source]); + expect(stats.compilation.fileDependencies).to.have.keys([source]); }); }); @@ -46,7 +46,7 @@ describe('sass-vars-loader', () => { expect(compiled.global.$e.sources).to.have.members([sourceSub2]); expect(compiled.global.$f.sources).to.have.members([sourceSub2]); - expect(stats.compilation.fileDependencies).to.have.members([sourceRoot, sourceSub1, sourceSub2]); + expect(stats.compilation.fileDependencies).to.have.keys([sourceRoot, sourceSub1, sourceSub2]); }); }); @@ -54,7 +54,7 @@ describe('sass-vars-loader', () => { return runTest('./scss/error.scss') .catch(err => { const source = path.resolve(__dirname, './scss/error.scss'); - expect(err.stats.compilation.fileDependencies).to.have.members([source]); + expect(err.stats.compilation.fileDependencies).to.have.keys([source]); }); }); @@ -63,7 +63,7 @@ describe('sass-vars-loader', () => { .catch(err => { const sourceRoot = path.resolve(__dirname, './scss/nested-error.scss'); const sourceSub = path.resolve(__dirname, './scss/sub/error.scss'); - expect(err.stats.compilation.fileDependencies).to.have.members([sourceRoot, sourceSub]); + expect(err.stats.compilation.fileDependencies).to.have.keys([sourceRoot, sourceSub]); }); }); @@ -80,7 +80,7 @@ describe('sass-vars-loader', () => { const sourceRoot = path.resolve(__dirname, './scss/include.scss'); const sourceIncluded = path.resolve(__dirname, './scss/include/included.scss'); - expect(stats.compilation.fileDependencies).to.have.members([sourceRoot, sourceIncluded]); + expect(stats.compilation.fileDependencies).to.have.keys([sourceRoot, sourceIncluded]); }); }); @@ -101,7 +101,7 @@ describe('sass-vars-loader', () => { expect(compiled.global.$d).to.equal('1px solid black'); expect(compiled.global.$e).to.equal('string'); - expect(stats.compilation.fileDependencies).to.have.members([source]); + expect(stats.compilation.fileDependencies).to.have.keys([source]); }); }); }); \ No newline at end of file diff --git a/test/run-test.js b/test/run-test.js index 247bf08..36201bc 100644 --- a/test/run-test.js +++ b/test/run-test.js @@ -10,7 +10,7 @@ module.exports = exports = (filename, options) => { entry: filename, context: __dirname, module: { - loaders: [ + rules: [ { test: /.scss$/, loader: pathToLoader + (options || ''),