# supi

> Fast, disk space efficient installation engine

Latest version **0.47.27** (published 2021-10-16) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install supi
pnpm add supi
yarn add supi
bun add supi
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.47.27 |
| Published | 2021-10-16 |
| First published | 2017-06-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=12.17 |
| Dependencies | 48 |
| Unpacked size | 193 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 36783 |
| Maintainers | zkochan, etamponi, pnpmuser |
| Keywords | pnpm6, dependency manager, install, installer, uninstall, remove, link, prune, shrinkwrap, lockfile, fast, rapid, efficient, package.json, packages, dependencies, symlinks, hardlinks, modules, npm, package manager |

## Links

- npm: https://www.npmjs.com/package/supi
- Repository: https://github.com/pnpm/pnpm/blob/master/packages/supi
- Homepage: https://github.com/pnpm/pnpm/blob/master/packages/supi#readme
- Issues: https://github.com/pnpm/pnpm/issues
- Funding: https://opencollective.com/pnpm
- npm.io page: https://npm.io/package/supi

## Dependencies (48)

- [ramda](https://npm.io/package/ramda.md) ^0.27.1
- [semver](https://npm.io/package/semver.md) ^7.3.4
- [p-every](https://npm.io/package/p-every.md) ^2.0.0
- [p-limit](https://npm.io/package/p-limit.md) ^3.1.0
- [p-filter](https://npm.io/package/p-filter.md) ^2.1.0
- [is-subdir](https://npm.io/package/is-subdir.md) ^1.1.1
- [run-groups](https://npm.io/package/run-groups.md) ^3.0.1
- [@pnpm/error](https://npm.io/package/@pnpm/error.md) 2.0.0
- [@pnpm/hoist](https://npm.io/package/@pnpm/hoist.md) 5.2.0
- [@pnpm/types](https://npm.io/package/@pnpm/types.md) 7.4.0
- [path-exists](https://npm.io/package/path-exists.md) ^4.0.0
- [semver-utils](https://npm.io/package/semver-utils.md) ^1.1.4
- [is-inner-link](https://npm.io/package/is-inner-link.md) ^4.0.0
- [path-absolute](https://npm.io/package/path-absolute.md) ^1.0.1
- [@pnpm/headless](https://npm.io/package/@pnpm/headless.md) 16.1.3
- [load-json-file](https://npm.io/package/load-json-file.md) ^6.2.0
- [normalize-path](https://npm.io/package/normalize-path.md) ^3.0.0
- [@pnpm/constants](https://npm.io/package/@pnpm/constants.md) 5.0.0
- [@pnpm/lifecycle](https://npm.io/package/@pnpm/lifecycle.md) 11.0.5
- [@pnpm/link-bins](https://npm.io/package/@pnpm/link-bins.md) 6.2.0
- [@zkochan/rimraf](https://npm.io/package/@zkochan/rimraf.md) ^2.1.1
- [dependency-path](https://npm.io/package/dependency-path.md) 8.0.4
- [graph-sequencer](https://npm.io/package/graph-sequencer.md) 2.0.0
- [@pnpm/get-context](https://npm.io/package/@pnpm/get-context.md) 5.1.5
- [@pnpm/remove-bins](https://npm.io/package/@pnpm/remove-bins.md) 2.0.6
- [@pnpm/core-loggers](https://npm.io/package/@pnpm/core-loggers.md) 6.0.4
- [@pnpm/modules-yaml](https://npm.io/package/@pnpm/modules-yaml.md) 9.0.4
- [@pnpm/build-modules](https://npm.io/package/@pnpm/build-modules.md) 7.1.1
- [@pnpm/lockfile-file](https://npm.io/package/@pnpm/lockfile-file.md) 4.1.1
- [@pnpm/resolver-base](https://npm.io/package/@pnpm/resolver-base.md) 8.0.4
- [@pnpm/lockfile-utils](https://npm.io/package/@pnpm/lockfile-utils.md) 3.0.8
- [@pnpm/manifest-utils](https://npm.io/package/@pnpm/manifest-utils.md) 2.1.0
- [@pnpm/prune-lockfile](https://npm.io/package/@pnpm/prune-lockfile.md) 3.0.8
- [@pnpm/filter-lockfile](https://npm.io/package/@pnpm/filter-lockfile.md) 5.0.8
- [@pnpm/lockfile-to-pnp](https://npm.io/package/@pnpm/lockfile-to-pnp.md) 0.4.26
- [@pnpm/lockfile-walker](https://npm.io/package/@pnpm/lockfile-walker.md) 4.0.8
- [@pnpm/modules-cleaner](https://npm.io/package/@pnpm/modules-cleaner.md) 11.0.12
- [version-selector-type](https://npm.io/package/version-selector-type.md) ^3.0.0
- [@pnpm/read-modules-dir](https://npm.io/package/@pnpm/read-modules-dir.md) 3.0.1
- [@pnpm/package-requester](https://npm.io/package/@pnpm/package-requester.md) 15.1.2
- [@pnpm/read-package-json](https://npm.io/package/@pnpm/read-package-json.md) 5.0.4
- [@pnpm/symlink-dependency](https://npm.io/package/@pnpm/symlink-dependency.md) 4.0.5
- [@zkochan/npm-package-arg](https://npm.io/package/@zkochan/npm-package-arg.md) ^2.0.1
- [@pnpm/normalize-registries](https://npm.io/package/@pnpm/normalize-registries.md) 2.0.4
- [@pnpm/resolve-dependencies](https://npm.io/package/@pnpm/resolve-dependencies.md) 21.0.6
- [@pnpm/read-project-manifest](https://npm.io/package/@pnpm/read-project-manifest.md) 2.0.5
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) 11.0.5
- [@pnpm/parse-wanted-dependency](https://npm.io/package/@pnpm/parse-wanted-dependency.md) 2.0.0

## Alternatives

- [monaco-yaml](https://npm.io/package/monaco-yaml.md) — 420.1K weekly downloads
- [@crewx/workflow](https://npm.io/package/@crewx/workflow.md) — 3.1K weekly downloads
- [yaml-cat](https://npm.io/package/yaml-cat.md) — 38 weekly downloads
- [nunjucks-in-yaml](https://npm.io/package/nunjucks-in-yaml.md) — 9 weekly downloads
- [shopify-symlinks](https://npm.io/package/shopify-symlinks.md) — 3 weekly downloads

## Recent versions

- 0.47.27 (latest) — 2021-10-16
- 0.0.0-20201060511 (dev) — 2020-11-06
- 0.41.19 (pnpm-temp) — 2020-08-16
- 0.38.28 (next) — 2020-04-17
- 0.30.0-3 (next-major) — 2019-03-04
- 0.47.26 — 2021-10-11
- 0.47.25 — 2021-10-10
- 0.47.24 — 2021-10-04
- 0.47.23 — 2021-09-28
- 0.47.22 — 2021-09-26
- 0.47.21 — 2021-09-16
- 0.47.20 — 2021-09-13
- 0.47.19 — 2021-09-06
- 0.47.18 — 2021-09-03
- 0.47.17 — 2021-08-29
- … 456 more at https://npm.io/package/supi/versions

## README

<p align="center">
  <img alt="supi - pnpm's installation engine" src="https://cdn.rawgit.com/pnpm/supi/master/logo.svg" width="200">
</p>

# supi

> Fast, disk space efficient installation engine. Used by [pnpm](https://github.com/pnpm/pnpm)

## Install

Install it via npm.

```
<pnpm|yarn|npm> add supi
```

It also depends on `@pnpm/logger` version `1`, so install it as well via:

```
<pnpm|yarn|npm> add @pnpm/logger@1
```

## API

### `supi.mutateModules(importers, options)`

TODO

### `supi.link(linkFromPkgs, linkToModules, [options])`

Create symbolic links from the linked packages to the target package's `node_modules` (and its `node_modules/.bin`).

**Arguments:**

* `linkFromPkgs` - *String[]* - paths to the packages that should be linked.
* `linkToModules` - *String* - path to the dependent package's `node_modules` directory.
* `options.reporter` - *Function* - A function that listens for logs.

### `supi.linkToGlobal(linkFrom, options)`

Create a symbolic link from the specified package to the global `node_modules`.

**Arguments:**

* `linkFrom` - *String* - path to the package that should be linked.
* `globalDir` - *String* - path to the global directory.
* `options.reporter` - *Function* - A function that listens for logs.

### `supi.linkFromGlobal(pkgNames, linkTo, options)`

Create symbolic links from the global `pkgName`s to the `linkTo/node_modules` folder.

**Arguments:**

* `pkgNames` - *String[]* - packages to link.
* `linkTo` - *String* - package to link to.
* `globalDir` - *String* - path to the global directory.
* `options.reporter` - *Function* - A function that listens for logs.

### `supi.storeStatus([options])`

Return the list of modified dependencies.

**Arguments:**

* `options.reporter` - *Function* - A function that listens for logs.

**Returns:** `Promise<string[]>` - the paths to the modified packages of the current project. The paths contain the location of packages in the store,
not in the projects `node_modules` folder.

### `supi.storePrune([options])`

Remove unreferenced packages from the store.

## Hooks

Hooks are functions that can step into the installation process.

### `readPackage(pkg)`

This hook is called with every dependency's manifest information.
The modified manifest returned by this hook is then used by supi during installation.

**Example:**

```js
const supi = require('supi')

supi.installPkgs({
  hooks: {readPackage}
})

function readPackage (pkg) {
  if (pkg.name === 'foo') {
    pkg.dependencies = {
      bar: '^2.0.0',
    }
  }
  return pkg
}
```

### `afterAllResolved(lockfile: Lockfile): Lockfile`

This hook is called after all dependencies are resolved. It recieves and returns the resolved lockfile object.

## Acknowledgements

Thanks to [Valentina Kozlova](https://github.com/ValentinaKozlova) for the supi logo

## License

[MIT](LICENSE)

---
_Source: https://npm.io/package/supi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
