@jsenv/core 30.3.6 → 30.3.8

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.
Files changed (23) hide show
  1. package/dist/js/babel_plugin_transform_modules_systemjs.cjs +392 -0
  2. package/dist/main.js +92 -38
  3. package/package.json +2 -2
  4. package/src/build/build.js +1 -1
  5. package/src/kitchen/kitchen.js +4 -1
  6. package/src/plugins/autoreload/jsenv_plugin_autoreload_client.js +1 -1
  7. package/src/plugins/import_meta_hot/html_hot_dependencies.js +1 -1
  8. package/src/plugins/importmap/jsenv_plugin_importmap.js +1 -1
  9. package/src/plugins/inline/jsenv_plugin_html_inline_content.js +37 -6
  10. package/src/plugins/inline/jsenv_plugin_inline_query_param.js +2 -1
  11. package/src/plugins/ribbon/jsenv_plugin_ribbon.js +1 -1
  12. package/src/plugins/server_events/jsenv_plugin_server_events_client_injection.js +1 -1
  13. package/src/plugins/server_events/server_events_dispatcher.js +11 -2
  14. package/src/plugins/supervisor/jsenv_plugin_supervisor.js +3 -2
  15. package/src/plugins/transpilation/as_js_classic/babel_plugin_transform_modules_systemjs.cjs +608 -0
  16. package/src/plugins/transpilation/as_js_classic/convert_js_module_to_js_classic.js +31 -1
  17. package/src/plugins/transpilation/as_js_classic/jsenv_plugin_as_js_classic.js +0 -13
  18. package/src/plugins/transpilation/as_js_classic/jsenv_plugin_as_js_classic_conversion.js +1 -0
  19. package/src/plugins/transpilation/as_js_classic/jsenv_plugin_as_js_classic_html.js +3 -3
  20. package/src/plugins/transpilation/as_js_classic/jsenv_plugin_as_js_classic_library.js +1 -0
  21. package/src/plugins/url_analysis/html/html_urls.js +2 -2
  22. package/src/plugins/url_analysis/jsenv_plugin_reference_expected_types.js +1 -1
  23. package/src/plugins/url_resolution/jsenv_plugin_url_resolution.js +2 -1
@@ -47,7 +47,7 @@ export const jsenvPluginAsJsClassicHtml = ({
47
47
  }
48
48
  return null
49
49
  },
50
- script_src: (reference, context) => {
50
+ script: (reference, context) => {
51
51
  if (
52
52
  context.systemJsTranspilation &&
53
53
  reference.expectedType === "js_module"
@@ -117,7 +117,7 @@ export const jsenvPluginAsJsClassicHtml = ({
117
117
  const reference = context.referenceUtils.find(
118
118
  (ref) =>
119
119
  ref.generatedSpecifier === src &&
120
- ref.type === "script_src" &&
120
+ ref.type === "script" &&
121
121
  ref.subtype === "js_module",
122
122
  )
123
123
  if (!reference) {
@@ -192,7 +192,7 @@ export const jsenvPluginAsJsClassicHtml = ({
192
192
  }
193
193
  const [systemJsReference, systemJsUrlInfo] =
194
194
  context.referenceUtils.inject({
195
- type: "script_src",
195
+ type: "script",
196
196
  expectedType: "js_classic",
197
197
  isInline: true,
198
198
  contentType: "text/javascript",
@@ -74,6 +74,7 @@ export const jsenvPluginAsJsClassicLibrary = ({
74
74
  })
75
75
  }
76
76
  const { content, sourcemap } = await convertJsModuleToJsClassic({
77
+ rootDirectoryUrl: context.rootDirectoryUrl,
77
78
  systemJsInjection,
78
79
  systemJsClientFileUrl,
79
80
  urlInfo,
@@ -212,7 +212,7 @@ const visitHtmlUrls = ({ url, htmlAst }) => {
212
212
  return
213
213
  }
214
214
  visitAttributeAsUrlSpecifier({
215
- type: "script_src",
215
+ type: "script",
216
216
  subtype: type,
217
217
  expectedType: type,
218
218
  node,
@@ -301,7 +301,7 @@ const decideLinkExpectedType = (linkMention, mentions) => {
301
301
  const firstScriptOnThisUrl = mentions.find(
302
302
  (mentionCandidate) =>
303
303
  mentionCandidate.url === linkMention.url &&
304
- mentionCandidate.type === "script_src",
304
+ mentionCandidate.type === "script",
305
305
  )
306
306
  if (firstScriptOnThisUrl) {
307
307
  return firstScriptOnThisUrl.expectedType
@@ -44,7 +44,7 @@ export const jsenvPluginReferenceExpectedTypes = () => {
44
44
  name: "jsenv:reference_expected_types",
45
45
  appliesDuring: "*",
46
46
  redirectUrl: {
47
- script_src: redirectJsUrls,
47
+ script: redirectJsUrls,
48
48
  js_url: redirectJsUrls,
49
49
  js_import: redirectJsUrls,
50
50
  },
@@ -8,7 +8,8 @@
8
8
  * - "http_request"
9
9
  * - "entry_point"
10
10
  * - "link_href"
11
- * - "script_src"
11
+ * - "style"
12
+ * - "script"
12
13
  * - "a_href"
13
14
  * - "iframe_src
14
15
  * - "img_src"