npm-check-git

Scans for outdated git dependencies.

Usage no npm install needed!

<script type="module">
  import npmCheckGit from 'https://cdn.skypack.dev/npm-check-git';
</script>

README

npm-check-git

Scans for outdated git dependencies.

Node.js Package

Usage

As an example, we'll test if npm/libnpm is up to date.

npm i npm-check-git github:npm/libnpm#latest

To test programatically:

import { getOutdated, checkDependency } from 'npm-check-git'
;(async () => {
  /**
   * To check 1 specific package
   */
  await checkDependency(
    //package name
    'libnpm',

    // *Optional* branch or commit ref (defaults to installed version)
    'latest'
  ) // true | false

  /**
   * To check all depdencies in your package.json
   */
  for await (const outdated of getOutdated()) {
    console.info(outdated)
  }
})()

Or using the CLI:

gt; npm-check-git check --package libnpm
✅ libnpm is up to date

gt; npm-check-git outdated
libnpm is out of date