Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .changeset/little-plants-search.md

This file was deleted.

25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# codeowners-git

## 2.1.0

### Minor Changes

- 9dab921: Add `--dry-run` and `--json` flags for all major commands

### New Features

- **`--dry-run` flag** — Available on `branch`, `multi-branch`, and `extract` commands. Shows a complete preview of what would happen (files, branches, commit messages, settings) without performing any git operations.

- **`--json` flag** — Available on `list`, `branch`, `multi-branch`, and `extract` commands. Outputs machine-readable JSON to stdout and suppresses all human-readable log messages. Works with both normal execution and `--dry-run` mode.

### Details

- **`list --json`**: Outputs `{ command, files, filters }` or `{ command, grouped, filters }` when used with `--group`
- **`branch --dry-run`**: Shows owner, branch name, branch existence, commit message, matched/excluded files, and push/PR/flag settings
- **`branch --json`**: Outputs branch result with success status, files, push state, and PR info
- **`multi-branch --dry-run`**: Shows per-owner breakdown (branch, message, files), uncovered files, unowned files, and summary totals
- **`multi-branch --json`**: Outputs aggregate results with per-owner success/failure details
- **`extract --dry-run`**: Shows source, compare target, files to extract, excluded files, and filter settings
- **`extract --json`**: Outputs extracted file list and source metadata
- Silent mode suppresses all `console.log/warn/error` output when `--json` is active; JSON is written via saved original `console.log`
- `pushBranch` in `git.ts` supports a `silent` option to switch `stdio` from `"inherit"` to `"pipe"`, preventing output leaks during JSON mode
- `recover` command is intentionally excluded from both flags (interactive with prompts)

## 2.0.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codeowners-git",
"version": "2.0.2",
"version": "2.1.0",
"module": "src/cli.ts",
"type": "module",
"private": false,
Expand Down