Packages

posthog-node

6.0.5 · 19 Nov 2026MIT23.9M / weekRepositorynpmAtom feed

Your version

5.23.0

19 Jan 2026Where it was published

5.74.0 is the newest release of 5.x.

In short

1 deprecated1 new1 internal

  • Deprecated

    posthog.init option evaluationEnvironments is now deprecated in favor of evaluationContexts. The old property will continue to work and will log a deprecation warning. It will be removed in a future major version.

Release note

Minor Changes

  • Renamed evaluationEnvironments to evaluationContexts for clearer semantics. The term "contexts" better reflects that this feature is for specifying evaluation contexts (e.g., "web", "mobile", "checkout") rather than deployment environments (e.g., "staging", "production").

Deprecated

  • Deprecated

    posthog.init option evaluationEnvironments is now deprecated in favor of evaluationContexts. The old property will continue to work and will log a deprecation warning. It will be removed in a future major version.

Migration Guide

// Before
posthog.init('<ph_project_api_key>', {
    evaluationEnvironments: ['production', 'web', 'checkout'],
})

// After
posthog.init('<ph_project_api_key>', {
    evaluationContexts: ['production', 'web', 'checkout'],
})
``` (2026-01-19)

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.