{"id":17398465,"url":"https://github.com/vweevers/packument","last_synced_at":"2025-09-02T04:04:02.788Z","repository":{"id":32030065,"uuid":"131410226","full_name":"vweevers/packument","owner":"vweevers","description":"Fetch package metadata from the npm registry","archived":false,"fork":false,"pushed_at":"2023-06-01T07:57:30.000Z","size":13,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-02T04:02:31.926Z","etag":null,"topics":["npm","npm-registry","packument"],"latest_commit_sha":null,"homepage":"","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/vweevers.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}},"created_at":"2018-04-28T13:05:08.000Z","updated_at":"2023-03-07T17:56:07.000Z","dependencies_parsed_at":"2024-06-19T17:35:16.111Z","dependency_job_id":null,"html_url":"https://github.com/vweevers/packument","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/vweevers/packument","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fpackument","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fpackument/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fpackument/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fpackument/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vweevers","download_url":"https://codeload.github.com/vweevers/packument/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vweevers%2Fpackument/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273227972,"owners_count":25067691,"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-02T02:00:09.530Z","response_time":77,"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":["npm","npm-registry","packument"],"created_at":"2024-10-16T14:56:57.219Z","updated_at":"2025-09-02T04:04:02.713Z","avatar_url":"https://github.com/vweevers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# packument\n\n**Fetch package metadata from the npm registry. Supports scopes and private registries. If you only need the metadata of a specific version, use [`packument-package`](https://www.npmjs.org/package/packument-package).**\n\n[![npm](https://img.shields.io/npm/v/packument.svg)](https://www.npmjs.com/package/packument)\n[![node](https://img.shields.io/node/v/packument.svg)](https://www.npmjs.com/package/packument)\n[![Test](https://img.shields.io/github/workflow/status/vweevers/packument/Test?label=test)](https://github.com/vweevers/packument/actions/workflows/test.yml)\n[![Standard](https://img.shields.io/badge/standard-informational?logo=javascript\u0026logoColor=fff)](https://standardjs.com)\n\n## example\n\n```js\nconst packument = require('packument')\n\npackument('levelup', (err, result) =\u003e {\n  if (err) throw err\n  console.log(result.versions['2.0.2'].dependencies)\n})\n```\n\n## `packument(name[, opts], callback)`\n\nCallback receives an error if any, a packument and response headers. Options:\n\n- `headers`: custom headers (you can override any)\n- `keepAlive`: shortcut for `headers: { connection: 'keep-alive' }`\n- `full`: if true, fetch full metadata rather than an [abbreviated document](https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md).\n\n## `packument = packument.factory(opts)`\n\nPreconfigure the function. For example, to always fetch full metadata:\n\n```js\nconst packument = require('packument').factory({ full: true })\n\npackument('levelup', (err, result) =\u003e {\n  if (err) throw err\n  console.log(result._rev)\n})\n```\n\nCombine it with an in-memory cache:\n\n```js\nconst memoize = require('thunky-with-args')\nconst packument = memoize(require('packument').factory({ full: true }))\n\npackument('levelup', (err, result) =\u003e {\n  // It will make only one request\n})\n\npackument('levelup', (err, result) =\u003e {\n  // Subsequent calls for the same package are cached\n})\n```\n\nReuse that cache in other modules:\n\n```js\nconst memoize = require('thunky-with-args')\nconst packument = memoize(require('packument'))\nconst getPackage = require('packument-package').factory(packument)\n\ngetPackage('levelup', '~2.0.0', function (err, pkg) {\n  if (err) throw err\n  console.log(pkg.version)\n})\n```\n\n## install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install packument\n```\n\n## license\n\n[MIT](http://opensource.org/licenses/MIT) © Vincent Weevers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Fpackument","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvweevers%2Fpackument","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvweevers%2Fpackument/lists"}