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

Function enforceDevMirroringPeerDependencies

yarn.config.cjs:267–280  ·  view source on GitHub ↗
({Yarn})

Source from the content-addressed store, hash-verified

265}
266
267function enforceDevMirroringPeerDependencies({Yarn}) {
268 for (const workspace of Yarn.workspaces()) {
269 const peers = workspace.manifest.peerDependencies;
270 if (!peers) {
271 continue;
272 }
273 if (peers.react) {
274 workspace.set('devDependencies.react', peers.react);
275 }
276 if (peers['react-dom']) {
277 workspace.set('devDependencies.react-dom', peers['react-dom']);
278 }
279 }
280}
281
282module.exports = defineConfig({
283 constraints: async ctx => {

Callers 1

yarn.config.cjsFile · 0.85

Calls 1

setMethod · 0.45

Tested by

no test coverage detected