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

@ark-code/release

v1.2.2

Published

Automated release tool with interactive CLI prompts

Downloads

22

Readme

@ark-code/release

自动化发布工具,提供交互式 CLI 提示,由 @ark-code/prompt 驱动。

特性

  • 自动化版本管理 - 升级 patch、minor、major 或自定义版本
  • 🔒 安全检查 - 验证 git 状态、包所有权和访问权限
  • 📦 构建与发布 - 自动化构建和 npm 发布工作流
  • 📝 变更日志生成 - 从 git 提交自动生成变更日志
  • 🏷️ Git 标签 - 灵活的 git 标签策略(带前缀、v 前缀或无前缀)
  • 🐙 GitHub Release - 自动创建 GitHub 发布
  • 🔄 Monorepo 支持 - 同步依赖、版本和多包发布
  • 🎨 美观的 CLI - 由 @ark-code/prompt 驱动的交互式提示

安装

# 使用 pnpm
pnpm add -D @ark-code/release

# 使用 npm
npm install -D @ark-code/release

# 使用 yarn
yarn add -D @ark-code/release

使用

基础发布

@ark-code/release

带选项的发布

# 升级 minor 版本
@ark-code/release --bump minor

# 生成变更日志和 GitHub release
@ark-code/release --changelog --github-release

# 演练模式
@ark-code/release --dry-run

# 自定义版本
@ark-code/release --bump question

选项

| 选项 | 描述 | 默认值 | | ------------------------------- | --------------------------------------------- | -------- | | --no-check-git-status | 跳过检查 git 状态是否干净 | false | | --no-check-ownership | 跳过检查包所有权 | false | | --no-bump | 跳过版本升级 | false | | --no-build | 跳过构建包 | false | | --bump <type> | 版本升级类型:patch\|minor\|major\|question | patch | | --npm-client <client> | npm 客户端:npm\|pnpm\|yarn\|bun | pnpm | | --publish-npm-client <client> | 发布客户端:npm\|pnpm\|tnpm | npm | | --tag <tag> | 发布标签(预发布版本自动检测) | latest | | --git-tag <type> | Git 标签类型:prefixed\|v\|false | false | | --sync-deps <pattern> | 同步依赖(glob 模式) | - | | --sync-versions <pattern> | 同步版本(glob 模式) | - | | --sync-publishes <dirs> | 同步发布(逗号分隔的目录) | - | | --dry-run | 运行但不进行实际更改 | false | | --github-release | 创建 GitHub release | false | | --changelog | 生成变更日志 | false | | --changelog-dir <dir> | 变更日志目录 | . |

Monorepo 特性

同步依赖

自动更新其他包中的依赖版本:

@ark-code/release --sync-deps "./templates/*/package.json"

在目标 package.json 中使用 __utool_sync_deps_exact 同步精确版本:

{
  "name": "my-template",
  "__utool_sync_deps_exact": true,
  "dependencies": {
    "my-package": "1.0.0"
  }
}

同步版本

在多个包之间保持版本号同步:

@ark-code/release --sync-versions "./packages/*/package.json"

同步发布

一起发布多个包:

@ark-code/release --sync-publishes "../packages/foo,../packages/bar"

编程式使用

import { release } from "@ark-code/release";

await release({
  bump: "minor",
  changelog: true,
  githubRelease: true,
  tag: "latest",
});

环境要求

  • Node.js >= 18
  • Git
  • npm/pnpm/yarn(用于发布)
  • GitHub CLI (gh) - 仅在使用 --github-release 时需要

工作流程

  1. 预检查

    • 验证 git 状态是否干净
    • 检查包所有权
    • 验证包访问权限
  2. 构建

    • 运行构建脚本(如果存在)
    • 运行 doctor 脚本(如果存在)
  3. 版本升级

    • 根据指定类型升级版本
    • 更新 package.json
  4. 发布

    • 使用适当的标签发布到 npm
    • 自动检测预发布标签(alpha、beta、rc、canary)
  5. 同步(如果配置)

    • 更新依赖版本
    • 同步版本号
    • 发布其他包
  6. 变更日志(如果启用)

    • 从提交生成变更日志
    • 过滤维护类提交
    • 格式化 PR 链接和作者提及
  7. Git 操作

    • 暂存更改
    • 创建提交
    • 创建 git 标签(如果配置)
    • 推送到远程
  8. GitHub Release(如果启用)

    • 创建 GitHub release
    • 链接到变更日志和对比视图

许可证

MIT

作者

Derrick [email protected]