Skip to content

Conversation

@ceritium
Copy link
Contributor

No description provided.

ceritium and others added 4 commits December 31, 2025 10:05
Add a new `check` command that verifies stacktodate.yml matches detected versions:

- Reads stacktodate.yml and detects current project versions
- Compares only manifest items (ignores extra detected technologies)
- Reports matches, mismatches, and missing manifest entries
- Supports text (human-readable) and JSON output formats
- Exits with code 0 if all manifest versions match, 1 if differences found
- Perfect for CI/CD pipelines to ensure declared tech stack is up to date

Features:
- Reuses existing detection and comparison logic
- Comprehensive test suite with 6 test cases
- Clear output showing exact differences
- JSON output for machine parsing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
Replace endoflife.date API calls with stacktodate.club API and implement
a 24-hour cache for the product catalog to improve performance and reduce
API calls during version detection.

Changes:
- Add cache module (cmd/lib/cache/cache.go) with GetAPIURL() utility
- Implement daily caching of products from stacktodate.club API
- Add fetch-catalog command for manual cache updates
- Update detect.go to use cached data instead of API calls
- Auto-fetch cache on first use if not present or stale
- Extract GetAPIURL() to cache package (used by push and cache)

Benefits:
- Reduces API calls from multiple per detection to one per 24 hours
- Enables offline operation after initial cache
- Consistent API URL configuration via STD_API_URL environment variable

🤖 Generated with Claude Code

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
Create cmd/helpers package to consolidate repeated patterns across commands
and reduce code duplication by ~200 lines while improving consistency.

New helpers package includes:
- error.go: Centralized error handling with ExitWithError() and ExitOnError()
- config.go: Config/StackEntry types and LoadConfig() functions
- fs.go: Filesystem utilities (WithWorkingDir, ResolveAbsPath, GetConfigDir)
- env.go: Environment variable utilities (GetEnvRequired, GetEnvOrDefault)

Updated commands to use helpers:
- init.go: Move Config types to helpers, use WithWorkingDir, ExitOnError
- check.go: Use LoadConfig, WithWorkingDir, ExitOnError, helpers.StackEntry
- update.go: Use LoadConfig, WithWorkingDir, ExitOnError, helpers.StackEntry
- push.go: Use LoadConfig, GetEnvRequired, ExitOnError, helpers.StackEntry
- fetch_catalog.go: Use ExitOnError for error handling
- autodetect.go: Use WithWorkingDir, ExitOnError
- root.go: Use ExitWithError for error handling
- check_test.go: Update tests to use helpers.StackEntry

Benefits:
- Consistent error handling with standardized exit codes
- Single source of truth for config loading and validation
- Cleaner directory context management
- Better code reusability and maintainability
- All tests passing, build successful

🤖 Generated with Claude Code

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
Upgrade from outdated Go 1.21/1.22 to the currently supported versions (1.24 and 1.25). This ensures the project benefits from latest security patches and language features.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Haiku 4.5 <[email protected]>
@ceritium ceritium merged commit 17c48c9 into master Dec 31, 2025
2 checks passed
@ceritium ceritium deleted the products-from-stacktodate branch December 31, 2025 22:39
ceritium added a commit that referenced this pull request Jan 2, 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.

2 participants