Skip to content

Commit

Permalink
fix: add author and license to list (#2825)
Browse files Browse the repository at this point in the history
close #5533
ref #2825
  • Loading branch information
Sytten authored and zkochan committed Oct 24, 2022
1 parent da22f0c commit f365491
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .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).
2 changes: 2 additions & 0 deletions packages/list/src/getPkgInfo.ts
Expand Up @@ -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 && (
Expand Down
6 changes: 6 additions & 0 deletions packages/list/test/index.ts
Expand Up @@ -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',
},
Expand Down

0 comments on commit f365491

Please sign in to comment.