New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

greenkeeper-lockfile

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

greenkeeper-lockfile - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

10

lib/update-lockfile.js

@@ -11,2 +11,8 @@ const exec = require('child_process').execSync

const setPrefixYarn = prefix => prefix === '~'
? '--tilde'
: prefix === ''
? '--exact'
: ''
module.exports = function updateLockfile (dependency, options) {

@@ -22,3 +28,5 @@ if (!options.yarn && semver.lt(exec('npm --version').toString().trim(), '3.0.0')) {

const flag = flags[dependency.type]
const prefix = `--save-prefix="${dependency.prefix}"`
const prefix = options.yarn
? setPrefixYarn(dependency.prefix)
: `--save-prefix="${dependency.prefix}"`

@@ -25,0 +33,0 @@ const args = `${flag} ${prefix} ${dependency.name}@${dependency.version}`

2

package.json
{
"name": "greenkeeper-lockfile",
"description": "Your lockfile, up to date, all the time",
"version": "1.3.1",
"version": "1.3.2",
"author": "Stephan Bönnemann <stephan@boennemann.me> (http://boennemann.me)",

@@ -6,0 +6,0 @@ "bin": {

# greenkeeper-lockfile
> Enabling lockfile support for Greenkeeper via your own CI
After [enabling Greenkeeper for your repository](https://github.com/integration/greenkeeper) you can use this package to make it work with lockfiles, such as `npm-shrinkwrap.json`, `package-lock.json` or `yarn.lock`.
![example screenshot](https://cloud.githubusercontent.com/assets/908178/26423274/57c5c774-40cd-11e7-8e01-fc886f23d265.png)
[![Greenkeeper badge](https://badges.greenkeeper.io/greenkeeperio/greenkeeper-lockfile.svg)](https://greenkeeper.io/)

@@ -12,8 +14,5 @@ [![Build Status](https://travis-ci.org/greenkeeperio/greenkeeper-lockfile.svg?branch=master)](https://travis-ci.org/greenkeeperio/greenkeeper-lockfile)

[![NPM](https://nodei.co/npm/greenkeeper-lockfile.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/greenkeeper-lockfile/)
## Package Managers
* ✅ npm
* ✅ npm5
* ✅ npm _(including npm5)_
* ✅ yarn

@@ -29,10 +28,8 @@

1. This script detects whether it's running on a Greenkeeper created branch
2. If so it updates the lockfile with the latest version of the updated dependency
3. It pushes the commit with the updated lockfile back to the Greenkeeper branch/pull request
1. Detect whether the current CI build is caused by Greenkeeper
2. Update the lockfile with the latest version of the updated dependency [using the package manager’s built in mechanism](lib/update-lockfile.js)
3. Push a commit with the updated lockfile back to the Greenkeeper branch
## Setup
After [enabling Greenkeeper for your repository](https://github.com/integration/greenkeeper) you can use this package to make it work with lockfiles, such as `npm-shrinkwrap.json`, `package-lock.json` or `yarn.lock`.
**First [create a GitHub access token with push access to your repository](https://github.com/settings/tokens) and make it available to your CI's environment as `GH_TOKEN`**.

@@ -39,0 +36,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc