v2 migration guide_onebeyond - onebeyond/license-checker GitHub Wiki
Overview
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.
:bomb: Breaking changes
failOn option no longer accepts RegExp
On @guidesmiths/license-checker you could provide regular expresions
npx @guidesmiths/license-checker --failOn /GPL/
That is no longer accepted in @onebeyond/license-checker
with @onebeyond/license-checker you can use
npx @onebeyond/license-checker --failOn AGPL-1.0-or-later GPL-1.0-or-later
:exclamation: Licenses have to be valid SPDX
:sparkles: Other changes
check command to validate valid SPDX licenses
npx @onebeyond/license-checker check MIT
will output:
License MIT is SPDX compliant
while
npx @onebeyond/license-checker check NOTSPDX
will output:
Error: License "NOTSPDX" is not SPDX compliant. Please visit https://spdx.org/licenses/ for the full list
check if a license is SPDX compliant. It is intended to be used as a standalone command. More info at https://spdx.org
Double license support
if a package accepts LISENCE1 or LISENCE2 and check for LISENCE1, it will succeed