Skip to content

lemonzinger/durable-update

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

durable-update


Node.js module that allows for easy dependency management

Usage

Install durable-update with npm

npm install --save-dev durable-update

Run durable-update.js

./node_modules/durable-update/bin/durable-update.js

Configuration

Update your package.json file to add a durable-update attribute with configuration to customize the update process on your project to your needs.

Below is the default configuration:

{
//  ...
  "durable-update" : {
      order         : [ 'standard', 'dev', 'optional' ],
      targetVersion : {
        standard : {
          tag : 'stable',
          semver : 'minimum',
        },
        dev : {
          tag : 'stable',
          semver : 'minimum',
        },
        optional : {
          tag : 'stable',
          semver : 'minimum',
        },
      },
      upgradeType   : 'single',
      // upgradeType   : 'all',
      // onFailure     : 'abort',
      onFailure     : 'skip',
      testCommands  : [ 'npm test' ],
      scmCommands    : [ 'git commit -F %file %manifest' ]
    },
//  ...
}

order

An array of enumerated strings representing each type of dependency found in the package manifest.

ValueDefinition
standardrefers to dependencies in package manifest
devrefers to devDependencies in package manifest
optionalrefers to optionalDependencies in package manifest

targetVersion

For each dependency type denoted by the order enumeration, one can specify the target version to which to update a given dependency of that type.

{
  tag : ...,
  semver : ...,
}

tag

ValueDefinition
stablerefers to the latest stable version that is published
latestrefers to the absolute latest version that is published, even if it is considered experimental

semver

ValueDefinition
exactspecifies that the dependency semver should be exact (e.g: 0.1.2)
minimumspecifies that the dependency semver should be at least a certain version (e.g: ^0.1.2)
loosespecifies that the dependency semver should be any patch increment version (e.g: `~0.1.2)

upgradeType

How many dependencies to update in a single run

ValueDefinition
singlewill cause durable-update to finish after successfully updating a single dependency
allwill cause durable-update to finish after successfully attempting to update all dependencies

onFailure

What action to take on a failed dependency update

ValueDefinition
aboutwill cause durable-update exit on the first failed dependency update
skipwill cause durable-update to skip any failed dependency update

testCommands

An Array of commands that need to be run in order to thoroughly test the package. The failure (non-zero return code) of any of these commands will be treated as a failure to successfully update.

scmCommands

An Array of commands that need to commit changes to source control management. The failure (non-zero return code) of any of these commands will be treated as a failure to successfully commit changes. Certain substitutions are supported.

Substitutions

ValueDefinition
%messagereplaced with the commit message
%filereplaced with the filepath to a file containing the commit message
%manifestreplaced with the filepath to the manifest file updated by durable-update

About

CI utility for easy, granularly managed dependency updates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published