posthog-node 4.11.6 → 4.11.7

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,3 +1,7 @@
1
+ # 4.11.7 - 2025-04-16
2
+
3
+ 1. fix: do not reference `node:` prefix as it is not supported by Next.js edge runtime
4
+
1
5
  # 4.11.6 - 2025-04-15
2
6
 
3
7
  ## Fixed
package/lib/index.cjs.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var node_path = require('node:path');
5
+ var path = require('path');
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -22,7 +22,7 @@ function _interopNamespace(e) {
22
22
  return Object.freeze(n);
23
23
  }
24
24
 
25
- var version = "4.11.6";
25
+ var version = "4.11.7";
26
26
 
27
27
  var PostHogPersistedProperty;
28
28
  (function (PostHogPersistedProperty) {
@@ -2602,7 +2602,7 @@ class ReduceableCache {
2602
2602
  // Portions of this file are derived from getsentry/sentry-javascript by Software, Inc. dba Sentry
2603
2603
  const nodeFs = new Lazy(async () => {
2604
2604
  try {
2605
- return await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('node:fs')); });
2605
+ return await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('fs')); });
2606
2606
  } catch {
2607
2607
  return undefined;
2608
2608
  }
@@ -2612,7 +2612,7 @@ async function getNodeFs() {
2612
2612
  }
2613
2613
  const nodeReadline = new Lazy(async () => {
2614
2614
  try {
2615
- return await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('node:readline')); });
2615
+ return await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require('readline')); });
2616
2616
  } catch {
2617
2617
  return undefined;
2618
2618
  }
@@ -3260,7 +3260,7 @@ function nodeStackLineParser(getModule) {
3260
3260
  }
3261
3261
  const defaultStackParser = createStackParser(nodeStackLineParser(createGetModuleFromFilename()));
3262
3262
  /** Creates a function that gets the module name from a filename */
3263
- function createGetModuleFromFilename(basePath = process.argv[1] ? node_path.dirname(process.argv[1]) : process.cwd(), isWindows = node_path.sep === '\\') {
3263
+ function createGetModuleFromFilename(basePath = process.argv[1] ? path.dirname(process.argv[1]) : process.cwd(), isWindows = path.sep === '\\') {
3264
3264
  const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
3265
3265
  return filename => {
3266
3266
  if (!filename) {
@@ -3272,7 +3272,7 @@ function createGetModuleFromFilename(basePath = process.argv[1] ? node_path.dirn
3272
3272
  dir,
3273
3273
  base: file,
3274
3274
  ext
3275
- } = node_path.posix.parse(normalizedFilename);
3275
+ } = path.posix.parse(normalizedFilename);
3276
3276
  if (ext === '.js' || ext === '.mjs' || ext === '.cjs') {
3277
3277
  file = file.slice(0, ext.length * -1);
3278
3278
  }