rolldown 1.0.0-beta.3-commit.1910872 → 1.0.0-beta.3-commit.93d8731

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/dist/cjs/cli.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-C1zNiq4e.cjs');
3
+ const require_src = require('../shared/src-CFnF45HT.cjs');
4
4
  const require_parse_ast_index = require('../shared/parse-ast-index-p24sJjY3.cjs');
5
5
  const node_process = require_chunk.__toESM(require("node:process"));
6
6
  const node_path = require_chunk.__toESM(require("node:path"));
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-C1zNiq4e.cjs');
3
+ const require_src = require('../shared/src-CFnF45HT.cjs');
4
4
  const require_parse_ast_index = require('../shared/parse-ast-index-p24sJjY3.cjs');
5
5
  const node_url = require_chunk.__toESM(require("node:url"));
6
6
 
@@ -1,4 +1,4 @@
1
- const require_src = require('../shared/src-C1zNiq4e.cjs');
1
+ const require_src = require('../shared/src-CFnF45HT.cjs');
2
2
  require('../shared/parse-ast-index-p24sJjY3.cjs');
3
3
 
4
4
  exports.VERSION = require_src.VERSION
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('../shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('../shared/src-C1zNiq4e.cjs');
3
+ const require_src = require('../shared/src-CFnF45HT.cjs');
4
4
  const require_parse_ast_index = require('../shared/parse-ast-index-p24sJjY3.cjs');
5
5
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
6
6
 
package/dist/esm/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { colors } from "../shared/parse-ast-index-BDY-7XFT.mjs";
2
- import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-Dq13eLWi.mjs";
2
+ import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-D3KcZYs5.mjs";
3
3
  import process$1, { cwd } from "node:process";
4
4
  import path, { sep } from "node:path";
5
5
  import fs from "node:fs";
@@ -1,5 +1,5 @@
1
1
  import { import_binding } from "../shared/parse-ast-index-BDY-7XFT.mjs";
2
- import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-Dq13eLWi.mjs";
2
+ import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-D3KcZYs5.mjs";
3
3
  import { pathToFileURL } from "node:url";
4
4
 
5
5
  //#region src/plugin/parallel-plugin.ts
@@ -1,4 +1,4 @@
1
1
  import "../shared/parse-ast-index-BDY-7XFT.mjs";
2
- import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-Dq13eLWi.mjs";
2
+ import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-D3KcZYs5.mjs";
3
3
 
4
4
  export { VERSION, build, defineConfig, rolldown, watch };
@@ -1,5 +1,5 @@
1
1
  import { import_binding } from "../shared/parse-ast-index-BDY-7XFT.mjs";
2
- import { PluginContextData, bindingifyPlugin } from "../shared/src-Dq13eLWi.mjs";
2
+ import { PluginContextData, bindingifyPlugin } from "../shared/src-D3KcZYs5.mjs";
3
3
  import { parentPort, workerData } from "node:worker_threads";
4
4
 
5
5
  //#region src/parallel-plugin-worker.ts
@@ -2431,8 +2431,8 @@ const OutputOptionsSchema = valibot.strictObject({
2431
2431
  minify: valibot.pipe(valibot.optional(valibot.union([valibot.boolean(), MinifyOptionsSchema])), valibot.description("Minify the bundled file")),
2432
2432
  name: valibot.pipe(valibot.optional(valibot.string()), valibot.description("Name for UMD / IIFE format outputs")),
2433
2433
  globals: valibot.pipe(valibot.optional(valibot.union([valibot.record(valibot.string(), valibot.string()), GlobalsFunctionSchema])), valibot.description("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),
2434
- externalLiveBindings: valibot.pipe(valibot.optional(valibot.boolean(), true), valibot.description("external live bindings")),
2435
- inlineDynamicImports: valibot.pipe(valibot.optional(valibot.boolean(), false), valibot.description("Inline dynamic imports")),
2434
+ externalLiveBindings: valibot.pipe(valibot.optional(valibot.boolean()), valibot.description("external live bindings")),
2435
+ inlineDynamicImports: valibot.pipe(valibot.optional(valibot.boolean()), valibot.description("Inline dynamic imports")),
2436
2436
  advancedChunks: valibot.optional(AdvancedChunksSchema),
2437
2437
  comments: valibot.pipe(valibot.optional(valibot.union([valibot.literal("none"), valibot.literal("preserve-legal")])), valibot.description("Control comments in the output")),
2438
2438
  target: valibot.pipe(valibot.optional(valibot.enum(ESTarget)), valibot.description("The JavaScript target environment"))
@@ -2488,13 +2488,13 @@ function getJsonSchema() {
2488
2488
 
2489
2489
  //#endregion
2490
2490
  //#region src/utils/create-bundler-option.ts
2491
- async function createBundlerOptions(inputOptions, outputOptions) {
2491
+ async function createBundlerOptions(inputOptions, outputOptions, isClose) {
2492
2492
  if (inputOptions.treeshake !== void 0) validateTreeShakingOptions(inputOptions.treeshake);
2493
2493
  const inputPlugins = await normalizePluginOption(inputOptions.plugins);
2494
2494
  const outputPlugins = await normalizePluginOption(outputOptions.plugins);
2495
2495
  const logLevel = inputOptions.logLevel || LOG_LEVEL_INFO;
2496
2496
  const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel);
2497
- outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions);
2497
+ if (!isClose) outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions);
2498
2498
  if (outputOptions.minify === true) onLog(LOG_LEVEL_WARN, require_parse_ast_index.logMinifyWarning());
2499
2499
  const normalizedOutputPlugins = await normalizePluginOption(outputOptions.plugins);
2500
2500
  let plugins = [...normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX), ...checkOutputPluginOption(normalizePlugins(normalizedOutputPlugins, ANONYMOUS_OUTPUT_PLUGIN_PREFIX), onLog)];
@@ -2521,8 +2521,8 @@ async function createBundlerOptions(inputOptions, outputOptions) {
2521
2521
 
2522
2522
  //#endregion
2523
2523
  //#region src/utils/create-bundler.ts
2524
- async function createBundler(inputOptions, outputOptions) {
2525
- const option = await createBundlerOptions(inputOptions, outputOptions);
2524
+ async function createBundler(inputOptions, outputOptions, isClose) {
2525
+ const option = await createBundlerOptions(inputOptions, outputOptions, isClose);
2526
2526
  try {
2527
2527
  return {
2528
2528
  bundler: new require_parse_ast_index.import_binding.Bundler(option.bundlerOptions),
@@ -2546,9 +2546,9 @@ var RolldownBuild = class {
2546
2546
  get closed() {
2547
2547
  return this.#bundler ? this.#bundler.bundler.closed : false;
2548
2548
  }
2549
- async #getBundlerWithStopWorker(outputOptions) {
2549
+ async #getBundlerWithStopWorker(outputOptions, isClose) {
2550
2550
  if (this.#bundler) this.#bundler.stopWorkers?.();
2551
- return this.#bundler = await createBundler(this.#inputOptions, outputOptions);
2551
+ return this.#bundler = await createBundler(this.#inputOptions, outputOptions, isClose);
2552
2552
  }
2553
2553
  async generate(outputOptions = {}) {
2554
2554
  const { bundler } = await this.#getBundlerWithStopWorker(outputOptions);
@@ -2561,7 +2561,7 @@ var RolldownBuild = class {
2561
2561
  return transformToRollupOutput(output);
2562
2562
  }
2563
2563
  async close() {
2564
- const { bundler, stopWorkers } = await this.#getBundlerWithStopWorker({});
2564
+ const { bundler, stopWorkers } = await this.#getBundlerWithStopWorker({}, true);
2565
2565
  await stopWorkers?.();
2566
2566
  await bundler.close();
2567
2567
  }
@@ -2701,7 +2701,7 @@ const watch = (input) => {
2701
2701
 
2702
2702
  //#endregion
2703
2703
  //#region package.json
2704
- var version = "1.0.0-beta.3-commit.1910872";
2704
+ var version = "1.0.0-beta.3-commit.93d8731";
2705
2705
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
2706
2706
 
2707
2707
  //#endregion
@@ -2429,8 +2429,8 @@ const OutputOptionsSchema = v.strictObject({
2429
2429
  minify: v.pipe(v.optional(v.union([v.boolean(), MinifyOptionsSchema])), v.description("Minify the bundled file")),
2430
2430
  name: v.pipe(v.optional(v.string()), v.description("Name for UMD / IIFE format outputs")),
2431
2431
  globals: v.pipe(v.optional(v.union([v.record(v.string(), v.string()), GlobalsFunctionSchema])), v.description("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),
2432
- externalLiveBindings: v.pipe(v.optional(v.boolean(), true), v.description("external live bindings")),
2433
- inlineDynamicImports: v.pipe(v.optional(v.boolean(), false), v.description("Inline dynamic imports")),
2432
+ externalLiveBindings: v.pipe(v.optional(v.boolean()), v.description("external live bindings")),
2433
+ inlineDynamicImports: v.pipe(v.optional(v.boolean()), v.description("Inline dynamic imports")),
2434
2434
  advancedChunks: v.optional(AdvancedChunksSchema),
2435
2435
  comments: v.pipe(v.optional(v.union([v.literal("none"), v.literal("preserve-legal")])), v.description("Control comments in the output")),
2436
2436
  target: v.pipe(v.optional(v.enum(ESTarget)), v.description("The JavaScript target environment"))
@@ -2486,13 +2486,13 @@ function getJsonSchema() {
2486
2486
 
2487
2487
  //#endregion
2488
2488
  //#region src/utils/create-bundler-option.ts
2489
- async function createBundlerOptions(inputOptions, outputOptions) {
2489
+ async function createBundlerOptions(inputOptions, outputOptions, isClose) {
2490
2490
  if (inputOptions.treeshake !== void 0) validateTreeShakingOptions(inputOptions.treeshake);
2491
2491
  const inputPlugins = await normalizePluginOption(inputOptions.plugins);
2492
2492
  const outputPlugins = await normalizePluginOption(outputOptions.plugins);
2493
2493
  const logLevel = inputOptions.logLevel || LOG_LEVEL_INFO;
2494
2494
  const onLog = getLogger(getObjectPlugins(inputPlugins), getOnLog(inputOptions, logLevel), logLevel);
2495
- outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions);
2495
+ if (!isClose) outputOptions = PluginDriver.callOutputOptionsHook([...inputPlugins, ...outputPlugins], outputOptions);
2496
2496
  if (outputOptions.minify === true) onLog(LOG_LEVEL_WARN, logMinifyWarning());
2497
2497
  const normalizedOutputPlugins = await normalizePluginOption(outputOptions.plugins);
2498
2498
  let plugins = [...normalizePlugins(inputPlugins, ANONYMOUS_PLUGIN_PREFIX), ...checkOutputPluginOption(normalizePlugins(normalizedOutputPlugins, ANONYMOUS_OUTPUT_PLUGIN_PREFIX), onLog)];
@@ -2519,8 +2519,8 @@ async function createBundlerOptions(inputOptions, outputOptions) {
2519
2519
 
2520
2520
  //#endregion
2521
2521
  //#region src/utils/create-bundler.ts
2522
- async function createBundler(inputOptions, outputOptions) {
2523
- const option = await createBundlerOptions(inputOptions, outputOptions);
2522
+ async function createBundler(inputOptions, outputOptions, isClose) {
2523
+ const option = await createBundlerOptions(inputOptions, outputOptions, isClose);
2524
2524
  try {
2525
2525
  return {
2526
2526
  bundler: new import_binding.Bundler(option.bundlerOptions),
@@ -2544,9 +2544,9 @@ var RolldownBuild = class {
2544
2544
  get closed() {
2545
2545
  return this.#bundler ? this.#bundler.bundler.closed : false;
2546
2546
  }
2547
- async #getBundlerWithStopWorker(outputOptions) {
2547
+ async #getBundlerWithStopWorker(outputOptions, isClose) {
2548
2548
  if (this.#bundler) this.#bundler.stopWorkers?.();
2549
- return this.#bundler = await createBundler(this.#inputOptions, outputOptions);
2549
+ return this.#bundler = await createBundler(this.#inputOptions, outputOptions, isClose);
2550
2550
  }
2551
2551
  async generate(outputOptions = {}) {
2552
2552
  const { bundler } = await this.#getBundlerWithStopWorker(outputOptions);
@@ -2559,7 +2559,7 @@ var RolldownBuild = class {
2559
2559
  return transformToRollupOutput(output);
2560
2560
  }
2561
2561
  async close() {
2562
- const { bundler, stopWorkers } = await this.#getBundlerWithStopWorker({});
2562
+ const { bundler, stopWorkers } = await this.#getBundlerWithStopWorker({}, true);
2563
2563
  await stopWorkers?.();
2564
2564
  await bundler.close();
2565
2565
  }
@@ -2699,7 +2699,7 @@ const watch = (input) => {
2699
2699
 
2700
2700
  //#endregion
2701
2701
  //#region package.json
2702
- var version = "1.0.0-beta.3-commit.1910872";
2702
+ var version = "1.0.0-beta.3-commit.93d8731";
2703
2703
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
2704
2704
 
2705
2705
  //#endregion
@@ -2,7 +2,7 @@ import { BindingBundlerOptions } from '../binding';
2
2
  import { LogHandler } from '../types/misc';
3
3
  import type { InputOptions } from '../options/input-options';
4
4
  import type { OutputOptions } from '../options/output-options';
5
- export declare function createBundlerOptions(inputOptions: InputOptions, outputOptions: OutputOptions): Promise<BundlerOptionWithStopWorker>;
5
+ export declare function createBundlerOptions(inputOptions: InputOptions, outputOptions: OutputOptions, isClose?: boolean): Promise<BundlerOptionWithStopWorker>;
6
6
  export interface BundlerOptionWithStopWorker {
7
7
  bundlerOptions: BindingBundlerOptions;
8
8
  inputOptions: InputOptions;
@@ -1,7 +1,7 @@
1
1
  import { Bundler } from '../binding';
2
2
  import type { InputOptions } from '../options/input-options';
3
3
  import type { OutputOptions } from '../options/output-options';
4
- export declare function createBundler(inputOptions: InputOptions, outputOptions: OutputOptions): Promise<BundlerWithStopWorker>;
4
+ export declare function createBundler(inputOptions: InputOptions, outputOptions: OutputOptions, isClose?: boolean): Promise<BundlerWithStopWorker>;
5
5
  export interface BundlerWithStopWorker {
6
6
  bundler: Bundler;
7
7
  stopWorkers?: () => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rolldown",
3
- "version": "1.0.0-beta.3-commit.1910872",
3
+ "version": "1.0.0-beta.3-commit.93d8731",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "homepage": "https://rolldown.rs/",
6
6
  "repository": {
@@ -122,21 +122,21 @@
122
122
  "unbuild": "^3.0.0",
123
123
  "why-is-node-running": "^3.0.0",
124
124
  "@rolldown/testing": "0.0.1",
125
- "rolldown": "1.0.0-beta.3-commit.1910872"
125
+ "rolldown": "1.0.0-beta.3-commit.93d8731"
126
126
  },
127
127
  "optionalDependencies": {
128
- "@rolldown/binding-darwin-arm64": "1.0.0-beta.3-commit.1910872",
129
- "@rolldown/binding-darwin-x64": "1.0.0-beta.3-commit.1910872",
130
- "@rolldown/binding-freebsd-x64": "1.0.0-beta.3-commit.1910872",
131
- "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.3-commit.1910872",
132
- "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.3-commit.1910872",
133
- "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.3-commit.1910872",
134
- "@rolldown/binding-linux-x64-musl": "1.0.0-beta.3-commit.1910872",
135
- "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.3-commit.1910872",
136
- "@rolldown/binding-wasm32-wasi": "1.0.0-beta.3-commit.1910872",
137
- "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.3-commit.1910872",
138
- "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.3-commit.1910872",
139
- "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.3-commit.1910872"
128
+ "@rolldown/binding-darwin-arm64": "1.0.0-beta.3-commit.93d8731",
129
+ "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.3-commit.93d8731",
130
+ "@rolldown/binding-darwin-x64": "1.0.0-beta.3-commit.93d8731",
131
+ "@rolldown/binding-freebsd-x64": "1.0.0-beta.3-commit.93d8731",
132
+ "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.3-commit.93d8731",
133
+ "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.3-commit.93d8731",
134
+ "@rolldown/binding-linux-x64-musl": "1.0.0-beta.3-commit.93d8731",
135
+ "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.3-commit.93d8731",
136
+ "@rolldown/binding-wasm32-wasi": "1.0.0-beta.3-commit.93d8731",
137
+ "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.3-commit.93d8731",
138
+ "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.3-commit.93d8731",
139
+ "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.3-commit.93d8731"
140
140
  },
141
141
  "scripts": {
142
142
  "# Scrips for binding #": "_",