{"_id":"@dada78641/repo-version","_rev":"2-466b8a824a0a4a9e7ce42ab44b235c92","name":"@dada78641/repo-version","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@dada78641/repo-version","version":"0.1.0","license":"MIT","_id":"@dada78641/repo-version@0.1.0","maintainers":[{"name":"dada78641","email":"dada78641.exe@gmail.com"}],"homepage":"https://github.com/msikma/repo-version#readme","bugs":{"url":"https://github.com/msikma/repo-version/issues"},"dist":{"shasum":"2ad3628cf9ea7cff31d5d2ccf4be4e67a9215ee3","tarball":"https://registry.npmjs.org/@dada78641/repo-version/-/repo-version-0.1.0.tgz","fileCount":8,"integrity":"sha512-my4MbX7ZtDhdrsgyumzECWUfCU5gbIbgvKEkmjwqnhjt3+UfqbbRP63ejNrdrJAmg8g6hDFtbS/jtN7SVliODw==","signatures":[{"sig":"MEQCIEXeQp43cfOSdJt7u2ZYza+eloqyEptWCsk69ZQzyW1ZAiB+rd1s/Oips9/36QjnOfozo40ZZgIKytxfOK1bAS4l8Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35938},"main":"dist/lib/index.cjs","type":"module","types":"dist/lib/index.d.ts","module":"dist/lib/index.js","gitHead":"7815081dc3d7e62a643aefd35f25545dd98cbad5","scripts":{"lint":"eslint . --flag unstable_ts_config","test":"vitest run","build":"tsup","check":"tsc -p ./tsconfig.json --noEmit","watch":"tsup --watch src"},"_npmUser":{"name":"dada78641","email":"dada78641.exe@gmail.com"},"repository":{"url":"git+https://github.com/msikma/repo-version.git","type":"git"},"_npmVersion":"11.0.0","description":"Retrieves versioning information from a .git directory","directories":{},"_nodeVersion":"23.1.0","dependencies":{"xml2js":"^0.6.2","argparse":"^2.0.1","lodash.orderby":"^4.6.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jiti":"^2.4.2","tsup":"^8.3.5","eslint":"^9.0.0","vitest":"^2.1.3","typescript":"^5.6.3","@types/node":"^22.10.2","@types/xml2js":"^0.4.14","@types/argparse":"^2.0.17","typescript-eslint":"^8.0.0","@types/lodash.orderby":"^4.6.9","@stylistic/eslint-plugin":"^2.9.0"},"_npmOperationalInternal":{"tmp":"tmp/repo-version_0.1.0_1735395268331_0.9467801496904127","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@dada78641/repo-version","version":"0.1.1","license":"MIT","_id":"@dada78641/repo-version@0.1.1","maintainers":[{"name":"dada78641","email":"dada78641.exe@gmail.com"}],"homepage":"https://github.com/msikma/repo-version#readme","bugs":{"url":"https://github.com/msikma/repo-version/issues"},"dist":{"shasum":"2b975b617a28bae94b38648a962ab8727016b84f","tarball":"https://registry.npmjs.org/@dada78641/repo-version/-/repo-version-0.1.1.tgz","fileCount":8,"integrity":"sha512-3Tld0Cm+TZnV2KL5Trj0jC0bBLS1cHZ55CoG3hTjjiX5xf3T3IQkclzvQ9JcKFxhifDk+Xf8iOc6Shd4uJodzA==","signatures":[{"sig":"MEQCIBzqdt/mhyMv1DsPPuo8hXCvDclu4swVwwk0Fyr2q6K7AiB5lvi7oXa2PjdXa2lJyg6Y3RdT6I9AzyHywLXLG4bXhg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35751},"main":"dist/lib/index.cjs","type":"module","types":"dist/lib/index.d.ts","module":"dist/lib/index.js","gitHead":"dd2b7197406807979ef6a839f7597a3a7423ec71","scripts":{"lint":"eslint . --flag unstable_ts_config","test":"vitest run","build":"tsup","check":"tsc -p ./tsconfig.json --noEmit","watch":"tsup --watch src"},"_npmUser":{"name":"dada78641","email":"dada78641.exe@gmail.com"},"repository":{"url":"git+https://github.com/msikma/repo-version.git","type":"git"},"_npmVersion":"11.0.0","description":"Retrieves versioning information from a .git directory","directories":{},"_nodeVersion":"23.1.0","dependencies":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jiti":"^2.4.2","tsup":"^8.3.5","eslint":"^9.0.0","vitest":"^2.1.3","typescript":"^5.6.3","@types/node":"^22.10.2","typescript-eslint":"^8.0.0","@stylistic/eslint-plugin":"^2.9.0"},"_npmOperationalInternal":{"tmp":"tmp/repo-version_0.1.1_1735395601764_0.8556906335337542","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@dada78641/repo-version","description":"Retrieves versioning information from a .git directory","version":"0.1.2","type":"module","main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsup","watch":"tsup --watch src","check":"tsc -p ./tsconfig.json --noEmit","test":"vitest run","lint":"eslint . --flag unstable_ts_config"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/msikma/repo-version.git"},"license":"MIT","devDependencies":{"@stylistic/eslint-plugin":"^2.9.0","@types/node":"^22.10.2","eslint":"^9.0.0","jiti":"^2.4.2","tsup":"^8.3.5","typescript":"^5.6.3","typescript-eslint":"^8.0.0","vitest":"^2.1.3"},"dependencies":{},"_id":"@dada78641/repo-version@0.1.2","gitHead":"9d520f785925be82d17e92be97468cfb4f42bb38","bugs":{"url":"https://github.com/msikma/repo-version/issues"},"homepage":"https://github.com/msikma/repo-version#readme","_nodeVersion":"23.1.0","_npmVersion":"11.0.0","dist":{"integrity":"sha512-FSV5dWmC+Q64/GU3DvLUcsPzIoSdlR3DFe8w1NGS4XZRN3H72NJXGH3TIuj3Iq2cJFKuhXqP6jn8OjsX/IOQFg==","shasum":"c40d9051fe5477fcf99eeccc0ddef1566eb999c1","tarball":"https://registry.npmjs.org/@dada78641/repo-version/-/repo-version-0.1.2.tgz","fileCount":8,"unpackedSize":35739,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBkQvyoLiiGHvcDZ+gqD1nYQbjrhftiYQ9XMLG/srzssAiEA+Ef9VcB58LcJwQy1cp7mCn21SRcP3MFDCmW6pW0w3LM="}]},"_npmUser":{"name":"dada78641","email":"dada78641.exe@gmail.com"},"directories":{},"maintainers":[{"name":"dada78641","email":"dada78641.exe@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/repo-version_0.1.2_1735395879451_0.6343956986726262"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-28T14:14:28.228Z","modified":"2024-12-28T14:24:39.777Z","0.1.0":"2024-12-28T14:14:28.602Z","0.1.1":"2024-12-28T14:20:02.064Z","0.1.2":"2024-12-28T14:24:39.617Z"},"bugs":{"url":"https://github.com/msikma/repo-version/issues"},"license":"MIT","homepage":"https://github.com/msikma/repo-version#readme","repository":{"type":"git","url":"git+https://github.com/msikma/repo-version.git"},"description":"Retrieves versioning information from a .git directory","maintainers":[{"name":"dada78641","email":"dada78641.exe@gmail.com"}],"readme":"[![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript&logoColor=fff)](https://www.typescriptlang.org/) [![MIT license](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT) [![npm version](https://badge.fury.io/js/@dada78641%2Frepo-version.svg)](https://badge.fury.io/js/@dada78641%2Frepo-version)\n\n# @dada78641/repo-version\n\n**repo-version** is a simple and lightweight library designed to retrieve versioning information from a Git repository.\n\nIt extracts data directly from the .git directory without spawning a subprocess.\n\n## Usage\n\n```bash\nnpm i @dada78641/repo-version\n```\n\n```ts\nimport {getGitRepoInfo, type GitRepoInfo} from '@dada78641/repo-version'\n\n// should have .git directory inside\nconst repoInfo: GitRepoInfo = await getGitRepoInfo('/path/to/my/project')\nconsole.log(repoInfo)\n\n// logs:\n//\n// {\n//   branch: 'develop',\n//   branchRef: 'refs/heads/develop',\n//   hash: 'd59e60e50b13091cb86e8d267419820883cabc02',\n//   shortHash: 'd59e60e',\n//   commits: 3\n// }\n```\n\nIf a .git directory is not found or invalid, getGitRepoInfo() will throw an error.\n\n## License\n\nMIT licensed.\n","readmeFilename":"readme.md"}