@jsenv/plugin-transpilation 1.4.8 → 1.4.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/plugin-transpilation",
3
- "version": "1.4.8",
3
+ "version": "1.4.10",
4
4
  "description": "TODO",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -51,8 +51,8 @@
51
51
  "@babel/plugin-transform-template-literals": "7.24.7",
52
52
  "@babel/plugin-transform-typeof-symbol": "7.24.8",
53
53
  "@babel/plugin-transform-unicode-regex": "7.24.7",
54
- "@jsenv/ast": "6.2.4",
55
- "@jsenv/js-module-fallback": "1.3.25",
54
+ "@jsenv/ast": "6.2.6",
55
+ "@jsenv/js-module-fallback": "1.3.27",
56
56
  "@jsenv/runtime-compat": "1.3.0",
57
57
  "babel-plugin-transform-async-to-promises": "0.8.18",
58
58
  "construct-style-sheets-polyfill": "3.1.0",
@@ -1,9 +1,9 @@
1
- import { pathToFileURL } from "node:url";
2
1
  import { injectJsImport } from "@jsenv/ast";
2
+ import { pathToFileURL } from "node:url";
3
3
 
4
4
  import {
5
- getBabelHelperFileUrl,
6
5
  babelHelperNameFromUrl,
6
+ getBabelHelperFileUrl,
7
7
  } from "./babel_helper_directory/babel_helper_directory.js";
8
8
 
9
9
  // named import approach found here:
@@ -1,12 +1,12 @@
1
1
  import { applyBabelPlugins } from "@jsenv/ast";
2
2
 
3
- import { getBaseBabelPluginStructure } from "./babel_plugin_structure.js";
4
3
  import { babelPluginBabelHelpersAsJsenvImports } from "./babel_plugin_babel_helpers_as_jsenv_imports.js";
5
- import { analyzeRegeneratorRuntimeUsage } from "./regenerator_runtime/regenerator_runtime_usage.js";
4
+ import { getBaseBabelPluginStructure } from "./babel_plugin_structure.js";
5
+ import { babelPluginNewStylesheetInjector } from "./new_stylesheet/babel_plugin_new_stylesheet_injector.js";
6
+ import { analyzeConstructableStyleSheetUsage } from "./new_stylesheet/constructable_stylesheet_usage.js";
6
7
  import { babelPluginRegeneratorRuntimeInjector } from "./regenerator_runtime/babel_plugin_regenerator_runtime_injector.js";
7
8
  import { regeneratorRuntimeClientFileUrl } from "./regenerator_runtime/regenerator_runtime_client_file_url.js";
8
- import { analyzeConstructableStyleSheetUsage } from "./new_stylesheet/constructable_stylesheet_usage.js";
9
- import { babelPluginNewStylesheetInjector } from "./new_stylesheet/babel_plugin_new_stylesheet_injector.js";
9
+ import { analyzeRegeneratorRuntimeUsage } from "./regenerator_runtime/regenerator_runtime_usage.js";
10
10
 
11
11
  export const jsenvPluginBabel = ({ babelHelpersAsImport = true } = {}) => {
12
12
  const transformWithBabel = async (urlInfo) => {
@@ -1,5 +1,5 @@
1
- import { readFileSync } from "node:fs";
2
1
  import { injectJsImport } from "@jsenv/ast";
2
+ import { readFileSync } from "node:fs";
3
3
 
4
4
  export const injectSideEffectFileIntoBabelAst = ({
5
5
  programPath,
@@ -10,7 +10,7 @@
10
10
  * But for now (as it is simpler) we let the browser throw the error
11
11
  */
12
12
 
13
- import { urlToFilename, injectQueryParams } from "@jsenv/urls";
13
+ import { injectQueryParams, urlToFilename } from "@jsenv/urls";
14
14
  import { JS_QUOTES } from "@jsenv/utils/src/string/js_quotes.js";
15
15
 
16
16
  export const jsenvPluginImportAttributes = ({
@@ -1,5 +1,5 @@
1
- import { createMagicSource } from "@jsenv/sourcemap";
2
1
  import { parseJsUrls } from "@jsenv/ast";
2
+ import { createMagicSource } from "@jsenv/sourcemap";
3
3
 
4
4
  export const jsenvPluginImportMetaResolve = ({ needJsModuleFallback }) => {
5
5
  return {
@@ -3,11 +3,11 @@
3
3
  * - perform conversion from js module to js classic when url uses "?js_module_fallback"
4
4
  */
5
5
 
6
- import { urlToFilename, injectQueryParams } from "@jsenv/urls";
7
6
  import {
8
7
  convertJsModuleToJsClassic,
9
8
  systemJsClientFileUrlDefault,
10
9
  } from "@jsenv/js-module-fallback";
10
+ import { injectQueryParams, urlToFilename } from "@jsenv/urls";
11
11
 
12
12
  export const jsenvPluginJsModuleConversion = ({ remapImportSpecifier }) => {
13
13
  const isReferencingJsModule = (reference) => {
@@ -1,7 +1,7 @@
1
+ import { jsenvPluginImportMetaResolve } from "./jsenv_plugin_import_meta_resolve.js";
1
2
  import { jsenvPluginJsModuleConversion } from "./jsenv_plugin_js_module_conversion.js";
2
3
  import { jsenvPluginJsModuleFallbackInsideHtml } from "./jsenv_plugin_js_module_fallback_inside_html.js";
3
4
  import { jsenvPluginJsModuleFallbackOnWorkers } from "./jsenv_plugin_js_module_fallback_on_workers.js";
4
- import { jsenvPluginImportMetaResolve } from "./jsenv_plugin_import_meta_resolve.js";
5
5
  import { jsenvPluginTopLevelAwait } from "./jsenv_plugin_top_level_await.js";
6
6
 
7
7
  export const jsenvPluginJsModuleFallback = ({ remapImportSpecifier } = {}) => {
@@ -5,16 +5,16 @@
5
5
  * - <link rel="modulepreload"> are converted to <link rel="preload">
6
6
  */
7
7
 
8
- import { injectQueryParams } from "@jsenv/urls";
9
8
  import {
10
- parseHtml,
11
- visitHtmlNodes,
12
- stringifyHtmlAst,
13
- getHtmlNodeAttribute,
14
- setHtmlNodeAttributes,
15
9
  analyzeScriptNode,
10
+ getHtmlNodeAttribute,
16
11
  getHtmlNodeText,
12
+ parseHtml,
13
+ setHtmlNodeAttributes,
14
+ stringifyHtmlAst,
15
+ visitHtmlNodes,
17
16
  } from "@jsenv/ast";
17
+ import { injectQueryParams } from "@jsenv/urls";
18
18
 
19
19
  export const jsenvPluginJsModuleFallbackInsideHtml = ({
20
20
  needJsModuleFallback,
@@ -1,5 +1,5 @@
1
- import { createRequire } from "node:module";
2
1
  import { applyBabelPlugins } from "@jsenv/ast";
2
+ import { createRequire } from "node:module";
3
3
 
4
4
  const require = createRequire(import.meta.url);
5
5
 
@@ -7,11 +7,11 @@
7
7
  * of this plugin
8
8
  */
9
9
 
10
- import { jsenvPluginImportAttributes } from "./import_attributes/jsenv_plugin_import_attributes.js";
11
- import { jsenvPluginBabel } from "./babel/jsenv_plugin_babel.js";
12
- import { jsenvPluginJsModuleFallback } from "./js_module_fallback/jsenv_plugin_js_module_fallback.js";
13
10
  import { jsenvPluginAsJsModule } from "./as_js_module/jsenv_plugin_as_js_module.js";
11
+ import { jsenvPluginBabel } from "./babel/jsenv_plugin_babel.js";
14
12
  import { jsenvPluginCssTranspilation } from "./css/jsenv_plugin_css_transpilation.js";
13
+ import { jsenvPluginImportAttributes } from "./import_attributes/jsenv_plugin_import_attributes.js";
14
+ import { jsenvPluginJsModuleFallback } from "./js_module_fallback/jsenv_plugin_js_module_fallback.js";
15
15
 
16
16
  export const jsenvPluginTranspilation = ({
17
17
  importAttributes = true,
package/src/main.js CHANGED
@@ -1,2 +1,2 @@
1
- export { jsenvPluginTranspilation } from "./jsenv_plugin_transpilation.js";
2
1
  export { jsenvPluginJsModuleFallback } from "./js_module_fallback/jsenv_plugin_js_module_fallback.js";
2
+ export { jsenvPluginTranspilation } from "./jsenv_plugin_transpilation.js";