@powerlines/plugin-babel 0.12.434 → 0.12.436

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.
@@ -17,10 +17,7 @@ function createBabelPlugin(name, builder) {
17
17
  return (0, _babel_helper_plugin_utils.declare)((api, options, dirname) => {
18
18
  api.cache.using(() => context.meta.checksum);
19
19
  api.assertVersion("^8.0.0-0");
20
- const logger = context.extendLogger({
21
- source: name,
22
- category: "babel"
23
- });
20
+ const logger = context.extendLogger({ category: "babel" });
24
21
  logger.trace(`Initializing the ${chalk.default.bold.cyanBright(name)} Babel plugin`);
25
22
  const result = builder({
26
23
  logger,
@@ -14,10 +14,7 @@ function createBabelPlugin(name, builder) {
14
14
  return declare((api, options, dirname) => {
15
15
  api.cache.using(() => context.meta.checksum);
16
16
  api.assertVersion("^8.0.0-0");
17
- const logger = context.extendLogger({
18
- source: name,
19
- category: "babel"
20
- });
17
+ const logger = context.extendLogger({ category: "babel" });
21
18
  logger.trace(`Initializing the ${chalk.bold.cyanBright(name)} Babel plugin`);
22
19
  const result = builder({
23
20
  logger,
@@ -1 +1 @@
1
- {"version":3,"file":"create-plugin.mjs","names":[],"sources":["../../src/helpers/create-plugin.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 { declare } from \"@babel/helper-plugin-utils\";\nimport type { Context } from \"@powerlines/core\";\nimport chalk from \"chalk\";\nimport type {\n BabelTransformPluginBuilder,\n DeclareBabelTransformPluginReturn\n} from \"../types/config\";\n\n/**\n * Create a Babel plugin using the provided builder function.\n *\n * @param name - The name of the plugin.\n * @param builder - The builder function that defines the plugin behavior.\n * @returns A Babel plugin declaration.\n */\nexport function createBabelPlugin<\n TContext extends Context = Context,\n TOptions extends object = object\n>(\n name: string,\n builder: BabelTransformPluginBuilder<TContext, TOptions>\n): DeclareBabelTransformPluginReturn<TContext, TOptions> {\n const plugin = (context: TContext) => {\n return declare<TOptions>((api, options, dirname) => {\n api.cache.using(() => context.meta.checksum);\n api.assertVersion(\"^8.0.0-0\");\n\n const logger = context.extendLogger({ source: name, category: \"babel\" });\n logger.trace(\n `Initializing the ${chalk.bold.cyanBright(name)} Babel plugin`\n );\n\n const result = builder({\n logger,\n name,\n api,\n options: options as TOptions,\n context,\n dirname\n });\n result.name = name;\n\n logger.trace(\n `Completed initialization of the ${chalk.bold.cyanBright(name)} Babel plugin`\n );\n\n return result;\n });\n };\n plugin.$$name = name;\n\n return plugin;\n}\n"],"mappings":";;;;;;;;;;;AAiCA,SAAgB,kBAId,MACA,SACuD;CACvD,MAAM,UAAU,YAAsB;AACpC,SAAO,SAAmB,KAAK,SAAS,YAAY;AAClD,OAAI,MAAM,YAAY,QAAQ,KAAK,SAAS;AAC5C,OAAI,cAAc,WAAW;GAE7B,MAAM,SAAS,QAAQ,aAAa;IAAE,QAAQ;IAAM,UAAU;IAAS,CAAC;AACxE,UAAO,MACL,oBAAoB,MAAM,KAAK,WAAW,KAAK,CAAC,eACjD;GAED,MAAM,SAAS,QAAQ;IACrB;IACA;IACA;IACS;IACT;IACA;IACD,CAAC;AACF,UAAO,OAAO;AAEd,UAAO,MACL,mCAAmC,MAAM,KAAK,WAAW,KAAK,CAAC,eAChE;AAED,UAAO;IACP;;AAEJ,QAAO,SAAS;AAEhB,QAAO"}
1
+ {"version":3,"file":"create-plugin.mjs","names":[],"sources":["../../src/helpers/create-plugin.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 { declare } from \"@babel/helper-plugin-utils\";\nimport type { Context } from \"@powerlines/core\";\nimport chalk from \"chalk\";\nimport type {\n BabelTransformPluginBuilder,\n DeclareBabelTransformPluginReturn\n} from \"../types/config\";\n\n/**\n * Create a Babel plugin using the provided builder function.\n *\n * @param name - The name of the plugin.\n * @param builder - The builder function that defines the plugin behavior.\n * @returns A Babel plugin declaration.\n */\nexport function createBabelPlugin<\n TContext extends Context = Context,\n TOptions extends object = object\n>(\n name: string,\n builder: BabelTransformPluginBuilder<TContext, TOptions>\n): DeclareBabelTransformPluginReturn<TContext, TOptions> {\n const plugin = (context: TContext) => {\n return declare<TOptions>((api, options, dirname) => {\n api.cache.using(() => context.meta.checksum);\n api.assertVersion(\"^8.0.0-0\");\n\n const logger = context.extendLogger({ category: \"babel\" });\n logger.trace(\n `Initializing the ${chalk.bold.cyanBright(name)} Babel plugin`\n );\n\n const result = builder({\n logger,\n name,\n api,\n options: options as TOptions,\n context,\n dirname\n });\n result.name = name;\n\n logger.trace(\n `Completed initialization of the ${chalk.bold.cyanBright(name)} Babel plugin`\n );\n\n return result;\n });\n };\n plugin.$$name = name;\n\n return plugin;\n}\n"],"mappings":";;;;;;;;;;;AAiCA,SAAgB,kBAId,MACA,SACuD;CACvD,MAAM,UAAU,YAAsB;AACpC,SAAO,SAAmB,KAAK,SAAS,YAAY;AAClD,OAAI,MAAM,YAAY,QAAQ,KAAK,SAAS;AAC5C,OAAI,cAAc,WAAW;GAE7B,MAAM,SAAS,QAAQ,aAAa,EAAE,UAAU,SAAS,CAAC;AAC1D,UAAO,MACL,oBAAoB,MAAM,KAAK,WAAW,KAAK,CAAC,eACjD;GAED,MAAM,SAAS,QAAQ;IACrB;IACA;IACA;IACS;IACT;IACA;IACD,CAAC;AACF,UAAO,OAAO;AAEd,UAAO,MACL,mCAAmC,MAAM,KAAK,WAAW,KAAK,CAAC,eAChE;AAED,UAAO;IACP;;AAEJ,QAAO,SAAS;AAEhB,QAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-babel",
3
- "version": "0.12.434",
3
+ "version": "0.12.436",
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"],
@@ -90,8 +90,8 @@
90
90
  "@babel/helper-plugin-utils": "8.0.0-rc.3",
91
91
  "@babel/parser": "8.0.0-rc.3",
92
92
  "@babel/types": "8.0.0-rc.3",
93
- "@powerlines/core": "^0.44.5",
94
- "@storm-software/config-tools": "^1.189.78",
93
+ "@powerlines/core": "^0.44.7",
94
+ "@storm-software/config-tools": "^1.190.1",
95
95
  "@stryke/fs": "^0.33.69",
96
96
  "@stryke/path": "^0.28.1",
97
97
  "@stryke/type-checks": "^0.6.4",
@@ -113,5 +113,5 @@
113
113
  "@babel/plugin-syntax-typescript": { "optional": true }
114
114
  },
115
115
  "publishConfig": { "access": "public" },
116
- "gitHead": "672cc82bbb3cafa1672b6c70ae4209f0aa7417e0"
116
+ "gitHead": "81813b5033a0de08888d653195e4f97deb3897fc"
117
117
  }