-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Refactored CLI, Typed Flags, Updated Docs & Build (v0.2.0) (#2)
* refact!: Major refactor of the parser * fix(lint): apply linter fixes * feat!: complete CLI architecture redesign BREAKING CHANGE: Restructured the entire CLI implementation with a modular approach - Introduced namespaced architecture with Cli.Setup as main entry point - Added strongly typed flag system with validation - Implemented command tree-based parser - Added usage/help text generation - Introduced utility functions for type conversion Changes include: - Replaced monolithic Cli class with modular namespaces - Added dedicated parser with tree-based command resolution - Introduced TypedFlag system with built-in validation - Added built-in help text generation - Improved error handling and type safety - Added caching for better performance - Introduced string/number/boolean utilities Closes #1 * feat: enhance CLI flag handling to support multiple values * docs: update contributing guide file name * test: add unit tests for utility functions * test: add unit tests for UsageGenerator functionality * test: update Utils.isValidBoolean tests to include numeric values * test: add unit tests for Flag and Command classes * refactor: clean up comments and improve code readability in Parser * test: add unit tests for Parser functionality including Node, Tree, and Scope * refactor: simplify isValid and convert methods in Flags namespace * refactor: reorder imports for consistency and clarity in cli and usageGenerator files; update parser tests for improved import structure * test: add unit tests for TypedFlag class in Flags module to validate initialization, input validation, conversion, and default values * feat: introduce CliError class for improved error handling in CLI argument parsing * feat: export CliError from cli module for enhanced error handling * test: add comprehensive tests for Cli module covering setup, command and flag parsing, error handling, help generation, and default values * refactor: improve test descriptions for clarity and consistency across CLI and Flags modules * chore: add MIT License file to the repository * feat: add benchmarking capabilities for Climonad CLI framework * docs: update README and package.json for improved clarity and performance description * chore: bump version to 0.2.0 in package.json * fix: update package.json to correct module paths and exports configuration * feat: expand keywords in package.json for better discoverability * feat: enhance package.json with additional scripts and dependencies for improved testing and build processes * fix: update devDependencies in package.json to latest versions for improved compatibility and performance * fix: update Node.js engine version in package.json and package-lock.json to >=20.0.0
- Loading branch information
Showing
21 changed files
with
2,437 additions
and
592 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Eduardo Marques Santos | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains 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
Oops, something went wrong.