feat(plugins): default release mode to event - #4705
Merged
Merged
Conversation
The rollup and webpack plugins now inject the release id into each chunk and upload symbol sets release-independent. Set sourcemaps.releaseMode to 'symbol-set' to keep binding the symbol sets to a release. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jg6r6rFUBnowrXssZyU7yR
Contributor
|
Contributor
Contributor
|
Size Change: -10 B (0%) Total Size: 20.8 MB 📦 View Changed
ℹ️ View Unchanged
|
Contributor
🦔 PostHog Review reviewed this pull requestFound 0 must fix, 2 should fix, 1 consider. Published 3 findings (view the review). |
This was referenced Aug 31, 2026
Contributor
|
PostHog Review alpha 🦔 If you find any issues helpful - please reply "valid", "invalid", etc., for evaluation purposes 🙏 |
The note listed three packages. @posthog/nextjs-config resolves its config through the same function, so Next.js builds change too. The note also said an older posthog-cli fails the build. That holds for rollup, which resolves the release while it renders each chunk. A webpack or Next.js build prints the error from the CLI and then completes without uploading source maps. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jg6r6rFUBnowrXssZyU7yR
This was referenced Sep 1, 2026
ablaszkiewicz
marked this pull request as ready for review
September 1, 2026 13:38
Contributor
|
Reviews (1): Last reviewed commit: "chore(plugins): correct the release note..." | Re-trigger Greptile |
turnipdabeets
approved these changes
Sep 1, 2026
turnipdabeets
left a comment
Contributor
There was a problem hiding this comment.
LGTM, just one suggestion on changeset
cat-ph
approved these changes
Sep 1, 2026
cat-ph
reviewed
Sep 1, 2026
… floors The default lives in @posthog/plugin-utils, and published plugins depend on it with a caret range, so a minor would flip already-installed plugins on a lockfile-less reinstall and fail rollup builds on an old posthog-cli. A major keeps the new default behind an explicit plugin upgrade. The changeset also names the runtime floors that read _posthogReleaseId: posthog-js 1.409.0, posthog-node 5.47.0, @posthog/core 1.46.0, all verified against the release tags. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0177eam86deHk8HZYMKcJtbD
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0177eam86deHk8HZYMKcJtbD
6 tasks
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.
Related PRs
Event mode is live today, and it is opt-in. These PRs settle where it stays and where it goes.
Deprecating the mobile knobs. The symbol id on these paths is already a content hash, so two releases collide only when they ship a byte-identical artifact. An ordinary release that changes code gets its own symbol set and never collides. The dSYM path also lost release attribution for embedded targets, because one upload covers every target while it creates one release. Review asked for deprecation instead of removal, so every knob stays accepted as a warned no-op.
Making it the default.
React Native. Removes the iOS and Android propagation, and makes event mode the default for the Hermes upload. That is the one path where two releases really do ship the same artifact.
Problem
Changes
sourcemaps.releaseModedefaults toeventfor the rollup plugin, the webpack plugin and@posthog/nextjs-config.normalizeReleaseMode, so one line moves them together._posthogReleaseId.sourcemaps.releaseMode: 'symbol-set'keeps the old behavior.POSTHOG_RELEASE_MODE=symbol-setdoes the same.One function holds the default:
normalizeReleaseModein@posthog/plugin-utils. The rest of the diff is test setup.An old posthog-cli behaves differently per bundler. It stops a rollup build, because the plugin resolves the release while it renders each chunk. It does not stop a webpack or Next.js build. Those uploads run after the build, and the plugin logs the error from the CLI instead of failing. The changeset states both. Making webpack fail would change how it treats every upload error, which is a wider decision than this PR.
How did you test this code?
jestinpackages/plugin-utils,packages/rollup-pluginandpackages/webpack-plugin.symbolSetOptions.🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Written with Claude Code (Opus 5). Skills invoked:
/writing-pr-descriptions.Rollup's
renderChunkreturns a promise in event mode, because it waits for the release. Six tests read.codeoff that promise. The tests for mode-independent behavior moved to explicit symbol-set config and stayed synchronous.