-
Notifications
You must be signed in to change notification settings - Fork 7
v2 migration guide_guidesmiths
This document aims to provide a guide for users upgrading from v1 to v2. Since this library is in an early stage, we might implement some breaking changes in order to make it more convenient to use, based on users' feedback. Apologies in advance for the possible inconvenience.
On v1, you needed to provide the licenses to the failOn
option as a list of comma-separated values:
npx @guidesmiths/license-checker --failOn license1,license2
We thought that it would be handier to get rid of the comma and accept several licenses in this fashion:
npx @guidesmiths/license-checker --failOn license1 license2
❗ Please, be aware that if you continue passing the comma-separated values on v2, it will be handled as a unique license name, which is probably something you do not want.
We acknowledge that having to pass the exact values of the licenses is a bit cumbersome, especially taking into consideration the number of variants that some may have. To make that process a bit less painful, the failOn
option accepts regular expressions now:
npx @guidesmiths/license-checker --failOn /license1/ license2
In this example, the content enclosed in slashes (license1
) would be interpreted as a RegExp when matching your dependency packages' licenses. For instance, if you are interested in being alerted of any GPL variants, you may pass /GPL/
. It will detect all its possible variants (GPL, LGPL, AGPL, etc).