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

tagtower

v0.1.0

Published

Tag-driven git index

Downloads

6

Readme

tagtower

Maintainability Test Coverage npm (tag)

Tag-driven git index

Motivation

It does not seem possible to get commits info w/o repo cloning. This limitation brings a significant performance impact on conventional-commits driven release flows (especially if git notes API is not supported by VCS). But what if we'd have a side index with web-hooks triggers instead. Let's find out.

— Looks like a kv-storage based on git tags. This is madness.
— True.

As a part of «how self-sufficient git is» research.

Install

yarn add tagtower

Usage

import {createTower} from 'tagtower'

const tower = createTower({
  url:            'https://<token>github.com/git/repo.git',
  branch:         'tagtower',     // Branch for storing tags. Defaults to 'tagtower'
  temp:           './temp',       // Dir to hold temporary git channels. Defaults to fs.mkdtemp(path.join(os.tmpdir(), 'tempy-tagtower-'))
  committerName:  'Foo Bar',      // Username and email to sign annotaged git tags
  committerEmail: '[email protected]',  // Defaults to Semrel Extra Bot <[email protected]>
  format:         v => v + '',    // Opt value formatter. Defaults to JSON.stringify
  parse:          v => v,         // Opt parser. Defaults to JSON.parse
  filter:         v => v % 2      // Opt low level filter (applied before parse). Defaults to () => true
})

const id: string = 'some@tag'
const data: Record<string, any> = {
  hash:    '3f9f0a88b411a8932bce289a3dd498d70a4dc96c',
  author:  'Anton Golub <[email protected]>',
  message: 'feat: initial feat'
}

await tower.create(id, data)      // stores entry to the specified remote
await tower.read(id)              // returns found TEntry | null
await tower.read()                // if tag is empty, returns TEntry[]
await tower.update(id, data)      // just a shortcut for delete & create
await tower.delete(id)            // void

License

MIT