Possibility that lerna run command fails if not all packages include the script
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36.1k
- Forks
- 2.3k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 50
Description
I have 5 packages & run the lerna run test:unit --stream command from root. If a package does not contain the test:unit script, the lerna output is still "lerna success" for 4 packages. So on CI it's not possible to detect that for one package the unit tests are not executed. Is there a good solution to handle this?
Expected Behavior
Add a flag so that the lerna command fails if not all packages include the executing script
Current Behavior
lerna command succeed
Possible Solution
Add a flag like --strict
Steps to Reproduce (for bugs)
lerna.json
<!-- Please paste your `lerna.json` here -->
lerna-debug.log
<!-- If you have a `lerna-debug.log` available, please paste it here -->
<!-- Otherwise, feel free to delete this <details> block -->
Context
Your Environment
| Executable | Version |
|---|---|
lerna --version |
4.0.0 |
npm --version |
8.3.1 |
yarn --version |
VERSION |
node --version |
16.14.0 |
| OS | Version |
|---|---|
| NAME | VERSION |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the lerna run test:unit --stream command and how it determines success when a package lacks the script. Reproduce the five-package scenario described in the issue, then define the flag behavior so the command fails when any selected package does not execute the script and succeeds when all do.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100