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 🙏

© 2025 – Pkg Stats / Ryan Hefner

git-loader

v1.0.0

Published

[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

Downloads

6

Readme

Commitizen friendly

git-loader

This module provide the ability to require a commonjs module at a given version in the repository history.

This may be usefull to monitor performance enhancement during a refactor or avoiding the use of submodule pointing at other branch of the same repository.

git bisect command can provide the same kind of feature, but I wanted to play with git and module override.

Usage

This module must be installed as a devDependencies since it won't and should'nt be of any use on production servers. Which means you should install it using npm install --save-dev git-loader and use it in ci or local environment like this

require('git-loader')
const previousVersionOfModuleA = './A#previous-tag.git'
const currentVersionOfModuleA = './A'

// ... do your stuff

You can also run the same using node -r git-loader perf.js where perf.js looks like

const previousVersionOfModuleA = './A#previous-tag.git'
const currentVersionOfModuleA = './A'

// ... do your stuff

Moreover this module needs git to be installed in the environment you will on which you will use it, but there's a a lot of chance this may be the case, since it seems to be one of the npm requirement to enable some of its feature like git dependencies. (note for myself, I may have use the npm's internal git lib instead of writing my own ...)

Tooling and commit on this project

This package makes use of the commitizen and husky packages, see how to install it on you project and how to use it.

Roadmap

All the roadmap for this project is handled using github features like the github's projects page, milestone, issues ... to be honest I'm still wondering what will be the most efficient way of handling it.

Warnings

One of the strongest limitation of this module is that when a scripts is loaded at a given version, it could require other modules which exists in your project at this specific revision.

Those modules may not exist at the current point of history of the working folder and even if they still exists they may exports a different signature.

Same is true for the dependencies defined in your package files.

All those limitation has been clearly identified and may be addressed or not in future versions.