@ai-ecoverse/wasm-git

中文文档
2.55.0-22发布于 2026/10/23GPL-2.0-only零依赖构建来源已验证近 30 天下载 9119

Git version control: clone, commit, branch, merge, push and pull.

原始使用文档
文档目录5 节
  1. Shell subcommands and local clones (2.55.0-18)
  2. bash and sed are peers (2.55.0-22)
  3. Users (2.55.0-14, slicc-kernel ≥ 1.47.1)
  4. Several processes and tabs on one repository (2.55.0-21)
  5. Build paths (2.55.0-20)

@ai-ecoverse/wasm-git

Git 2.55.0 for slicc. Local repos work out of the box; HTTP(S) remotes go through @ai-ecoverse/wasm-curl (Mbed TLS) and the realm's CONNECT / TLS proxy (http_proxy / https_proxy, CA via GIT_SSL_CAINFO).

GIT_EXEC_PATH is set to libexec/git-core (relative → package root).

Git runs some things through /bin/sh: local and file:// remotes (it starts git-upload-pack / git-receive-pack with sh -c), ssh remotes, hooks and ! aliases. SLICC and slicc-kernel resolve sh to GNU bash, so this package needs @ai-ecoverse/wasm-bash; without it, git clone /path/to/repo fails with cannot exec 'git-upload-pack …'.

pnpm add -g @ai-ecoverse/wasm-git
git init && git add . && git commit -m ok

Shell subcommands and local clones (2.55.0-18)

git submodule, git mergetool and the other shell-script subcommands run through git-sh-setup, which needs sed, so this package also needs @ai-ecoverse/wasm-sed. git clone --local copies the objects when the file system has no hard links (slicc's OPFS root), as --no-hardlinks does. It needs slicc-kernel 1.130.2 or later.

bash and sed are peers (2.55.0-22)

git runs sh and sed as commands and imports none of their files, so @ai-ecoverse/wasm-bash and @ai-ecoverse/wasm-sed are required peerDependencies with the range "*", not exact dependencies. Up to 2.55.0-21 they were exact pins (5.3.0-23 and 4.10.0-6), and npm nested a second copy under wasm-git whenever your own top-level version differed (bios#939). Now npm uses the copy you have, whatever its version, and installs the latest one when it's missing. A floor such as >=4.10.0-6 wouldn't do: npm's semver lets a prerelease-style version like 4.11.0-1 match only a range that names the same 4.11.0, so the next upstream's first release would fail with ERESOLVE. SLICC's ipk doesn't install peers: ipk install @ai-ecoverse/wasm-git alone doesn't bring bash and sed, so install them too unless your image has them already.

Users (2.55.0-14, slicc-kernel ≥ 1.47.1)

git runs as the kernel's user. Without user.name, the author name comes from slicc-kernel's /etc/passwd for the process's uid: root by default, or a kernel.users.add user's name. Repository ownership checks (safe.directory) use the file owners the kernel reports (≥ 1.47.1: the calling user's ids).

Several processes and tabs on one repository (2.55.0-21)

git guards the index and refs with lock files (index.lock, ref .lock files), created with O_EXCL, not fcntl or flock. A second git process on a locked repository fails with Unable to create '….lock': File exists instead of writing over the first, as on any system. git itself takes no fcntl locks, so the kernel floors for those (slicc-kernel 1.100.0 between processes, homescoop#513; 1.119.0 across tabs, slicc-kernel#944) matter only to tools you run on the repository that use them.

Across browser tabs, files one tab writes, lock files included, are coherent in the other tab since slicc-kernel 1.120.1 (slicc-kernel#949), and opens from two tabs no longer fail at random since 1.122.3 (slicc-kernel#950). So two tabs on one repository are safe on slicc-kernel 1.122.3 or later, and this package's floor (1.130.2) is above all of these.

On older kernels, use one process per repository at a time: a tab can miss the other's lock file, and two tabs can lose or corrupt what the other wrote.

Build paths (2.55.0-20)

No wasm in this package names the machine it was built on. git-remote-http(s), git-http-fetch and git-remote-ftp(s) link libcurl and Mbed TLS from @ai-ecoverse/wasm-curl; up to 2.55.0-19 they were built against wasm-curl 8.22.0-6, whose Mbed TLS archive still named /tmp/homescoop-work/mbedtls-3.6.5/… (homescoop#1008). 2.55.0-20 links wasm-curl 8.22.0-9, and the build refuses any wasm that names a build path.

版本与发布记录

@ai-ecoverse/wasm-git 共发布 21 个版本,首次发布于 2026/09/29;过去 12 个月发布了 21 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
2.55.0-22latest2026/10/2313 天前
2.55.0-202026/10/2215 天前
2.55.0-192026/10/2215 天前
2.55.0-182026/10/2016 天前
2.55.0-172026/10/1918 天前
2.55.0-162026/10/1720 天前

关于 @ai-ecoverse/wasm-git 的常见问题

@ai-ecoverse/wasm-git 是什么?

Git version control: clone, commit, branch, merge, push and pull.

如何安装 @ai-ecoverse/wasm-git?

在项目目录运行 npm install @ai-ecoverse/wasm-git,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@ai-ecoverse/wasm-sed(*)、@ai-ecoverse/wasm-bash(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@ai-ecoverse/wasm-git 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/ai-ecoverse__wasm-git 是否存在。

@ai-ecoverse/wasm-git 可以商用吗?

@ai-ecoverse/wasm-git 使用 GPL-2.0-only 许可。强 Copyleft:分发包含该代码的软件时,整个作品需以兼容的 GPL 许可开源。仅在内部使用、不对外分发时不触发此义务。以上为概括,不构成法律意见,请以许可原文为准。

@ai-ecoverse/wasm-git 的下载量有多少?

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

@ai-ecoverse/wasm-git 还在维护吗?

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