Comparing version 1.5.2 to 1.5.3
@@ -61,3 +61,3 @@ var mout = require('mout'); | ||
mout.object.forOwn(json, function (value, key) { | ||
if (value == null || mout.lang.isEmpty(value)) { | ||
if (!validConfigValue(value)) { | ||
delete json[key]; | ||
@@ -85,2 +85,14 @@ } | ||
// Test if value is of a type supported by bower.json[0] - Object, Array, String, Boolean - or a Number | ||
// [0]: https://github.com/bower/bower.json-spec | ||
function validConfigValue(val) { | ||
return ( | ||
mout.lang.isObject(val) || | ||
mout.lang.isArray(val) || | ||
mout.lang.isString(val) || | ||
mout.lang.isBoolean(val) || | ||
mout.lang.isNumber(val) | ||
); | ||
} | ||
function setDefaults(config, json) { | ||
@@ -87,0 +99,0 @@ var name; |
@@ -9,6 +9,6 @@ var glob = require('glob'); | ||
var Logger = require('bower-logger'); | ||
var md5 = require('md5-hex'); | ||
var Manager = require('./Manager'); | ||
var defaultConfig = require('../config'); | ||
var semver = require('../util/semver'); | ||
var md5 = require('../util/md5'); | ||
var createError = require('../util/createError'); | ||
@@ -18,3 +18,2 @@ var readJson = require('../util/readJson'); | ||
var scripts = require('./scripts'); | ||
var sortobject = require('deep-sort-object'); | ||
@@ -92,3 +91,3 @@ function Project(config, logger) { | ||
// Handle save and saveDev options | ||
if (that._options.save || that._options.saveDev) { | ||
if (that._options.save || that._options.saveDev || that._options.saveExact) { | ||
// Cycle through the specified endpoints | ||
@@ -101,11 +100,13 @@ decEndpoints.forEach(function (decEndpoint) { | ||
if (that._options.saveExact) { | ||
jsonEndpoint[decEndpoint.name] = decEndpoint.pkgMeta.version; | ||
if (decEndpoint.name !== decEndpoint.source) { | ||
jsonEndpoint[decEndpoint.name] = decEndpoint.source + '#' + decEndpoint.pkgMeta.version; | ||
} else { | ||
jsonEndpoint[decEndpoint.name] = decEndpoint.pkgMeta.version; | ||
} | ||
} | ||
if (that._options.save) { | ||
that._json.dependencies = sortobject(mout.object.mixIn(that._json.dependencies || {}, jsonEndpoint)); | ||
} | ||
if (that._options.saveDev) { | ||
that._json.devDependencies = sortobject(mout.object.mixIn(that._json.devDependencies || {}, jsonEndpoint)); | ||
that._json.devDependencies = mout.object.mixIn(that._json.devDependencies || {}, jsonEndpoint); | ||
} else { | ||
that._json.dependencies = mout.object.mixIn(that._json.dependencies || {}, jsonEndpoint); | ||
} | ||
@@ -112,0 +113,0 @@ }); |
@@ -9,6 +9,6 @@ var fs = require('graceful-fs'); | ||
var lockFile = require('lockfile'); | ||
var md5 = require('md5-hex'); | ||
var semver = require('../util/semver'); | ||
var readJson = require('../util/readJson'); | ||
var copy = require('../util/copy'); | ||
var md5 = require('../util/md5'); | ||
@@ -15,0 +15,0 @@ function ResolveCache(config) { |
{ | ||
"name": "bower", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"description": "The browser package manager", | ||
@@ -26,3 +26,2 @@ "author": "Twitter", | ||
"decompress-zip": "^0.1.0", | ||
"deep-sort-object": "~0.1.1", | ||
"fstream": "^1.0.3", | ||
@@ -35,3 +34,3 @@ "fstream-ignore": "^1.0.2", | ||
"inquirer": "0.8.0", | ||
"insight": "^0.5.0", | ||
"insight": "^0.7.0", | ||
"is-root": "^1.0.0", | ||
@@ -41,2 +40,3 @@ "junk": "^1.0.0", | ||
"lru-cache": "^2.5.0", | ||
"md5-hex": "^1.0.2", | ||
"mkdirp": "0.5.0", | ||
@@ -43,0 +43,0 @@ "mout": "^0.11.0", |
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
7677
294232
91
+ Addedmd5-hex@^1.0.2
+ Addedansi-escapes@1.4.0(transitive)
+ Addedasync@1.5.2(transitive)
+ Addedcli-cursor@1.0.2(transitive)
+ Addedcli-width@1.1.1(transitive)
+ Addedcode-point-at@1.1.0(transitive)
+ Addedconfigstore@1.4.0(transitive)
+ Addedexit-hook@1.1.1(transitive)
+ Addedimurmurhash@0.1.4(transitive)
+ Addedinquirer@0.10.1(transitive)
+ Addedinsight@0.7.0(transitive)
+ Addedis-fullwidth-code-point@1.0.0(transitive)
+ Addedlodash@3.10.1(transitive)
+ Addedmd5-hex@1.3.0(transitive)
+ Addedmd5-o-matic@0.1.1(transitive)
+ Addedmute-stream@0.0.5(transitive)
+ Addednumber-is-nan@1.0.1(transitive)
+ Addedonetime@1.1.0(transitive)
+ Addedpsl@1.10.0(transitive)
+ Addedreadline2@1.0.1(transitive)
+ Addedrestore-cursor@1.0.1(transitive)
+ Addedrun-async@0.1.0(transitive)
+ Addedrx-lite@3.1.2(transitive)
+ Addedslide@1.1.6(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addedwrite-file-atomic@1.3.4(transitive)
+ Addedxdg-basedir@2.0.0(transitive)
- Removeddeep-sort-object@~0.1.1
- Removeddeep-sort-object@0.1.1(transitive)
- Removedinsight@0.5.3(transitive)
- Removedtough-cookie@0.12.1(transitive)
Updatedinsight@^0.7.0