open-index/open-npm huggingface dataset:
npm package: @pnpm/license-scanner
Description: Check for licenses packages
Latest version: 1001.0.40

# @pnpm/license-scanner

> Check for the license of packages

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/license-scanner.svg)](https://www.npmjs.com/package/@pnpm/license-scanner)
<!--/@-->

## Installation

```sh
pnpm add @pnpm/license-scanner
```

## License

[MIT](LICENSE)
npm package: @pnpm/lifecycle
Description: Package lifecycle hook runner
Latest version: 1001.0.37

# @pnpm/lifecycle

> Package lifecycle hook runner

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/lifecycle.svg)](https://www.npmjs.com/package/@pnpm/lifecycle)
<!--/@-->

## Installation

```sh
pnpm add @pnpm/logger @pnpm/lifecycle
```

## Usage

```ts
import runLifecycleHook, {runPostinstallHooks} from '@pnpm/lifecycle'

const targetPkgRoot = path.resolve('node_modules/target-pkg')
const pkg = require(path.join(targetPkgRoot, 'package.json'))

// Run a specific hook
await runLifecycleHook('preinstall', pkg, {
  pkgId: 'target-pkg/1.0.0',
  pkgRoot: targetPkgRoot,
  rawConfig: {},
  rootModulesDir: path.resolve('node_modules'),
  unsafePerm: true,
})

// Run all install hooks
await runPostinstallHooks({
  pkgId: 'target-pkg/1.0.0',
  pkgRoot: targetPkgRoot,
  rawConfig: {},
  rootModulesDir: path.resolve('node_modules'),
  unsafePerm: true,
})
```

## API

### `runLifecycleHook(stage, packageManifest, opts): Promise<void>`

### `runPostinstallHooks(opts): Promise<void>`

## License

MIT
npm package: @pnpm/link-bins
Description: Link bins to node_modules/.bin
Latest version: 1000.3.8

# @pnpm/link-bins

> Link bins to node_modules/.bin

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/link-bins.svg)](https://www.npmjs.com/package/@pnpm/link-bins)
<!--/@-->

## Installation

```sh
pnpm add @pnpm/link-bins
```

## Usage

```ts
import linkBins, {linkBinsOfPackages} from '@pnpm/link-bins'

function warn (msg) { console.warn(msg) }

await linkBins('node_modules', 'node_modules/.bin', {warn})

const packages = [{manifest: packageJson, location: pathToPackage}]
await linkBinsOfPackages(packages, 'node_modules/.bin', {warn})
```

## License

[MIT](./LICENSE)
npm package: @pnpm/list
Description: List installed packages in a symlinked `node_modules`
Latest version: 1000.3.4

# @pnpm/list

> List installed packages in a symlinked \`node_modules\`

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/list.svg)](https://www.npmjs.com/package/@pnpm/list)
<!--/@-->

## Installation

```
pnpm add @pnpm/list
```

## License

MIT
npm package: @pnpm/local-resolver
Description: Resolver for local packages
Latest version: 1002.1.13

# @pnpm/local-resolver

> Resolver for local packages

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/local-resolver.svg)](https://www.npmjs.com/package/@pnpm/local-resolver)
<!--/@-->

## Installation

```
pnpm add @pnpm/local-resolver
```

## Usage

```js
'use strict'
const resolveFromLocal = require('@pnpm/local-resolver').default

resolveFromLocal({bareSpecifier: './example-package'}, {prefix: process.cwd()})
  .then(resolveResult => console.log(resolveResult))
//> { id: 'link:example-package',
//    normalizedBareSpecifier: 'link:example-package',
//    package:
//     { name: 'foo',
//       version: '1.0.0',
//       readme: '# foo\n',
//       readmeFilename: 'README.md',
//       description: '',
//       _id: 'foo@1.0.0' },
//    resolution: { directory: 'example-package', type: 'directory' }
//    resolvedVia: 'local-filesystem' }
```

## License

MIT
npm package: @pnpm/lockfile-file
Description: Read/write pnpm-lock.yaml files
Latest version: 9.1.3

# @pnpm/lockfile-file

> Read/write pnpm-lock.yaml files

Reads and writes the wanted (`pnpm-lock.yaml`) and current (`node_modules/.pnpm-lock.yaml`) lockfile files of pnpm.
Lockfile files are the state files of the `node_modules` installed via pnpm. They are like
the `package-lock.json` of npm or the `yarn.lock` of Yarn.

## Install

```
pnpm add @pnpm/lockfile-file
```

## API

### `readWantedLockfile(pkgPath, opts) => Promise<Lockfile>`

Reads the `pnpm-lock.yaml` file from the root of the package.

#### Arguments

* `pkgPath` - *Path* - the path to the project
* `opts.ignoreIncompatible` - *Boolean* - `false` by default. If `true`, throws an error
if the lockfile file format is not compatible with the current library.

### `readCurrentLockfile(virtualStoreDir, opts) => Promise<Lockfile>`

Reads the lockfile file from `<virtualStoreDir>/lock.yaml`.

### `existsNonEmptyWantedLockfile(pkgPath) => Promise<Boolean>`

Returns `true` if a `pnpm-lock.yaml` exists in the root of the package.

### `writeLockfiles(opts) => Promise<void>`

Writes the wanted/current lockfile files. When they are empty, removes them.

#### Arguments

* `opts.wantedLockfile`
* `opts.wantedLockfileDir`
* `opts.currentLockfile`
* `opts.currentLockfileDir`
* `[opts.forceSharedFormat]`

### `writeWantedLockfile(pkgPath, wantedLockfile) => Promise<void>`

Writes the wanted lockfile file only. Sometimes it is needed just to update the wanted lockfile
without touching `node_modules`.

### `writeCurrentLockfile(virtualStoreDir, currentLockfile) => Promise<void>`

Writes the current lockfile file only.

## License

[MIT](LICENSE)
npm package: @pnpm/lockfile-to-pnp
Description: Creates a Plug'n'Play file from a pnpm-lock.yaml
Latest version: 1001.0.34

# @pnpm/lockfile-to-pnp

> Creates a Plug'n'Play file from a pnpm-lock.yaml

[![npm version](https://img.shields.io/npm/v/@pnpm/lockfile-to-pnp.svg)](https://www.npmjs.com/package/@pnpm/lockfile-to-pnp)

## Installation

```
pnpm add -g @pnpm/lockfile-to-pnp
```

## License 

MIT
npm package: @pnpm/make-dedicated-lockfile
Description: Creates a dedicated lockfile for a subset of workspace projects
Latest version: 1000.0.41

# @pnpm/make-dedicated-lockfile

> Creates a dedicated lockfile for a subset of workspace projects

[![npm version](https://img.shields.io/npm/v/@pnpm/make-dedicated-lockfile.svg)](https://www.npmjs.com/package/@pnpm/make-dedicated-lockfile)

**This package is deprecated. Please use the [pnpm deploy] command instead.**

[pnpm deploy]: https://pnpm.io/cli/deploy

## Installation

```sh
pnpm add @pnpm/make-dedicated-lockfile
```

## Usage

Open the directory of the workspace project that you want to create a dedicated lockfile for.

Run `make-dedicated-lockfile` in the terminal.

A new lockfile will be generated, using dependencies from the shared workspace lockfile but
only those that are related to the project in the current working directory or subdirectories.

## License

MIT
npm package: @pnpm/matcher
Description: A simple pattern matcher for pnpm
Latest version: 1000.1.0

# @pnpm/matcher

> A simple pattern matcher for pnpm

## Install

```
pnpm add @pnpm/matcher
```

## Usage

```ts
import { createMatcher } from '@pnpm/matcher'

const match = createMatcher(['eslint-*'])
match('eslint-plugin-foo')
//> true
```

## License

[MIT](LICENSE)
npm package: @pnpm/merge-lockfiles
Description: Merges lockfiles. Can automatically fix merge conflicts
Author: Zoltan Kochan
Latest version: 0.0.0-20201030124

# @pnpm/merge-lockfiles

> Merges lockfiles. Can automatically fix merge conflicts

## Install

```
pnpm add @pnpm/merge-lockfiles
```

## License

[MIT](LICENSE)
npm package: @pnpm/meta-updater
Description: Keeps meta files up-to-date in a monorepo
Author: Zoltan Kochan
Latest version: 2.0.6

# @pnpm/meta-updater

> Keeps meta files up-to-date in a monorepo

[![npm version](https://img.shields.io/npm/v/@pnpm/meta-updater.svg)](https://www.npmjs.com/package/@pnpm/meta-updater)

## Installation

```sh
<pnpm|yarn|npm> add @pnpm/meta-updater
```

## Usage

Create a JavaScript file at `.meta-updater/main.mjs` that contains the updater functions.

## Example 1

The following `.meta-updater/main.mjs` defines updaters for `package.json` and `tsconfig.json` files:

```js
export default (workspaceDir) => {
  return {
    'package.json': (manifest, dir) => {
      return {
        ...manifest,
        author: 'Foo Bar',
      }
    },
    'tsconfig.json': (tsConfig, dir) => {
      return {
        ...tsConfig,
        compilerOptions: {
          outDir: 'lib',
          rootDir: 'src',
        },
      }
    },
  }
}
```

### Example 2

The following `.meta-updater/main.mjs` defines format `#ignore` and updaters for `.gitignore` and `.eslintrc` using explicit format specifier.

```js
import * as fs from 'fs/promises'
import { createFormat, createUpdateOptions } from '@pnpm/meta-updater'

/* default .eslintrc */
export const eslintrc = {}

/* default tsconfig.json */
export const tsconfig = { compilerOptions: { target: 'esnext' } }

/**
 * User-defined format '#ignore'
 */
const ignoreFormat = createFormat({
  async read({ resolvedPath }) {
    return (await fs.readFile(resolvedPath, 'utf8')).split('\n')
  },
  update(actual, updater, options) {
    return updater(actual, options)
  },
  equal(expected, actual) {
    return R.equals(expected, actual)
  },
  async write(expected, { resolvedPath }) {
    const unique = (array) => Array.from(new Set() < T[number] > array).sort()
    await fs.writeFile(resolvedPath, unique(expected).join('\n'), 'utf8')
  },
})

export default async (_workspaceDir) => {
  return createUpdateOptions({
    files: {
      // builtin
      'tsconfig.json': (actual, _options) => actual ?? tsconfig,
      // buildin .json format with explicit format specifier
      '.eslintrc [.json]': (actual) => actual ?? eslintrc,
      // user-defined `#ignore` format
      '.prettierignore [#ignore]': (actual) => actual ?? ['node_modules'],
    },
    formats: {
      '#ignore': ignoreFormat,
    },
  })
}
```

See more examples at [src/examples/](src/examples/)

To perform the update on the affected config files, run `pnpm meta-updater`.

To check that all meta files are up-to-date, run `pnpm meta-updater --test`. It is recommended to always check the meta files before running the tests, so add it to your test command:

```json
{
  "test": "meta-updater --test && jest"
}
```

## API

### Updater Function: `(config | null, dir, manifest) => Promise<config | null>`

The updater function recieves the config object or null (if the config file does not exist). The updater function returns the config object that should be saved. If the updater function returns null, the config should be removed.

## License

[MIT](./LICENSE) © [Zoltan Kochan](https://www.kochan.io/)
npm package: @pnpm/modules-cleaner
Description: Exports util functions to clean up node_modules
Latest version: 1001.0.35

# @pnpm/modules-cleaner

> Exports util functions to clean up node_modules

## Install

```
pnpm install @pnpm/modules-cleaner
```

## API

### `prune(...args)`

Compares the wanted lockfile with the current one and removes redundant packages from `node_modules`.

### `removeDirectDependency(...args)`

Removes a direct dependency from `node_modules`.

## License

MIT
npm package: @pnpm/modules-yaml
Description: Reads/writes `node_modules/.modules.yaml`
Latest version: 1002.0.1

# @pnpm/modules-yaml

> Reads/writes \`node_modules/.modules.yaml\`

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/modules-yaml.svg)](https://www.npmjs.com/package/@pnpm/modules-yaml)
<!--/@-->

## Installation

```sh
pnpm add @pnpm/modules-yaml
```

## Usage

```ts
import {write, read} from '@pnpm/modules-yaml'

await write('node_modules', {
  hoistedAliases: {},
  layoutVersion: 1,
  packageManager: 'pnpm@1.0.0',
  pendingBuilds: [],
  shamefullyFlatten: false,
  skipped: [],
  storeDir: '/home/user/.pnpm-store',
})

const modulesYaml = await read(`node_modules`)
```

## API

### `read(pathToDir): Promise<ModulesObject>`

Reads `.modules.yaml` from the specified directory.

### `write(pathToDir, ModulesObject): Promise<void>`

Writes a `.modules.yaml` file to the specified directory.

## License

MIT
npm package: @pnpm/mount-modules
Description: Mounts a node_modules directory with FUSE
Latest version: 1001.0.53

# @pnpm/mount-modules

> Mounts a node_modules directory with FUSE

[![npm version](https://img.shields.io/npm/v/@pnpm/mount-modules.svg)](https://www.npmjs.com/package/@pnpm/mount-modules)

## Installation

```
pnpm add @pnpm/mount-modules --global
```

## Usage

Before mounting the modules directory, all the packages should be fetched to the store. This can be done by running:

```
pnpm install --lockfile-only
```

Once the packages are in the store, run:

```
mount-modules
```

If something goes wrong and the modules directory will be not accessible, unmount it using:

```
unmount <path to node_modules>
```

## License

MIT
npm package: @pnpm/naming-cases
Description: manipulate and check naming cases
Latest version: 1100.0.0-0

# @pnpm/naming-cases

> manipulate and check naming cases

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/naming-cases.svg)](https://www.npmjs.com/package/@pnpm/naming-cases)
<!--/@-->

## Installation

```sh
pnpm add @pnpm/naming-cases
```

## License

MIT
npm package: @pnpm/node-path-for-esm
Description: Node.js ESM (ES modules) doesn't support the `NODE_PATH` environment variable, unlike CommonJS modules. This creates [issues](https://github.com/pnpm/pnpm/issues/9618) when using pnpm with a [global virtual store](https://pnpm.io/settings#enableglobalvirt
Latest version: 0.1.2

# @pnpm/node-path-for-esm

## Why is it needed

Node.js ESM (ES modules) doesn't support the `NODE_PATH` environment variable, unlike CommonJS modules. This creates [issues](https://github.com/pnpm/pnpm/issues/9618) when using pnpm with a [global virtual store](https://pnpm.io/settings#enableglobalvirtualstore). Many packages are importing other packages that are not actually in their dependnecies. To make these package work with pnpm, pnpm creates a directory with semi-hoisted packages at `node_modules/.pnpm/node_modules`. However, when a global virtual store is used, the dependnecies are symlinked from a different directory outside of the project's directory, so dependnecies from this hoisted `node_modules` are not used by Node.js during resolution. To solve this, pnpm adds this hoisted `node_modules` to `NODE_PATH`. This tells Node.js to search the hoisted `node_modules` for dependnecies. This works fine for dependnecies using the CommonJS module system. However, ESM stopped reading the `NODE_PATH` environment variable. That is why this config dependnecy was created. This config dependency registers an ES module loader that will look up dependencies in `NODE_PATH`.

## Installation

```
pnpm add --config @pnpm/node-path-for-esm
```

## Usage

Add this to `pnpm-workspace.yaml`:

```yaml
pnpmfile: node_modules/.pnpm-config/@pnpm/node-path-for-esm/pnpmfile.cjs
```

## License

MIT
npm package: @pnpm/node.fetcher
Description: Node.js artifacts fetcher
Latest version: 1001.0.27

# @pnpm/node.fetcher

> Node.js artifacts fetcher

Downloads and extracts the right Node.js artifact for the active platform and architecture.

[![npm version](https://img.shields.io/npm/v/@pnpm/node.fetcher.svg)](https://www.npmjs.com/package/@pnpm/node.fetcher)

## Installation

```sh
pnpm add @pnpm/node.fetcher
```

## License

MIT
npm package: @pnpm/node.resolver
Description: Resolves a Node.js version specifier to an exact Node.js version
Latest version: 1001.0.23

# @pnpm/node.resolver

> Resolves a Node.js version specifier to an exact Node.js version

[![npm version](https://img.shields.io/npm/v/@pnpm/node.resolver.svg)](https://www.npmjs.com/package/@pnpm/node.resolver)

## Installation

```sh
pnpm add @pnpm/node.resolver
```

## License

MIT
npm package: @pnpm/normalize-registries
Description: Accepts a mapping of registry URLs and returns a mapping with the same URLs but normalized
Latest version: 1000.1.9

# @pnpm/normalize-registries

> Accepts a mapping of registry URLs and returns a mapping with the same URLs but normalized

## Installation

```
pnpm add @pnpm/normalize-registries
```

## Usage

```typescript
import normalizeRegistries from '@pnpm/normalize-registries'

normalizeRegistries({
  'default': 'https://registry.npmjs.org',
  '@foo': 'https://example.com',
})
// will return the same object but the URLs will end with a /
```

## License

[MIT](LICENSE)
npm package: @pnpm/npm-conf
Description: Get the npm config
Latest version: 3.0.2

# @pnpm/npm-conf [![Build Status](https://travis-ci.com/pnpm/npm-conf.svg?branch=master)](https://travis-ci.com/pnpm/npm-conf)

> Get the npm config


## Install

```
$ pnpm add @pnpm/npm-conf
```


## Usage

```js
const npmConf = require('@pnpm/npm-conf');

const conf = npmConf();

conf.get('prefix')
//=> //=> /Users/unicorn/.npm-packages

conf.get('registry')
//=> https://registry.npmjs.org/
```

To get a list of all available `npm` config options:

```bash
$ npm config list --long
```


## API

### npmConf()

Returns the `npm` config.

### npmConf.defaults

Returns the default `npm` config.


## License

MIT © [Kevin Mårtensson](https://github.com/kevva)
npm package: @pnpm/npm-resolver
Description: Resolver for npm-hosted packages
Latest version: 1005.2.3

# @pnpm/npm-resolver

> Resolver for npm-hosted packages

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/npm-resolver.svg)](https://www.npmjs.com/package/@pnpm/npm-resolver)
<!--/@-->

## Installation

```
pnpm add @pnpm/npm-resolver
```

## Usage

<!--@example('./example.js')-->
```js
'use strict'
const createResolveFromNpm = require('@pnpm/npm-resolver').default

const resolveFromNpm = createResolveFromNpm({
  store: '.store',
  offline: false,
  rawConfig: {
    registry: 'https://registry.npmjs.org/',
  },
})

resolveFromNpm({alias: 'is-positive', bareSpecifier: '1.0.0'}, {
  registry: 'https://registry.npmjs.org/',
})
.then(resolveResult => console.log(JSON.stringify(resolveResult, null, 2)))
//> {
//    "id": "registry.npmjs.org/is-positive/1.0.0",
//    "latest": "3.1.0",
//    "package": {
//      "name": "is-positive",
//      "version": "1.0.0",
//      "devDependencies": {
//        "ava": "^0.0.4"
//      },
//      "_hasShrinkwrap": false,
//      "directories": {},
//      "dist": {
//        "shasum": "88009856b64a2f1eb7d8bb0179418424ae0452cb",
//        "tarball": "https://registry.npmjs.org/is-positive/-/is-positive-1.0.0.tgz"
//      },
//      "engines": {
//        "node": ">=0.10.0"
//      }
//    },
//    "resolution": {
//      "integrity": "sha1-iACYVrZKLx632LsBeUGEJK4EUss=",
//      "registry": "https://registry.npmjs.org/",
//      "tarball": "https://registry.npmjs.org/is-positive/-/is-positive-1.0.0.tgz"
//    },
//    "resolvedVia": "npm-registry"
//  }
```
<!--/@-->

## License

MIT
npm package: @pnpm/outdated
Description: Check for outdated packages
Latest version: 1001.1.21

# @pnpm/outdated

> Check for outdated packages

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/outdated.svg)](https://www.npmjs.com/package/@pnpm/outdated)
<!--/@-->

## Installation

```sh
pnpm add @pnpm/outdated
```

## License

[MIT](LICENSE)
npm package: @pnpm/package-bins
Description: Returns bins of a package
Latest version: 1000.0.17

# @pnpm/package-bins

> Returns bins of a package

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/package-bins.svg)](https://www.npmjs.com/package/@pnpm/package-bins)
<!--/@-->

## Installation

```sh
pnpm add @pnpm/package-bins
```

## Usage

```ts
import getBinsFromPkg from '@pnpm/package-bins'

await getBinsFromPkg(path.resolve('package.json'), process.cwd())
//> [{name: 'bin-name', path: 'path-to-bin'}]
```

## API

### `getBinsFromPkg(packageJson, pathToPkg): Promise<Array<{name: string, path: string}>>`

## License

[MIT](./LICENSE)
npm package: @pnpm/package-requester
Description: Concurrent downloader of npm-compatible packages
Latest version: 1011.2.4

# @pnpm/package-requester

> Concurrent downloader of npm-compatible packages

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/package-requester.svg)](https://www.npmjs.com/package/@pnpm/package-requester)
<!--/@-->

## Installation

```sh
pnpm add @pnpm/logger @pnpm/package-requester
```

## License

MIT
npm package: @pnpm/parse-cli-args
Description: Parses the CLI args passed to pnpm
Latest version: 1000.1.6

# @pnpm/parse-cli-args

> Parses the CLI args passed to pnpm

[![npm version](https://img.shields.io/npm/v/@pnpm/parse-cli-args.svg)](https://www.npmjs.com/package/@pnpm/parse-cli-args)

## Installation

```sh
pnpm add @pnpm/parse-cli-args
```

## License

MIT
npm package: @pnpm/parse-overrides
Description: Parse overrides
Latest version: 1001.0.4

# @pnpm/parse-overrides

> Parse overrides

## Installation

```
pnpm add @pnpm/parse-overrides
```

## Usage

```ts
import { parseOverrides } from '@pnpm/parse-overrides'

parseOverrides({
  'foo': '^1.0.0',
  'quux': 'npm:@myorg/quux@^1.0.0',
  'bar@^2.1.0': '3.0.0',
  'qar@1>zoo': '2',
})
// Returns an array of parsed overrides
```

## License

[MIT](LICENSE)
npm package: @pnpm/pick-fetcher
Description: Pick a package fetcher by type
Latest version: 1001.0.0

# @pnpm/pick-fetcher

> Pick a package fetcher by type

[![npm version](https://img.shields.io/npm/v/@pnpm/pick-fetcher.svg)](https://www.npmjs.com/package/@pnpm/pick-fetcher)

## Deploy

```sh
pnpm add @pnpm/pick-fetcher
```

## License

MIT
npm package: @pnpm/pick-registry-for-package
Description: Picks the right registry for the package from a registries config
Latest version: 1000.0.16

# @pnpm/pick-registry-for-package

> Picks the right registry for the package from a registries config

## Installation

```
pnpm add @pnpm/pick-registry-for-package
```

## License

[MIT](LICENSE)
npm package: @pnpm/pkg-manager.direct-dep-linker
Description: Fast installation using only pnpm-lock.yaml
Latest version: 1000.0.17

# @pnpm/pkg-manager.direct-dep-linker

> Links direct dependencies to projects

## Installation

```
pnpm install @pnpm/pkg-manager.direct-dep-linker
```

## License

[MIT](LICENSE)
npm package: @pnpm/pkgid-to-filename
Description: Converts a package ID to a valid file name
Author: Zoltan Kochan
Latest version: 3.0.0

# @pnpm/pkgid-to-filename

> Converts a package ID to a valid file name

<!--@shields('npm', 'travis')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/pkgid-to-filename.svg)](https://www.npmjs.com/package/@pnpm/pkgid-to-filename) [![Build Status](https://img.shields.io/travis/pnpm/pkgid-to-filename/master.svg)](https://travis-ci.org/pnpm/pkgid-to-filename)
<!--/@-->

## Installation

```sh
<pnpm|npm|yarn> add @pnpm/pkgid-to-filename
```

## Usage

```js
'use strict'
const pkgIdToFilename = require('@pnpm/pkgid-to-filename').default

pkgIdToFilename('file:./test')
//> local/%2Fhome%2Fzkochan%2Fsrc%2Fpnpm%2Fpkgid-to-filename%2Ftest
```

No changes are done for package ID of non-local package.

```js
pkgIdToFilename('registry.npmjs.org/foo/1.0.0')
//> registry.npmjs.org/foo@1.0.0
```

## License

[MIT](./LICENSE) © [Zoltan Kochan](https://www.kochan.io/)
npm package: @pnpm/plugin-better-defaults
Description: Improved defaults for pnpm
Latest version: 0.3.0

# @pnpm/plugin-better-defaults

> Improved defaults for pnpm

## What it changes

- Sets [blockExoticSubdeps](https://pnpm.io/settings#blockexoticsubdeps) to `true`.
- Sets [enableGlobalVirtualStore](https://pnpm.io/settings#enableglobalvirtualstore) to `true`.
- Sets [enablePrePostScripts](https://pnpm.io/cli/run#enableprepostscripts) to `false`.
- Sets [hoistPattern](https://pnpm.io/settings#hoistpattern) to an empty array, disabling hoisting.
- Sets [ignorePatchFailures](https://pnpm.io/settings#ignorepatchfailures) to `false`.
- Sets [minimumReleaseAge](https://pnpm.io/settings#minimumreleaseage) to `1440` (1 day).
- Sets [optimisticRepeatInstall](https://pnpm.io/settings#optimisticrepeatinstall) to `true`.
- Sets [resolutionMode](https://pnpm.io/settings#resolutionmode) to `lowest-direct`.
- Sets [trustPolicy](https://pnpm.io/settings#trustpolicy) to `no-downgrade`.
- Sets [trustPolicyIgnoreAfter](https://pnpm.io/settings#trustpolicyignoreafter) to `10080` (7 days).
- Sets [verifyDepsBeforeRun](https://pnpm.io/settings#verifydepsbeforerun) to `install`.

You can extend or override these settings in your own `.pnpmfile.cjs`.

## Installation

```
pnpm add --config @pnpm/plugin-better-defaults
```

This will add `@pnpm/plugin-better-defaults` to the [configDependencies](https://pnpm.io/config-dependencies) field in your `pnpm-workspace.yaml`.

## License

MIT
npm package: @pnpm/plugin-commands-audit
Description: pnpm commands for dependencies audit
Latest version: 1002.2.9

# @pnpm/plugin-commands-audit

> pnpm commands for dependencies audit

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-audit.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-audit)

## Installation

```sh
pnpm add @pnpm/plugin-commands-audit
```

## Testing

In order to have stable tests, the responses from the registry are mocked.
To update the mocks, run:

```
pnpm run update-responses
```

## License

MIT
npm package: @pnpm/plugin-commands-config
Description: Commands for reading and writing settings to/from config files
Latest version: 1000.3.22

# @pnpm/plugin-commands-config

> Commands for reading and writing settings to/from config files

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-config.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-config)

## Installation

```sh
pnpm add @pnpm/plugin-commands-config
```

## License

MIT
npm package: @pnpm/plugin-commands-deploy
Description: Commands for deploy
Latest version: 1002.0.37

# @pnpm/plugin-commands-deploy

> Commands for deploy

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-deploy.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-deploy)

## deploy

```sh
pnpm add @pnpm/plugin-commands-deploy
```

## License

MIT
npm package: @pnpm/plugin-commands-doctor
Description: Commands for checks of known common issues 
Latest version: 1000.1.64

# @pnpm/plugin-commands-doctor

> pnpm commands for checks of known common issues 

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-doctor.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-doctor)

## Installation

```sh
pnpm add @pnpm/plugin-commands-doctor
```

## License

MIT
npm package: @pnpm/plugin-commands-env
Description: pnpm commands for managing Node.js
Latest version: 1000.0.66

# @pnpm/plugin-commands-env

> pnpm commands for managing Node.js

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-env.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-env)

## Installation

```sh
pnpm add @pnpm/plugin-commands-env
```

## License

MIT
npm package: @pnpm/plugin-commands-init
Description: Create a package.json file
Latest version: 1000.3.17

# @pnpm/plugin-commands-init

> Create a package.json file

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-init.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-init)

## Installation

```sh
pnpm add @pnpm/plugin-commands-init
```

## License

MIT
npm package: @pnpm/plugin-commands-installation
Description: Commands for installation
Latest version: 1004.9.13

# @pnpm/plugin-commands-installation

> Commands for installation

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-installation.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-installation)

## Installation

```sh
pnpm add @pnpm/plugin-commands-installation
```

## License

MIT
npm package: @pnpm/plugin-commands-licenses
Description: The licenses command of pnpm
Latest version: 1000.0.67

# @pnpm/plugin-commands-licenses

> The licenses command of pnpm

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-licenses.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-licenses)

## Installation

```sh
pnpm add @pnpm/plugin-commands-licenses
```

## License

MIT
npm package: @pnpm/plugin-commands-listing
Description: The list and why commands of pnpm
Latest version: 1000.3.5

# @pnpm/plugin-commands-listing

> The list and why commands of pnpm

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-listing.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-listing)

## Installation

```sh
pnpm add @pnpm/plugin-commands-listing
```

## License

MIT
npm package: @pnpm/plugin-commands-merge-driver
Description: pnpm commands related to pnpm's merge driver
Author: Zoltan Kochan
Latest version: 0.0.0-20201060511

# @pnpm/plugin-commands-merge-driver

> pnpm commands related to pnpm's merge driver

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-merge-driver.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-merge-driver)

## Installation

```sh
<pnpm|npm|yarn> add @pnpm/plugin-commands-merge-driver
```

## License

MIT © [Zoltan Kochan](https://www.kochan.io/)
npm package: @pnpm/plugin-commands-outdated
Description: The outdated command of pnpm
Latest version: 1000.0.68

# @pnpm/plugin-commands-outdated

> The outdated command of pnpm

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-outdated.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-outdated)

## Installation

```sh
pnpm add @pnpm/plugin-commands-outdated
```

## License

MIT
npm package: @pnpm/plugin-commands-publishing
Description: The pack and publish commands of pnpm
Latest version: 1000.3.16

# @pnpm/plugin-commands-publishing

> The pack and publish commands of pnpm

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-publishing.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-publishing)

## Installation

```sh
pnpm add @pnpm/plugin-commands-publishing
```

## License

MIT
npm package: @pnpm/plugin-commands-rebuild
Description: Commands for rebuilding dependencies
Latest version: 1008.0.13

# @pnpm/plugin-commands-rebuild

> Commands for rebuilding dependencies

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-rebuild.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-rebuild)

## Installation

```sh
pnpm add @pnpm/plugin-commands-rebuild
```

## License

MIT
npm package: @pnpm/plugin-commands-recursive
Description: Recursive commands
Author: Zoltan Kochan
Latest version: 0.1.10

# @pnpm/plugin-commands-recursive

> Recursive commands

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-recursive.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-recursive)

## Installation

```sh
<pnpm|npm|yarn> add @pnpm/plugin-commands-recursive
```

## License

MIT © [Zoltan Kochan](https://www.kochan.io/)
npm package: @pnpm/plugin-commands-script-runners
Description: Commands for running scripts
Latest version: 1001.2.9

# @pnpm/plugin-commands-script-runners

> Commands for running scripts

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-script-runners.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-script-runners)

## Installation

```sh
pnpm add @pnpm/plugin-commands-script-runners
```

## License

MIT
npm package: @pnpm/plugin-commands-server
Description: Commands for controlling the store server
Latest version: 1000.0.66

# @pnpm/plugin-commands-server

> Commands for controlling the store server

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-server.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-server)

## Installation

```sh
pnpm add @pnpm/plugin-commands-server
```

## License

MIT
npm package: @pnpm/plugin-commands-setup
Description: pnpm commands for setting up pnpm
Latest version: 1000.1.42

# @pnpm/plugin-commands-setup

> pnpm commands for setting up pnpm

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-setup.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-setup)

## Installation

```sh
pnpm add @pnpm/plugin-commands-setup
```

## License

MIT
npm package: @pnpm/plugin-commands-store
Description: Commands for controlling the store
Latest version: 1000.0.67

# @pnpm/plugin-commands-store

> Commands for controlling the store

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-store.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-store)

## Installation

```sh
pnpm add @pnpm/plugin-commands-store
```

## License

MIT
npm package: @pnpm/plugin-commands-store-inspecting
Description: The inspecting store commands of pnpm
Latest version: 1000.0.61

# @pnpm/plugin-commands-store-inspecting

> The inspecting store commands of pnpm

[![npm version](https://img.shields.io/npm/v/@pnpm/plugin-commands-store-inspecting.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-store-inspecting)

## Installation

```sh
pnpm add @pnpm/plugin-commands-store-inspecting
```

## License

MIT
npm package: @pnpm/plugin-esm-node-path
Description: Enables support for resolving dependencies via NODE_PATH in Node.js ESM mode.
Latest version: 0.1.2

# @pnpm/plugin-esm-node-path

## Why is it needed

Node.js ESM (ES modules) doesn't support the `NODE_PATH` environment variable, unlike CommonJS modules. This creates [issues](https://github.com/pnpm/pnpm/issues/9618) when using pnpm with a [global virtual store](https://pnpm.io/settings#enableglobalvirtualstore). Many packages are importing other packages that are not actually in their dependnecies. To make these package work with pnpm, pnpm creates a directory with semi-hoisted packages at `node_modules/.pnpm/node_modules`. However, when a global virtual store is used, the dependnecies are symlinked from a different directory outside of the project's directory, so dependnecies from this hoisted `node_modules` are not used by Node.js during resolution. To solve this, pnpm adds this hoisted `node_modules` to `NODE_PATH`. This tells Node.js to search the hoisted `node_modules` for dependnecies. This works fine for dependnecies using the CommonJS module system. However, ESM stopped reading the `NODE_PATH` environment variable. That is why this config dependnecy was created. This config dependency registers an ES module loader that will look up dependencies in `NODE_PATH`.

## Installation

```
pnpm add --config @pnpm/plugin-esm-node-path
```

## License

MIT
npm package: @pnpm/plugin-types-fixer
Description: A hook for fixing TypeScript issues
Latest version: 0.1.0

# @pnpm/plugin-types-fixer

> A hook for fixing TypeScript issues

If you have issues in a TypeScript project that uses pnpm, this config dependency might help. It fixes packages in your dependencies by adding missing `@types/` dependencies to them during installation.

## Installation

```
pnpm add --config @pnpm/plugin-types-fixer
```

This will add `@pnpm/plugin-types-fixer` to the [configDependencies](https://pnpm.io/config-dependencies) field in your `pnpm-workspace.yaml`.

## License

MIT
npm package: @pnpm/pnpmfile
Description: Reading a .pnpmfile.cjs
Latest version: 1002.1.13

# @pnpm/pnpmfile

> Reading a .pnpmfile.cjs

[![npm version](https://img.shields.io/npm/v/@pnpm/pnpmfile.svg)](https://www.npmjs.com/package/@pnpm/pnpmfile)

## Installation

```sh
pnpm add @pnpm/pnpmfile
```

## License

MIT
npm package: @pnpm/prepare-package
Description: Prepares a Git-hosted package
Latest version: 1001.0.7

# @pnpm/prepare-package

> Prepares a Git-hosted package

[![npm version](https://img.shields.io/npm/v/@pnpm/prepare-package.svg)](https://www.npmjs.com/package/@pnpm/prepare-package)

## Installation

```sh
pnpm add @pnpm/prepare-package
```

## License

MIT
npm package: @pnpm/read-importer-manifest
Description: Read an importer manifest (called package.json in most cases)
Author: Zoltan Kochan
Latest version: 2.0.1

# @pnpm/read-importer-manifest

> Read an importer manifest (called package.json in most cases)

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/read-importer-manifest.svg)](https://www.npmjs.com/package/@pnpm/read-importer-manifest)
<!--/@-->

## Installation

```sh
<npm|yarn|pnpm> add @pnpm/read-importer-manifest
```

## Usage

```ts
import readImporterManifest from '@pnpm/read-importer-manifest'

const { manifest, fileName } = await readImporterManifest(process.cwd())
```

## License

MIT © [Zoltan Kochan](https://www.kochan.io/)
npm package: @pnpm/read-package-json
Description: Read a package.json
Latest version: 1000.1.8

# @pnpm/read-package-json

> Read a package.json

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/read-package-json.svg)](https://www.npmjs.com/package/@pnpm/read-package-json)
<!--/@-->

## Installation

```sh
pnpm add @pnpm/read-package-json
```

## Usage

```ts
import { readPackageJson } from '@pnpm/read-package-json'

const pkgJson = await readPackageJson('package.json')
```

## API

### default: `readPackageJson(path): Promise<PackageManifest>`

### Arguments

- `path` - _String_ - path to the `package.json`

### `fromDir(path): Promise<PackageManifest>`

### Arguments

- `path` - _String_ - path to the directory with the `package.json`

## License

MIT
npm package: @pnpm/read-project-manifest
Description: Read a project manifest (called package.json in most cases)
Latest version: 1001.2.6

# @pnpm/read-project-manifest

> Read a project manifest (called package.json in most cases)

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/read-project-manifest.svg)](https://www.npmjs.com/package/@pnpm/read-project-manifest)
<!--/@-->

## Installation

```sh
pnpm add @pnpm/read-project-manifest
```

## Usage

```ts
import { readProjectManifest } from '@pnpm/read-project-manifest'

const { manifest, fileName } = await readProjectManifest(process.cwd())
```

## License

MIT
npm package: @pnpm/registry.pkg-metadata-filter
Description: Filters the package metadata from the registry
Latest version: 1000.1.6

# @pnpm/registry.pkg-metadata-filter

> Filters the package metadata from the registry

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/registry.pkg-metadata-filter.svg)](https://www.npmjs.com/package/@pnpm/registry.pkg-metadata-filter)
<!--/@-->

## Installation

```
pnpm add @pnpm/registry.pkg-metadata-filter
```

## Usage

```ts
import { filterPkgMetadataByPublishDate } from '@pnpm/registry.pkg-metadata-filter'

const pkgDoc = await (await fetch('https://registry.npmjs.org/is-odd')).json()

// Keep only those versions in the document that were published before Jan 1 2023.
filterPkgMetadataByPublishDate(pkgDoc, new Date('2023-01-01'))
```

## License

MIT
npm package: @pnpm/registry.types
Description: Types related to the npm registry
Latest version: 1000.1.4

# @pnpm/registry.types

> Types related to the npm registry

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/registry.types.svg)](https://www.npmjs.com/package/@pnpm/registry.types)
<!--/@-->

## Installation

```
pnpm add @pnpm/registry.types
```

## License

MIT
npm package: @pnpm/resolve-workspace-range
Description: Resolves a range from versions that are present inside a workspace
Latest version: 1000.1.0

# @pnpm/resolve-workspace-range

> Resolves a range from versions that are present inside a workspace

## Install

```
pnpm add @pnpm/resolve-workspace-range
```

### API

### `resolveWorkspaceRange(range, versions)`

## LICENSE

MIT
npm package: @pnpm/resolver-base
Description: Types for pnpm-compatible resolvers
Latest version: 1005.4.1

# @pnpm/resolver-base

> Types for pnpm-compatible resolvers

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/resolver-base.svg)](https://www.npmjs.com/package/@pnpm/resolver-base)
<!--/@-->

## Installation

```sh
pnpm add @pnpm/resolver-base
```

## Usage

Here's a template of a resolver using types from `@pnpm/resolver-base`:

```ts
import {
  ResolveOptions,
  ResolveResult,
  WantedDependency,
} from '@pnpm/resolver-base'

export async function testResolver (
  wantedDependency: WantedDependency,
  opts: ResolveOptions,
): Promise<ResolveResult> {
  // ...
  return {
    id,
    resolution,
    package,
    latest,
    normalizedBareSpecifier,
  }
}
```

## License

MIT
npm package: @pnpm/resolving.bun-resolver
Description: Resolves the Bun runtime
Latest version: 1005.0.11

# @pnpm/resolving.bun-resolver

> Resolves the Bun runtime

[![npm version](https://img.shields.io/npm/v/@pnpm/resolving.bun-resolver.svg)](https://www.npmjs.com/package/@pnpm/resolving.bun-resolver)

## Installation

```sh
pnpm add @pnpm/resolving.bun-resolver
```

## License

MIT
npm package: @pnpm/resolving.deno-resolver
Description: Resolves the Deno runtime
Latest version: 1005.0.11

# @pnpm/resolving.deno-resolver

> Resolves the Deno runtime

[![npm version](https://img.shields.io/npm/v/@pnpm/resolving.deno-resolver.svg)](https://www.npmjs.com/package/@pnpm/resolving.deno-resolver)

## Installation

```sh
pnpm add @pnpm/resolving.deno-resolver
```

## License

MIT
npm package: @pnpm/reviewing.dependencies-hierarchy
Description: Creates a dependencies hierarchy for a symlinked `node_modules`
Latest version: 1001.3.4

# @pnpm/reviewing.dependencies-hierarchy

> Creates a dependencies hierarchy for a symlinked \`node_modules\`

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/dependencies-hierarchy.svg)](https://www.npmjs.com/package/dependencies-hierarchy)
<!--/@-->

A symlinked `node_modules` is created when installing using [pnpm](https://github.com/pnpm/pnpm).

## Installation

```
pnpm add @pnpm/reviewing.dependencies-hierarchy
```

## License

MIT
npm package: @pnpm/run-npm
Description: Runs the npm CLI
Latest version: 1000.1.1

# @pnpm/run-npm

> Runs the npm CLI

[![npm version](https://img.shields.io/npm/v/@pnpm/run-npm.svg)](https://www.npmjs.com/package/@pnpm/run-npm)

## Installation

```sh
pnpm add @pnpm/run-npm
```

## License

MIT
npm package: @pnpm/self-installer
Description: Installs pnpm
Author: Zoltan Kochan
Latest version: 2.2.1

**WARNING: This installation method is not supported anymore.<br>
Visit the [installation page of pnpm](https://pnpm.io/installation) to see the currently recommended installation technics.**

***

# DEPRECATED! @pnpm/self-installer

> Installs pnpm

<!--@shields('npm', 'travis')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/self-installer.svg)](https://www.npmjs.com/package/@pnpm/self-installer) [![Build Status](https://img.shields.io/travis/pnpm/self-installer/master.svg)](https://travis-ci.org/pnpm/self-installer)
<!--/@-->

## Usage

    curl -L https://raw.githubusercontent.com/pnpm/self-installer/master/install.js | node

## Configuring

The above script will install the latest version of pnpm but you may also install
a specific version by specifying the `PNPM_VERSION` environment variable:

    curl -L https://raw.githubusercontent.com/pnpm/self-installer/master/install.js | PNPM_VERSION=1.16.2 node

Here are all the supported environment variables that can influence pnpm's installation:

| Env variable      | Type                  | Description                                                                              | Example                                           |
| ----------------- | --------------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------- |
| **PNPM_VERSION**  | _version, range, tag_ | `latest` by default. The pnpm version to be installed.<br>(not older than `pnpm@1.16.2`) | `PNPM_VERSION=next`                               |
| **PNPM_DEST**     | _Path_                | The directory into which pnpm's files will be downloaded.                                | `PNPM_DEST=node_modules/pnpm`                     |
| **PNPM_BIN_DEST** | _Path_                | `process.execPath` by default. The directory into which pnpm's bins will be linked.      | `PNPM_BIN_DEST=node_modules/.bin`                 |
| **PNPM_REGISTRY** | _URL_                 | `https://registry.npmjs.org/` by default. The registry to be used for downloading pnpm.  | `PNPM_REGISTRY=https://registry.node-modules.io/` |

## License

[MIT](./LICENSE) © [Zoltan Kochan](https://www.kochan.io/)
npm package: @pnpm/semver.peer-range
Description: Validates peer ranges
Latest version: 1000.0.0

# @pnpm/semver.peer-range

> Validates peer ranges

[![npm version](https://img.shields.io/npm/v/@pnpm/semver.peer-range.svg)](https://www.npmjs.com/package/@pnpm/semver.peer-range)

## Installation

```sh
pnpm add @pnpm/semver.peer-range
```

## License

MIT
npm package: @pnpm/server
Description: A pnpm installer server
Latest version: 1001.0.20

# @pnpm/server

> A pnpm installer server

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/server.svg)](https://www.npmjs.com/package/@pnpm/server)
<!--/@-->

## Installation

```sh
pnpm add @pnpm/logger @pnpm/server
```

## License

MIT
npm package: @pnpm/slice-ansi
Description: > Slice strings while preserving ansi characters
Latest version: 1.1.3

# `@arcanis/slice-ansi`

> Slice strings while preserving ansi characters

[![](https://img.shields.io/npm/v/@arcanis/slice-ansi.svg)]() [![](https://img.shields.io/npm/l/@arcanis/slice-ansi.svg)]() [![](https://img.shields.io/badge/developed%20with-Yarn%202-blue)](https://github.com/yarnpkg/berry)

## Installation

```
yarn add @arcanis/slice-ansi
```

## Why

Unlike the [Chalk version](https://github.com/chalk/slice-ansi), this completely different implementation:

- Supports terminal hyperlinks
- Leverages the native grapheme splitting API if available
- Doesn't require ESM, because it's an inane requirement for a library like this

## Caveat

This implementation also doesn't attempt to interpret the escape codes to optimize them away. So for instance, if you start with the following but only want to keep the first 16 characters:

```
${openBold}This is the header with ${openRed}ansi words${closeRed}${closeBold}
```

The end result will be:

```
${openBold}This is the head${openRed}${closeRed}${closeBold}
```

As you can see, the `${openRed}${closeRed}` didn't get removed, even if they are now empty. This is because this package doesn't know that `openRed` (`\u001b[31m`) is "closed" by `closeRed` (`\u001b[39m`). Keeping these information would make the package more complex for a benefit deemed fairly limited, since nothing will be printed anyway.

## License (MIT)

> **Copyright © 2020 Mael Nison**
>
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
npm package: @pnpm/sort-packages
Description: Sort packages
Latest version: 1000.0.16

# @pnpm/sort-packages

> Sort packages

[![npm version](https://img.shields.io/npm/v/@pnpm/sort-packages.svg)](https://www.npmjs.com/package/@pnpm/plugin-commands-recursive)

## Installation

```sh
pnpm add @pnpm/sort-packages
```

## License

MIT
npm package: @pnpm/store-connection-manager
Description: Create a direct pnpm store controller or connect to a running store server
Latest version: 1002.3.19

# @pnpm/store-connection-manager

> Create a direct pnpm store controller or connect to a running store server

[![npm version](https://img.shields.io/npm/v/@pnpm/store-connection-manager.svg)](https://www.npmjs.com/package/@pnpm/store-connection-manager)

## Installation

```sh
pnpm add @pnpm/store-connection-manager
```

## License

MIT
npm package: @pnpm/store-path
Description: Resolves the pnpm store path
Latest version: 1000.0.6

# @pnpm/store-path

> Resolves the pnpm store path

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/store-path.svg)](https://www.npmjs.com/package/@pnpm/store-path)
<!--/@-->

## Installation

```sh
<pnpm|yarn|npm> add @pnpm/store-path
```

## Usage

```ts
import resolveStorePath from '@pnpm/store-path'

await resolveStorePath('F:\\project', 'pnpm-store')
//> F:\\pnpm-store\\2
```

## License

[MIT](./LICENSE)