MCPcopy Create free account
hub / github.com/adobe/react-spectrum / enforceNonPrivateDependencies

Function enforceNonPrivateDependencies

yarn.config.cjs:77–89  ·  view source on GitHub ↗

@param {Context} context

({Yarn})

Source from the content-addressed store, hash-verified

75
76/** @param {Context} context */
77function 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 */
92function enforceNoCircularDependencies({Yarn}) {

Callers 1

yarn.config.cjsFile · 0.85

Calls 1

setMethod · 0.45

Tested by

no test coverage detected