From 1ec0d21aa9872815a9940bd907ece973481d61a0 Mon Sep 17 00:00:00 2001 From: Nick Daniels Date: Sat, 13 Oct 2018 08:01:27 -0400 Subject: [PATCH 01/38] Fix issue 201 by moving cache to the function . --- index.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index 7d87a9d..abc26dd 100644 --- a/index.js +++ b/index.js @@ -26,15 +26,13 @@ var defaultStatsOptions = { errorDetails: false }; -var cache = {}; -module.exports = function (options, wp, done) { - if (cache.wp !== wp || cache.options !== options) { - cache = {}; - } - cache.options = options; - cache.wp = wp; +module.exports = function (options, wp, done) { + var cache = { + options: options, + wp: wp + }; options = clone(options) || {}; var config = options.config || options; From bc1c2b021f04b01b604786a3b30f1ad9e6c71af1 Mon Sep 17 00:00:00 2001 From: Nick Daniels Date: Sat, 13 Oct 2018 08:10:35 -0400 Subject: [PATCH 02/38] Still fixing 201, fixing multiple blank lines --- index.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/index.js b/index.js index abc26dd..c1c5cb0 100644 --- a/index.js +++ b/index.js @@ -26,8 +26,6 @@ var defaultStatsOptions = { errorDetails: false }; - - module.exports = function (options, wp, done) { var cache = { options: options, From 2797873cd8e874bc6a20662a7e4a6d767106372e Mon Sep 17 00:00:00 2001 From: Christian Galliano Date: Wed, 21 Nov 2018 01:25:57 +0200 Subject: [PATCH 03/38] watchOptions support --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 7d87a9d..9a2bcb2 100644 --- a/index.js +++ b/index.js @@ -172,7 +172,7 @@ module.exports = function (options, wp, done) { }; if (options.watch) { - const watchOptions = {}; + const watchOptions = options.watchOptions || {}; compiler.watch(watchOptions, callback); } else { compiler.run(callback); From b217f4aa44fe27f8ae32667048fe0a6d0ce97773 Mon Sep 17 00:00:00 2001 From: Zach Broniszewski Date: Fri, 30 Nov 2018 22:28:13 -0500 Subject: [PATCH 04/38] =?UTF-8?q?=E2=9E=95=20Added=20support=20for=20Webpa?= =?UTF-8?q?ck=204's=20quiet=20log=20options=20in=20order=20to=20properly?= =?UTF-8?q?=20check=20if=20suppressing=20any=20unwanted=20logs=20based=20o?= =?UTF-8?q?n=20a=20Webpack=204=20config=20is=20necessary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 7d87a9d..49ce0da 100644 --- a/index.js +++ b/index.js @@ -38,6 +38,14 @@ module.exports = function (options, wp, done) { options = clone(options) || {}; var config = options.config || options; + + /** + * Webpack 4 doesn't support the `quiet` attribute, however supports + * setting `stats` to a string within an array of configurations + * (errors-only|minimal|none|normal|verbose) + */ + const isSilent = options.quiet || (options.stats && (options.stats.match(/^(errors-only|minimal|none)$/))); + if (typeof done !== 'function') { var callingDone = false; done = function (err, stats) { @@ -46,7 +54,7 @@ module.exports = function (options, wp, done) { return; } stats = stats || {}; - if (options.quiet || callingDone) { + if (isSilent || callingDone) { return; } @@ -166,7 +174,7 @@ module.exports = function (options, wp, done) { self.queue(null); } done(err, stats); - if (options.watch && !options.quiet) { + if (options.watch && !isSilent) { fancyLog('webpack is watching for changes'); } }; From 249b38ce9a59089f7303448821c6ce6a1ff439b4 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Sat, 1 Dec 2018 17:26:36 -0800 Subject: [PATCH 05/38] Updating webpack, supports-color and fancy-log --- package.json | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 4e41e7a..9e36a63 100644 --- a/package.json +++ b/package.json @@ -16,28 +16,37 @@ "scripts": { "test": "semistandard && node test/test.js" }, - "files": ["index.js"], + "files": [ + "index.js" + ], "semistandard": { - "ignore": ["test/fixtures", "examples"] + "ignore": [ + "test/fixtures", + "examples" + ] }, "dependencies": { - "fancy-log": "^1.3.2", + "fancy-log": "^1.3.3", "lodash.clone": "^4.3.2", "lodash.some": "^4.2.2", "memory-fs": "^0.4.1", "plugin-error": "^1.0.1", - "supports-color": "^5.3.0", + "supports-color": "^5.5.0", "through": "^2.3.8", "vinyl": "^2.1.0", - "webpack": "^4.7.0" + "webpack": "^4.26.1" }, "devDependencies": { "gulp": "^3.9.0", "rimraf": "^2.4.4", - "semistandard": "^12.0.1", + "semistandard": "^13.0.1", "tape": "^4.9.0", "vinyl-fs": "^3.0.2", "vinyl-named": "^1.1.0" }, - "keywords": ["gulpplugin", "webpack", "stream"] + "keywords": [ + "gulpplugin", + "webpack", + "stream" + ] } From a9d3880890a327d1722283815a1f9be1cffa2d79 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Sat, 1 Dec 2018 17:28:32 -0800 Subject: [PATCH 06/38] Add Node 10 to travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7378d9e..753797a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,5 +2,5 @@ language: node_js node_js: - '6' - '8' + - '10' - 'node' - From 32150307028433760e5270a4f8a34f90a205cc20 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Sat, 1 Dec 2018 17:30:42 -0800 Subject: [PATCH 07/38] v5.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9e36a63..cd3bc12 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack-stream", - "version": "5.1.1", + "version": "5.2.0", "description": "Run webpack as a stream", "license": "MIT", "homepage": "https://github.com/shama/webpack-stream", From f29df3a4d9989579ed586d611ee71805b8669e2b Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Sun, 2 Dec 2018 17:01:09 -0800 Subject: [PATCH 08/38] Check if options.stats is a string before calling match. Fixes GH-211 --- index.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index 2c2b9ef..9edc6ea 100644 --- a/index.js +++ b/index.js @@ -39,12 +39,11 @@ module.exports = function (options, wp, done) { options = clone(options) || {}; var config = options.config || options; - /** - * Webpack 4 doesn't support the `quiet` attribute, however supports - * setting `stats` to a string within an array of configurations - * (errors-only|minimal|none|normal|verbose) - */ - const isSilent = options.quiet || (options.stats && (options.stats.match(/^(errors-only|minimal|none)$/))); + // Webpack 4 doesn't support the `quiet` attribute, however supports + // setting `stats` to a string within an array of configurations + // (errors-only|minimal|none|normal|verbose) or an object with an absurd + // amount of config + const isSilent = options.quiet || (typeof options.stats === 'string' && (options.stats.match(/^(errors-only|minimal|none)$/))); if (typeof done !== 'function') { var callingDone = false; From fa9a5b24d056cf99ddc2ee8e79b7390c294209a0 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Sun, 2 Dec 2018 17:01:41 -0800 Subject: [PATCH 09/38] v5.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cd3bc12..694d8d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack-stream", - "version": "5.2.0", + "version": "5.2.1", "description": "Run webpack as a stream", "license": "MIT", "homepage": "https://github.com/shama/webpack-stream", From 51a4a8bc7ddbfd60325e2f342071a3c3ae90d3ae Mon Sep 17 00:00:00 2001 From: Tereza Tomcova Date: Fri, 15 Feb 2019 12:29:16 +0100 Subject: [PATCH 10/38] display message on watch compilation start --- index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/index.js b/index.js index 9edc6ea..d28a699 100644 --- a/index.js +++ b/index.js @@ -223,6 +223,19 @@ module.exports = function (options, wp, done) { } else { handleCompiler(compiler); } + + if (options.watch && !isSilent) { + const watchRunPlugin = compiler.hooks + // Webpack 4 + ? callback => compiler.hooks.watchRun.tapAsync('WebpackInfo', callback) + // Webpack 2/3 + : callback => compiler.plugin('watch-run', callback); + + watchRunPlugin((compilation, callback) => { + fancyLog('webpack compilation starting...'); + callback(); + }); + } }); // If entry point manually specified, trigger that From 161043c933cad5a945c86348cf4d3a8d0f4aad3e Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Thu, 27 Aug 2020 10:55:01 -0700 Subject: [PATCH 11/38] Test no longer valid with GH-207 merged --- test/test.js | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) diff --git a/test/test.js b/test/test.js index 61feaca..18eaad7 100644 --- a/test/test.js +++ b/test/test.js @@ -65,54 +65,6 @@ test('multiple entry points', function (t) { stream.end(); }); -test('subsequent runs served from cache', function (t) { - t.plan(4); - - var config = { - config: { - mode: 'development', - entry: { - 'one': path.join(base, 'entry.js'), - 'two': path.join(base, 'anotherentrypoint.js') - }, - output: { - filename: '[name].bundle.js' - } - }, - quiet: true - }; - - var stream = webpack(config); - stream.on('data', function (file) { - var basename = path.basename(file.path); - var contents = file.contents.toString(); - switch (basename) { - case 'one.bundle.js': - t.ok(/__webpack_require__/i.test(contents), 'should contain "__webpack_require__"'); - t.ok(/var one = true;/i.test(contents), 'should contain "var one = true;"'); - break; - case 'two.bundle.js': - t.ok(/var anotherentrypoint = true;/i.test(contents), 'should contain "var anotherentrypoint = true;"'); - break; - } - }); - - stream.on('end', function () { - var cachedStream = webpack(config); - var data = null; - - cachedStream.on('data', function (file) { - data = file; - }); - - cachedStream.on('end', function () { - t.ok(data === null, 'should not write any output'); - }); - }); - - stream.end(); -}); - test('stream multiple entry points', function (t) { t.plan(3); var entries = fs.src(['test/fixtures/entry.js', 'test/fixtures/anotherentrypoint.js']); From 5fc7107ed27bc533035950f9d60bc6b3c8bf0fc2 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Thu, 27 Aug 2020 10:58:00 -0700 Subject: [PATCH 12/38] Updating dependencies --- package.json | 12 ++++++------ test/test.js | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 694d8d1..808e7d6 100644 --- a/package.json +++ b/package.json @@ -29,18 +29,18 @@ "fancy-log": "^1.3.3", "lodash.clone": "^4.3.2", "lodash.some": "^4.2.2", - "memory-fs": "^0.4.1", + "memory-fs": "^0.5.0", "plugin-error": "^1.0.1", - "supports-color": "^5.5.0", + "supports-color": "^7.1.0", "through": "^2.3.8", "vinyl": "^2.1.0", "webpack": "^4.26.1" }, "devDependencies": { - "gulp": "^3.9.0", - "rimraf": "^2.4.4", - "semistandard": "^13.0.1", - "tape": "^4.9.0", + "gulp": "^4.0.2", + "rimraf": "^3.0.2", + "semistandard": "^14.2.3", + "tape": "^5.0.1", "vinyl-fs": "^3.0.2", "vinyl-named": "^1.1.0" }, diff --git a/test/test.js b/test/test.js index 18eaad7..9a9dc70 100644 --- a/test/test.js +++ b/test/test.js @@ -40,8 +40,8 @@ test('multiple entry points', function (t) { config: { mode: 'development', entry: { - 'one': path.join(base, 'entry.js'), - 'two': path.join(base, 'anotherentrypoint.js') + one: path.join(base, 'entry.js'), + two: path.join(base, 'anotherentrypoint.js') }, output: { filename: '[name].bundle.js' @@ -119,7 +119,7 @@ test('multi-compile', function (t) { config: [{ mode: 'development', entry: { - 'one': path.join(base, 'entry.js') + one: path.join(base, 'entry.js') }, output: { filename: '[name].bundle.js' @@ -127,7 +127,7 @@ test('multi-compile', function (t) { }, { mode: 'development', entry: { - 'two': path.join(base, 'anotherentrypoint.js') + two: path.join(base, 'anotherentrypoint.js') }, output: { filename: '[name].bundle.js' From f552d3001be397a51a82418fed240356d8227721 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Thu, 27 Aug 2020 10:58:37 -0700 Subject: [PATCH 13/38] Update copyright year --- LICENSE-MIT | 2 +- readme.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE-MIT b/LICENSE-MIT index 0733a63..528a2b0 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,4 +1,4 @@ -Copyright (c) 2018 Kyle Robinson Young +Copyright (c) 2020 Kyle Robinson Young Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/readme.md b/readme.md index 28801ab..539687e 100644 --- a/readme.md +++ b/readme.md @@ -235,5 +235,5 @@ gulp.task('default', function() { * 0.1.0 - Initial release ## License -Copyright (c) 2018 Kyle Robinson Young +Copyright (c) 2020 Kyle Robinson Young Licensed under the MIT license. From 45e9baed4a593c35dc1c14d85fddb4ff8e2e48d0 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Thu, 27 Aug 2020 11:00:13 -0700 Subject: [PATCH 14/38] Add more node versions to travis --- .travis.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 753797a..d848d09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,8 @@ language: node_js node_js: - - '6' - - '8' - - '10' + - 6 + - 8 + - 10 + - 12 + - 14 - 'node' From 15b4b29b89e7786edfd987cc9889cdfc48337ec4 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Thu, 27 Aug 2020 11:04:27 -0700 Subject: [PATCH 15/38] v6.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 808e7d6..4bcfb08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack-stream", - "version": "5.2.1", + "version": "6.0.0", "description": "Run webpack as a stream", "license": "MIT", "homepage": "https://github.com/shama/webpack-stream", From 973d935d35823ef600b49165c6b2107546b7453b Mon Sep 17 00:00:00 2001 From: Tim Stasse Date: Wed, 2 Sep 2020 00:06:20 +1000 Subject: [PATCH 16/38] Use assetEmitted hook --- index.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/index.js b/index.js index 5f47452..e9f323d 100644 --- a/index.js +++ b/index.js @@ -195,19 +195,15 @@ module.exports = function (options, wp, done) { var fs = compiler.outputFileSystem = cache.mfs; - var afterEmitPlugin = compiler.hooks + var assetEmittedPlugin = compiler.hooks // Webpack 4 - ? function (callback) { compiler.hooks.afterEmit.tapAsync('WebpackStream', callback); } + ? function (callback) { compiler.hooks.assetEmitted.tapAsync('WebpackStream', callback); } // Webpack 2/3 - : function (callback) { compiler.plugin('after-emit', callback); }; + : function (callback) { compiler.plugin('asset-emitted', callback); }; - afterEmitPlugin(function (compilation, callback) { - Object.keys(compilation.assets).forEach(function (outname) { - if (compilation.assets[outname].emitted) { - var file = prepareFile(fs, compiler, outname); - self.queue(file); - } - }); + assetEmittedPlugin(function (outname, _, callback) { + var file = prepareFile(fs, compiler, outname); + self.queue(file); callback(); }); }; From 22d17edaa61676efcfcd5b78518348280d8389f5 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Tue, 1 Sep 2020 10:43:55 -0700 Subject: [PATCH 17/38] Remove Node 6 from travis --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d848d09..67d4ca2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: node_js node_js: - - 6 - 8 - 10 - 12 From c74c1d15924805d00c2d1da90c0c8623a896f6b1 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Tue, 1 Sep 2020 10:45:32 -0700 Subject: [PATCH 18/38] Update supports-color to 7.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4bcfb08..25c7ed1 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "lodash.some": "^4.2.2", "memory-fs": "^0.5.0", "plugin-error": "^1.0.1", - "supports-color": "^7.1.0", + "supports-color": "^7.2.0", "through": "^2.3.8", "vinyl": "^2.1.0", "webpack": "^4.26.1" From 70dc7f8356a54a94ee0139b79e2cfb0ee7d63d73 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Tue, 1 Sep 2020 10:46:07 -0700 Subject: [PATCH 19/38] Update node engine requirement to >= 8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 25c7ed1..857b2d2 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "url": "http://dontkry.com" }, "engines": { - "node": ">= 6.11.5" + "node": ">= 8.0.0" }, "scripts": { "test": "semistandard && node test/test.js" From 54ecead7cefc2d45fea55ede53a0f58eb66c02c3 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Tue, 1 Sep 2020 11:03:20 -0700 Subject: [PATCH 20/38] v6.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 857b2d2..c7b48d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack-stream", - "version": "6.0.0", + "version": "6.1.0", "description": "Run webpack as a stream", "license": "MIT", "homepage": "https://github.com/shama/webpack-stream", From e72f6399e1175b533f47d7f46f775a704d931efb Mon Sep 17 00:00:00 2001 From: Emil Walser Date: Tue, 29 Sep 2020 23:22:07 +0200 Subject: [PATCH 21/38] Added support for loading webpack config from file path. --- index.js | 4 ++++ test/fixtures/webpack.config.js | 7 +++++++ test/test.js | 12 ++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 test/fixtures/webpack.config.js diff --git a/index.js b/index.js index e9f323d..61c6308 100644 --- a/index.js +++ b/index.js @@ -35,6 +35,10 @@ module.exports = function (options, wp, done) { options = clone(options) || {}; var config = options.config || options; + if (typeof config === 'string') { + config = require(config); + } + // Webpack 4 doesn't support the `quiet` attribute, however supports // setting `stats` to a string within an array of configurations // (errors-only|minimal|none|normal|verbose) or an object with an absurd diff --git a/test/fixtures/webpack.config.js b/test/fixtures/webpack.config.js new file mode 100644 index 0000000..9be46b3 --- /dev/null +++ b/test/fixtures/webpack.config.js @@ -0,0 +1,7 @@ +// Test config file for 'option file path' test. +const config = { + input: './entry.js' + // input: './nope.js' +}; + +module.exports = config; diff --git a/test/test.js b/test/test.js index 9a9dc70..63e6f2f 100644 --- a/test/test.js +++ b/test/test.js @@ -159,6 +159,18 @@ test('no options', function (t) { stream.end(); }); +test('config file path with webpack-stream options', function (t) { + t.plan(1); + var stream = webpack({ + quiet: true, + config: path.join(base, 'webpack.config.js') + }); + stream.on('end', function () { + t.ok(true, 'config successfully loaded from file, with webpack-stream options'); + }); + stream.end(); +}); + test('error formatting', function (t) { t.plan(2); // TODO: Fix this to test to rely less on large string outputs as those can change From a6c4d50a59f8bb420cc22530d7e40eadf11557fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pontus=20=C3=96stlund?= Date: Wed, 21 Oct 2020 11:40:32 +0200 Subject: [PATCH 22/38] Extract error messages from jsonStats errors Error messages from jsonStats errors was constructed by `errors.join('\n')` which resulted in a message like `[object Object]`. This fix tries to resolve the actual error message from error objects via some naive heuristics --- index.js | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e9f323d..9635bc7 100644 --- a/index.js +++ b/index.js @@ -158,7 +158,28 @@ module.exports = function (options, wp, done) { var jsonStats = stats ? stats.toJson() || {} : {}; var errors = jsonStats.errors || []; if (errors.length) { - var errorMessage = errors.join('\n'); + const resolveErrorMessage = (err) => { + if ( + typeof err === 'object' && + err !== null && + Object.prototype.hasOwnProperty.call(err, 'message') + ) { + return err.message; + } else if ( + typeof err === 'object' && + err !== null && + 'toString' in err && + err.toString() !== '[object Object]' + ) { + return err.toString(); + } else if (Array.isArray(err)) { + return err.map(resolveErrorMessage).join('\n'); + } else { + return err; + } + }; + + var errorMessage = errors.map(resolveErrorMessage).join('\n'); var compilationError = new PluginError('webpack-stream', errorMessage); if (!options.watch) { self.emit('error', compilationError); From 7e346b5e7810e7742c1d290f3fc534ea4a357970 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Sat, 14 Nov 2020 21:28:34 -0800 Subject: [PATCH 23/38] v6.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c7b48d3..4ffe895 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack-stream", - "version": "6.1.0", + "version": "6.1.1", "description": "Run webpack as a stream", "license": "MIT", "homepage": "https://github.com/shama/webpack-stream", From 03a6a70c609c16b993c438d447934519f19323ef Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Sun, 6 Dec 2020 12:31:50 -0800 Subject: [PATCH 24/38] Fix for webpack watch mode. Fixes GH-230 --- index.js | 15 ++++++++------- package.json | 2 ++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index 9635bc7..2190a13 100644 --- a/index.js +++ b/index.js @@ -35,6 +35,9 @@ module.exports = function (options, wp, done) { options = clone(options) || {}; var config = options.config || options; + const isInWatchMode = !!options.watch; + delete options.watch; + // Webpack 4 doesn't support the `quiet` attribute, however supports // setting `stats` to a string within an array of configurations // (errors-only|minimal|none|normal|verbose) or an object with an absurd @@ -54,7 +57,7 @@ module.exports = function (options, wp, done) { } // Debounce output a little for when in watch mode - if (options.watch) { + if (isInWatchMode) { callingDone = true; setTimeout(function () { callingDone = false; @@ -104,7 +107,6 @@ module.exports = function (options, wp, done) { var self = this; var handleConfig = function (config) { config.output = config.output || {}; - config.watch = !!options.watch; // Determine pipe'd in entry if (Object.keys(entries).length > 0) { @@ -120,7 +122,6 @@ module.exports = function (options, wp, done) { config.entry = config.entry || entry; config.output.path = config.output.path || process.cwd(); config.output.filename = config.output.filename || '[hash].js'; - config.watch = options.watch; entry = []; if (!config.entry || config.entry.length < 1) { @@ -181,21 +182,21 @@ module.exports = function (options, wp, done) { var errorMessage = errors.map(resolveErrorMessage).join('\n'); var compilationError = new PluginError('webpack-stream', errorMessage); - if (!options.watch) { + if (!isInWatchMode) { self.emit('error', compilationError); } self.emit('compilation-error', compilationError); } - if (!options.watch) { + if (!isInWatchMode) { self.queue(null); } done(err, stats); - if (options.watch && !isSilent) { + if (isInWatchMode && !isSilent) { fancyLog('webpack is watching for changes'); } }; - if (options.watch) { + if (isInWatchMode) { const watchOptions = options.watchOptions || {}; compiler.watch(watchOptions, callback); } else { diff --git a/package.json b/package.json index 4ffe895..71bb2c8 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,8 @@ "node": ">= 8.0.0" }, "scripts": { + "start": "gulp", + "debug": "node --inspect-brk ./node_modules/.bin/gulp", "test": "semistandard && node test/test.js" }, "files": [ From e9c94fc692832866ea5ef8a160b7af996715d507 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Mon, 25 Jan 2021 12:08:47 -0800 Subject: [PATCH 25/38] v6.1.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 71bb2c8..ec7af53 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack-stream", - "version": "6.1.1", + "version": "6.1.2", "description": "Run webpack as a stream", "license": "MIT", "homepage": "https://github.com/shama/webpack-stream", From 47609e89333a95fa699910e1ec04dc52ecd17096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20D=C4=9Bdi=C4=8D?= Date: Wed, 10 Feb 2021 10:31:29 +0100 Subject: [PATCH 26/38] Webpack as a peer-dependency --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ec7af53..8f204a3 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,7 @@ "plugin-error": "^1.0.1", "supports-color": "^7.2.0", "through": "^2.3.8", - "vinyl": "^2.1.0", - "webpack": "^4.26.1" + "vinyl": "^2.1.0" }, "devDependencies": { "gulp": "^4.0.2", @@ -46,6 +45,9 @@ "vinyl-fs": "^3.0.2", "vinyl-named": "^1.1.0" }, + "peerDependencies": { + "webpack": "^4.26.1" + }, "keywords": [ "gulpplugin", "webpack", From d31688176a175c8f51617b709adc6659ad1394de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20D=C4=9Bdi=C4=8D?= Date: Wed, 10 Feb 2021 10:52:02 +0100 Subject: [PATCH 27/38] Added webpack back as a devDependency (it's used in tests) --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8f204a3..7a311db 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,8 @@ "semistandard": "^14.2.3", "tape": "^5.0.1", "vinyl-fs": "^3.0.2", - "vinyl-named": "^1.1.0" + "vinyl-named": "^1.1.0", + "webpack": "^4.26.1" }, "peerDependencies": { "webpack": "^4.26.1" From 01ffd7610ce00fdf49bccfe92a32e7f967be4275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20D=C4=9Bdi=C4=8D?= Date: Wed, 10 Feb 2021 11:18:20 +0100 Subject: [PATCH 28/38] Updated to webpack 5 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7a311db..375dbf9 100644 --- a/package.json +++ b/package.json @@ -44,10 +44,10 @@ "tape": "^5.0.1", "vinyl-fs": "^3.0.2", "vinyl-named": "^1.1.0", - "webpack": "^4.26.1" + "webpack": "^5.21.2" }, "peerDependencies": { - "webpack": "^4.26.1" + "webpack": "^5.21.2" }, "keywords": [ "gulpplugin", From 99a1c037229b8b96bc2a615c3c8596f175fa901c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20D=C4=9Bdi=C4=8D?= Date: Wed, 10 Feb 2021 11:18:37 +0100 Subject: [PATCH 29/38] Building in production mode by default --- gulpfile.js | 1 + 1 file changed, 1 insertion(+) diff --git a/gulpfile.js b/gulpfile.js index 1165cd8..78bc8e0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -8,6 +8,7 @@ gulp.task('default', function () { return gulp.src(['test/fixtures/entry.js', 'test/fixtures/anotherentrypoint.js']) .pipe(named()) .pipe(webpack({ + mode: 'production', devtool: 'source-map' })) .pipe(gulp.dest('tmp/')); From 5bb70d1940721a7771b5f5831d32b0f2e45e07bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20D=C4=9Bdi=C4=8D?= Date: Wed, 10 Feb 2021 11:30:21 +0100 Subject: [PATCH 30/38] Test: updated expected error message --- test/test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test.js b/test/test.js index 9a9dc70..d6bc646 100644 --- a/test/test.js +++ b/test/test.js @@ -163,7 +163,7 @@ test('error formatting', function (t) { t.plan(2); // TODO: Fix this to test to rely less on large string outputs as those can change // and still be ok. - var expectedMessage = '\x1b[31mError\x1b[39m in plugin "\x1b[36mwebpack-stream\x1b[39m"\nMessage:\n ./test/fixtures/entry.js\nModule Error (from ./test/fak'; + var expectedMessage = '\x1b[31mError\x1b[39m in plugin "\x1b[36mwebpack-stream\x1b[39m"\nMessage:\n Module Error (from ./test/fake-error-loader.js):\nFake '; var entry = fs.src('test/fixtures/entry.js'); var stream = webpack({ quiet: true, From 0e30a7b9ee2613fefa02f479a2c4a6b3dbdf7b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20D=C4=9Bdi=C4=8D?= Date: Wed, 10 Feb 2021 12:38:26 +0100 Subject: [PATCH 31/38] Test: Fixed different chunk names in webpack 5 --- test/test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test.js b/test/test.js index d6bc646..666e396 100644 --- a/test/test.js +++ b/test/test.js @@ -26,7 +26,7 @@ test('streams output assets', function (t) { t.ok(/__webpack_require__/i.test(contents), 'should contain "__webpack_require__"'); t.ok(/var one = true;/i.test(contents), 'should contain "var one = true;"'); break; - case '0.bundle.js': + case 'test_fixtures_chunk_js.bundle.js': t.ok(/var chunk = true;/i.test(contents), 'should contain "var chunk = true;"'); break; } From f33fc0499148cbc85e00936875e03cf4a40d64dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20D=C4=9Bdi=C4=8D?= Date: Wed, 10 Feb 2021 12:40:22 +0100 Subject: [PATCH 32/38] Switched from hash to contenthash --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 2190a13..a072983 100644 --- a/index.js +++ b/index.js @@ -121,7 +121,7 @@ module.exports = function (options, wp, done) { config.entry = config.entry || entry; config.output.path = config.output.path || process.cwd(); - config.output.filename = config.output.filename || '[hash].js'; + config.output.filename = config.output.filename || '[contenthash].js'; entry = []; if (!config.entry || config.entry.length < 1) { From 1baead226b62d6846bca6af084c2393d44cb8594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20D=C4=9Bdi=C4=8D?= Date: Wed, 10 Feb 2021 12:55:13 +0100 Subject: [PATCH 33/38] Removed tests on Node 8 --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 67d4ca2..f46d487 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: node_js node_js: - - 8 - 10 - 12 - 14 From 5759a174ea68b35616f49e6fb675e9f32cca4ed1 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Mon, 30 Aug 2021 19:40:18 -0700 Subject: [PATCH 34/38] Updating for semistandard@16.0.1 --- gulpfile.js | 8 ++--- index.js | 74 +++++++++++++++++++-------------------- package.json | 2 +- test/fake-error-loader.js | 20 +++++------ test/test.js | 54 ++++++++++++++-------------- 5 files changed, 79 insertions(+), 79 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 78bc8e0..2a61fe7 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,7 +1,7 @@ -var gulp = require('gulp'); -var webpack = require('./'); -var rimraf = require('rimraf'); -var named = require('vinyl-named'); +const gulp = require('gulp'); +const webpack = require('./'); +const rimraf = require('rimraf'); +const named = require('vinyl-named'); gulp.task('default', function () { rimraf.sync('tmp'); diff --git a/index.js b/index.js index a072983..00956cb 100644 --- a/index.js +++ b/index.js @@ -1,16 +1,16 @@ 'use strict'; -var fancyLog = require('fancy-log'); -var PluginError = require('plugin-error'); -var supportsColor = require('supports-color'); -var File = require('vinyl'); -var MemoryFileSystem = require('memory-fs'); -var nodePath = require('path'); -var through = require('through'); -var ProgressPlugin = require('webpack/lib/ProgressPlugin'); -var clone = require('lodash.clone'); - -var defaultStatsOptions = { +const fancyLog = require('fancy-log'); +const PluginError = require('plugin-error'); +const supportsColor = require('supports-color'); +const File = require('vinyl'); +const MemoryFileSystem = require('memory-fs'); +const nodePath = require('path'); +const through = require('through'); +const ProgressPlugin = require('webpack/lib/ProgressPlugin'); +const clone = require('lodash.clone'); + +const defaultStatsOptions = { colors: supportsColor.stdout.hasBasic, hash: false, timings: false, @@ -27,13 +27,13 @@ var defaultStatsOptions = { }; module.exports = function (options, wp, done) { - var cache = { + const cache = { options: options, wp: wp }; options = clone(options) || {}; - var config = options.config || options; + const config = options.config || options; const isInWatchMode = !!options.watch; delete options.watch; @@ -45,7 +45,7 @@ module.exports = function (options, wp, done) { const isSilent = options.quiet || (typeof options.stats === 'string' && (options.stats.match(/^(errors-only|minimal|none)$/))); if (typeof done !== 'function') { - var callingDone = false; + let callingDone = false; done = function (err, stats) { if (err) { // The err is here just to match the API but isnt used @@ -69,7 +69,7 @@ module.exports = function (options, wp, done) { colors: supportsColor.stdout.hasBasic })); } else { - var statsOptions = (options && options.stats) || {}; + const statsOptions = (options && options.stats) || {}; if (typeof statsOptions === 'object') { Object.keys(defaultStatsOptions).forEach(function (key) { @@ -78,7 +78,7 @@ module.exports = function (options, wp, done) { } }); } - var statusLog = stats.toString(statsOptions); + const statusLog = stats.toString(statsOptions); if (statusLog) { fancyLog(statusLog); } @@ -86,11 +86,11 @@ module.exports = function (options, wp, done) { }; } - var webpack = wp || require('webpack'); - var entry = []; - var entries = Object.create(null); + const webpack = wp || require('webpack'); + let entry = []; + const entries = Object.create(null); - var stream = through(function (file) { + const stream = through(function (file) { if (file.isNull()) { return; } @@ -104,8 +104,8 @@ module.exports = function (options, wp, done) { entry.push(file.path); } }, function () { - var self = this; - var handleConfig = function (config) { + const self = this; + const handleConfig = function (config) { config.output = config.output || {}; // Determine pipe'd in entry @@ -132,9 +132,9 @@ module.exports = function (options, wp, done) { return true; }; - var succeeded; + let succeeded; if (Array.isArray(config)) { - for (var i = 0; i < config.length; i++) { + for (let i = 0; i < config.length; i++) { succeeded = handleConfig(config[i]); if (!succeeded) { return false; @@ -148,7 +148,7 @@ module.exports = function (options, wp, done) { } // Cache compiler for future use - var compiler = cache.compiler || webpack(config); + const compiler = cache.compiler || webpack(config); cache.compiler = compiler; const callback = function (err, stats) { @@ -156,8 +156,8 @@ module.exports = function (options, wp, done) { self.emit('error', new PluginError('webpack-stream', err)); return; } - var jsonStats = stats ? stats.toJson() || {} : {}; - var errors = jsonStats.errors || []; + const jsonStats = stats ? stats.toJson() || {} : {}; + const errors = jsonStats.errors || []; if (errors.length) { const resolveErrorMessage = (err) => { if ( @@ -180,8 +180,8 @@ module.exports = function (options, wp, done) { } }; - var errorMessage = errors.map(resolveErrorMessage).join('\n'); - var compilationError = new PluginError('webpack-stream', errorMessage); + const errorMessage = errors.map(resolveErrorMessage).join('\n'); + const compilationError = new PluginError('webpack-stream', errorMessage); if (!isInWatchMode) { self.emit('error', compilationError); } @@ -203,7 +203,7 @@ module.exports = function (options, wp, done) { compiler.run(callback); } - var handleCompiler = function (compiler) { + const handleCompiler = function (compiler) { if (options.progress) { (new ProgressPlugin(function (percentage, msg) { percentage = Math.floor(percentage * 100); @@ -215,16 +215,16 @@ module.exports = function (options, wp, done) { cache.mfs = cache.mfs || new MemoryFileSystem(); - var fs = compiler.outputFileSystem = cache.mfs; + const fs = compiler.outputFileSystem = cache.mfs; - var assetEmittedPlugin = compiler.hooks + const assetEmittedPlugin = compiler.hooks // Webpack 4 ? function (callback) { compiler.hooks.assetEmitted.tapAsync('WebpackStream', callback); } // Webpack 2/3 : function (callback) { compiler.plugin('asset-emitted', callback); }; assetEmittedPlugin(function (outname, _, callback) { - var file = prepareFile(fs, compiler, outname); + const file = prepareFile(fs, compiler, outname); self.queue(file); callback(); }); @@ -240,7 +240,7 @@ module.exports = function (options, wp, done) { }); // If entry point manually specified, trigger that - var hasEntry = Array.isArray(config) + const hasEntry = Array.isArray(config) ? config.some(function (c) { return c.entry; }) : config.entry; if (hasEntry) { @@ -251,14 +251,14 @@ module.exports = function (options, wp, done) { }; function prepareFile (fs, compiler, outname) { - var path = fs.join(compiler.outputPath, outname); + let path = fs.join(compiler.outputPath, outname); if (path.indexOf('?') !== -1) { path = path.split('?')[0]; } - var contents = fs.readFileSync(path); + const contents = fs.readFileSync(path); - var file = new File({ + const file = new File({ base: compiler.outputPath, path: nodePath.join(compiler.outputPath, outname), contents: contents diff --git a/package.json b/package.json index 375dbf9..5799c0b 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "devDependencies": { "gulp": "^4.0.2", "rimraf": "^3.0.2", - "semistandard": "^14.2.3", + "semistandard": "^16.0.1", "tape": "^5.0.1", "vinyl-fs": "^3.0.2", "vinyl-named": "^1.1.0", diff --git a/test/fake-error-loader.js b/test/fake-error-loader.js index 676bb89..2a5177e 100644 --- a/test/fake-error-loader.js +++ b/test/fake-error-loader.js @@ -1,10 +1,10 @@ -module.exports = function fakeErrorLoader (text) { - this.cacheable(); - - var fakeError = new Error('Fake error'); - // delete stack trace prevent it from showing up in webpack output - delete fakeError.stack; - this.emitError(fakeError); - - return text; -}; +module.exports = function fakeErrorLoader (text) { + this.cacheable(); + + const fakeError = new Error('Fake error'); + // delete stack trace prevent it from showing up in webpack output + delete fakeError.stack; + this.emitError(fakeError); + + return text; +}; diff --git a/test/test.js b/test/test.js index 666e396..47e0359 100644 --- a/test/test.js +++ b/test/test.js @@ -1,15 +1,15 @@ -var test = require('tape'); -var webpack = require('../'); -var path = require('path'); -var fs = require('vinyl-fs'); -var named = require('vinyl-named'); +const test = require('tape'); +const webpack = require('../'); +const path = require('path'); +const fs = require('vinyl-fs'); +const named = require('vinyl-named'); -var base = path.resolve(__dirname, 'fixtures'); +const base = path.resolve(__dirname, 'fixtures'); test('streams output assets', function (t) { t.plan(3); - var entry = fs.src('test/fixtures/entry.js'); - var stream = webpack({ + const entry = fs.src('test/fixtures/entry.js'); + const stream = webpack({ config: { mode: 'development', output: { @@ -19,8 +19,8 @@ test('streams output assets', function (t) { quiet: true }); stream.on('data', function (file) { - var basename = path.basename(file.path); - var contents = file.contents.toString(); + const basename = path.basename(file.path); + const contents = file.contents.toString(); switch (basename) { case 'bundle.js': t.ok(/__webpack_require__/i.test(contents), 'should contain "__webpack_require__"'); @@ -36,7 +36,7 @@ test('streams output assets', function (t) { test('multiple entry points', function (t) { t.plan(3); - var stream = webpack({ + const stream = webpack({ config: { mode: 'development', entry: { @@ -50,8 +50,8 @@ test('multiple entry points', function (t) { quiet: true }); stream.on('data', function (file) { - var basename = path.basename(file.path); - var contents = file.contents.toString(); + const basename = path.basename(file.path); + const contents = file.contents.toString(); switch (basename) { case 'one.bundle.js': t.ok(/__webpack_require__/i.test(contents), 'should contain "__webpack_require__"'); @@ -67,16 +67,16 @@ test('multiple entry points', function (t) { test('stream multiple entry points', function (t) { t.plan(3); - var entries = fs.src(['test/fixtures/entry.js', 'test/fixtures/anotherentrypoint.js']); - var stream = webpack({ + const entries = fs.src(['test/fixtures/entry.js', 'test/fixtures/anotherentrypoint.js']); + const stream = webpack({ config: { mode: 'development' }, quiet: true }); stream.on('data', function (file) { - var basename = path.basename(file.path); - var contents = file.contents.toString(); + const basename = path.basename(file.path); + const contents = file.contents.toString(); switch (basename) { case 'entry.js': t.ok(/__webpack_require__/i.test(contents), 'should contain "__webpack_require__"'); @@ -93,12 +93,12 @@ test('stream multiple entry points', function (t) { test('empty input stream', function (t) { t.plan(1); - var entry = fs.src('test/path/to/nothing', { allowEmpty: true }); - var stream = webpack({ + const entry = fs.src('test/path/to/nothing', { allowEmpty: true }); + const stream = webpack({ config: {}, quiet: true }); - var data = null; + let data = null; stream.on('data', function (file) { data = file; @@ -114,7 +114,7 @@ test('empty input stream', function (t) { test('multi-compile', function (t) { t.plan(3); - var stream = webpack({ + const stream = webpack({ quiet: true, config: [{ mode: 'development', @@ -135,8 +135,8 @@ test('multi-compile', function (t) { }] }); stream.on('data', function (file) { - var basename = path.basename(file.path); - var contents = file.contents.toString(); + const basename = path.basename(file.path); + const contents = file.contents.toString(); switch (basename) { case 'one.bundle.js': t.ok(/__webpack_require__/i.test(contents), 'should contain "__webpack_require__"'); @@ -152,7 +152,7 @@ test('multi-compile', function (t) { test('no options', function (t) { t.plan(1); - var stream = webpack(); + const stream = webpack(); stream.on('end', function () { t.ok(true, 'ended without error'); }); @@ -163,9 +163,9 @@ test('error formatting', function (t) { t.plan(2); // TODO: Fix this to test to rely less on large string outputs as those can change // and still be ok. - var expectedMessage = '\x1b[31mError\x1b[39m in plugin "\x1b[36mwebpack-stream\x1b[39m"\nMessage:\n Module Error (from ./test/fake-error-loader.js):\nFake '; - var entry = fs.src('test/fixtures/entry.js'); - var stream = webpack({ + const expectedMessage = '\x1b[31mError\x1b[39m in plugin "\x1b[36mwebpack-stream\x1b[39m"\nMessage:\n Module Error (from ./test/fake-error-loader.js):\nFake '; + const entry = fs.src('test/fixtures/entry.js'); + const stream = webpack({ quiet: true, config: { module: { From 80e0ba85b60dd7e5cc8189af10d5930693d936ed Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Mon, 30 Aug 2021 19:44:43 -0700 Subject: [PATCH 35/38] Updating dependencies --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5799c0b..086703d 100644 --- a/package.json +++ b/package.json @@ -33,15 +33,15 @@ "lodash.some": "^4.2.2", "memory-fs": "^0.5.0", "plugin-error": "^1.0.1", - "supports-color": "^7.2.0", + "supports-color": "^8.1.1", "through": "^2.3.8", - "vinyl": "^2.1.0" + "vinyl": "^2.2.1" }, "devDependencies": { "gulp": "^4.0.2", "rimraf": "^3.0.2", "semistandard": "^16.0.1", - "tape": "^5.0.1", + "tape": "^5.3.1", "vinyl-fs": "^3.0.2", "vinyl-named": "^1.1.0", "webpack": "^5.21.2" From fdd5809d67fad5c6109e0e96f383a35fc963483f Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Mon, 30 Aug 2021 19:45:14 -0700 Subject: [PATCH 36/38] Update node engine to >= 10 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 086703d..c02d775 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "url": "http://dontkry.com" }, "engines": { - "node": ">= 8.0.0" + "node": ">= 10.0.0" }, "scripts": { "start": "gulp", From 2b314613244f704aaf8327f5013faec36d0543a5 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Mon, 30 Aug 2021 19:46:02 -0700 Subject: [PATCH 37/38] Update copyright to 2021 --- LICENSE-MIT | 2 +- readme.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE-MIT b/LICENSE-MIT index 528a2b0..bf5d57b 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -1,4 +1,4 @@ -Copyright (c) 2020 Kyle Robinson Young +Copyright (c) 2021 Kyle Robinson Young Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation diff --git a/readme.md b/readme.md index 539687e..d963eab 100644 --- a/readme.md +++ b/readme.md @@ -235,5 +235,5 @@ gulp.task('default', function() { * 0.1.0 - Initial release ## License -Copyright (c) 2020 Kyle Robinson Young +Copyright (c) 2021 Kyle Robinson Young Licensed under the MIT license. From 348eab2935d8aed11cdc3789cb1d4820de932fe7 Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Mon, 30 Aug 2021 19:46:13 -0700 Subject: [PATCH 38/38] Use const over var in docs --- readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index d963eab..bdaeca9 100644 --- a/readme.md +++ b/readme.md @@ -83,9 +83,9 @@ To use gulp `watch`, it's required that you explicitly pass webpack in the 2nd a Please note that gulp `watch` and webpack `watch` are mutually exclusive. ```javascript -var gulp = require('gulp'); -var compiler = require('webpack'); -var webpack = require('webpack-stream'); +const gulp = require('gulp'); +const compiler = require('webpack'); +const webpack = require('webpack-stream'); gulp.task('build', function() { return gulp.src('src/entry.js')