guigrpa / oao

A Yarn-based, opinionated monorepo management tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

run-script --tree reads from subpackage node_modules folder in monorepo

sheuertz opened this issue · comments

Hi

When running run-script with --tree option, if all subpackages are not on the same version of a dependency, the script will attempt to build the dependency in the subpackage's node_modules folder.

For example, our packages all depend on react-router. There was just an update from 4.x to 5.0. Our tasks to update the packages and test are spread across the team, so while I'm making changes to my package, it is updated to 5.0, but all of the others are still on 4.3.1. In my package's local node_modules directory, I have the react-router 5.0 dependency. When running run-script --tree to build all of the packages, it picks up the package.json in my node_modules directory and tries to build it, which fails.

Ideally it would ignore node_modules directories in a subpackage as well as the root.

Thanks.

Nevermind, reading through the code I found a way to do this with --ignore-src