@jsenv/core 25.4.9 → 26.0.0
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/browser_client/asset-manifest.json +4 -0
- package/dist/browser_client/browser_client_fb33eaa4.js +5320 -0
- package/dist/browser_client/browser_client_fb33eaa4.js.map +1089 -0
- package/dist/build_manifest.js +6 -6
- package/dist/compile_proxy/asset-manifest.json +2 -2
- package/dist/compile_proxy/compile_proxy.html__inline__20_651d1e7b.js.map +343 -0
- package/dist/compile_proxy/{compile_proxy_ab528227.html → compile_proxy_62f952c4.html} +7 -6
- package/dist/event_source_client/asset-manifest.json +2 -2
- package/dist/event_source_client/event_source_client_69f48287.js +354 -0
- package/dist/event_source_client/{event_source_client_80644aee.js.map → event_source_client_69f48287.js.map} +2 -2
- package/dist/redirector/asset-manifest.json +2 -2
- package/dist/redirector/redirector.html__inline__12_171e07b4.js.map +349 -0
- package/dist/redirector/{redirector_6df2620a.html → redirector_8117ec92.html} +7 -6
- package/dist/toolbar/asset-manifest.json +5 -5
- package/dist/toolbar/assets/{light-theme.css_72a60fa3.map → light_theme.css_5bff0336.map} +2 -2
- package/dist/toolbar/assets/{overflow-menu.css_2859d519.map → overflow_menu.css_9a0fc3d8.map} +2 -2
- package/dist/toolbar/assets/{toolbar.main.css_b7d8bec1.map → toolbar_main.css_b1c67dd7.map} +7 -7
- package/dist/toolbar/{toolbar_9a52325b.html → toolbar_b0c9100c.html} +8 -7
- package/dist/toolbar/{toolbar.main_2c56a4e0.js.map → toolbar_main_f54c1bb0.js.map} +32 -32
- package/dist/toolbar_injector/asset-manifest.json +3 -3
- package/dist/toolbar_injector/assets/{jsenv-logo_188b9ca6.svg → jsenv_logo_192011c2.svg} +1 -1
- package/dist/toolbar_injector/toolbar_injector_65b501eb.js +976 -0
- package/dist/toolbar_injector/toolbar_injector_65b501eb.js.map +294 -0
- package/helpers/babel/asyncIterator/asyncIterator.js +61 -8
- package/helpers/babel/createClass/createClass.js +12 -12
- package/helpers/babel/inherits/inherits.js +10 -6
- package/helpers/babel/jsx/jsx.js +27 -22
- package/helpers/babel/objectSpread2/objectSpread2.js +22 -14
- package/helpers/babel/readme.md +3 -8
- package/helpers/babel/wrapRegExp/wrapRegExp.js +29 -29
- package/main.js +19 -14
- package/package.json +43 -43
- package/readme.md +21 -18
- package/src/{launchBrowser.js → browser_runtimes.js} +3 -8
- package/src/{buildProject.js → build_project.js} +6 -17
- package/src/{commonJsToJavaScriptModule.js → commonjs_to_js_module.js} +5 -5
- package/src/dev_server.js +19 -10
- package/src/execute.js +3 -3
- package/src/{executeTestPlan.js → execute_test_plan.js} +24 -20
- package/src/{importUsingChildProcess.js → import_using_child_process.js} +2 -2
- package/src/internal/{browser_runtime/browser_runtime.js → browser_client/browser_client.js} +13 -17
- package/src/internal/{browser_runtime/createBrowserRuntime.js → browser_client/browser_client_factory.js} +7 -9
- package/src/internal/{error-stack-remapping/installBrowserErrorStackRemapping.js → browser_client/browser_error_stack_remap.js} +1 -3
- package/src/internal/{browser_runtime → browser_client}/browser_system.js +2 -4
- package/src/internal/{browser_runtime/displayErrorInDocument.js → browser_client/error_in_document.js} +0 -2
- package/src/internal/{browser_runtime/displayErrorNotification.js → browser_client/error_in_notification.js} +0 -1
- package/src/internal/{browser_runtime/makeNamespaceTransferable.js → browser_client/module_namespace_transfer.js} +1 -1
- package/src/internal/{perf_browser.js → browser_client/perf_browser.js} +0 -2
- package/src/internal/browser_detection/browser_detection.js +9 -12
- package/src/internal/browser_detection/{detectAndroid.js → detect_android.js} +0 -0
- package/src/internal/browser_detection/{detectChrome.js → detect_chrome.js} +0 -0
- package/src/internal/browser_detection/{detectEdge.js → detect_edge.js} +0 -0
- package/src/internal/browser_detection/{detectElectron.js → detect_electron.js} +0 -0
- package/src/internal/browser_detection/{detectFirefox.js → detect_firefox.js} +0 -0
- package/src/internal/browser_detection/{detectInternetExplorer.js → detect_internet_explorer.js} +0 -0
- package/src/internal/browser_detection/{detectIOS.js → detect_ios.js} +0 -0
- package/src/internal/browser_detection/{detectOpera.js → detect_opera.js} +0 -0
- package/src/internal/browser_detection/{detectSafari.js → detect_safari.js} +0 -0
- package/src/internal/browser_detection/user_agent_data.js +0 -1
- package/src/internal/browser_launcher/{executeHtmlFile.js → execute_html_file.js} +5 -4
- package/src/internal/browser_launcher/from_playwright.js +3 -3
- package/src/internal/browser_launcher/{trackPageToNotify.js → page_errors_and_logs.js} +1 -1
- package/src/internal/browser_utils/{fetchAndEvalUsingFetch.js → fetch_and_eval.js} +1 -3
- package/src/internal/browser_utils/{fetchAndEvalUsingScript.js → fetch_and_eval_using_script.js} +0 -2
- package/src/internal/browser_utils/fetch_browser.js +1 -1
- package/src/internal/browser_utils/{fetchJson.js → fetch_json.js} +0 -0
- package/src/internal/browser_utils/{fetchUsingXHR.js → fetch_using_xhr.js} +0 -2
- package/src/internal/building/build_logs.js +37 -40
- package/src/internal/building/build_stats.js +2 -1
- package/src/internal/building/build_url_generator.js +1 -1
- package/src/internal/building/{buildUsingRollup.js → build_using_rollup.js} +6 -21
- package/src/internal/building/css/{applyPostCss.js → apply_post_css.js} +0 -0
- package/src/internal/building/css/{parseCssRessource.js → jsenv_parse_css.js} +5 -4
- package/src/internal/building/css/{moveCssUrls.js → move_css_urls.js} +1 -1
- package/src/internal/building/css/{parseCssUrls.js → parse_css_urls.js} +1 -1
- package/src/internal/building/css/postcss_plugin_url_visitor.js +1 -0
- package/src/internal/building/css/{replaceCssUrls.js → replace_css_urls.js} +2 -1
- package/src/internal/building/global_format/es_to_system.js +34 -0
- package/src/internal/building/{parsing.utils.js → html/html_node_mutations.js} +0 -0
- package/src/internal/building/html/{htmlScan.js → html_scan.js} +1 -1
- package/src/internal/building/html/{parseHtmlRessource.js → jsenv_parse_html.js} +5 -6
- package/src/internal/building/html/{minifyHtml.js → minify_html.js} +0 -0
- package/src/internal/building/{css_module.js → import_assertions/css_module.js} +3 -3
- package/src/internal/building/{json_module.js → import_assertions/json_module.js} +0 -0
- package/src/internal/building/import_references.js +0 -1
- package/src/internal/building/importmap/{parseImportmapRessource.js → jsenv_parse_importmap.js} +0 -0
- package/src/internal/building/js/{parseJsRessource.js → jsenv_parse_js.js} +2 -1
- package/src/internal/building/js/{minifyJs.js → minify_js.js} +0 -0
- package/src/internal/building/js/transform_worker.js +1 -1
- package/src/internal/building/json/{parseJsonRessource.js → jsenv_parse_json.js} +0 -0
- package/src/internal/building/{parseRessource.js → parse_ressource.js} +13 -13
- package/src/internal/building/ressource_builder.js +4 -3
- package/src/internal/building/ressource_builder_util.js +2 -2
- package/src/internal/building/rollup_plugin_jsenv.js +166 -61
- package/src/internal/building/{sortObjectByPathnames.js → sort_pathnames.js} +0 -0
- package/src/internal/building/{sourcemap_loader.js → sourcemap/sourcemap_loader.js} +3 -6
- package/src/internal/building/svg/{parseSvgRessource.js → jsenv_parse_svg.js} +4 -3
- package/src/internal/building/url_fetcher.js +1 -1
- package/src/internal/building/url_loader.js +3 -3
- package/src/internal/building/{resolve_import_url_helper.js → url_versioning/resolve_import_url_helper.js} +0 -0
- package/src/internal/building/{url_versioning.js → url_versioning/url_versioning.js} +1 -1
- package/src/internal/building/webmanifest/{parseWebmanifestRessource.js → jsenv_parse_webmanifest.js} +0 -0
- package/src/internal/{compiling → compile_server/commonjs}/rollup_plugin_commonjs_named_exports.js +0 -0
- package/src/internal/{compiling/compileFile.js → compile_server/compile_file.js} +4 -4
- package/src/internal/{compiling/startCompileServer.js → compile_server/compile_server.js} +11 -24
- package/src/internal/{compiling/createCompiledFileService.js → compile_server/compiled_file_service.js} +4 -8
- package/src/internal/{compiling/compileHtml.js → compile_server/html/html_ast.js} +2 -12
- package/src/internal/{compiling → compile_server/html}/html_source_file_service.js +10 -10
- package/src/internal/{compiling/jsenvCompilerForHtml.js → compile_server/html/jsenv_compile_html.js} +12 -12
- package/src/internal/{compiling/jsenvCompilerForImportmap.js → compile_server/importmap/jsenv_compile_importmap.js} +1 -1
- package/src/internal/{compiling/js-compilation-service/ansiToHTML.js → compile_server/js/ansi_to_html.js} +1 -1
- package/src/internal/{compiling/js-compilation-service → compile_server/js}/babelHelper.js +1 -1
- package/src/internal/{compiling → compile_server/js}/babel_parse_error.js +0 -0
- package/src/internal/{compiling/js-compilation-service → compile_server/js}/babel_plugin_babel_helpers_as_jsenv_imports.js +2 -1
- package/src/internal/{compiling → compile_server/js}/babel_plugin_global_this_as_jsenv_import.js +1 -1
- package/src/internal/{compiling → compile_server/js}/babel_plugin_import_assertions.js +1 -0
- package/src/internal/{compiling → compile_server/js}/babel_plugin_import_metadata.js +0 -0
- package/src/internal/{compiling → compile_server/js}/babel_plugin_import_visitor.js +0 -0
- package/src/internal/{compiling → compile_server/js}/babel_plugin_new_stylesheet_as_jsenv_import.js +1 -1
- package/src/internal/{compiling → compile_server/js}/babel_plugin_proxy_external_imports.js +0 -0
- package/src/internal/{compiling/js-compilation-service → compile_server/js}/babel_plugin_regenerator_runtime_as_jsenv_import.js +1 -1
- package/src/internal/{babel_plugin_replace_expressions.js → compile_server/js/babel_plugin_replace_expressions.js} +0 -0
- package/src/internal/{compiling/js-compilation-service → compile_server/js}/babel_plugin_systemjs_prepend.js +2 -2
- package/src/internal/{compiling → compile_server/js}/babel_plugin_transform_import_meta.js +0 -0
- package/src/internal/{compiling → compile_server/js}/babel_plugins.js +0 -0
- package/src/internal/{compiling/js-compilation-service → compile_server/js}/generateBabelHelper.js +1 -1
- package/src/internal/{compiling/js-compilation-service/transformJs.js → compile_server/js/js_transformer.js} +8 -9
- package/src/internal/{compiling/jsenvCompilerForJavaScript.js → compile_server/js/jsenv_compile_js.js} +7 -7
- package/src/internal/{compiling → compile_server/js}/load_babel_plugin_map_from_file.js +0 -0
- package/src/internal/{compiling → compile_server}/jsenv_directory/comparison_utils.js +0 -0
- package/src/internal/{compiling/transformResultToCompilationResult.js → compile_server/jsenv_directory/compilation_result.js} +6 -5
- package/src/internal/{building/buildToCompilationResult.js → compile_server/jsenv_directory/compilation_result_from_build.js} +4 -3
- package/src/internal/{compiling → compile_server}/jsenv_directory/compile_asset.js +0 -0
- package/src/internal/{compiling → compile_server}/jsenv_directory/compile_context.js +4 -13
- package/src/internal/{compiling → compile_server}/jsenv_directory/compile_profile.js +1 -2
- package/src/internal/{compiling → compile_server}/jsenv_directory/file_lock_registry.js +0 -0
- package/src/internal/{compiling → compile_server}/jsenv_directory/file_lock_registry.test.js +0 -0
- package/src/internal/{compiling/jsenv_directory/fs-optimized-for-cache.js → compile_server/jsenv_directory/fs_optimized_for_cache.js} +0 -0
- package/src/internal/{compiling → compile_server}/jsenv_directory/jsenv_directory.js +0 -0
- package/src/internal/{compiling/jsenv_directory/getOrGenerateCompiledFile.js → compile_server/jsenv_directory/reuse_or_create_compiled_file.js} +3 -3
- package/src/internal/{compiling/jsenv_directory/updateMeta.js → compile_server/jsenv_directory/update_compile_cache.js} +2 -2
- package/src/internal/{compiling/jsenv_directory/validateCache.js → compile_server/jsenv_directory/validate_compile_cache.js} +1 -1
- package/src/internal/{compiling → compile_server}/sse_service/sse_service.js +1 -1
- package/src/internal/{executing/coverage → coverage}/babel_plugin_instrument.js +1 -1
- package/src/internal/{executing/coverage_reporter → coverage}/coverage_reporter_html_directory.js +3 -2
- package/src/internal/{executing/coverage_reporter → coverage}/coverage_reporter_json_file.js +1 -1
- package/src/internal/{executing/coverage_reporter → coverage}/coverage_reporter_text_log.js +3 -2
- package/src/internal/{executing/coverage_missing/relativeUrlToEmptyCoverage.js → coverage/empty_coverage_factory.js} +10 -3
- package/src/internal/{executing/coverage_utils → coverage}/file_by_file_coverage.js +0 -0
- package/src/internal/{executing/coverage_utils → coverage}/istanbul_coverage_composition.js +1 -1
- package/src/internal/{executing/coverage_reporter/istanbulCoverageMapFromCoverage.js → coverage/istanbul_coverage_map_from_coverage.js} +1 -1
- package/src/internal/{executing/coverage_missing → coverage}/list_files_not_covered.js +0 -0
- package/src/internal/{executing/coverage_missing → coverage}/missing_coverage.js +1 -1
- package/src/internal/{executing/coverage/reportToCoverage.js → coverage/report_to_coverage.js} +8 -7
- package/src/internal/{executing/coverage_utils → coverage}/v8_and_istanbul.js +0 -0
- package/src/internal/{executing/coverage_utils → coverage}/v8_coverage_composition.js +0 -0
- package/src/internal/{executing/coverage_utils → coverage}/v8_coverage_from_directory.js +2 -1
- package/src/internal/{executing/coverage_utils → coverage}/v8_coverage_to_istanbul.js +0 -0
- package/src/internal/data_url.js +54 -0
- package/src/internal/dev_server/exploring/exploring.js +1 -1
- package/src/internal/dev_server/exploring/{fetchExploringJson.js → fetch_exploring_json.js} +1 -1
- package/src/internal/dev_server/toolbar/animation/{toolbar.animation.js → toolbar_animation.js} +0 -0
- package/src/internal/dev_server/toolbar/compilation/{toolbar.compilation.js → toolbar_compilation.js} +3 -2
- package/src/internal/dev_server/toolbar/eventsource/{toolbar.eventsource.js → toolbar_eventsource.js} +0 -0
- package/src/internal/dev_server/toolbar/execution/{toolbar.execution.js → toolbar_execution.js} +1 -1
- package/src/internal/dev_server/toolbar/focus/{toolbar.focus.js → toolbar_focus.js} +0 -0
- package/src/internal/dev_server/toolbar/{jsenv-logo.svg → jsenv_logo.svg} +1 -1
- package/src/internal/dev_server/toolbar/notification/{toolbar.notification.js → toolbar_notification.js} +0 -0
- package/src/internal/dev_server/toolbar/responsive/{overflow-menu.css → overflow_menu.css} +0 -0
- package/src/internal/dev_server/toolbar/responsive/{toolbar.responsive.js → toolbar_responsive.js} +0 -0
- package/src/internal/dev_server/toolbar/settings/{toolbar.settings.js → toolbar_settings.js} +0 -0
- package/src/internal/dev_server/toolbar/theme/{jsenv-theme.css → jsenv_theme.css} +0 -0
- package/src/internal/dev_server/toolbar/theme/{light-theme.css → light_theme.css} +0 -0
- package/src/internal/dev_server/toolbar/theme/{toolbar.theme.js → toolbar_theme.js} +0 -0
- package/src/internal/dev_server/toolbar/toolbar.html +2 -2
- package/src/internal/dev_server/toolbar/{toolbar.injector.js → toolbar_injector.js} +4 -3
- package/src/internal/dev_server/toolbar/{toolbar.main.css → toolbar_main.css} +2 -2
- package/src/internal/dev_server/toolbar/{toolbar.main.js → toolbar_main.js} +9 -9
- package/src/internal/dev_server/toolbar/util/fetching.js +1 -1
- package/src/internal/dev_server/toolbar/util/{jsenvLogger.js → jsenv_logger.js} +0 -0
- package/src/internal/{error-stack-remapping/installErrorStackRemapping.js → error_stack_remap/install_error_stack_remapping.js} +6 -5
- package/src/internal/{error-stack-remapping/remapCallSite.js → error_stack_remap/remap_call_site.js} +2 -1
- package/src/internal/{error-stack-remapping/getOriginalCallsites.js → error_stack_remap/remap_stack.js} +7 -6
- package/src/internal/{error-stack-remapping/stackToString.js → error_stack_remap/stringify_stack.js} +1 -1
- package/src/internal/executing/execute_plan.js +604 -0
- package/src/internal/executing/{generateFileExecutionSteps.js → execution_steps.js} +27 -0
- package/src/internal/executing/{launchAndExecute.js → launch_and_execute.js} +2 -2
- package/src/internal/executing/{executionLogs.js → logs_file_execution.js} +3 -2
- package/src/internal/executing/{createSummaryLog.js → logs_plan_summary.js} +3 -2
- package/src/internal/features/browser_feature_detection/browser_feature_detection.js +1 -1
- package/src/internal/features/features_compat_from_runtime.js +1 -1
- package/src/internal/features/node_feature_detection/node_feature_detection.js +1 -1
- package/src/internal/{fetchUrl.js → fetching.js} +0 -0
- package/src/internal/{import-resolution/default-extension.js → import_resolution/default_extension.js} +0 -0
- package/src/internal/{import-resolution/import-resolver-importmap.js → import_resolution/import_resolver_importmap.js} +2 -2
- package/src/internal/{import-resolution/import-resolver-node.js → import_resolution/import_resolver_node.js} +2 -2
- package/src/internal/{import-resolution → import_resolution}/importmap_default.js +1 -1
- package/src/internal/jsenv_builds.js +1 -1
- package/src/internal/{argUtils.js → jsenv_params_assertions.js} +0 -0
- package/src/internal/jsenv_remote_directory.js +1 -1
- package/src/internal/logs/{byteAsFileSize.js → byte_as_file_size.js} +1 -1
- package/src/internal/logs/{msAsDuration.js → ms_as_duration.js} +1 -1
- package/src/internal/node_launcher/{createChildProcessOptions.js → child_process_options.js} +1 -1
- package/src/internal/{node_runtime/evalSource.js → node_launcher/eval_source.js} +0 -0
- package/src/internal/{node_runtime/fetchSource.js → node_launcher/fetch_source.js} +1 -1
- package/src/internal/node_launcher/kill_process_tree.js +2 -2
- package/src/internal/{node_runtime/nodeControllableFile.mjs → node_launcher/node_controllable_file.mjs} +0 -0
- package/src/internal/node_launcher/{createControllableNodeProcess.js → node_controllable_process.js} +3 -3
- package/src/internal/{error-stack-remapping/installNodeErrorStackRemapping.js → node_launcher/node_error_stack_remap.js} +5 -3
- package/src/internal/{node_runtime → node_launcher}/node_execution_dynamic_import.js +3 -2
- package/src/internal/{node_runtime → node_launcher}/node_execution_performance.js +0 -0
- package/src/internal/{node_runtime → node_launcher}/node_execution_systemjs.js +6 -6
- package/src/internal/{node_runtime → node_launcher}/node_system.js +7 -6
- package/src/internal/{perf_node.js → node_launcher/perf_node.js} +1 -1
- package/src/internal/node_launcher/{processOptions.js → process_options.js} +0 -0
- package/src/internal/{runtime/valueInstall.js → node_launcher/value_install.js} +0 -0
- package/src/internal/{escapeRegexpSpecialCharacters.js → regexp_escape.js} +0 -0
- package/src/internal/{runtime/module-registration.js → runtime_client/module_registration.js} +0 -0
- package/src/internal/{runtime → runtime_client}/s.js +3 -2
- package/src/internal/{runtime → runtime_client}/s.js.md +0 -0
- package/src/internal/{unevalException.js → runtime_client/uneval_exception.js} +0 -0
- package/src/internal/runtime_support/runtime_support.js +2 -2
- package/src/internal/semantic_versioning/{versionCompare.js → compare_versions.js} +4 -8
- package/src/internal/semantic_versioning/{findHighestVersion.js → highest_version.js} +1 -2
- package/src/internal/semantic_versioning/is_above.js +5 -0
- package/src/internal/semantic_versioning/is_below.js +5 -0
- package/src/internal/semantic_versioning/{versionIsEqual.js → is_equal.js} +0 -0
- package/src/internal/semantic_versioning/{findLowestVersion.js → lowest_version.js} +1 -2
- package/src/internal/semantic_versioning/{valueToVersion.js → version_from_value.js} +1 -3
- package/src/internal/{sourceMappingURLUtils.js → sourcemap_utils.js} +0 -0
- package/src/internal/{escapeTemplateStringSpecialCharacters.js → template_string_escape.js} +0 -0
- package/src/internal/{filePathUtils.js → windows_file_path_utils.js} +0 -3
- package/src/jsenv_file_urls.js +35 -0
- package/src/{jsenvServiceWorkerFinalizer.js → jsenv_service_worker_finalizer.js} +1 -1
- package/src/{textToJavaScriptModule.js → json_to_js_module.js} +1 -2
- package/src/{launchNode.js → node_runtime.js} +3 -3
- package/src/{requireUsingChildProcess.js → require_using_child_process.js} +2 -2
- package/src/{jsonToJavaScriptModule.js → text_to_js_module.js} +3 -2
- package/dist/browser_runtime/asset-manifest.json +0 -4
- package/dist/browser_runtime/browser_runtime_0e3396a1.js +0 -5298
- package/dist/browser_runtime/browser_runtime_0e3396a1.js.map +0 -1089
- package/dist/compile_proxy/compile_proxy.html__inline__20_f4285042.js.map +0 -343
- package/dist/event_source_client/event_source_client_80644aee.js +0 -356
- package/dist/redirector/redirector.html__inline__12_404b8295.js.map +0 -349
- package/dist/toolbar_injector/toolbar_injector_1e193101.js +0 -976
- package/dist/toolbar_injector/toolbar_injector_1e193101.js.map +0 -294
- package/src/internal/browser_runtime/evalSource.js +0 -11
- package/src/internal/dataUrl.utils.js +0 -55
- package/src/internal/executing/coverage_missing/createEmptyCoverage.js +0 -6
- package/src/internal/executing/executeConcurrently.js +0 -440
- package/src/internal/executing/executePlan.js +0 -211
- package/src/internal/executing/executionIsPassed.js +0 -2
- package/src/internal/executing/generateExecutionSteps.js +0 -29
- package/src/internal/jsenvCoreDirectoryUrl.js +0 -22
- package/src/internal/jsenvInternalFiles.js +0 -36
- package/src/internal/semantic_versioning/index.js +0 -5
- package/src/internal/semantic_versioning/versionIsAbove.js +0 -5
- package/src/internal/semantic_versioning/versionIsBelow.js +0 -5
- package/src/jsenvCoverageConfig.js +0 -7
- package/src/jsenvExplorableConfig.js +0 -9
- package/src/jsenvRuntimeSupportDuringDev.js +0 -12
- package/src/playwright_browser_versions.js +0 -5
|
@@ -33,13 +33,9 @@ export const buildUsingRollup = async ({
|
|
|
33
33
|
|
|
34
34
|
format,
|
|
35
35
|
systemJsUrl,
|
|
36
|
-
globalName,
|
|
37
36
|
globals,
|
|
38
|
-
|
|
39
|
-
serviceWorkers,
|
|
37
|
+
preservedDynamicImports,
|
|
40
38
|
serviceWorkerFinalizer,
|
|
41
|
-
classicWorkers,
|
|
42
|
-
classicServiceWorkers,
|
|
43
39
|
|
|
44
40
|
node,
|
|
45
41
|
browser,
|
|
@@ -79,6 +75,9 @@ export const buildUsingRollup = async ({
|
|
|
79
75
|
|
|
80
76
|
format,
|
|
81
77
|
systemJsUrl,
|
|
78
|
+
globals,
|
|
79
|
+
preservedDynamicImports,
|
|
80
|
+
|
|
82
81
|
urlMappings,
|
|
83
82
|
importResolutionMethod,
|
|
84
83
|
importMapFileRelativeUrl,
|
|
@@ -86,11 +85,7 @@ export const buildUsingRollup = async ({
|
|
|
86
85
|
externalImportSpecifiers,
|
|
87
86
|
importPaths,
|
|
88
87
|
preservedUrls,
|
|
89
|
-
workers,
|
|
90
|
-
serviceWorkers,
|
|
91
88
|
serviceWorkerFinalizer,
|
|
92
|
-
classicWorkers,
|
|
93
|
-
classicServiceWorkers,
|
|
94
89
|
|
|
95
90
|
node,
|
|
96
91
|
browser,
|
|
@@ -118,8 +113,6 @@ export const buildUsingRollup = async ({
|
|
|
118
113
|
rollupPlugins,
|
|
119
114
|
compileProfile,
|
|
120
115
|
format,
|
|
121
|
-
globals,
|
|
122
|
-
globalName,
|
|
123
116
|
sourcemapExcludeSources,
|
|
124
117
|
preserveEntrySignatures,
|
|
125
118
|
treeshake,
|
|
@@ -224,8 +217,6 @@ const useRollup = async ({
|
|
|
224
217
|
rollupPlugins,
|
|
225
218
|
compileProfile,
|
|
226
219
|
format,
|
|
227
|
-
globals,
|
|
228
|
-
globalName,
|
|
229
220
|
sourcemapExcludeSources,
|
|
230
221
|
preserveEntrySignatures,
|
|
231
222
|
treeshake,
|
|
@@ -316,12 +307,6 @@ const useRollup = async ({
|
|
|
316
307
|
sourcemap: true,
|
|
317
308
|
sourcemapExcludeSources,
|
|
318
309
|
// preserveModules: !jsConcatenation,
|
|
319
|
-
...(format === "global"
|
|
320
|
-
? {
|
|
321
|
-
globals,
|
|
322
|
-
name: globalName,
|
|
323
|
-
}
|
|
324
|
-
: {}),
|
|
325
310
|
}
|
|
326
311
|
|
|
327
312
|
buildOperation.throwIfAborted()
|
|
@@ -336,7 +321,7 @@ const useRollup = async ({
|
|
|
336
321
|
}
|
|
337
322
|
|
|
338
323
|
const formatToRollupFormat = (format) => {
|
|
339
|
-
if (format === "global") return "
|
|
324
|
+
if (format === "global") return "esm" // will be handled by rollup_plugin_iife
|
|
340
325
|
if (format === "commonjs") return "cjs"
|
|
341
326
|
if (format === "systemjs") return "system"
|
|
342
327
|
if (format === "esmodule") return "esm"
|
|
@@ -367,7 +352,7 @@ const getConvertSuggestion = async ({
|
|
|
367
352
|
return {
|
|
368
353
|
suggestion: `The file seems written in commonjs, you should use "customCompiler" to convert it to js module
|
|
369
354
|
{
|
|
370
|
-
"./${importedFileOriginalRelativeUrl}":
|
|
355
|
+
"./${importedFileOriginalRelativeUrl}": commonJsToJsModule
|
|
371
356
|
}
|
|
372
357
|
As documented in https://github.com/jsenv/jsenv-core/blob/master/docs/shared-parameters.md#customcompilers`,
|
|
373
358
|
}
|
|
File without changes
|
|
@@ -9,11 +9,12 @@ import {
|
|
|
9
9
|
generateSourcemapUrl,
|
|
10
10
|
getCssSourceMappingUrl,
|
|
11
11
|
setCssSourceMappingUrl,
|
|
12
|
-
} from "@jsenv/core/src/internal/
|
|
12
|
+
} from "@jsenv/core/src/internal/sourcemap_utils.js"
|
|
13
|
+
|
|
13
14
|
import { getRessourceAsBase64Url } from "../ressource_builder_util.js"
|
|
14
|
-
import { parseCssUrls } from "./
|
|
15
|
-
import { replaceCssUrls } from "./
|
|
16
|
-
import { moveCssUrls } from "./
|
|
15
|
+
import { parseCssUrls } from "./parse_css_urls.js"
|
|
16
|
+
import { replaceCssUrls } from "./replace_css_urls.js"
|
|
17
|
+
import { moveCssUrls } from "./move_css_urls.js"
|
|
17
18
|
|
|
18
19
|
export const parseCssRessource = async (
|
|
19
20
|
cssRessource,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { urlToRelativeUrl } from "@jsenv/filesystem"
|
|
2
2
|
|
|
3
|
-
import { applyPostCss } from "./
|
|
3
|
+
import { applyPostCss } from "./apply_post_css.js"
|
|
4
4
|
import { postCssPluginUrlVisitor } from "./postcss_plugin_url_visitor.js"
|
|
5
5
|
|
|
6
6
|
export const moveCssUrls = async ({
|
|
@@ -12,6 +12,7 @@ hence sourcemap cannot point the original source location
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import { fileSystemPathToUrl, resolveUrl } from "@jsenv/filesystem"
|
|
15
|
+
|
|
15
16
|
import { require } from "@jsenv/core/src/internal/require.js"
|
|
16
17
|
|
|
17
18
|
export const postCssPluginUrlVisitor = ({ urlVisitor = () => null }) => {
|
|
@@ -4,7 +4,8 @@ import {
|
|
|
4
4
|
} from "@jsenv/filesystem"
|
|
5
5
|
|
|
6
6
|
import { require } from "@jsenv/core/src/internal/require.js"
|
|
7
|
-
|
|
7
|
+
|
|
8
|
+
import { applyPostCss } from "./apply_post_css.js"
|
|
8
9
|
import { postCssPluginUrlVisitor } from "./postcss_plugin_url_visitor.js"
|
|
9
10
|
|
|
10
11
|
export const replaceCssUrls = async ({
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export const esToSystem = async ({ code, url, map }) => {
|
|
2
|
+
const { rollup } = await import("rollup")
|
|
3
|
+
const rollupBuild = await rollup({
|
|
4
|
+
input: url,
|
|
5
|
+
plugins: [
|
|
6
|
+
{
|
|
7
|
+
name: "es-to-system",
|
|
8
|
+
resolveId: (id) => {
|
|
9
|
+
if (id === url) {
|
|
10
|
+
return id
|
|
11
|
+
}
|
|
12
|
+
return { external: true }
|
|
13
|
+
},
|
|
14
|
+
load: (id) => {
|
|
15
|
+
if (id === url) {
|
|
16
|
+
return code
|
|
17
|
+
}
|
|
18
|
+
return null
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
})
|
|
23
|
+
const { output } = await rollupBuild.generate({
|
|
24
|
+
format: "system",
|
|
25
|
+
sourcemap: true,
|
|
26
|
+
})
|
|
27
|
+
const firstChunk = output[0]
|
|
28
|
+
code = firstChunk.code
|
|
29
|
+
map = firstChunk.map
|
|
30
|
+
return {
|
|
31
|
+
code,
|
|
32
|
+
map,
|
|
33
|
+
}
|
|
34
|
+
}
|
|
File without changes
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
visitHtmlAst,
|
|
4
4
|
getHtmlNodeAttributeByName,
|
|
5
5
|
getHtmlNodeTextNode,
|
|
6
|
-
} from "@jsenv/core/src/internal/
|
|
6
|
+
} from "@jsenv/core/src/internal/compile_server/html/html_ast.js"
|
|
7
7
|
|
|
8
8
|
export const importMapsFromHtml = (htmlSource) => {
|
|
9
9
|
const importmaps = []
|
|
@@ -19,7 +19,6 @@ Or be sure to also reference this url somewhere in the html file like
|
|
|
19
19
|
import { urlToFilename, urlToRelativeUrl, resolveUrl } from "@jsenv/filesystem"
|
|
20
20
|
import { applyAlgoToRepresentationData } from "@jsenv/integrity"
|
|
21
21
|
|
|
22
|
-
|
|
23
22
|
import {
|
|
24
23
|
parseHtmlString,
|
|
25
24
|
parseHtmlAstRessources,
|
|
@@ -35,21 +34,21 @@ import {
|
|
|
35
34
|
getHtmlNodeLocation,
|
|
36
35
|
removeHtmlNode,
|
|
37
36
|
addHtmlNodeAttribute,
|
|
38
|
-
} from "@jsenv/core/src/internal/
|
|
37
|
+
} from "@jsenv/core/src/internal/compile_server/html/html_ast.js"
|
|
39
38
|
import {
|
|
40
39
|
getJavaScriptSourceMappingUrl,
|
|
41
40
|
setJavaScriptSourceMappingUrl,
|
|
42
41
|
getCssSourceMappingUrl,
|
|
43
42
|
setCssSourceMappingUrl,
|
|
44
|
-
} from "@jsenv/core/src/internal/
|
|
43
|
+
} from "@jsenv/core/src/internal/sourcemap_utils.js"
|
|
45
44
|
import {
|
|
46
45
|
getRessourceAsBase64Url,
|
|
47
46
|
isReferencedOnlyByRessourceHint,
|
|
48
47
|
} from "../ressource_builder_util.js"
|
|
49
|
-
import { collectNodesMutations } from "
|
|
48
|
+
import { collectNodesMutations } from "./html_node_mutations.js"
|
|
50
49
|
|
|
51
|
-
import { collectSvgMutations } from "../svg/
|
|
52
|
-
import { moveCssUrls } from "../css/
|
|
50
|
+
import { collectSvgMutations } from "../svg/jsenv_parse_svg.js"
|
|
51
|
+
import { moveCssUrls } from "../css/move_css_urls.js"
|
|
53
52
|
|
|
54
53
|
export const parseHtmlRessource = async (
|
|
55
54
|
htmlRessource,
|
|
File without changes
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { resolveUrl, urlToRelativeUrl } from "@jsenv/filesystem"
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import { escapeTemplateStringSpecialCharacters } from "@jsenv/core/src/internal/escapeTemplateStringSpecialCharacters.js"
|
|
3
|
+
import { escapeTemplateStringSpecialCharacters } from "@jsenv/core/src/internal/template_string_escape.js"
|
|
5
4
|
import {
|
|
6
5
|
getCssSourceMappingUrl,
|
|
7
6
|
setCssSourceMappingUrl,
|
|
8
|
-
} from "@jsenv/core/src/internal/
|
|
7
|
+
} from "@jsenv/core/src/internal/sourcemap_utils.js"
|
|
8
|
+
import { moveCssUrls } from "@jsenv/core/src/internal/building/css/move_css_urls.js"
|
|
9
9
|
|
|
10
10
|
export const convertCssTextToJavascriptModule = async ({
|
|
11
11
|
cssUrl,
|
|
File without changes
|
package/src/internal/building/importmap/{parseImportmapRessource.js → jsenv_parse_importmap.js}
RENAMED
|
File without changes
|
|
@@ -4,7 +4,8 @@ import {
|
|
|
4
4
|
generateSourcemapUrl,
|
|
5
5
|
getJavaScriptSourceMappingUrl,
|
|
6
6
|
setJavaScriptSourceMappingUrl,
|
|
7
|
-
} from "@jsenv/core/src/internal/
|
|
7
|
+
} from "@jsenv/core/src/internal/sourcemap_utils.js"
|
|
8
|
+
|
|
8
9
|
import { transformWorker } from "./transform_worker.js"
|
|
9
10
|
|
|
10
11
|
export const parseJsRessource = async (
|
|
File without changes
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// var blob = new Blob(code, { type: 'text/javascript' })
|
|
3
3
|
// window.URL.createObjectURL(blob)
|
|
4
4
|
|
|
5
|
-
import { readFileSync } from "fs"
|
|
5
|
+
import { readFileSync } from "node:fs"
|
|
6
6
|
import { urlToFileSystemPath } from "@jsenv/filesystem"
|
|
7
7
|
import { createDetailedMessage } from "@jsenv/logger"
|
|
8
8
|
|
|
File without changes
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { readFile, urlToRelativeUrl } from "@jsenv/filesystem"
|
|
2
2
|
|
|
3
|
+
import {
|
|
4
|
+
jsenvSystemJsFileInfo,
|
|
5
|
+
jsenvResolveImportUrlHelper,
|
|
6
|
+
} from "@jsenv/core/src/jsenv_file_urls.js"
|
|
3
7
|
import {
|
|
4
8
|
parseHtmlString,
|
|
5
9
|
findHtmlNode,
|
|
@@ -8,19 +12,15 @@ import {
|
|
|
8
12
|
getHtmlNodeTextNode,
|
|
9
13
|
manipulateHtmlAst,
|
|
10
14
|
findFirstImportMapNode,
|
|
11
|
-
} from "@jsenv/core/src/internal/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "
|
|
16
|
-
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { parseCssRessource } from "./css/parseCssRessource.js"
|
|
21
|
-
import { parseJsRessource } from "./js/parseJsRessource.js"
|
|
22
|
-
import { parseJsonRessource } from "./json/parseJsonRessource.js"
|
|
23
|
-
import { parseWebmanifestRessource } from "./webmanifest/parseWebmanifestRessource.js"
|
|
15
|
+
} from "@jsenv/core/src/internal/compile_server/html/html_ast.js"
|
|
16
|
+
|
|
17
|
+
import { parseHtmlRessource } from "./html/jsenv_parse_html.js"
|
|
18
|
+
import { parseImportmapRessource } from "./importmap/jsenv_parse_importmap.js"
|
|
19
|
+
import { parseSvgRessource } from "./svg/jsenv_parse_svg.js"
|
|
20
|
+
import { parseCssRessource } from "./css/jsenv_parse_css.js"
|
|
21
|
+
import { parseJsRessource } from "./js/jsenv_parse_js.js"
|
|
22
|
+
import { parseJsonRessource } from "./json/jsenv_parse_json.js"
|
|
23
|
+
import { parseWebmanifestRessource } from "./webmanifest/jsenv_parse_webmanifest.js"
|
|
24
24
|
|
|
25
25
|
export const parseRessource = async (
|
|
26
26
|
ressource,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { resolveUrl, urlToRelativeUrl } from "@jsenv/filesystem"
|
|
2
2
|
import { createLogger, loggerToLevels } from "@jsenv/logger"
|
|
3
3
|
|
|
4
|
-
import { setJavaScriptSourceMappingUrl } from "@jsenv/core/src/internal/
|
|
4
|
+
import { setJavaScriptSourceMappingUrl } from "@jsenv/core/src/internal/sourcemap_utils.js"
|
|
5
|
+
import { DataUrl } from "@jsenv/core/src/internal/data_url.js"
|
|
5
6
|
|
|
6
7
|
import { racePromises } from "../promise_race.js"
|
|
7
|
-
|
|
8
|
+
|
|
8
9
|
import {
|
|
9
10
|
getRessourceAsBase64Url,
|
|
10
11
|
memoize,
|
|
@@ -276,7 +277,7 @@ export const createRessourceBuilder = (
|
|
|
276
277
|
if (ressourceUrl.startsWith("data:")) {
|
|
277
278
|
isExternal = false
|
|
278
279
|
isInline = true
|
|
279
|
-
const { mediaType, base64Flag, data } =
|
|
280
|
+
const { mediaType, base64Flag, data } = DataUrl.parse(ressourceUrl)
|
|
280
281
|
contentTypeExpected = mediaType
|
|
281
282
|
contentType = mediaType
|
|
282
283
|
bufferBeforeBuild = base64Flag
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { isFileSystemPath, fileSystemPathToUrl } from "@jsenv/filesystem"
|
|
2
2
|
import { createDetailedMessage } from "@jsenv/logger"
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { DataUrl } from "@jsenv/core/src/internal/data_url.js"
|
|
5
5
|
|
|
6
6
|
export const getRessourceAsBase64Url = ({ bufferAfterBuild, contentType }) => {
|
|
7
|
-
return
|
|
7
|
+
return DataUrl.stringify({
|
|
8
8
|
data: bufferAfterBuild,
|
|
9
9
|
base64Flag: true,
|
|
10
10
|
mediaType: contentType,
|