Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bower

Package Overview
Dependencies
Maintainers
6
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bower - npm Package Compare versions

Comparing version 1.5.2 to 1.5.3

14

lib/commands/init.js

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

19

lib/core/Project.js

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

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