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

release-buddy

v1.0.3

Published

Helps you track cross-project and cross-repo changes

Downloads

6

Readme

Release Buddy

Provide release buddy with a list of bower and/or maven code repositories along with a work directory, and it will pull the projects down, understand how the project dependency graph, and enable querying for commits across linked projects so not only can you ask "what changed in this project", you can ask "what changed in this project and it's dependent projects?".

Important note: release buddy assumes that all provided dependencies are dependent on the 'HEAD' (or SNAPSHOT) version of the repo (rather than a explicit versioning). That's usually ok, because updating and explicit version requires a commit to occur to the project.

var createBuddy = require('release-buddy');
var workDir = '/tmp';
var repos = [{
  name: 'popcorn',
  packageManager: 'bower',
  repoUrl: '[email protected]:signalfuse/popcorn.git'
},{
  name: 'angular-popcorn',
  packageManager: 'bower',
  repoUrl: '[email protected]:signalfuse/angular-popcorn.git'
},{
  name: 'sf:caramel',
  repoUrl: '[email protected]:signalfuse/caramel.git'
}];

createBuddy(workDir, repos).then(function(buddy){
  // fetch and update repos
  buddy.update().then(function(){
    buddy.diff('popcorn', 'two days ago', 'yesterday').then(function(commits){
        commits.forEach(function(commit){
            // commit.hash - the commit hash
            // commit.authorName
            // commit.authorEmail
            // commit.time - the commit time
            // commit.subject
            // commit.details.filesChanged -- number of files changed for commit
            // commit.details.insertions -- lines added by commit
            // commit.details.deletions -- lines deleted by commit
            // commit.project.name -- project name
            // commit.project.repoUrl -- project url
            // commit.project.dependencies -- projects depended upon by the project of this commit
        });
    });
  }) 
});

API

// Create a buddy by giving it a working directory and a list of project repos.
// Repos should have a 'name' and 'repoUrl' property which will be used to git
// clone the repo in the working directory. An additional package manager 
// property may be sent to disambiguate when multiple package manager files 
// are present in a repository.
var buddyPromise = createBuddy(workDir, repos);

buddyPromise.then(function(buddy){
    // Update repos
    var updatePromise = buddy.update(); 

    // Get a diff between an approxidate time period
    var diffsPromise = buddy.diff(projectName, 'two days ago', 'yesterday');

    // Get a diff between two commits
    var diffsPromise = buddy.diff(projectName, 'fa8b9034ec71fefca83e9b115e07a7e0d71b8339', '4b9b41f9975502b98869d615832192cecdcc51dd');

    // Get the tags for a project repo
    var tags = buddy.tags(projectName);

    // Get the project object
    var project = buddy.get(projectName);

    // Get local dependent project which would be searched during diff requests
    var dependencies = buddy.localDependencies(projectName);
});