@jsenv/core 25.5.0 → 26.0.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/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 +42 -43
- package/readme.md +23 -25
- 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} +16 -9
- 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} +6 -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} +5 -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 +17 -8
- package/src/internal/{compiling/jsenv_directory/getOrGenerateCompiledFile.js → compile_server/jsenv_directory/reuse_or_create_compiled_file.js} +3 -3
- package/src/internal/compile_server/jsenv_directory/update_compile_cache.js +131 -0
- 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/{executePlan.js → execute_plan.js} +11 -8
- 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 +1 -1
- 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/compiling/jsenv_directory/updateMeta.js +0 -150
- package/src/internal/dataUrl.utils.js +0 -55
- package/src/internal/executing/coverage_missing/createEmptyCoverage.js +0 -6
- 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
package/helpers/babel/readme.md
CHANGED
|
@@ -2,12 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Babel helpers are copied in there to properly appear in sourcemap.
|
|
4
4
|
|
|
5
|
-
- Last sync date:
|
|
5
|
+
- Last sync date: 31 January 2022
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- History of individual helpers: https://github.com/babel/babel/commits/main/packages/babel-helpers/src/helpers
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- All thoose file are inlines versions of babel helpers declared in: https://github.com/babel/babel/blob/main/packages/babel-helpers/src/helpers.js
|
|
7
|
+
- Helpers file: https://github.com/babel/babel/blob/main/packages/babel-helpers/src/helpers.ts
|
|
8
|
+
- Individual helpers: https://github.com/babel/babel/tree/main/packages/babel-helpers/src/helpers
|
|
@@ -3,61 +3,61 @@ import inherits from "../inherits/inherits.js"
|
|
|
3
3
|
|
|
4
4
|
export default function _wrapRegExp() {
|
|
5
5
|
_wrapRegExp = function (re, groups) {
|
|
6
|
-
return new BabelRegExp(re, undefined, groups)
|
|
7
|
-
}
|
|
6
|
+
return new BabelRegExp(re, undefined, groups);
|
|
7
|
+
};
|
|
8
8
|
|
|
9
|
-
var _super = RegExp.prototype
|
|
10
|
-
var _groups = new WeakMap()
|
|
9
|
+
var _super = RegExp.prototype;
|
|
10
|
+
var _groups = new WeakMap();
|
|
11
11
|
|
|
12
12
|
function BabelRegExp(re, flags, groups) {
|
|
13
|
-
var _this = new RegExp(re, flags)
|
|
13
|
+
var _this = new RegExp(re, flags);
|
|
14
14
|
// if the regex is recreated with 'g' flag
|
|
15
|
-
_groups.set(_this, groups || _groups.get(re))
|
|
16
|
-
return setPrototypeOf(_this, BabelRegExp.prototype)
|
|
15
|
+
_groups.set(_this, groups || _groups.get(re));
|
|
16
|
+
return setPrototypeOf(_this, BabelRegExp.prototype);
|
|
17
17
|
}
|
|
18
|
-
inherits(BabelRegExp, RegExp)
|
|
18
|
+
inherits(BabelRegExp, RegExp);
|
|
19
19
|
|
|
20
20
|
BabelRegExp.prototype.exec = function (str) {
|
|
21
|
-
var result = _super.exec.call(this, str)
|
|
22
|
-
if (result) result.groups = buildGroups(result, this)
|
|
23
|
-
return result
|
|
24
|
-
}
|
|
21
|
+
var result = _super.exec.call(this, str);
|
|
22
|
+
if (result) result.groups = buildGroups(result, this);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
25
|
BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
|
|
26
26
|
if (typeof substitution === "string") {
|
|
27
|
-
var groups = _groups.get(this)
|
|
27
|
+
var groups = _groups.get(this);
|
|
28
28
|
return _super[Symbol.replace].call(
|
|
29
29
|
this,
|
|
30
30
|
str,
|
|
31
31
|
substitution.replace(/\$<([^>]+)>/g, function (_, name) {
|
|
32
|
-
return "$" + groups[name]
|
|
33
|
-
})
|
|
34
|
-
)
|
|
32
|
+
return "$" + groups[name];
|
|
33
|
+
})
|
|
34
|
+
);
|
|
35
35
|
} else if (typeof substitution === "function") {
|
|
36
|
-
var _this = this
|
|
36
|
+
var _this = this;
|
|
37
37
|
return _super[Symbol.replace].call(this, str, function () {
|
|
38
|
-
var args = arguments
|
|
38
|
+
var args = arguments;
|
|
39
39
|
// Modern engines already pass result.groups returned by exec() as the last arg.
|
|
40
40
|
if (typeof args[args.length - 1] !== "object") {
|
|
41
|
-
args = [].slice.call(args)
|
|
42
|
-
args.push(buildGroups(args, _this))
|
|
41
|
+
args = [].slice.call(args);
|
|
42
|
+
args.push(buildGroups(args, _this));
|
|
43
43
|
}
|
|
44
|
-
return substitution.apply(this, args)
|
|
45
|
-
})
|
|
44
|
+
return substitution.apply(this, args);
|
|
45
|
+
});
|
|
46
46
|
} else {
|
|
47
|
-
return _super[Symbol.replace].call(this, str, substitution)
|
|
47
|
+
return _super[Symbol.replace].call(this, str, substitution);
|
|
48
48
|
}
|
|
49
|
-
}
|
|
49
|
+
};
|
|
50
50
|
|
|
51
51
|
function buildGroups(result, re) {
|
|
52
52
|
// NOTE: This function should return undefined if there are no groups,
|
|
53
53
|
// but in that case Babel doesn't add the wrapper anyway.
|
|
54
54
|
|
|
55
|
-
var g = _groups.get(re)
|
|
55
|
+
var g = _groups.get(re);
|
|
56
56
|
return Object.keys(g).reduce(function (groups, name) {
|
|
57
|
-
groups[name] = result[g[name]]
|
|
58
|
-
return groups
|
|
59
|
-
}, Object.create(null))
|
|
57
|
+
groups[name] = result[g[name]];
|
|
58
|
+
return groups;
|
|
59
|
+
}, Object.create(null));
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
return _wrapRegExp.apply(this, arguments)
|
|
62
|
+
return _wrapRegExp.apply(this, arguments);
|
|
63
63
|
}
|
package/main.js
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
export { textToJavaScriptModule } from "./src/textToJavaScriptModule.js"
|
|
5
|
-
export { execute } from "./src/execute.js"
|
|
6
|
-
export { executeTestPlan } from "./src/executeTestPlan.js"
|
|
7
|
-
export { importUsingChildProcess } from "./src/importUsingChildProcess.js"
|
|
8
|
-
export { jsenvCoverageConfig } from "./src/jsenvCoverageConfig.js"
|
|
9
|
-
export { jsenvExplorableConfig } from "./src/jsenvExplorableConfig.js"
|
|
10
|
-
export { jsenvServiceWorkerFinalizer } from "./src/jsenvServiceWorkerFinalizer.js"
|
|
1
|
+
// dev
|
|
2
|
+
export { startDevServer } from "./src/dev_server.js"
|
|
3
|
+
// test
|
|
11
4
|
export {
|
|
12
5
|
chromiumRuntime,
|
|
13
6
|
chromiumTabRuntime,
|
|
@@ -15,7 +8,19 @@ export {
|
|
|
15
8
|
firefoxTabRuntime,
|
|
16
9
|
webkitRuntime,
|
|
17
10
|
webkitTabRuntime,
|
|
18
|
-
} from "./src/
|
|
19
|
-
export { nodeRuntime } from "./src/
|
|
20
|
-
export {
|
|
21
|
-
|
|
11
|
+
} from "./src/browser_runtimes.js"
|
|
12
|
+
export { nodeRuntime } from "./src/node_runtime.js"
|
|
13
|
+
export { executeTestPlan } from "./src/execute_test_plan.js"
|
|
14
|
+
// build
|
|
15
|
+
export { buildProject } from "./src/build_project.js"
|
|
16
|
+
|
|
17
|
+
// when project goes further than standard HTML/CSS/JS
|
|
18
|
+
export { commonJsToJsModule } from "./src/commonjs_to_js_module.js"
|
|
19
|
+
export { textToJsModule } from "./src/text_to_js_module.js"
|
|
20
|
+
export { jsonToJsModule } from "./src/json_to_js_module.js"
|
|
21
|
+
export { jsenvServiceWorkerFinalizer } from "./src/jsenv_service_worker_finalizer.js"
|
|
22
|
+
|
|
23
|
+
// not documented
|
|
24
|
+
export { execute } from "./src/execute.js"
|
|
25
|
+
export { importUsingChildProcess } from "./src/import_using_child_process.js"
|
|
26
|
+
export { requireUsingChildProcess } from "./src/require_using_child_process.js"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "26.0.1",
|
|
4
4
|
"description": "Tool to develop, test and build js projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"./packages/*"
|
|
33
33
|
],
|
|
34
34
|
"scripts": {
|
|
35
|
-
"eslint": "
|
|
36
|
-
"importmap": "node ./script/importmap/importmap.
|
|
37
|
-
"build": "node ./script/build/build.
|
|
38
|
-
"test": "node --experimental-import-meta-resolve ./script/test/test.
|
|
35
|
+
"eslint": "npx eslint . --ext=.js,.mjs,.cjs,.html",
|
|
36
|
+
"importmap": "node ./script/importmap/importmap.mjs",
|
|
37
|
+
"build": "node ./script/build/build.mjs",
|
|
38
|
+
"test": "node --experimental-import-meta-resolve ./script/test/test.mjs",
|
|
39
39
|
"test-with-coverage": "npm run test -- --coverage",
|
|
40
|
-
"dev": "node ./script/dev/start_dev_server.
|
|
41
|
-
"start_file_server": "node ./script/dev/start_file_server.
|
|
42
|
-
"performances": "node --expose-gc ./script/performance/generate_performance_report.
|
|
40
|
+
"dev": "node ./script/dev/start_dev_server.mjs",
|
|
41
|
+
"start_file_server": "node ./script/dev/start_file_server.mjs",
|
|
42
|
+
"performances": "node --expose-gc ./script/performance/generate_performance_report.mjs --log --once",
|
|
43
43
|
"file-size": "node ./script/file_size/file_size.mjs --log",
|
|
44
44
|
"prettier": "prettier --write .",
|
|
45
45
|
"playwright-install": "npx playwright install-deps && npx playwright install",
|
|
@@ -51,16 +51,16 @@
|
|
|
51
51
|
"playwright": "1.x"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@babel/core": "7.16.
|
|
55
|
-
"@babel/helper-module-imports": "7.16.
|
|
56
|
-
"@babel/helpers": "7.16.
|
|
57
|
-
"@babel/parser": "7.16.
|
|
58
|
-
"@babel/plugin-proposal-dynamic-import": "7.16.
|
|
54
|
+
"@babel/core": "7.16.12",
|
|
55
|
+
"@babel/helper-module-imports": "7.16.7",
|
|
56
|
+
"@babel/helpers": "7.16.7",
|
|
57
|
+
"@babel/parser": "7.16.12",
|
|
58
|
+
"@babel/plugin-proposal-dynamic-import": "7.16.7",
|
|
59
59
|
"@babel/plugin-syntax-dynamic-import": "7.8.3",
|
|
60
|
-
"@babel/plugin-syntax-import-assertions": "7.16.
|
|
60
|
+
"@babel/plugin-syntax-import-assertions": "7.16.7",
|
|
61
61
|
"@babel/plugin-syntax-import-meta": "7.10.4",
|
|
62
62
|
"@babel/plugin-syntax-numeric-separator": "7.10.4",
|
|
63
|
-
"@babel/plugin-transform-modules-systemjs": "7.16.
|
|
63
|
+
"@babel/plugin-transform-modules-systemjs": "7.16.7",
|
|
64
64
|
"@c88/v8-coverage": "0.1.1",
|
|
65
65
|
"@jsenv/abort": "4.1.2",
|
|
66
66
|
"@jsenv/filesystem": "2.7.1",
|
|
@@ -68,20 +68,21 @@
|
|
|
68
68
|
"@jsenv/integrity": "0.0.1",
|
|
69
69
|
"@jsenv/log": "1.5.0",
|
|
70
70
|
"@jsenv/logger": "4.0.1",
|
|
71
|
-
"@jsenv/server": "12.4.
|
|
71
|
+
"@jsenv/server": "12.4.2",
|
|
72
72
|
"@jsenv/uneval": "1.6.0",
|
|
73
73
|
"@rollup/plugin-commonjs": "21.0.1",
|
|
74
74
|
"@rollup/plugin-json": "4.1.0",
|
|
75
|
-
"@rollup/plugin-node-resolve": "13.1.
|
|
76
|
-
"@rollup/plugin-replace": "3.0.
|
|
75
|
+
"@rollup/plugin-node-resolve": "13.1.3",
|
|
76
|
+
"@rollup/plugin-replace": "3.0.1",
|
|
77
77
|
"acorn-import-assertions": "1.8.0",
|
|
78
78
|
"ansi-to-html": "0.7.2",
|
|
79
|
-
"bytes": "3.1.
|
|
79
|
+
"bytes": "3.1.2",
|
|
80
80
|
"cjs-module-lexer": "1.2.2",
|
|
81
|
-
"construct-style-sheets-polyfill": "3.0
|
|
82
|
-
"cssnano": "5.0.
|
|
83
|
-
"cssnano-preset-default": "5.1.
|
|
81
|
+
"construct-style-sheets-polyfill": "3.1.0",
|
|
82
|
+
"cssnano": "5.0.16",
|
|
83
|
+
"cssnano-preset-default": "5.1.11",
|
|
84
84
|
"cuid": "2.1.8",
|
|
85
|
+
"es-iife": "0.2.2",
|
|
85
86
|
"estree-walker": "3.0.1",
|
|
86
87
|
"html-minifier": "4.0.0",
|
|
87
88
|
"humanize-duration": "3.27.1",
|
|
@@ -89,15 +90,15 @@
|
|
|
89
90
|
"istanbul-lib-coverage": "3.2.0",
|
|
90
91
|
"istanbul-lib-instrument": "5.1.0",
|
|
91
92
|
"istanbul-lib-report": "3.0.0",
|
|
92
|
-
"istanbul-reports": "3.1.
|
|
93
|
+
"istanbul-reports": "3.1.3",
|
|
93
94
|
"magic-string": "0.25.7",
|
|
94
95
|
"parse5": "6.0.1",
|
|
95
96
|
"pidtree": "0.5.0",
|
|
96
97
|
"postcss": "8.4.5",
|
|
97
98
|
"postcss-value-parser": "4.2.0",
|
|
98
99
|
"regenerator-runtime": "0.13.9",
|
|
99
|
-
"resolve": "1.
|
|
100
|
-
"rollup": "2.
|
|
100
|
+
"resolve": "1.22.0",
|
|
101
|
+
"rollup": "2.66.1",
|
|
101
102
|
"rollup-plugin-node-builtins-brofs": "2.1.3",
|
|
102
103
|
"rollup-plugin-node-globals": "1.4.0",
|
|
103
104
|
"rollup-plugin-polyfill-node": "0.8.0",
|
|
@@ -105,42 +106,40 @@
|
|
|
105
106
|
"strip-ansi": "7.0.1",
|
|
106
107
|
"systemjs": "6.11.0",
|
|
107
108
|
"terser": "5.10.0",
|
|
108
|
-
"v8-to-istanbul": "8.1.
|
|
109
|
+
"v8-to-istanbul": "8.1.1",
|
|
109
110
|
"vm2": "3.9.5",
|
|
110
|
-
"why-is-node-running": "2.2.0",
|
|
111
111
|
"wrap-ansi": "8.0.1"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@babel/eslint-parser": "7.16.5",
|
|
115
|
-
"@babel/plugin-syntax-jsx": "7.16.
|
|
116
|
-
"@babel/plugin-transform-block-scoping": "7.16.
|
|
117
|
-
"@babel/plugin-transform-react-jsx": "7.16.
|
|
118
|
-
"@babel/plugin-transform-typescript": "7.16.
|
|
119
|
-
"@babel/preset-env": "7.16.
|
|
120
|
-
"@jsenv/assert": "2.5.
|
|
115
|
+
"@babel/plugin-syntax-jsx": "7.16.7",
|
|
116
|
+
"@babel/plugin-transform-block-scoping": "7.16.7",
|
|
117
|
+
"@babel/plugin-transform-react-jsx": "7.16.7",
|
|
118
|
+
"@babel/plugin-transform-typescript": "7.16.8",
|
|
119
|
+
"@babel/preset-env": "7.16.11",
|
|
120
|
+
"@jsenv/assert": "2.5.2",
|
|
121
121
|
"@jsenv/babel-preset": "1.1.2",
|
|
122
122
|
"@jsenv/eslint-config": "16.0.9",
|
|
123
|
-
"@jsenv/file-size-impact": "12.1.
|
|
123
|
+
"@jsenv/file-size-impact": "12.1.8",
|
|
124
124
|
"@jsenv/github-release-package": "1.3.4",
|
|
125
125
|
"@jsenv/https-local": "1.0.7",
|
|
126
126
|
"@jsenv/importmap-eslint-resolver": "5.2.5",
|
|
127
127
|
"@jsenv/importmap-node-module": "5.1.3",
|
|
128
128
|
"@jsenv/package-publish": "1.7.2",
|
|
129
|
-
"@jsenv/performance-impact": "2.2.
|
|
129
|
+
"@jsenv/performance-impact": "2.2.7",
|
|
130
130
|
"@jsenv/pwa": "4.0.1",
|
|
131
|
-
"babel-plugin-transform-async-to-promises": "0.8.
|
|
132
|
-
"eslint": "
|
|
131
|
+
"babel-plugin-transform-async-to-promises": "0.8.18",
|
|
132
|
+
"eslint": "8.8.0",
|
|
133
133
|
"eslint-plugin-html": "6.2.0",
|
|
134
|
-
"eslint-plugin-import": "2.25.
|
|
135
|
-
"eslint-plugin-react": "7.
|
|
134
|
+
"eslint-plugin-import": "2.25.4",
|
|
135
|
+
"eslint-plugin-react": "7.28.0",
|
|
136
136
|
"node-notifier": "10.0.0",
|
|
137
|
-
"playwright": "1.
|
|
137
|
+
"playwright": "1.18.1",
|
|
138
138
|
"postcss-import": "14.0.2",
|
|
139
|
-
"preact": "10.6.
|
|
139
|
+
"preact": "10.6.5",
|
|
140
140
|
"prettier": "2.5.1",
|
|
141
141
|
"react": "17.0.2",
|
|
142
142
|
"react-dom": "17.0.2",
|
|
143
|
-
"redux": "4.1.2"
|
|
144
|
-
"rollup-plugin-import-assert": "1.1.1"
|
|
143
|
+
"redux": "4.1.2"
|
|
145
144
|
}
|
|
146
145
|
}
|
package/readme.md
CHANGED
|
@@ -12,7 +12,7 @@ This section demos 3 things jsenv provides:
|
|
|
12
12
|
2. A dev server
|
|
13
13
|
3. A build script
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
The upcoming demos applies jsenv to simple use cases to make them straightforward.
|
|
16
16
|
|
|
17
17
|
## Test runner overview
|
|
18
18
|
|
|
@@ -216,19 +216,16 @@ await buildProject({
|
|
|
216
216
|
> node ./build.mjs
|
|
217
217
|
|
|
218
218
|
building ./main.html...
|
|
219
|
-
--- files
|
|
220
|
-
dist/assets/
|
|
221
|
-
dist/assets/
|
|
222
|
-
dist/
|
|
223
|
-
dist/main.prod.html (
|
|
224
|
-
dist/project_b237a334.importmap (29 B)
|
|
225
|
-
--- sourcemap files in the build: 2 ---
|
|
226
|
-
dist/assets/main_3b329ff0.css.map (198 B)
|
|
227
|
-
dist/main_3b329ff0.js.map (55Kb B)
|
|
219
|
+
--- build files (excluding sourcemap files) ---
|
|
220
|
+
dist/assets/favicon_25e95a00.ico (6.67 KB)
|
|
221
|
+
dist/assets/main_cd3a5025.css (70 B)
|
|
222
|
+
dist/main_c588dd03.js (167 B)
|
|
223
|
+
dist/main.prod.html (886 B)
|
|
228
224
|
------- build summary -------
|
|
229
|
-
project files:
|
|
230
|
-
build files:
|
|
231
|
-
build
|
|
225
|
+
project files: 5 (70.32 KB)
|
|
226
|
+
build files: 4 (45.77 KB)
|
|
227
|
+
build sourcemap files: 2 (705 B)
|
|
228
|
+
build duration: 0.14 seconds
|
|
232
229
|
------------------------------
|
|
233
230
|
✔ build end
|
|
234
231
|
```
|
|
@@ -241,14 +238,20 @@ build duration: 1.85 seconds
|
|
|
241
238
|
<head>
|
|
242
239
|
<title>Title</title>
|
|
243
240
|
<meta charset="utf-8" />
|
|
244
|
-
<link rel="modulepreload" href="
|
|
245
|
-
<link rel="icon" href="assets/
|
|
246
|
-
<script type="importmap"
|
|
247
|
-
|
|
241
|
+
<link rel="modulepreload" href="main_c588dd03.js" />
|
|
242
|
+
<link rel="icon" href="assets/favicon_25e95a00.ico" />
|
|
243
|
+
<script type="importmap">
|
|
244
|
+
{
|
|
245
|
+
"imports": {
|
|
246
|
+
"./main.js": "./main_c588dd03.js"
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
</script>
|
|
250
|
+
<link rel="stylesheet" type="text/css" href="assets/main_cd3a5025.css" />
|
|
248
251
|
</head>
|
|
249
252
|
|
|
250
253
|
<body>
|
|
251
|
-
<script type="module" src="./
|
|
254
|
+
<script type="module" src="./main_c588dd03.js"></script>
|
|
252
255
|
</body>
|
|
253
256
|
</html>
|
|
254
257
|
```
|
|
@@ -288,11 +291,6 @@ _jsenv.config.mjs_ is meant to share configuration, other files will simply impo
|
|
|
288
291
|
import { buildProject } from '@jsenv/core'
|
|
289
292
|
|
|
290
293
|
+ import { projectDirectoryUrl } from "./jsenv.config.mjs"
|
|
291
|
-
|
|
292
|
-
await buildProject({
|
|
293
|
-
- projectDirectoryUrl: new URL('./', import.meta.url)
|
|
294
|
-
+ projectDirectoryUrl
|
|
295
|
-
})
|
|
296
294
|
```
|
|
297
295
|
|
|
298
296
|
> We recommend to use ".mjs" extension when a file is written for Node.js but you can name the file as you want, "jsenv.config.js" is fine too.
|
|
@@ -321,10 +319,10 @@ Jsenv relies on **standard web features**. Each standard listed below is potenti
|
|
|
321
319
|
|
|
322
320
|
- `<script type="module">`
|
|
323
321
|
- `<script type="importmap">`
|
|
324
|
-
- top level await
|
|
325
|
-
- import.meta.url
|
|
326
322
|
- dynamic imports
|
|
323
|
+
- import.meta.url
|
|
327
324
|
- import assertions
|
|
325
|
+
- top level await
|
|
328
326
|
|
|
329
327
|
## When to use it?
|
|
330
328
|
|
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
import { createRuntimeFromPlaywright } from "@jsenv/core/src/internal/browser_launcher/from_playwright.js"
|
|
2
|
-
import {
|
|
3
|
-
PLAYWRIGHT_CHROMIUM_VERSION,
|
|
4
|
-
PLAYWRIGHT_FIREFOX_VERSION,
|
|
5
|
-
PLAYWRIGHT_WEBKIT_VERSION,
|
|
6
|
-
} from "./playwright_browser_versions.js"
|
|
7
2
|
|
|
8
3
|
export const chromiumRuntime = createRuntimeFromPlaywright({
|
|
9
4
|
browserName: "chromium",
|
|
10
|
-
browserVersion:
|
|
5
|
+
browserVersion: "97.0.4666.0",
|
|
11
6
|
coveragePlaywrightAPIAvailable: true,
|
|
12
7
|
})
|
|
13
8
|
export const chromiumTabRuntime = chromiumRuntime.tab
|
|
14
9
|
|
|
15
10
|
export const firefoxRuntime = createRuntimeFromPlaywright({
|
|
16
11
|
browserName: "firefox",
|
|
17
|
-
browserVersion:
|
|
12
|
+
browserVersion: "93.0",
|
|
18
13
|
})
|
|
19
14
|
export const firefoxTabRuntime = firefoxRuntime.tab
|
|
20
15
|
|
|
21
16
|
export const webkitRuntime = createRuntimeFromPlaywright({
|
|
22
17
|
browserName: "webkit",
|
|
23
|
-
browserVersion:
|
|
18
|
+
browserVersion: "15.4",
|
|
24
19
|
ignoreErrorHook: (error) => {
|
|
25
20
|
// we catch error during execution but safari throw unhandled rejection
|
|
26
21
|
// in a non-deterministic way.
|
|
@@ -5,9 +5,9 @@ import { Abort, raceProcessTeardownEvents } from "@jsenv/abort"
|
|
|
5
5
|
import {
|
|
6
6
|
assertProjectDirectoryUrl,
|
|
7
7
|
assertProjectDirectoryExists,
|
|
8
|
-
} from "@jsenv/core/src/internal/
|
|
9
|
-
import { startCompileServer } from "@jsenv/core/src/internal/
|
|
10
|
-
import { buildUsingRollup } from "@jsenv/core/src/internal/building/
|
|
8
|
+
} from "@jsenv/core/src/internal/jsenv_params_assertions.js"
|
|
9
|
+
import { startCompileServer } from "@jsenv/core/src/internal/compile_server/compile_server.js"
|
|
10
|
+
import { buildUsingRollup } from "@jsenv/core/src/internal/building/build_using_rollup.js"
|
|
11
11
|
import {
|
|
12
12
|
jsenvBrowserRuntimeSupport,
|
|
13
13
|
jsenvNodeRuntimeSupport,
|
|
@@ -38,11 +38,7 @@ export const buildProject = async ({
|
|
|
38
38
|
|
|
39
39
|
projectDirectoryUrl,
|
|
40
40
|
entryPoints,
|
|
41
|
-
workers = [],
|
|
42
|
-
serviceWorkers = [],
|
|
43
41
|
serviceWorkerFinalizer,
|
|
44
|
-
classicWorkers = [],
|
|
45
|
-
classicServiceWorkers = [],
|
|
46
42
|
importMapInWebWorkers = false,
|
|
47
43
|
buildDirectoryRelativeUrl,
|
|
48
44
|
buildDirectoryClean = true,
|
|
@@ -53,8 +49,9 @@ export const buildProject = async ({
|
|
|
53
49
|
|
|
54
50
|
format,
|
|
55
51
|
systemJsUrl,
|
|
56
|
-
globalName,
|
|
57
52
|
globals = {},
|
|
53
|
+
preservedDynamicImports = {},
|
|
54
|
+
|
|
58
55
|
babelPluginMap = {},
|
|
59
56
|
customCompilers,
|
|
60
57
|
runtimeSupport = format === "global" ||
|
|
@@ -95,7 +92,6 @@ export const buildProject = async ({
|
|
|
95
92
|
// https://github.com/cssnano/cssnano/tree/master/packages/cssnano-preset-default
|
|
96
93
|
minifyCssOptions,
|
|
97
94
|
|
|
98
|
-
env = {},
|
|
99
95
|
protocol,
|
|
100
96
|
privateKey,
|
|
101
97
|
certificate,
|
|
@@ -184,11 +180,8 @@ export const buildProject = async ({
|
|
|
184
180
|
certificate,
|
|
185
181
|
ip,
|
|
186
182
|
port,
|
|
187
|
-
env,
|
|
188
183
|
|
|
189
184
|
babelPluginMap,
|
|
190
|
-
workers,
|
|
191
|
-
serviceWorkers,
|
|
192
185
|
runtimeSupport,
|
|
193
186
|
customCompilers,
|
|
194
187
|
preservedUrls: {
|
|
@@ -252,13 +245,9 @@ export const buildProject = async ({
|
|
|
252
245
|
|
|
253
246
|
format,
|
|
254
247
|
systemJsUrl,
|
|
255
|
-
globalName,
|
|
256
248
|
globals,
|
|
257
|
-
|
|
258
|
-
serviceWorkers,
|
|
249
|
+
preservedDynamicImports,
|
|
259
250
|
serviceWorkerFinalizer,
|
|
260
|
-
classicWorkers,
|
|
261
|
-
classicServiceWorkers,
|
|
262
251
|
|
|
263
252
|
node,
|
|
264
253
|
browser,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { urlToFileSystemPath, resolveUrl } from "@jsenv/filesystem"
|
|
2
2
|
|
|
3
|
-
import { generateSourcemapUrl } from "@jsenv/core/src/internal/
|
|
4
|
-
import {
|
|
5
|
-
import { rollupPluginCommonJsNamedExports } from "@jsenv/core/src/internal/
|
|
3
|
+
import { generateSourcemapUrl } from "@jsenv/core/src/internal/sourcemap_utils.js"
|
|
4
|
+
import { asCompilationResult } from "@jsenv/core/src/internal/compile_server/jsenv_directory/compilation_result.js"
|
|
5
|
+
import { rollupPluginCommonJsNamedExports } from "@jsenv/core/src/internal/compile_server/commonjs/rollup_plugin_commonjs_named_exports.js"
|
|
6
6
|
|
|
7
|
-
export const
|
|
7
|
+
export const commonJsToJsModule = async ({
|
|
8
8
|
logger,
|
|
9
9
|
projectDirectoryUrl,
|
|
10
10
|
jsenvRemoteDirectory,
|
|
@@ -157,7 +157,7 @@ export const commonJsToJavaScriptModule = async ({
|
|
|
157
157
|
const { output } = await rollupBuild.generate(generateOptions)
|
|
158
158
|
const { code, map } = output[0]
|
|
159
159
|
|
|
160
|
-
return
|
|
160
|
+
return asCompilationResult(
|
|
161
161
|
{
|
|
162
162
|
contentType: "application/javascript",
|
|
163
163
|
code,
|
package/src/dev_server.js
CHANGED
|
@@ -7,20 +7,24 @@ import {
|
|
|
7
7
|
|
|
8
8
|
import { REDIRECTOR_BUILD_URL } from "@jsenv/core/dist/build_manifest.js"
|
|
9
9
|
import { setUrlSearchParamsDescriptor } from "@jsenv/core/src/internal/url_utils.js"
|
|
10
|
-
import { jsenvCoreDirectoryUrl } from "./internal/jsenvCoreDirectoryUrl.js"
|
|
11
10
|
import {
|
|
12
11
|
assertProjectDirectoryUrl,
|
|
13
12
|
assertProjectDirectoryExists,
|
|
14
|
-
} from "
|
|
13
|
+
} from "@jsenv/core/src/internal/jsenv_params_assertions.js"
|
|
15
14
|
import {
|
|
16
15
|
startCompileServer,
|
|
17
16
|
assertAndNormalizeJsenvDirectoryRelativeUrl,
|
|
18
|
-
} from "./internal/
|
|
17
|
+
} from "./internal/compile_server/compile_server.js"
|
|
19
18
|
import {
|
|
19
|
+
jsenvCoreDirectoryUrl,
|
|
20
20
|
sourcemapMainFileInfo,
|
|
21
21
|
sourcemapMappingFileInfo,
|
|
22
|
-
} from "./
|
|
23
|
-
|
|
22
|
+
} from "./jsenv_file_urls.js"
|
|
23
|
+
|
|
24
|
+
const EXPLORING_HTML_URL = new URL(
|
|
25
|
+
"./src/internal/dev_server/exploring/exploring.html",
|
|
26
|
+
jsenvCoreDirectoryUrl,
|
|
27
|
+
).href
|
|
24
28
|
|
|
25
29
|
export const startDevServer = async ({
|
|
26
30
|
signal = new AbortController().signal,
|
|
@@ -35,7 +39,15 @@ export const startDevServer = async ({
|
|
|
35
39
|
customServices,
|
|
36
40
|
|
|
37
41
|
projectDirectoryUrl,
|
|
38
|
-
explorableConfig =
|
|
42
|
+
explorableConfig = {
|
|
43
|
+
source: {
|
|
44
|
+
"./*.html": true,
|
|
45
|
+
"./src/**/*.html": true,
|
|
46
|
+
},
|
|
47
|
+
test: {
|
|
48
|
+
"./test/**/*.html": true,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
39
51
|
mainFileRelativeUrl,
|
|
40
52
|
jsenvDirectoryRelativeUrl,
|
|
41
53
|
jsenvToolbar = true,
|
|
@@ -67,10 +79,7 @@ export const startDevServer = async ({
|
|
|
67
79
|
await assertProjectDirectoryExists({ projectDirectoryUrl })
|
|
68
80
|
if (mainFileRelativeUrl === undefined) {
|
|
69
81
|
mainFileRelativeUrl = urlToRelativeUrl(
|
|
70
|
-
|
|
71
|
-
"./src/internal/dev_server/exploring/exploring.html",
|
|
72
|
-
jsenvCoreDirectoryUrl,
|
|
73
|
-
).href,
|
|
82
|
+
EXPLORING_HTML_URL,
|
|
74
83
|
projectDirectoryUrl,
|
|
75
84
|
)
|
|
76
85
|
}
|
package/src/execute.js
CHANGED
|
@@ -4,9 +4,9 @@ import { normalizeRuntimeSupport } from "@jsenv/core/src/internal/runtime_suppor
|
|
|
4
4
|
import {
|
|
5
5
|
assertProjectDirectoryUrl,
|
|
6
6
|
assertProjectDirectoryExists,
|
|
7
|
-
} from "
|
|
8
|
-
import { startCompileServer } from "./internal/
|
|
9
|
-
import { launchAndExecute } from "./internal/executing/
|
|
7
|
+
} from "@jsenv/core/src/internal/jsenv_params_assertions.js"
|
|
8
|
+
import { startCompileServer } from "./internal/compile_server/compile_server.js"
|
|
9
|
+
import { launchAndExecute } from "./internal/executing/launch_and_execute.js"
|
|
10
10
|
|
|
11
11
|
export const execute = async ({
|
|
12
12
|
signal = new AbortController().signal,
|
|
@@ -11,13 +11,11 @@ import { createLogger, createDetailedMessage } from "@jsenv/logger"
|
|
|
11
11
|
import {
|
|
12
12
|
assertProjectDirectoryUrl,
|
|
13
13
|
assertProjectDirectoryExists,
|
|
14
|
-
} from "
|
|
15
|
-
import { executePlan } from "./internal/executing/
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { generateCoverageTextLog } from "./internal/executing/coverage_reporter/coverage_reporter_text_log.js"
|
|
20
|
-
import { jsenvCoverageConfig } from "./jsenvCoverageConfig.js"
|
|
14
|
+
} from "@jsenv/core/src/internal/jsenv_params_assertions.js"
|
|
15
|
+
import { executePlan } from "./internal/executing/execute_plan.js"
|
|
16
|
+
import { generateCoverageJsonFile } from "./internal/coverage/coverage_reporter_json_file.js"
|
|
17
|
+
import { generateCoverageHtmlDirectory } from "./internal/coverage/coverage_reporter_html_directory.js"
|
|
18
|
+
import { generateCoverageTextLog } from "./internal/coverage/coverage_reporter_text_log.js"
|
|
21
19
|
|
|
22
20
|
/**
|
|
23
21
|
* Execute a list of files and log how it goes
|
|
@@ -72,7 +70,13 @@ export const executeTestPlan = async ({
|
|
|
72
70
|
coverage = process.argv.includes("--cover") ||
|
|
73
71
|
process.argv.includes("--coverage"),
|
|
74
72
|
coverageTempDirectoryRelativeUrl = "./coverage/tmp/",
|
|
75
|
-
coverageConfig =
|
|
73
|
+
coverageConfig = {
|
|
74
|
+
"./index.js": true,
|
|
75
|
+
"./main.js": true,
|
|
76
|
+
"./src/**/*.js": true,
|
|
77
|
+
"./**/*.test.*": false, // contains .test. -> nope
|
|
78
|
+
"./**/test/": false, // inside a test folder -> nope,
|
|
79
|
+
},
|
|
76
80
|
coverageIncludeMissing = true,
|
|
77
81
|
coverageAndExecutionAllowed = false,
|
|
78
82
|
coverageForceIstanbul = false,
|
|
@@ -206,7 +210,10 @@ export const executeTestPlan = async ({
|
|
|
206
210
|
importMapInWebWorkers,
|
|
207
211
|
customCompilers,
|
|
208
212
|
})
|
|
209
|
-
if (
|
|
213
|
+
if (
|
|
214
|
+
updateProcessExitCode &&
|
|
215
|
+
result.planSummary.executionCount !== result.planSummary.completedCount
|
|
216
|
+
) {
|
|
210
217
|
process.exitCode = 1
|
|
211
218
|
}
|
|
212
219
|
const planCoverage = result.planCoverage
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { launchAndExecute } from "./internal/executing/
|
|
2
|
-
import { createControllableNodeProcess } from "./internal/node_launcher/
|
|
1
|
+
import { launchAndExecute } from "./internal/executing/launch_and_execute.js"
|
|
2
|
+
import { createControllableNodeProcess } from "./internal/node_launcher/node_controllable_process.js"
|
|
3
3
|
|
|
4
4
|
export const importUsingChildProcess = async (
|
|
5
5
|
fileUrl,
|