-
Notifications
You must be signed in to change notification settings - Fork 87
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
Add license checker #463
Add license checker #463
Conversation
This allows us to verify licenses of packages we add.
a40ae37
to
82a4888
Compare
…se checker (#463) * Install and configure js-green-licenses package This allows us to verify licenses of packages we add. * automate license check in travis "
], | ||
"packageWhitelist": [ | ||
"@eventespresso/react-exit-modal-typeform", | ||
"@wordpress/jest-preset-default", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't need to whitelist this package should you as it is GPL-2.0-or-later
licensed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at the time there were fails. It's possible the library had an out-of-date SPDX validator. I just re-ran the checker excluding this package from the whitelist and it ran okay so I'll change this in another pull.
Problem this Pull Request solves
With the new build system, its really easy to add npm packages without giving thought to any licenses that package (or its dependencies) may have. In order to prevent conflicts with our GPLv2 license, I've added a license checker package that will check licenses in install packages (dependencies only, we don't need to worry about devDependencies). If there's a package that fails, then it will fail a travis build. The tool can also be used outside of travis by just running
npm run lc
.For this first iteration, I've added the configuration file that enables all our current packages to run green (whitelisted packages are either only used in development type environments or is something we already bundle in production (something thats embedded in our usage of typeform). We may need to revisit in the future our
exit-modal-embed
package because it's license may not be compatible with the licenses in the typeform tree. But for now I've added an exclusion.How has this been tested
npm run lc
and verified it passed all license checks.Checklist
esc_html__()
, see https://codex.wordpress.org/I18n_for_WordPress_Developers)