@jsenv/plugin-supervisor 1.5.16 → 1.5.19

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.
@@ -14,7 +14,7 @@ window.__supervisor__ = (() => {
14
14
  let documentTimingsOrigin;
15
15
  try {
16
16
  documentTimingsOrigin = window.performance.timing.navigationStart;
17
- } catch (e) {
17
+ } catch (_unused) {
18
18
  documentTimingsOrigin = Date.now();
19
19
  }
20
20
  const documentTimings = {
@@ -481,6 +481,7 @@ window.__supervisor__ = (() => {
481
481
  column
482
482
  } = {}) => {
483
483
  const exception = {
484
+ runtime: "browser",
484
485
  reason,
485
486
  isException: true,
486
487
  isError: false,
@@ -821,7 +822,7 @@ window.__supervisor__ = (() => {
821
822
  let urlObject;
822
823
  try {
823
824
  urlObject = new URL(url, window.origin);
824
- } catch (e) {
825
+ } catch (_unused2) {
825
826
  return url;
826
827
  }
827
828
  if (urlObject.origin === window.origin) {
@@ -1035,7 +1036,7 @@ window.__supervisor__ = (() => {
1035
1036
  renderException();
1036
1037
  return;
1037
1038
  }
1038
- } catch (e) {
1039
+ } catch (_unused3) {
1039
1040
  // happens if server is closed for instance
1040
1041
  return;
1041
1042
  }
@@ -1190,9 +1190,7 @@ const jsenvPluginSupervisor = ({
1190
1190
  errorBaseUrl
1191
1191
  }) => {
1192
1192
  const resolveUrlSite = urlWithLineAndColumn => {
1193
- const inlineUrlMatch = urlWithLineAndColumn.match(
1194
- // eslint-disable-next-line regexp/no-unused-capturing-group
1195
- /@L([0-9]+)C([0-9]+)-L([0-9]+)C([0-9]+)\.\w+(:([0-9]+):([0-9]+))?$/);
1193
+ const inlineUrlMatch = urlWithLineAndColumn.match(/@L([0-9]+)C([0-9]+)-L([0-9]+)C([0-9]+)\.\w+(:([0-9]+):([0-9]+))?$/);
1196
1194
  if (inlineUrlMatch) {
1197
1195
  const htmlUrl = urlWithLineAndColumn.slice(0, inlineUrlMatch.index);
1198
1196
  const tagLineStart = parseInt(inlineUrlMatch[1]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/plugin-supervisor",
3
- "version": "1.5.16",
3
+ "version": "1.5.19",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,10 +26,10 @@
26
26
  "/dist/"
27
27
  ],
28
28
  "dependencies": {
29
- "@jsenv/ast": "6.2.15",
29
+ "@jsenv/ast": "6.2.17",
30
30
  "@jsenv/urls": "2.5.2",
31
31
  "@jsenv/sourcemap": "1.2.23",
32
- "launch-editor": "2.8.0"
32
+ "launch-editor": "2.8.1"
33
33
  },
34
34
  "scripts": {
35
35
  "eslint": "npx eslint . --ext=.js,.mjs,.cjs,.html",
@@ -16,7 +16,7 @@ window.__supervisor__ = (() => {
16
16
  let documentTimingsOrigin;
17
17
  try {
18
18
  documentTimingsOrigin = window.performance.timing.navigationStart;
19
- } catch (e) {
19
+ } catch {
20
20
  documentTimingsOrigin = Date.now();
21
21
  }
22
22
  const documentTimings = {
@@ -439,6 +439,7 @@ window.__supervisor__ = (() => {
439
439
  { message, reportedBy, url, line, column } = {},
440
440
  ) => {
441
441
  const exception = {
442
+ runtime: "browser",
442
443
  reason,
443
444
  isException: true,
444
445
  isError: false, // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/throw
@@ -795,7 +796,7 @@ window.__supervisor__ = (() => {
795
796
  let urlObject;
796
797
  try {
797
798
  urlObject = new URL(url, window.origin);
798
- } catch (e) {
799
+ } catch {
799
800
  return url;
800
801
  }
801
802
  if (urlObject.origin === window.origin) {
@@ -1066,7 +1067,7 @@ window.__supervisor__ = (() => {
1066
1067
  renderException();
1067
1068
  return;
1068
1069
  }
1069
- } catch (e) {
1070
+ } catch {
1070
1071
  // happens if server is closed for instance
1071
1072
  return;
1072
1073
  }
@@ -7,7 +7,6 @@ import { generateContentFrame } from "@jsenv/humanize";
7
7
  import { getOriginalPosition } from "@jsenv/sourcemap";
8
8
  import { createRequire } from "node:module";
9
9
  import { fileURLToPath } from "node:url";
10
-
11
10
  import {
12
11
  injectSupervisorIntoHTML,
13
12
  supervisorFileUrl,
@@ -22,7 +21,6 @@ export const jsenvPluginSupervisor = ({
22
21
  }) => {
23
22
  const resolveUrlSite = (urlWithLineAndColumn) => {
24
23
  const inlineUrlMatch = urlWithLineAndColumn.match(
25
- // eslint-disable-next-line regexp/no-unused-capturing-group
26
24
  /@L([0-9]+)C([0-9]+)-L([0-9]+)C([0-9]+)\.\w+(:([0-9]+):([0-9]+))?$/,
27
25
  );
28
26
  if (inlineUrlMatch) {