fix: add author and license to list (#2825)

close #5533
ref #2825
This commit is contained in:
Emile Fugulin
2022-07-29 14:17:39 -04:00
committed by Zoltan Kochan
parent da22f0c1f2
commit f365491653
3 changed files with 14 additions and 0 deletions

View File

@@ -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).

View File

@@ -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 && (

View File

@@ -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',
},