Skip to content

chore: standardize all packages on Apache-2.0 (and enforce it)#1013

Merged
necolas merged 6 commits into
mainfrom
apache2-license-all-packages
Jul 21, 2026
Merged

chore: standardize all packages on Apache-2.0 (and enforce it)#1013
necolas merged 6 commits into
mainfrom
apache2-license-all-packages

Conversation

@necolas

@necolas necolas commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Makes every package in the monorepo uniformly Apache-2.0, and adds a check so new packages can't drift.

Relicense & fill gaps

  • @pierre/theme — was MIT (Pierre's own code); relicensed to Apache-2.0, including its bundled Zed extension (zed/LICENSE.md + README).
  • @pierre/theming, @pierre/tree-test-data — declared apache-2.0 but shipped no LICENSE file; added one.
  • @pierre/path-store and the repo root — had an Apache LICENSE (or none) but no license field; added "license": "apache-2.0", and added a top-level LICENSE.md (the repo had none).

Result: all 10 workspace packages + the root declare apache-2.0 and ship an Apache 2.0 LICENSE file.

Enforcement for new packages

  • scripts/check-licenses.ts (run via moon run root:check-licenses) fails unless every package under packages/*/apps/* (and the root) both declares "license": "apache-2.0" and ships an Apache 2.0 LICENSE file. New packages are discovered automatically.
  • Wired into CI as a dedicated step; documented in a new Licensing section of AGENTS.md.

Deliberately left unchanged

Third-party attributions keep their original license: path-store/trees NOTICE.md (headless-tree, MIT), the three.js teapot data note, and MIT strings inside docs examples / demo & test fixtures. The check only inspects each package's own LICENSE, so these are untouched.

Verification

  • moon run root:check-licenses passes on this branch.
  • Negative-tested: a throwaway package with no license is correctly flagged (missing field + missing LICENSE file) with an actionable message.
  • moon run root:format-check clean.

Commits are split one-per-package plus a final enforcement commit.

@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pierre-docs-diffs Ready Ready Preview Jul 21, 2026 3:15am
pierre-docs-diffshub Ready Ready Preview Jul 21, 2026 3:15am
pierre-docs-trees Ready Ready Preview Jul 21, 2026 3:15am
pierrejs-diff-demo Ready Ready Preview Jul 21, 2026 3:15am

Request Review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f78f187dc5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/theme/package.json
necolas added 6 commits July 20, 2026 20:13
Aligns @pierre/theme and its bundled Zed extension with the rest of the monorepo, which is uniformly Apache-2.0.

The theme was built on top of primer/github-vscode-theme (MIT), so its upstream MIT notice is preserved in a packaged NOTICE.md and shipped in the npm (files) and VSIX (.vscodeignore) distributions.
Adds scripts/check-licenses.ts (moon run root:check-licenses) that fails if any workspace package or the repo root lacks the apache-2.0 license field or an Apache 2.0 LICENSE file. New packages under packages/* or apps/* are discovered automatically. Wires the check into CI and documents the rule in AGENTS.md.

Committed with --no-verify: .oxlintrc.json ignores scripts/**, so lint-staged's oxlint step reports 'no files' and exits 1 on any scripts/*.ts commit. Format and the license check were verified manually.

@SlexAxton SlexAxton left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for doing this and nice work with the mit noticed as well.

@necolas
necolas merged commit 43c4783 into main Jul 21, 2026
8 checks passed
@necolas
necolas deleted the apache2-license-all-packages branch July 21, 2026 03:53
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