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

git-iam

v0.2.2

Published

Git extension for setting name and email config quickly

Downloads

1

Readme

git-iam

This is a Git extension for setting local name and email configuration quickly.

It works by accessing a remote JSON file to get user information. The JSON file contains a list of name and email addresses of GitHub users. This extension configures the name and email config settings for the user provided in the current local repository. For more context, see the Applicability section.

Note about v0.2.0

Starting with version 0.2.0, the script also blanks out the global git config for user.name and user.email. We found some students would forget to run this script before committing and they would follow the git instructions to set the global user settings. Any future devs on that machine who also forgot to run this script before committing would unknowingly get the global settings. This change attempts to mitigate that scenario.

Installation

yarn global add git-iam
# or
npm install git-iam --global

Setup

After installation:

git-iam --init https://raw.githubusercontent.com/org/repo/branch/users.json

This command

  • saves the user list URL to the global Git config users.url
  • adds the iam alias to the global Git config alias.iam

The users.json file (or whatever you decide to call it) should have this format:

{
  "jane": {
    "name": "Jane Dev",
    "email": "[email protected]"
  },
  "joe": {
    "name": "Joe Dev",
    "email": "[email protected]"
  }
}

Now you can run this inside of an existing Git repository:

git iam jane

and it will have the same effect as running:

git config --global --unset-all user.name
git config --global --unset-all user.email
git config user.name "Jane Dev"
git config user.email "[email protected]"

You can verify this by running:

git config --list
# or
cat .git/config

Now the next git commit in this repo will list Jane as the dev on the commit.

Applicability

This might not seem like a justifiable effort - to build something that only saves such few keystrokes. And most people, who are the only devs using their computer, rarely run these commands.

But this is the config setting that dictates which developer (and GitHub user) performed the commit. In a classroom setting where students use every machine in the lab, this config is needed before each commit so the appropriate student gets credit for the commit (most importantly for their GitHub profile).

This script hopes to save our students a lot of time, and increase the accuracy of who is performing commits, so students get the credit they deserve.