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 🙏

© 2024 – Pkg Stats / Ryan Hefner

bower-check-updates

v2.2.3-1

Published

Find newer versions of dependencies than what your bower.json allows

Downloads

23

Readme

DEPRECATED: Please use npm-check-updates

Dependency Status devDependency Status

npm-check-updates supports bower as of v2.3.0

$ npm install -g npm-check-updates
$ npm-check-updates --packageManager bower   # or 'ncu -m bower' for short

bower-check-updates is a command-line tool that allows you to find and save the latest versions of dependencies, regardless of any version constraints in your bower.json file (unlike npm itself).

bower-check-updates maintains your existing semantic versioning policies, i.e., it will upgrade your "express": "^4.11.2" dependency to "express": "^5.0.0" when express 5.0.0 is released.

What?

bower-check-updates - is totally clone of npm-check-updates, but it updates bower.json dependencies (bower-check-updates updates bower.json).

All the code is written by tjunnone. I have just renamed package.json to bower.json (and added closest-bower module instead of closest-package). So if you want to contribute - better do it to bower-check-updates, and I'll merge the changes (notify me if I'm not).

Installation

npm install -g bower-check-updates

Usage

Show any new dependencies for the project in the current directory:

$ bcu

 express           4.12.x  →   4.13.x
 multer            ^0.1.8  →   ^1.0.1
 react-bootstrap  ^0.22.6  →  ^0.24.0
 react-a11y        ^0.1.1  →   ^0.2.6
 webpack          ~1.9.10  →  ~1.10.5

Run with -u to upgrade your bower.json

Upgrade a project's bower.json:

Make sure your bower.json is in version control and all changes have been committed. This will overwrite your bower.json.

$ bcu -u

 bootstrap           4.12.x  →   4.13.x

bower.json upgraded

Include or exclude specific packages:

# match mocha and should packages exactly
$ bcu -f mocha,should         

# match packages that start with "gulp-" using regex
$ bcu -f /^gulp-/             

# match packages that do not start with "gulp-". Note: single quotes are required 
# here to avoid inadvertant bash parsing
$ bcu -f '/^(?!gulp-).*$/'    

Options

-d, --dev                check only devDependencies
-e, --error-level        set the error-level. 1: exits with error code 0 if no
                         errors occur. 2: exits with error code 0 if no
                         packages need updating (useful for continuous
                         integration)
-g, --global             check global packages instead of in the current project
-h, --help               output usage information
-j, --jsonAll            output new bower.json instead of human-readable
                         message
--jsonUpgraded           output upgraded dependencies in json
--packageData            include stringified bower.json (use stdin instead)
-o, --optional           check only optionalDependencies
-p, --prod               check only dependencies (not devDependencies)
-r, --registry           specify third-party NPM registry
-s, --silent             don't output anything
-t, --greatest           find the highest versions available instead of the 
                         latest stable versions (alpha release only)
-u, --upgrade            upgrade bower.json dependencies to match latest 
                         versions (maintaining existing policy)
-ua, --upgradeAll        upgrade bower.json dependencies even when the latest
                         version satisfies the declared semver dependency
-V, --version            output the version number

Integration

The tool allows integration with 3rd party code:

var bcu = require('bower-check-updates');

bcu.run({
    packageData: fs.readFileSync('./some/project/bower.json', 'utf-8'),
    // Any command-line option can be specified here.
    // These are set by default:
    // silent: true,
    // jsonUpgraded: true
}).then(function(upgraded) {
    console.log('dependencies to upgrade:', upgraded);
});

How dependency updates are determined

  • Direct dependencies will be increased to the latest stable version:
    • 2.0.1 => 2.2.0
    • 1.2 => 1.3
  • Semantic versioning policies for levels are maintained while satisfying the latest version:
  • ^1.2.0 => ^2.0.0
  • 1.x => 2.x
  • "Any version" is maintained:
    • * => *
  • "Greater than" is maintained:
    • >0.2.0 => >0.3.0
  • Closed ranges are replaced with a wildcard:
    • 1.0.0 < 2.0.0 => ^3.0.0

Problems?

Please file an issue on github.

Always include your bower.json when reporting a bug!

Pull requests are welcome, and will not collect dust :)