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

@lx-frontend/lixin-release

v0.1.3

Published

lixin release cli

Downloads

955

Readme

@lx-frontend/lixin-release

lixin release cli —— 基于 Changesets 的自动化发布工具,适用于 monorepo 和单体项目,通常配合 CI/CD 流水线使用。

安装

npm i -g @lx-frontend/lixin-release

使用

lxrelease

在项目根目录(或 CI 环境中)运行即可,无需额外参数。

工作流程

执行 lxrelease 后,CLI 会按以下步骤自动完成发布:

  1. 初始化 Changeset 配置

    • 确保 .changeset/ 目录存在
    • 写入 changelog-config.jsconfig.json(始终覆盖,保持最新)
  2. 读取 Commit 信息

    • 支持 merge commit(自动取 HEAD^2 作为信息来源)
    • 普通 commit 直接取 HEAD
  3. 推断语义化版本类型

    | Commit 前缀 | 版本类型 | | ----------------------------- | -------- | | feat!: / BREAKING CHANGE: | major | | feat: / feat(scope): | minor | | 其他 | patch |

  4. 确定目标包

    • 默认:通过 pnpm list -r --filter="...[HEAD~1]" 检测自上次 commit 以来有变动的包
    • [release-all] 标记:在 commit message 中加入 [release-all],强制对所有 workspace 包发布
  5. 生成 Changeset 文件

    • .changeset/ 下生成 auto-<timestamp>.md
  6. 配置 Git(CI 环境)

    • 若环境变量 GITLAB_TOKENCI_SERVER_HOSTCI_PROJECT_PATH 均存在,自动配置 git user 和 remote URL
  7. 版本 → 发布 → 推送

    pnpm changeset version
    git add . && git commit
    pnpm changeset publish
    git push origin HEAD:master --follow-tags -o ci.skip

CI/CD 集成示例

# .gitlab-ci.yml 示例
release:
  stage: release
  script:
    - lxrelease
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

所需环境变量:

| 变量 | 说明 | | -------------- | ----------------------------------------------------------------------------------------------------------------------------- | | GITLAB_TOKEN | GitLab OAuth2 token,用于推送代码和 tag【建议创建 Project Access Tokens,配置 write_repository scope 和 Maintainer role】 |

Commit Message 规范

遵循 Conventional Commits 规范:

feat(button): add size prop          # minor
fix(input): handle empty value       # patch
feat!: redesign API                  # major
chore: update deps [release-all]     # patch,并发布所有包

Changeset 配置说明

CLI 会自动写入以下配置到 .changeset/config.json

{
  "changelog": ["./changelog-config.js", {}],
  "commit": false,
  "access": "restricted",
  "baseBranch": "master",
  "updateInternalDependencies": "patch",
  "privatePackages": { "version": true, "tag": true }
}

注意

  • 由于涉及往仓库中 push 代码, 需注意在 .gitignore 中排除无关文件,包括各类缓存或构建产物等
  • 忽略 .changeset 目录

License

MIT