{"id":15290359,"url":"https://github.com/npm/libnpmpack","last_synced_at":"2025-10-07T03:33:16.645Z","repository":{"id":46563859,"uuid":"246660974","full_name":"npm/libnpmpack","owner":"npm","description":"Programmatic API for the bits behind npm pack","archived":true,"fork":false,"pushed_at":"2022-01-18T21:33:39.000Z","size":668,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-01T16:07:19.478Z","etag":null,"topics":["npm-cli"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/npm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-11T19:23:01.000Z","updated_at":"2023-01-28T03:56:19.000Z","dependencies_parsed_at":"2022-09-05T16:51:46.203Z","dependency_job_id":null,"html_url":"https://github.com/npm/libnpmpack","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npm%2Flibnpmpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npm%2Flibnpmpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npm%2Flibnpmpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npm%2Flibnpmpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/npm","download_url":"https://codeload.github.com/npm/libnpmpack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235586106,"owners_count":19014028,"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","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-cli"],"created_at":"2024-09-30T16:07:27.730Z","updated_at":"2025-10-07T03:33:11.309Z","avatar_url":"https://github.com/npm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# We've Moved! 🚚\nThe code for this repo is now a workspace in the npm CLI repo.\n\n[github.com/npm/cli](https://github.com/npm/cli)\n\nYou can find the workspace in /workspaces/libnpmpack\n\nPlease file bugs and feature requests as issues on the CLI and tag the issue with \"ws:libnpmpack\".\n\n[github.com/npm/cli/issues](https://github.com/npm/cli)\n\n# libnpmpack\n\n[![npm version](https://img.shields.io/npm/v/libnpmpack.svg)](https://npm.im/libnpmpack)\n[![license](https://img.shields.io/npm/l/libnpmpack.svg)](https://npm.im/libnpmpack)\n[![GitHub Actions](https://github.com/npm/libnpmpack/workflows/Node%20CI/badge.svg)](https://github.com/npm/libnpmpack/actions?query=workflow%3A%22Node+CI%22)\n[![Coverage Status](https://coveralls.io/repos/github/npm/libnpmpack/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmpack?branch=latest)\n\n[`libnpmpack`](https://github.com/npm/libnpmpack) is a Node.js library for\nprogrammatically packing tarballs from a local directory or from a registry or github spec. If packing from a local source, `libnpmpack` will also run the `prepack` and `postpack` lifecycles.\n\n## Table of Contents\n\n* [Example](#example)\n* [Install](#install)\n* [API](#api)\n  * [`pack()`](#pack)\n\n## Example\n\n```js\nconst pack = require('libnpmpack')\n```\n\n## Install\n\n`$ npm install libnpmpack`\n\n### API\n\n#### \u003ca name=\"pack\"\u003e\u003c/a\u003e `\u003e pack(spec, [opts]) -\u003e Promise`\n\nPacks a tarball from a local directory or from a registry or github spec and returns a Promise that resolves to the tarball data Buffer, with from, resolved, and integrity fields attached.\n\nIf no options are passed, the tarball file will be saved on the same directory from which `pack` was called in.\n \n`libnpmpack` uses [`pacote`](https://npm.im/pacote).\nMost options are passed through directly to that library, so please refer to\n[its own `opts`\ndocumentation](https://www.npmjs.com/package/pacote#options)\nfor options that can be passed in.\n\n##### Examples\n\n```javascript\n// packs from cwd\nconst tarball = await pack()\n\n// packs from a local directory\nconst localTar = await pack('/Users/claudiahdz/projects/my-cool-pkg')\n\n// packs from a registry spec\nconst registryTar = await pack('abbrev@1.0.3')\n\n// packs from a github spec\nconst githubTar = await pack('isaacs/rimraf#PR-192')\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpm%2Flibnpmpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnpm%2Flibnpmpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpm%2Flibnpmpack/lists"}