{"id":30920704,"url":"https://github.com/stabldev/pkgversion","last_synced_at":"2026-05-16T08:04:07.505Z","repository":{"id":307937845,"uuid":"1031104230","full_name":"stabldev/pkgversion","owner":"stabldev","description":"A tiny Node.js utility to retrieve the installed version of a package.","archived":false,"fork":false,"pushed_at":"2025-08-03T05:05:06.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-03T19:06:07.099Z","etag":null,"topics":["nodejs","package","utility-library","version-checker"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@stabldev/pkgversion","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stabldev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-03T02:45:07.000Z","updated_at":"2025-08-03T05:05:09.000Z","dependencies_parsed_at":"2025-08-03T07:19:50.094Z","dependency_job_id":null,"html_url":"https://github.com/stabldev/pkgversion","commit_stats":null,"previous_names":["stabldev/pkgversion"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stabldev/pkgversion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stabldev%2Fpkgversion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stabldev%2Fpkgversion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stabldev%2Fpkgversion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stabldev%2Fpkgversion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stabldev","download_url":"https://codeload.github.com/stabldev/pkgversion/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stabldev%2Fpkgversion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274397597,"owners_count":25277399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nodejs","package","utility-library","version-checker"],"created_at":"2025-09-10T01:48:56.901Z","updated_at":"2026-05-16T08:04:02.471Z","avatar_url":"https://github.com/stabldev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pkgversion\n\n![NPM Version](https://img.shields.io/npm/v/%40stabldev%2Fpkgversion?style=flat-square)\n![npm bundle size](https://img.shields.io/bundlephobia/minzip/%40stabldev%2Fpkgversion?style=flat-square)\n![NPM Type Definitions](https://img.shields.io/npm/types/%40stabldev%2Fpkgversion?style=flat-square)\n![NPM License](https://img.shields.io/npm/l/%40stabldev%2Fpkgversion?style=flat-square)\n\nA tiny Node.js utility to retrieve the installed version of a package.\n\n## Installation\n\n```bash\nnpm i @stabldev/pkgversion\n````\n\n## Usage\n\n```js\nimport pkgversion from \"@stabldev/pkgversion\"\n\nconst reactVersion = pkgversion(\"react\")\nconsole.log(reactVersion) // e.g., \"19.1.1\"\n```\n\n## API Reference\n\n```ts\npkgversion(pkgName: string, baseDir?: string): string | null\n```\n\n* `pkgName`: The name of the installed package (e.g., `\"react\"`).\n* `baseDir` (optional): Directory to start from (defaults to `process.cwd()`).\n\n## License\n\n[MIT](https://github.com/stabldev/pkgversion/blob/main/LICENSE) Copyright (c) [stabldev](https://github.com/stabldev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstabldev%2Fpkgversion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstabldev%2Fpkgversion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstabldev%2Fpkgversion/lists"}