chore(deps): upgrade PostHog SDKs to latest (posthog-node major v3→v5)#313
Open
ntotten wants to merge 1 commit into
Open
chore(deps): upgrade PostHog SDKs to latest (posthog-node major v3→v5)#313ntotten wants to merge 1 commit into
ntotten wants to merge 1 commit into
Conversation
- apps/api: posthog-node ^3.1.1 → ^5.36.5 (major v3 → v5)
- apps/web: posthog-js ^1.91.1 → ^1.383.0
Reviewed posthog-node v3 → v5 breaking changes against usage:
- apps/api only calls `new PostHog(key, { host })` and
`.capture({ distinctId, properties, event })` — both stable across
v3/v4/v5. The empty-key guard satisfies v5's non-empty requirement.
- No use of feature flags, captureMode, personProperties, shutdown,
or compression — none of the v4/v5 breaking changes apply.
posthog-js (web) uses init/capture/identify/PostHogProvider, all stable
across v1. New transitive deps (dompurify/preact/web-vitals/core-js) are
posthog-js's own dependencies. Verified apps/api typechecks against v5.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR upgrades PostHog client SDK dependencies across the monorepo, moving the API workspace to posthog-node v5 and the web workspace to a much newer posthog-js v1 release.
Changes:
- Bump
apps/apidependencyposthog-nodefrom^3.1.1to^5.36.5. - Bump
apps/webdependencyposthog-jsfrom^1.91.1to^1.383.0. - Refresh
package-lock.jsonto reflect new dependency trees (e.g.,@posthog/core,dompurify,core-js, etc.).
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| package-lock.json | Updates resolved PostHog package versions and introduces new transitive dependencies + engine constraints. |
| apps/web/package.json | Bumps posthog-js to the latest v1 line. |
| apps/api/package.json | Bumps posthog-node to v5 (major upgrade). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "fastify": "^4.21.0", | ||
| "js-yaml": "^4.1.0", | ||
| "posthog-node": "^3.1.1", | ||
| "posthog-node": "^5.36.5", |
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.
Upgrades the PostHog SDKs to their latest releases.
apps/apiposthog-nodeapps/webposthog-jsposthog-node v3 → v5 review (apps/api)
Usage is confined to
src/services/posthog.tsandsrc/lib/rating.worker.ts:new PostHog(key, { host })and.capture({ distinctId, properties, event })— both stable across v3/v4/v5.if (process.env.POSTHOG_KEY)guard satisfies v5's new non-empty-key requirement.captureMode,personProperties/groupProperties,shutdown(), or compression — so none of the v4/v5 breaking changes apply.Verified
apps/apitypechecks against posthog-node v5.posthog-js (apps/web)
Uses
init/capture/identify/PostHogProvider— all stable across the v1 line. The new transitive deps in the lockfile (dompurify,preact,web-vitals,core-js) are posthog-js's own dependencies (sanitization, surveys/toolbar, web-vitals autocapture).🤖 Generated with Claude Code