Skip to content

🎉 v0.1.0 released — parse, compare & range-check semver strings | v0.1.0 发布:语义化版本号工具箱 #1

Description

@TYEclipse

What's inside

Three deterministic tools, zero runtime dependencies (pure logic, no network):

  • semver_parse — split any semver 2.0.0 string into major/minor/patch/prerelease/build, with a precise rejection reason for malformed input (1.2, 1.2.3.4, leading zeros, 1.2.3-01, …)
  • semver_compare — lt/eq/gt with a human verdict; spec-compliant prerelease ordering (1.0.0-beta.11 > 1.0.0-beta.2), build metadata ignored
  • semver_satisfies — npm-style ranges: ^ ~ >= <= > < =, x-ranges, hyphen ranges, || and AND, plus npm's prerelease tuple-lock and an includePrerelease override

Install

dsh plugin --profile web add github:TYEclipse/dsh-semver

28 tests, all anchored on the semver 2.0.0 spec and npm's documented range behavior. MIT.


简介

版本号比较是 LLM 的高频易错点——本插件把 semver 解析/比较/范围匹配变成确定性工具调用。零依赖、纯逻辑、离线可用。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions