@jsenv/core 23.0.6 → 23.1.1
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/dist/jsenv_browser_system.js +19 -3
- package/dist/jsenv_browser_system.js.map +5 -5
- package/package.json +7 -8
- package/src/execute.js +12 -0
- package/src/internal/building/createJsenvRollupPlugin.js +64 -27
- package/src/internal/building/html/parseHtmlRessource.js +2 -3
- package/src/internal/building/js/parseJsRessource.js +1 -3
- package/src/internal/building/parseRessource.js +5 -5
- package/src/internal/building/svg/parseSvgRessource.js +2 -2
- package/src/internal/compiling/compile-directory/updateMeta.js +5 -1
- package/src/internal/compiling/startCompileServer.js +1 -1
- package/src/internal/error-stack-remapping/installBrowserErrorStackRemapping.js +5 -1
- package/src/internal/executing/coverage/v8CoverageFromNodeV8Directory.js +35 -18
- package/src/internal/executing/executionLogs.js +12 -3
- package/src/internal/executing/launchAndExecute.js +24 -15
- package/src/internal/logs/log_style.js +13 -1
- package/src/internal/node-launcher/createControllableNodeProcess.js +97 -45
- package/src/internal/node-launcher/nodeControllableFile.mjs +1 -1
- package/src/internal/runtime/createBrowserRuntime/createBrowserSystem.js +18 -3
- package/src/launchBrowser.js +67 -49
- package/src/launchNode.js +3 -7
|
@@ -3181,7 +3181,13 @@
|
|
|
3181
3181
|
}
|
|
3182
3182
|
}, function (_result2) {
|
|
3183
3183
|
return _exit2 ? _result2 : _catch$4(function () {
|
|
3184
|
-
return _await$8(instantiate.call(_this, url, importerUrl))
|
|
3184
|
+
return _await$8(instantiate.call(_this, url, importerUrl), function (registration) {
|
|
3185
|
+
if (!registration) {
|
|
3186
|
+
throw new Error("no registration found for JS at ".concat(url, "\n--- importer url ---\n").concat(importerUrl, "\n--- navigator.vendor ---\n").concat(window.navigator.vendor));
|
|
3187
|
+
}
|
|
3188
|
+
|
|
3189
|
+
return registration;
|
|
3190
|
+
});
|
|
3185
3191
|
}, function (e) {
|
|
3186
3192
|
return _await$8(createDetailedInstantiateError({
|
|
3187
3193
|
instantiateError: e,
|
|
@@ -3242,7 +3248,13 @@
|
|
|
3242
3248
|
}
|
|
3243
3249
|
};
|
|
3244
3250
|
});
|
|
3245
|
-
|
|
3251
|
+
var registration = browserSystem.getRegister(url);
|
|
3252
|
+
|
|
3253
|
+
if (!registration) {
|
|
3254
|
+
throw new Error("no registration found for JSON at ".concat(url, ". Navigator.vendor: ").concat(window.navigator.vendor, ". JSON text: ").concat(json));
|
|
3255
|
+
}
|
|
3256
|
+
|
|
3257
|
+
return registration;
|
|
3246
3258
|
});
|
|
3247
3259
|
});
|
|
3248
3260
|
});
|
|
@@ -4823,7 +4835,11 @@
|
|
|
4823
4835
|
// browser having Error.captureStackTrace got window.fetch
|
|
4824
4836
|
// and this executes only when Error.captureStackTrace exists
|
|
4825
4837
|
// so no need for polyfill or whatever here
|
|
4826
|
-
return _await$2(window.fetch(url
|
|
4838
|
+
return _await$2(window.fetch(url, {
|
|
4839
|
+
// by default a script tag is in "no-cors"
|
|
4840
|
+
// so we also fetch url with "no-cors"
|
|
4841
|
+
mode: "no-cors"
|
|
4842
|
+
}), function (response) {
|
|
4827
4843
|
// we read response test before anything because once memoized fetch
|
|
4828
4844
|
// gets annoying preventing you to read
|
|
4829
4845
|
// body multiple times, even using response.clone()
|