UNPKG

@nx/react-native

Version:

The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: -Integration with libraries such as Jest, Detox, and Storybook. -Scaffolding for creating buildable libraries th

27 lines (26 loc) 1.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.findAllNpmDependencies = findAllNpmDependencies; function findAllNpmDependencies(graph, projectName, list = [], seen = new Set()) { // In case of bad circular dependencies if (seen.has(projectName)) { return list; } seen.add(projectName); const node = graph.externalNodes[projectName]; // Don't want to include '@nx/react-native' and '@nx/expo' because React Native // autolink will warn that the package has no podspec file for iOS. if (node) { if (node.name !== `npm:@nx/react-native` && node.name !== `npm:@nrwl/react-native` && node.name !== `npm:@nx/expo` && node.name !== `npm:@nrwl/expo`) { list.push(node.data.packageName); } } else { // it's workspace project, search for it's dependencies graph.dependencies[projectName]?.forEach((dep) => findAllNpmDependencies(graph, dep.target, list, seen)); } return list; }