assets-webpack-plugin
Advanced tools
Comparing version 3.7.2 to 3.8.0
@@ -13,2 +13,8 @@ # Change Log | ||
## 3.8.0 - 2018-06-15 | ||
### Changed | ||
- Reverts [#90](https://github.com/kossnocorp/assets-webpack-plugin/pull/90), fixes [93](https://github.com/kossnocorp/assets-webpack-plugin/issues/93) and [92](https://github.com/kossnocorp/assets-webpack-plugin/issues/92) | ||
## 3.7.2 - 2018-06-14 | ||
@@ -15,0 +21,0 @@ |
@@ -1,3 +0,1 @@ | ||
var fs = require('fs') | ||
var path = require('path') | ||
var merge = require('lodash.merge') | ||
@@ -116,8 +114,3 @@ | ||
if (!compiler.outputFileSystem.readFile) { | ||
compiler.outputFileSystem.readFile = fs.readFile.bind(fs) | ||
compiler.outputFileSystem.join = path.join.bind(path) | ||
} | ||
self.writer(compiler.outputFileSystem, output, function (err) { | ||
self.writer(output, function (err) { | ||
if (err) { | ||
@@ -124,0 +117,0 @@ compilation.errors.push(err) |
@@ -0,1 +1,4 @@ | ||
var mkdirp = require('mkdirp') | ||
var path = require('path') | ||
var fs = require('fs') | ||
var merge = require('lodash.merge') | ||
@@ -6,2 +9,3 @@ | ||
module.exports = function (options) { | ||
var outputPath = path.join(options.path, options.filename) | ||
var update = options.update | ||
@@ -14,13 +18,10 @@ var firstRun = true | ||
return function writeOutput (fs, newAssets, next) { | ||
return function writeOutput (newAssets, next) { | ||
// if potions.update is false and we're on the first pass of a (possibly) multicompiler | ||
var overwrite = !update && firstRun | ||
fs.mkdirp(options.path, function (err) { | ||
mkdirp(options.path, function (err) { | ||
if (err) { | ||
return next(error('Could not create output folder ' + options.path, err)) | ||
} | ||
var outputPath = fs.join(options.path, options.filename) | ||
fs.readFile(outputPath, 'utf8', function (err, data) { | ||
@@ -27,0 +28,0 @@ // if file does not exist, just write data to it |
@@ -18,3 +18,3 @@ /** | ||
if (next) { | ||
processor(next.fs, next.data, iterator(next.callback)) | ||
processor(next.data, iterator(next.callback)) | ||
} | ||
@@ -24,11 +24,11 @@ } | ||
return function queuedWriter (fs, data, callback) { | ||
return function queuedWriter (data, callback) { | ||
var empty = !queue.length | ||
queue.push({fs: fs, data: data, callback: callback}) | ||
queue.push({data: data, callback: callback}) | ||
if (empty) { | ||
// start processing | ||
processor(fs, data, iterator(callback)) | ||
processor(data, iterator(callback)) | ||
} | ||
} | ||
} |
{ | ||
"name": "assets-webpack-plugin", | ||
"version": "3.7.2", | ||
"version": "3.8.0", | ||
"description": "Emits a json file with assets paths", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
26293
0
368