Socket
Book a DemoInstallSign in
Socket

greenkeeper-shrinkwrap

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

greenkeeper-shrinkwrap

Your shrinkwrap, up to date, all the time

latest
Source
npmnpm
Version
1.0.13
Version published
Maintainers
2
Created
Source

greenkeeper-shrinkwrap

Enabling shrinkwrap support for Greenkeeper via Travis CI

Greenkeeper badge Build Status Dependency Status devDependency Status js-standard-style semantic-release

NPM

Setup

After enabling Greenkeeper for your repository you can use this package to make it work with shrinkwrapped projects.

  • Create a GitHub access token with push access to your repository and make it available to Travis CI's environment as GH_TOKEN.

  • Configure Travis CI to use the npm version you want your shrinkwrap files to be generated with before it npm installs your dependencies.

before_install:
# It is advisable to use latest npm, as there are a lot of shrinkwrap fixes in there
- npm install -g npm
  • Install greenkeeper-shrinkwrap as well.
before_install:
- npm install -g npm
- npm install -g greenkeeper-shrinkwrap@1
  • Configure Travis CI to run greenkeeper-shrinkwrap-update right before it executes your tests.
before_script: greenkeeper-shrinkwrap-update
  • Configure Travis CI to run greenkeeper-shrinkwrap-upload right after it executed your tests.
after_script: greenkeeper-shrinkwrap-upload

Testing multiple node versions

It is common to test multiple node versions and therefor have multiple test jobs for one build. In this case the shrinkwrap will automatically be updated for every job, but only uploaded for the first one.

node_js:
  - 6
  - 4
before_install:
- npm install -g npm
- npm install -g greenkeeper-shrinkwrap@1
before_script: greenkeeper-shrinkwrap-update
# Only the node version 6 job will upload the shrinkwrap
after_script: greenkeeper-shrinkwrap-upload

How does it work

  • This script detects whether it's running on a Greenkeeper created branch
  • If so it updates the shrinkwrap file with the latest version of the updated dependency
  • It pushes the commit with the updated shrinkwrap file back to the Greenkeeper branch/pull request

FAQs

Package last updated on 04 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts