No commit activity in last 3 years
No release in over 3 years
Force locking down of version numbers in package.json.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 2.14
= 3.0.7
>= 0
~> 10.0
~> 3.4
~> 0.41
~> 0.8

Runtime

 Project Readme

package_json_lockdown

Force locking down of version numbers in package.json

Shrinkwrap isn't the solution you want it to be, and none of the other tools quite do what you want. So you'll get fed up and force manual management of your dependencies (after all, npm outdated is fairly easy to deal with.)

This plugin will warn you if you're commiting anything that looks like:

  • "^1.0.0"
  • "~1.0.0"
  • "<=1.0.0"
  • "<1.0.0"
  • ">=1.0.0"
  • ">1.0.0"
  • "1.0.x"
  • "*"
  • ""

So you can still specify a git hash, a tag, or a URL (and so on), and, most importantly, you can specify a version number.

Basic operation, throwing warnings in specified package.json(s)
package_json_lockdown.verify('package.json')
package_json_lockdown.verify('path/to/sub/package.json')
Blacklisting specific dependencies nodes
# Will only check the `dependencies` node, but allow
#  `devDependencies` to contain non-specific versions
package_json_lockdown.dependency_keys = ['dependencies']
package_json_lockdown.verify('package.json')
Returning values to handle manually
problems = package_json_lockdown.inspect('package.json')
puts(problems)

Attributes

dependency_keys - Allows you to specify dependency nodes to check. By default it will check all nodes known to contain dependencies.

Methods

verify - Verifies the supplied package.json file

inspect - Inspects the supplied package.json file and returns problems