diff --git a/package.json b/package.json index b36dbe7..abff667 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,9 @@ "lint": "oxlint --deny-warnings", "lint:fix": "oxlint --fix" }, + "dependencies": { + "posthog-js": "^1.376.4" + }, "devDependencies": { "@testing-library/dom": "^10.4.1", "@testing-library/react": "^16.3.2", @@ -58,7 +61,6 @@ "happy-dom": "^20.9.0", "oxfmt": "^0.52.0", "oxlint": "^1.67.0", - "posthog-js": "^1.376.4", "react": "^18.3.1", "react-dom": "^18.3.1", "tsx": "^4.22.3", @@ -66,13 +68,9 @@ "vitest": "^4.1.7" }, "peerDependencies": { - "posthog-js": ">=1.376.4", "react": ">=18" }, "peerDependenciesMeta": { - "posthog-js": { - "optional": true - }, "react": { "optional": true } diff --git a/src/web.ts b/src/web.ts index e39faac..7d66a65 100644 --- a/src/web.ts +++ b/src/web.ts @@ -33,8 +33,7 @@ export interface WebClientConfig extends ClientConfig { distinctId?: string; /** * Opt-in PostHog browser-side session recording. When omitted, posthog-js is not - * loaded — consumers that don't enable recording pay zero bundle cost. Consumers - * that do enable it must install `posthog-js` (declared as an optional peer dep). + * loaded — consumers that don't enable recording pay zero bundle cost. */ sessionRecording?: SessionRecordingConfig; /** Number of retry attempts for transient HTTP errors. Defaults to 3. */ diff --git a/yarn.lock b/yarn.lock index 5801ee3..4890d4e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1224,11 +1224,8 @@ __metadata: typescript: "npm:^6.0.3" vitest: "npm:^4.1.7" peerDependencies: - posthog-js: ">=1.376.4" react: ">=18" peerDependenciesMeta: - posthog-js: - optional: true react: optional: true languageName: unknown