https://github.com/web-padawan/pnpm-resolutions
An example how to make yarn resolutions work with pnpm
https://github.com/web-padawan/pnpm-resolutions
Last synced: about 2 months ago
JSON representation
An example how to make yarn resolutions work with pnpm
- Host: GitHub
- URL: https://github.com/web-padawan/pnpm-resolutions
- Owner: web-padawan
- Created: 2020-01-27T08:28:46.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-15T12:26:32.000Z (about 6 years ago)
- Last Synced: 2025-01-01T16:47:16.383Z (over 1 year ago)
- Language: JavaScript
- Size: 87.9 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## pnpm and resolutions
This is a demo how to pin dependency versions when using `pnpm`.
## Install
Fetch versions first:
```sh
node pnpmfile.js --fetch
```
Then install as usual:
```sh
pnpm i --shamefully-hoist=true
```
## Usage
The `pnpmfile.js` in this repository does two different things.
1. When executed manually: `node pnpmfile.js --fetch`:
- fetch data from `https://registry.npmjs.org/@vaadin/vaadin-shrinkwrap`
- save data including versions information to `versions.json` file
2. When executed by `pnpm` itself during installation:
- get the shrinkwrap package version from the root `package.json` dependencies
- check `versions` in `versions.json` and get the shrinkwrap that we need
- for every dependency, pin versions to the ones from the shrinkwrap