• Stars
    star
    567
  • Rank 78,634 (Top 2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 2 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

JavaScript package manager

โšก Ultra is a faster and lightweight alternative for NPM

๐Ÿ“š Documentation ย ย โ€ขย ย  ๐Ÿ“ฆ Examples ย ย โ€ขย ย  โšก Benchmarks

๐Ÿš€ Getting Started

๐Ÿšง This project still in an early stage of development, for now you should only use it to test it.

You will need:

  • ๐Ÿƒ Node.js v16 or higher.
  • ๐Ÿ’ป Linux or Mac OS (Partial support for Windows).

Install:

npm i ultra-pkg -g

๐Ÿ”ญ Commands

Command Description
ultra install [pkg (optional), flags] Install packages.
ultra run <script> <params> Run script from package.json
ultra create <template> <arguments> Create a project from a template (Similar to npm create).
ultra benchmark Tests ULTRA against NPM, Yarn Classic, PNPM and Bun.
ultra clear Remove .ultra-cache and manifests cache, node_modules and ultra.lock.
ultra ls <pkg> Show versions installed by ULTRA.
ultra remove <pkg> Remove a dependency from the package.json
ultra set registry <url> Set default registry
ultra ci Installs dependencies from ultra.lock without cache (WIP)

๐Ÿ—’๏ธ Todo

  • Make it work in some JS Frameworks (Follow progress here).
  • Fix monorepos integration (WIP, degradated performance in some repos).

๐Ÿค” FAQ

  • Why is it faster?

ULTRA uses the same installation system as PNPM, fetch dependency, download dependency. Without waiting for the rest of the dependencies.

Now you are probably wondering how that makes the space more efficient than in NPM.

Each dependency is a hard link to a common store inside .ultra-cache, so all your projects use shared dependencies.

  • It works?

I've selected some quickstart templates to test ULTRA, and I'm working on make it work in all of them.

If you want to test a template, you can use Next or Vite for example, I've already tested them and it should work.

(If you want to test a template and it doesn't work, please open an issue)

โšก Benchmarks

  • โ–ฒ Next.js with TypeScript:

This example is generated using npx create-next-app --use-npm --ts

  Node.js: v18.10.0
  OS: linux
  ULTRA version: 0.6.9
  Current project: next-ultra (0.1.0)

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ (index) โ”‚                      name                       โ”‚   time   โ”‚ group โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚    0    โ”‚   'Bun install (with cache / with lockfile)'    โ”‚ '0.17s'  โ”‚   3   โ”‚
โ”‚    1    โ”‚   'ULTRA install (with cache / with lockfile)'  โ”‚ '0.92s'  โ”‚   3   โ”‚
โ”‚    2    โ”‚    'ULTRA install (with cache / no lockfile)'   โ”‚ '1.12s'  โ”‚   2   โ”‚
โ”‚    3    โ”‚   'PNPM install (with cache / with lockfile)'   โ”‚ '3.34s'  โ”‚   3   โ”‚
โ”‚    4    โ”‚    'PNPM install (with cache / no lockfile)'    โ”‚ '4.58s'  โ”‚   2   โ”‚
โ”‚    5    โ”‚   'YARN install (with cache / with lockfile)'   โ”‚ '5.12s'  โ”‚   3   โ”‚
โ”‚    6    โ”‚   'NPM install (with cache / with lockfile)'    โ”‚ '6.02s'  โ”‚   3   โ”‚
โ”‚    7    โ”‚    'Bun install (with cache / no lockfile)'     โ”‚ '6.74s'  โ”‚   2   โ”‚
โ”‚    8    โ”‚    'NPM install (with cache / no lockfile)'     โ”‚ '7.81s'  โ”‚   2   โ”‚
โ”‚    9    โ”‚     'Bun install (no cache / no lockfile)'      โ”‚ '17.12s' โ”‚   1   โ”‚
โ”‚   10    โ”‚     'ULTRA install (no cache / no lockfile)'    โ”‚ '17.83s' โ”‚   1   โ”‚
โ”‚   11    โ”‚     'PNPM install (no cache / no lockfile)'     โ”‚ '18.45s' โ”‚   1   โ”‚
โ”‚   12    โ”‚    'YARN install (with cache / no lockfile)'    โ”‚ '21.30s' โ”‚   2   โ”‚
โ”‚   13    โ”‚     'NPM install (no cache / no lockfile)'      โ”‚ '24.26s' โ”‚   1   โ”‚
โ”‚   14    โ”‚     'YARN install (no cache / no lockfile)'     โ”‚ '49.79s' โ”‚   1   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  • Vite with TypeScript:

This example is generated using npx create-vite-app --template react-ts

Node.js: v18.10.0
OS: linux
ULTRA version: 0.6.9
Current project: ultra-vite-demo (0.0.0)

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ (index) โ”‚                      name                       โ”‚   time   โ”‚ group โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚    0    โ”‚   'Bun install (with cache / with lockfile)'    โ”‚ '0.05s'  โ”‚   3   โ”‚
โ”‚    1    โ”‚    'ULTRA install (with cache / no lockfile)'   โ”‚ '0.52s'  โ”‚   2   โ”‚
โ”‚    2    โ”‚   'ULTRA install (with cache / with lockfile)'  โ”‚ '0.56s'  โ”‚   3   โ”‚
โ”‚    3    โ”‚   'YARN install (with cache / with lockfile)'   โ”‚ '1.35s'  โ”‚   3   โ”‚
โ”‚    4    โ”‚   'PNPM install (with cache / with lockfile)'   โ”‚ '1.43s'  โ”‚   3   โ”‚
โ”‚    5    โ”‚   'NPM install (with cache / with lockfile)'    โ”‚ '2.24s'  โ”‚   3   โ”‚
โ”‚    6    โ”‚    'NPM install (with cache / no lockfile)'     โ”‚ '2.88s'  โ”‚   2   โ”‚
โ”‚    7    โ”‚     'Bun install (no cache / no lockfile)'      โ”‚ '3.23s'  โ”‚   1   โ”‚
โ”‚    8    โ”‚    'PNPM install (with cache / no lockfile)'    โ”‚ '3.60s'  โ”‚   2   โ”‚
โ”‚    9    โ”‚    'Bun install (with cache / no lockfile)'     โ”‚ '3.62s'  โ”‚   2   โ”‚
โ”‚   10    โ”‚    'YARN install (with cache / no lockfile)'    โ”‚ '6.35s'  โ”‚   2   โ”‚
โ”‚   11    โ”‚     'PNPM install (no cache / no lockfile)'     โ”‚ '6.58s'  โ”‚   1   โ”‚
โ”‚   12    โ”‚     'ULTRA install (no cache / no lockfile)'    โ”‚ '7.75s'  โ”‚   1   โ”‚
โ”‚   13    โ”‚     'YARN install (no cache / no lockfile)'     โ”‚ '11.51s' โ”‚   1   โ”‚
โ”‚   14    โ”‚     'NPM install (no cache / no lockfile)'      โ”‚ '16.38s' โ”‚   1   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

The commands with no-cache executes npm cache clean -f to delete NPM Cache files and runs ultra clear to remove Ultra cache folders.

๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘ Contributors

Made with contrib.rocks.