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

@jonallured/pear

v0.7.0

Published

Credit where credit is due.

Downloads

13

Readme

Pear CircleCI

Credit where credit is due.

Install

Since Pear is an NPM package, installation can be as easy as:

$ npm install --global @jonallured/pear
// or
$ yarn global add @jonallured/pear

Note that I've got this under a namespace so you have to specify that.

Init

Next up would be to init things so that you get a data file:

$ pear init
$ cat ~/.pear-data
{
  "current": [],
  "known": []
}

Add known authors

At this point you can add some known authors. That looks something like this:

$ pear known:add jonallured
jonallured not found
name for jonallured: Jonathan Allured
email for jonallured: [email protected]
Added new known authors! 🍐
$ pear known
[
  {
    "email": "[email protected]",
    "name": "Jonathan Allured",
    "username": "jonallured"
  }
]

Add a known author to your current pairing session

Now that we have a known author we can add them to what we're working on:

$ pear current:add jonallured

This sets us up to give credit in our commits to jonallured.

Note: Pear supports multiple authors, so you can add as many authors to your current pairing session as you want!

Credit current authors on a commit

Once you've got author(s) in your current session, you can use Pear in a number of ways to credit authors on a commit. They basically boil down to these:

1. Copy/paste trailer into commit message

Generate a trailer for the current pair(s):

$ pear current:trailer
Co-authored-by: Jonathan Allured <[email protected]>

Manually copy/paste that trailer into your commit message, and your pair(s) will get credit!

2. Amend the current commit with Pear

$ pear amend
Commit message amended! 🍐

This will magically update the most recent commit with a trailer for all authors in your current session! Your pair(s) get credit again 😎.

3. Automate commit trailers with a post-commit hook

The first two are more manual in case git hooks aren't your thing but hooks are super cool and can make you feel like a genius. Impress your friends and have the trailer added automatically!

Configure the hook to call pear amend, and your pair(s) will get credit as soon as you commit!!

Cutting a new release

The process of cutting a new release is mostly managed by CircleCI. All that needs to be done locally is running the release script:

# those args are old/new version numbers
$ ./bin/release 0.0.0 0.0.1

This script will find the old version, replace with the new version and then do all the git things to get GitHub updated and kick off the release job on Circle.