posthog-node
6.0.5 · 19 Nov 2026MIT23.9M / weekRepositorynpmAtom feed
5.74.0 is the newest release of 5.x.
In short
1 deprecated1 new1 internal
- Deprecated
posthog.initoptionevaluationEnvironmentsis now deprecated in favor ofevaluationContexts. 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
evaluationEnvironmentstoevaluationContextsfor 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.initoptionevaluationEnvironmentsis now deprecated in favor ofevaluationContexts. 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.