feat(cli): split commit and release into target-based workflows
This commit is contained in:
+15
-17
@@ -38,7 +38,7 @@ The format module is responsible for project standardization:
|
||||
2. **copy** - File copying with glob patterns (fully implemented)
|
||||
3. **gitignore** - Creates/updates .gitignore from templates
|
||||
4. **license** - Checks dependency licenses for compatibility
|
||||
5. **npmextra** - Manages project metadata and configuration
|
||||
5. **smartconfig** - Manages project metadata and configuration
|
||||
6. **packagejson** - Formats and updates package.json
|
||||
7. **prettier** - Applies code formatting with batching
|
||||
8. **readme** - Ensures readme files exist
|
||||
@@ -89,28 +89,26 @@ The format module is responsible for project standardization:
|
||||
5. **Performance Optimizations**: Parallel execution and caching
|
||||
6. **Reporting**: Diff views, statistics, verbose logging
|
||||
7. **Architecture**: Clean separation of concerns with new classes
|
||||
8. **Unified Version Bumping**: Self-managed version updates eliminating npm warning pollution in deno.json
|
||||
8. **Split Commit/Release Workflows**: `commit` creates source commits; `release` owns versioning, tags, and artifact publishing
|
||||
|
||||
### Version Bumping Refactor (Latest)
|
||||
### Commit/Release Workflow Refactor (Latest)
|
||||
|
||||
The commit module's version bumping has been refactored to eliminate npm command dependencies:
|
||||
The commit module no longer bumps versions, creates tags, or publishes packages. Release work now belongs to `gitzone release`:
|
||||
|
||||
**Changes:**
|
||||
|
||||
- Removed `bumpNpmVersion()` - was causing npm warnings to pollute deno.json
|
||||
- Removed `syncVersionToDenoJson()` - no longer needed with unified approach
|
||||
- Removed separate `bumpDenoVersion()` - replaced by unified implementation
|
||||
- Added `readCurrentVersion()` helper - reads from either package.json or deno.json
|
||||
- Added `updateVersionFile()` helper - updates JSON files directly
|
||||
- Unified `bumpProjectVersion()` - handles npm/deno/both with single clean code path
|
||||
- `gitzone commit` analyzes changes, updates `changelog.md` `Pending`, commits, and optionally pushes.
|
||||
- `gitzone release` reads `Pending`, bumps versions, moves changelog entries into a version section, tags, pushes, and publishes configured artifacts.
|
||||
- Commit workflow steps are configured in `.smartconfig.json` under `@git.zone/cli.commit.steps`.
|
||||
- Smartconfig schema versioning lives at `@git.zone/cli.schemaVersion`; run `gitzone config migrate <version>` for targeted migrations.
|
||||
- Release publishing is target-based under `@git.zone/cli.release.targets`.
|
||||
- NPM registries only live under `@git.zone/cli.release.targets.npm.registries`.
|
||||
|
||||
**Benefits:**
|
||||
|
||||
- No npm warning pollution in version fields
|
||||
- Full control over version bumping process
|
||||
- Simpler git history (no amending, no force-tagging)
|
||||
- Same code path for all project types
|
||||
- Reuses existing `calculateNewVersion()` function
|
||||
- Commit is safer and has no publishing side effects.
|
||||
- Multiple source commits can accumulate into one release via `Pending`.
|
||||
- Per-artifact release results can distinguish published, already-published, skipped, and failed targets.
|
||||
|
||||
### Auto-Accept Flag for Commits
|
||||
|
||||
@@ -219,7 +217,7 @@ gitzone format --detailed
|
||||
# Inspect config for agents and scripts
|
||||
gitzone config show --json
|
||||
gitzone config set cli.output json
|
||||
gitzone config get release.accessLevel
|
||||
gitzone config get release.targets.npm.accessLevel
|
||||
```
|
||||
|
||||
## Common Issues (Now Resolved)
|
||||
@@ -291,7 +289,7 @@ All sync methods must become async. Functions that were previously synchronous (
|
||||
**Affected Modules:**
|
||||
|
||||
- ts/mod_format/\* (largest area - 15+ files)
|
||||
- ts/mod_commit/\* (version bumping)
|
||||
- ts/mod_commit/\* and ts/mod_release/\* (commit/release workflows)
|
||||
- ts/mod_services/\* (configuration management)
|
||||
- ts/mod_meta/\* (meta repository management)
|
||||
- ts/mod_standard/\* (template listing)
|
||||
|
||||
Reference in New Issue
Block a user