@shopgate/tracking-core 7.32.2-alpha.1 → 7.32.2-alpha.10

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/core/Core.js CHANGED
@@ -1,5 +1,5 @@
1
- import "core-js/modules/es.array.includes.js";
2
1
  import { logger } from '@shopgate/pwa-core/helpers';
2
+ import { toError } from '@shopgate/pwa-core/helpers/error';
3
3
  import errorManager from '@shopgate/pwa-core/classes/ErrorManager';
4
4
  import { SOURCE_TRACKING, CODE_TRACKING } from '@shopgate/pwa-core/constants/ErrorManager';
5
5
  import { optOut as _optOut, isOptOut } from "../helpers/optOut";
@@ -300,11 +300,13 @@ let Core = /*#__PURE__*/function () {
300
300
  }
301
301
  try {
302
302
  entry.callback.apply(this, params);
303
- } catch (err) {
303
+ } catch (thrown) {
304
+ const err = toError(thrown, {
305
+ code: CODE_TRACKING,
306
+ source: SOURCE_TRACKING,
307
+ context: entry.trackerName
308
+ });
304
309
  logger.error(`'SgTrackingCore': Error in plugin [${entry.trackerName}]`, err);
305
- err.code = CODE_TRACKING;
306
- err.source = SOURCE_TRACKING;
307
- err.context = entry.trackerName;
308
310
  errorManager.queue(err);
309
311
  }
310
312
  });
@@ -1,4 +1,3 @@
1
- import "core-js/modules/es.string.replace.js";
2
1
  import { hex2bin, SGLink } from "./helper";
3
2
  import sgTrackingUrlMapper from "./urlMapping";
4
3
  import { customEvents } from "./events";
package/helpers/helper.js CHANGED
@@ -1,4 +1,3 @@
1
- import "core-js/modules/es.string.replace.js";
2
1
  import DataRequest from '@shopgate/pwa-core/classes/DataRequest';
3
2
  import { logger } from '@shopgate/pwa-core/helpers';
4
3
  import * as _SGAction from '@shopgate/pwa-core/commands/unifiedTracking';
@@ -1,4 +1,3 @@
1
- import "core-js/modules/es.string.replace.js";
2
1
  /**
3
2
  * Data modifier for urls
4
3
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopgate/tracking-core",
3
- "version": "7.32.2-alpha.1",
3
+ "version": "7.32.2-alpha.10",
4
4
  "description": "Tracking core library for the Shopgate Connect PWA.",
5
5
  "author": "Shopgate <support@shopgate.com>",
6
6
  "license": "Apache-2.0",
@@ -20,9 +20,9 @@
20
20
  "connect"
21
21
  ],
22
22
  "devDependencies": {
23
- "@shopgate/eslint-config": "7.32.2-alpha.1",
24
- "@shopgate/pwa-core": "7.32.2-alpha.1",
25
- "@types/lodash": "^4.17.24",
26
- "lodash": "^4.17.23"
23
+ "@shopgate/eslint-config": "7.32.2-alpha.10",
24
+ "@shopgate/pwa-core": "7.32.2-alpha.10",
25
+ "@types/lodash": "^4.17.25",
26
+ "lodash": "^4.18.1"
27
27
  }
28
28
  }
@@ -1,4 +1,3 @@
1
- import "core-js/modules/es.string.replace.js";
2
1
  /* global ga */
3
2
 
4
3
  // SgData access type constant for apps