@posthog/nextjs-config 1.3.7 → 1.3.9

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/dist/utils.js CHANGED
@@ -77,7 +77,11 @@ async function callPosthogCli(args, env, verbose) {
77
77
  });
78
78
  }
79
79
  function isTurbopackEnabled() {
80
- return '1' === process.env.TURBOPACK;
80
+ return '1' === process.env.TURBOPACK || isTurbopackDefault() && '1' !== process.env.WEBPACK;
81
+ }
82
+ function isTurbopackDefault() {
83
+ const nextJsVersion = getNextJsVersion();
84
+ return external_semver_default().gte(nextJsVersion, '16.0.0');
81
85
  }
82
86
  exports.getNextJsVersion = __webpack_exports__.getNextJsVersion;
83
87
  exports.hasCompilerHook = __webpack_exports__.hasCompilerHook;
package/dist/utils.mjs CHANGED
@@ -40,6 +40,10 @@ async function callPosthogCli(args, env, verbose) {
40
40
  });
41
41
  }
42
42
  function isTurbopackEnabled() {
43
- return '1' === process.env.TURBOPACK;
43
+ return '1' === process.env.TURBOPACK || isTurbopackDefault() && '1' !== process.env.WEBPACK;
44
+ }
45
+ function isTurbopackDefault() {
46
+ const nextJsVersion = getNextJsVersion();
47
+ return semver.gte(nextJsVersion, '16.0.0');
44
48
  }
45
49
  export { getNextJsVersion, hasCompilerHook, isTurbopackEnabled, processSourceMaps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posthog/nextjs-config",
3
- "version": "1.3.7",
3
+ "version": "1.3.9",
4
4
  "description": "NextJS configuration helper for Posthog 🦔",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,7 +34,7 @@
34
34
  "dependencies": {
35
35
  "@posthog/cli": "^0.5.2",
36
36
  "semver": "^7.7.2",
37
- "@posthog/core": "1.4.0"
37
+ "@posthog/core": "1.5.0"
38
38
  },
39
39
  "keywords": [
40
40
  "posthog",