From f3c1d2297a13a089d6021ae420b4bb1a8db79df3 Mon Sep 17 00:00:00 2001 From: Faris Mahmutovic Date: Thu, 22 Feb 2024 01:55:52 +0100 Subject: [PATCH 1/3] fix(sentry): add polyfills and use xhr for es5 --- lib/src/polyfills.ts | 3 +++ lib/src/sentry.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/polyfills.ts b/lib/src/polyfills.ts index b46d37b..3a0a995 100644 --- a/lib/src/polyfills.ts +++ b/lib/src/polyfills.ts @@ -2,3 +2,6 @@ import 'core-js/es/array/find'; import 'core-js/es/object/assign'; import 'core-js/es/object/entries'; import 'core-js/es/object/get-own-property-descriptors'; +import 'core-js/es/map'; +import 'core-js/es/set'; +import 'core-js/es/symbol'; diff --git a/lib/src/sentry.ts b/lib/src/sentry.ts index 42c353c..255b4bd 100644 --- a/lib/src/sentry.ts +++ b/lib/src/sentry.ts @@ -24,7 +24,7 @@ export function initSentry( const client = new Sentry.BrowserClient({ dsn: SENTRY_DSN, - transport: Sentry.makeFetchTransport, + transport: window.fetch ? Sentry.makeFetchTransport : Sentry.makeXHRTransport, stackParser: Sentry.defaultStackParser, integrations: [ new Sentry.Breadcrumbs(), From bd70315927011625b823c2fb91882025853c6d9c Mon Sep 17 00:00:00 2001 From: Faris Mahmutovic Date: Thu, 22 Feb 2024 16:10:09 +0100 Subject: [PATCH 2/3] fix: add polyfill --- lib/src/polyfills.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/polyfills.ts b/lib/src/polyfills.ts index 3a0a995..4de6837 100644 --- a/lib/src/polyfills.ts +++ b/lib/src/polyfills.ts @@ -1,4 +1,5 @@ import 'core-js/es/array/find'; +import 'core-js/es/array/includes'; import 'core-js/es/object/assign'; import 'core-js/es/object/entries'; import 'core-js/es/object/get-own-property-descriptors'; From 00ff2bd490d06d34ed6dd8d796fc477aadbb4253 Mon Sep 17 00:00:00 2001 From: Faris Mahmutovic Date: Thu, 22 Feb 2024 16:55:56 +0100 Subject: [PATCH 3/3] version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 89b6320..7419860 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@hcaptcha/loader", "description": "This is a JavaScript library to easily configure the loading of the hCaptcha JS client SDK with built-in error handling.", - "version": "1.2.2", + "version": "1.2.3", "author": "hCaptcha team and contributors", "license": "MIT", "keywords": [