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

@unconfig/changeset-workflow

v0.0.3

Published

Project-specific changesets workflow helpers for @unconfig.

Readme

@unconfig/changeset-workflow

@unconfig/changeset-workflow 是一个基于 Changesets 的项目专用工作流辅助包。它不替代 Changesets CLI,只读取官方 release plan,并补充 unconfig 仓库所需的项目级 changelog 同步能力。

设计

  • release-plan:通过官方 @changesets/* API 读取 packages、config、pre-state 和 changesets。
  • changelog-generate:把 release plan 转换为项目级 markdown。
  • changelog-write:把生成的 markdown 写入 CHANGELOG.md,并同步到文档站 changelog。
  • markdown:用确定性的空行规则归一化 changeset summary 和生成的 markdown。

版本计算、发布、tag、GitHub Release 和 prerelease 状态都交给 Changesets 官方流程处理。

默认行为

  • 没有可发布内容时生成空字符串。
  • 写入内容为空时跳过写入并返回 false
  • 可通过 ignorePackages 排除 apps 或其它包。
  • 可通过 packages 指定包展示顺序。
  • 必须显式传入 projectChangelogPathwebsiteChangelogPath
  • 项目 changelog 文件必须包含 <!-- CHANGELOG:INSERT -->

基础用法

import {
  generateProjectChangelog,
  writeProjectChangelog,
} from '@unconfig/changeset-workflow'

const content = await generateProjectChangelog({
  cwd: process.cwd(),
  packages: ['@unconfig/eslint-config', '@unconfig/prettier-config'],
  ignorePackages: ['@unconfig/document'],
})

await writeProjectChangelog({
  cwd: process.cwd(),
  content,
  projectChangelogPath: 'CHANGELOG.md',
  websiteChangelogPath: 'apps/document/content/changelog.md',
})

入口

该包只提供一个根入口。

| 入口 | 用途 | | ------------------------------ | -------------------------------------- | | @unconfig/changeset-workflow | release plan 读取、changelog 生成/写入 |

Release Plan 读取

需要原始 Changesets release plan 时,使用 readChangesetsReleasePlan(cwd)

import { readChangesetsReleasePlan } from '@unconfig/changeset-workflow'

const releasePlan = await readChangesetsReleasePlan(process.cwd())

该函数委托 @changesets/assemble-release-plan@changesets/config@changesets/pre@changesets/read@manypkg/get-packages 完成读取与组装。

Changelog 生成

generateProjectChangelog() 会读取当前 workspace 的 release plan,并返回可直接写入、不需要再经过格式化的 markdown。

const content = await generateProjectChangelog({
  cwd: process.cwd(),
  packages: ['@unconfig/eslint-config'],
  ignorePackages: ['@unconfig/document'],
})

测试或自定义工作流中,可以使用 generateProjectChangelogFromReleasePlan() 传入轻量 release-plan 对象。

Changelog 写入

writeProjectChangelog() 会在当天日期块已存在时把新内容插入该日期块顶部,否则在 changelog marker 后方创建新的日期块。文档站 changelog 会同步写入,并移除 marker。

await writeProjectChangelog({
  cwd: process.cwd(),
  content,
  projectChangelogPath: 'CHANGELOG.md',
  websiteChangelogPath: 'apps/document/content/changelog.md',
})

Changesets 工作流

发布主流程继续交给官方 Changesets CLI。

pnpm changeset:generate
pnpm changeset:version
pnpm changeset:publish

changeset:version 应先运行 changeset version,再调用使用本包的 changeset changelog 脚本。

预发布

预发布使用官方 Changesets prerelease mode,不在本包内实现自定义发布逻辑。

pnpm changeset:pre:alpha
pnpm changeset:generate
pnpm changeset:version
pnpm changeset:publish
pnpm changeset:pre:exit

临时构建可以使用 snapshot version:

pnpm changeset:snapshot