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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@qlover/fe-release

v3.2.0

Published

A tool for releasing front-end projects, supporting multiple release modes and configurations, simplifying the release process and improving efficiency.

Readme

Fe-release

npm version license PRs Welcome

一个基于 @changesets/cli 构建的专业前端发布自动化工具,提供增强的工作流程,用于自动化 PR 管理和发布流程。

📚 目录

✨ 特性

  • 自动化版本管理

    • 基于 @changesets/cli 的可靠版本控制
    • 根据变更自动进行版本更新
    • 可配置的版本递增策略
    • 支持语义化版本(Semantic Versioning)
  • 灵活的发布工作流

    • 手动发布流程,提供直接控制
    • 基于 PR 的自动化发布工作流(GitHub)
    • 可自定义的发布策略
    • 支持多环境发布(开发、测试、生产)
  • GitHub 集成

    • 自动化 PR 创建和管理
    • 智能 PR 标签系统
    • 自动生成发布说明
    • GitHub Actions 集成
    • 支持自动合并和冲突解决
  • 工作区支持

    • 一流的 monorepo 支持
    • 多包发布协调
    • 依赖图感知
    • 选择性包发布
    • 支持私有包发布
  • 丰富的配置选项

    • 丰富的 CLI 选项
    • 通过 fe-config.json 配置
    • 环境变量支持
    • 插件系统支持自定义扩展

🚀 安装

# 使用 npm
npm install @qlover/fe-release --save-dev

# 使用 yarn
yarn add @qlover/fe-release --dev

# 使用 pnpm
pnpm add @qlover/fe-release -D

🏃 快速开始

  1. 基础发布
# 创建发布 PR
fe-release -P

# 预览发布(不实际执行)
fe-release --dry-run

# 指定版本类型发布
fe-release --changelog.increment=major
  1. 工作区发布
# 发布多个包
fe-release --workspaces.change-labels=pkg1,pkg2 -P

# 指定发布目录
fe-release --publish-path=packages/core
  1. 环境发布
# 发布到测试环境
fe-release --env=test -P

# 发布到生产环境
fe-release --env=prod -P

💻 使用方法

命令行接口

fe-release [options]

核心选项

| 选项 | 描述 | 默认值 | | --------------------------- | ------------------------ | ------- | | -v, --version | 显示版本号 | - | | -d, --dry-run | 预览模式,不实际执行更改 | false | | -V, --verbose | 显示详细日志 | false | | -p, --publish-path | 包发布路径 | - | | -P, --githubPR.release-PR | 创建发布 PR | false | | --env | 发布环境 | prod |

高级选项

| 选项 | 描述 | 默认值 | | -------------------------------- | ---------------- | ------------------------------- | | -b, --branch-name | 发布分支模板 | release-${pkgName}-${tagName} | | -s, --source-branch | 源分支 | master | | -i, --changelog.increment | 版本递增类型 | patch | | --changelog.skip | 跳过更新日志生成 | false | | --packages-directories | 变更包目录 | - | | -l, --workspaces.change-labels | 变更标签 | - |

⚙️ 配置

环境变量

| 变量 | 描述 | 默认值 | | ------------------- | ------------- | ------ | | FE_RELEASE | 启用/禁用发布 | true | | FE_RELEASE_BRANCH | 源分支 | - | | FE_RELEASE_ENV | 发布环境 | - | | FE_RELEASE_TOKEN | GitHub Token | - |

fe-config.json

{
  "release": {
    "publishPath": "",
    "autoMergeReleasePR": false,
    "autoMergeType": "squash",
    "branchName": "release-${pkgName}-${tagName}",
    "PRTitle": "[${pkgName} Release] Branch:${branch}, Tag:${tagName}, Env:${env}",
    "PRBody": "This PR includes version bump to ${tagName}",
    "packagesDirectories": ["packages/*"],
    "githubPR": {
      "commitArgs": ["--no-verify"],
      "pushChangedLabels": true,
      "releaseName": "Release ${name} v${version}",
      "commitMessage": "chore(tag): ${name} v${version}"
    },
    "changelog": {
      "types": [
        { "type": "feat", "section": "#### ✨ Features", "hidden": false },
        { "type": "fix", "section": "#### 🐞 Bug Fixes", "hidden": false },
        { "type": "chore", "section": "#### 🔧 Chores", "hidden": true },
        {
          "type": "docs",
          "section": "#### 📝 Documentation",
          "hidden": false
        },
        {
          "type": "refactor",
          "section": "#### ♻️ Refactors",
          "hidden": false
        },
        { "type": "perf", "section": "#### 🚀 Performance", "hidden": false },
        { "type": "test", "section": "#### 🚨 Tests", "hidden": true },
        { "type": "style", "section": "#### 🎨 Styles", "hidden": true },
        { "type": "ci", "section": "#### 🔄 CI", "hidden": true },
        { "type": "build", "section": "#### 🚧 Build", "hidden": false },
        { "type": "revert", "section": "#### ⏪ Reverts", "hidden": true },
        { "type": "release", "section": "#### 🔖 Releases", "hidden": true }
      ]
    }
  }
}

🔄 工作流程

手动发布流程

graph LR
    A[代码变更] --> B[运行 fe-release]
    B --> C[版本更新]
    C --> D[生成更新日志]
    D --> E[创建 Git 标签]
    E --> F[发布到 NPM]
    F --> G[创建 GitHub Release]

PR 发布流程(GitHub)

graph LR
    A[创建 PR] --> B[自动添加标签]
    B --> C[创建发布 PR]
    C --> D[更新版本和日志]
    D --> E[CI 发布]
    E --> F[发布和打标签]

🔍 常见问题

常见问题

  1. 发布被跳过

    Error: Skip Release

    解决方案:

    • 检查 FE_RELEASE 环境变量
    • 确认是否有需要发布的变更
    • 验证包版本是否需要更新
  2. PR 创建失败

    • 验证 GitHub token 权限
    • 检查仓库访问权限
    • 确认分支是否存在
    • 检查 PR 标题格式
  3. 发布失败

    • 确认 npm 登录状态
    • 检查包名是否重复
    • 验证版本号是否合法
    • 检查网络连接

调试模式

启用详细日志:

fe-release -V

🤝 贡献指南

  1. Fork 本仓库
  2. 创建特性分支
  3. 提交变更
  4. 推送到分支
  5. 创建 Pull Request

📄 许可证

本项目采用 MIT 许可证 - 详见 LICENSE 文件

🙏 致谢


更多信息,请访问我们的文档