-
Notifications
You must be signed in to change notification settings - Fork 0
Chore/bump dependencies #21
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
Conversation
…o improve logging and clarity
… and improving import order enforcement
…n, git operations, progress bar, string formatting, and error handling - Implement tests for repository data processing and validation, including filtering, sorting, and grouping. - Create environment variable validation tests using Zod for schema validation. - Add tests for git operations, including cloning, status checking, and error handling. - Introduce tests for a progress bar utility to ensure correct output formatting. - Develop tests for string and formatting utilities, covering command line argument parsing, output formatting, and data formatting. - Mock necessary modules and set up test environment to ensure isolation and reliability of tests.
…eps into chore/bump-dependencies
… clarity and consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a comprehensive testing infrastructure, dependency updates, and linting modernization. The changes focus on adding robust test coverage for the CLI application, migrating to modern ESLint flat configuration, and updating the project dependencies to their latest versions.
- Adds extensive test suites covering CLI interface, data processing, environment validation, Git operations, and utility functions
- Migrates from legacy ESLint configuration to modern flat config format with TypeScript-specific rules
- Updates dependencies including major version bumps for ESLint, TypeScript, and various development tools
Reviewed Changes
Copilot reviewed 15 out of 17 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
test/*.test.ts | New comprehensive test suites covering CLI, data processing, Git operations, environment validation, and string formatting |
test/setup.ts | Test environment setup with console and stdout mocking |
eslint.config.mjs | New flat ESLint configuration replacing legacy format |
package.json | Updated dependencies, scripts, and Node.js version |
src/utils/progress-bar.ts | Minor parameter naming improvement |
src/repo-status.ts | Enhanced error logging with message details |
src/get-repositories.ts | Enhanced error logging with message details |
Comments suppressed due to low confidence (5)
test/string-formatting.test.ts:18
- [nitpick] The variable name 'i' is not descriptive. Consider renaming it to 'index' or 'argIndex' for better readability.
for (let i = 2; i < args.length; i++) {
test/string-formatting.test.ts:58
- [nitpick] The variable name 'i' is not descriptive. Consider renaming it to 'index' or 'argIndex' for better readability.
for (let i = 2; i < args.length; i++) {
test/string-formatting.test.ts:69
- [nitpick] The variable name 'i' is not descriptive. Consider renaming it to 'index' or 'argIndex' for better readability.
i++; // Skip the next argument as it's been consumed
test/string-formatting.test.ts:266
- [nitpick] The variable name 'unitIndex' could be more descriptive. Consider renaming it to 'currentUnitIndex' or 'unitLevel' to better convey its purpose.
let unitIndex = 0;
test/git-operations.test.ts:161
- Using a for-of loop with async operations inside may not be optimal. Consider using Promise.all() if the operations can be performed concurrently, or ensure sequential execution is intentional.
});
@@ -0,0 +1,156 @@ | |||
import { defineConfig } from 'eslint/config'; |
Copilot
AI
Jul 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import path 'eslint/config' appears to be incorrect. ESLint 9.x does not export 'defineConfig' from this path. This import should likely be removed as it's not a standard ESLint export.
Copilot uses AI. Check for mistakes.
allConfig: js.configs.all | ||
}); | ||
|
||
export default defineConfig([ |
Copilot
AI
Jul 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using 'defineConfig' which was imported from an invalid path. Since this is a flat config, you should export the array directly without wrapping it in 'defineConfig'.
export default defineConfig([ | |
export default [ |
Copilot uses AI. Check for mistakes.
export default defineConfig([ | ||
{ | ||
files: ['**/*.js', '**/*.mjs'], | ||
extends: compat.extends( |
Copilot
AI
Jul 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In flat config, 'extends' should be used within the compat.extends() call, not as a separate property. The extends should be spread into the config object.
extends: compat.extends( | |
...compat.extends( |
Copilot uses AI. Check for mistakes.
"@octokit/core": "^7.0.3", | ||
"@octokit/rest": "^22.0.0", | ||
"@types/prompts": "^2.4.9", | ||
"dotenv": "^17.2.0", |
Copilot
AI
Jul 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dotenv version 17.2.0 does not exist. The latest stable version of dotenv is 16.x. This version number appears to be incorrect.
"dotenv": "^17.2.0", | |
"dotenv": "^16.3.1", |
Copilot uses AI. Check for mistakes.
"simple-git": "^3.16.1", | ||
"zod": "^3.20.6" | ||
"simple-git": "^3.28.0", | ||
"zod": "^4.0.5" |
Copilot
AI
Jul 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The zod version 4.0.5 does not exist. The latest stable version of zod is 3.x. This version number appears to be incorrect.
"zod": "^4.0.5" | |
"zod": "^3.22.2" |
Copilot uses AI. Check for mistakes.
This pull request introduces a series of updates to enhance the linting configuration, improve error handling, and add comprehensive tests for the CLI interface. The most notable changes include the migration to a flat ESLint configuration, updates to the
package.json
dependencies and scripts, improved error logging in specific modules, and the addition of new unit tests for the CLI functionality.Linting and Configuration Updates:
eslint.config.mjs
file, which includes custom rules, plugin configurations, and TypeScript-specific settings. This replaces older configurations and aligns with modern ESLint practices..prettierrc
file by removing unused properties likejsxBracketSameLine
andimportOrder
.Dependency and Script Updates:
package.json
to include newer versions of dependencies, such aseslint
,prettier
, andtypescript
. Added new scripts likeprettier-check
,test:watch
, andtest:coverage
for improved development workflows. Changed the license from ISC to MIT.Error Handling Improvements:
src/get-repositories.ts
andsrc/repo-status.ts
by explicitly casting errors toError
type and logging additional details like error messages. [1] [2]Codebase Maintenance:
getBar
method insrc/utils/progress-bar.ts
to improve readability by renaming parameters and ensuring consistent naming conventions.Testing Enhancements:
test/cli.test.ts
to validate CLI menu options, command-line arguments, error handling, and menu flow. These tests mock dependencies and ensure robust coverage of edge cases.