lerna / lerna/lerna

Unclear docs: Does `ls --since` include dependents by default?

Open
#3,057 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: docs
Dominant language
TypeScript
Stars
36.1k
Forks
2.3k
Avg merge
1d 4h
Merged PRs (30d)
50

Description

Hey there, the docs on using lerna ls --since is unclear regarding to dependents.
It is unclear whether or not this commands includes dependent projects or not.

On the one hand, Docs on since state that it "Only include packages that have been changed since the specified ref", which makes it sound like dependents are not included.
However, in this repo I've used lerna ls --since without the --include-dependents flag and I've gotten the dependencies as well.
To reproduces, simply checkout 9a131db6587a46f6a31f8ad10e82ce8a351dff33, and run lerna ls --since HEAD~1 --json -all. The result will include dependent projects.

On the other hand, this comment explains that lerna ls --since should always return dependents. However, there are some cases where lerna ls --since HASH --json -all and lerna ls --since HASH --json -all --include-dependents produce a different output. I wasn't able to reproduce this yet in a small repository, though.

Expected Behavior

Docs should be clear on whether or not lerna ls --since includes dependents or not - Docs on since
There are some cases where lerna ls --since produces a different result when adding a --include-dependents flag

Current Behavior

Docs are unclear, lerna ls --since sometimes returns dependents and sometimes doesn't. See summary above for more info

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the core/filter-options#--since-ref documentation and reproduce the reported behavior at commit 9a131db6587a46f6a31f8ad10e82ce8a351dff33 using lerna ls --since HEAD~1 --json -all, then compare it with --include-dependents. Done means the docs clearly state when dependents are included and explain the observed difference, if confirmed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
cli, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.