-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
What version of Turborepo are you using?
1.2.5
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Mac
Describe the Bug
I have a repo with a sub-package named tests and I'm experiencing issues running scripts in it using turbo run.
Basically it seems turbo completely ignores the existence of it.
While building the repro, I found the same behaviour when the directory is named test.
I suspect this is the offending source-code: https://github.com/vercel/turborepo/blob/main/cli/internal/context/context.go#L385-L386
I've narrowed it down to this PR, first released as turbo@1.0.15 and verified the bug does not appear on turbo@1.0.14.
Expected Behavior
I'd expect Turbo to recognise any directory matched by the workspaces array of the root package.json.
If this is indeed intended behaviour I would expect this being explicitly called out on Docs / Troubleshooting and perhaps Docs / Guides / Migrate from Lerna (since that was a perfectly valid configuration with Lerna).
To Reproduce
See https://github.com/kraenhansen/turbo-test-issue for a complete reproduction.
Steps it takes:
- Create a mono-repo with three sub-packages explicitly mentioned in the root's
package.json, two of which should have their directories namedtestandtestsrespectively. - Add a
buildscript to all of the sub-packages. - Initialize a
turbo.jsonwith a pipeline containing"build": { "dependsOn": ["^build"] }. - Try running the build command (use
--dry-runto keep things clean) and notice how thetestandtestspackages are not listed in "Packages in Scope".