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

greenkeeper-lockfile-fork

v0.0.0-development

Published

Your lockfile, up to date, all the time

Downloads

5

Readme

greenkeeper-lockfile

After enabling Greenkeeper for your repository you can use this package to make it work with lockfiles, such as npm-shrinkwrap.json, package-lock.json or yarn.lock.

example screenshot

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

Package Managers

  • ✅ npm (including npm5)
  • ✅ yarn

CI Services

How does it work

  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
  3. Push a commit with the updated lockfile back to the Greenkeeper branch

Setup

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

Configure your CI to use the npm/yarn version you want your lockfiles to be generated with before it installs your dependencies. Install greenkeeper-lockfile as well.

Configure your CI to run greenkeeper-lockfile-update right before it executes your tests and greenkeeper-lockfile-upload right after it executed your tests.

This is how it works on Travis CI for the different package managers.

npm

before_install:
# package-lock.json was introduced in npm@5
- npm install -g npm@5
- npm install -g greenkeeper-lockfile@1
before_script: greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-upload

yarn

before_install: yarn global add greenkeeper-lockfile@1
before_script: greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-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 lockfile 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-lockfile@1
before_script: greenkeeper-lockfile-update
# Only the node version 6 job will upload the lockfile
after_script: greenkeeper-lockfile-upload

Contributing a CI Service

Environment information

In order to support a CI service this package needs to extract some information from the environment.

  • repoSlug The GitHub repo slug e.g. greenkeeper/greenkeeper-lockfile
  • branchName The name of the current branch e.g. greenkeeper/lodash-4.0.0
  • firstPush Is this the first push on this branch i.e. the Greenkeeper commit
  • correctBuild Is this a regular build (not a pull request for example)
  • uploadBuild Should the lockfile be uploaded from this build (relevant for testing multiple node versions)

Have a look at our Travis CI reference implementation.

Detecting your service

Write a test that returns whether this package runs in your CI service’s environment and add it to our ci-services/tests.

Testing your service

In order to test this plugin with your own CI service install your fork directly from git.

+ npm i -g you/greenkeeper-lockfile#my-ci
- npm i -g greenkeeper-lockfile@1

We are looking forward to your contributions 💖 Don’t forget to add your CI service to the list at the top if this file.