Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
libnpmpack
Advanced tools
libnpmpack
is a Node.js library for
programmatically 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.
const pack = require('libnpmpack')
$ npm install libnpmpack
> pack(spec, [opts]) -> Promise
Packs 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.
If no options are passed, the tarball file will be saved on the same directory from which pack
was called in.
libnpmpack
uses pacote
.
Most options are passed through directly to that library, so please refer to
its own opts
documentation
for options that can be passed in.
// packs from cwd
const tarball = await pack()
// packs from a local directory
const localTar = await pack('/Users/claudiahdz/projects/my-cool-pkg')
// packs from a registry spec
const registryTar = await pack('abbrev@1.0.3')
// packs from a github spec
const githubTar = await pack('isaacs/rimraf#PR-192')
FAQs
Programmatic API for the bits behind npm pack
The npm package libnpmpack receives a total of 241,857 weekly downloads. As such, libnpmpack popularity was classified as popular.
We found that libnpmpack demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.