diff --git a/README.md b/README.md index 353f7b4ac..8d08df3ad 100644 --- a/README.md +++ b/README.md @@ -825,123 +825,3 @@ See [CHANGELOG.md](./CHANGELOG.md) [link-serverless-dynamodb-local]: https://www.npmjs.com/package/serverless-dynamodb-local [link-step-functions-offline]: https://www.npmjs.com/package/serverless-step-functions-offline [ico-step-functions-offline]: https://img.shields.io/npm/v/serverless-step-functions-offline.svg - -[comment]: # (Referenced issues) - -[link-135]: https://github.com/serverless-heaven/serverless-webpack/issues/135 - -[link-83]: https://github.com/serverless-heaven/serverless-webpack/pull/83 -[link-88]: https://github.com/serverless-heaven/serverless-webpack/pull/88 -[link-127]: https://github.com/serverless-heaven/serverless-webpack/pull/127 -[link-131]: https://github.com/serverless-heaven/serverless-webpack/pull/131 -[link-132]: https://github.com/serverless-heaven/serverless-webpack/pull/132 -[link-140]: https://github.com/serverless-heaven/serverless-webpack/pull/140 -[link-141]: https://github.com/serverless-heaven/serverless-webpack/issues/141 -[link-144]: https://github.com/serverless-heaven/serverless-webpack/issues/144 - -[link-11]: https://github.com/serverless-heaven/serverless-webpack/issues/11 -[link-107]: https://github.com/serverless-heaven/serverless-webpack/issues/107 -[link-129]: https://github.com/serverless-heaven/serverless-webpack/pull/129 -[link-154]: https://github.com/serverless-heaven/serverless-webpack/issues/154 -[link-159]: https://github.com/serverless-heaven/serverless-webpack/issues/159 - -[link-158]: https://github.com/serverless-heaven/serverless-webpack/issues/158 -[link-165]: https://github.com/serverless-heaven/serverless-webpack/issues/165 - -[link-193]: https://github.com/serverless-heaven/serverless-webpack/issues/193 - -[link-116]: https://github.com/serverless-heaven/serverless-webpack/issues/116 -[link-117]: https://github.com/serverless-heaven/serverless-webpack/issues/117 -[link-120]: https://github.com/serverless-heaven/serverless-webpack/issues/120 -[link-145]: https://github.com/serverless-heaven/serverless-webpack/issues/145 -[link-151]: https://github.com/serverless-heaven/serverless-webpack/issues/151 -[link-152]: https://github.com/serverless-heaven/serverless-webpack/issues/152 -[link-173]: https://github.com/serverless-heaven/serverless-webpack/issues/173 -[link-179]: https://github.com/serverless-heaven/serverless-webpack/pull/179 -[link-185]: https://github.com/serverless-heaven/serverless-webpack/pull/185 -[link-186]: https://github.com/serverless-heaven/serverless-webpack/pull/186 - -[link-202]: https://github.com/serverless-heaven/serverless-webpack/issues/202 - -[link-215]: https://github.com/serverless-heaven/serverless-webpack/issues/215 -[link-217]: https://github.com/serverless-heaven/serverless-webpack/issues/217 -[link-221]: https://github.com/serverless-heaven/serverless-webpack/pull/221 -[link-223]: https://github.com/serverless-heaven/serverless-webpack/issues/223 -[link-227]: https://github.com/serverless-heaven/serverless-webpack/pull/227 -[link-234]: https://github.com/serverless-heaven/serverless-webpack/pull/234 - -[link-245]: https://github.com/serverless-heaven/serverless-webpack/issues/245 - -[link-251]: https://github.com/serverless-heaven/serverless-webpack/issues/251 - -[link-126]: https://github.com/serverless-heaven/serverless-webpack/issues/126 -[link-247]: https://github.com/serverless-heaven/serverless-webpack/issues/247 -[link-250]: https://github.com/serverless-heaven/serverless-webpack/issues/250 -[link-254]: https://github.com/serverless-heaven/serverless-webpack/pull/254 -[link-260]: https://github.com/serverless-heaven/serverless-webpack/issues/260 -[link-264]: https://github.com/serverless-heaven/serverless-webpack/pull/264 -[link-265]: https://github.com/serverless-heaven/serverless-webpack/pull/265 - -[link-272]: https://github.com/serverless-heaven/serverless-webpack/issues/272 -[link-278]: https://github.com/serverless-heaven/serverless-webpack/pull/278 -[link-279]: https://github.com/serverless-heaven/serverless-webpack/issues/279 -[link-276]: https://github.com/serverless-heaven/serverless-webpack/issues/276 -[link-269]: https://github.com/serverless-heaven/serverless-webpack/issues/269 - -[link-263]: https://github.com/serverless-heaven/serverless-webpack/issues/263 - -[link-286]: https://github.com/serverless-heaven/serverless-webpack/issues/286 - -[link-315]: https://github.com/serverless-heaven/serverless-webpack/issues/315 -[link-316]: https://github.com/serverless-heaven/serverless-webpack/issues/316 -[link-253]: https://github.com/serverless-heaven/serverless-webpack/issues/253 -[link-317]: https://github.com/serverless-heaven/serverless-webpack/pull/317 -[link-321]: https://github.com/serverless-heaven/serverless-webpack/pull/321 - -[link-313]: https://github.com/serverless-heaven/serverless-webpack/pull/313 -[link-326]: https://github.com/serverless-heaven/serverless-webpack/pull/326 -[link-329]: https://github.com/serverless-heaven/serverless-webpack/issues/329 - -[link-232]: https://github.com/serverless-heaven/serverless-webpack/issues/232 -[link-331]: https://github.com/serverless-heaven/serverless-webpack/issues/331 -[link-328]: https://github.com/serverless-heaven/serverless-webpack/pull/328 -[link-336]: https://github.com/serverless-heaven/serverless-webpack/pull/336 -[link-337]: https://github.com/serverless-heaven/serverless-webpack/pull/337 - -[link-275]: https://github.com/serverless-heaven/serverless-webpack/issues/275 -[link-286]: https://github.com/serverless-heaven/serverless-webpack/issues/286 -[link-341]: https://github.com/serverless-heaven/serverless-webpack/issues/341 -[link-342]: https://github.com/serverless-heaven/serverless-webpack/issues/342 -[link-343]: https://github.com/serverless-heaven/serverless-webpack/issues/343 - -[link-349]: https://github.com/serverless-heaven/serverless-webpack/issues/349 -[link-354]: https://github.com/serverless-heaven/serverless-webpack/pull/354 -[link-355]: https://github.com/serverless-heaven/serverless-webpack/pull/355 - -[link-309]: https://github.com/serverless-heaven/serverless-webpack/issues/309 -[link-365]: https://github.com/serverless-heaven/serverless-webpack/pull/365 -[link-373]: https://github.com/serverless-heaven/serverless-webpack/pull/373 - -[link-370]: https://github.com/serverless-heaven/serverless-webpack/issues/370 - -[link-379]: https://github.com/serverless-heaven/serverless-webpack/issues/379 -[link-382]: https://github.com/serverless-heaven/serverless-webpack/pull/382 -[link-384]: https://github.com/serverless-heaven/serverless-webpack/pull/384 - -[link-393]: https://github.com/serverless-heaven/serverless-webpack/issues/393 -[link-412]: https://github.com/serverless-heaven/serverless-webpack/issues/412 -[link-418]: https://github.com/serverless-heaven/serverless-webpack/issues/418 - -[link-453]: https://github.com/serverless-heaven/serverless-webpack/issues/453 -[link-467]: https://github.com/serverless-heaven/serverless-webpack/issues/467 -[link-449]: https://github.com/serverless-heaven/serverless-webpack/issues/449 -[link-465]: https://github.com/serverless-heaven/serverless-webpack/issues/465 -[link-480]: https://github.com/serverless-heaven/serverless-webpack/issues/480 -[link-429]: https://github.com/serverless-heaven/serverless-webpack/pull/429 -[link-433]: https://github.com/serverless-heaven/serverless-webpack/issues/433 -[link-471]: https://github.com/serverless-heaven/serverless-webpack/issues/471 -[link-472]: https://github.com/serverless-heaven/serverless-webpack/pull/472 - -[link-505]: https://github.com/serverless-heaven/serverless-webpack/issues/505 -[link-499]: https://github.com/serverless-heaven/serverless-webpack/issues/499 -[link-496]: https://github.com/serverless-heaven/serverless-webpack/pull/496 diff --git a/lib/validate.js b/lib/validate.js index 1bfd026f8..26290e980 100644 --- a/lib/validate.js +++ b/lib/validate.js @@ -13,7 +13,7 @@ const Configuration = require('./Configuration'); * This should cover most of the cases. For complex setups the user should * build his own entries with help of the other exports. */ -const preferredExtensions = ['.js', '.ts', '.jsx', '.tsx']; +const preferredExtensions = [ '.js', '.ts', '.jsx', '.tsx' ]; module.exports = { validate() { @@ -229,7 +229,7 @@ module.exports = { const entry = path.relative('.', value); const entryFile = _.replace(entry, new RegExp(`${path.extname(entry)}$`), ''); - const entryFuncs = _.filter(allEntryFunctions, ['handlerFile', entryFile]); + const entryFuncs = _.filter(allEntryFunctions, [ 'handlerFile', entryFile ]); if (_.isEmpty(entryFuncs)) { // We have to make sure that for each entry there is an entry function item. entryFuncs.push({}); diff --git a/tests/compile.test.js b/tests/compile.test.js index f9b6b9298..4fc21eacd 100644 --- a/tests/compile.test.js +++ b/tests/compile.test.js @@ -117,7 +117,7 @@ describe('compile', () => { }); it('should work with concurrent compile', () => { - const testWebpackConfig = 'testconfig'; + const testWebpackConfig = [ 'testconfig', 'testconfig2' ]; const multiStats = { stats: [ { @@ -134,12 +134,13 @@ describe('compile', () => { }; module.webpackConfig = testWebpackConfig; module.multiCompile = true; - module.configuration = { concurrency: 1 }; + module.configuration = { concurrency: 2 }; webpackMock.compilerMock.run.reset(); webpackMock.compilerMock.run.yields(null, multiStats); return expect(module.compile()).to.be.fulfilled.then(() => { - expect(webpackMock).to.have.been.calledWith(testWebpackConfig); - expect(webpackMock.compilerMock.run).to.have.been.calledOnce; + expect(webpackMock).to.have.been.calledWith(testWebpackConfig[0]); + expect(webpackMock).to.have.been.calledWith(testWebpackConfig[1]); + expect(webpackMock.compilerMock.run).to.have.been.calledTwice; return null; }); }); @@ -172,7 +173,7 @@ describe('compile', () => { }) .then(() => { expect(webpackMock).to.have.been.calledWith(testWebpackConfig); - expect(mockStats.toString.args).to.eql([[testWebpackConfig.stats], [testWebpackConfig.stats]]); + expect(mockStats.toString.args).to.eql([ [testWebpackConfig.stats], [testWebpackConfig.stats] ]); return null; }); });