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

@uscreen.de/dev-repo

v0.9.0

Published

cli to manage dev repos

Downloads

12

Readme

dev-repo

Test CI Test Coverage Known Vulnerabilities NPM Version

Manage a group of repositories for local development

Install

Add the module within your dev repo:

$ yarn add @uscreen.de/dev-repo

Usage

To combine mutliple repositories into one single development repository you just add a mapping to your existing package.json, ie.:

"repos": {
  "client": "[email protected]:example/client.git",
  "api": "[email protected]:example/api.git",
  "website": "[email protected]:example/website.git"
}

Next run repo install and you will end up with a directory structure like:

.
├── package.json
├── repos
│   ├── client
│   ├── api
│   └── site
└── yarn.lock

Each ./repos/* now containing a git cloned checkout with ./repos/*/node_modules already installed. Invoking $ repowithout any parameter prints general usage information:

$ repo
Usage: repo [options] [command]

Options:
  -V, --version         output the version number
  -h, --help            output usage information

Commands:
  install [repository]            install named repository (ie. "webapi"), or all if no name supplied
  list [repository] [-f|--fetch]  list named repository (ie. "webapi"), or all if no name supplied
  pull [repository]               pull named repository (ie. "webapi"), or all if no name supplied
  run <command> [repository]      run command within named repository (ie. "webapi"), or all if no name supplied
  help [cmd]                      display help for [cmd]

Api

$ repo install [repository]

Install given repository or all. This will create any missing subdirectory, git clone missing repositories and run a yarn install for each repository. Subsequent calls of repo install will at least run a yarn install each time. Those will run in parallel.

$ repo pull [repository]

Pull one given repository from remote or all repositories. Those pulls will run in parallel.

$ repo run <command> [repository]

Run given command within given repository or all available repositories. Example with three repoos:

$ repo run "git pull"
Already up to date.
Already up to date.
Already up to date.

Example with a given repository:

$ repo run "git status" webapi
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

By now commands will run in parallel, so don't expect a proper sequences output. run inherits the current users shell from env to enable aliases etc. by default. For example this could open editors for all projects:

$ repo run "v"

(assuming an alias like alias v 'code .')

$ repo list [repository] [-f|--fetch]

Lists local information about a given repository or all.

  • name@version
  • current branch of working copy
  • current changes of working copy
  • counts of commits behind/ahead HEAD

Example output:

$ repo list
[email protected] - [master] HEAD clean
[email protected] - [master] HEAD dirty [2⇡/⇣1] - Working Copy: 2 uncommitted local changes
[email protected] - [stable] HEAD clean

$ repo list
[email protected] - [master] HEAD clean
[email protected] - [master] HEAD dirty [2⇡/⇣1]
[email protected] - [stable] HEAD clean

$ repo list
[email protected] - [master] HEAD clean
[email protected] - [master] HEAD dirty [3⇡/⇣0]
[email protected] - [stable] HEAD clean

$ repo list
[email protected] - [master] HEAD clean
[email protected] - [master] HEAD clean - Working Copy: 1 uncommitted local changes
[email protected] - [stable] HEAD clean

$ repo list
[email protected] - [master] HEAD clean
[email protected] - [master] HEAD clean - Working Copy: 1 uncommitted local changes
[email protected] - [stable] HEAD clean

$ repo list -f
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 2 (delta 1), reused 1 (delta 1)
Unpacking objects: 100% (2/2), done.
From github.com:example/api
   b578056..d7b07cd  master     -> origin/master
[email protected] - [master] HEAD clean
[email protected] - [master] HEAD dirty [0⇡/⇣1]
[email protected] - [master] HEAD clean

Roadmap

  • add unit tests for edge cases
  • add tests for v0.2.0
  • add switch to run commands in squence

Changelog

v0.8.0

Added

  • optionally skip package installation

v0.7.0

Removed

  • Support for Node.js < v16

v0.6.0

Changed

  • upgraded all deps

v0.5.0

Changed

  • refactored to ESM

v0.4.[1,2]

  • security fixes & upgrades

v0.4.0

Changed

  • dropped git packages (isomorphic-git, git-utils), replaced by shell commands

v0.3.0

Added

  • travis ci integration
  • snyk audit integration

v0.2.0

Added

  • repo pull command to pull one or all repositories from remote
  • repo run command to run sub-commands within repositories

v0.1.0

Added

  • repo install command to install from git & npm
  • repo list command to give some status info
  • integration tests covering most (not all) use cases
  • added integration test for repo list --fetch to also git fetch befores list

v0.0.0

  • initially bootstrapped

License

Licensed under MIT.

Published, Supported and Sponsored by u|screen