diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e61c38a..fa72cbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,8 +3,6 @@ name: CI on: pull_request: branches: [main] - push: - branches: [main] concurrency: group: ci-${{ github.ref }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 886ee74..7f653c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,56 +4,57 @@ ## [Unreleased] -#### Changes - -- The command to update the tool itself has been changed, `prasmoid update me` ➜ `prasmoid upgrade`. -- The installation script now shows clearer and more helpful messages. -- The project layout was changed to make sure `go install` works correctly. This involved moving command files to a root `cmd/` folder and moving the build script into a `dev/` folder. -- Fixed Custom command flags now properly handle default values -- Enhanced Console module with improved string formatting and better handling of complex data types in logs -- Removed unnecessary error handling in runtime environment setup -- Refactored i18n commands to use mockable functions for testing -- Improved init command functionality. -- Added `dev` commands group with development commands. +#### Changed + +- Changed `prasmoid update me` to `prasmoid upgrade` for better clarity and consistency +- Renamed subcommand `commands` to `command`. Custom commands are now managed via `prasmoid command [add|remove]` +- Improved installation script with clearer and more helpful user feedback +- Reorganized project layout to support `go install` by moving command files to `cmd/` and build scripts to `dev/` +- Fixed handling of default values for command flags +- Enhanced string formatting and improved handling of complex data types in logs +- Streamlined environment setup by removing unnecessary error handling +- Refactored i18n commands to use mockable functions for better testability +- Enhanced initialization functionality +- Added new `dev` command group for development-related utilities ## [v0.0.3] - 2025-07-29 -#### Changes +#### Changed -- Added `regen` command to regenerate `prasmoid.d.ts` and `prasmoid.config.js` if lost or modified. +- **Regeneration Command**: Added `regen` command to regenerate `prasmoid.d.ts` and `prasmoid.config.js` if lost or modified - **Internationalization (i18n) Support**: _[Suggested by this awesome community member](https://www.reddit.com/r/kde/comments/1mb9paz/comment/n5mt6tg/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button)_ - - `i18n extract`: Extracts translatable strings from metadata and QML files. - - `i18n compile`: Compiles `.po` files into binary `.mo` format for use in plasmoids. - - `i18n locales edit`: Adds or removes locales from your plasmoid. + - **i18n Extraction**: Extracts translatable strings from metadata and QML files + - **i18n Compilation**: Compiles `.po` files into binary `.mo` format for use in plasmoids + - **i18n Locale Management**: Adds or removes locales from your plasmoid - **Extended Configuration System**: - The `prasmoid.config.js` now supports: - - `i18n.locales`: Define supported locale codes (e.g., `en`, `fr`, `pt_BR`, etc.) - - `i18n.dir`: Specify your translation directory + - **i18n Locales**: Define supported locale codes (e.g., `en`, `fr`, `pt_BR`, etc.) + - **i18n Directory**: Specify your translation directory -- `build` command now **auto-compiles translations** before packaging. -- `init` command now allows **interactive locale selection**, auto-generating localized `metadata.json` entries. -- CLI version checking has been **refined** with smarter, more accurate version comparisons. -- Various commands have been tightened up for performance and usability. -- Renamed `deps` ➜ `consts` for cleaner architecture and more intuitive constant management. +- **Build Command**: Now auto-compiles translations before packaging +- **Init Command**: Now allows interactive locale selection, auto-generating localized `metadata.json` entries +- **Version Checking**: Refined CLI version checking with smarter, more accurate version comparisons +- **Performance and Usability**: Various commands have been tightened up for performance and usability +- **Constant Management**: Renamed `deps` to `consts` for cleaner architecture and more intuitive constant management --- ## [v0.0.2] - 2025-07-28 -#### Changes +#### Changed -- Add `setup` command to install all necessary dependencies for development environment. -- Refactor package management to support multiple package managers (apt, dnf, pacman, nix). -- Update the build process to be more flexible. -- Remove support for compressed version of the binary. +- **Setup Command**: Added `setup` command to install all necessary dependencies for development environment +- **Package Management**: Refactored package management to support multiple package managers (apt, dnf, pacman, nix) +- **Build Process**: Updated the build process to be more flexible +- **Binary Format**: Removed support for compressed version of the binary --- ## [v0.0.1] - 2025-07-28 -- Initial release. +- **Initial Release**: Initial release of the project diff --git a/README.md b/README.md index 5c0603e..89bee7a 100644 --- a/README.md +++ b/README.md @@ -215,9 +215,9 @@ Prasmoid provides a comprehensive set of commands to manage your plasmoid projec | `changeset` | Manages versioning and changelogs. | See subcommands below. | | `changeset add` | Creates a new changeset with version bump and summary. | `prasmoid changeset add [-b ] [-s ]`
`-b, --bump`: `patch`, `minor`, or `major`.
`-s, --summary`: Changelog summary. | | `changeset apply` | Applies pending changesets to `metadata.json` and `CHANGELOG.md`. | `prasmoid changeset apply` | -| `commands` | Manages custom JavaScript CLI commands. | See subcommands below. | -| `commands add` | Adds a new custom JS command in `.prasmoid/commands/`. | `prasmoid commands add [-n ]`
`-n, --name`: Command name. | -| `commands remove` | Removes a custom command. | `prasmoid commands remove [-n ]`
`-n, --name`: Command name. | +| `command` | Manages custom JavaScript CLI commands. | See subcommands below. | +| `command add` | Adds a new custom JS command in `.prasmoid/commands/`. | `prasmoid command add [-n ]`
`-n, --name`: Command name. | +| `command remove` | Removes a custom command. | `prasmoid command remove [-n ]`
`-n, --name`: Command name. | | `i18n` | Handles internationalization tasks. | See subcommands below. | | `i18n extract` | Extracts strings for translation from metadata and QML files. | `prasmoid i18n extract`
`--no-po`: Skip `.po` generation. | | `i18n compile` | Compiles `.po` files into `.mo` files for use in plasmoids. | `prasmoid i18n compile`
`-s, --silent`: Suppress output. | @@ -244,7 +244,7 @@ This means you can write powerful automation scripts in JavaScript, and Prasmoid 1. **Generate the command file:** ```bash - prasmoid commands add deploy + prasmoid command add deploy ``` This will create a file like `.prasmoid/commands/deploy.js`. diff --git a/cmd/command/root.go b/cmd/command/root.go index 1a2e3a3..a016354 100644 --- a/cmd/command/root.go +++ b/cmd/command/root.go @@ -10,7 +10,7 @@ import ( // commandsCmd represents the commands command var commandsCmd = &cobra.Command{ - Use: "commands", + Use: "command", Short: "Manage project-specific custom commands", } diff --git a/dev/cmd/test.go b/dev/cmd/test.go index 0259c6c..166249d 100644 --- a/dev/cmd/test.go +++ b/dev/cmd/test.go @@ -28,6 +28,7 @@ var testCmd = &cobra.Command{ color.Red("Failed to run tests: %v", err) return } + return } command := []string{"go", "test", "./cmd/...", "./internal/...", "./utils/...", "-v", "-race", "-coverprofile=coverage.out", "-covermode=atomic"}