diff --git a/.changeset/hot-forks-tap.md b/.changeset/hot-forks-tap.md new file mode 100644 index 00000000000..c5d5302120a --- /dev/null +++ b/.changeset/hot-forks-tap.md @@ -0,0 +1,6 @@ +--- +"@pnpm/list": patch +"pnpm": patch +--- + +`pnpm list --long --json` should print licenses and authors of packagese [#5533](https://github.com/pnpm/pnpm/pull/5533). diff --git a/packages/list/src/getPkgInfo.ts b/packages/list/src/getPkgInfo.ts index db35f818e1f..210ef8a2b9c 100644 --- a/packages/list/src/getPkgInfo.ts +++ b/packages/list/src/getPkgInfo.ts @@ -28,6 +28,8 @@ export async function getPkgInfo ( resolved: pkg.resolved, description: manifest.description, + license: manifest.license, + author: manifest.author, homepage: manifest.homepage, repository: (manifest.repository && ( diff --git a/packages/list/test/index.ts b/packages/list/test/index.ts index 0590e20bc01..6d5ed0282bc 100644 --- a/packages/list/test/index.ts +++ b/packages/list/test/index.ts @@ -435,6 +435,12 @@ test('JSON list with aliased dep', async () => { resolved: 'https://registry.npmjs.org/is-positive/-/is-positive-1.0.0.tgz', description: 'Test if a number is positive', + license: 'MIT', + author: { + name: 'Kevin Martensson', + email: 'kevinmartensson@gmail.com', + url: 'github.com/kevva', + }, homepage: 'https://github.com/kevva/is-positive#readme', repository: 'git+https://github.com/kevva/is-positive.git', },