npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

grunt-bower-update

v0.1.2

Published

Update versions of bower.json dependencies

Readme

grunt-bower-update v0.1.2

Update versions of bower.json dependencies interactively (or not)

Getting Started

This plugin requires Grunt ~0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-bower-update --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-bower-update');

Bower-update task

Run this task with the grunt bower-update command.

This task allows You to pick up dependencies from your bower.json file & look up for an updated version for each package. As a result, only bower.json file would be modified. To actually install new versions you should run then bower install.

By default, this task is interactive. You would be asked to pick dependencies You want to check. And then for every updated dependency You would be able to select if newer version should be stored. But see below for possible options, so you can make this task non-interactive.

Also note that running grunt with the --verbose flag will output some extra information.

Options

cwd

Type: String
Default: process.cwd()

Where to look for bower.json files

devDependencies

Type: Boolean
Default: true

Includes devDependencies to be checked for update

clearResolutions

Type: Boolean
Default: true

Removes updated dependency from resolutions section in bower.json

pickAll

Type: Boolean
Default: false

Skips interactive selection of dependencies to be checked for update

Note, you can pass --pick-all=true to set up this option

forceLatest

Type: Boolean
Default: false

Skips interactive selection of dependency version, choosing the most latest

Note, you can pass --force-latest=true to set up this option

rangeChar

Type: String
Default: ""

Sets default range char to saved version. Usually you want to use ^ for minor updates or ~ for patch updates

Note, you can pass --range-char="^" to set up this option

logBowerInfo

Type: Boolean|String|Number|Function
Default: "warn" (which means minimum level)
Arguments: (loggedObject)
Returns: true|false

Outputs logged messages while performing internal bower info for every dependency. By default outputs messages with level either warn, conflict or error. Every "muted" message just goes to "verbose"

Note, you can pass --log-bower-info=true to set up this option

filter

Type: Function
Default: (none)
Arguments: (package, options)
Returns: true|false

Replaces interactive selection to custom method, which should decide if dependency should be checked for update

choose

Type: Function
Default: (none)
Arguments: (package, options)
Returns: String

Replaces interactive selection to custom method, which decides the exact dependency target to be saved in bower.json

Usage examples

// Totally Non-interactive
grunt.initConfig({
  'bower-update': {
    options: {
      pickAll: true,
      forceLatest: true,
      rangeChar: '~'
    }
  }
});


// Using `filter` hook
grunt.initConfig({
  'bower-update': {
    options: {
      customPrefix: 'my-',
      filter: function (package, options) {
        if (package.name.indexOf(options.customPrefix) === 0) {
          return true;
        }
        return false;
      }
    }
  }
});

Release History

  • 2015-05-07 v0.1.2
    • Cosmetic update.
  • 2015-05-07 v0.1.1
    • Improved logging output.
  • 2015-04-15 v0.1.0
    • Initial release.