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 🙏

© 2026 – Pkg Stats / Ryan Hefner

comark-git-graph

v0.12.2

Published

Commit graphs from pasted git output: branches, merges, tags, and which branches have each fix. A Comark plugin.

Downloads

1,760

Readme

comark-git-graph

npm version npm downloads license docs

Commit graphs from pasted git output: branches, merges, tags, and which branches have each fix. A Comark plugin for HTML, Vue, React, and Svelte.

pnpm add comark comark-git-graph
import { createHtmlRenderer } from "@comark/html";
import gitGraph, { components } from "comark-git-graph/html";

const render = createHtmlRenderer({ plugins: [gitGraph()], components });

Run git log --all --graph --oneline --decorate --parents and paste what it prints in a git-graph fence. The bracketed label is the title:

```git-graph [Sign-in stack]
* 0d65aff 676e7b8 (HEAD -> main) Bump Vite to 8
| * 45a57b9 67cab57 (stack/sign-in-docs) Document signing in
| * 67cab57 8bb4fd2 (stack/sign-in-form) Remember the last email
| * 8bb4fd2 706c526 Sign-in form
| * 706c526 676e7b8 (stack/session-api) Add the session endpoint
|/  
* 676e7b8 Release 1.4
```

Forks and merges come from the parent hashes, branch pills and tags from --decorate. Where the plugin doesn't run, as on GitHub, the fence still shows the log. Put the fence inside ::git-graph for the props and slots: reverse shows the oldest commit first and max-count keeps the newest commits, as git log --reverse and git log -n do, and #footer adds Markdown under the graph. For a backport, paste the whole terminal: git cherry -v and a git cherry-pick dry run mark which branches have each fix. The page shows the graph with no script.

The plugin adds every problem to meta.issues, so a host can reject a document before publishing it: no git log output, a log without --parents, a branch or commit the log doesn't show, and a bad max-count. Each issue names the block and says how to fix it.

Renderers

| Renderer | Import | | --- | --- | | @comark/html | comark-git-graph/html: the styles are inlined | | @comark/vue | comark-git-graph/vue | | @comark/react | comark-git-graph/react | | @comark/svelte | comark-git-graph/svelte |

Each entry exports the parse plugin as default and the renderer's components. The Vue, React, and Svelte components add the styles when they mount; import comark-git-graph/style.css with your styles so a server-rendered page doesn't shift. The styles read the shared --comark-* tokens and sit in a comark CSS layer, so any plain rule of your own wins.