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

did-i-forget

v0.0.4

Published

A small utility to find files highly coupled to the changes in your branch based on git history. Helps to double-check if you forgot to update something related to the files you worked on.

Downloads

2

Readme

Did I forget ...?

A small utility to find files highly coupled to the changes in your branch based on git history. Helps to double-check if you forgot to update something related to the files you worked on.

Installation

$ yarn global add did-i-forget

Usage

$ did-i-forget -c

Example output

❯ did-i-forget -c -n 3
Getting changed paths... Done.
2 files changed against the origin/master
Is cache valid? Yes!
Processed 401 commits.
Generating report... Enjoy!

  ┌────────────────────┬──────────────────────────────────────────┬────────────────┬────────────┐
  │    Changed file    │               Coupled file               │ Shared commits │ Confidence │
  ├────────────────────┼──────────────────────────────────────────┼────────────────┼────────────┤
  │ src/diagnostics.rs │ src/language_features/cquery.rs          │             13 │       0.72 │
  ├────────────────────┼──────────────────────────────────────────┼────────────────┼────────────┤
  │ src/diagnostics.rs │ src/language_features/document_symbol.rs │              7 │        0.7 │
  ├────────────────────┼──────────────────────────────────────────┼────────────────┼────────────┤
  │ src/diagnostics.rs │ src/language_features/signature_help.rs  │              6 │       0.67 │
  └────────────────────┴──────────────────────────────────────────┴────────────────┴────────────┘

In this example did-i-forget tells me that I worked on src/diagnostics.rs and I might want to look into src/language_features/cquery.rs as the former was changed in 72% of commits which addressed src/language_features/cquery.rs in the past.

Options

Threshold

-t 0.5, --threshold 0.5

Set a minimum confidence for a coupled file to be reported.

Top N

-n 1, --ntop 1

How many top coupled files to show for each changed file.

Skip sweeping commits

-s 100, --skip-sweeping 100

Reduce the noise by skipping sweeping changes like re-formatting a bunch of files. By default did-i-forget ignores commits touching 100 or more files.

Cache

Enable git log caching

-c, --cache

Cache is stamped by a master revision head SHA reference and is invalidated when it changes. You really want to use it for repeated runs in large repositories as difference can reach orders of magnitude.

Custom cache path

--cache-file .did-i-forget-cache

Output format

-f table, --format table

Print result as a nicely layed out table or just a raw csv.

Master revision

-m origin/master, --master origin/master

Specify a revision (usually a branch) to diff current state against to find out changed files.

Quiet mode

-q, --quiet

Don't output progress information, only print result. Note that logging goes into stderr and result into stdout so you still can pipe result when logging enabled.