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

@mikelgo/nx-dependency-check

v0.1.1

Published

Nx Plugin for managing dependency updates and not let your project become outdated

Downloads

1

Readme

nx-dependency-check

A Nx plugin to maintain a healthy project by checking automatically outdated packages.

Installation

  npm install @mikelgo/nx-dependency-check

Usage

In your project.json you only need to define a new target:

  "targets": {
    "check-deps": {
      "executor": "@mikelgo/nx-dependency-check:check-deps"
    }
}

That's it! The plugin itself comes with reasonable defaults:

  • It will check all packages listed in your root package.json file
  • It will use the latest tag to check for updates
  • It will mark a package as outdated if a package is more than one major version behind latest

Configuration

The check-deps-executor provides several configuration options. Here's an example

  "targets": {
    "check-deps": {
      "executor": "@mikelgo/nx-dependency-check:check-deps",
      "options": {
        "dependenciesToCheck": ["@angular/core", "@angular/common", "rxjs", "xng-breadcrumb"],
        "versionOffset": {
        "major": 1
        },
        "versionOffsetOverrides": [{"packageName":  "xng-breadcrumb", "major": 1} ],
        "failOnVersionMismatch": false,
        "inputs": [
          "package.json"
        ],
        "cache": true
      }
    }
}

Let's go through the options:

  • dependenciesToCheck: a array of package names which should be checked. Default is [*] which means that all packages are checked. If you only provide certain package names like in this example this means that only theses packages are checked.
  • versionOffset: a object which defines the version offset. Default is {major: 1} which means that a package is marked as outdated if it is more than one major version behind latest.
  • versionOffsetOverrides: A configuration where you can overrule the general versionOffset for certain packages. This is especially helpful if you have high-frequent packages or simply some packages which you can not update right now.
  • failOnVersionMismatch: A boolean which defines if the build should fail if outdated packages are found. Default is true. Setting this option to false might be helpful if you do not want to make passing the deps-check as a hard criteria to pass your build. You wil anyway get a nice report.
  • inputs: A list of files which are used to determine the packages to check. Default is ["package.json"] which means that only the root package.json is used. You can also provide a list of files like ["package.json", "projects/**/package.json"] to check all package.json files in your projects.
  • cache: whether to use the nx cache or not. Default is false.

Nx version compatibility

The plugin needs @nx/devkit version 16.1.0 or higher.