Socket
Socket
Sign inDemoInstall

assets-webpack-plugin

Package Overview
Dependencies
Maintainers
2
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assets-webpack-plugin - npm Package Compare versions

Comparing version 3.7.2 to 3.8.0

6

changelog.md

@@ -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 @@

9

index.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc