Skip to content

Conversation

@mayconrfreitas
Copy link
Member

This pull request introduces improvements to both the CLI and the parsing logic, as well as minor workflow updates. The main focus is on making the parser more robust and accurate in handling directory structures, especially when inferring root directories and handling various input formats. Additionally, the code has been refactored for better readability and maintainability.

Parser improvements and refactoring:

  • Enhanced the parseToPlan function in src/parser.ts to more robustly infer the base root directory from the first line, ensure all ancestor directories are included in the plan, and improve handling of directory tokens and branch markers. Also, a custom computeDepth function was added for more accurate depth calculation. [1] [2] [3] [4]
  • Refactored code formatting and imports in src/parser.ts for clarity and maintainability.

CLI improvements:

  • Improved file reading logic and argument parsing in src/cli.ts to handle input more safely and robustly, and made minor formatting adjustments for readability. [1] [2] [3]

Workflow configuration updates:

  • Updated .github/workflows/ci.yml and .github/workflows/publish.yml to simplify Node.js version selection (now fixed at 20.x) and adjust the pnpm setup step for consistency. [1] [2]

@mayconrfreitas mayconrfreitas self-assigned this Sep 29, 2025
@mayconrfreitas mayconrfreitas added the bug Something isn't working label Sep 29, 2025
@mayconrfreitas mayconrfreitas merged commit 49408e8 into main Sep 29, 2025
2 checks passed
mayconrfreitas added a commit that referenced this pull request Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants