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

@vanyamate/commiter

v0.0.11

Published

Simple commiter for project

Downloads

12

Readme

Commiter

Инструмент для создания однообразных коммитов

img.png img_1.png

Установка:

npm i @vanyamate/commiter

Для начала нужно создать конфиг c типом:

export type CommiterListOption =
    Array<string | Record<string, string>>
    | Record<string, string>;

export type CommiterOptions = {
    types: CommiterListOption;
    entities: CommiterListOption;
    entitiesSeparator?: string;         // Default: ', '
    postfixes?: CommiterListOption;
    postfixesSeparator?: string;        // Default: ', '
    pattern: string;
    gitFolder: string;
    gitRemoteRepositoryName?: string;
    gitPushDefault?: boolean;           // Default: false
}

Например:

import { CommiterOptions } from './Commiter.types';


const __dirname = import.meta.dirname;
const gitFolder = resolve(__dirname, '..', '..');

const config: CommiterOptions = {
    types                  : {
        'Fix': 'Fix 💡',
        'Up' : 'Update ♥',
    },
    entities               : [ 'App', 'User', { Comm: 'Commentary' } ],
    entitiesSeparator      : ', ',
    postfixes              : {
        'Unit tests'     : 'unit',
        'Build'          : 'build',
        'Playwright'     : 'playwright',
        'Telegram notify': 'tg',
    },
    postfixesSeparator     : '%',
    pattern                : `{{type}} : {{entities}} - {{message}}{{%postfixes%}}`,
    gitFolder              : gitFolder,
    gitRemoteRepositoryName: 'origin',
    gitPushDefault         : true,
};

Типы types, сущности entities и postfixes можно указывать как:

  • Массив строк
  • Массив строк + объекты с одним значением
  • Объект со всеми типами где ключ - то что покажется в консоли, значение - то что будет в коммите

Паттерн указывается как строка.

  • {{type}} - заменится на указанный тип из списка types
  • {{entities}} - заменится на выбранные сущности из entities
  • {{message}} - заменится на введенное сообщение
  • {{postfixes}} - заменится на выбранные postfixes. Можно писать как {{%postfixes%}} или что угодно другое внутри {{ТУТ postfixes И ТУТ}}. Тогда то что перед postfixes и после - вставится перед и после всех постфиксов соответственно. Допустим у нас есть строчка: {{type}} : {{entities}} - {{message}}{{%postfixes%_%}}, и мы выбрали постфиксы tg и notify. Тогда строчка {{%postfixes%_%}} заменится на %tg, notify%_%. Если мы не выберем ничего - тогда никаких % и %_% не будет. (работает только с postfixes так как они не являются обязательными)

gitFolder - папка в которой будут вызываться команды git add . и git commit -m "полное сообщение"

gitRemoteRepositoryName - название git репозитория который вы указали через git remote add [name]. Например: origin. Если этот параметр указан, то добавится поле выбора автоматического push-а.

gitPushDefault - true означает, что по умолчанию при выборе запушить или нет - будет y (Yes), иначе n (No)

entitiesSeparator - как объединятся выбранные entities

postfixesSeparator - как объединятся выбранные postfixes

Дальше создать эксемпляр в который передать конфиг коммитера и вызвать метод create

import { Commiter } from '@vanyamate/commiter';
import config from './config';


new Commiter(config).create();

Для использования можно создать скрипт в package.json

"commit": "tsx utils/git/commiter.ts" 

или

"commit": "node utils/git/commiter.js"

и вызывать как

npm run commit