Skip to content

chore(deps): update dependency posthog-node to v5 #242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 11, 2025

This PR contains the following updates:

Package Change Age Confidence
posthog-node (source) ^4.18.0 -> ^5.0.0 age confidence

Release Notes

PostHog/posthog-js-lite (posthog-node)

v5.6.0

Compare Source

  1. Added support for filtering feature flags with flagKeys parameter in sendFeatureFlags options

v5.5.1

Compare Source

  1. wrap InconclusiveMatchErrors in logMsgIfDebug for local flag evaluations on sendFeatureFlags

v5.5.0

Compare Source

  1. feat: make the sendFeatureFlags parameter more declarative and ergonomic. Implementation notes below:

Modified sendFeatureFlags to be type boolean | SendFeatureFlagsOptions, (which is defined thusly)

export interface SendFeatureFlagsOptions {
  onlyEvaluateLocally?: boolean
  personProperties?: Record<string, any>
  groupProperties?: Record<string, Record<string, any>>
}

This lets users declare (1) whether to use local evaluation, and (2) which properties to supply explicitly for that evaluation, every time they want to send feature flags. It also supports the old boolean behavior if folks don't care and would rather the SDK infer it.

Now, you can make calls like this

posthog.captureImmediate({
  distinctId: "user123",
  event: "test event",
  sendFeatureFlags: {
    onlyEvaluateLocally: true,
    personProperties: {
      plan: "premium",
    },
  },
  properties: {
    foo: "bar",
  },
});

or simply

posthog.captureImmediate({
  distinctId: "user123",
  event: "test event",
  sendFeatureFlags: true // this will still infer local evaluation if it appears to be configured, but it won't try to pull properties from the event message
  properties: {
    foo: "bar",
  },
});

v5.4.0

Compare Source

feat: respect local evaluation preferences with sendFeatureFlags; add property overrides from the event to those local computations so that the locally evaluated flags can be more accuratee. NB: this change chagnes the default behavior of capture and captureImmediately – we will now only send feature flag data along with those events if sendFeatureFlags is explicitly specified, instead of optimistically sending along locally evaluated flags by default.

v5.3.1

Compare Source

  1. feat: decouple feature flag local evaluation from personal API keys; support decrypting remote config payloads without relying on the feature flags poller

v5.2.1

Compare Source

  1. feat: add captureExceptionImmediate method on posthog client

v5.1.1

Compare Source

  1. fix: Handle double-encoded JSON payloads from the remote config endpoint

v5.1.0

Compare Source

  1. chore: use /flags?v=2&config=true instead of /decide?v=4 for the flag evaluation backend

v5.0.0

Compare Source

Removed

  1. Remove is_simple_flag from PostHogFeatureFlag type
  2. Remove captureMode in favor of json capture mode only
  3. Remove deprecated personProperties and groupProperties in favor of setPersonPropertiesForFlags and setGroupPropertiesForFlags

## Breaking changes

  1. feat: migrate to native fetch, Node 20+ required
  2. PostHog Node now compresses messages with GZip before sending them to our servers when the runtime supports compression. This reduces network bandwidth and improves performance. Network traffic interceptors and test assertions on payloads must handle GZip decompression to inspect the data. Alternatively, you can disable compression by setting disableCompression: true in the client configuration during tests.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

netlify bot commented Jun 11, 2025

Deploy Preview for commandkit ready!

Name Link
🔨 Latest commit b4addaf
🔍 Latest deploy log https://app.netlify.com/projects/commandkit/deploys/6884afdaf4f8340008c8a0b6
😎 Deploy Preview https://deploy-preview-242--commandkit.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@renovate renovate bot force-pushed the renovate/posthog-node-5.x branch 3 times, most recently from 29eac37 to 74107bc Compare July 24, 2025 11:08
@renovate renovate bot force-pushed the renovate/posthog-node-5.x branch from 74107bc to b4addaf Compare July 26, 2025 10:37
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.

0 participants