@param {Context} context
({Yarn})
| 75 | |
| 76 | /** @param {Context} context */ |
| 77 | function enforceNonPrivateDependencies({Yarn}) { |
| 78 | // enforce that public packages do not depend on private packages |
| 79 | for (const workspace of Yarn.workspaces()) { |
| 80 | if (workspace.manifest.private) { |
| 81 | for (const dependency of Yarn.dependencies({ident: workspace.ident})) { |
| 82 | if (dependency.type !== 'devDependencies' && !dependency.workspace.manifest.private) { |
| 83 | dependency.workspace.set('private', true); |
| 84 | workspace.set('private', false); |
| 85 | } |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | /** @param {Context} context */ |
| 92 | function enforceNoCircularDependencies({Yarn}) { |