mirror of
https://github.com/di-sukharev/opencommit.git
synced 2026-04-20 03:02:51 -04:00
* test: ✅ add the first E2E test and configuration to CI (#316) * add tests * Add push config (#220) * feat: add instructions and support for configuring gpt-4-turbo (#320) * 3.0.12 * build * feat: add 'gpt-4-turbo' to supported models in README and config validation --------- Co-authored-by: di-sukharev <dim.sukharev@gmail.com> * ✅ fix the broken E2E tests due to the addition of OCO_GITPUSH (#321) * test(oneFile.test.ts): update test expectations to match new push prompt text * build * Feat: Add Claude 3 support (#318) * 3.0.12 * build * feat: anthropic claude 3 support * fix: add system prompt * fix: type check * fix: package version * fix: update anthropic for dependency bug fix * feat: update build files * feat: update version number --------- Co-authored-by: di-sukharev <dim.sukharev@gmail.com> * 🐛bug fix: enable to use the new format of OpenAI's project API Key (#328) * fix(config.ts): remove validation for OCO_OPENAI_API_KEY length to accommodate variable key lengths * build * ♻️ refactor(config.ts): Addition of UnitTest environment and unittest for commands/config.ts#getConfig (#330) * feat(jest.config.ts): update jest preset for TS ESM support and ignore patterns feat(package.json): add test:unit script with NODE_OPTIONS for ESM refactor(src/commands/config.ts): improve dotenv usage with dynamic paths feat(src/commands/config.ts): allow custom config and env paths in getConfig refactor(src/commands/config.ts): streamline environment variable access feat(test/unit): add unit tests for config handling and utility functions - Implement unit tests for `getConfig` function to ensure correct behavior in various scenarios including default values, global config, and local env file precedence. - Add utility function `prepareFile` for creating temporary files during tests, facilitating testing of file-based configurations. * feat(e2e.yml): add unit-test job to GitHub Actions for running unit tests on pull requests * ci(test.yml): add GitHub Actions workflow for unit and e2e tests on pull requests * refactor(config.ts): streamline environment variable access using process.env directly test(config.test.ts): add setup and teardown for environment variables in tests to ensure test isolation * feat(package.json): add `test:all` script to run all tests in Docker refactor(package.json): consolidate Docker build steps into `test:docker-build` script for DRY principle fix(package.json): ensure `test:unit:docker` and `test:e2e:docker` scripts use the same Docker image and remove container after run chore(test/Dockerfile): remove default CMD to allow dynamic test script execution in Docker * refactor(config.test.ts): anonymize API keys in tests for better security practices * feat(config.test.ts): add tests for OCO_ANTHROPIC_API_KEY configuration * refactor(config.ts): streamline path imports and remove unused DotenvParseOutput - Simplify path module imports by removing default import and using named imports for `pathJoin` and `pathResolve`. - Remove unused `DotenvParseOutput` import to clean up the code. * refactor(config.test.ts): simplify API key mock values for clarity in tests * test(config.test.ts): remove tests for default config values and redundant cases - Removed tests that checked for default config values when no config or env files are present, as these scenarios are now handled differently. - Eliminated tests for empty global config and local env files to streamline testing focus on actual config loading logic. - Removed test for prioritizing local env over global config due to changes in config loading strategy, simplifying the configuration management. * new version --------- Co-authored-by: Takanori Matsumoto <matscube@gmail.com> Co-authored-by: Moret84 <aurelienrivet@hotmail.fr> Co-authored-by: yowatari <4982161+YOwatari@users.noreply.github.com> Co-authored-by: metavind <94786679+metavind@users.noreply.github.com>
97 lines
2.8 KiB
JSON
97 lines
2.8 KiB
JSON
{
|
|
"name": "opencommit",
|
|
"version": "3.0.14",
|
|
"description": "Auto-generate impressive commits in 1 second. Killing lame commits with AI 🤯🔫",
|
|
"keywords": [
|
|
"git",
|
|
"chatgpt",
|
|
"gpt",
|
|
"ai",
|
|
"openai",
|
|
"opencommit",
|
|
"aicommit",
|
|
"aicommits",
|
|
"gptcommit",
|
|
"commit",
|
|
"ollama"
|
|
],
|
|
"main": "cli.js",
|
|
"bin": {
|
|
"opencommit": "./out/cli.cjs",
|
|
"oco": "./out/cli.cjs"
|
|
},
|
|
"repository": {
|
|
"url": "https://github.com/di-sukharev/opencommit"
|
|
},
|
|
"type": "module",
|
|
"author": "https://github.com/di-sukharev",
|
|
"license": "MIT",
|
|
"files": [
|
|
"out/cli.cjs",
|
|
"out/tiktoken_bg.wasm"
|
|
],
|
|
"release": {
|
|
"branches": [
|
|
"master"
|
|
]
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"scripts": {
|
|
"watch": "npm run -S build -- --sourcemap --watch",
|
|
"start": "node ./out/cli.cjs",
|
|
"ollama:start": "OCO_AI_PROVIDER='ollama' node ./out/cli.cjs",
|
|
"dev": "ts-node ./src/cli.ts",
|
|
"build": "rimraf out && node esbuild.config.js",
|
|
"build:push": "npm run build && git add . && git commit -m 'build' && git push",
|
|
"deploy": "npm version patch && npm run build:push && git push --tags && npm publish --tag latest",
|
|
"lint": "eslint src --ext ts && tsc --noEmit",
|
|
"format": "prettier --write src",
|
|
"test:all": "npm run test:unit:docker && npm run test:e2e:docker",
|
|
"test:docker-build": "docker build -t oco-test -f test/Dockerfile .",
|
|
"test:unit": "NODE_OPTIONS=--experimental-vm-modules jest test/unit",
|
|
"test:unit:docker": "npm run test:docker-build && DOCKER_CONTENT_TRUST=0 docker run --rm oco-test npm run test:unit",
|
|
"test:e2e": "jest test/e2e",
|
|
"test:e2e:docker": "npm run test:docker-build && DOCKER_CONTENT_TRUST=0 docker run --rm oco-test npm run test:e2e"
|
|
},
|
|
"devDependencies": {
|
|
"@commitlint/types": "^17.4.4",
|
|
"@types/ini": "^1.3.31",
|
|
"@types/inquirer": "^9.0.3",
|
|
"@types/jest": "^29.5.12",
|
|
"@types/node": "^16.18.14",
|
|
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
|
"@typescript-eslint/parser": "^5.45.0",
|
|
"cli-testing-library": "^2.0.2",
|
|
"dotenv": "^16.0.3",
|
|
"esbuild": "^0.15.18",
|
|
"eslint": "^8.28.0",
|
|
"jest": "^29.7.0",
|
|
"prettier": "^2.8.4",
|
|
"ts-jest": "^29.1.2",
|
|
"ts-node": "^10.9.1",
|
|
"typescript": "^4.9.3"
|
|
},
|
|
"dependencies": {
|
|
"@actions/core": "^1.10.0",
|
|
"@actions/exec": "^1.1.1",
|
|
"@actions/github": "^5.1.1",
|
|
"@anthropic-ai/sdk": "^0.19.2",
|
|
"@clack/prompts": "^0.6.1",
|
|
"@dqbd/tiktoken": "^1.0.2",
|
|
"@octokit/webhooks-schemas": "^6.11.0",
|
|
"@octokit/webhooks-types": "^6.11.0",
|
|
"ai": "^2.2.14",
|
|
"axios": "^1.3.4",
|
|
"chalk": "^5.2.0",
|
|
"cleye": "^1.3.2",
|
|
"crypto": "^1.0.1",
|
|
"execa": "^7.0.0",
|
|
"ignore": "^5.2.4",
|
|
"ini": "^3.0.1",
|
|
"inquirer": "^9.1.4",
|
|
"openai": "^3.2.1"
|
|
}
|
|
}
|