https://github.com/remorses/workspace-info
Yarn workspace info for yarn v2 and any other similar workspaces implementation
https://github.com/remorses/workspace-info
Last synced: 7 months ago
JSON representation
Yarn workspace info for yarn v2 and any other similar workspaces implementation
- Host: GitHub
- URL: https://github.com/remorses/workspace-info
- Owner: remorses
- Created: 2020-08-28T08:48:21.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-28T10:29:59.000Z (over 5 years ago)
- Last Synced: 2025-03-04T18:40:42.612Z (10 months ago)
- Language: TypeScript
- Homepage:
- Size: 56.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# workspace-info
`yarn workspace info --json` implementation for yarn v2 berry, lerna and npm workspaces
```
yarn add workspace-info
```
## Usage as cli
```
workspace-info --cwd tests/example-workspace
```
by default peer dependencies are not included, use `--peer` to include them
```
workspace-info --peer
```
## Usage as lib
```js
import { getWorkspaceInfo } from 'workspace-info'
console.log(
await getWorkspaceInfo({
cwd,
useLerna: false,
}),
)
// {
// a: {
// location: '.../tests/example-workspace/packages/a',
// mismatchedWorkspaceDependencies: [],
// workspaceDependencies: ['b', 'd'],
// },
// b: {
// location: '.../tests/example-workspace/packages/b',
// mismatchedWorkspaceDependencies: [],
// workspaceDependencies: ['d'],
// },
// c: {
// location: '.../tests/example-workspace/packages/c',
// mismatchedWorkspaceDependencies: [],
// workspaceDependencies: ['b'],
// },
// d: {
// location: '.../tests/example-workspace/packages/d',
// mismatchedWorkspaceDependencies: [],
// workspaceDependencies: ['c'],
// },
// }
```