-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Scripts: Refactor to extract license logic #66179
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: 0 B Total Size: 1.77 MB ℹ️ View Unchanged
|
Flaky tests detected in 17d3280. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11382438174
|
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.
Everything looks good. I see that some types and better descriptions were added. We could iterate further on it, as there is still room for improvement. Yes, you opened a Pandora's box. However, not a blocker for this PR in the spirit of Boy Scout Rule:
Leave your code better than you found it.
This license appears on some npm packages. It intended to be highly permissive. The website states that it should be GPLv2 compatible: > Is the model license compatible with GPL? > The Council doesn’t see any reason why software licensed under the > Blue Oak Model License 1.0.0 can’t be used, combined, and distributed > with software under GPLv2, LGPLv2.1, GPLv3, LGPLv3, or AGPLv3. https://blueoakcouncil.org/license-faq
935cd7e
to
17d3280
Compare
Refactor some of the check-license logic into a reusable module. The check-license script continues to act as the CLI, while another module contains the license checking logic. This is helpful for work migrating to npm workspaces: WordPress#65681 The license checking logic is required, but the implementation will be different to account for npm workspaces in Gutenberg. --- Co-authored-by: sirreal <[email protected]> Co-authored-by: gziolo <[email protected]>
What?
Part of #65681, this refactors some of the
check-license
logic in wp-scripts into a reusable module. Thecheck-license
script continues to act as the CLI, while another module contains the license checking logic.Why?
#65681 will reuse this logic in a way that's compatible with npm workspaces in Gutenberg. It cannot use the same check-licenses CLI logic that depends on repository dependencies and devDependencies.
How?
This moves code around and adjusts some function signatures to pass arguments around.
Testing Instructions
Unit tests are included.