yarn info

yarn info

Show information about a package.

yarn info <package> [<field>]

This command will fetch information about a package and return it in a tree format. The package does not have to have been installed locally.

yarn info react
yarn info vx.x.x
{ name: 'react',
  version: '15.4.0-rc.2',
  description: 'React is a JavaScript library for building user interfaces.',
  time: { modified: '2016-10-06T22:09:27.397Z', ... } ... }

The default reporting style for this command is a single-quoted serialization. To emit lines of valid JSON, use the standard --json flag:

yarn info react --json
{"type":"inspect","data":{"name":"react","time":{...}}}
{"type":"finished","data":417}

登录查看完整内容