rolldown 1.0.0-beta.3-commit.06b6bbf → 1.0.0-beta.3-commit.d9529e7

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-BCD11eWZ.cjs');
3
+ const require_src = require('../shared/src-Cz_gHwAq.cjs');
4
4
  const require_binding = require('../shared/binding-DTKqYZn-.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-BCD11eWZ.cjs');
3
+ const require_src = require('../shared/src-Cz_gHwAq.cjs');
4
4
  const require_binding = require('../shared/binding-DTKqYZn-.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-BCD11eWZ.cjs');
1
+ const require_src = require('../shared/src-Cz_gHwAq.cjs');
2
2
  require('../shared/binding-DTKqYZn-.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-BCD11eWZ.cjs');
3
+ const require_src = require('../shared/src-Cz_gHwAq.cjs');
4
4
  const require_binding = require('../shared/binding-DTKqYZn-.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/binding-CFTx0Fs7.mjs";
2
- import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-CTeUVXDp.mjs";
2
+ import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "../shared/src-CrJblU3g.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/binding-CFTx0Fs7.mjs";
2
- import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-CTeUVXDp.mjs";
2
+ import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src-CrJblU3g.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/binding-CFTx0Fs7.mjs";
2
- import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-CTeUVXDp.mjs";
2
+ import { VERSION, build, defineConfig, rolldown, watch } from "../shared/src-CrJblU3g.mjs";
3
3
 
4
4
  export { VERSION, build, defineConfig, rolldown, watch };
@@ -1,5 +1,5 @@
1
1
  import { import_binding } from "../shared/binding-CFTx0Fs7.mjs";
2
- import { PluginContextData, bindingifyPlugin } from "../shared/src-CTeUVXDp.mjs";
2
+ import { PluginContextData, bindingifyPlugin } from "../shared/src-CrJblU3g.mjs";
3
3
  import { parentPort, workerData } from "node:worker_threads";
4
4
 
5
5
  //#region src/parallel-plugin-worker.ts
@@ -2264,7 +2264,13 @@ const WatchOptionsSchema = v.strictObject({
2264
2264
  })), v.description("Notify options")),
2265
2265
  skipWrite: v.pipe(v.optional(v.boolean()), v.description("Skip the bundle.write() step"))
2266
2266
  });
2267
- const ChecksOptionsSchema = v.strictObject({ circularDependency: v.pipe(v.optional(v.boolean()), v.description("Wether to emit warnings when detecting circular dependencies")) });
2267
+ const ChecksOptionsSchema = v.strictObject({ circularDependency: v.pipe(v.optional(v.boolean()), v.description("Whether to emit warnings when detecting circular dependencies")) });
2268
+ const MinifyOptionsSchema = v.strictObject({
2269
+ mangle: v.boolean(),
2270
+ compress: v.boolean(),
2271
+ deadCodeElimination: v.boolean(),
2272
+ removeWhitespace: v.boolean()
2273
+ });
2268
2274
  const ResolveOptionsSchema = v.strictObject({
2269
2275
  alias: v.optional(v.record(v.string(), v.union([v.string(), v.array(v.string())]))),
2270
2276
  aliasFields: v.optional(v.array(v.array(v.string()))),
@@ -2412,7 +2418,7 @@ const OutputOptionsSchema = v.strictObject({
2412
2418
  chunkFileNames: v.optional(ChunkFileNamesSchema),
2413
2419
  cssEntryFileNames: v.optional(ChunkFileNamesSchema),
2414
2420
  cssChunkFileNames: v.optional(ChunkFileNamesSchema),
2415
- minify: v.pipe(v.optional(v.boolean()), v.description("Minify the bundled file")),
2421
+ minify: v.pipe(v.optional(v.union([v.boolean(), MinifyOptionsSchema])), v.description("Minify the bundled file")),
2416
2422
  name: v.pipe(v.optional(v.string()), v.description("Name for UMD / IIFE format outputs")),
2417
2423
  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`)")),
2418
2424
  externalLiveBindings: v.pipe(v.optional(v.boolean(), true), v.description("external live bindings")),
@@ -2438,7 +2444,8 @@ const OutputCliOverrideSchema = v.strictObject({
2438
2444
  advancedChunks: v.pipe(v.optional(v.strictObject({
2439
2445
  minSize: v.pipe(v.optional(v.number()), v.description("Minimum size of the chunk")),
2440
2446
  minShareCount: v.pipe(v.optional(v.number()), v.description("Minimum share count of the chunk"))
2441
- })), v.description("Global variable of UMD / IIFE dependencies (syntax: `key=value`)"))
2447
+ })), v.description("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),
2448
+ minify: v.pipe(v.optional(v.boolean()), v.description("Minify the bundled file"))
2442
2449
  });
2443
2450
  const OutputCliOptionsSchema = v.omit(v.strictObject({
2444
2451
  ...OutputOptionsSchema.entries,
@@ -2683,7 +2690,7 @@ const watch = (input) => {
2683
2690
 
2684
2691
  //#endregion
2685
2692
  //#region package.json
2686
- var version = "1.0.0-beta.3-commit.06b6bbf";
2693
+ var version = "1.0.0-beta.3-commit.d9529e7";
2687
2694
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
2688
2695
 
2689
2696
  //#endregion
@@ -2266,7 +2266,13 @@ const WatchOptionsSchema = valibot.strictObject({
2266
2266
  })), valibot.description("Notify options")),
2267
2267
  skipWrite: valibot.pipe(valibot.optional(valibot.boolean()), valibot.description("Skip the bundle.write() step"))
2268
2268
  });
2269
- const ChecksOptionsSchema = valibot.strictObject({ circularDependency: valibot.pipe(valibot.optional(valibot.boolean()), valibot.description("Wether to emit warnings when detecting circular dependencies")) });
2269
+ const ChecksOptionsSchema = valibot.strictObject({ circularDependency: valibot.pipe(valibot.optional(valibot.boolean()), valibot.description("Whether to emit warnings when detecting circular dependencies")) });
2270
+ const MinifyOptionsSchema = valibot.strictObject({
2271
+ mangle: valibot.boolean(),
2272
+ compress: valibot.boolean(),
2273
+ deadCodeElimination: valibot.boolean(),
2274
+ removeWhitespace: valibot.boolean()
2275
+ });
2270
2276
  const ResolveOptionsSchema = valibot.strictObject({
2271
2277
  alias: valibot.optional(valibot.record(valibot.string(), valibot.union([valibot.string(), valibot.array(valibot.string())]))),
2272
2278
  aliasFields: valibot.optional(valibot.array(valibot.array(valibot.string()))),
@@ -2414,7 +2420,7 @@ const OutputOptionsSchema = valibot.strictObject({
2414
2420
  chunkFileNames: valibot.optional(ChunkFileNamesSchema),
2415
2421
  cssEntryFileNames: valibot.optional(ChunkFileNamesSchema),
2416
2422
  cssChunkFileNames: valibot.optional(ChunkFileNamesSchema),
2417
- minify: valibot.pipe(valibot.optional(valibot.boolean()), valibot.description("Minify the bundled file")),
2423
+ minify: valibot.pipe(valibot.optional(valibot.union([valibot.boolean(), MinifyOptionsSchema])), valibot.description("Minify the bundled file")),
2418
2424
  name: valibot.pipe(valibot.optional(valibot.string()), valibot.description("Name for UMD / IIFE format outputs")),
2419
2425
  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`)")),
2420
2426
  externalLiveBindings: valibot.pipe(valibot.optional(valibot.boolean(), true), valibot.description("external live bindings")),
@@ -2440,7 +2446,8 @@ const OutputCliOverrideSchema = valibot.strictObject({
2440
2446
  advancedChunks: valibot.pipe(valibot.optional(valibot.strictObject({
2441
2447
  minSize: valibot.pipe(valibot.optional(valibot.number()), valibot.description("Minimum size of the chunk")),
2442
2448
  minShareCount: valibot.pipe(valibot.optional(valibot.number()), valibot.description("Minimum share count of the chunk"))
2443
- })), valibot.description("Global variable of UMD / IIFE dependencies (syntax: `key=value`)"))
2449
+ })), valibot.description("Global variable of UMD / IIFE dependencies (syntax: `key=value`)")),
2450
+ minify: valibot.pipe(valibot.optional(valibot.boolean()), valibot.description("Minify the bundled file"))
2444
2451
  });
2445
2452
  const OutputCliOptionsSchema = valibot.omit(valibot.strictObject({
2446
2453
  ...OutputOptionsSchema.entries,
@@ -2685,7 +2692,7 @@ const watch = (input) => {
2685
2692
 
2686
2693
  //#endregion
2687
2694
  //#region package.json
2688
- var version = "1.0.0-beta.3-commit.06b6bbf";
2695
+ var version = "1.0.0-beta.3-commit.d9529e7";
2689
2696
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
2690
2697
 
2691
2698
  //#endregion
@@ -63,7 +63,7 @@ export declare class BindingNormalizedOptions {
63
63
  get globals(): Record<string, string> | undefined
64
64
  get hashCharacters(): 'base64' | 'base36' | 'hex'
65
65
  get sourcemapDebugIds(): boolean
66
- get minify(): boolean
66
+ get minify(): false | BindingMinifyOptions
67
67
  get polyfillRequire(): boolean
68
68
  get comments(): 'none' | 'preserve-legal'
69
69
  }
@@ -470,6 +470,12 @@ export interface BindingMatchGroup {
470
470
  maxSize?: number
471
471
  }
472
472
 
473
+ export interface BindingMinifyOptions {
474
+ mangle: boolean
475
+ compress: boolean
476
+ removeWhitespace: boolean
477
+ }
478
+
473
479
  export interface BindingModuleFederationPluginOption {
474
480
  name: string
475
481
  filename?: string
@@ -526,7 +532,7 @@ export interface BindingOutputOptions {
526
532
  sourcemapIgnoreList?: (source: string, sourcemapPath: string) => boolean
527
533
  sourcemapDebugIds?: boolean
528
534
  sourcemapPathTransform?: (source: string, sourcemapPath: string) => string
529
- minify?: boolean
535
+ minify?: boolean | 'dce-only' | BindingMinifyOptions
530
536
  advancedChunks?: BindingAdvancedChunksOptions
531
537
  comments?: 'none' | 'preserve-legal'
532
538
  polyfillRequire?: boolean
@@ -1,4 +1,4 @@
1
- import type { BindingNormalizedOptions } from '../binding';
1
+ import type { BindingMinifyOptions, BindingNormalizedOptions } from '../binding';
2
2
  import type { SourcemapIgnoreListOption, SourcemapPathTransformOption } from '../types/misc';
3
3
  import type { AssetFileNamesFunction, ChunkFileNamesFunction, GlobalsFunction, OutputOptions } from './output-options';
4
4
  export type InternalModuleFormat = 'es' | 'cjs' | 'iife' | 'umd' | 'app';
@@ -27,7 +27,7 @@ export interface NormalizedOutputOptions {
27
27
  sourcemapDebugIds: boolean;
28
28
  sourcemapIgnoreList: SourcemapIgnoreListOption | undefined;
29
29
  sourcemapPathTransform: SourcemapPathTransformOption | undefined;
30
- minify: boolean;
30
+ minify: false | BindingMinifyOptions;
31
31
  comments: 'none' | 'preserve-legal';
32
32
  polyfillRequire: boolean;
33
33
  }
@@ -60,7 +60,7 @@ export declare class NormalizedOutputOptionsImpl implements NormalizedOutputOpti
60
60
  get sourcemapDebugIds(): boolean;
61
61
  get sourcemapIgnoreList(): UnsupportedFnRet | undefined;
62
62
  get sourcemapPathTransform(): UnsupportedFnRet | undefined;
63
- get minify(): boolean;
63
+ get minify(): false | BindingMinifyOptions;
64
64
  get comments(): 'none' | 'preserve-legal';
65
65
  get polyfillRequire(): boolean;
66
66
  }
@@ -6,6 +6,11 @@ import { RenderedChunk } from '../types/rolldown-output';
6
6
  export type ModuleFormat = 'es' | 'cjs' | 'esm' | 'module' | 'commonjs' | 'iife' | 'umd' | 'experimental-app';
7
7
  export type AddonFunction = (chunk: RenderedChunk) => string | Promise<string>;
8
8
  export type ChunkFileNamesFunction = (chunkInfo: PreRenderedChunk) => string;
9
+ export interface MinifyOptions {
10
+ mangle: boolean;
11
+ compress: boolean;
12
+ removeWhitespace: boolean;
13
+ }
9
14
  export interface PreRenderedAsset {
10
15
  names: string[];
11
16
  originalFileNames: string[];
@@ -45,7 +50,7 @@ export interface OutputOptions {
45
50
  cssEntryFileNames?: string | ChunkFileNamesFunction;
46
51
  cssChunkFileNames?: string | ChunkFileNamesFunction;
47
52
  sanitizeFileName?: boolean | ((name: string) => string);
48
- minify?: boolean;
53
+ minify?: boolean | 'dce-only' | MinifyOptions;
49
54
  name?: string;
50
55
  globals?: Record<string, string> | GlobalsFunction;
51
56
  externalLiveBindings?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rolldown",
3
- "version": "1.0.0-beta.3-commit.06b6bbf",
3
+ "version": "1.0.0-beta.3-commit.d9529e7",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "homepage": "https://rolldown.rs/",
6
6
  "repository": {
@@ -121,22 +121,22 @@
121
121
  "typescript": "^5.7.3",
122
122
  "unbuild": "^3.0.0",
123
123
  "why-is-node-running": "^3.0.0",
124
- "rolldown": "1.0.0-beta.3-commit.06b6bbf",
125
- "@rolldown/testing": "0.0.1"
124
+ "@rolldown/testing": "0.0.1",
125
+ "rolldown": "1.0.0-beta.3-commit.d9529e7"
126
126
  },
127
127
  "optionalDependencies": {
128
- "@rolldown/binding-darwin-arm64": "1.0.0-beta.3-commit.06b6bbf",
129
- "@rolldown/binding-darwin-x64": "1.0.0-beta.3-commit.06b6bbf",
130
- "@rolldown/binding-freebsd-x64": "1.0.0-beta.3-commit.06b6bbf",
131
- "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.3-commit.06b6bbf",
132
- "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.3-commit.06b6bbf",
133
- "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.3-commit.06b6bbf",
134
- "@rolldown/binding-linux-x64-musl": "1.0.0-beta.3-commit.06b6bbf",
135
- "@rolldown/binding-wasm32-wasi": "1.0.0-beta.3-commit.06b6bbf",
136
- "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.3-commit.06b6bbf",
137
- "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.3-commit.06b6bbf",
138
- "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.3-commit.06b6bbf",
139
- "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.3-commit.06b6bbf"
128
+ "@rolldown/binding-darwin-arm64": "1.0.0-beta.3-commit.d9529e7",
129
+ "@rolldown/binding-darwin-x64": "1.0.0-beta.3-commit.d9529e7",
130
+ "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.3-commit.d9529e7",
131
+ "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.3-commit.d9529e7",
132
+ "@rolldown/binding-freebsd-x64": "1.0.0-beta.3-commit.d9529e7",
133
+ "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.3-commit.d9529e7",
134
+ "@rolldown/binding-linux-x64-musl": "1.0.0-beta.3-commit.d9529e7",
135
+ "@rolldown/binding-wasm32-wasi": "1.0.0-beta.3-commit.d9529e7",
136
+ "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.3-commit.d9529e7",
137
+ "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.3-commit.d9529e7",
138
+ "@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.3-commit.d9529e7",
139
+ "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.3-commit.d9529e7"
140
140
  },
141
141
  "scripts": {
142
142
  "# Scrips for binding #": "_",