{"_id":"get-current-version","_rev":"3184111","name":"get-current-version","description":"Get the version of the currently executing bin.","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"time":{"modified":"2023-12-06T08:49:22.000Z","created":"2023-02-07T15:46:28.620Z","1.0.1":"2023-02-11T03:49:40.750Z","1.0.0":"2023-02-07T15:46:28.620Z"},"users":{},"repository":{"type":"git","url":"git+https://github.com/fabiospampinato/get-current-version.git"},"versions":{"1.0.1":{"name":"get-current-version","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/get-current-version.git"},"description":"Get the version of the currently executing bin.","version":"1.0.1","type":"module","main":"dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"clean":"tsex clean","compile":"tsex compile","compile:watch":"tsex compile --watch","test":"tsex test","test:watch":"tsex test --watch","prepublishOnly":"tsex prepare"},"keywords":["cli","get","current","version"],"dependencies":{"get-current-package":"^1.0.0"},"devDependencies":{"fava":"^0.1.0","tsex":"^2.1.0","typescript":"^4.9.5"},"gitHead":"a4e446f77024693394c32c8080709e46765b7371","bugs":{"url":"https://github.com/fabiospampinato/get-current-version/issues"},"homepage":"https://github.com/fabiospampinato/get-current-version#readme","_id":"get-current-version@1.0.1","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"shasum":"65f6594b2d052eefb735d56d0b0fbda4975dae32","size":2017,"noattachment":false,"key":"/get-current-version/-/get-current-version-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-current-version/download/get-current-version-1.0.1.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-current-version_1.0.1_1676087380529_0.830026984557634"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-02-11T03:49:40.750Z","publish_time":1676087380750,"_cnpm_publish_time":1676087380750},"1.0.0":{"name":"get-current-version","repository":{"type":"git","url":"git+https://github.com/fabiospampinato/get-current-version.git"},"description":"Get the version of the currently executing bin.","version":"1.0.0","type":"module","main":"dist/index.js","exports":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"clean":"tsex clean","compile":"tsex compile","compile:watch":"tsex compile --watch","test":"tsex test","test:watch":"tsex test --watch","prepublishOnly":"npm run clean && npm run compile && npm run test"},"keywords":["cli","get","current","version"],"dependencies":{"find-up-json":"^2.0.1"},"devDependencies":{"@types/node":"^18.13.0","fava":"^0.0.8","tsex":"^1.1.5","typescript":"^4.9.5"},"bugs":{"url":"https://github.com/fabiospampinato/get-current-version/issues"},"homepage":"https://github.com/fabiospampinato/get-current-version#readme","_id":"get-current-version@1.0.0","_nodeVersion":"18.12.0","_npmVersion":"8.19.2","dist":{"shasum":"386498fc4bbc74e4b3f41fbe64c120bb1ce5b6c0","size":2181,"noattachment":false,"key":"/get-current-version/-/get-current-version-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-current-version/download/get-current-version-1.0.0.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-current-version_1.0.0_1675784788466_0.29296415033034484"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-02-07T15:46:28.620Z","publish_time":1675784788620,"_cnpm_publish_time":1675784788620}},"readme":"# Get Current Version\n\nGet the version of the currently executing bin.\n\nThis is meant to be used in combination with [`tiny-updater`](https://github.com/fabiospampinato/tiny-updater) or similar, in order to get the version of the currently executing bin very conveniently, without importing a \"package.json\" and without hard-coding the version number yourself.\n\n## Install\n\n```sh\nnpm install --save get-current-version\n```\n\n## Usage\n\nYou should have something like this in your bin app:\n\n```ts\nimport getCurrentVersion from 'get-current-version';\n\nconsole.log ( getCurrentVersion () ); // 1.0.0\n```\n\nThen executing the bin would produce this:\n\n```\n> my-bin\n< 1.0.0\n```\n\nBasically it detects which entrypoint file is being executed and retrieves its version.\n\n## License\n\nMIT © Fabio Spampinato\n","_attachments":{},"homepage":"https://github.com/fabiospampinato/get-current-version#readme","bugs":{"url":"https://github.com/fabiospampinato/get-current-version/issues"}}