diff --git a/package.json b/package.json index 75c4d345f7..7ce46f0c55 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@jsenv/core", - "version": "39.5.20", + "version": "39.5.21", "description": "Tool to develop, test and build js projects", "license": "MIT", "author": { @@ -78,7 +78,7 @@ "@jsenv/node-esm-resolution": "1.0.6", "@jsenv/plugin-bundling": "2.7.16", "@jsenv/plugin-minification": "1.5.10", - "@jsenv/plugin-supervisor": "1.5.25", + "@jsenv/plugin-supervisor": "1.5.26", "@jsenv/plugin-transpilation": "1.4.84", "@jsenv/runtime-compat": "1.3.1", "@jsenv/server": "15.3.2", diff --git a/packages/internal/plugin-supervisor/dist/js/supervisor.js b/packages/internal/plugin-supervisor/dist/js/supervisor.js index b38313464f..e70d890b4c 100644 --- a/packages/internal/plugin-supervisor/dist/js/supervisor.js +++ b/packages/internal/plugin-supervisor/dist/js/supervisor.js @@ -566,6 +566,17 @@ window.__supervisor__ = (() => { stackFrames = []; for (const callSite of callSites) { const url = callSite.getFileName() || callSite.getScriptNameOrSourceURL(); + if (!url) { + // thinks like Array.forEach can generate this + const stackFrame = { + raw: " at ".concat(String(callSite)), + url: null, + line: null, + column: null + }; + stackFrames.push(stackFrame); + continue; + } const line = callSite.getLineNumber(); const column = callSite.getColumnNumber(); const site = resolveUrlSite({ diff --git a/packages/internal/plugin-supervisor/dist/jsenv_plugin_supervisor.js b/packages/internal/plugin-supervisor/dist/jsenv_plugin_supervisor.js index 015beebec4..a3b7cc3320 100644 --- a/packages/internal/plugin-supervisor/dist/jsenv_plugin_supervisor.js +++ b/packages/internal/plugin-supervisor/dist/jsenv_plugin_supervisor.js @@ -1260,6 +1260,9 @@ const jsenvPluginSupervisor = ({ } }; } + if (!urlInfo.originalContent) { + await urlInfo.fetchContent(); + } const remap = searchParams.has("remap"); if (remap) { const sourcemap = urlInfo.sourcemap; diff --git a/packages/internal/plugin-supervisor/package.json b/packages/internal/plugin-supervisor/package.json index 127717c295..39117a50b8 100644 --- a/packages/internal/plugin-supervisor/package.json +++ b/packages/internal/plugin-supervisor/package.json @@ -1,6 +1,6 @@ { "name": "@jsenv/plugin-supervisor", - "version": "1.5.25", + "version": "1.5.26", "license": "MIT", "repository": { "type": "git", diff --git a/packages/internal/plugin-supervisor/src/client/supervisor.js b/packages/internal/plugin-supervisor/src/client/supervisor.js index 0036e15c0f..0260921b1a 100644 --- a/packages/internal/plugin-supervisor/src/client/supervisor.js +++ b/packages/internal/plugin-supervisor/src/client/supervisor.js @@ -528,6 +528,17 @@ window.__supervisor__ = (() => { for (const callSite of callSites) { const url = callSite.getFileName() || callSite.getScriptNameOrSourceURL(); + if (!url) { + // thinks like Array.forEach can generate this + const stackFrame = { + raw: ` at ${String(callSite)}`, + url: null, + line: null, + column: null, + }; + stackFrames.push(stackFrame); + continue; + } const line = callSite.getLineNumber(); const column = callSite.getColumnNumber(); const site = resolveUrlSite({ url, line, column }); diff --git a/packages/internal/plugin-supervisor/src/jsenv_plugin_supervisor.js b/packages/internal/plugin-supervisor/src/jsenv_plugin_supervisor.js index 27d8c0b4ac..8af8dc5b30 100644 --- a/packages/internal/plugin-supervisor/src/jsenv_plugin_supervisor.js +++ b/packages/internal/plugin-supervisor/src/jsenv_plugin_supervisor.js @@ -88,6 +88,9 @@ export const jsenvPluginSupervisor = ({ }, }; } + if (!urlInfo.originalContent) { + await urlInfo.fetchContent(); + } const remap = searchParams.has("remap"); if (remap) { const sourcemap = urlInfo.sourcemap; diff --git a/packages/related/cli/package.json b/packages/related/cli/package.json index 3e8f2a716b..c72a4833ad 100644 --- a/packages/related/cli/package.json +++ b/packages/related/cli/package.json @@ -1,6 +1,6 @@ { "name": "@jsenv/cli", - "version": "0.2.4", + "version": "0.2.5", "description": "Command Line Interface for jsenv", "license": "MIT", "repository": { diff --git a/packages/related/cli/template-node-package/package.json b/packages/related/cli/template-node-package/package.json index e3e1e1e6f3..6fc1ba427f 100644 --- a/packages/related/cli/template-node-package/package.json +++ b/packages/related/cli/template-node-package/package.json @@ -12,9 +12,9 @@ }, "devDependencies": { "@jsenv/assert": "4.4.2", - "@jsenv/core": "39.5.20", + "@jsenv/core": "39.5.21", "@jsenv/eslint-config-relax": "1.2.12", - "@jsenv/test": "3.5.23", + "@jsenv/test": "3.5.24", "eslint": "9.14.0", "prettier": "3.3.3" } diff --git a/packages/related/cli/template-web-components/package.json b/packages/related/cli/template-web-components/package.json index ec0f094cf6..a0aba688f1 100644 --- a/packages/related/cli/template-web-components/package.json +++ b/packages/related/cli/template-web-components/package.json @@ -18,11 +18,11 @@ "@babel/plugin-syntax-import-attributes": "7.26.0", "@jsenv/custom-elements-redefine": "0.0.1", "@jsenv/assert": "4.4.2", - "@jsenv/core": "39.5.20", + "@jsenv/core": "39.5.21", "@jsenv/plugin-bundling": "2.7.16", "@jsenv/plugin-minification": "1.5.10", "@jsenv/eslint-config-relax": "1.2.12", - "@jsenv/test": "3.5.23", + "@jsenv/test": "3.5.24", "eslint": "9.14.0", "open": "10.1.0", "@playwright/browser-chromium": "1.48.2", diff --git a/packages/related/cli/template-web-preact/package.json b/packages/related/cli/template-web-preact/package.json index b38ea20610..217c65382c 100644 --- a/packages/related/cli/template-web-preact/package.json +++ b/packages/related/cli/template-web-preact/package.json @@ -21,12 +21,12 @@ "@babel/plugin-syntax-import-attributes": "7.26.0", "@babel/plugin-transform-react-jsx": "7.25.9", "@jsenv/assert": "4.4.2", - "@jsenv/core": "39.5.20", + "@jsenv/core": "39.5.21", "@jsenv/plugin-preact": "1.6.25", "@jsenv/plugin-bundling": "2.7.16", "@jsenv/plugin-minification": "1.5.10", "@jsenv/eslint-config-relax": "1.2.12", - "@jsenv/test": "3.5.23", + "@jsenv/test": "3.5.24", "eslint": "9.14.0", "open": "10.1.0", "@playwright/browser-chromium": "1.48.2", diff --git a/packages/related/cli/template-web-react/package.json b/packages/related/cli/template-web-react/package.json index c074c1afa6..d8d8705cfb 100644 --- a/packages/related/cli/template-web-react/package.json +++ b/packages/related/cli/template-web-react/package.json @@ -22,12 +22,12 @@ "@babel/plugin-syntax-import-attributes": "7.26.0", "@babel/plugin-transform-react-jsx": "7.25.9", "@jsenv/assert": "4.4.2", - "@jsenv/core": "39.5.20", + "@jsenv/core": "39.5.21", "@jsenv/plugin-react": "1.5.44", "@jsenv/plugin-bundling": "2.7.16", "@jsenv/plugin-minification": "1.5.10", "@jsenv/eslint-config-relax": "1.2.12", - "@jsenv/test": "3.5.23", + "@jsenv/test": "3.5.24", "eslint": "9.14.0", "open": "10.1.0", "@playwright/browser-chromium": "1.48.2", diff --git a/packages/related/cli/template-web/package.json b/packages/related/cli/template-web/package.json index 7bfcdab6c1..c06237955e 100644 --- a/packages/related/cli/template-web/package.json +++ b/packages/related/cli/template-web/package.json @@ -16,11 +16,11 @@ "devDependencies": { "@babel/plugin-syntax-import-attributes": "7.26.0", "@jsenv/assert": "4.4.2", - "@jsenv/core": "39.5.20", + "@jsenv/core": "39.5.21", "@jsenv/eslint-config-relax": "1.2.12", "@jsenv/plugin-bundling": "2.7.16", "@jsenv/plugin-minification": "1.5.10", - "@jsenv/test": "3.5.23", + "@jsenv/test": "3.5.24", "eslint": "9.14.0", "open": "10.1.0", "@playwright/browser-chromium": "1.48.2", diff --git a/packages/related/test/package.json b/packages/related/test/package.json index 616ffa45ee..e853f85bb6 100644 --- a/packages/related/test/package.json +++ b/packages/related/test/package.json @@ -1,6 +1,6 @@ { "name": "@jsenv/test", - "version": "3.5.23", + "version": "3.5.24", "license": "MIT", "repository": { "type": "git", @@ -43,7 +43,7 @@ "@jsenv/github-check-run": "0.2.2", "@jsenv/node-esm-resolution": "1.0.6", "@jsenv/humanize": "1.2.8", - "@jsenv/plugin-supervisor": "1.5.25", + "@jsenv/plugin-supervisor": "1.5.26", "@jsenv/sourcemap": "1.2.25", "@jsenv/url-meta": "8.5.2", "@jsenv/urls": "2.5.2",