https://github.com/andreialecu/yarn-plugin-workspace-lockfile
Yarn 2 plugin to create a separate lockfile per workspace
https://github.com/andreialecu/yarn-plugin-workspace-lockfile
Last synced: 12 months ago
JSON representation
Yarn 2 plugin to create a separate lockfile per workspace
- Host: GitHub
- URL: https://github.com/andreialecu/yarn-plugin-workspace-lockfile
- Owner: andreialecu
- License: mit
- Created: 2020-10-20T14:13:34.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-16T13:08:22.000Z (about 2 years ago)
- Last Synced: 2025-04-11T00:43:37.514Z (about 1 year ago)
- Language: JavaScript
- Size: 689 KB
- Stars: 17
- Watchers: 2
- Forks: 13
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yarn-plugin-workspace-lockfile
**EXPERIMENTAL!**
## Usage:
```
yarn plugin import https://raw.githubusercontent.com/andreialecu/yarn-plugin-workspace-lockfile/main/packages/plugin/bundles/%40yarnpkg/plugin-workspace-lockfile.js
yarn install
```
Creates a separate lockfile named `yarn.lock-workspace` in each workspace in a yarn 2+ project, containing only dependencies pertaining to that specific workspace.
This can be useful if you need to partition a big monorepo into smaller repos which you can share with individual developers, without giving them access to the entire code base.
You can set-up git submodules in the root monorepo, so that each workspace directory is an individual git repository.
Developers can then clone the repository they need to work on, and either rename `yarn.lock-workspace` to `yarn.lock` before installing, or they can create a `.yarnrc.yml` file that contains `lockfileFilename: yarn.lock-workspace`.