https://github.com/pnpm/registry-mock
Mock the npm registry
https://github.com/pnpm/registry-mock
Last synced: 2 months ago
JSON representation
Mock the npm registry
- Host: GitHub
- URL: https://github.com/pnpm/registry-mock
- Owner: pnpm
- License: mit
- Created: 2017-01-28T22:06:16.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2025-04-08T19:34:16.000Z (3 months ago)
- Last Synced: 2025-04-14T23:15:02.125Z (2 months ago)
- Language: JavaScript
- Size: 755 KB
- Stars: 18
- Watchers: 5
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @pnpm/registry-mock
> Mock the npm registry
## Installation
```sh
pnpm add @pnpm/registry-mock
```## API
### `getIntegrity(pkgName, pkgVersion): string`
### CLI
Preparing a fresh storage: `registry-mock prepare`
Running the registry mock: `registry-mock`
By default, `https://registry.npmjs.org/` is used to download packages.
A custom uplink can be set via the `PNPM_REGISTRY_MOCK_UPLINK` env variable.The registry mock will listen on port 4873, unless a different port is
specified via the `PNPM_REGISTRY_MOCK_PORT` env variable.## License
MIT