Commit Graph

28 Commits

Author SHA1 Message Date
Ryo Matsukawa
c206765715 fix: display npm: protocol for aliased packages in list and why (#10084)
* fix: support alias resolution in pnpm why with npm:
protocol

* refactor: make alias required instead of optional

* refactor: reorder field to put alias first
2025-11-20 02:36:53 +01:00
Ryo Matsukawa
24dc8713b0 feat: add --lockfile-only option to pnpm list (#10066)
close #10020

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2025-11-18 11:51:20 +01:00
Zoltan Kochan
e792927841 feat: support finder functions for performing complex searches with list and why commands (#9946) 2025-09-12 11:46:32 +02:00
Zoltan Kochan
facd7656e8 refactor: always use extensions in relative imports (#9878) 2025-08-19 15:25:11 +02:00
btea
adb236f1a1 refactor: improve regexp (#9203) 2025-03-02 13:17:09 +01:00
btea
222d10ac79 perf: use hash to replace createHash (#8629)
---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2024-10-21 10:51:33 +02:00
Khải
44b8935997 fix(listing): --json shows wrong private (#8541)
close #8519
2024-09-22 02:37:50 +02:00
Zoltan Kochan
3af07cb839 feat: add an option to list and why to exclude peer dependencies from the output (#8506) 2024-09-08 22:26:33 +02:00
Zoltan Kochan
9719a42d0e feat: configurable max length of directories inside node_modules/.pnpm (#7994)
close #7355
2024-04-28 11:07:29 +02:00
Khải
37c0f48555 refactor(reviewing/list): type checking perf (#7887) 2024-04-10 13:13:56 +02:00
Zoltan Kochan
0564745b1d style: use unknown in try/catch (#7709) 2024-03-06 01:47:04 +01:00
btea
09f6103490 fix(reviewing): filter the same print message (#7430)
close #7429

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
2023-12-26 12:54:41 +01:00
Zoltan Kochan
733d612ad1 test: check spelling with cspell (#7229) 2023-10-20 15:58:27 +03:00
Zoltan Kochan
122febe472 fix(list): export PackageDependencyHierarchy 2023-09-27 17:14:48 +03:00
Nacho Aldama
40798fb1cd fix(reviewing): fix memory error in pnpm why (#7122)
* fix(reviewing): fix memory error in `pnpm why`

* fix: update comments

* fix: add support for `--depth`

* fix: move implementation to `@pnpm/list`

* fix: revert changes in Dependencies Hierarchy

* fix: add pnpm to patch list

* refactor: rename functions to descriptive names

* refactor: rename `findEndLeafs` to `findEndLeaves`
2023-09-27 15:35:48 +03:00
Zoltan Kochan
101c97ecb8 feat(list): update the API for usage in Bit CLI (#7132)
* feat(list): update the API for usage in Bit CLI

* refactor: move createPackagesSearcher to dependencies-hierarchy package

* docs: add changesets
2023-09-26 15:23:36 +03:00
Zoltan Kochan
f73eeac067 fix: pnpm why should work without package.json files (#6953) 2023-08-18 04:01:38 +03:00
Zoltan Kochan
df11f2c62c style: fix 2023-07-29 22:37:57 +03:00
Zoltan Kochan
4b97f1f07a perf: don't use await inside loops (#6617) 2023-06-05 12:12:47 +03:00
Zoltan Kochan
ee61ca4cb7 style: update eslint (#6236) 2023-03-18 14:57:29 +02:00
await-ovo
185ab01adf feat: when patch package does not specify a version, use locally installed version by default. (#6197)
close #6192
2023-03-13 16:40:21 +02:00
await-ovo
b9ab2e0bf2 feat: show path info for pnpm why --json or --long (#6109)
close #6103
2023-02-20 05:41:57 +02:00
await-ovo
19e823beab fix: path info in dependencies hierarchy tree (#6001)
* fix: get correct path info in dependencies hierarchy tree

* chore: test case for build dependencies hierarchy

* docs: update changeset

* chore: test cases

* fix: show full path in dependencies hierarchy tree
2023-02-02 03:34:16 +02:00
Zoltan Kochan
583e3954be fix: remove suppressImplicitAnyIndexErrors from typescript settings (#5991) 2023-01-28 18:19:26 +02:00
await-ovo
94ef3299ed feat(plugin-commands-audit): show path info in audit output (#5917)
close #3073
2023-01-18 02:04:17 +00:00
Brandon Cheng
395a33a50c feat: traverse through workspace packages in why and list commands (#5863)
* refactor(dependencies-hierarchy): remove keypath argument from getTree

The `keypath` argument is an internal implementation detail of `getTree`
used to detect cycles in the package graph. Removing this from the call
signature of `getTree` since it exposes an implementation detail.

The start of a `getTree` call always passed in the starting node as the
initial value anyway.

```ts
const getChildrenTree = getTree.bind(null, { ... })
getChildrenTree([relativeId], relativeId)
```

It's simpler for that to happen in the first call to `getTreeHelper`
internally and better ensures the keypath is created correctly. A future
refactor makes construction of the keypath more involved.

* refactor(dependencies-hierarchy): remove refToRelative call in getPkgInfo

This removes an extra `refToRelative` call in `getPkgInfo`. The result
of this call wasn't used within the function and was simply passed back
to the caller.

Callers of `getPkgInfo` were checking the result of `refToRelative`,
from `getPkgInfo`'s return object only to call `refToRelative` again.
Calling `refToRelative` directly simplifies code a bit. We can remove an
unnecessary cast and an if statement.

* refactor(dependencies-hierarchy): create enum for getTree nodes

* feature(dependencies-hierarchy): traverse through workspace packages

This updates `pnpm list` and `pnpm why` to traverse through `link:`
packages by simply. This is done by simply implementing a new TreeNodeId
enum variant.

* test(dependencies-hierarchy): test transitive workspace package listing

* refactor(dependencies-hierarchy): create interface for GetPkgInfoOpts

A future commit adds new fields to `getPkgInfo`'s options. The dedicated
interface makes it easier to describe these new options with a JSDoc.

* fix(dependencies-hierarchy): fix path for link: deps in projects

This was a bug before the changes in this pull request. The bug was not
user facing since `pnpm list --json` doesn't print this computed path.

* fix(dependencies-hierarchy): print version paths rel to starting project

* feat(list): add --only-projects flag

* refactor: change description of --only-projects

Co-authored-by: Zoltan Kochan <z@kochan.io>
2023-01-03 15:28:20 +02:00
Zoltan Kochan
313702d76b refactor: all packages should be in the @pnpm scope (#5785) 2022-12-13 03:46:56 +02:00
Zoltan Kochan
4ca53b0b50 refactor: group projects in different subdirectories (#5659) 2022-11-20 01:35:22 +02:00