@jsenv/plugin-supervisor 1.5.24 → 1.5.26

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.
@@ -566,6 +566,17 @@ window.__supervisor__ = (() => {
566
566
  stackFrames = [];
567
567
  for (const callSite of callSites) {
568
568
  const url = callSite.getFileName() || callSite.getScriptNameOrSourceURL();
569
+ if (!url) {
570
+ // thinks like Array.forEach can generate this
571
+ const stackFrame = {
572
+ raw: " at ".concat(String(callSite)),
573
+ url: null,
574
+ line: null,
575
+ column: null
576
+ };
577
+ stackFrames.push(stackFrame);
578
+ continue;
579
+ }
569
580
  const line = callSite.getLineNumber();
570
581
  const column = callSite.getColumnNumber();
571
582
  const site = resolveUrlSite({
@@ -1260,6 +1260,9 @@ const jsenvPluginSupervisor = ({
1260
1260
  }
1261
1261
  };
1262
1262
  }
1263
+ if (!urlInfo.originalContent) {
1264
+ await urlInfo.fetchContent();
1265
+ }
1263
1266
  const remap = searchParams.has("remap");
1264
1267
  if (remap) {
1265
1268
  const sourcemap = urlInfo.sourcemap;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/plugin-supervisor",
3
- "version": "1.5.24",
3
+ "version": "1.5.26",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "/dist/"
27
27
  ],
28
28
  "dependencies": {
29
- "@jsenv/ast": "6.3.4",
29
+ "@jsenv/ast": "6.3.5",
30
30
  "@jsenv/urls": "2.5.2",
31
31
  "@jsenv/sourcemap": "1.2.25",
32
32
  "launch-editor": "2.9.1"
@@ -528,6 +528,17 @@ window.__supervisor__ = (() => {
528
528
  for (const callSite of callSites) {
529
529
  const url =
530
530
  callSite.getFileName() || callSite.getScriptNameOrSourceURL();
531
+ if (!url) {
532
+ // thinks like Array.forEach can generate this
533
+ const stackFrame = {
534
+ raw: ` at ${String(callSite)}`,
535
+ url: null,
536
+ line: null,
537
+ column: null,
538
+ };
539
+ stackFrames.push(stackFrame);
540
+ continue;
541
+ }
531
542
  const line = callSite.getLineNumber();
532
543
  const column = callSite.getColumnNumber();
533
544
  const site = resolveUrlSite({ url, line, column });
@@ -88,6 +88,9 @@ export const jsenvPluginSupervisor = ({
88
88
  },
89
89
  };
90
90
  }
91
+ if (!urlInfo.originalContent) {
92
+ await urlInfo.fetchContent();
93
+ }
91
94
  const remap = searchParams.has("remap");
92
95
  if (remap) {
93
96
  const sourcemap = urlInfo.sourcemap;