@baukit/analytics-posthog-web 0.18.3 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baukit/analytics-posthog-web",
3
- "version": "0.18.3",
3
+ "version": "0.19.1",
4
4
  "description": "PostHog browser transport for @baukit/analytics-core.",
5
5
  "license": "MIT",
6
6
  "author": "Patrick Koss",
@@ -38,7 +38,7 @@
38
38
  "build": "tsc -p tsconfig.json",
39
39
  "prepare": "pnpm --dir ../analytics-core run build && pnpm run build",
40
40
  "test": "tsc -p tsconfig.test.json && vitest run --config ../../vitest.config.ts && node ../../scripts/test-packed-exports.mjs",
41
- "lint": "eslint src --max-warnings=0",
41
+ "lint": "eslint . --max-warnings=0",
42
42
  "format:check": "prettier --check src package.json tsconfig.json tsconfig.test.json"
43
43
  },
44
44
  "devDependencies": {
@@ -47,7 +47,7 @@
47
47
  "typescript": "6.0.3"
48
48
  },
49
49
  "peerDependencies": {
50
- "@baukit/analytics-core": "^0.18.3",
50
+ "@baukit/analytics-core": "^0.19.1",
51
51
  "posthog-js": ">=1.43.1 <2"
52
52
  }
53
53
  }
package/src/index.test.ts CHANGED
@@ -275,14 +275,15 @@ describe('web adapter composed with analytics core', () => {
275
275
  expect(posthog.capture).not.toHaveBeenCalled();
276
276
 
277
277
  analytics.setConsent('granted');
278
- analytics.capture({
278
+ const unlisted: ProductEvent & { properties: { unlisted: string } } = {
279
279
  name: 'onboarding_started',
280
280
  properties: {
281
281
  source: 'organic',
282
282
  contact: 'person@example.com',
283
283
  unlisted: 'must not arrive',
284
284
  },
285
- } as ProductEvent);
285
+ };
286
+ analytics.capture(unlisted);
286
287
  await analytics.flush();
287
288
 
288
289
  expect(posthog.capture).toHaveBeenCalledOnce();