Skip to content

Generate new packages with not only MIT, but also Apache 2.0#8815

Merged
mcmire merged 5 commits into
mainfrom
add-apache2-license-to-template
May 14, 2026
Merged

Generate new packages with not only MIT, but also Apache 2.0#8815
mcmire merged 5 commits into
mainfrom
add-apache2-license-to-template

Conversation

@mcmire
Copy link
Copy Markdown
Contributor

@mcmire mcmire commented May 14, 2026

Explanation

The long-standing recommendation from Legal is that use both MIT and Apache 2.0 for our libraries, not just MIT. We had meant to change this in core a while back but kept forgetting. This commit updates the template that the create-package tool uses to generate new packages so that it includes both of these licenses.

This also fixes the MIT license as it was missing a final line.

Manual testing

  • Run yarn create-package --name foo --description "The foo package"
  • In packages/foo, you should see LICENSE.MIT and LICENSE.APACHE2
  • In packages/foo/package.json, license should be "(MIT OR Apache-2.0)"

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Low risk: template-only licensing text changes that affect newly generated packages, with no runtime or build logic modifications.

Overview
Updates the create-package package template to generate dual-licensed packages.

Replaces the single MIT LICENSE with a short dual-license notice and adds full LICENSE.MIT and LICENSE.APACHE2 files, and updates the template package.json license field to (MIT OR Apache-2.0).

Reviewed by Cursor Bugbot for commit dd28b16. Bugbot is set up for automated code reviews on this repo. Configure here.

@mcmire mcmire changed the title Generate packages with not only MIT, but also Apache 2.0 Generate new packages with not only MIT, but also Apache 2.0 May 14, 2026
@mcmire mcmire marked this pull request as ready for review May 14, 2026 13:33
@mcmire mcmire mentioned this pull request May 14, 2026
4 tasks
@mcmire mcmire temporarily deployed to default-branch May 14, 2026 13:33 — with GitHub Actions Inactive
Comment thread scripts/create-package/package-template/LICENSE.APACHE2 Outdated
@Gudahtt
Copy link
Copy Markdown
Member

Gudahtt commented May 14, 2026

Should we have the third LICENSE file as well, pointing at those two? e.g. https://github.com/MetaMask/core/blob/main/packages/wallet/LICENSE

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7026b09. Configure here.

Comment thread scripts/create-package/package-template/LICENSE.MIT
Comment thread scripts/create-package/package-template/LICENSE.APACHE2 Outdated
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mcmire mcmire added this pull request to the merge queue May 14, 2026
Merged via the queue into main with commit f435a14 May 14, 2026
370 checks passed
@mcmire mcmire deleted the add-apache2-license-to-template branch May 14, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants