posthog-js 1.372.4 → 1.372.5
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/all-external-dependencies.js +1 -1
- package/dist/all-external-dependencies.js.map +1 -1
- package/dist/array.full.es5.js +1 -1
- package/dist/array.full.es5.js.map +1 -1
- package/dist/array.full.js +1 -1
- package/dist/array.full.js.map +1 -1
- package/dist/array.full.no-external.js +1 -1
- package/dist/array.full.no-external.js.map +1 -1
- package/dist/array.js +1 -1
- package/dist/array.no-external.js +1 -1
- package/dist/customizations.full.js +1 -1
- package/dist/default-extensions.js +1 -1
- package/dist/exception-autocapture.js +1 -1
- package/dist/exception-autocapture.js.map +1 -1
- package/dist/extension-bundles.js +1 -1
- package/dist/lazy-recorder.js +1 -1
- package/dist/main.js +1 -1
- package/dist/module.full.js +1 -1
- package/dist/module.full.js.map +1 -1
- package/dist/module.full.no-external.js +1 -1
- package/dist/module.full.no-external.js.map +1 -1
- package/dist/module.js +1 -1
- package/dist/module.no-external.js +1 -1
- package/dist/module.slim.js +1 -1
- package/dist/module.slim.no-external.js +1 -1
- package/dist/posthog-recorder.js +1 -1
- package/lib/package.json +1 -1
- package/lib/src/entrypoints/exception-autocapture.js +1 -1
- package/lib/src/entrypoints/exception-autocapture.js.map +1 -1
- package/package.json +3 -3
package/lib/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "posthog-js",
|
|
3
|
-
"version": "1.372.
|
|
3
|
+
"version": "1.372.5",
|
|
4
4
|
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.",
|
|
5
5
|
"repository": "https://github.com/PostHog/posthog-js",
|
|
6
6
|
"author": "engineering@posthog.com",
|
|
@@ -69,7 +69,7 @@ var wrapUnhandledRejection = function (captureFn) {
|
|
|
69
69
|
mechanism: { handled: false },
|
|
70
70
|
});
|
|
71
71
|
captureFn(errorProperties);
|
|
72
|
-
return (_a = originalOnUnhandledRejection === null || originalOnUnhandledRejection === void 0 ? void 0 : originalOnUnhandledRejection
|
|
72
|
+
return (_a = originalOnUnhandledRejection === null || originalOnUnhandledRejection === void 0 ? void 0 : originalOnUnhandledRejection(ev)) !== null && _a !== void 0 ? _a : false;
|
|
73
73
|
};
|
|
74
74
|
win.onunhandledrejection.__POSTHOG_INSTRUMENTED__ = true;
|
|
75
75
|
return function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exception-autocapture.js","sourceRoot":"","sources":["../../../src/entrypoints/exception-autocapture.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA2D;AAE3D,0CAA8C;AAE9C,4DAAmE;AAEnE,IAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,wBAAwB,CAAC,CAAA;AACrD,IAAM,sBAAsB,GAAG,IAAA,gDAA2B,GAAE,CAAA;AAE5D,IAAM,WAAW,GAAG,UAAC,SAAyD;IAC1E,IAAM,GAAG,GAAG,gBAAa,CAAA;IACzB,IAAI,CAAC,GAAG,EAAE,CAAC;QACP,MAAM,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAA;IAC5D,CAAC;IACD,IAAM,eAAe,GAAG,GAAG,CAAC,OAAO,CAAA;IAEnC,GAAG,CAAC,OAAO,GAAG;;QAAU,cAAuB;aAAvB,UAAuB,EAAvB,qBAAuB,EAAvB,IAAuB;YAAvB,yBAAuB;;QAC3C,IAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;QACrB,IAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;QACrB,IAAM,eAAe,GAAG,sBAAsB,CAAC,gBAAgB,CAAC,KAAK,IAAI,KAAK,EAAE;YAC5E,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;SAChC,CAAC,CAAA;QACF,SAAS,CAAC,eAAe,CAAC,CAAA;QAC1B,OAAO,MAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,wCAAM,I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M,IAAI,UAAC,CAAA;IAC1C,CAAC,CAAA;IACD,GAAG,CAAC,KAAK,CAAC,wBAAwB,GAAG,IAAI,CAAA;IAEzC,OAAO;;QACI,MAAA,GAAG,CAAC,KAAK,+CAAE,wBAAwB,CAAA;QAC1C,GAAG,CAAC,KAAK,GAAG,oBAAoB,CAAA;IACpC,CAAC,CAAA;AACL,CAAC,CAAA;AAED,IAAM,6BAA6B,GAAG;IAClC,WAAW,aAAA;IACX,sBAAsB,wBAAA;IACtB,gBAAgB,kBAAA;CACnB,CAAA;AAED,0BAAgB,CAAC,qBAAqB,GAAG,0BAAgB,CAAC,qBAAqB,IAAI,EAAE,CAAA;AACrF,0BAAgB,CAAC,qBAAqB,CAAC,sBAAsB,GAAG,6BAA6B,CAAA;AAE7F,+EAA+E;AAC/E,kGAAkG;AAClG,QAAQ;AACR,6CAA6C;AAC7C,2EAA2E;AAC3E,0BAAgB,CAAC,6BAA6B,GAAG,6BAA6B,CAAA;AAE9E,kBAAe,6BAA6B,CAAA","sourcesContent":["import { assignableWindow, window } from '../utils/globals'\nimport { ErrorEventArgs } from '../types'\nimport { createLogger } from '../utils/logger'\nimport type { ErrorTracking } from '@posthog/core'\nimport { buildErrorPropertiesBuilder } from '../posthog-exceptions'\n\nconst logger = createLogger('[ExceptionAutocapture]')\nconst errorPropertiesBuilder = buildErrorPropertiesBuilder()\n\nconst wrapOnError = (captureFn: (props: ErrorTracking.ErrorProperties) => void) => {\n const win = window as any\n if (!win) {\n logger.info('window not available, cannot wrap onerror')\n }\n const originalOnError = win.onerror\n\n win.onerror = function (...args: ErrorEventArgs): boolean {\n const error = args[4]\n const event = args[0]\n const errorProperties = errorPropertiesBuilder.buildFromUnknown(error || event, {\n mechanism: { handled: false },\n })\n captureFn(errorProperties)\n return originalOnError?.(...args) ?? false\n }\n win.onerror.__POSTHOG_INSTRUMENTED__ = true\n\n return () => {\n delete win.onerror?.__POSTHOG_INSTRUMENTED__\n win.onerror = originalOnError\n }\n}\n\nconst wrapUnhandledRejection = (captureFn: (props: ErrorTracking.ErrorProperties) => void) => {\n const win = window as any\n if (!win) {\n logger.info('window not available, cannot wrap onUnhandledRejection')\n }\n\n const originalOnUnhandledRejection = win.onunhandledrejection\n\n win.onunhandledrejection = function (ev: PromiseRejectionEvent): boolean {\n const errorProperties = errorPropertiesBuilder.buildFromUnknown(ev, {\n mechanism: { handled: false },\n })\n captureFn(errorProperties)\n return originalOnUnhandledRejection?.(ev) ?? false\n }\n win.onunhandledrejection.__POSTHOG_INSTRUMENTED__ = true\n\n return () => {\n delete win.onunhandledrejection?.__POSTHOG_INSTRUMENTED__\n win.onunhandledrejection = originalOnUnhandledRejection\n }\n}\n\nconst wrapConsoleError = (captureFn: (props: ErrorTracking.ErrorProperties) => void) => {\n const con = console as any\n if (!con) {\n logger.info('console not available, cannot wrap console.error')\n }\n\n const originalConsoleError = con.error\n\n con.error = function (...args: any[]): void {\n let event\n if (args.length == 1) {\n event = args[0]\n } else {\n event = args.join(' ')\n }\n const error = args.find((arg) => arg instanceof Error)\n const errorProperties = errorPropertiesBuilder.buildFromUnknown(error || event, {\n mechanism: { handled: false },\n syntheticException: new Error('PostHog syntheticException'),\n skipFirstLines: 2,\n })\n captureFn(errorProperties)\n return originalConsoleError?.(...args)\n }\n con.error.__POSTHOG_INSTRUMENTED__ = true\n\n return () => {\n delete con.error?.__POSTHOG_INSTRUMENTED__\n con.error = originalConsoleError\n }\n}\n\nconst posthogErrorWrappingFunctions = {\n wrapOnError,\n wrapUnhandledRejection,\n wrapConsoleError,\n}\n\nassignableWindow.__PosthogExtensions__ = assignableWindow.__PosthogExtensions__ || {}\nassignableWindow.__PosthogExtensions__.errorWrappingFunctions = posthogErrorWrappingFunctions\n\n// we used to put these on window, and now we put them on __PosthogExtensions__\n// but that means that old clients which lazily load this extension are looking in the wrong place\n// yuck,\n// so we also put them directly on the window\n// when 1.161.1 is the oldest version seen in production we can remove this\nassignableWindow.posthogErrorWrappingFunctions = posthogErrorWrappingFunctions\n\nexport default posthogErrorWrappingFunctions\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "posthog-js",
|
|
3
|
-
"version": "1.372.
|
|
3
|
+
"version": "1.372.5",
|
|
4
4
|
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.",
|
|
5
5
|
"repository": "https://github.com/PostHog/posthog-js",
|
|
6
6
|
"author": "engineering@posthog.com",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"preact": "^10.28.2",
|
|
30
30
|
"query-selector-shadow-dom": "^1.0.1",
|
|
31
31
|
"web-vitals": "^5.1.0",
|
|
32
|
-
"@posthog/core": "1.27.
|
|
33
|
-
"@posthog/types": "1.372.
|
|
32
|
+
"@posthog/core": "1.27.9",
|
|
33
|
+
"@posthog/types": "1.372.5"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@babel/core": "^7.27.1",
|