Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): group by license in licenses list (#5074) #5110

Merged
merged 1 commit into from
Jan 15, 2018

Conversation

iansu
Copy link
Contributor

@iansu iansu commented Dec 19, 2017

Summary

Group packages by license when running yarn license list as requested in #5074.

Test plan

Run yarn license list in an existing package and observe that packages are grouped by license.

@buildsize
Copy link

buildsize bot commented Dec 19, 2017

This change will increase the build size from 10.39 MB to 10.39 MB, an increase of 1.01 KB (0%)

File name Previous Size New Size Change
yarn-[version].noarch.rpm 900.2 KB 900.22 KB 21 bytes (0%)
yarn-[version].js 3.91 MB 3.92 MB 289 bytes (0%)
yarn-legacy-[version].js 4.06 MB 4.06 MB 610 bytes (0%)
yarn-v[version].tar.gz 905.32 KB 905.36 KB 39 bytes (0%)
yarn_[version]all.deb 669.15 KB 669.22 KB 72 bytes (0%)

@rally25rs
Copy link
Contributor

Previous output was of the form:

├─ abab@1.0.3
│  ├─ License: ISC
│  └─ URL: git+https://github.com/jsdom/abab.git
├─ abbrev@1.1.0
│  ├─ License: ISC
│  └─ URL: http://github.com/isaacs/abbrev-js
├─ acorn-dynamic-import@2.0.2
│  ├─ License: MIT
│  └─ URL: https://github.com/kesne/acorn-dynamic-import

New output with this PR is of the form:

├─ BSD
│  ├─ dnscache@1.0.1
│  │  ├─ URL: http://github.com/yahoo/dnscache.git
│  │  └─ VendorName: Vinit Sacheti
│  ├─ glob@3.1.21
│  │  ├─ URL: git://github.com/isaacs/node-glob.git
│  │  ├─ VendorName: Isaac Z. Schlueter
│  │  └─ VendorUrl: http://blog.izs.me/
│  ├─ graceful-fs@1.2.3
│  │  ├─ URL: git://github.com/isaacs/node-graceful-fs.git
│  │  ├─ VendorName: Isaac Z. Schlueter
│  │  └─ VendorUrl: http://blog.izs.me
│  ├─ regenerator-transform@0.10.1
│  │  ├─ URL: https://github.com/facebook/regenerator/tree/master/packages/regenerator-transform
│  │  └─ VendorName: Ben Newman
│  └─ unique-stream@1.0.0
│     ├─ URL: https://github.com/eugeneware/unique-stream
│     └─ VendorName: Eugene Ware
├─ BSD-2-Clause
│  ├─ cmd-shim@2.0.2
│  │  └─ URL: https://github.com/ForbesLindesay/cmd-shim.git
│  ├─ damerau-levenshtein@1.0.4
│  │  ├─ URL: https://github.com/lzrski/node-damerau-levenshtein.git
│  │  └─ VendorName: The Spanish Inquisition

@Haroenv does this fit your intent behind #5074 ? I also added you as a requested reviewer since it was your feature request 😉

@Haroenv
Copy link
Member

Haroenv commented Dec 19, 2017

This definitely makes it more easy to grasp! I was originally more thinking of a simple list of the licenses, but this is definitely a great UI too

Copy link
Member

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change right?

@iansu
Copy link
Contributor Author

iansu commented Dec 19, 2017

It changes the output so if some other tool was parsing that then this would break it. I believe the JSON output is unchanged though, which is hopefully what you'd be using in that case.

@arcanis
Copy link
Member

arcanis commented Jan 15, 2018

Thanks! This is a great idea!

@arcanis arcanis merged commit b2ce74e into yarnpkg:master Jan 15, 2018
agoldis added a commit to agoldis/yarn that referenced this pull request Feb 2, 2018
…readdir_files

* upstream/master: (34 commits)
  feat(upgrade, add): Separately log added/upgraded dependencies (yarnpkg#5227)
  feat(publish): Publish command uses publishConfig.access in package.json (yarnpkg#5290)
  fix(CLI): Use process exit instead of exitCode for node < 4 (yarnpkg#5291)
  feat(cli): error on missing workspace directory (yarnpkg#5206) (yarnpkg#5222)
  feat: better error when package is not found (yarnpkg#5213)
  Allow scoped package as alias source (yarnpkg#5229)
  fix(cli): Use correct directory for upgrade-interactive (yarnpkg#5272)
  nohoist baseline implementation (yarnpkg#4979)
  1.4.1
  1.4.0
  Show current version, when new version is not supplied on "yarn publish" (yarnpkg#4947)
  fix(install): use node-gyp from homebrew npm (yarnpkg#4994)
  Fix transient symlinks overriding direct ones v2 (yarnpkg#5016)
  fix(auth): Fixes authentication conditions and logic with registries (yarnpkg#5216)
  chore(package): move devDeps to appropriate place (yarnpkg#5166)
  fix(resolution) Eliminate "missing peerDep" warning when dep exists at root level. (yarnpkg#5088)
  fix(cli): improve guessing of package names that contain a dot (yarnpkg#5102) (yarnpkg#5135)
  feat(cli): include notice with license when generating disclaimer (yarnpkg#5072) (yarnpkg#5111)
  feat(cli): group by license in licenses list (yarnpkg#5074) (yarnpkg#5110)
  feat(cli): improve error message when file resolver can't find file (yarnpkg#5134) (yarnpkg#5145)
  ...
commonquail added a commit to commonquail/completionist that referenced this pull request Mar 28, 2018
yarnpkg/yarn#5110 changed the format of "yarn licenses list" to
deduplicate licenses, with no way to keep the old format. Rebuild NOTICE
file to match the new output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants