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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@nartallax/package_syncer

v1.0.4

Published

A tool to keep contents of your node_modules in sync with package.json

Downloads

6

Readme

Package Syncer

Tool that helps you to keep contents of package.json and node_modules in sync.

It's easy to keep them in sync if you're working on a project alone on your only workstation, but if you have multiple of them, or you have colleagues? Then all of those need some way to tell each other that they need to npm install packages every time someone installs/updates a package, and that's tedious.

This tool allows to automate this process. It can run an update command (npm ci by default) every time it detects a change in package.json or package-lock.json (list of files is also configurable). Old versions of those files are stored inside node_modules, just to have something to compare current versions against.

It also has watch mode, for those of us who love continuously-running development scripts that can keep running when you do git pull.

Install and run

npm install --save-dev @nartallax/package_syncer
./node_modules/.bin/package_syncer --help

Options

All of thos options are, well, optional. That is, tool will work just fine without any of those; by default it syncs once and exits.
(most of stuff below is repeated in --help, but anyway, here goes)

--source-file

Allows to specify a list of files. If any changes are detected between current version of file and backupped version, sync command is issued.
For multiple files pass this option more than once.
By default it's just package.json and package-lock.json.

--sync-command

Command that will be used to update packages inside node_modules.
By default it's npm ci, but you may use yarn or whatever else, in which case you will need to pass something meaningful in this option.

--watch

Enables watch mode.
After initial check the tool won't exit; instead, it will watch for changes in source files, and every time there are any changes - it will issue sync command.
Intended use-case is to be included as part of scripts that start your compiler, dev webserver and whatever else you need in development. It feels good to just keep them running in background when you do stuff, like git pull or whatever else.

--node-modules

Path to node_modules directory.
Right now it's not used for anything beside backup files storage, but who knowns.

--remember

Copy source files into backup locations before start.
That way, you're saying "this node_modules are currently in sync with package.json, no need to re-sync". So, this option should be supplied only after npm install or something like that.

--skip-initial-check

Don't check files initially. Tool will still check files in watch mode if --watch is passed. Initial check is always skipped if --remember passed.