diff --git a/CHANGELOG.md b/CHANGELOG.md index 06535476..5377bce3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## master +## [3.0.0] - 2020-10-29 + ### Breaking ### Variadic flags @@ -22,6 +24,10 @@ If you use one of those flags _and_ you want to specify a custom `yarn.lock` fil - Updated Commander to 6.1.0 - Updated eslint to 7.7.0 +- Updated yarn to 1.22.5 +- Updated prettier to 2.1.1 +- Updated jest to 26.4.2 +- Updated eslint-plugin-jest to 23.20.0 ## [2.1.0] - 2020-07-10 diff --git a/README.md b/README.md index 07c6ed2d..8c5eb5e7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ Builds: ![Node.js CI](https://github.com/atlassian/yarn-deduplicate/workflows/Node.js%20CI/badge.svg) +This package only works with Yarn v1. Yarn v2 supports package deduplcatiion [natively](https://github.com/yarnpkg/berry/pull/1558)! # Yarn deduplicate @@ -141,14 +142,14 @@ is specified again. ### Progressive deduplication -`--packages ,,` +`--packages ` Receives a list of packages to deduplicate. It will ignore any other duplicated package not in the list. This option is recommended when the number of duplicated packages in `yarn.lock` is too big to be easily reviewed by a human. This will allow for a more controlled and progressive deduplication of `yarn.lock`. -`--scopes ,,` +`--scopes ` Receives a list of scopes to deduplicate. It will ignore any other duplicated package not in the list. This option is recommended when deduplicating a large number of inter-dependent packages @@ -172,6 +173,31 @@ yarn-deduplicate --fail ## Migration guide +### From 2.x to 3.x + +In this version we have adopted variadic arguments from commander.js. These are the equivalent +commands: + +```bash +#Old +yarn-deduplicate --packages libA,libB +yarn-deduplicate --scopes @scopeA,@scopeB +yarn-deduplicate --exclude libA,libB + +#New +yarn-deduplicate --packages libA libB +yarn-deduplicate --scopes @scopeA @scopeB +yarn-deduplicate --exclude libA libB +``` + +A consequence of this change is that if you were using one or more of the affected options ( +`--packages`, `--scopes` or `--exclude`) __and__ a custom path for `yarn.lock`, you need to use `--` +to "stop" package/scope/exclude parsing: + +```bash +yarn-deduplicate --packages libA libB -- path/to/yarn.lock +``` + ### From 0.x to 1.x In this version we have renamed the project and refactored the CLI. These are the equivalent