Skip to content

Conversation

@taras
Copy link
Member

@taras taras commented Jan 21, 2026

Motivation

The effection www codebase contains useful utilities for managing git worktrees, clones, and repository tags that would be valuable as a reusable package. This extracts those utilities into @effectionx/project-repo for use in documentation sites, build tools, and other projects that need to work with multiple repository versions.

Approach

Created a new @effectionx/project-repo package with the following features:

  • Worktrees: initWorktrees() and useWorktree() for managing git worktrees to check out multiple refs simultaneously
  • Clones: initClones() and useClone() for cloning and caching GitHub repositories
  • Repository: createRepo() abstraction for querying git tags with regex patterns and finding latest semver versions
  • Semver: extractVersion() and findLatestSemverTag() utilities for working with version strings

The package depends on @effectionx/process for shell execution and @effectionx/fs for filesystem operations. All operations are Effection generators with proper structured concurrency.

Tests cover all functionality including real git worktree creation and tag listing against the effectionx repository itself.

Extract git worktree, clone, and repository tag utilities from the
effection www codebase into a reusable package for managing project
repositories with structured concurrency.
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 21, 2026

Open in StackBlitz

npm i https://pkg.pr.new/thefrontside/effectionx/@effectionx/project-repo@131

commit: 363eaa0

taras added 2 commits January 21, 2026 07:16
- Add cwd option to initWorktrees and createRepo to specify which git
  repository to operate on
- Create self-contained test git repos in beforeAll hooks so tests
  don't depend on the effectionx repo or CI environment
- Tests now work in shallow clones and any CI environment
Windows paths contain backslashes which get interpreted as escape
characters when passed to shell commands. Quoting the paths prevents
this issue.
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.

2 participants