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

papapackage

v1.0.38

Published

<p align="center"> <img src="./logo.png"> </p>

Downloads

20

Readme

Papapackage

This cli watches all your projects and copies changed files to all node_modules folders of dependent projects.

Installation

brew install watchman

yarn global add papapackage

Usage

Run papapackage in the folder you want to watch:

papapackage

or

papapackage ~/Documents

(or any other folder)

Let papa do the work

Now you can let papa do the work, and never worry that you have an old version installed!

Todo

Refactor

  • [x] put type in every dest in watchlist instead of keeping 2 arrays. type is link or copy
  • [x] Also watch linked ones, just skip the copying for linked destinations
  • [x] test if the refactor was successful

Status

  • [x] ActivityIndicator + "searching..." --> Checkmark + "X dependencies found for Y packages"
  • [x] ActivityIndicator + "linking..." --> Checkmark + "X packages linked into Y destinations"
  • [x] ActivityIndicator + "watching..." --> Checkmark + "X packages watched for Y destinations"
  • [x] will be shown on startup/restart, but is also saved so it can be shown when hitting i

Copies:

  • [x] don't show copies being made for the first round (the first 10 seconds)
  • [x] after the first round, for every subscription event, show Checkmark + "X file(s) changed. Copying into to Y destination(s) and linking into Z destination(s)"

Hotkeys:

  • [x] When hitting i or ?, you see available commands and the status (l, r, i + status)
  • [x] When hitting l, you see all watched and linked directories, together in one array (watched have type watch, linked have type link). It is shown in nice tabular view. It's also copied as JSON
  • [x] When hitting r, it restarts
  • [x] When hitting q, it shows details of the latest copy/link event (package name, package src, link destinations, copy destinations)

General:

  • [ ] Add config option that lets you create some settings that change certain things in the cli
  • [ ] Add mode by default (turned off by -y) that asks you if it should start the watcher
  • [ ] Add -l that only lists table, but doesn't link or watch anything yet (it can then be started by hitting s)
  • [ ] Add -u/unlink that unlinks all the found packages to link
  • [ ] Add 'run {command}' that runs that command in all package folders

Downtime management:

  • [ ] safe last time papapackage was running and check the last time every dependency has had changes in non-ignored folders
  • [ ] remove current dest/node_modules/dependency folder for linking strategy copy
  • [ ] copy src folder to dest/node_modules/dependency
  • [ ] don't subscribe to every file on startup, only after startup (this is a watchman setting)

Article

  • [ ] Write an article about this

Test

  • [ ] Confirm it works for expo projects, next projects, and packages.

First, test it in daily usage

Fixes

  • [ ] change blue color (unreadable)
  • [ ] sometimes it watches twice for some reason
  • [ ] never block thread so it shows loading correctly (don't use sync functions)
  • [ ] show loader if loading files or any other sub-command
  • [ ] status doesn't get replaced properly if you hit the l sub-command (make it an object instead of an array, and replace keys instead of array.push)

Nice to have:

  • [ ] make sure to un-link all packages that are going to be linked, because the folders may have changed and it can't overwrite links.
  • [ ] Add papa ls that only lists table, but doesn't link or watch anything yet (it can then be started by hitting s)
  • [ ] Add papa unlink that unlinks all the found packages to link
  • [ ] Add papa exec {command} that runs that command in all package folders
  • [ ] Add papa run {script} that runs an npm script in each package that contains it
  • [ ] Change cli name to papa
  • [ ] Add mode by default (turned off by -y) that asks you if it should start the watcher
  • [ ] CLI should read papapackage.config.json for the key ignoreDirs which is an array of folder paths (absolute or relative) that will not be watched
  • [ ] Also add other keys in the config like useVoice and yarnOrNpm
  • [ ] Add papa ignore {path} that will add the path to the papapackage.config.json (and creates the configfile if it doesn't exist in the cwd)
  • [ ] Add papa init that creates the config file in the cwd in an interactive way (like most init cli's do)
  • [ ] Add papa help with info
  • [ ] Add papa publish, papa pull, papa ship, papa
  • [ ] Add papa to npx if that name is not taken yet
  • [ ] Add papa clean to remove all node_modules and lockfiles everywhere