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

bower

Package Overview
Dependencies
Maintainers
2
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 0.9.0 to 0.9.1

90

CHANGELOG.md
# Changelog
## 0.9.1 - 2013-04-27
- Update `package.json`, docs and other stuff to point to the new `Bower` organisation on GitHub
- Fix root label of `bower list` being a absolute dir; now uses the package name
- Fix `bower update <pkg>` updating all packages; now throws when updating an unknown package
- Fix `list` command when package use different names than the `guessed` ones ([#429](https://github.com/bower/bower/issues/429))
## 0.9.0 - 2013-04-25
- __Change from `component.json` to `bower.json`__ ([#39](https://github.com/twitter/bower/issues/39))
- __Change from `component.json` to `bower.json`__ ([#39](https://github.com/bower/bower/issues/39))
- __Compatibility with `node 0.10.x`, including fix hangs/errors when extracting `zip` files__
- Fix `--save` and `--save-dev` not working with URLs that get redirected ([#417](https://github.com/twitter/bower/issues/417))
- Fix `init` command targeting `~commit` instead of `*`. ([#385](https://github.com/twitter/bower/issues/385))
- Remove temporary directories before exiting ([#345](https://github.com/twitter/bower/issues/345))
- Integrate `update-notifier` ([#202](https://github.com/twitter/bower/issues/202))
- Use `json` name when a package name was inferred ([#192](https://github.com/twitter/bower/issues/192))
- Fix `bin/bower` not exiting with an exit code greater than zero when an error occurs ([#187](https://github.com/twitter/bower/issues/187))
- Fix `--save` and `--save-dev` not working with URLs that get redirected ([#417](https://github.com/bower/bower/issues/417))
- Fix `init` command targeting `~commit` instead of `*`. ([#385](https://github.com/bower/bower/issues/385))
- Remove temporary directories before exiting ([#345](https://github.com/bower/bower/issues/345))
- Integrate `update-notifier` ([#202](https://github.com/bower/bower/issues/202))
- Use `json` name when a package name was inferred ([#192](https://github.com/bower/bower/issues/192))
- Fix `bin/bower` not exiting with an exit code greater than zero when an error occurs ([#187](https://github.com/bower/bower/issues/187))
- Fix `--save` and `--save-dev` saving resolved shorthands instead of the actual shorthands
- Fix bower using user defined git templates ([#324](https://github.com/twitter/bower/issues/324))
- Add command abbreviations ([#262](https://github.com/twitter/bower/issues/262))
- Fix bower using user defined git templates ([#324](https://github.com/bower/bower/issues/324))
- Add command abbreviations ([#262](https://github.com/bower/bower/issues/262))
- Improve help messages and fix abuse of colors in output
- Wait for every package to resolve before printing error messages ([#290](https://github.com/twitter/bower/issues/290))
- Add `shorthand_resolver` to allow shorthands to be resolved to repositories other than GitHub ([#278](https://github.com/twitter/bower/issues/278))
- Wait for every package to resolve before printing error messages ([#290](https://github.com/bower/bower/issues/290))
- Add `shorthand_resolver` to allow shorthands to be resolved to repositories other than GitHub ([#278](https://github.com/bower/bower/issues/278))

@@ -28,26 +34,26 @@ ## 0.8.6 - 2013-04-03

- Fix some more duplicate async callbacks being called twice
- Preserve new lines when saving `component.json` ([#285](https://github.com/twitter/bower/issues/285))
- Preserve new lines when saving `component.json` ([#285](https://github.com/bower/bower/issues/285))
## 0.8.3 - 2013-02-27
- Fix error when using the `update` command ([#282](https://github.com/twitter/bower/issues/282))
- Fix error when using the `update` command ([#282](https://github.com/bower/bower/issues/282))
## 0.8.2 - 2013-02-26
- Fix some errors in windows while removing directories, had to downgrade `rimraf` ([#274](https://github.com/twitter/bower/issues/274))
- Prevent duplicate package names in error summaries ([#277](https://github.com/twitter/bower/issues/277))
- Fix some errors in windows while removing directories, had to downgrade `rimraf` ([#274](https://github.com/bower/bower/issues/274))
- Prevent duplicate package names in error summaries ([#277](https://github.com/bower/bower/issues/277))
## 0.8.1 - 2013-02-25
- Fix some async callbacks being fired twice ([#274](https://github.com/twitter/bower/issues/274))
- Fix some async callbacks being fired twice ([#274](https://github.com/bower/bower/issues/274))
## 0.8.0 - 2013-02-24
- __Add init command similar to `npm init`__ ([#219](https://github.com/twitter/bower/issues/219))
- __Add devDependencies__ support ([#251](https://github.com/twitter/bower/issues/251))
- __Add `--save-dev` flag to install/uninstall commands__ ([#258](https://github.com/twitter/bower/issues/258))
- `cache-clean` command now clears links pointing to nonexistent folders ([#182](https://github.com/twitter/bower/issues/182))
- Fix issue when downloading assets behind a proxy using `https` ([#230](https://github.com/twitter/bower/issues/230))
- Fix --save saving unresolved components ([#240](https://github.com/twitter/bower/issues/240))
- Fix issue when extracting some zip files ([#225](https://github.com/twitter/bower/issues/225))
- __Add init command similar to `npm init`__ ([#219](https://github.com/bower/bower/issues/219))
- __Add devDependencies__ support ([#251](https://github.com/bower/bower/issues/251))
- __Add `--save-dev` flag to install/uninstall commands__ ([#258](https://github.com/bower/bower/issues/258))
- `cache-clean` command now clears links pointing to nonexistent folders ([#182](https://github.com/bower/bower/issues/182))
- Fix issue when downloading assets behind a proxy using `https` ([#230](https://github.com/bower/bower/issues/230))
- Fix --save saving unresolved components ([#240](https://github.com/bower/bower/issues/240))
- Fix issue when extracting some zip files ([#225](https://github.com/bower/bower/issues/225))
- Fix automatic conflict resolver not selecting the correct version
- Add `--sources` option to the `list` command ([#235](https://github.com/twitter/bower/issues/235))
- Automatically clear cache when git commands fail with code 128 ([#216](https://github.com/twitter/bower/issues/216))
- Fix `bower` not working correctly behind a proxy in some commands ([#208](https://github.com/twitter/bower/issues/208))
- Add `--sources` option to the `list` command ([#235](https://github.com/bower/bower/issues/235))
- Automatically clear cache when git commands fail with code 128 ([#216](https://github.com/bower/bower/issues/216))
- Fix `bower` not working correctly behind a proxy in some commands ([#208](https://github.com/bower/bower/issues/208))

@@ -58,3 +64,3 @@ ## 0.7.1 - 2013-02-20

## 0.7.0 - 2013-02-01
- __Ability to resolve conflicts__ ([#214](https://github.com/twitter/bower/issues/214))
- __Ability to resolve conflicts__ ([#214](https://github.com/bower/bower/issues/214))
- __Ability to search and publish to different endpoints by specifying them in the `.bowerrc` file__

@@ -64,8 +70,8 @@ - __Experimental autocompletion__

- Fix minor issues in the cache clean command
- Better error message for invalid semver tags ([#185](https://github.com/twitter/bower/issues/185))
- Better error message for invalid semver tags ([#185](https://github.com/bower/bower/issues/185))
- Only show discover message in the list command only if there are packages
- Fix mismatch issue due to reading cached component.json files ([#214](https://github.com/twitter/bower/issues/214))
- Better error messages when reading invalid .bowerrc files ([#220](https://github.com/twitter/bower/issues/220))
- Fix update command when used in packages pointing to assets ([#197](https://github.com/twitter/bower/issues/197))
- Bower now obeys packages's `.bowerrc` if they define a different `json` ([#205](https://github.com/twitter/bower/issues/205))
- Fix mismatch issue due to reading cached component.json files ([#214](https://github.com/bower/bower/issues/214))
- Better error messages when reading invalid .bowerrc files ([#220](https://github.com/bower/bower/issues/220))
- Fix update command when used in packages pointing to assets ([#197](https://github.com/bower/bower/issues/197))
- Bower now obeys packages's `.bowerrc` if they define a different `json` ([#205](https://github.com/bower/bower/issues/205))

@@ -77,7 +83,7 @@ ## 0.6.8 - 2012-12-14

- Fix uninstall command not firing the `end` event
- Fix error when executing an unknown command ([#179](https://github.com/twitter/bower/issues/179))
- Fix error when executing an unknown command ([#179](https://github.com/bower/bower/issues/179))
- Fix help for the ls command (alias of list)
## 0.6.7 - 2012-12-10
- Fix uninstall removing all unsaved dependencies ([#178](https://github.com/twitter/bower/issues/178))
- Fix uninstall removing all unsaved dependencies ([#178](https://github.com/bower/bower/issues/178))
- Fix uninstall --force flag in some cases

@@ -97,6 +103,6 @@ - Add --silent option to the register option, to avoid questioning

## 0.6.4 - 2012-11-29
- Fix permission on downloaded files ([#160](https://github.com/twitter/bower/issues/160))
- Fix permission on downloaded files ([#160](https://github.com/bower/bower/issues/160))
## 0.6.3 - 2012-11-24
- Fix version not being correctly set for local packages ([#155](https://github.com/twitter/bower/issues/155))
- Fix version not being correctly set for local packages ([#155](https://github.com/bower/bower/issues/155))

@@ -107,5 +113,5 @@ ## 0.6.2 - 2012-11-23

## 0.6.1 - 2012-11-22
- Fix uninstall when the project component.json has no deps saved ([#153](https://github.com/twitter/bower/issues/153))
- Fix uninstall when the project component.json has no deps saved ([#153](https://github.com/bower/bower/issues/153))
- Fix uncaught errors when using file writter (they are now caught and reported)
- Fix temporary directories not being deleted when an exception occurs ([#153](https://github.com/twitter/bower/issues/140))
- Fix temporary directories not being deleted when an exception occurs ([#153](https://github.com/bower/bower/issues/140))

@@ -125,9 +131,9 @@ ## 0.6.0 - 2012-11-21

- __Remove package.json support__
- __Support for local path repositories__ ([#132](https://github.com/twitter/bower/issues/132))
- __Support for local path repositories__ ([#132](https://github.com/bower/bower/issues/132))
- `install --save` now saves the correct tag (e.g: ~0.0.1) instead of 'latest'
- `install --save` now saves packages pointing directly to assets correctly
- Bower automatically creates a component.json when install with `--save` is used
- Fix issues with list command ([#142](https://github.com/twitter/bower/issues/142))
- Fix local paths not being saved when installing with --save ([#114](https://github.com/twitter/bower/issues/114))
- `uninstall` now uninstalls nested dependencies if they are not shared ([#83](https://github.com/twitter/bower/issues/83))
- Fix issues with list command ([#142](https://github.com/bower/bower/issues/142))
- Fix local paths not being saved when installing with --save ([#114](https://github.com/bower/bower/issues/114))
- `uninstall` now uninstalls nested dependencies if they are not shared ([#83](https://github.com/bower/bower/issues/83))
- `uninstall` now warns when a dependency conflict occurs and aborts.

@@ -134,0 +140,0 @@ It will only proceed if the `--force` flag is passed

@@ -106,3 +106,3 @@ # Contributing to Bower

# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com/twitter/bower
git remote add upstream https://github.com/bower/bower
```

@@ -109,0 +109,0 @@

@@ -20,2 +20,3 @@ // ==========================================

var help = require('./help');
var fallback = require('../util/fallback');

@@ -194,8 +195,18 @@ var shorthand = { 'h': ['--help'], 'o': ['--offline'] };

var tree = getTree(packages);
var rootLabel;
if (!options.paths && !options.map) {
emitter.emit('data', archy({
label: process.cwd(),
nodes: getNodes(packages, tree)
}));
return;
return fallback(process.cwd(), [config.json, 'bower.json', 'component.json'], function (name) {
try {
if (name == null) throw new Error('No json');
rootLabel = require(path.join(process.cwd(), name)).name;
} catch (e) {
rootLabel = path.basename(process.cwd());
}
emitter.emit('data', archy({
label: rootLabel,
nodes: getNodes(packages, tree)
}));
});
}

@@ -202,0 +213,0 @@

@@ -32,15 +32,31 @@ // ==========================================

manager.on('data', emitter.emit.bind(emitter, 'data'));
manager.on('warn', emitter.emit.bind(emitter, 'warn'));
manager.on('error', emitter.emit.bind(emitter, 'error'));
var installURLS = function (err, arr) {
var install = function (err, array) {
var mappings = {},
endpoints = [];
endpoints = [],
name,
info,
length,
x;
arr = _.compact(arr);
_.each(arr, function (info) {
endpoints.push(info.endpoint);
mappings[info.endpoint] = info.name;
});
length = names.length;
if (length) {
for (x = 0; x < length; x += 1) {
name = names[x];
info = _.find(array, function (info) { return info.name === name; });
if (!info) {
return emitter.emit('error', new Error('Package ' + name + ' is not installed'));
}
endpoints.push(info.endpoint);
mappings[info.endpoint] = info.name;
}
} else {
array.forEach(function (info) {
endpoints.push(info.endpoint);
mappings[info.endpoint] = info.name;
});
}
options.endpointNames = mappings;

@@ -52,3 +68,2 @@

manager = new Manager(endpoints, options);
manager

@@ -67,4 +82,2 @@ .on('data', emitter.emit.bind(emitter, 'data'))

manager.once('resolveLocal', function () {
names = names.length ? _.uniq(names) : null;
async.map(_.values(manager.dependencies), function (pkgs, next) {

@@ -85,3 +98,3 @@ var pkg = pkgs[0];

}).loadJSON();
}, installURLS);
}, install);
}).resolveLocal();

@@ -88,0 +101,0 @@

@@ -53,5 +53,5 @@ // ==========================================

var split;
if (endpoint) {
var split;
if (/^(.*\.git)$/.exec(endpoint)) {

@@ -100,8 +100,6 @@ this.gitUrl = RegExp.$1.replace(/^git\+/, '');

if (!this.name) {
if (this.gitUrl) this.name = path.basename(endpoint).replace(/(\.git)?(#.*)?$/, '');
else if (this.path) this.name = path.basename(this.path, this.assetType);
else if (this.assetUrl) this.name = this.name = path.basename(this.assetUrl, this.assetType);
else if (split) this.name = split[0];
this.name = this.guessName(split && split[0]);
this.explicitName = false;
} else {
this.explicitName = true;
}

@@ -328,2 +326,9 @@

// Private
Package.prototype.guessName = function (fallback) {
if (this.gitUrl) return path.basename(this.gitUrl).replace(/(\.git)?(#.*)?$/, '');
if (this.path) return path.basename(this.path, this.assetType);
if (this.assetUrl) return path.basename(this.assetUrl, this.assetType);
return fallback;
};
Package.prototype.findJSON = function () {

@@ -817,4 +822,4 @@ fallback(this.path, [config.json, 'bower.json', 'component.json'], function (name) {

Package.prototype.waitUnlock = function (name) {
if (this.name === name) {
Package.prototype.waitUnlock = function (cacheName) {
if (this.cacheName === cacheName) {
this.unitWork.removeListener('unlock', this.waitUnlock);

@@ -857,2 +862,8 @@ this.resolve();

this.gitPath = path.join(config.cache, this.cacheName, this.resourceId);
// If the cache folder does not exists, try guessing it again from the new gitUrl
if (!fs.existsSync(this.gitPath)) {
this.cacheName = this.guessName(this.cacheName);
this.gitPath = path.join(config.cache, this.cacheName, this.resourceId);
}
};

@@ -859,0 +870,0 @@

@@ -57,3 +57,5 @@ // ==========================================

var dep = manager.dependencies[key][0];
if (dep.name === endpoint) return true;
if (dep.cacheName === endpoint) return true;
if (dep.shorthand === endpoint) return true;

@@ -60,0 +62,0 @@

{
"name": "bower",
"description": "The browser package manager.",
"version": "0.9.0",
"version": "0.9.1",
"author": "Twitter",

@@ -9,7 +9,11 @@ "licenses": [

"type": "MIT",
"url": "https://github.com/twitter/bower/blob/master/LICENSE"
"url": "https://github.com/bower/bower/blob/master/LICENSE"
}
],
"repository": {
"type": "git",
"url": "https://github.com/bower/bower"
},
"main": "lib",
"homepage": "http://twitter.github.com/bower",
"homepage": "http://bower.io/",
"engines": {

@@ -19,22 +23,22 @@ "node": ">=0.8.0"

"dependencies": {
"tmp": "~0.0.17",
"glob": "~3.1.14",
"nopt": "~2.0.0",
"abbrev": "~1.0.4",
"archy": "~0.0.2",
"async": "~0.2.5",
"colors": "~0.6.0-1",
"rimraf": "~2.0.3",
"mkdirp": "~0.3.4",
"semver": "~1.1.0",
"request": "~2.11.4",
"fstream": "~0.1.19",
"glob": "~3.1.14",
"hogan.js": "~2.0.0",
"lodash": "~1.0.1",
"mkdirp": "~0.3.4",
"nopt": "~2.0.0",
"promptly": "~0.1.0",
"rc": "~0.0.6",
"read-package-json": "~0.1.8",
"request": "~2.11.4",
"rimraf": "~2.0.3",
"semver": "~1.1.0",
"stable": "~0.1.2",
"rc": "~0.0.6",
"tar": "~0.1.13",
"tmp": "~0.0.17",
"unzip": "0.1.7",
"tar": "~0.1.13",
"promptly": "~0.1.0",
"abbrev": "~1.0.4",
"update-notifier": "~0.1.3"

@@ -41,0 +45,0 @@ },

@@ -1,2 +0,2 @@

# BOWER [![Build Status](https://secure.travis-ci.org/twitter/bower.png?branch=master)](http://travis-ci.org/twitter/bower)
# BOWER [![Build Status](https://secure.travis-ci.org/bower/bower.png?branch=master)](http://travis-ci.org/bower/bower)

@@ -83,3 +83,3 @@ Bower is a package manager for the web. It offers a generic, unopinionated

```html
<script src="components/jquery/index.js"></script>
<script src="/bower_components/jquery/index.js"></script>
```

@@ -108,3 +108,3 @@

There is no direct way to unregister a package yet. For now, you can [request a
package be unregistered](https://github.com/twitter/bower/issues/120).
package be unregistered](https://github.com/bower/bower/issues/120).

@@ -169,3 +169,3 @@ ### Uninstalling packages

firewall, you can use a simple implementation of the [Bower
Server](https://github.com/twitter/bower-server).
Server](https://github.com/bower/bower-server).

@@ -228,5 +228,5 @@

{
"backbone": "components/backbone/index.js",
"jquery": "components/jquery/index.js",
"underscore": "components/underscore/index.js"
"backbone": "bower_components/backbone/index.js",
"jquery": "bower_components/jquery/index.js",
"underscore": "bower_components/underscore/index.js"
}

@@ -267,3 +267,3 @@ ```

For a better of idea how this works, you may want to check out [our bin
file](https://github.com/twitter/bower/blob/master/bin/bower).
file](https://github.com/bower/bower/blob/master/bin/bower).

@@ -270,0 +270,0 @@ For the install command, there is an additional `package` event that is emitted

Sorry, the diff of this file is not supported yet

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