Repository navigation
[failproofai] Bump posthog-node to 6.0.5 (PostHog Capture V1) - #1043
Conversation
Bumps [posthog-node](https://github.com/PostHog/posthog-js/tree/HEAD/packages/node) from 5.73.0 to 6.0.5. - [Release notes](https://github.com/PostHog/posthog-js/releases) - [Changelog](https://github.com/PostHog/posthog-js/blob/main/packages/node/CHANGELOG.md) - [Commits](https://github.com/PostHog/posthog-js/commits/posthog-node@6.0.5/packages/node) --- updated-dependencies: - dependency-name: posthog-node dependency-version: 6.0.5 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Thanks @dependabot[bot] for keeping our dependencies current! 🙌 |
|
pr-autopilot finished looking at the failing CI on commit |
|
pr-autopilot will not merge this automatically (commit Why:
A person needs to review and merge it. pr-autopilot · stopped by a fixed rule: no AI review ran on this PR |
Bumps [posthog-node](https://github.com/PostHog/posthog-js/tree/HEAD/packages/node) from 5.73.0 to 6.0.5. - [Release notes](https://github.com/PostHog/posthog-js/releases) - [Changelog](https://github.com/PostHog/posthog-js/blob/main/packages/node/CHANGELOG.md) - [Commits](https://github.com/PostHog/posthog-js/commits/posthog-node@6.0.5/packages/node) --- updated-dependencies: - dependency-name: posthog-node dependency-version: 6.0.5 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Main landed its own CommonJS policy loader in #1033 (load as ES modules, then retry only the files Node refuses as .cjs), with Node e2e coverage in commonjs-policy-node.e2e.test.ts. This branch's loader change, its unit test and its Node e2e test are superseded by it and are dropped. bun.lock is regenerated against main with bun 1.4.5 (CI's pin), keeping posthog-node 6.0.5, @posthog/core 1.69.2 and @posthog/types 1.427.1. trackEvent now sets $lib_version beside $lib, which posthog-node 6 keeps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@coderabbitai review |
Action not completed
|
|
@coderabbitai full review |
Action not completed
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bumps
posthog-nodefrom 5.73.0 to 6.0.5 (Dependabot) and adapts our code and the real-delivery test to PostHog 6's ingestion contract.What changed
posthog-node5.73.0 → 6.0.5. It is a devDependency bundled into the Next.js dashboard server at build time ([failproofai] Pin what an install fetches; document what a Cloud policy runs (#1798) #1059), so the lockfile decides what ships. The CLI, worker and hook bundles don't contain it:trackEventis a no-op there, and the hook dispatcher posts to/capture/with plainfetch.bun.lockwas regenerated against currentmainwith bun 1.4.5 (CI's pin) and holdsposthog-node6.0.5,@posthog/core1.69.2 and@posthog/types1.427.1. The caret range would also accept 6.2.1, but that and@posthog/core1.69.3 were published hours before this update, so the lock stays on the 11-day-old 6.0.5 Dependabot proposed.lib/telemetry.ts:trackEventalso sets$lib_version. posthog-node 6 keeps a$libthe event sets (5 overwrote it withposthog-node), but fills$lib_versiononly for its own library name. PostHog's migration guide says to set both when overriding, and the daemon already does forfailproofai-daemon.__tests__/lib/telemetry-delivery.test.tsnow pins the Capture V1 contract against the real library: batches go to/i/v1/analytics/eventswithAuthorization: Bearer <phc_ key>, the fixture answers with the per-event{results: {<uuid>: {result: "ok"}}}acknowledgement (a 2xx without it fails the batch in v6),$lib/$lib_versionarrive asfailproofai/the package version, a successful send logs neither an error nor a warning, and a 500 is still retried and delivered. The raw-fetch hook dispatcher still posts to/capture/; its test is unchanged.__tests__/lib/telemetry.test.ts: the one exact-properties assertion fortrackEventnow includes$lib_version.CHANGELOG.md: one Dependencies entry under1.0.18-beta.0 — 2026-11-30.Dropped as already on
mainsrc/hooks/loader-utils.ts,custom-hooks-loader.ts) plus itsloader-commonjs.test.ts,node-custom-hooks.e2e.test.tsand theruntime: "node"option inhook-runner.ts.mainfixed the same bug in Customer fixes: stale-gateway denials, gateway restart, false 401s, cloud messaging, daemon resilience, logs, version, event mapping #1033 with a different design: it loads a policy as ES modules first and rewrites as.cjsonly the files Node refuses for being CommonJS.commonjs-policy-node.e2e.test.tscovers this under Node, including both cases this branch tested (a CommonJS entry requiring a helper, and an ES module importing amodule.exportshelper). The dropped unit test calledrewriteFileTreewithout the set of files to write as.cjs, so it does not apply tomain's design.Cargo.*,CLAUDE.mdand SDK changes GitHub listed earlier weremain's own commits ([failproofai] Publish to npm with trusted publishing (OIDC) instead of NPM_TOKEN #1046, [failproofai] Land post-release version bumps through review, without the version bot #1048, [failproofai] Open the version-bump pull request from the release workflow #1052) that this branch had picked up. They were never part of this change.For the reviewer
/i/v1/analytics/eventswith the project token in theAuthorizationheader, not the body. Our default host ishttps://us.i.posthog.com, which supports it. AFAILPROOFAI_POSTHOG_HOSTthat points at a reverse proxy must forward that path and passAuthorizationand thePostHog-*headers through ("Prepare your proxy" in theMIGRATION.mdposthog-node ships). The hook dispatcher, install telemetry and the daemon don't use posthog-node, so they are unaffected.$lib: posthog-nodeto$lib: failproofai, which is whattrackEventalways asked for. Any PostHog insight that filters on$lib = posthog-nodeneeds to usefailproofai.productis unchanged.fetchRetryDelayfor capture and backs off from 100 ms instead;fetchRetryCount: 3still sets the retry count.flush()no longer rejects on a failed delivery; its one caller (instrumentation.node.ts) already ignores rejection.Verification
bun run test:runpasses on the final merge withmain(withdist/index.jsbuilt first, as CI does).bun run lint(0 errors) andtsc --noEmit.bun run build, then a cleannpm install -gof the packed tarball in anode:22container: ESMfrom 'failproofai', CommonJSrequire('failproofai'), transitive imports (examples/policies-advanced), builtin policies with no custom file, a CommonJS entry with a.cjshelper and an ES module importing one (both deny under Node withFAILPROOFAI_DIST_PATHunset), and fail-open on a missing policy file.bun run test:e2e, and all 29 CI checks on the final head.🤖 Generated with Claude Code