← 全部工具

nolindnaidoo/versions-le

热度 65 更新于 开发与构建

Find where one dependency is constrained differently across a repository's manifests

githubauto-collected

安装

暂未验证可直接使用的安装命令,请查看项目官方文档或 Release。

<p align="center" <img src="https://raw.githubusercontent.com/nolindnaidoo/versions-le/main/assets/icon.png" alt="Versions-LE logo" width="96" height="96"/ </p <h1 align="center"Versions-LE</h1 <p align="center" <bFind where the same dependency is constrained differently across a repository's manifests</b<br/ <iand refuse, loudly, on any grammar it cannot model</i </p

<p align="center" <a href="https://crates.io/crates/versions-le" <img src="https://img.shields.io/crates/v/versions-le?style=for-the-badge&label=Rust%20CLI&color=blue&logo=rust" alt="versions-le on crates.io" / </a <a href="https://crates.io/crates/versions-le" <img src="https://img.shields.io/crates/d/versions-le?style=for-the-badge&label=Downloads&color=blue" alt="crates.io downloads" / </a <a href="https://github.com/nolindnaidoo/versions-le/actions/workflows/ci-crate.yml" <img src="https://img.shields.io/github/actions/workflow/status/nolindnaidoo/versions-le/ci-crate.yml?branch=main&style=for-the-badge&label=CI&color=blue&logo=githubactions&logoColor=white" alt="CI" / </a <a href="https://github.com/nolindnaidoo/versions-le/blob/main/crate/Cargo.toml" <img src="https://img.shields.io/badge/rustc-1.88+-blue?style=for-the-badge&logo=rust" alt="MSRV: Rust 1.88+" / </a <a href="https://github.com/nolindnaidoo/versions-le/blob/main/LICENSE" <img src="https://img.shields.io/badge/license-MIT-blue?style=for-the-badge" alt="MIT licensed" / </a <a href="https://letools.dev/tools/versions-le" <img src="https://img.shields.io/badge/LE%20Tools-letools.dev-blue?style=for-the-badge" alt="LE Tools" / </a </p

---

<p align="center" <img src="https://raw.githubusercontent.com/nolindnaidoo/versions-le/main/assets/demo.gif" alt="Versions-LE demo — the real binary, recorded by assets/demo.tape" style="max-width: 100%; height: auto;" / </p

Useful? A star is how other developers find it — ★ GitHub · letools.dev/tools/versions-le

What it does

One question, asked across every manifest in a tree rather than one file at a time: do these manifests agree about what version of anything this repository depends on?

The build broke because api asks for regex = "1" and web asks for regex = "2", and no one version satisfies both. Or it did not break, and will: CI has run on 1.80 since March while rust-version says 1.88.

versions-le .
error cargo: regex ("1" (api/Cargo.toml) and "2" (web/Cargo.toml) cannot both be satisfied by one version) [api/Cargo.toml, web/Cargo.toml]
warning cargo: serde (constrained 2 different ways across 2 files: 1, 1.0.200) [api/Cargo.toml, web/Cargo.toml]
warning ci: rust (CI builds on 1.80.0, below the declared minimum 1.88.0 in api/Cargo.toml) [.github/workflows/ci.yml, api/Cargo.toml]
info ci: node (an unpinned tool version installs whatever is newest that day) [.github/workflows/ci.yml]
info npm: left-pad (a dist tag resolves to whatever is newest at install time) [package.json]
refused cross_ecosystem regex: appears in cargo and npm; different ecosystems name different things, so these were not compared [api/Cargo.toml, package.json]
refused unknown_grammar left-pad: a dist tag is a moving target, not a version range; excluded from comparison [package.json]
refused unknown_grammar node: a channel name is a moving target, not a version; excluded from comparison [.github/workflows/ci.yml]
refused unknown_grammar shared: an inherited workspace dependency carries its version elsewhere; excluded from comparison [web/Cargo.toml]
5 findings across 4 manifests — 1 error, 2 warning, 2 info

Exit code 1. The build stops before the deploy does.

That is stderr — the human half. stdout carries one JSON report for the whole run, and there is no --json flag: one mode, nothing to misremember, and the human summary is a projection of the same report so the two cannot drift.

The exit code is the product

| Code | Means | |---|---| | 0 | Nothing above info. Also 0 when there are no manifests at all — nothing can be in conflict with nothing, and failing a build over that would be the tool inventing a problem. | | 1 | Findings. | | 2 | The question was malformed — an unknown flag, an unknown ecosystem, a path that does not exist — or --strict and part of the tree went unanalysed. |

One unreadable manifest in fifty is not exit 2. It is named on stderr, carried in the report's diagnostics, and the manifests that did parse still answer.

Install

cargo install versions-le

Or build it from source: