rolldown 0.10.5 → 0.11.0

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,18 +1,16 @@
1
1
  import __node_module__ from 'node:module';
2
2
  const require = __node_module__.createRequire(import.meta.url)
3
- import "../shared/bindingify_plugin-gPrr_HPR.mjs";
4
- import { BuiltinWasmPlugin, experimental_scan, rolldown } from "../shared/rolldown-bgokD9pg.mjs";
3
+ import { BuiltinGlobImportPlugin, BuiltinWasmPlugin, __toESM, require_binding } from "../shared/utils_index-DAvBTBzR.mjs";
4
+ import { experimental_scan, rolldown } from "../shared/rolldown-RjvHfXoR.mjs";
5
5
  import { pathToFileURL } from "node:url";
6
6
 
7
7
  //#region src/plugin/index.ts
8
8
  function defineParallelPlugin(pluginPath) {
9
- return options => {
10
- return {
11
- _parallel:{
12
- fileUrl:pathToFileURL(pluginPath).href,
13
- options
14
- }
15
- };
9
+ return (options) => {
10
+ return {_parallel: {
11
+ fileUrl: pathToFileURL(pluginPath).href,
12
+ options
13
+ }};
16
14
  };
17
15
  }
18
16
 
@@ -23,4 +21,9 @@ function defineConfig(config) {
23
21
  }
24
22
 
25
23
  //#endregion
26
- export { BuiltinWasmPlugin, defineConfig, defineParallelPlugin, experimental_scan, rolldown };
24
+ //#region src/index.ts
25
+ var import_binding = __toESM(require_binding());
26
+
27
+ //#endregion
28
+ var transform = import_binding.transform;
29
+ export { BuiltinGlobImportPlugin, BuiltinWasmPlugin, defineConfig, defineParallelPlugin, experimental_scan, rolldown, transform };
@@ -1,35 +1,33 @@
1
1
  import __node_module__ from 'node:module';
2
2
  const require = __node_module__.createRequire(import.meta.url)
3
- import { __toESM, bindingifyPlugin, require_binding } from "../shared/bindingify_plugin-gPrr_HPR.mjs";
3
+ import { __toESM, bindingifyPlugin, require_binding } from "../shared/utils_index-DAvBTBzR.mjs";
4
4
  import { parentPort, workerData } from "node:worker_threads";
5
5
 
6
6
  //#region src/parallel-plugin-worker.ts
7
7
  var import_binding = __toESM(require_binding());
8
- const {registryId, pluginInfos, threadNumber} = workerData;
9
- (async() => {
10
- try{
11
- const plugins = await Promise.all(pluginInfos.map(async pluginInfo => {
8
+ const { registryId, pluginInfos, threadNumber } = workerData;
9
+ (async () => {
10
+ try {
11
+ const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
12
12
  const pluginModule = await import(pluginInfo.fileUrl);
13
13
  const definePluginImpl = pluginModule.default;
14
- const plugin = await definePluginImpl(pluginInfo.options, {
15
- threadNumber
16
- });
14
+ const plugin = await definePluginImpl(pluginInfo.options, {threadNumber});
17
15
  return {
18
- index:pluginInfo.index,
19
- plugin:bindingifyPlugin(plugin, {}, {})
16
+ index: pluginInfo.index,
17
+ plugin: bindingifyPlugin(plugin, {}, {})
20
18
  };
21
19
  }));
22
- (0,import_binding.registerPlugins)(registryId, plugins);
20
+ (0, import_binding.registerPlugins)(registryId, plugins);
21
+ parentPort.postMessage({type: 'success'});
22
+ } catch (error) {
23
23
  parentPort.postMessage({
24
- type:'success'
25
- });
26
- }catch(error){
27
- parentPort.postMessage({
28
- type:'error',
24
+ type: 'error',
29
25
  error
30
26
  });
31
- }finally{
27
+ }
28
+ finally {
32
29
  parentPort.unref();
33
- }})();
30
+ }
31
+ })();
34
32
 
35
33
  //#endregion
@@ -7,34 +7,28 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
8
  var __getProtoOf = Object.getPrototypeOf;
9
9
  var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = {
11
- exports:{}
12
- }).exports, mod),mod.exports);
10
+ var __commonJSMin = (cb, mod) => () => (mod || cb((mod = {exports: {}}).exports, mod), mod.exports);
13
11
  var __export = (target, all) => {
14
- for (var name in all) __defProp(target, name, {
15
- get:all[name],
16
- enumerable:true
12
+ for (var name in all) __defProp(target, name, {
13
+ get: all[name],
14
+ enumerable: true
17
15
  });
18
16
  };
19
17
  var __copyProps = (to, from, except, desc) => {
20
- if (from && typeof from === 'object' || typeof from === 'function') for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
18
+ if (from && typeof from === 'object' || typeof from === 'function') for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
21
19
  key = keys[i];
22
- if ( !__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
23
- get:(k => from[k]).bind(null, key),
20
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
21
+ get: ((k) => from[k]).bind(null, key),
24
22
  enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
25
23
  });
26
-
27
24
  }
28
-
29
25
  return to;
30
26
  };
31
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {},__copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, 'default', {
32
- value:mod,
33
- enumerable:true
27
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, 'default', {
28
+ value: mod,
29
+ enumerable: true
34
30
  }) : target, mod));
35
- var __toCommonJS = mod => __copyProps(__defProp({}, '__esModule', {
36
- value:true
37
- }), mod);
31
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, '__esModule', {value: true}), mod);
38
32
 
39
33
  //#endregion
40
34