Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ jobs:
run: cargo fmt --all -- --check

- name: Run Clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings

- name: Run Rust tests
run: cargo test --workspace --all-features
run: cargo test --workspace --all-features --locked

- name: Test curl installer without network or runtime installation
run: sh scripts/tests/install_sh_test.sh
Expand All @@ -72,7 +72,7 @@ jobs:
- name: Keep the shim dependency graph lightweight
shell: bash
run: |
cargo tree -p pinset-shim -e normal > shim-dependencies.txt
cargo tree -p pinset-shim -e normal --locked > shim-dependencies.txt
if grep -E 'reqwest|rustls|tar v|xz2|zip v|tempfile' shim-dependencies.txt; then
echo "pinset-shim unexpectedly includes download or archive dependencies" >&2
exit 1
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to Pinset

感谢你帮助改进 Pinset。项目当前开发版本支持 Node、pnpm、Bun、Go、Flutter、Python、Java 与 Rust Provider,优先保证跨平台行为、安全边界和可复现安装。
感谢你帮助改进 Pinset。项目当前开发版本支持 Node、pnpm、Bun、Go、Flutter、Python、Java、Rust.NET Provider,优先保证跨平台行为、安全边界和可复现安装。

## 开发环境

Expand Down
92 changes: 89 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ resolver = "2"
[workspace.package]
edition = "2024"
rust-version = "1.85"
version = "1.0.0"
version = "1.1.0"
authors = ["Future Element"]

[workspace.dependencies]
Expand All @@ -18,13 +18,15 @@ base64 = "0.22"
clap = { version = "4.5", features = ["derive"] }
flate2 = "1"
hex = "0.4"
json5 = "0.4"
fs4 = "1.1.0"
p256 = { version = "0.13", features = ["ecdsa", "pem"] }
pgp = { version = "0.17.0", default-features = false }
reqwest = { version = "0.13.4", default-features = false, features = ["blocking", "brotli", "gzip", "rustls", "system-proxy"] }
semver = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_yaml = "0.9"
same-file = "1"
sha2 = "0.11"
tar = "0.4"
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pinset is a predictable, project-aware runtime version manager for polyglot development.

It manages Node.js, pnpm, Bun, Go, Python, Java, Rust, .NET, and Flutter/Dart through one configuration and lockfile model, without importing state from other runtime managers.
It manages Node.js, pnpm, Bun, Go, Python, Java, Rust, .NET, and Flutter/Dart through one configuration and lockfile model. Traditional version files are read only by the explicit `detect` and `import` migration commands, never as an implicit runtime fallback.

## Highlights

Expand All @@ -19,6 +19,7 @@ It manages Node.js, pnpm, Bun, Go, Python, Java, Rust, .NET, and Flutter/Dart th
- Provider integrity checks, safe extraction, atomic installs, ownership-aware uninstall, and a content-addressed download cache.
- First-class English and Simplified Chinese output, JSON schema 1 for automation, and shell completion.
- Project-owned Python `.venv` support without requiring shell activation.
- Read-only detection and explicit import of repository-local traditional version files.

## Install and upgrade

Expand All @@ -39,7 +40,7 @@ export PATH="$HOME/.local/bin:$PATH"
Run the same installer again to upgrade. To install an exact release or another absolute directory:

```sh
curl -fsSL https://raw.githubusercontent.com/Future-Element/pinset/main/install.sh | sh -s -- --version 1.0.0
curl -fsSL https://raw.githubusercontent.com/Future-Element/pinset/main/install.sh | sh -s -- --version 1.1.0
PINSET_INSTALL_DIR=/opt/pinset/bin sh install.sh
```

Expand Down Expand Up @@ -128,6 +129,15 @@ pinset exec -- node --version

Commit `pinset.toml` and `pinset.lock`. Selectors such as `latest`, `lts`, `stable`, or a version prefix are resolved to exact versions in the lockfile.

To migrate an existing repository, inspect traditional files locally first, then import and install their unambiguous selections:

```sh
pinset detect --json
pinset import
```

`detect` never uses the network or writes files. `import --no-install` writes the Pinset config and exact lock without downloading runtimes. Pinset scans from the working directory to the nearest Git repository root and does not modify or delete the source files.

Discover available and installed versions:

```sh
Expand Down
14 changes: 12 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pinset 是一个行为可预测、理解项目边界的多语言运行时版本管理器。

它通过统一的配置与锁文件模型管理 Node.js、pnpm、Bun、Go、Python、Java、Rust、.NET 和 Flutter/Dart,并且不会导入其他运行时管理器的状态
它通过统一的配置与锁文件模型管理 Node.js、pnpm、Bun、Go、Python、Java、Rust、.NET 和 Flutter/Dart。传统版本文件只会由显式的 `detect` 与 `import` 迁移命令读取,不会成为日常运行时解析的隐式回退来源

## 核心特性

Expand All @@ -19,6 +19,7 @@ Pinset 是一个行为可预测、理解项目边界的多语言运行时版本
- Provider 完整性校验、安全解压、原子安装、带所有权检查的卸载,以及内容寻址下载缓存。
- 原生支持英文和简体中文输出、自动化用 JSON schema 1 与 Shell 补全。
- 支持项目所有的 Python `.venv`,无需激活 Shell 环境。
- 支持只读检测和显式导入仓库内的传统版本配置。

## 安装与升级

Expand All @@ -39,7 +40,7 @@ export PATH="$HOME/.local/bin:$PATH"
再次运行同一安装脚本即可升级。也可以安装指定版本或使用其他绝对目录:

```sh
curl -fsSL https://raw.githubusercontent.com/Future-Element/pinset/main/install.sh | sh -s -- --version 1.0.0
curl -fsSL https://raw.githubusercontent.com/Future-Element/pinset/main/install.sh | sh -s -- --version 1.1.0
PINSET_INSTALL_DIR=/opt/pinset/bin sh install.sh
```

Expand Down Expand Up @@ -128,6 +129,15 @@ pinset exec -- node --version

请提交 `pinset.toml` 和 `pinset.lock`。`latest`、`lts`、`stable` 或版本前缀等选择器会在锁文件中解析为精确版本。

迁移现有仓库时,先在本地检查传统配置,再导入并安装其中无歧义的选择:

```sh
pinset detect --json
pinset import
```

`detect` 不联网、也不写文件。`import --no-install` 会写入 Pinset 配置和精确锁,但不下载运行时。扫描范围从工作目录到最近的 Git 仓库根目录,并且不会修改或删除来源文件。

查看可用版本与已安装版本:

```sh
Expand Down
3 changes: 3 additions & 0 deletions crates/pinset-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ npm-metadata = [
"dep:serde_json",
]
project-write = ["dep:atomic-write-file", "dep:tempfile"]
project-discovery = ["dep:json5", "dep:serde_json", "dep:serde_yaml"]
state-write = ["dep:atomic-write-file"]
sources = [
"dep:atomic-write-file",
Expand All @@ -55,6 +56,7 @@ atomic-write-file = { workspace = true, optional = true }
base64 = { workspace = true, optional = true }
flate2 = { workspace = true, optional = true }
hex = { workspace = true, optional = true }
json5 = { workspace = true, optional = true }
fs4 = { workspace = true, optional = true }
reqwest = { workspace = true, optional = true }
p256 = { workspace = true, optional = true }
Expand All @@ -63,6 +65,7 @@ same-file.workspace = true
semver = { workspace = true, optional = true }
serde.workspace = true
serde_json = { workspace = true, optional = true }
serde_yaml = { workspace = true, optional = true }
sha2 = { workspace = true, optional = true }
tar = { workspace = true, optional = true }
tempfile = { workspace = true, optional = true }
Expand Down
Loading