Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pnpm m ls command to get dependencies of the package located at a path #1651

Closed
vjpr opened this issue Feb 6, 2019 · 4 comments · Fixed by #2254
Closed

pnpm m ls command to get dependencies of the package located at a path #1651

vjpr opened this issue Feb 6, 2019 · 4 comments · Fixed by #2254
Labels
area: monorepo Everything related to the pnpm workspace feature type: feature
Milestone

Comments

@vjpr
Copy link
Contributor

vjpr commented Feb 6, 2019

From #1637 (comment):

Also, if I want to get the dependencies of the root package...

Is something like this possible:

pnpm m ls --filter=. ...

I want to be able to "get dependencies of the package located at a path".

I looking in pnpm i --help and it doesn't seem to have the option.

Maybe we need something like --filter-by-pkg-at-path-with-dependencies=. and --filter-by-pkg-at-path-with-dependants=.?

@zkochan
Copy link
Member

zkochan commented Feb 6, 2019

Filtering for dependencies/dependents is only possible by package name at the moment. So foo..., ...foo.

new syntax suggestion for filtering by path may be proposed here: https://github.com/pnpm/spec/blob/master/workspace/filtering.md

@zkochan zkochan added type: feature area: monorepo Everything related to the pnpm workspace feature labels Mar 14, 2019
@zkochan
Copy link
Member

zkochan commented Dec 19, 2019

pnpm v4.6 will have filtering by changed packages. It will use [] to specify the commit/branch. And it supports the ... syntax. Maybe we could allow putting path in []? In that case we'd be able to do something like ...[.] or [../foo]...

@zkochan zkochan pinned this issue Dec 19, 2019
@zkochan
Copy link
Member

zkochan commented Dec 24, 2019

So I think there are 3 ways of doing this

  1. Reuse the [] syntax. I think we can differentiate git commits/branches from paths.
  2. Use some other wrappers. For instance, {./packages}.
  3. Add a flag. For instance, pnpm t --filter . --include-dependencies

I think I'd vote for 2 at the moment but we can do 3 in the future as well.

cc @pnpm/collaborators

zkochan added a commit that referenced this issue Jan 5, 2020
@zkochan zkochan added this to the v4.7 milestone Jan 6, 2020
zkochan added a commit that referenced this issue Jan 6, 2020
PR #2254
close #1651

Filtering by directory: `pnpm --filter {dir}`
Including dependents: `pnpm --filter ...{dir}`
Including dependencies: `pnpm --filter {dir}...`
Filtering changed projects inside a directory: `pnpm --filter {dir}[origin/master]`
@zkochan zkochan unpinned this issue Jan 6, 2020
@zkochan
Copy link
Member

zkochan commented Jan 7, 2020

🚢 4.7.0-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: monorepo Everything related to the pnpm workspace feature type: feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants