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

dependency-time-machine

v1.3.4

Published

Tool to automatically update dependencies one-by-one in the time order

Downloads

534

Readme

dependency-time-machine

Tool to automatically update dependencies one by one in chronological order. Most dependencies are compatible with other packages from a similar time or pastime. This tool helps to find the latest compatible version of the dependencies and update them.

This tool is intended to simulate the typical updating workflow as it was done regularly.

Installation

Run with npx to find the next recommended dependency to update:

npx dependency-time-machine --update --install

or install globally:

# npm
npm install -g dependency-time-machine

# yarn
yarn global add dependency-time-machine

# pnpm
pnpm add -g dependency-time-machine

Usage

Basic usage to find the next recommended dependency to update:

npx dependency-time-machine --update --install

Automatically update dependencies one-by-one running tests after each update. Tests are run with the npm test command:

npx dependency-time-machine --update --install --auto

You can specify custom install and test commands:

npx dependency-time-machine --update --install --auto --install-script "yarn install" --test-script "yarn test"

Get a timeline of the updates in JSON format:

npx dependency-time-machine --timeline

To exclude some dependencies from the update, use the --exclude option:

npx dependency-time-machine --update --install --exclude react,react-dom

or use the --exclude-file option to exclude dependencies from the file:

npx dependency-time-machine --update --install --exclude-file exclude.txt

Requirements

  • Node.js >= 10

How it works

The tool reads the package.json file and finds all dependencies. Then it resolves all the versions from the registry, sorts them by date and finds the latest version of the dependency before finding another. Searching in version groups allows one to spot incompatibility between dependencies. Built-in cache and auto mode allow to update dependencies faster.

Options

Usage: dependency-time-machine [options]

Tool to automatically update dependencies one-by-one in the time order

Options:
  -p, --packageFile <file>               Path to package.json file (default: "package.json")
  -u, --update                           Update package.json file with new versions
  -is, --install-script <command>        Install with script (default: "npm install")
  -ts, --test-script <command>           Test command (default: "npm test")
  -i, --install                          Install with script
  -t, --timeline                         Print timeline
  -a, --auto                             Run in auto mode
  -c, --cache                            Cache resolved dependencies
  -ans, --allow-non-semver               Allow non-semver versions (compare with dates then, experimental)
  -cf, --cache-file <file>               Cache file (default: "./.dependency-time-machine-cache.json")
  -e, --exclude <dependency>             Exclude dependency from update, separated by comma
  -r, --registry-url <url>               Registry url (default: "https://registry.npmjs.org")
  -x, --exclude-file <file>              Exclude dependencies from file, one per line (default: "")
  -shmn, --stop-if-higher-major-number   Stop if higher major number
  -shmnv, --stop-if-higher-minor-number  Stop if higher minor or major number
  -pi, --print-info                      Print info about the packages
  -h, --help                             display help for command

License

MIT