generate a change log from git commits, including those of updated npm dependencies, recursively
Last updated 3 years ago by michaelficarra .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install npm-recursive-git-log 
SYNC missed versions from official npm registry.


Generate a change log from git commits, including those of updated npm dependencies, recursively. See How Does It Work? for more info.


npm install -g npm-recursive-git-log

or use it without installing via npx (available since npm 5.2.0)

npx npm-recursive-git-log [...args]

CLI Usage

npm-recursive-git-log --from 10.0.0 --to 10.1.0 NPM-PACKAGE-NAME
  • --from and --to are any published npm versions or dist-tags
  • --to defaults to latest
  • the positional parameter can also be given as --package
  • --format may be specified as either markdown (the default) or json

Sample Output

$ npm-recursive-git-log npm --from 5.5.0 --to 5.6.0

See the markdown-format output example.

API Usage

let npmrgl = require('npm-recursive-git-log').default;
let changelog = await npmrgl('NPM-PACKAGE-NAME', '1.0.0', 'latest');

The API returns a Changelog object of the form

interface Changelog {
  startPackageChange : DependencyChange;
  dependencyUpdates : [DependencyUpdate];

interface DependencyUpdate {
  pkg : string;

interface DependencyAddition extends DependencyUpdate {
  version : string;

interface DependencyChange extends DependencyUpdate {
  old : string;
  new : string;
  logEntries : [LogEntry];

interface DependencyDowngrade extends DependencyUpdate {
  old : string;
  new : string;

interface DependencyRemoval extends DependencyUpdate {
  version : string;

class LogEntry {
  hash : string;
  subject : string;
  author : string;

How Does It Work?

npm-recursive-git-log clones the git repo (as specified in package.json) of a package and searches for tags matching the given versions (or versions resolved from dist-tags). If the repo does not have these tags, npm-recursive-git-log instead uses the publish dates of the given versions of the package to bound its git log output. As implied by the name, npm-recursive-git-log uses npm to fetch the dependency list of the project as it was at the given versions, and repeats this process recursively for all upgraded/added dependencies.


Copyright 2017 Shape Security, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Current Tags

  • 1.0.0                                ...           latest (3 years ago)

1 Versions

  • 1.0.0                                ...           3 years ago
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (7)
Dev Dependencies (4)
Dependents (0)

Copyright 2014 - 2016 © |