Socket
Socket
Sign inDemoInstall

webpack-merge

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-merge - npm Package Compare versions

Comparing version 0.8.3 to 0.8.4

5

CHANGELOG.md

@@ -0,1 +1,6 @@

0.8.4 / 2016-03-17
==================
* Bug fix: *webpack-merge* should not mutate inputs. #12
0.8.3 / 2016-03-02

@@ -2,0 +7,0 @@ ==================

2

lib/index.js

@@ -58,3 +58,3 @@ 'use strict';

if (isPlainObject(a) && isPlainObject(b)) {
return merge(a, b, joinArrays.bind(null, customizer));
return merge({}, a, b, joinArrays.bind(null, customizer));
}

@@ -61,0 +61,0 @@

@@ -5,3 +5,3 @@ {

"author": "Juho Vepsalainen <bebraw@gmail.com>",
"version": "0.8.3",
"version": "0.8.4",
"scripts": {

@@ -8,0 +8,0 @@ "build": "babel src -d lib",

@@ -52,3 +52,3 @@ const isArray = Array.isArray;

if (isPlainObject(a) && isPlainObject(b)) {
return merge(a, b, joinArrays.bind(null, customizer));
return merge({}, a, b, joinArrays.bind(null, customizer));
}

@@ -55,0 +55,0 @@

@@ -531,2 +531,19 @@ /* eslint-env mocha */

it('should not mutate inputs', function () {
const a = {
output: {
filename: 'bundle.js'
}
};
const b = {
output: {
path: 'path/b'
}
};
const aClone = JSON.parse(JSON.stringify(a));
merge({}, a, b);
assert.deepEqual(a, aClone);
});
}
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