@deepseek-ai/dsh-atomic-write 0.1.3-alpha.2 → 0.1.5-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/util/atomic-write/README.md
5
- README.md: e6d7d28514b8bff7afe366174d5ebe04ab402b1f
6
- README.zh.md: 7bf4fdb87316e2ef18a9685fd945d2419e949888
5
+ README.md: c3ce840f79c38fb7fac404786f0e5a7e41138d57
6
+ README.zh.md: f34e2ac97c69fee79945ba5ab8a6fb2e1a3b4675
package/README.md CHANGED
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
9
9
 
10
10
  ## Summary
11
11
 
12
- `dsh-atomic-write` replaces a file's contents in one atomic step: readers of the target always observe either the complete old content or the complete new content, never a partial write. It also serializes read-modify-write cycles across processes with a writer lock, so concurrent writers of one file cannot resurrect each other's state. The caller states the permission bits for every replacement and the fresh inode carries them through the swap, so replacing a wider-permission file narrows it without a chmod race. It is a zero-dependency library shared by file-backed stores such as the user-settings document and the credentials store; a `cordis.yml` cannot load it, and crash durability is the caller's policy because there is no `fsync`.
12
+ Use `dsh-atomic-write` to replace a file without exposing partial content or following a symlinked temporary path. Its writer lock serializes read-modify-write cycles across processes so concurrent writers cannot overwrite one another with stale state. Each replacement uses caller-selected permission bits on a fresh inode, which safely narrows an existing file's permissions. This zero-dependency library accepts strings; it does not provide a `cordis.yml` plugin or crash durability because it does not call `fsync`.
13
13
 
14
14
  ## Table of Contents
15
15
 
package/README.zh.md CHANGED
@@ -9,7 +9,7 @@ kind: "package-library"
9
9
 
10
10
  ## 概述
11
11
 
12
- `dsh-atomic-write` 一步原子地替换文件内容:目标的读取方总是看到完整的旧内容或完整的新内容,绝不看到部分写入。它还通过写锁跨进程串行化读-渲染-提交循环,因此同一文件的并发写入方无法复活彼此替换掉的状态。调用方为每次替换声明权限位,全新 inode 会带着这些权限位走完交换,因此替换权限过宽的旧文件时会直接收窄,不存在 chmod 竞态。它是一个零依赖库,由用户设置文档与凭据存储这类文件型存储共享;`cordis.yml` 无法加载它,而且由于没有 `fsync`,崩溃持久性由调用方负责。
12
+ 使用 `dsh-atomic-write` 替换文件时,不会暴露部分内容,也不会跟随指向临时路径的符号链接。它的写锁会跨进程串行化读-修改-写入循环,因此并发写入方不会用陈旧状态相互覆盖。每次替换都会在全新 inode 上使用调用方选择的权限位,从而安全地收窄现有文件的权限。这个零依赖库只接受字符串;它不提供 `cordis.yml` 插件,也不保证崩溃持久性,因为它不调用 `fsync`。
13
13
 
14
14
  ## 目录
15
15
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-atomic-write",
3
3
  "description": "Zero-dependency atomic file replacement: exclusive-create random-suffix temp + rename carrying the caller-stated permissions (writeFileAtomic)",
4
- "version": "0.1.3-alpha.2",
4
+ "version": "0.1.5-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },