7,363 open-source and SaaS tools, with GitHub stats refreshed every day.

Shrinkpack

Open source

shrinkpack is a CLI that stores your npm dependency tarballs in source control and rewrites package-lock.json so installs work offline.

GitHub stars
800
Last commit
3 yr ago
Repository age
11 years
Version
0.20.0
Licence
MIT
Self-hosted
Yes

About Shrinkpack

shrinkpack is a command-line tool for making npm installs fast, resilient and reproducible. It points your package-lock.json at dependency tarballs that are checked into your project's repository, so you can install while offline, during a registry outage, or when a package disappears from the registry.

It reads package-lock.json or npm-shrinkwrap.json, downloads the exact archives npm would fetch from the registry, decompresses the .tgz files into .tar files to avoid storing binary blobs in Git, saves them in a node_shrinkpack folder and rewrites the lockfile to reference them. The rest of the install process is unchanged, but no network access is needed. You run it each time you change and install dependencies.

shrinkpack requires npm 7 or higher, is written in TypeScript and is released under the MIT license. Its topics mention yarn and pnpm, and the README includes a history from 2015 describing how it related to events such as the left-pad incident. It suits teams that need dependable CI builds independent of the public registry.

Key features

  • Rewrites package-lock.json to local tarballs
  • Offline npm installs
  • Stores uncompressed .tar files in Git
  • Protects builds from registry outages
  • Works from package-lock or shrinkwrap files

Good fit for

  • β†’Reproducible CI builds
  • β†’Installing dependencies without registry access
Built with
TypeScript
Tags
npm
lockfile
offline-mirror
ci
dependencies
cli
shrinkwrap
package-lock

Shrinkpack: questions and answers

What is Shrinkpack used for?
shrinkpack is a CLI that stores your npm dependency tarballs in source control and rewrites package-lock.json so installs work offline. It is a good fit for reproducible CI builds and installing dependencies without registry access.
Is Shrinkpack open source?
Yes. Shrinkpack is open source under the MIT licence. Its source code is on GitHub at JamieMason/shrinkpack and is written mainly in TypeScript.
Is Shrinkpack free?
Yes. Shrinkpack is open source, so the software itself is free to use.
What are some alternatives to Shrinkpack?
Similar open-source tools in the Developer Tools category include Tach, PhpMetrics and Statoscope. SaaS products in the same category include act101, Amicro and Angular Material Blocks.
Is Shrinkpack actively maintained?
The most recent commit to Shrinkpack was on 16 February 2023, and the latest release is 0.20.0, published on 3 January 2022. The project has 800 stars on GitHub.

Open-source alternatives to Shrinkpack

See all

SaaS alternatives to Shrinkpack

See all