{"_id":"get-current-version","_rev":"1699641","name":"get-current-version","description":"Get the version of the currently executing bin.","dist-tags":{"latest":"1.0.2"},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"time":{"modified":"2026-11-08T15:42:47.000Z","created":"2023-02-07T15:46:28.620Z","1.0.2":"2025-01-12T18:50:24.389Z","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.2":{"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.","license":"MIT","version":"1.0.2","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.1"},"devDependencies":{"fava":"^0.3.4","tsex":"^4.0.2","typescript":"^5.7.3"},"_id":"get-current-version@1.0.2","gitHead":"67174b20341208a347fe1e6d2d2054228ade6d5c","bugs":{"url":"https://github.com/fabiospampinato/get-current-version/issues"},"homepage":"https://github.com/fabiospampinato/get-current-version#readme","_nodeVersion":"18.19.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-tf4mFvbeZjNvaEzwJlZXOi8ySpVCZmcZJS8hNFnh2d345e2t2rrTaZ/7QBwU4HfruShJ5+O1ObLJc0JSdaYo7g==","shasum":"d63bc696bd9de405acbc87defe0d3ab87a6bbaf8","tarball":"http://registry-npm.ywwl.com/get-current-version/download/get-current-version-1.0.2.tgz","fileCount":5,"unpackedSize":3082,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRFGLmUNTNXtFZgEOrmUyOKUnEcdLjH7YT+0DwCWgxFQIhAIsXJY7OJfhWLgPNH0z3lpY9XtkZ1f7yf/02jcgegIHY"}],"size":1704,"noattachment":false,"key":"/get-current-version/-/get-current-version-1.0.2.tgz"},"_npmUser":{"name":"fabiospampinato","email":"spampinabio@gmail.com"},"directories":{},"maintainers":[{"name":"fabiospampinato","email":"spampinabio@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/get-current-version_1.0.2_1736707824217_0.9138492092463928"},"_hasShrinkwrap":false,"publish_time":1736707824389,"_cnpm_publish_time":1736707824389},"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":{"integrity":"sha512-81cAoom+eMvmIsUY64nVs3Aec366pN3Lnd1ptr8NjtmgCAkzrgqfBeG/c7DeQK0jpIBkjaGpYLdDpHzsM1TJwQ==","shasum":"65f6594b2d052eefb735d56d0b0fbda4975dae32","tarball":"http://registry-npm.ywwl.com/get-current-version/download/get-current-version-1.0.1.tgz","fileCount":9,"unpackedSize":3682,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcCrZFr4MHpb0hgwNRWPfjL9uAf6lKVu9b/FrZBVo+PwIhAKPPJYDEtxWlYFytFIpugJxLzR1l3OpiHDHuav2Xk0Z6"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj5xBUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq0gA/+MDxpjVhcM/Np87lhiqkdnefVImTTKgjKXecspjx/rE+Sr/jD\r\nuRFUi2TP199BQU9KjAc0wkTVTjmYfgZTkqGTWKdabJdViclc39pPuH/QwwbQ\r\nsU8AC6Wwjsu0CMxAKeLgarpubufMw9coPB+KrL4LWe40RH8awHBk4xwQJXzw\r\nXUpzTHf9CpxsuRkez0/i/RE7+fvKtiivRbs40ywkD+8tBTlgpgXHP6O4l1Bj\r\nkQOyF85plR2mXdGETOrb6i85jQIBrgvGAVq1XAUMHDXN+9vLXjGY+1wfWvH7\r\nkg+4wHc609L9OAKs8cxa+y0cD5gbbMUJBMHON+eN0cUuPNV1ywjqPDi2OQBe\r\ngyp4w+/Ple4dA4298OrJWfNMIHWXUZcnXxkooDskxe/SaCU2Gx+QMhelyNB5\r\nPg7YWlk37ZlgXGap9YqlsH+frzZy5yJ6UKr6w9IQNqpcH5Ew2Q0nnujMrFm5\r\nG2Bjlob+7RN9PVWSOXGANarrXA0AE0bQ3S6f3jwmwFrx7v2599pu2LsgyV+X\r\n+W3ve3mNYsUyeez5hBOvH7kJK6C+PK69UuXvdciCcku/8INZKYXzFLDRIL+H\r\nftqUbDENb55kDZuklB87PFxgq8VDY/n7csbcnNchXQtU9ngoUnCuBw8funLA\r\n36AIxbrt+wbzV5FfEI/kDLuZAkIhMyqwLfs=\r\n=LNsf\r\n-----END PGP SIGNATURE-----\r\n","size":2017,"noattachment":false,"key":"/get-current-version/-/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,"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":{"integrity":"sha512-zw+tIsAnXvihqdmC/kadlJQNOsF6+J90qspxnRSWdmkGm9wJ2guAcVp1klK6xiZidi40DphopBSyy/u03OGzUg==","shasum":"386498fc4bbc74e4b3f41fbe64c120bb1ce5b6c0","tarball":"http://registry-npm.ywwl.com/get-current-version/download/get-current-version-1.0.0.tgz","fileCount":9,"unpackedSize":4293,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTPBwIjt6Bj0ZPPsGxw65q4mxqzFFdZMJadYT/Zz5J8gIhANCUYPG/7JvuQlS3thuGaHbZcc09qrE4uzWopvy/j38m"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj4nJUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmokRQ//YsWV5wQep4YTFyHR/HX+2RP3nCAI2JofOJzPQ/1u86r90LEP\r\nKkbrFVxC6b/sSx1ytjWi204p2fqF8a8DAQHmCpR1ghZuHBEG8g0kMHnV7gGg\r\nyFi3Fn5UCPc7dl8ElmdvoTd98vtvL9X3Drl0A11Ci0H2WpPLkU4rAE4GE9hn\r\nv3Mt9ExfnIXla7CDdt9Hl2B3Fszi1lOmTwnZP1hyre2g3r9I2VmF+I4gdkso\r\nrWnEzo314Y27FSOZ4VbygPewW62elsUHVChSHha8Q19JLUW+jz7tX5zV5reT\r\nDxXmkEKJjpiC3zHyLdRovdK1/t2VswqLl+I82s0VKa+Ai7C6F23cNwmKp+pA\r\nGgOkAI3QpZWnoZcOuj+VQviGRmbm5R1k4h0wh34LWL+WU0RMkxIUtOg1A2vC\r\nex9tShY39O2ZqkDjBZAQRceeH/vsjFazi9mUv6Gpqt+0SC+DnyST0UrFGKHx\r\n/usPE3mHkbaHEmwUWcpBFqW8fK7/A86bFmLZ1z8O93BoV68cwq/mKqi07CeK\r\n0UJ5fdHMp+1b8AYvWRTy0znf0Z5V6la4TSfeFPxSjjXQQqtEpklJcj1xjIol\r\nZYI1avqogbrL2BYufVMKvnF6UQ2vOYUf3MJrV9a1zYrXSXfkLvNVOqR6c7ht\r\n+J15KVsc1J8Y9bOfFJ59te1U4VOEpwjMAXc=\r\n=6lHa\r\n-----END PGP SIGNATURE-----\r\n","size":2181,"noattachment":false,"key":"/get-current-version/-/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,"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\nSee [`get-current-package`](https://github.com/fabiospampinato/get-current-package) for a more general version of this package.\n\n## Install\n\n```sh\nnpm install 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"},"license":"MIT"}