The section on Git hook was previously commented out, but it is now included in the README.md file.
* 🐛 fix(package.json): change cli file extension from .mjs to .cjs
* 🚀 chore(package.json): remove unnecessary banner from build script
The cli file extension has been changed from .mjs to .cjs to ensure compatibility with Node.js versions that do not support ECMAScript modules. The banner in the build script has been removed as it is no longer necessary with the change in file extension.
* 🐛 fix(githook.ts): change HOOK_PATH to HOOK_URL
The HOOK_PATH variable was changed to HOOK_URL to fix an issue where the symlink was not being created correctly. The HOOK_URL variable now uses the __filename global variable to get the path of the current file.
* 🐛 fix(tsconfig.json): change target to ES2020 and module to CommonJS
The target version of JavaScript has been changed to ES2020 to take advantage of the latest features of the language. The module has been changed to CommonJS to ensure compatibility with Node.js.
* 🐛 fix(githook.ts): change cli file path to match new extension
The cli file extension has been changed from .cjs to .mjs to improve compatibility with Node.js ESM modules. The file path in githook.ts has been updated to match the new extension.
The HOOK_PATH variable was pointing to the wrong file path, which caused the hook to fail. The file path has been updated to point to the correct file path.
The deploy script builds the application, increments the patch version, and publishes the package to the registry. This makes it easier to deploy new versions of the application.
The file path in the URL constructor was incorrect, causing the file to not be found. The file path has been corrected to point to the correct location.
* 📝 docs(TODO.md): add tasks for adding tests and making hook work
The HOOK_PATH import path was incorrect and has been fixed. The TODO list has been updated to include tasks for adding tests and making the hook work.
* 🐛 fix(TODO.md): update existing TODO item
The first item is a fix for a missing TODO item. The second item is an update to an existing TODO item. The bundle size can be reduced by properly configuring esbuild. Additionally, small files can be batched together in a single request to further reduce the bundle size.
The 'publish' script has been changed to 'prepublish' to ensure that the version is updated before publishing the package. This is a best practice to ensure that the published package has the correct version number.
* ✨ feat(package.json): add publish script
The cli file extension has been changed from .mjs to .cjs to improve compatibility with Node.js. The publish script has been added to simplify the process of publishing a new version of the package to npm.
* 🎨 style(api.ts): remove unused import statement
* 🐛 fix(api.ts): remove setConfig function call
* 🚧 chore(api.ts): add comment to explain apiKey variable initialization
* 🚧 chore(api.ts): comment out code block that prompts user for OPENAI_API_KEY
The unused import statement for `text` function from `@clack/prompts` has been removed. The `setConfig` function call has been removed as it is not needed and was causing an error. A comment has been added to explain the initialization of the `apiKey` variable. The code block that prompts the user for `OPENAI_API_KEY` has been commented out as it is not needed and was causing an error.
* 🐛 fix(tsconfig.json): change target to ES6
The target was previously set to ESNext, which is not supported by all browsers. Changing it to ES6 ensures that the emitted JavaScript is compatible with a wider range of browsers.
Added an examples section to the README.md file to showcase how OpenCommit works. The section includes a link to the relevant commit and a brief description of the configurable options.
* ✨ feat(generateCommitMessageFromGitDiff.ts): add support for generating commit messages with chat completion
The length of the initial messages prompt is now added to the check for maximum request tokens to ensure that the request does not exceed the maximum allowed tokens. Support for generating commit messages with chat completion has been added, which allows for more efficient and streamlined commit message generation.
2023-03-06 18:38:33 +08:00
9 changed files with 66 additions and 29 deletions
Look into [the commits](https://github.com/di-sukharev/opencommit/commit/4795a695800686c42e7c72fca7569103d21cd510) to see how OpenCommit works. Emoji and long commit description text is configurable.
## Setup
> The minimum supported version of Node.js is the latest v14. Check your Node.js version with `node --version`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.