Skip to content

Commit 8c904ec

Browse files
committed
chore: update package name to @rush-fs/core and version to 0.1.0-alpha.0; enhance documentation for migration and usage
1 parent 82587b3 commit 8c904ec

37 files changed

Lines changed: 188 additions & 56 deletions

.github/workflows/Release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# Release:仅维护者触发,构建四平台并发布到 npm
2-
# 触发方式:
3-
# 1. 手动:Actions → Release → Run workflow(使用当前 main 的 package.json version)
4-
# 2. 打 tag:git tag v0.0.3 && git push origin v0.0.3(需先已把 package.json 改为 0.0.3 并 push)
5-
# 仓库需配置 Secrets → NPM_TOKEN(npm 的 Automation token,Publish 权限)
1+
# Release: Maintainer-only; builds four platforms and publishes to npm.
2+
# Main package: @rush-fs/core (see package.json). Platform packages: @rush-fs/rush-fs-darwin-arm64, etc.
3+
# Trigger:
4+
# 1. Manual: Actions → Release → Run workflow (uses current main's package.json version)
5+
# 2. Tag: git tag v0.x.x && git push origin v0.x.x (bump version in package.json / Cargo.toml and push first)
6+
# Required: Secrets → NPM_TOKEN (npm Automation token with Publish permission)
67
name: Release
78
env:
89
DEBUG: napi:*

CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,19 @@ All notable changes to Rush-FS are documented here. The format is based on [Keep
66

77
- (Add new changes here before each release.)
88

9+
## [0.1.0-alpha.0] - (release date TBD)
10+
11+
**This is an alpha release.** API and behavior may change before 0.1.0 stable. Feedback and issues are welcome.
12+
13+
### Changed
14+
15+
- **Package name:** The main npm package is now **`@rush-fs/core`** (scoped). Install with `pnpm add @rush-fs/core` or `npm i @rush-fs/core`, and import with `import { readdir, readFile, ... } from '@rush-fs/core'`.
16+
- **Migration from `rush-fs`:** If you were using the old unscoped package `rush-fs`, replace it with `@rush-fs/core` in `package.json` and in all imports. The API is unchanged; only the package name and version differ. The old `rush-fs` package may be deprecated on npm in a separate step; prefer `@rush-fs/core` for new installs.
17+
18+
## [0.0.5] - (release date TBD)
19+
20+
- Re-publish with `optionalDependencies` correctly injected after `napi prepublish`, so `pnpm i rush-fs` / `npm i rush-fs` auto-installs the platform native binding. No API or behavior changes from 0.0.4.
21+
922
## [0.0.4] - (release date TBD)
1023

1124
### Fixed
@@ -23,6 +36,8 @@ All notable changes to Rush-FS are documented here. The format is based on [Keep
2336

2437
---
2538

26-
[Unreleased]: https://github.com/CoderSerio/rush-fs/compare/v0.0.4...HEAD
39+
[Unreleased]: https://github.com/CoderSerio/rush-fs/compare/v0.1.0-alpha.0...HEAD
40+
[0.1.0-alpha.0]: https://github.com/CoderSerio/rush-fs/compare/v0.0.5...v0.1.0-alpha.0
41+
[0.0.5]: https://github.com/CoderSerio/rush-fs/compare/v0.0.4...v0.0.5
2742
[0.0.4]: https://github.com/CoderSerio/rush-fs/compare/v0.0.3...v0.0.4
2843
[0.0.3]: https://github.com/CoderSerio/rush-fs/releases/tag/v0.0.3

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
authors = []
44
edition = "2021"
55
name = "rush_fs"
6-
version = "0.0.3"
6+
version = "0.1.0-alpha.0"
77

88
[lib]
99
crate-type = ["cdylib"]

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,29 @@
66

77
<p align="center">
88
<img src="https://img.shields.io/badge/Written%20in-Rust-orange?style=flat-square" alt="Written in Rust">
9-
<img src="https://img.shields.io/npm/v/rush-fs?style=flat-square" alt="NPM Version">
10-
<img src="https://img.shields.io/npm/l/rush-fs?style=flat-square" alt="License">
9+
<img src="https://img.shields.io/npm/v/@rush-fs/core?style=flat-square" alt="NPM Version">
10+
<img src="https://img.shields.io/npm/l/@rush-fs/core?style=flat-square" alt="License">
11+
<img src="https://img.shields.io/badge/status-alpha-orange?style=flat-square" alt="Alpha">
1112
<a href="https://github.com/CoderSerio/rush-fs/graphs/contributors"><img src="https://img.shields.io/github/contributors/CoderSerio/rush-fs?style=flat-square" alt="Contributors"></a>
1213
</p>
1314

1415
<p align="center">
1516
API-aligned with Node.js <code>fs</code> for painless drop-in replacement in existing projects; get multi-fold performance in heavy file operations, powered by Rust.
1617
</p>
1718

19+
<p align="center"><strong>⚠️ Alpha:</strong> The package is currently in <strong>alpha</strong>. API and behavior may change before 0.1.0 stable.</p>
20+
1821
</div>
1922

2023
## Installation
2124

2225
```bash
23-
npm install rush-fs
26+
npm install @rush-fs/core
2427
# or
25-
pnpm add rush-fs
28+
pnpm add @rush-fs/core
2629
```
2730

28-
When you install `rush-fs`, the package manager should automatically install the **platform-specific native binding** for your OS/arch via `optionalDependencies` (e.g. `@rush-fs/rush-fs-darwin-arm64` on macOS ARM). If the native binding is missing and you see "Cannot find native binding", try:
31+
When you install `@rush-fs/core`, the package manager should automatically install the **platform-specific native binding** for your OS/arch via `optionalDependencies` (e.g. `@rush-fs/rush-fs-darwin-arm64` on macOS ARM). If the native binding is missing and you see "Cannot find native binding", try:
2932

3033
1. Remove `node_modules` and the lockfile (`package-lock.json` or `pnpm-lock.yaml`), then run `pnpm install` (or `npm i`) again.
3134
2. Or install the platform package explicitly:
@@ -34,10 +37,12 @@ When you install `rush-fs`, the package manager should automatically install the
3437
**Windows x64:** `pnpm add @rush-fs/rush-fs-win32-x64-msvc`
3538
**Linux x64 (glibc):** `pnpm add @rush-fs/rush-fs-linux-x64-gnu`
3639

40+
**Migration from `rush-fs`:** The package was renamed to `@rush-fs/core`. See [CHANGELOG.md](./CHANGELOG.md#010-alpha0) for details.
41+
3742
## Usage
3843

3944
```ts
40-
import { readdir, stat, readFile, writeFile, mkdir, rm } from 'rush-fs'
45+
import { readdir, stat, readFile, writeFile, mkdir, rm } from '@rush-fs/core'
4146

4247
// Read directory
4348
const files = await readdir('./src')
@@ -192,7 +197,7 @@ We are rewriting `fs` APIs one by one.
192197
>
193198
> - ✅: Fully Supported
194199
> - 🚧: Partially Supported / WIP
195-
> - ✨: New feature from rush-fs
200+
> - ✨: New feature from @rush-fs/core
196201
> - ❌: Not Supported Yet
197202
198203
### `readdir`

README.zh-CN.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,28 @@
66

77
<p align="center">
88
<img src="https://img.shields.io/badge/Written%20in-Rust-orange?style=flat-square" alt="Written in Rust">
9-
<img src="https://img.shields.io/npm/v/rush-fs?style=flat-square" alt="NPM Version">
10-
<img src="https://img.shields.io/npm/l/rush-fs?style=flat-square" alt="License">
9+
<img src="https://img.shields.io/npm/v/@rush-fs/core?style=flat-square" alt="NPM Version">
10+
<img src="https://img.shields.io/npm/l/@rush-fs/core?style=flat-square" alt="License">
11+
<img src="https://img.shields.io/badge/status-alpha-orange?style=flat-square" alt="Alpha">
1112
<a href="https://github.com/CoderSerio/rush-fs/graphs/contributors"><img src="https://img.shields.io/github/contributors/CoderSerio/rush-fs?style=flat-square" alt="Contributors"></a>
1213
</p>
1314

1415
<p align="center">
1516
与 Node.js <code>fs</code> API 对齐,可无痛替换现有项目中的 fs;在海量文件操作场景下获得数倍于内置 fs 的性能,由 Rust 驱动。
1617
</p>
18+
19+
<p align="center"><strong>⚠️ Alpha:</strong>当前为 <strong>alpha</strong> 版本,在 0.1.0 正式版前 API 与行为可能变更。</p>
1720
</div>
1821

1922
## 安装
2023

2124
```bash
22-
npm install rush-fs
25+
npm install @rush-fs/core
2326
# or
24-
pnpm add rush-fs
27+
pnpm add @rush-fs/core
2528
```
2629

27-
安装 `rush-fs` 时,包管理器会通过 `optionalDependencies` 自动安装**当前平台**的本地绑定(例如 macOS ARM 上的 `@rush-fs/rush-fs-darwin-arm64`)。若未安装或出现「Cannot find native binding」:
30+
安装 `@rush-fs/core` 时,包管理器会通过 `optionalDependencies` 自动安装**当前平台**的本地绑定(例如 macOS ARM 上的 `@rush-fs/rush-fs-darwin-arm64`)。若未安装或出现「Cannot find native binding」:
2831

2932
1. 删除 `node_modules` 和锁文件(`package-lock.json``pnpm-lock.yaml`)后重新执行 `pnpm install`(或 `npm i`)。
3033
2. 或手动安装对应平台包:
@@ -33,10 +36,12 @@ pnpm add rush-fs
3336
**Windows x64:** `pnpm add @rush-fs/rush-fs-win32-x64-msvc`
3437
**Linux x64 (glibc):** `pnpm add @rush-fs/rush-fs-linux-x64-gnu`
3538

39+
**`rush-fs` 迁移:** 自 0.1.0-alpha 起主包更名为 `@rush-fs/core`,详见 [CHANGELOG.md](./CHANGELOG.md#010-alpha0)
40+
3641
## 用法
3742

3843
```ts
39-
import { readdir, stat, readFile, writeFile, mkdir, rm } from 'rush-fs'
44+
import { readdir, stat, readFile, writeFile, mkdir, rm } from '@rush-fs/core'
4045

4146
// 读取目录
4247
const files = await readdir('./src')
@@ -191,7 +196,7 @@ graph TD
191196
>
192197
> - ✅:完全支持
193198
> - 🚧:部分支持 / 开发中
194-
> - ✨:rush-fs 的新增能力
199+
> - ✨:@rush-fs/core 的新增能力
195200
> - ❌:暂未支持
196201
197202
### `readdir`

docs/content/about.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Rush-FS is an API-aligned, drop-in replacement for the Node.js `fs` module, powe
55
## Links
66

77
- [GitHub](https://github.com/CoderSerio/rush-fs)
8-
- [npm](https://www.npmjs.com/package/rush-fs)
8+
- [npm](https://www.npmjs.com/package/@rush-fs/core)
99
- [API Overview](/api)
1010
- [Benchmarks](/benchmarks)
1111

docs/content/api/access.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Check whether the process can access a file with the given mode (F_OK, R_OK, W_O
55
## Basic usage
66

77
```ts
8-
import { access } from 'rush-fs'
8+
import { access } from '@rush-fs/core'
99
import { constants } from 'node:fs'
1010

1111
await access('./file.txt') // F_OK default

docs/content/api/append-file.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Append data to a file, creating the file if it does not exist.
55
## Basic usage
66

77
```ts
8-
import { appendFile } from 'rush-fs'
8+
import { appendFile } from '@rush-fs/core'
99

1010
await appendFile('./log.txt', 'new line\n')
1111
await appendFile('./log.txt', buffer, { encoding: 'utf8', mode: 0o644 })

docs/content/api/chmod.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Change the permissions of a file or directory (mode bits).
55
## Basic usage
66

77
```ts
8-
import { chmod } from 'rush-fs'
8+
import { chmod } from '@rush-fs/core'
99

1010
await chmod('./script.sh', 0o755)
1111
await chmod('./file.txt', 0o644)

docs/content/api/chown.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Change the owner and group of a file or directory (Unix). On Windows this is a n
55
## Basic usage
66

77
```ts
8-
import { chown } from 'rush-fs'
8+
import { chown } from '@rush-fs/core'
99

1010
await chown('./file', uid, gid)
1111
```

0 commit comments

Comments
 (0)