Skip to content

feat: semver ranges, lockfile, and package aliases - #33

Merged
clawdeeo merged 1 commit into
mainfrom
feat/v0.4.0-roadmap
Apr 23, 2026
Merged

feat: semver ranges, lockfile, and package aliases#33
clawdeeo merged 1 commit into
mainfrom
feat/v0.4.0-roadmap

Conversation

@clawdeeo

@clawdeeo clawdeeo commented Apr 23, 2026

Copy link
Copy Markdown
Collaborator

v0.4.0 — Dependency Management

Three new features for reproducible and convenient package management.

Semver ranges

Install with version constraints instead of just "latest":

gitclaw install BurntSushi/ripgrep \"^14\"
gitclaw install sharkdp/fd \"~10.2\" 
gitclaw install owner/repo \">=2.0.0\"

Lockfile

Reproducible installs across machines:

gitclaw lock              # generates gitclaw.lock
gitclaw install --locked  # installs exact versions from lockfile

Lockfile format (TOML):

[[package]]
owner = \"sharkdp\"
repo = \"bat\"
version = \"v0.24.0\"
asset = \"bat-v0.24.0-x86_64-unknown-linux-gnu.tar.gz\"

Package aliases

Short names for frequently used packages:

gitclaw alias add rg BurntSushi/ripgrep
gitclaw install rg                    # resolves alias
gitclaw alias list                    # show all aliases
gitclaw alias remove rg               # delete alias

Aliases work in install, uninstall, and run commands. Includes clash detection when alias names conflict with repo names.

Changes

  • New modules: src/core/semver.rs, src/core/lockfile.rs, src/core/alias.rs
  • New integration tests: tests/semver.rs, tests/lockfile.rs, tests/alias.rs
  • Added dependency: semver = \"1\"
  • Version bumped to 0.4.0

Quality

  • 121 tests pass
  • Clippy clean (-D warnings)
  • cargo fmt clean

Ready for review.

@clawdeeo clawdeeo changed the title spec: v0.4.0 roadmap feat: v0.4.0 dependency management Apr 23, 2026
@clawdeeo
clawdeeo force-pushed the feat/v0.4.0-roadmap branch from e02e503 to 31b3eec Compare April 23, 2026 17:37
Three new features for reproducible and convenient package management:

**Semver ranges**
- Install with version constraints: ^, ~, >=, <=, >, <
- Example: gitclaw install BurntSushi/ripgrep "^14"

**Lockfile**
- gitclaw lock - generates gitclaw.lock from installed packages
- gitclaw install --locked - reproduces exact versions from lockfile
- TOML format with owner/repo/version/asset

**Package aliases**
- gitclaw alias add rg BurntSushi/ripgrep
- gitclaw alias remove rg / gitclaw alias list
- Aliases resolve in install, uninstall, and run commands
- Clash detection: warns when alias name matches installed repo
- Clash detection: warns when installing repo whose name matches alias

**Spec and workflow improvements**
- Added .specs/v0.4.0-roadmap.md with acceptance criteria
- Updated TEMPLATE.md: lightweight path for small fixes
- Deliverable-based checkpoints instead of percentages
- Post-mortem lessons go to AGENTS.md for persistence
- Specs tracked in git, archived after merge
- Definition of Done: explicit local test gate before push

**Files added**
- src/core/semver.rs - VersionConstraint parsing and matching
- src/core/lockfile.rs - Lockfile struct and TOML serialization
- src/core/alias.rs - AliasMap CRUD and resolution
- tests/semver.rs, tests/lockfile.rs, tests/alias.rs - integration tests
- .specs/v0.4.0-roadmap.md - feature specification

**Dependencies**
- semver = "1" for version constraint parsing

121 tests pass, clippy clean, fmt clean
@clawdeeo
clawdeeo force-pushed the feat/v0.4.0-roadmap branch from 31b3eec to 5099c55 Compare April 23, 2026 18:53
@clawdeeo clawdeeo changed the title feat: v0.4.0 dependency management feat: semver ranges, lockfile, and package aliases Apr 23, 2026
@clawdeeo
clawdeeo merged commit affd425 into main Apr 23, 2026
4 checks passed
@clawdeeo
clawdeeo deleted the feat/v0.4.0-roadmap branch April 23, 2026 19:15
clawdeeo added a commit that referenced this pull request Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant