@powerlines/plugin-babel 0.12.401 → 0.12.403

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.
@@ -1 +1 @@
1
- {"version":3,"file":"module-helpers.mjs","names":[],"sources":["../../src/helpers/module-helpers.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { NodePath } from \"@babel/core\";\nimport { ParseResult } from \"@babel/parser\";\nimport * as t from \"@babel/types\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { ImportSpecifier } from \"../types/config\";\nimport { parseAst } from \"./ast-utils\";\n\n/**\n * Finds an export in the given Babel AST program by its key.\n *\n * @param ast - The parsed Babel AST result containing the program body.\n * @param key - The name of the export to find (e.g., \"default\" or a named export).\n * @returns The declaration of the export if found, otherwise undefined.\n */\nexport function findExport(ast: ParseResult<t.File>, key: string) {\n const type =\n key === \"default\" ? \"ExportDefaultDeclaration\" : \"ExportNamedDeclaration\";\n\n for (const node of ast.program.body) {\n if (node.type === type) {\n if (key === \"default\") {\n return node.declaration;\n }\n if (node.declaration && \"declarations\" in node.declaration) {\n const declaration = node.declaration.declarations[0];\n if (\n declaration &&\n \"name\" in declaration.id &&\n declaration.id.name === key\n ) {\n return declaration.init as any;\n }\n }\n }\n }\n}\n\n/**\n * Lists all exports from the given Babel AST program.\n *\n * @param codeOrAst - The parsed Babel AST result containing the program body.\n * @returns An array of export names, including \"default\" for default exports.\n */\nexport function listExports(codeOrAst: ParseResult<t.File> | string) {\n const ast = isString(codeOrAst) ? parseAst(codeOrAst) : codeOrAst;\n\n return ast.program.body\n .flatMap(i => {\n if (i.type === \"ExportDefaultDeclaration\") {\n return [\"default\"];\n }\n if (\n i.type === \"ExportNamedDeclaration\" &&\n i.declaration &&\n \"declarations\" in i.declaration\n ) {\n return i.declaration.declarations.map(d =>\n \"name\" in d.id ? d.id.name : \"\"\n );\n }\n return [];\n })\n .filter(Boolean);\n}\n\n/**\n * Lists all imports from the given Babel AST program.\n *\n * @param ast - The parsed Babel AST result containing the program body.\n * @returns An array of import names, including \"default\" for default imports.\n */\nexport function listImports(ast: ParseResult<t.File> | t.File) {\n return ast.program.body\n .flatMap(i => {\n if (i.type === \"ImportDeclaration\") {\n return i.specifiers.map(s => {\n if (s.type === \"ImportDefaultSpecifier\") {\n return \"default\";\n }\n if (s.type === \"ImportSpecifier\" && \"imported\" in s) {\n return s.imported.type === \"Identifier\"\n ? s.imported.name\n : s.imported.value;\n }\n return \"\";\n });\n }\n\n return [];\n })\n .filter(Boolean);\n}\n\nexport function isImportCall(\n calleePath: NodePath<t.CallExpression | t.NewExpression>\n) {\n return t.isImport(calleePath.node.callee);\n}\n\n/**\n * Gets the import declaration for a given name and specifier.\n *\n * @param specifier - The specifier of the import.\n * @param name - The name of the import.\n * @param named - Optional named import.\n * @returns The import declaration.\n */\nexport function getImport(\n specifier: string,\n name: string,\n named?: string\n): t.ImportDeclaration {\n return t.importDeclaration(\n [t.importSpecifier(t.identifier(name), t.stringLiteral(named || name))],\n t.stringLiteral(specifier)\n );\n}\n\n/**\n * Adds an import to the program if it doesn't already exist.\n *\n * @param path - The current NodePath in the AST.\n * @param specifier - The import specifier.\n */\nexport function addImport(path: NodePath<any>, specifier: ImportSpecifier) {\n addImportsToProgram(\n path.scope.getProgramParent().path as NodePath<t.Program>,\n specifier\n );\n}\n\n/*\n * Matches `import { ... } from <moduleName>;`\n * but not `import * as React from <moduleName>;`\n * `import type { Foo } from <moduleName>;`\n */\nfunction isNonNamespacedImport(\n importDeclPath: NodePath<t.ImportDeclaration>\n): boolean {\n return (\n importDeclPath\n .get(\"specifiers\")\n .filter(Boolean)\n .every(specifier => specifier?.isImportSpecifier()) &&\n importDeclPath.node.importKind !== \"type\" &&\n importDeclPath.node.importKind !== \"typeof\"\n );\n}\n\nfunction getExistingImports(\n program: NodePath<t.Program>\n): Map<string, NodePath<t.ImportDeclaration>> {\n const existingImports = new Map<string, NodePath<t.ImportDeclaration>>();\n program.traverse({\n ImportDeclaration(path) {\n if (isNonNamespacedImport(path)) {\n existingImports.set(path.node.source.value, path);\n }\n }\n });\n return existingImports;\n}\n\nexport function addImportsToProgram(\n path: NodePath<t.Program>,\n specifier: ImportSpecifier\n): void {\n const existingImports = getExistingImports(path);\n\n /**\n * If an existing import of this module exists (ie \\`import \\{ ... \\} from\n * '<moduleName>'\\`), inject new imported specifiers into the list of\n * destructured variables.\n */\n if (!existingImports.get(specifier.module)) {\n path.unshiftContainer(\n \"body\",\n t.importDeclaration(\n [\n t.importSpecifier(\n t.identifier(specifier.name || specifier.imported),\n t.identifier(specifier.imported)\n )\n ],\n t.stringLiteral(specifier.module)\n )\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;AAgCA,SAAgB,WAAW,KAA0B,KAAa;CAChE,MAAM,OACJ,QAAQ,YAAY,6BAA6B;AAEnD,MAAK,MAAM,QAAQ,IAAI,QAAQ,KAC7B,KAAI,KAAK,SAAS,MAAM;AACtB,MAAI,QAAQ,UACV,QAAO,KAAK;AAEd,MAAI,KAAK,eAAe,kBAAkB,KAAK,aAAa;GAC1D,MAAM,cAAc,KAAK,YAAY,aAAa;AAClD,OACE,eACA,UAAU,YAAY,MACtB,YAAY,GAAG,SAAS,IAExB,QAAO,YAAY;;;;;;;;;;AAa7B,SAAgB,YAAY,WAAyC;AAGnE,SAFY,SAAS,UAAU,GAAG,SAAS,UAAU,GAAG,WAE7C,QAAQ,KAChB,SAAQ,MAAK;AACZ,MAAI,EAAE,SAAS,2BACb,QAAO,CAAC,UA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,SAAgB,oBACd,MACA,WACM;;;;;;AAQN,KAAI,CAPoB,mBAAmB,KAAK,CAO3B,IAAI,UAAU,OAAO,CACxC,MAAK,iBACH,QACA,EAAE,kBACA,CACE,EAAE,gBACA,EAAE,WAAW,UAAU,QAAQ,UAAU,SAAS,EAClD,EAAE,WAAW,UAAU,SAAS,CACjC,CACF,EACD,EAAE,cAAc,UAAU,OAAO,CAClC,CACF"}
1
+ {"version":3,"file":"module-helpers.mjs","names":[],"sources":["../../src/helpers/module-helpers.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { NodePath } from \"@babel/core\";\nimport { ParseResult } from \"@babel/parser\";\nimport * as t from \"@babel/types\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport { ImportSpecifier } from \"../types/config\";\nimport { parseAst } from \"./ast-utils\";\n\n/**\n * Finds an export in the given Babel AST program by its key.\n *\n * @param ast - The parsed Babel AST result containing the program body.\n * @param key - The name of the export to find (e.g., \"default\" or a named export).\n * @returns The declaration of the export if found, otherwise undefined.\n */\nexport function findExport(ast: ParseResult<t.File>, key: string) {\n const type =\n key === \"default\" ? \"ExportDefaultDeclaration\" : \"ExportNamedDeclaration\";\n\n for (const node of ast.program.body) {\n if (node.type === type) {\n if (key === \"default\") {\n return node.declaration;\n }\n if (node.declaration && \"declarations\" in node.declaration) {\n const declaration = node.declaration.declarations[0];\n if (\n declaration &&\n \"name\" in declaration.id &&\n declaration.id.name === key\n ) {\n return declaration.init as any;\n }\n }\n }\n }\n}\n\n/**\n * Lists all exports from the given Babel AST program.\n *\n * @param codeOrAst - The parsed Babel AST result containing the program body.\n * @returns An array of export names, including \"default\" for default exports.\n */\nexport function listExports(codeOrAst: ParseResult<t.File> | string) {\n const ast = isString(codeOrAst) ? parseAst(codeOrAst) : codeOrAst;\n\n return ast.program.body\n .flatMap(i => {\n if (i.type === \"ExportDefaultDeclaration\") {\n return [\"default\"];\n }\n if (\n i.type === \"ExportNamedDeclaration\" &&\n i.declaration &&\n \"declarations\" in i.declaration\n ) {\n return i.declaration.declarations.map(d =>\n \"name\" in d.id ? d.id.name : \"\"\n );\n }\n return [];\n })\n .filter(Boolean);\n}\n\n/**\n * Lists all imports from the given Babel AST program.\n *\n * @param ast - The parsed Babel AST result containing the program body.\n * @returns An array of import names, including \"default\" for default imports.\n */\nexport function listImports(ast: ParseResult<t.File> | t.File) {\n return ast.program.body\n .flatMap(i => {\n if (i.type === \"ImportDeclaration\") {\n return i.specifiers.map(s => {\n if (s.type === \"ImportDefaultSpecifier\") {\n return \"default\";\n }\n if (s.type === \"ImportSpecifier\" && \"imported\" in s) {\n return s.imported.type === \"Identifier\"\n ? s.imported.name\n : s.imported.value;\n }\n return \"\";\n });\n }\n\n return [];\n })\n .filter(Boolean);\n}\n\nexport function isImportCall(\n calleePath: NodePath<t.CallExpression | t.NewExpression>\n) {\n return t.isImport(calleePath.node.callee);\n}\n\n/**\n * Gets the import declaration for a given name and specifier.\n *\n * @param specifier - The specifier of the import.\n * @param name - The name of the import.\n * @param named - Optional named import.\n * @returns The import declaration.\n */\nexport function getImport(\n specifier: string,\n name: string,\n named?: string\n): t.ImportDeclaration {\n return t.importDeclaration(\n [t.importSpecifier(t.identifier(name), t.stringLiteral(named || name))],\n t.stringLiteral(specifier)\n );\n}\n\n/**\n * Adds an import to the program if it doesn't already exist.\n *\n * @param path - The current NodePath in the AST.\n * @param specifier - The import specifier.\n */\nexport function addImport(path: NodePath<any>, specifier: ImportSpecifier) {\n addImportsToProgram(\n path.scope.getProgramParent().path as NodePath<t.Program>,\n specifier\n );\n}\n\n/*\n * Matches `import { ... } from <moduleName>;`\n * but not `import * as React from <moduleName>;`\n * `import type { Foo } from <moduleName>;`\n */\nfunction isNonNamespacedImport(\n importDeclPath: NodePath<t.ImportDeclaration>\n): boolean {\n return (\n importDeclPath\n .get(\"specifiers\")\n .filter(Boolean)\n .every(specifier => specifier?.isImportSpecifier()) &&\n importDeclPath.node.importKind !== \"type\" &&\n importDeclPath.node.importKind !== \"typeof\"\n );\n}\n\nfunction getExistingImports(\n program: NodePath<t.Program>\n): Map<string, NodePath<t.ImportDeclaration>> {\n const existingImports = new Map<string, NodePath<t.ImportDeclaration>>();\n program.traverse({\n ImportDeclaration(path) {\n if (isNonNamespacedImport(path)) {\n existingImports.set(path.node.source.value, path);\n }\n }\n });\n return existingImports;\n}\n\nexport function addImportsToProgram(\n path: NodePath<t.Program>,\n specifier: ImportSpecifier\n): void {\n const existingImports = getExistingImports(path);\n\n /**\n * If an existing import of this module exists (ie \\`import \\{ ... \\} from\n * '<moduleName>'\\`), inject new imported specifiers into the list of\n * destructured variables.\n */\n if (!existingImports.get(specifier.module)) {\n path.unshiftContainer(\n \"body\",\n t.importDeclaration(\n [\n t.importSpecifier(\n t.identifier(specifier.name || specifier.imported),\n t.identifier(specifier.imported)\n )\n ],\n t.stringLiteral(specifier.module)\n )\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;AAgCA,SAAgB,WAAW,KAA0B,KAAa;CAChE,MAAM,OACJ,QAAQ,YAAY,6BAA6B;AAEnD,MAAK,MAAM,QAAQ,IAAI,QAAQ,KAC7B,KAAI,KAAK,SAAS,MAAM;AACtB,MAAI,QAAQ,UACV,QAAO,KAAK;AAEd,MAAI,KAAK,eAAe,kBAAkB,KAAK,aAAa;GAC1D,MAAM,cAAc,KAAK,YAAY,aAAa;AAClD,OACE,eACA,UAAU,YAAY,MACtB,YAAY,GAAG,SAAS,IAExB,QAAO,YAAY;;;;;;;;;;AAa7B,SAAgB,YAAY,WA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AAS,EACf,kBAAkB,MAAM;AACtB,MAAI,sBAAsB,KAAK,CAC7B,iBAAgB,IAAI,KAAK,KAAK,OAAO,OAAO,KAAK;IAGtD,CAAC;AACF,QAAO;;AAGT,SAAgB,oBACd,MACA,WACM;;;;;;AAQN,KAAI,CAPoB,mBAAmB,KAOvB,CAAC,IAAI,UAAU,OAAO,CACxC,MAAK,iBACH,QACA,EAAE,kBACA,CACE,EAAE,gBACA,EAAE,WAAW,UAAU,QAAQ,UAAU,SAAS,EAClD,EAAE,WAAW,UAAU,SAAS,CACjC,CACF,EACD,EAAE,cAAc,UAAU,OAAO,CAClC,CACF"}
package/dist/index.cjs CHANGED
@@ -7,11 +7,14 @@ const require_helpers_create_plugin = require('./helpers/create-plugin.cjs');
7
7
  const require_helpers_module_helpers = require('./helpers/module-helpers.cjs');
8
8
  require('./helpers/index.cjs');
9
9
  let _babel_core = require("@babel/core");
10
+ let _stryke_helpers_omit = require("@stryke/helpers/omit");
10
11
  let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
11
12
  let _stryke_path_is_parent_path = require("@stryke/path/is-parent-path");
13
+ let _stryke_type_checks_is_empty_object = require("@stryke/type-checks/is-empty-object");
12
14
  let _stryke_type_checks_is_set_object = require("@stryke/type-checks/is-set-object");
13
15
  let defu = require("defu");
14
16
  defu = require_runtime.__toESM(defu, 1);
17
+ let node_util_types = require("node:util/types");
15
18
 
16
19
  //#region src/index.ts
17
20
  /**
@@ -52,7 +55,10 @@ const plugin = (options = {}) => {
52
55
  code,
53
56
  id
54
57
  };
55
- if (!this.config.babel?.skipConfigResolution && /^(?:m|c)?tsx?$/.test((0, _stryke_path_file_path_fns.findFileExtensionSafe)(id, { fullExtension: true })) && !require_helpers_filters.isDuplicatePlugin(plugins, "@babel/plugin-syntax-typescript") && !require_helpers_filters.isDuplicatePreset(presets, "@babel/preset-typescript")) plugins.unshift(["@babel/plugin-syntax-typescript", { isTSX: (0, _stryke_path_file_path_fns.findFileExtension)(id) === "tsx" }]);
58
+ if (!this.config.babel?.skipConfigResolution) {
59
+ if (/^(?:m|c)?tsx?$/.test((0, _stryke_path_file_path_fns.findFileExtensionSafe)(id, { fullExtension: true })) && !require_helpers_filters.isDuplicatePlugin(plugins, "@babel/plugin-syntax-typescript") && !require_helpers_filters.isDuplicatePreset(presets, "@babel/preset-typescript")) plugins.unshift("@babel/plugin-syntax-typescript");
60
+ if (/^(?:t|j)sx$/.test((0, _stryke_path_file_path_fns.findFileExtensionSafe)(id, { fullExtension: true })) && !require_helpers_filters.isDuplicatePlugin(plugins, "@babel/plugin-syntax-jsx") && !require_helpers_filters.isDuplicatePreset(presets, "@babel/preset-react")) plugins.unshift("@babel/plugin-syntax-jsx");
61
+ }
56
62
  this.trace(`Running babel transformations with ${plugins.length} plugins and ${presets.length} presets for file: ${id}`);
57
63
  const result = await (0, _babel_core.transformAsync)(code, {
58
64
  cwd: this.config.cwd,
@@ -66,13 +72,21 @@ const plugin = (options = {}) => {
66
72
  babelrc: false,
67
73
  envName: this.config.mode,
68
74
  caller: { name: this.config.framework },
69
- ...this.config.babel ?? {},
75
+ ...(0, _stryke_helpers_omit.omit)(this.config.babel ?? {}, ["skipConfigResolution"]),
70
76
  filename: id,
71
77
  plugins: plugins.map((plugin) => {
72
- return Array.isArray(plugin) && plugin.length >= 2 ? [plugin[0], (0, defu.default)(plugin.length > 1 && plugin[1] ? plugin[1] : {}, { options })] : plugin;
78
+ if (Array.isArray(plugin) && plugin.length >= 2) {
79
+ if (plugin.slice(1).every((item) => !(0, node_util_types.isSet)(item) || (0, _stryke_type_checks_is_empty_object.isEmptyObject)(item))) return plugin[0];
80
+ return [plugin[0], plugin.length > 1 && plugin[1] ? plugin[1] : {}];
81
+ }
82
+ return plugin;
73
83
  }).filter(Boolean),
74
84
  presets: presets.map((preset) => {
75
- return Array.isArray(preset) && preset.length >= 2 ? [preset[0], (0, defu.default)(preset.length > 1 && preset[1] ? preset[1] : {}, { options })] : preset;
85
+ if (Array.isArray(preset) && preset.length >= 2) {
86
+ if (preset.slice(1).every((item) => !(0, node_util_types.isSet)(item) || (0, _stryke_type_checks_is_empty_object.isEmptyObject)(item))) return preset[0];
87
+ return [preset[0], preset.length > 1 && preset[1] ? preset[1] : {}];
88
+ }
89
+ return preset;
76
90
  }).filter(Boolean)
77
91
  });
78
92
  if (!result?.code) throw new Error(`Powerlines - Babel plugin failed to compile ${id}`);
package/dist/index.mjs CHANGED
@@ -5,10 +5,13 @@ import { createBabelPlugin } from "./helpers/create-plugin.mjs";
5
5
  import { addImport, addImportsToProgram, findExport, getImport, isImportCall, listExports, listImports } from "./helpers/module-helpers.mjs";
6
6
  import "./helpers/index.mjs";
7
7
  import { transformAsync } from "@babel/core";
8
- import { findFileExtension, findFileExtensionSafe } from "@stryke/path/file-path-fns";
8
+ import { omit } from "@stryke/helpers/omit";
9
+ import { findFileExtensionSafe } from "@stryke/path/file-path-fns";
9
10
  import { isParentPath } from "@stryke/path/is-parent-path";
11
+ import { isEmptyObject } from "@stryke/type-checks/is-empty-object";
10
12
  import { isSetObject } from "@stryke/type-checks/is-set-object";
11
13
  import defu from "defu";
14
+ import { isSet } from "node:util/types";
12
15
 
13
16
  //#region src/index.ts
14
17
  /**
@@ -49,7 +52,10 @@ const plugin = (options = {}) => {
49
52
  code,
50
53
  id
51
54
  };
52
- if (!this.config.babel?.skipConfigResolution && /^(?:m|c)?tsx?$/.test(findFileExtensionSafe(id, { fullExtension: true })) && !isDuplicatePlugin(plugins, "@babel/plugin-syntax-typescript") && !isDuplicatePreset(presets, "@babel/preset-typescript")) plugins.unshift(["@babel/plugin-syntax-typescript", { isTSX: findFileExtension(id) === "tsx" }]);
55
+ if (!this.config.babel?.skipConfigResolution) {
56
+ if (/^(?:m|c)?tsx?$/.test(findFileExtensionSafe(id, { fullExtension: true })) && !isDuplicatePlugin(plugins, "@babel/plugin-syntax-typescript") && !isDuplicatePreset(presets, "@babel/preset-typescript")) plugins.unshift("@babel/plugin-syntax-typescript");
57
+ if (/^(?:t|j)sx$/.test(findFileExtensionSafe(id, { fullExtension: true })) && !isDuplicatePlugin(plugins, "@babel/plugin-syntax-jsx") && !isDuplicatePreset(presets, "@babel/preset-react")) plugins.unshift("@babel/plugin-syntax-jsx");
58
+ }
53
59
  this.trace(`Running babel transformations with ${plugins.length} plugins and ${presets.length} presets for file: ${id}`);
54
60
  const result = await transformAsync(code, {
55
61
  cwd: this.config.cwd,
@@ -63,13 +69,21 @@ const plugin = (options = {}) => {
63
69
  babelrc: false,
64
70
  envName: this.config.mode,
65
71
  caller: { name: this.config.framework },
66
- ...this.config.babel ?? {},
72
+ ...omit(this.config.babel ?? {}, ["skipConfigResolution"]),
67
73
  filename: id,
68
74
  plugins: plugins.map((plugin) => {
69
- return Array.isArray(plugin) && plugin.length >= 2 ? [plugin[0], defu(plugin.length > 1 && plugin[1] ? plugin[1] : {}, { options })] : plugin;
75
+ if (Array.isArray(plugin) && plugin.length >= 2) {
76
+ if (plugin.slice(1).every((item) => !isSet(item) || isEmptyObject(item))) return plugin[0];
77
+ return [plugin[0], plugin.length > 1 && plugin[1] ? plugin[1] : {}];
78
+ }
79
+ return plugin;
70
80
  }).filter(Boolean),
71
81
  presets: presets.map((preset) => {
72
- return Array.isArray(preset) && preset.length >= 2 ? [preset[0], defu(preset.length > 1 && preset[1] ? preset[1] : {}, { options })] : preset;
82
+ if (Array.isArray(preset) && preset.length >= 2) {
83
+ if (preset.slice(1).every((item) => !isSet(item) || isEmptyObject(item))) return preset[0];
84
+ return [preset[0], preset.length > 1 && preset[1] ? preset[1] : {}];
85
+ }
86
+ return preset;
73
87
  }).filter(Boolean)
74
88
  });
75
89
  if (!result?.code) throw new Error(`Powerlines - Babel plugin failed to compile ${id}`);
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { PluginItem, PresetItem, transformAsync } from \"@babel/core\";\nimport type { Plugin } from \"@powerlines/core\";\nimport {\n findFileExtension,\n findFileExtensionSafe\n} from \"@stryke/path/file-path-fns\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport defu from \"defu\";\nimport { isDuplicatePlugin, isDuplicatePreset } from \"./helpers/filters\";\nimport {\n getUniquePlugins,\n getUniquePresets,\n resolveBabelPlugin,\n resolveBabelPreset\n} from \"./helpers/options\";\nimport {\n ResolvedBabelTransformPluginOptions,\n ResolvedBabelTransformPresetOptions\n} from \"./types/config\";\nimport { BabelPluginContext, BabelPluginOptions } from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface Config {\n babel?: BabelPluginOptions;\n }\n}\n\n/**\n * Babel plugin for Powerlines.\n *\n * @param options - The Babel plugin user configuration options.\n * @returns A Powerlines plugin that integrates Babel transformations.\n */\nexport const plugin = <\n TContext extends BabelPluginContext = BabelPluginContext\n>(\n options: BabelPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"babel\",\n config() {\n if (!isSetObject(options)) {\n return undefined;\n }\n\n return {\n babel: options\n };\n },\n configResolved: {\n order: \"pre\",\n handler() {\n this.config.babel = defu(this.config.babel ?? {}, {\n plugins: [],\n presets: []\n });\n\n this.config.babel.plugins = getUniquePlugins(this.config.babel.plugins);\n this.config.babel.presets = getUniquePresets(this.config.babel.presets);\n }\n },\n async transform(code: string, id: string) {\n if (\n isParentPath(id, this.powerlinesPath) ||\n code.includes(\"/* @powerlines-ignore */\") ||\n code.includes(\"/* @powerlines-disable */\")\n ) {\n this.trace(`Skipping Babel transformation for: ${id}`);\n\n return { code, id };\n }\n\n const plugins = getUniquePlugins(\n this.config.babel.plugins\n .map(plugin => resolveBabelPlugin(this, code, id, plugin))\n .filter(Boolean) as ResolvedBabelTransformPluginOptions[]\n );\n const presets = getUniquePresets(\n this.config.babel.presets\n .map(preset => resolveBabelPreset(this, code, id, preset))\n .filter(Boolean) as ResolvedBabelTransformPresetOptions[]\n );\n\n if (\n Array.isArray(plugins) &&\n plugins.length === 0 &&\n Array.isArray(presets) &&\n presets.length === 0\n ) {\n return { code, id };\n }\n\n if (\n !this.config.babel?.skipConfigResolution &&\n /^(?:m|c)?tsx?$/.test(\n findFileExtensionSafe(id, {\n fullExtension: true\n })\n ) &&\n !isDuplicatePlugin(plugins, \"@babel/plugin-syntax-typescript\") &&\n !isDuplicatePreset(presets, \"@babel/preset-typescript\")\n ) {\n plugins.unshift([\n \"@babel/plugin-syntax-typescript\",\n { isTSX: findFileExtension(id) === \"tsx\" }\n ]);\n }\n\n this.trace(\n `Running babel transformations with ${plugins.length} plugins and ${\n presets.length\n } presets for file: ${id}`\n );\n\n const result = await transformAsync(code, {\n cwd: this.config.cwd,\n highlightCode: true,\n code: true,\n ast: false,\n cloneInputAst: false,\n comments: true,\n sourceType: \"module\",\n configFile: false,\n babelrc: false,\n envName: this.config.mode,\n caller: {\n name: this.config.framework\n },\n ...(this.config.babel ?? {}),\n filename: id,\n plugins: plugins\n .map(plugin => {\n return Array.isArray(plugin) && plugin.length >= 2\n ? [\n plugin[0],\n defu(plugin.length > 1 && plugin[1] ? plugin[1] : {}, {\n options\n })\n ]\n : plugin;\n })\n .filter(Boolean) as PluginItem<object>[],\n presets: presets\n .map(preset => {\n return Array.isArray(preset) && preset.length >= 2\n ? [\n preset[0],\n defu(preset.length > 1 && preset[1] ? preset[1] : {}, {\n options\n })\n ]\n : preset;\n })\n .filter(Boolean) as PresetItem<object>[]\n });\n if (!result?.code) {\n throw new Error(`Powerlines - Babel plugin failed to compile ${id}`);\n }\n\n this.trace(`Completed babel transformations for file: ${id}`);\n\n return { code: result.code, id };\n }\n } as Plugin<TContext>;\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAuDA,MAAa,UAGX,UAA8B,EAAE,KACX;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,OAAI,CAAC,YAAY,QAAQ,CACvB;AAGF,UAAO,EACL,OAAO,SACR;;EAEH,gBAAgB;GACd,OAAO;GACP,UAAU;AACR,SAAK,OAAO,QAAQ,KAAK,KAAK,OAAO,SAAS,EAAE,EAAE;KAChD,SAAS,EAAE;KACX,SAAS,EAAE;KACZ,CAAC;AAEF,SAAK,OAAO,MAAM,UAAU,iBAAiB,KAAK,OAAO,MAAM,QAAQ;AACvE,SAAK,OAAO,MAAM,UAAU,iBAAiB,KAAK,OAAO,MAAM,QAAQ;;GAE1E;EACD,MAAM,UAAU,MAAc,IAAY;AACxC,OACE,aAAa,IAAI,KAAK,eAAe,IACrC,KAAK,SAAS,2BAA2B,IACzC,KAAK,SAAS,4BAA4B,EAC1C;AACA,SAAK,MAAM,sCAAsC,KAAK;AAEtD,WAAO;KAAE;KAAM;KAAI;;GAGrB,MAAM,UAAU,iBACd,KAAK,OAAO,MAAM,QACf,KAAI,WAAU,mBAAmB,MAAM,MAAM,IAAI,OAAO,CAAC,CACzD,OAAO,QAAQ,CACnB;GACD,MAAM,UAAU,iBACd,KAAK,OAAO,MAAM,QACf,KAAI,WAAU,mBAAmB,MAAM,MAAM,IAAI,OAAO,CAAC,CACzD,OAAO,QAAQ,CACnB;AAED,OACE,MAAM,QAAQ,QAAQ,IACtB,QAAQ,WAAW,KACnB,MAAM,QAAQ,QAAQ,IACtB,QAAQ,WAAW,EAEnB,QAAO;IAAE;IAAM;IAAI;AAGrB,OACE,CAAC,KAAK,OAAO,OAAO,wBACpB,iBAAiB,KACf,sBAAsB,IAAI,EACxB,eAAe,MAChB,CAAC,CACH,IACD,CAAC,kBAAkB,SAAS,kCAAkC,IAC9D,CAAC,kBAAkB,SAAS,2BAA2B,CAEvD,SAAQ,QAAQ,CACd,mCACA,EAAE,OAAO,kBAAkB,GAAG,KAAK,OAAO,CAC3C,CAAC;AAGJ,QAAK,MACH,sCAAsC,QAAQ,OAAO,eACnD,QAAQ,OACT,qBAAqB,KACvB;GAED,MAAM,SAAS,MAAM,eAAe,MAAM;IACxC,KAAK,KAAK,OAAO;IACjB,eAAe;IACf,MAAM;IACN,KAAK;IACL,eAAe;IACf,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,SAAS,KAAK,OAAO;IACrB,QAAQ,EACN,MAAM,KAAK,OAAO,WACnB;IACD,GAAI,KAAK,OAAO,SAAS,EAAE;IAC3B,UAAU;IACV,SAAS,QACN,KAAI,WAAU;AACb,YAAO,MAAM,QAAQ,OAAO,IAAI,OAAO,UAAU,IAC7C,CACE,OAAO,IACP,KAAK,OAAO,SAAS,KAAK,OAAO,KAAK,OAAO,KAAK,EAAE,EAAE,EACpD,SACD,CAAC,CACH,GACD;MACJ,CACD,OAAO,QAAQ;IAClB,SAAS,QACN,KAAI,WAAU;AACb,YAAO,MAAM,QAAQ,OAAO,IAAI,OAAO,UAAU,IAC7C,CACE,OAAO,IACP,KAAK,OAAO,SAAS,KAAK,OAAO,KAAK,OAAO,KAAK,EAAE,EAAE,EACpD,SACD,CAAC,CACH,GACD;MACJ,CACD,OAAO,QAAQ;IACnB,CAAC;AACF,OAAI,CAAC,QAAQ,KACX,OAAM,IAAI,MAAM,+CAA+C,KAAK;AAGtE,QAAK,MAAM,6CAA6C,KAAK;AAE7D,UAAO;IAAE,MAAM,OAAO;IAAM;IAAI;;EAEnC"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Powerlines\n\n This code was released as part of the Powerlines project. Powerlines\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/powerlines.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/powerlines\n Documentation: https://docs.stormsoftware.com/projects/powerlines\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { PluginItem, PresetItem, transformAsync } from \"@babel/core\";\nimport type { Plugin } from \"@powerlines/core\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport { findFileExtensionSafe } from \"@stryke/path/file-path-fns\";\nimport { isParentPath } from \"@stryke/path/is-parent-path\";\nimport { isEmptyObject } from \"@stryke/type-checks/is-empty-object\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport defu from \"defu\";\nimport { isSet } from \"node:util/types\";\nimport { isDuplicatePlugin, isDuplicatePreset } from \"./helpers/filters\";\nimport {\n getUniquePlugins,\n getUniquePresets,\n resolveBabelPlugin,\n resolveBabelPreset\n} from \"./helpers/options\";\nimport {\n ResolvedBabelTransformPluginOptions,\n ResolvedBabelTransformPresetOptions\n} from \"./types/config\";\nimport { BabelPluginContext, BabelPluginOptions } from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface Config {\n babel?: BabelPluginOptions;\n }\n}\n\n/**\n * Babel plugin for Powerlines.\n *\n * @param options - The Babel plugin user configuration options.\n * @returns A Powerlines plugin that integrates Babel transformations.\n */\nexport const plugin = <\n TContext extends BabelPluginContext = BabelPluginContext\n>(\n options: BabelPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"babel\",\n config() {\n if (!isSetObject(options)) {\n return undefined;\n }\n\n return {\n babel: options\n };\n },\n configResolved: {\n order: \"pre\",\n handler() {\n this.config.babel = defu(this.config.babel ?? {}, {\n plugins: [],\n presets: []\n });\n\n this.config.babel.plugins = getUniquePlugins(this.config.babel.plugins);\n this.config.babel.presets = getUniquePresets(this.config.babel.presets);\n }\n },\n async transform(code: string, id: string) {\n if (\n isParentPath(id, this.powerlinesPath) ||\n code.includes(\"/* @powerlines-ignore */\") ||\n code.includes(\"/* @powerlines-disable */\")\n ) {\n this.trace(`Skipping Babel transformation for: ${id}`);\n\n return { code, id };\n }\n\n const plugins = getUniquePlugins(\n this.config.babel.plugins\n .map(plugin => resolveBabelPlugin(this, code, id, plugin))\n .filter(Boolean) as ResolvedBabelTransformPluginOptions[]\n );\n const presets = getUniquePresets(\n this.config.babel.presets\n .map(preset => resolveBabelPreset(this, code, id, preset))\n .filter(Boolean) as ResolvedBabelTransformPresetOptions[]\n );\n\n if (\n Array.isArray(plugins) &&\n plugins.length === 0 &&\n Array.isArray(presets) &&\n presets.length === 0\n ) {\n return { code, id };\n }\n\n if (!this.config.babel?.skipConfigResolution) {\n if (\n /^(?:m|c)?tsx?$/.test(\n findFileExtensionSafe(id, {\n fullExtension: true\n })\n ) &&\n !isDuplicatePlugin(plugins, \"@babel/plugin-syntax-typescript\") &&\n !isDuplicatePreset(presets, \"@babel/preset-typescript\")\n ) {\n plugins.unshift(\"@babel/plugin-syntax-typescript\");\n }\n\n if (\n /^(?:t|j)sx$/.test(\n findFileExtensionSafe(id, {\n fullExtension: true\n })\n ) &&\n !isDuplicatePlugin(plugins, \"@babel/plugin-syntax-jsx\") &&\n !isDuplicatePreset(presets, \"@babel/preset-react\")\n ) {\n plugins.unshift(\"@babel/plugin-syntax-jsx\");\n }\n }\n\n this.trace(\n `Running babel transformations with ${plugins.length} plugins and ${\n presets.length\n } presets for file: ${id}`\n );\n\n const result = await transformAsync(code, {\n cwd: this.config.cwd,\n highlightCode: true,\n code: true,\n ast: false,\n cloneInputAst: false,\n comments: true,\n sourceType: \"module\",\n configFile: false,\n babelrc: false,\n envName: this.config.mode,\n caller: {\n name: this.config.framework\n },\n ...omit(this.config.babel ?? {}, [\"skipConfigResolution\"]),\n filename: id,\n plugins: plugins\n .map(plugin => {\n if (Array.isArray(plugin) && plugin.length >= 2) {\n if (\n plugin\n .slice(1)\n .every(item => !isSet(item) || isEmptyObject(item))\n ) {\n return plugin[0];\n }\n\n return [\n plugin[0],\n plugin.length > 1 && plugin[1] ? plugin[1] : {}\n ];\n }\n\n return plugin;\n })\n .filter(Boolean) as PluginItem<object>[],\n presets: presets\n .map(preset => {\n if (Array.isArray(preset) && preset.length >= 2) {\n if (\n preset\n .slice(1)\n .every(item => !isSet(item) || isEmptyObject(item))\n ) {\n return preset[0];\n }\n\n return [\n preset[0],\n preset.length > 1 && preset[1] ? preset[1] : {}\n ];\n }\n\n return preset;\n })\n .filter(Boolean) as PresetItem<object>[]\n });\n if (!result?.code) {\n throw new Error(`Powerlines - Babel plugin failed to compile ${id}`);\n }\n\n this.trace(`Completed babel transformations for file: ${id}`);\n\n return { code: result.code, id };\n }\n } as Plugin<TContext>;\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuDA,MAAa,UAGX,UAA8B,EAAE,KACX;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,OAAI,CAAC,YAAY,QAAQ,CACvB;AAGF,UAAO,EACL,OAAO,SACR;;EAEH,gBAAgB;GACd,OAAO;GACP,UAAU;AACR,SAAK,OAAO,QAAQ,KAAK,KAAK,OAAO,SAAS,EAAE,EAAE;KAChD,SAAS,EAAE;KACX,SAAS,EAAE;KACZ,CAAC;AAEF,SAAK,OAAO,MAAM,UAAU,iBAAiB,KAAK,OAAO,MAAM,QAAQ;AACvE,SAAK,OAAO,MAAM,UAAU,iBAAiB,KAAK,OAAO,MAAM,QAAQ;;GAE1E;EACD,MAAM,UAAU,MAAc,IAAY;AACxC,OACE,aAAa,IAAI,KAAK,eAAe,IACrC,KAAK,SAAS,2BAA2B,IACzC,KAAK,SAAS,4BAA4B,EAC1C;AACA,SAAK,MAAM,sCAAsC,KAAK;AAEtD,WAAO;KAAE;KAAM;KAAI;;GAGrB,MAAM,UAAU,iBACd,KAAK,OAAO,MAAM,QACf,KAAI,WAAU,mBAA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AAO,OAAO;AAGhB,aAAO,CACL,OAAO,IACP,OAAO,SAAS,KAAK,OAAO,KAAK,OAAO,KAAK,EAAE,CAChD;;AAGH,YAAO;MACP,CACD,OAAO,QAAQ;IAClB,SAAS,QACN,KAAI,WAAU;AACb,SAAI,MAAM,QAAQ,OAAO,IAAI,OAAO,UAAU,GAAG;AAC/C,UACE,OACG,MAAM,EAAE,CACR,OAAM,SAAQ,CAAC,MAAM,KAAK,IAAI,cAAc,KAAK,CAAC,CAErD,QAAO,OAAO;AAGhB,aAAO,CACL,OAAO,IACP,OAAO,SAAS,KAAK,OAAO,KAAK,OAAO,KAAK,EAAE,CAChD;;AAGH,YAAO;MACP,CACD,OAAO,QAAQ;IACnB,CAAC;AACF,OAAI,CAAC,QAAQ,KACX,OAAM,IAAI,MAAM,+CAA+C,KAAK;AAGtE,QAAK,MAAM,6CAA6C,KAAK;AAE7D,UAAO;IAAE,MAAM,OAAO;IAAM;IAAI;;EAEnC"}
@@ -35,7 +35,7 @@ type BabelTransformPreset<TContext extends Context = Context, TOptions extends o
35
35
  $$name: string;
36
36
  };
37
37
  type BabelTransformPluginOptions<TContext extends Context = Context, TOptions extends object = object, TState = unknown> = ConfigItem<PluginAPI> | PluginTarget<TOptions> | BabelTransformPlugin<TContext, TOptions, TState> | [PluginTarget<TOptions> | BabelTransformPlugin<TContext, TOptions, TState>, TOptions] | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions, BabelTransformPluginFilter];
38
- type BabelTransformPresetOptions<TContext extends Context = Context, TOptions extends object = object> = ConfigItem<PresetAPI> | PresetTarget<TOptions> | BabelTransformPreset<TContext, TOptions> | [PresetTarget<TOptions> | BabelTransformPreset<TContext, TOptions>, TOptions] | [BabelTransformPreset<TContext, TOptions>, TOptions, BabelTransformPluginFilter];
38
+ type BabelTransformPresetOptions<TContext extends Context = Context, TOptions extends object = object> = ConfigItem<PresetAPI> | PresetTarget<TOptions> | BabelTransformPreset<TContext, TOptions> | [PresetTarget<TOptions> | BabelTransformPreset<TContext, TOptions>, TOptions] | [PresetTarget<TOptions> | BabelTransformPreset<TContext, TOptions>, TOptions, BabelTransformPluginFilter];
39
39
  type ResolvedBabelTransformPluginOptions<TContext extends Context = Context, TOptions extends object = object, TState = unknown> = PluginItem<TOptions> | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions, BabelTransformPluginFilter | string | null];
40
40
  type ResolvedBabelTransformPresetOptions<TContext extends Context = Context, TOptions extends object = object> = PresetItem<TOptions> | [BabelTransformPreset<TContext, TOptions>, TOptions, BabelTransformPluginFilter | string | null];
41
41
  type BabelTransformInput = Omit<InputOptions & Required<Pick<InputOptions, "presets" | "plugins">>, "filename" | "root" | "sourceFileName" | "sourceMaps" | "inputSourceMap">;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.cts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;UAiCiB,qBAAA;EACf,IAAA;EACA,MAAA;EACA,IAAA;AAAA;AAAA,UAGe,uBAAA;EACf,MAAA;EACA,IAAA;AAAA;AAAA,KAGU,gBAAA,GAAmB,qBAAA,GAAwB,uBAAA;AAAA,KAE3C,eAAA,qBAAoC,UAAA,GAAa,MAAA;AAAA,KAEjD,0BAAA,IAA8B,IAAA,UAAc,EAAA;AAAA,KAE5C,oBAAA,kBACO,OAAA,GAAU,OAAA,0DAI3B,OAAA,EAAS,QAAA,MACL,OAAA;EACJ,IAAA;EACA,GAAA,EAAK,KAAA;EACL,GAAA,EAAK,SAAA;EACL,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,QAAA;EACT,OAAA;AAAA,MACI,YAAA,CAAa,QAAA,GAAW,eAAA,CAAgB,MAAA;EAC5C,MAAA;AAAA;AAAA,KAGU,oBAAA,kBACO,OAAA,GAAU,OAAA,wCAG3B,OAAA,EAAS,QAAA,MACL,OAAA;EACJ,IAAA;EACA,GAAA,EAAK,KAAA;EACL,GAAA,EAAK,SAAA;EACL,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,QAAA;EACT,OA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,OAAA,GAAU,OAAA,qDAI3B,MAAA,EAAQ,iCAAA,CAAkC,QAAA,EAAU,QAAA,MACjD,YAAA,CAAa,MAAA,GAAS,eAAA,CAAgB,QAAA;AAAA,KAE/B,iCAAA,kBACO,OAAA,GAAU,OAAA,oDAGzB,IAAA,CAAK,oBAAA,CAAqB,QAAA,EAAU,QAAA,EAAU,MAAA,eAChD,QAAA,CAAS,IAAA,CAAK,oBAAA,CAAqB,QAAA,EAAU,QAAA,EAAU,MAAA;;;;;;;;AAxGzD;;;;;UAsHiB,eAAA;EACf,IAAA;EACA,MAAA;EACA,QAAA;AAAA;AAAA,KAGU,eAAA,GAAkB,IAAA,CAAK,YAAA;EAhHjB;;;EAoHhB,OAAA,GAAU,2BAAA;EA/HiB;;;EAoI3B,OAAA,GAAU,2BAAA;AAAA;AAAA,KAGA,mBAAA,GAAsB,IAAA,CAAK,eAAA,2BACrC,QAAA,CAAS,IAAA,CAAK,eAAA;AAAA"}
@@ -35,7 +35,7 @@ type BabelTransformPreset<TContext extends Context = Context, TOptions extends o
35
35
  $$name: string;
36
36
  };
37
37
  type BabelTransformPluginOptions<TContext extends Context = Context, TOptions extends object = object, TState = unknown> = ConfigItem<PluginAPI> | PluginTarget<TOptions> | BabelTransformPlugin<TContext, TOptions, TState> | [PluginTarget<TOptions> | BabelTransformPlugin<TContext, TOptions, TState>, TOptions] | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions, BabelTransformPluginFilter];
38
- type BabelTransformPresetOptions<TContext extends Context = Context, TOptions extends object = object> = ConfigItem<PresetAPI> | PresetTarget<TOptions> | BabelTransformPreset<TContext, TOptions> | [PresetTarget<TOptions> | BabelTransformPreset<TContext, TOptions>, TOptions] | [BabelTransformPreset<TContext, TOptions>, TOptions, BabelTransformPluginFilter];
38
+ type BabelTransformPresetOptions<TContext extends Context = Context, TOptions extends object = object> = ConfigItem<PresetAPI> | PresetTarget<TOptions> | BabelTransformPreset<TContext, TOptions> | [PresetTarget<TOptions> | BabelTransformPreset<TContext, TOptions>, TOptions] | [PresetTarget<TOptions> | BabelTransformPreset<TContext, TOptions>, TOptions, BabelTransformPluginFilter];
39
39
  type ResolvedBabelTransformPluginOptions<TContext extends Context = Context, TOptions extends object = object, TState = unknown> = PluginItem<TOptions> | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions, BabelTransformPluginFilter | string | null];
40
40
  type ResolvedBabelTransformPresetOptions<TContext extends Context = Context, TOptions extends object = object> = PresetItem<TOptions> | [BabelTransformPreset<TContext, TOptions>, TOptions, BabelTransformPluginFilter | string | null];
41
41
  type BabelTransformInput = Omit<InputOptions & Required<Pick<InputOptions, "presets" | "plugins">>, "filename" | "root" | "sourceFileName" | "sourceMaps" | "inputSourceMap">;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.mts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;UAiCiB,qBAAA;EACf,IAAA;EACA,MAAA;EACA,IAAA;AAAA;AAAA,UAGe,uBAAA;EACf,MAAA;EACA,IAAA;AAAA;AAAA,KAGU,gBAAA,GAAmB,qBAAA,GAAwB,uBAAA;AAAA,KAE3C,eAAA,qBAAoC,UAAA,GAAa,MAAA;AAAA,KAEjD,0BAAA,IAA8B,IAAA,UAAc,EAAA;AAAA,KAE5C,oBAAA,kBACO,OAAA,GAAU,OAAA,0DAI3B,OAAA,EAAS,QAAA,MACL,OAAA;EACJ,IAAA;EACA,GAAA,EAAK,KAAA;EACL,GAAA,EAAK,SAAA;EACL,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,QAAA;EACT,OAAA;AAAA,MACI,YAAA,CAAa,QAAA,GAAW,eAAA,CAAgB,MAAA;EAC5C,MAAA;AAAA;AAAA,KAGU,oBAAA,kBACO,OAAA,GAAU,OAAA,wCAG3B,OAAA,EAAS,QAAA,MACL,OAAA;EACJ,IAAA;EACA,GAAA,EAAK,KAAA;EACL,GAAA,EAAK,SAAA;EACL,OAAA,EAAS,QAAA;EACT,OAAA,EAAS,QAAA;EACT,OAAA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AAA,GAAU,OAAA,qDAI3B,MAAA,EAAQ,iCAAA,CAAkC,QAAA,EAAU,QAAA,MACjD,YAAA,CAAa,MAAA,GAAS,eAAA,CAAgB,QAAA;AAAA,KAE/B,iCAAA,kBACO,OAAA,GAAU,OAAA,oDAGzB,IAAA,CAAK,oBAAA,CAAqB,QAAA,EAAU,QAAA,EAAU,MAAA,eAChD,QAAA,CAAS,IAAA,CAAK,oBAAA,CAAqB,QAAA,EAAU,QAAA,EAAU,MAAA;;;;;;;;AAxGzD;;;;;UAsHiB,eAAA;EACf,IAAA;EACA,MAAA;EACA,QAAA;AAAA;AAAA,KAGU,eAAA,GAAkB,IAAA,CAAK,YAAA;EAhHjB;;;EAoHhB,OAAA,GAAU,2BAAA;EA/HiB;;;EAoI3B,OAAA,GAAU,2BAAA;AAAA;AAAA,KAGA,mBAAA,GAAsB,IAAA,CAAK,eAAA,2BACrC,QAAA,CAAS,IAAA,CAAK,eAAA;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-babel",
3
- "version": "0.12.401",
3
+ "version": "0.12.403",
4
4
  "private": false,
5
5
  "description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
6
6
  "keywords": ["babel", "powerlines", "storm-software", "powerlines-plugin"],
@@ -89,9 +89,8 @@
89
89
  "@babel/generator": "8.0.0-rc.3",
90
90
  "@babel/helper-plugin-utils": "8.0.0-rc.3",
91
91
  "@babel/parser": "8.0.0-rc.3",
92
- "@babel/plugin-syntax-typescript": "8.0.0-rc.3",
93
92
  "@babel/types": "8.0.0-rc.3",
94
- "@powerlines/core": "^0.13.15",
93
+ "@powerlines/core": "^0.13.17",
95
94
  "@storm-software/config-tools": "^1.189.77",
96
95
  "@stryke/fs": "^0.33.66",
97
96
  "@stryke/path": "^0.27.4",
@@ -105,48 +104,14 @@
105
104
  "@types/babel__helper-plugin-utils": "^7.10.3",
106
105
  "@types/node": "^25.6.0"
107
106
  },
108
- "peerDependencies": { "@babel/plugin-syntax-typescript": ">=8.0.0-rc.3" },
109
- "peerDependenciesMeta": {
110
- "@babel/plugin-syntax-typescript": { "optional": false }
107
+ "peerDependencies": {
108
+ "@babel/plugin-syntax-jsx": ">=8.0.0-rc.3",
109
+ "@babel/plugin-syntax-typescript": ">=8.0.0-rc.3"
111
110
  },
112
- "publishConfig": {
113
- "access": "public",
114
- "exports": {
115
- ".": { "require": "./dist/index.cjs", "import": "./dist/index.mjs" },
116
- "./helpers": {
117
- "require": "./dist/helpers/index.cjs",
118
- "import": "./dist/helpers/index.mjs"
119
- },
120
- "./helpers/ast-utils": {
121
- "require": "./dist/helpers/ast-utils.cjs",
122
- "import": "./dist/helpers/ast-utils.mjs"
123
- },
124
- "./helpers/create-plugin": {
125
- "require": "./dist/helpers/create-plugin.cjs",
126
- "import": "./dist/helpers/create-plugin.mjs"
127
- },
128
- "./helpers/filters": {
129
- "require": "./dist/helpers/filters.cjs",
130
- "import": "./dist/helpers/filters.mjs"
131
- },
132
- "./helpers/module-helpers": {
133
- "require": "./dist/helpers/module-helpers.cjs",
134
- "import": "./dist/helpers/module-helpers.mjs"
135
- },
136
- "./helpers/options": {
137
- "require": "./dist/helpers/options.cjs",
138
- "import": "./dist/helpers/options.mjs"
139
- },
140
- "./types": {
141
- "require": "./dist/types/index.cjs",
142
- "import": "./dist/types/index.mjs"
143
- },
144
- "./types/plugin": {
145
- "require": "./dist/types/plugin.cjs",
146
- "import": "./dist/types/plugin.mjs"
147
- },
148
- "./package.json": "./package.json"
149
- }
111
+ "peerDependenciesMeta": {
112
+ "@babel/plugin-syntax-jsx": { "optional": true },
113
+ "@babel/plugin-syntax-typescript": { "optional": true }
150
114
  },
151
- "gitHead": "20f2c6b5e4a07b06620c8c98d83bb3b31503c426"
115
+ "publishConfig": { "access": "public" },
116
+ "gitHead": "d1efec5f9dce59e05c091b222a91b6b8ba5885d7"
152
117
  }