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

@expo-harmony/patch-project

v55.1.27-harmony.8

Published

[**GitHub 仓库**](https://github.com/renbaoshuo/expo-harmony/tree/master/packages/patch-project)

Readme

@expo-harmony/patch-project

GitHub 仓库

这个包把 harmony/ 里的手动修改保存为 Git 补丁,在 prebuild 时自动应用回去。它提供生成补丁的命令和负责应用补丁的 config plugin,流程对应 Expo 官方的 patch-project。

安装

npm install @expo-harmony/patch-project

在 app config 的 plugins 里注册插件:

{
  "expo": {
    "plugins": ["@expo-harmony/patch-project"]
  }
}

生成补丁

先跑一次 prebuild 得到 harmony/,手动改完后执行:

npx @expo-harmony/patch-project
# 指定项目目录
npx @expo-harmony/patch-project ./my-app

命令把当前原生工程和 prebuild 生成的默认工程做比较,将差异存储成一个 patch。patch 会存放在 cng-patches/harmony+<templateChecksum>.patch,把 cng-patches/ 提交到仓库即可。

应用补丁

跑 expo-harmony prebuild 或 expo-harmony prebuild --clean,插件查找并应用与当前模板匹配的补丁。没有补丁就照常生成;只有其他模板的补丁时发出警告并跳过,提示重新审查和生成。有多份补丁时只应用校验和匹配的那一份。

补丁在常规 Mods、自定义文件 Mods 和 autolinking 之后应用。补丁新增的文件纳入 CNG 文件管理,改补丁或移除插件时会清掉不再声明的新增文件。既有文件上的修改不会自动撤销,要完整重建就用 prebuild --clean。

选项

命令参数:

| 参数 | 作用 | | ----------------------- | -------------------------------------------------------- | | --clean | 补丁保存成功后删除原生目录,下次 prebuild 重新生成再应用 | | -p, --platform <name> | harmony 或 all,默认 harmony,两者都只处理 Harmony | | -h, --help | 显示帮助 |

插件选项:

| 选项 | 默认值 | 说明 | | ------------------- | ------------- | -------------------------------------- | | patchRoot | cng-patches | 查找补丁的目录,相对项目根目录 | | changedLinesLimit | 300 | 补丁改动行数超过该值时警告,不阻止应用 |

[
  "@expo-harmony/patch-project",
  {
    "patchRoot": "cng-patches",
    "changedLinesLimit": 300
  }
]

patchRoot 必须是非空路径,changedLinesLimit 必须是非负数。

注意生成 patch 的命令只往 cng-patches/ 写补丁,插件配置使用别的目录查找 patch 时,需要自己把 patch 文件移过去。

支持的修改

支持文本和二进制文件、新增和删除,以及可执行权限等修改,还有指向 Harmony 工程内部的相对符号链接。

文件是否进入补丁遵循 harmony/.gitignore 及其子目录中的 Git 忽略规则。默认的 prebuild 模板已忽略常见的依赖目录和构建产物,需要保留其中的文件时,可以用 ! 规则显式包含。

补丁路径和符号链接不能越出 Harmony 工程,也不能修改 .git 元数据。

升级

SDK、模板或其他插件升级后补丁可能对不上,要重新审查并生成。改动量大、长期维护的配置更适合写成静态 Mod。

Author

expo-harmony © Baoshuo, Released under the MIT License. Authored and maintained by Baoshuo with help from contributors.

Personal Website · Blog · GitHub @renbaoshuo · Twitter @renbaoshuo