@posthog/core 1.62.0 → 1.62.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.
@@ -1 +1 @@
1
- {"version":3,"file":"bot-detection.d.ts","sourceRoot":"","sources":["../../src/utils/bot-detection.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,UAmGnC,CAAA;AAeD,0DAA0D;AAC1D,wBAAgB,gCAAgC,IAAI,IAAI,CAEvD;AAaD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,OAAiB,MAAM,GAAG,SAAS,4BAA2B,MAAM,EAAE,KAAQ,OAsBrG,CAAA"}
1
+ {"version":3,"file":"bot-detection.d.ts","sourceRoot":"","sources":["../../src/utils/bot-detection.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,UAoGnC,CAAA;AAeD,0DAA0D;AAC1D,wBAAgB,gCAAgC,IAAI,IAAI,CAEvD;AAaD;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,OAAiB,MAAM,GAAG,SAAS,4BAA2B,MAAM,EAAE,KAAQ,OAsBrG,CAAA"}
@@ -88,6 +88,7 @@ const DEFAULT_BLOCKED_UA_STRS = [
88
88
  'sentryuptimebot',
89
89
  'uptimerobot',
90
90
  'headlesschrome',
91
+ 'lightpanda',
91
92
  'cypress',
92
93
  'google-hoteladsverifier',
93
94
  'adsbot-google',
@@ -59,6 +59,7 @@ const DEFAULT_BLOCKED_UA_STRS = [
59
59
  'sentryuptimebot',
60
60
  'uptimerobot',
61
61
  'headlesschrome',
62
+ 'lightpanda',
62
63
  'cypress',
63
64
  'google-hoteladsverifier',
64
65
  'adsbot-google',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posthog/core",
3
- "version": "1.62.0",
3
+ "version": "1.62.1",
4
4
  "bugs": {
5
5
  "url": "https://github.com/PostHog/posthog-js/issues"
6
6
  },
@@ -72,7 +72,7 @@
72
72
  }
73
73
  },
74
74
  "dependencies": {
75
- "@posthog/types": "^1.418.0"
75
+ "@posthog/types": "^1.419.0"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@rslib/core": "0.23.2",
@@ -43,6 +43,13 @@ describe('isBlockedUA', () => {
43
43
  expect(isBlockedUA('headlessChrome/119.0')).toBe(true)
44
44
  })
45
45
 
46
+ it.each(['Lightpanda/1.0', 'lightpanda/2.3.4', 'LIGHTPANDA/10.0', 'Mozilla/5.0 (compatible; Lightpanda/1.0)'])(
47
+ 'blocks the self-declared headless browser %s',
48
+ (ua) => {
49
+ expect(isBlockedUA(ua)).toBe(true)
50
+ }
51
+ )
52
+
46
53
  it('is case-insensitive on the UA input', () => {
47
54
  const bot = 'Mozilla/5.0 (compatible; Googlebot/2.1)'
48
55
  expect(isBlockedUA(bot)).toBe(true)
@@ -78,6 +78,7 @@ export const DEFAULT_BLOCKED_UA_STRS = [
78
78
 
79
79
  // headless browsers
80
80
  'headlesschrome',
81
+ 'lightpanda',
81
82
  'cypress',
82
83
  // we don't block electron here, as many customers use posthog-js in electron apps
83
84