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

@nostar/gitlog

v0.0.9

Published

更友好的git log,附带检测git commit message

Downloads

3

Readme

@nostar/gitlog

初衷

git log方法虽然强大,但是总有些不尽如人意的地方。就比如--grep的正则支持的是BERERE。我更喜欢自定义一些。

使用方式

请确保命令行可以正常使用git且当前文件夹下有.git

# 本项目安装
npm i @nostar/gitlog -D

# 全局安装
npm i @nostar/gitlog -g

# 默认显示当月1号到今天的commit
gitlog

# 配置显示since到before日期的commit,包含since和before当天
gitlog --since=2020-03-16 --before=2020-03-19

# 默认显示当月1号到今天的commit,并校验commit message
gitlog --lint

# 默认显示当月1号到今天的commit,并校验commit message,并仅显示校验通过记录
gitlog --lint --filter=pass

# 默认显示当月1号到今天的commit,并校验commit message,并仅显示校验未通过记录
gitlog --lint --filter=fail

# 默认显示当月1号到今天的commit,按用户分组
gitlog --user

# 默认显示当月1号到今天的commit,按用户分组,并校验commit message
gitlog --user --lint

# 默认显示当月1号到今天的commit,按用户分组,并校验commit message,并仅显示校验未通过记录
gitlog --user --lint --filter=pass

# 默认显示当月1号到今天的commit,按用户分组,并校验commit message,并仅显示校验未通过记录
gitlog --user --lint --filter=fail

gitlog

gitlog --lint

其他参数

自己猜吧。

const config = {
  '--no-pager': true,
  '--format': "{'author':'%an','message':'%s','datetime':'%ad','hash':'%h'}",
  '--since': undefined,
  '--before': undefined,
  '--date': "format:%Y-%m-%d %H:%M:%S",
  '--no-merges': true,
  '--reverse': false,
  '--lint': false,
  '--user': false,
  '--grep': '^(feat|fix|update|perf|doc|docs|test|chore|refactor|revert)(\\(.*\\))?:\\s.*',
  '--sort': "fail,commit",
  '--sort-type': 'desc',
  '--only-show': '',
  '--padding': '0,2,0,2',
  '--cwd': './'
};