@artsy/changelog

中文文档
0.1.0发布于 2026/06/26MITTypeScriptCommonJS零依赖近 30 天下载 1949

Shared parser for Artsy PR-description changelog sections (used by eigen and release-lookout).

原始使用文档
文档目录3 节
  1. Usage
  2. API
  3. Development

@artsy/changelog

Shared parser for Artsy's PR-description changelog convention. A single source of truth used by both eigen (Danger + generate-changelog) and release-lookout (release-candidate PR descriptions).

Artsy PRs declare release notes in four ####-headed sections inside the PR body:

#### Cross-platform user-facing changes
#### iOS user-facing changes
#### Android user-facing changes
#### Dev changes

This package parses a raw PR body into a structured result. It is intentionally I/O-free — fetching PRs / determining ranges is left to each consumer.

Usage

import { parsePRDescription, changelogTemplateSections } from "@artsy/changelog"

const result = parsePRDescription(pr.body)

switch (result.type) {
  case "no_changes": // PR contains `#nochangelog`
    break
  case "error": // no changelog sections found / all empty
    break
  case "changes":
    result.crossPlatformUserFacingChanges // string[]
    result.iOSUserFacingChanges
    result.androidUserFacingChanges
    result.devChanges
    break
}

API

  • parsePRDescription(body: string): ParseResult — parse a PR body.
  • ParseResult — { type: "no_changes" } | { type: "error" } | ({ type: "changes" } & ParseResultChanges).
  • changelogTemplateSections — the section-key → section-title map.

Development

yarn        # install
yarn test   # jest
yarn build  # tsc → dist

版本与发布记录

@artsy/changelog 共发布 1 个版本,首次发布于 2026/06/26;过去 12 个月发布了 1 个版本。

版本发布日期距今
0.1.0latest2026/06/264 个月前

关于 @artsy/changelog 的常见问题

@artsy/changelog 是什么?

Shared parser for Artsy PR-description changelog sections (used by eigen and release-lookout).

如何安装 @artsy/changelog?

在项目目录运行 npm install @artsy/changelog,或使用 pnpm add / yarn add / bun add。

@artsy/changelog 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@artsy/changelog 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@artsy/changelog 可以商用吗?

@artsy/changelog 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@artsy/changelog 的下载量有多少?

根据 npm 官方下载统计,@artsy/changelog 在 2026/10/07 – 2026/11/05 这 30 天内被下载 1,949 次,日均约 65 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@artsy/changelog 还在维护吗?

最新版本 0.1.0 发布于 2026/06/26(4 个月前);至今共发布 1 个版本,其中过去 12 个月发布了 1 个;首次发布于 2026/06/26。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。