fix(posthog-js): use SPDX expression for license field#3443
Open
jleknes wants to merge 1 commit intoPostHog:mainfrom
Open
fix(posthog-js): use SPDX expression for license field#3443jleknes wants to merge 1 commit intoPostHog:mainfrom
jleknes wants to merge 1 commit intoPostHog:mainfrom
Conversation
Replace "SEE LICENSE IN LICENSE" with the SPDX expression "(Apache-2.0 AND MIT)" so automated license-compliance tools can parse the field. The expression matches the LICENSE file, which combines Apache-2.0 (PostHog/Mixpanel code) with MIT (derived Sentry/rrweb code). Fixes PostHog#2627
|
@jleknes is attempting to deploy a commit to the PostHog Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Reviews (1): Last reviewed commit: "fix(posthog-js): use SPDX expression for..." | Re-trigger Greptile |
Contributor
|
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2627.
Replace
"license": "SEE LICENSE IN LICENSE"inpackages/browser/package.jsonwith the SPDX expression"(Apache-2.0 AND MIT)". This unblocks automated license-compliance tools (e.g.license-checker-rseidelsohn) that first try to parse thelicensefield as an SPDX expression and only fall back to LICENSE-file scanning when that fails – and the fallback can't reliably resolve a multi-license LICENSE file.The expression uses
ANDbecause the LICENSE file applied to this package combines:AND(rather thanOR) is the correct operator: a consumer of the published package must comply with both licenses simultaneously.The expression validates against
spdx-expression-parse(the same parser npm and most license-checker tools use).Out of scope for this PR (worth a follow-up)
@posthog/rollup-pluginand@posthog/webpack-pluginare missing thelicensefield entirely."MIT". Some of them (notablyposthog-react-native,@posthog/core,posthog-node) also include MIT-licensed third-party derivatives sitting alongside PostHog's own code, so it's worth confirming whether"MIT"is accurate for each or whether they should also use a(Apache-2.0 AND MIT)expression.