@powerlines/plugin-rollup 0.7.453 → 0.7.456

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.
@@ -10,7 +10,7 @@ function createRollupPlugin(context) {
10
10
  name: "rollup"
11
11
  }))({
12
12
  ...context.options,
13
- ...context.initialConfig
13
+ ...context.config.initialConfig
14
14
  });
15
15
  }
16
16
 
@@ -8,7 +8,7 @@ function createRollupPlugin(context) {
8
8
  name: "rollup"
9
9
  }))({
10
10
  ...context.options,
11
- ...context.initialConfig
11
+ ...context.config.initialConfig
12
12
  });
13
13
  }
14
14
 
@@ -1 +1 @@
1
- {"version":3,"file":"unplugin.mjs","names":[],"sources":["../../src/helpers/unplugin.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 { createUnplugin } from \"@powerlines/core/lib/unplugin\";\nimport { createEsbuildPlugin } from \"unplugin\";\nimport { RollupPluginContext } from \"../types/plugin\";\n\nexport function createRollupPlugin(context: RollupPluginContext) {\n return createEsbuildPlugin(\n createUnplugin(context, { silenceHookLogging: true, name: \"rollup\" })\n )({ ...context.options, ...context.initialConfig });\n}\n"],"mappings":";;;;AAsBA,SAAgB,mBAAmB,SAA8B;AAC/D,QAAO,oBACL,eAAe,SAAS;EAAE,oBAAoB;EAAM,MAAM;EAAU,CAAC,CACtE,CAAC;EAAE,GAAG,QAAQ;EAAS,GAAG,QAAQ;EAAe,CAAC"}
1
+ {"version":3,"file":"unplugin.mjs","names":[],"sources":["../../src/helpers/unplugin.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 { createUnplugin } from \"@powerlines/core/lib/unplugin\";\nimport { createEsbuildPlugin } from \"unplugin\";\nimport { RollupPluginContext } from \"../types/plugin\";\n\nexport function createRollupPlugin(context: RollupPluginContext) {\n return createEsbuildPlugin(\n createUnplugin(context, { silenceHookLogging: true, name: \"rollup\" })\n )({ ...context.options, ...context.config.initialConfig });\n}\n"],"mappings":";;;;AAsBA,SAAgB,mBAAmB,SAA8B;AAC/D,QAAO,oBACL,eAAe,SAAS;EAAE,oBAAoB;EAAM,MAAM;EAAU,CAAC,CACtE,CAAC;EAAE,GAAG,QAAQ;EAAS,GAAG,QAAQ,OAAO;EAAe,CAAC"}
package/dist/index.cjs CHANGED
@@ -3,8 +3,8 @@ const require_runtime = require('./_virtual/_rolldown/runtime.cjs');
3
3
  const require_helpers_resolve_options = require('./helpers/resolve-options.cjs');
4
4
  const require_helpers_unplugin = require('./helpers/unplugin.cjs');
5
5
  require('./helpers/index.cjs');
6
+ let _powerlines_core_plugin_utils = require("@powerlines/core/plugin-utils");
6
7
  let _stryke_convert_to_array = require("@stryke/convert/to-array");
7
- let _stryke_helpers_omit = require("@stryke/helpers/omit");
8
8
  let defu = require("defu");
9
9
  defu = require_runtime.__toESM(defu, 1);
10
10
  let rollup = require("rollup");
@@ -27,7 +27,7 @@ const plugin = (options = {}) => {
27
27
  const options = (0, defu.default)({ plugins: [require_helpers_unplugin.createRollupPlugin(this)] }, require_helpers_resolve_options.resolveOptions(this));
28
28
  this.debug({
29
29
  meta: { category: "config" },
30
- message: `Resolved Rollup configuration: \n${JSON.stringify((0, _stryke_helpers_omit.omit)(options, ["plugins"]), null, 2)}`
30
+ message: `Resolved Rollup configuration: \n${(0, _powerlines_core_plugin_utils.formatConfig)(options)}`
31
31
  });
32
32
  const result = await (0, rollup.rollup)(options);
33
33
  await Promise.all((0, _stryke_convert_to_array.toArray)(this.config.output.format).map(async (format) => result.write({ format })));
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { dtsBundlePlugin, resolveOptions } from "./helpers/resolve-options.mjs";
2
2
  import { createRollupPlugin } from "./helpers/unplugin.mjs";
3
3
  import "./helpers/index.mjs";
4
+ import { formatConfig } from "@powerlines/core/plugin-utils";
4
5
  import { toArray } from "@stryke/convert/to-array";
5
- import { omit } from "@stryke/helpers/omit";
6
6
  import defu from "defu";
7
7
  import { rollup } from "rollup";
8
8
 
@@ -24,7 +24,7 @@ const plugin = (options = {}) => {
24
24
  const options = defu({ plugins: [createRollupPlugin(this)] }, resolveOptions(this));
25
25
  this.debug({
26
26
  meta: { category: "config" },
27
- message: `Resolved Rollup configuration: \n${JSON.stringify(omit(options, ["plugins"]), null, 2)}`
27
+ message: `Resolved Rollup configuration: \n${formatConfig(options)}`
28
28
  });
29
29
  const result = await rollup(options);
30
30
  await Promise.all(toArray(this.config.output.format).map(async (format) => result.write({ format })));
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["build"],"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 { Plugin } from \"@powerlines/core\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport { omit } from \"@stryke/helpers/omit\";\nimport defu from \"defu\";\nimport { rollup as build } from \"rollup\";\nimport { resolveOptions } from \"./helpers\";\nimport { createRollupPlugin } from \"./helpers/unplugin\";\nimport { RollupPluginContext, RollupPluginOptions } from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface Config {\n rollup?: RollupPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <\n TContext extends RollupPluginContext = RollupPluginContext\n>(\n options: RollupPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"rollup\",\n config() {\n return {\n output: {\n format: [\"cjs\", \"esm\"]\n },\n rollup: {\n ...options\n }\n };\n },\n async build() {\n this.debug(\"Starting Rollup build process...\");\n\n const options = defu(\n {\n plugins: [createRollupPlugin(this)]\n },\n resolveOptions(this)\n );\n\n this.debug({\n meta: {\n category: \"config\"\n },\n message: `Resolved Rollup configuration: \\n${JSON.stringify(\n omit(options, [\"plugins\"]),\n null,\n 2\n )}`\n });\n\n const result = await build(options);\n\n await Promise.all(\n toArray(this.config.output.format).map(async format =>\n result.write({\n format\n })\n )\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;AAuCA,MAAa,UAGX,UAA+B,EAAE,KACZ;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO;IACL,QAAQ,EACN,QAAQ,CAAC,OAAO,MAAM,EACvB;IACD,QAAQ,EACN,GAAG,SACJ;IACF;;EAEH,MAAM,QAAQ;AACZ,QAAK,MAAM,mCAAmC;GAE9C,MAAM,UAAU,KACd,EACE,SAAS,CAAC,mBAAmB,KAAK,CAAC,EACpC,EACD,eAAe,KAAK,CACrB;AAED,QAAK,MAAM;IACT,MAAM,EACJ,UAAU,UACX;IACD,SAAS,oCAAoC,KAAK,UAChD,KAAK,SAAS,CAAC,UAAU,CAAC,EAC1B,MACA,EACD;IACF,CAAC;GAEF,MAAM,SAAS,MAAMA,OAAM,QAAQ;AAEnC,SAAM,QAAQ,IACZ,QAAQ,KAAK,OAAO,OAAO,OAAO,CAAC,IAAI,OAAM,WAC3C,OAAO,MAAM,EACX,QACD,CAAC,CACH,CACF;;EAEJ"}
1
+ {"version":3,"file":"index.mjs","names":["build"],"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 { Plugin } from \"@powerlines/core\";\nimport { formatConfig } from \"@powerlines/core/plugin-utils\";\nimport { toArray } from \"@stryke/convert/to-array\";\nimport defu from \"defu\";\nimport { rollup as build } from \"rollup\";\nimport { resolveOptions } from \"./helpers\";\nimport { createRollupPlugin } from \"./helpers/unplugin\";\nimport { RollupPluginContext, RollupPluginOptions } from \"./types/plugin\";\n\nexport * from \"./helpers\";\nexport * from \"./types\";\n\ndeclare module \"@powerlines/core\" {\n interface Config {\n rollup?: RollupPluginOptions;\n }\n}\n\n/**\n * A Powerlines plugin to assist in developing other Powerlines plugins.\n */\nexport const plugin = <\n TContext extends RollupPluginContext = RollupPluginContext\n>(\n options: RollupPluginOptions = {}\n): Plugin<TContext> => {\n return {\n name: \"rollup\",\n config() {\n return {\n output: {\n format: [\"cjs\", \"esm\"]\n },\n rollup: {\n ...options\n }\n };\n },\n async build() {\n this.debug(\"Starting Rollup build process...\");\n\n const options = defu(\n {\n plugins: [createRollupPlugin(this)]\n },\n resolveOptions(this)\n );\n\n this.debug({\n meta: {\n category: \"config\"\n },\n message: `Resolved Rollup configuration: \\n${formatConfig(options)}`\n });\n\n const result = await build(options);\n\n await Promise.all(\n toArray(this.config.output.format).map(async format =>\n result.write({\n format\n })\n )\n );\n }\n };\n};\n\nexport default plugin;\n"],"mappings":";;;;;;;;;;;;AAuCA,MAAa,UAGX,UAA+B,EAAE,KACZ;AACrB,QAAO;EACL,MAAM;EACN,SAAS;AACP,UAAO;IACL,QAAQ,EACN,QAAQ,CAAC,OAAO,MAAM,EACvB;IACD,QAAQ,EACN,GAAG,SACJ;IACF;;EAEH,MAAM,QAAQ;AACZ,QAAK,MAAM,mCAAmC;GAE9C,MAAM,UAAU,KACd,EACE,SAAS,CAAC,mBAAmB,KAAK,CAAC,EACpC,EACD,eAAe,KAAK,CACrB;AAED,QAAK,MAAM;IACT,MAAM,EACJ,UAAU,UACX;IACD,SAAS,oCAAoC,aAAa,QAAQ;IACnE,CAAC;GAEF,MAAM,SAAS,MAAMA,OAAM,QAAQ;AAEnC,SAAM,QAAQ,IACZ,QAAQ,KAAK,OAAO,OAAO,OAAO,CAAC,IAAI,OAAM,WAC3C,OAAO,MAAM,EACX,QACD,CAAC,CACH,CACF;;EAEJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-rollup",
3
- "version": "0.7.453",
3
+ "version": "0.7.456",
4
4
  "private": false,
5
5
  "description": "A package containing a Powerlines plugin to assist in developing other Powerlines plugins.",
6
6
  "keywords": ["rollup", "powerlines", "storm-software", "powerlines-plugin"],
@@ -73,8 +73,8 @@
73
73
  "typings": "dist/index.d.mts",
74
74
  "files": ["dist/**/*"],
75
75
  "dependencies": {
76
- "@powerlines/core": "^0.46.5",
77
- "@powerlines/plugin-babel": "^0.12.451",
76
+ "@powerlines/core": "^0.47.0",
77
+ "@powerlines/plugin-babel": "^0.12.454",
78
78
  "@rollup/plugin-alias": "^6.0.0",
79
79
  "@rollup/plugin-babel": "^7.0.0",
80
80
  "@rollup/plugin-inject": "^5.0.5",
@@ -95,5 +95,5 @@
95
95
  "peerDependencies": { "rollup": ">=4.46.4" },
96
96
  "peerDependenciesMeta": { "rollup": { "optional": false } },
97
97
  "publishConfig": { "access": "public" },
98
- "gitHead": "9af888c54e58a82744cc334a6b80da52429fa0ac"
98
+ "gitHead": "3ffdf81ad60da786acd42f9b750df6c7837f8003"
99
99
  }