Packages

@posthog/types

1.427.1 · 23 Nov 2026MIT38.9M / weekRepositorynpmAtom feed

Your version

1.390.0

17 Jun 2026Where it was published

1.427.1 is the newest release of 1.x.

In short

1 new

Release note

Minor Changes

  • Add a beforeSend option to the logs config, so you can inspect, redact, or drop log records before they're sent:

    posthog.init('<token>', {
        logs: {
            beforeSend: (log) => {
                // return null to drop the log, or return the (optionally modified) log to keep it
                if (log.body.includes('password')) {
                    return null
                }
                return log
            },
        },
    })

    beforeSend accepts a single function or an array of functions (applied left to right); returning null from any of them drops the record. It runs for logs sent via both posthog.captureLog() and posthog.logger.*. (2026-06-17)

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.