Skip to content

📦 Experimental npm package manager. Installs from package.json/package-lock.json, and runs bin scripts.

License

Notifications You must be signed in to change notification settings

healeycodes/caladan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📦 caladan

My blog post: Installing NPM Packages Very Quickly


Very experimental package manager. Mostly for learning about the performance of installing npm packages.

For now, it installs npm packages from a valid package.json, or from a valid package-lock.json, and it can also run bin scripts.

Usage:
  caladan install <directory>
  caladan install-lockfile <directory>
  caladan run <directory> <script> <args>

To install from package-lock.json:

./build.sh
./caladan install-lockfile fixtures/1

To install from package.json:

./build.sh
./caladan install fixtures/1

Then, to run a script:

./caladan run fixtures/1 next info

Current issues

I can't find an npm-compatible semver library written in Go (or, written in something I can easily call from Go like C). So for now, I call semver in Node.js via stdin/stdout (and it's very slow!) 😭

This doesn't affect install-lockfile as we don't resolve versions (it works like "frozen lockfile").


Tests

go test ./...

Benchmark

Compare caladan install-lockfile to bun install.

Requires hyperfine.

./benchmark.sh

Create CPU Profiles

Outputs two profiles (with and without the unzip semaphore).

./profile.sh

Named after the third planet orbiting the star Delta Pavonis.

About

📦 Experimental npm package manager. Installs from package.json/package-lock.json, and runs bin scripts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published