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

dnmp

v0.0.1

Published

Interactive CLI that bumps your version numbers and more

Readme

dnmp

交互式 CLI:对项目执行语义化版本升级,并将版本变更同步到相关文件、Git tag、npm 发布 / PR 流程。

使用

# 交互式(默认全流程:前置检查 → 选择版本 → npm publish → commit → tag → 推送)
dnmp

# 显式指定升级类型,跳过交互
dnmp --release minor

# 预览模式:只展示计划动作,不写文件、不执行 git / npm
dnmp --release patch --dry-run

# 只改版本并本地提交,不推送、不发布
dnmp --release patch --no-git --no-submit

# 以 PR 形式提交版本升级(tag 本地创建但不推送,发布照常执行)
dnmp --release minor --pr

参数

| 参数 | 默认 | 说明 | | --- | --- | --- | | --release <type> | 无(交互选择) | major / minor / patch / next / rc / beta-major / beta-minor / beta-patch / pre-beta / alpha-beta / alpha-major / alpha-minor / alpha-patch / date-version | | --tag / --no-tag | true | 是否创建 git tag(仅默认分支)。单包与多包版本一致 → vX.Y.Z;多包版本不一致 → [email protected] 每包一个 | | --submit / --no-submit | true | 是否执行 npm publish(monorepo 逐包执行,单个失败立即中止) | | --git / --no-git | true | 是否推送 commit 与 tag 到远程(--pr 时无效) | | --pr / --no-pr | false | 以 PR 形式提交版本升级(gh pr create),分支 release/vX.Y.Z(单包)/ release/monorepo-{随机数}(monorepo);开启后 tag 不推送,发布照常执行 | | --files <files...> | package.json package-lock.json jsr.json jsr.jsonc deno.json deno.jsonc | 需要同步版本号的文件列表(空格或逗号分隔),传入即覆盖默认 | | --npmTag <tag> | latest | npm 发布的 dist-tag(与 --tag 的 git tag 无关);预发布版本未显式指定时自动映射为预发布标识(如 2.0.0-rc.1 → rc) | | --opt <opt> | 空 | npm publish 附加参数;dnmp.config 的 env.opt 存在时优先 | | --dry-run | false | 预览模式 |

行为说明

  • 项目识别:自动识别单包 / monorepo(pnpm-workspace.yaml 与 npm workspaces 字段均支持);private: true 的包不升级、不打 tag、不发布。
  • monorepo 交互:改动前各包版本一致时只交互一次并同步更新 workspace 内部依赖区间;版本不一致时逐包选择。
  • 发布顺序:选择版本并写入待发布文件后,先执行 npm publish,成功后才创建版本 commit 和 git tag;发布失败不会创建 commit/tag。
  • 前置校验:git 仓库、工作区干净、当前在默认分支、tag 不存在;--pr 校验 gh 认证;--submit 校验 npm 登录。
  • 配置优先级:CLI 参数 > dnmp.config(c12)> 内置默认值;--opt 例外,env.opt 优先。
  • CI 模式:检测到 CI / GITHUB_ACTIONS 时禁用交互,必须显式传 --release。
  • token:不通过命令行传递,使用 .npmrc 或 NODE_AUTH_TOKEN。

详细需求见 docs/REQUIREMENTS.md。

License

MIT License © lonewolfyx