-
-
Notifications
You must be signed in to change notification settings - Fork 9
refactor: implement terraform module dependency parser and enhance type system #220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Move types from index.ts to dedicated type files for better organization - Create common.types.ts for shared interfaces like ModuleInfo and ChangeInfo - Create config.types.ts for configuration-related types - Create context.types.ts for workspace context types - Create github.types.ts for GitHub API related types - Create wiki.types.ts for wiki-specific types - Create node-child-process.types.ts for Node.js process types - Update index.ts to re-export all types from dedicated files This refactoring improves code organization and makes types easier to maintain.
- Add new parser.ts with comprehensive Terraform module parsing capabilities - Implement buildModuleDependencyGraph() for tracking local module dependencies - Add getModulesToRelease() to determine release propagation based on dependencies - Enhance TerraformModule class with better change detection and release logic - Add comprehensive test coverage for parser functionality - Add test helpers for terraform module testing - Improve module name normalization and path handling This establishes a solid foundation for dependency-aware module releases and better change detection across the Terraform module ecosystem.
- Update main.ts to use new parser and enhanced module handling - Improve configuration handling with better type safety - Enhance changelog generation with dependency-aware logic - Update pull request commenting with better module information - Improve release and tag management with new module system - Update terraform-docs integration to work with enhanced modules - Enhance wiki functionality with better module organization - Remove deprecated semver utilities in favor of built-in logic - Add new constants and improve file utility functions These changes integrate the new parser system throughout the codebase and improve the overall reliability and maintainability of the action.
- Update changelog tests to work with new module system and dependency tracking - Enhance main.ts tests with better coverage of module parsing and release logic - Improve pull request tests with dependency-aware scenarios - Update release and tag management tests for new module handling - Enhance terraform-docs tests with improved module integration - Significantly expand terraform-module tests with comprehensive coverage - Update wiki tests for new module organization and dependency features - Improve utility tests and remove deprecated semver test file - Add better test fixtures and mocking for complex scenarios These test updates ensure comprehensive coverage of the refactored codebase and provide confidence in the new dependency-aware release system.
- Update action.yml with new input parameters and improved documentation - Update package.json with new development scripts and dependencies - Enhance TypeScript configuration for better type checking - Update .gitignore with additional patterns for development files - Add development scripts for parsing modules and testing workflows - Add test terraform modules (animal, zoo) for comprehensive testing scenarios - Update package-lock.json with new dependency versions These changes improve the development experience and provide better tooling for testing and maintaining the terraform module release system.
…ormModules function
…etReleaseReasons method
f714aa5
to
ca42a1a
Compare
…y; enhance action output handling in main.ts
ca42a1a
to
7fe7870
Compare
📋 Release Plan
📝 Changelog
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes updates to improve the handling of Terraform modules, streamline test cases, and enhance documentation. Key changes include refactoring module-related functions, updating tests to use mock helpers, and clarifying input parameter descriptions in the documentation.
Key Changes
🏗️ Type System Reorganization
index.ts
to dedicated type files for better organizationcommon.types.ts
- Shared interfaces like ModuleInfo and ChangeInfoconfig.types.ts
- Configuration-related typescontext.types.ts
- Workspace context typesgithub.types.ts
- GitHub API related typeswiki.types.ts
- Wiki-specific typesnode-child-process.types.ts
- Node.js process types🔍 New Terraform Module Parser
parser.ts
with comprehensive Terraform module parsing capabilitiesbuildModuleDependencyGraph()
for tracking local module dependenciesgetModulesToRelease()
to determine release propagation based on dependencies🔧 Enhanced Core Functionality
🧪 Comprehensive Test Coverage
⚙️ Development Tooling & Configuration
Benefits
Breaking Changes
semver.ts
utility functionsTesting