posthog-node 4.4.0 → 4.4.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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Next
2
2
 
3
+ # 4.4.1 - 2025-01-21
4
+
5
+ - Add option privacyMode to remove input and output from LLM Observability
6
+
3
7
  # 4.4.0 - 2025-01-15
4
8
 
5
9
  Switch from rusha to native (node:crypto) sha1 implementation
package/lib/index.cjs.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var node_crypto = require('node:crypto');
6
6
 
7
- var version = "4.4.0";
7
+ var version = "4.4.1";
8
8
 
9
9
  var PostHogPersistedProperty;
10
10
  (function (PostHogPersistedProperty) {
@@ -69,6 +69,9 @@ function safeSetTimeout(fn, timeout) {
69
69
  // We unref if available to prevent Node.js hanging on exit
70
70
  t?.unref && t?.unref();
71
71
  return t;
72
+ }
73
+ function getFetch() {
74
+ return typeof fetch !== 'undefined' ? fetch : typeof global.fetch !== 'undefined' ? global.fetch : undefined;
72
75
  }
73
76
 
74
77
  // Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>
@@ -1431,10 +1434,7 @@ class PostHogMemoryStorage {
1431
1434
  * This is currently solved by using the global fetch if available instead.
1432
1435
  * See https://github.com/PostHog/posthog-js-lite/issues/127 for more info
1433
1436
  */
1434
- let _fetch =
1435
- // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
1436
- // @ts-ignore
1437
- typeof fetch !== 'undefined' ? fetch : typeof global.fetch !== 'undefined' ? global.fetch : undefined;
1437
+ let _fetch = getFetch();
1438
1438
  if (!_fetch) {
1439
1439
  // eslint-disable-next-line @typescript-eslint/no-var-requires
1440
1440
  const axios = require('axios');