Skip to content

Commit ec97c46

Browse files
authored
Merge pull request #3 from thanhdevapp/dev-mvp
Dev mvp
2 parents d84a7fb + b7571b0 commit ec97c46

File tree

189 files changed

+44242
-203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+44242
-203
lines changed

.github/workflows/ci.yml

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ name: CI
22

33
on:
44
push:
5-
branches: [main, dev-mvp]
5+
branches: [main, dev-mvp, feat/wails-v2-migration]
66
pull_request:
7-
branches: [main]
7+
branches: [main, dev-mvp]
88

99
jobs:
10-
build:
10+
# Backend tests (Go)
11+
backend:
12+
name: Backend Tests
1113
runs-on: ubuntu-latest
1214
steps:
1315
- uses: actions/checkout@v4
@@ -23,7 +25,53 @@ jobs:
2325
- name: Test
2426
run: go test -v ./...
2527

28+
# Frontend tests (React + TypeScript)
29+
frontend:
30+
name: Frontend Tests
31+
runs-on: ubuntu-latest
32+
defaults:
33+
run:
34+
working-directory: ./frontend
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: Setup Node.js
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: '18'
42+
cache: 'npm'
43+
cache-dependency-path: './frontend/package-lock.json'
44+
45+
- name: Install dependencies
46+
run: npm ci
47+
48+
- name: Run TypeScript check
49+
run: npx tsc --noEmit
50+
51+
- name: Run tests
52+
run: npm run test:run
53+
54+
- name: Generate coverage report
55+
run: npm run test:coverage
56+
57+
- name: Upload coverage to Codecov
58+
uses: codecov/codecov-action@v4
59+
with:
60+
directory: ./frontend/coverage
61+
flags: frontend
62+
token: ${{ secrets.CODECOV_TOKEN }}
63+
fail_ci_if_error: false
64+
65+
- name: Upload coverage artifacts
66+
uses: actions/upload-artifact@v4
67+
with:
68+
name: coverage-report
69+
path: ./frontend/coverage
70+
retention-days: 7
71+
72+
# Linting
2673
lint:
74+
name: Go Lint
2775
runs-on: ubuntu-latest
2876
steps:
2977
- uses: actions/checkout@v4

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
go-version: '1.21'
2424

2525
- name: Run tests
26-
run: go test ./...
26+
run: go test ./cmd/... ./internal/... ./pkg/...
2727

2828
- name: Run GoReleaser
2929
uses: goreleaser/goreleaser-action@v5

.github/workflows/update-docs.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: Update Documentation
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
description: 'Version to update to (e.g., v1.0.1)'
10+
required: true
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
update-docs:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Get version
25+
id: version
26+
run: |
27+
if [ "${{ github.event_name }}" = "release" ]; then
28+
VERSION="${{ github.event.release.tag_name }}"
29+
else
30+
VERSION="${{ github.event.inputs.version }}"
31+
fi
32+
33+
# Remove 'v' prefix if present
34+
VERSION_NUMBER="${VERSION#v}"
35+
36+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
37+
echo "version_number=${VERSION_NUMBER}" >> $GITHUB_OUTPUT
38+
echo "Updating to version: ${VERSION}"
39+
40+
- name: Update INSTALL.md
41+
run: |
42+
VERSION="${{ steps.version.outputs.version }}"
43+
VERSION_NUMBER="${{ steps.version.outputs.version_number }}"
44+
45+
# Update version in download links
46+
sed -i "s|v[0-9]\+\.[0-9]\+\.[0-9]\+|${VERSION}|g" INSTALL.md
47+
sed -i "s|dev-cleaner_[0-9]\+\.[0-9]\+\.[0-9]\+|dev-cleaner_${VERSION_NUMBER}|g" INSTALL.md
48+
49+
# Update "Latest Release" header
50+
sed -i "s|Latest Release: v[0-9]\+\.[0-9]\+\.[0-9]\+|Latest Release: ${VERSION}|" INSTALL.md
51+
52+
# Update last updated date
53+
sed -i "s|Last updated:.*|Last updated: $(date +%Y-%m-%d)|" INSTALL.md
54+
55+
# Update expected version output
56+
sed -i "s|dev-cleaner version [0-9]\+\.[0-9]\+\.[0-9]\+|dev-cleaner version ${VERSION_NUMBER}|g" INSTALL.md
57+
58+
- name: Update README.md
59+
run: |
60+
VERSION="${{ steps.version.outputs.version }}"
61+
VERSION_NUMBER="${{ steps.version.outputs.version_number }}"
62+
63+
# Update Homebrew section - remove "Coming Soon"
64+
sed -i 's|### Homebrew (Coming Soon)|### Homebrew (Recommended)|' README.md
65+
66+
# Add version badge if not exists
67+
if ! grep -q "Version" README.md; then
68+
sed -i '/\[!\[License\]/a [![Version](https://img.shields.io/badge/Version-'${VERSION_NUMBER}'-blue?style=flat-square)](https://github.com/thanhdevapp/mac-dev-cleaner-cli/releases/latest)' README.md
69+
else
70+
# Update existing version badge
71+
sed -i "s|Version-[0-9]\+\.[0-9]\+\.[0-9]\+|Version-${VERSION_NUMBER}|" README.md
72+
fi
73+
74+
# Update build instructions to use correct path
75+
sed -i 's|go build -o dev-cleaner \.|go build -o dev-cleaner ./cmd/dev-cleaner|' README.md
76+
77+
# Add direct download section if not exists
78+
if ! grep -q "Direct Download" README.md; then
79+
# Add after Homebrew section
80+
sed -i '/brew install dev-cleaner/a \\n### Direct Download\n\nDownload pre-built binaries: [INSTALL.md](INSTALL.md)' README.md
81+
fi
82+
83+
- name: Check for changes
84+
id: check_changes
85+
run: |
86+
if git diff --quiet INSTALL.md README.md; then
87+
echo "has_changes=false" >> $GITHUB_OUTPUT
88+
echo "No changes detected"
89+
else
90+
echo "has_changes=true" >> $GITHUB_OUTPUT
91+
echo "Changes detected:"
92+
git diff INSTALL.md README.md
93+
fi
94+
95+
- name: Commit and push
96+
if: steps.check_changes.outputs.has_changes == 'true'
97+
run: |
98+
VERSION="${{ steps.version.outputs.version }}"
99+
100+
git config --local user.email "[email protected]"
101+
git config --local user.name "goreleaserbot"
102+
103+
git add INSTALL.md README.md
104+
git commit -m "docs: Update installation docs to ${VERSION}"
105+
git push
106+
107+
- name: Summary
108+
run: |
109+
VERSION="${{ steps.version.outputs.version }}"
110+
echo "## Documentation Update Complete" >> $GITHUB_STEP_SUMMARY
111+
echo "" >> $GITHUB_STEP_SUMMARY
112+
echo "Updated to version: **${VERSION}**" >> $GITHUB_STEP_SUMMARY
113+
echo "" >> $GITHUB_STEP_SUMMARY
114+
115+
if [ "${{ steps.check_changes.outputs.has_changes }}" = "true" ]; then
116+
echo "✅ INSTALL.md and README.md updated" >> $GITHUB_STEP_SUMMARY
117+
else
118+
echo "ℹ️ No changes needed" >> $GITHUB_STEP_SUMMARY
119+
fi

.gitignore

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ GoogleService-Info.plist
5858

5959
repomix-output.xml
6060
.serena/cache
61-
plans/**/*
6261
!plans/templates/*
6362
screenshots/*
6463
docs/screenshots/*
@@ -77,6 +76,18 @@ dev-cleaner
7776
.claude/settings.bak.json
7877
.claude
7978
CLAUDE.md
79+
80+
# Project-specific
81+
design-mockups
82+
/plans/templates/
83+
84+
# IDE
85+
/.idea/git_toolbox_prj.xml
86+
/.idea/mac-dev-cleaner-cli.iml
87+
/.idea/modules.xml
88+
/.idea/vcs.xml
89+
90+
# Frontend node_modules (for Wails GUI)
91+
frontend/node_modules
8092
plans
81-
docs
82-
design-mockups
93+
docs

.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ before:
88

99
builds:
1010
- id: dev-cleaner
11-
main: ./main.go
11+
main: ./cmd/dev-cleaner/main.go
1212
binary: dev-cleaner
1313
env:
1414
- CGO_ENABLED=0

.idea/.gitignore

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# Changelog
2+
3+
All notable changes to Mac Dev Cleaner will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.0.1] - 2025-12-16
9+
10+
### Added
11+
- **7 New Scanner Types** - Expand ecosystem support beyond iOS, Android, and Node.js
12+
- **Flutter/Dart Scanner** - Clean build artifacts (.dart_tool, build/, .pub-cache)
13+
- **Go Scanner** - Clean module cache (GOMODCACHE) and build cache (GOCACHE)
14+
- **Python Scanner** - Clean pip, poetry, uv caches, virtualenvs, and __pycache__
15+
- **Rust Scanner** - Clean cargo registry (.cargo/registry), git cache, and target directories
16+
- **Homebrew Scanner** - Clean Homebrew download caches
17+
- **Docker Scanner** - Clean unused images, containers, volumes, and build cache
18+
- **Java/Kotlin Scanner** - Clean Maven (.m2), Gradle caches, and build directories
19+
- **Enhanced TUI** - Updated interface to display all 10 scanner types
20+
- **Comprehensive Documentation** - Added detailed docs for all scanner types
21+
- **Integration Testing** - Verified all scanners work individually and combined
22+
23+
### Changed
24+
- **Scanner Architecture** - Unified scanner interface for better extensibility
25+
- **Command Flags** - Added 7 new flags (--flutter, --go, --python, --rust, --homebrew, --docker, --java)
26+
- **Help Text** - Updated documentation showing all 10 supported ecosystems
27+
- **Version Number** - Bumped from "dev" to 1.0.1
28+
29+
### Technical Details
30+
- **Files Changed:** 69 files (+27,878 lines, -120 lines)
31+
- **New Scanner Files:** 7 implementations (940 lines of Go code)
32+
- **Test Coverage:** All unit tests passing (cleaner: 19.8%, scanner: 3.6%, ui: 8.7%)
33+
- **Integration Tests:** Successfully scanned 35 items totaling 43.2 GB across all scanner types
34+
35+
### Performance
36+
- **Scan Speed:** No degradation with additional scanners
37+
- **Memory Usage:** Efficient scanning of large codebases
38+
- **TUI Responsiveness:** Smooth navigation with 35+ items
39+
40+
### Breaking Changes
41+
None - fully backward compatible with v1.0.0
42+
43+
### Migration Guide
44+
No migration needed. New scanner types are automatically available via flags:
45+
```bash
46+
# Scan specific ecosystems
47+
dev-cleaner scan --flutter
48+
dev-cleaner scan --go
49+
dev-cleaner scan --python
50+
dev-cleaner scan --java
51+
52+
# Scan all (including new types)
53+
dev-cleaner scan --all
54+
```
55+
56+
---
57+
58+
## [1.0.0] - 2025-12-15
59+
60+
### Added
61+
- Initial release with iOS, Android, and Node.js support
62+
- Interactive TUI with keyboard navigation
63+
- Safety checks and confirmation dialogs
64+
- Homebrew installation support
65+
- Comprehensive documentation
66+
67+
### Features
68+
- Xcode DerivedData, Archives, and cache cleaning
69+
- Android Gradle cache and SDK artifacts cleaning
70+
- Node.js node_modules and package manager caches
71+
- Interactive TUI with ncdu-style navigation
72+
- Safety validation before deletion
73+
- Real-time size calculations
74+
- Keyboard shortcuts (vim bindings)
75+
76+
### Technical Details
77+
- Go 1.21+ required
78+
- Cobra CLI framework
79+
- Bubble Tea TUI library
80+
- Cross-platform compatibility (macOS focused)
81+
82+
---
83+
84+
## Release Notes
85+
86+
### v1.0.1 Summary
87+
88+
This release significantly expands Mac Dev Cleaner's ecosystem support, adding **7 new scanner types** to the existing iOS, Android, and Node.js scanners. With this update, Mac Dev Cleaner now supports **10 development ecosystems**, making it a comprehensive tool for cleaning development artifacts across multiple programming languages and platforms.
89+
90+
**Key Highlights:**
91+
-**10 Total Scanners** - Flutter, Go, Python, Rust, Homebrew, Docker, Java + existing 3
92+
-**Zero Breaking Changes** - Fully backward compatible
93+
-**Production Ready** - All tests passing, comprehensive testing done
94+
-**Well Documented** - Updated help text and documentation
95+
96+
**Testing Results:**
97+
- 35 items scanned across all ecosystems
98+
- 43.2 GB total cleanable space detected
99+
- All scanner types verified operational
100+
- Integration tests passed
101+
102+
**Upgrade Path:**
103+
Simply update to v1.0.1 - no configuration changes needed. New scanners are immediately available through command-line flags.
104+
105+
---
106+
107+
## Links
108+
109+
- [Homepage](https://github.com/thanhdevapp/dev-cleaner)
110+
- [Installation Guide](README.md#installation)
111+
- [Usage Documentation](README.md#usage)
112+
- [Contributing](CONTRIBUTING.md)
113+
- [License](LICENSE)
114+
115+
---
116+
117+
## Version History
118+
119+
- **v1.0.1** (2025-12-16) - Multi-ecosystem scanner support
120+
- **v1.0.0** (2025-12-15) - Initial release
121+
122+
---
123+
124+
*For detailed commit history, see [GitHub Releases](https://github.com/thanhdevapp/dev-cleaner/releases)*

0 commit comments

Comments
 (0)