@wocker/utils
v2.0.6
Published
Utils for @wocker
Downloads
133
Readme
@wocker/utils
Utils for wocker packages
Usage
Installation
npm i @wocker/utilsBreaking Changes in Version 2.0.0
Name Changes for Prompt Functions
In version 2.0.0, we've renamed some core prompt functions to improve clarity and consistency across the API. These changes will require updates to your code if you're migrating from v1.x.
Function Renaming
| Old Name (v1.x) | New Name (v2.0.0) | Description |
|-----------------|-------------------|---------------------------------|
| promptText | promptInput | Prompts the user for text input |
| promptConfig | Removed | Function has been removed |
| promptGroup | Removed | Function has been removed |
Migration Guide
If you're upgrading from version 1.x to 2.0.0, you'll need to update your imports and function calls for promptText:
// Old usage (v1.x)
import {promptText} from "@wocker/utils";
const name = await promptText({
message: "Enter your name"
});// New usage (v2.0.0)
import {promptInput} from "@wocker/utils";
const name = await promptInput({
message: "Enter your name"
});Why This Change?
We decided to rename the promptText function to promptInput to:
- Provide a more descriptive name that better reflects its purpose
- Create a more consistent naming convention across the API
- Improve developer experience with more intuitive function names
The promptConfig and promptGroup functions have been removed as they are no longer supported in the new version.
Migration
If you're using a large codebase with many occurrences of the old function name, you can use the following search and replace operation:
- Replace all occurrences of
promptTextwithpromptInput - Remove any usage of
promptConfigandpromptGroupas these functions are no longer available
Additional Information
The function signatures and return types remain the same, only the name of promptText has changed. All other functionality works exactly as before.
For any issues or questions regarding this migration, please open an issue on our GitHub repository.
