@vercube/core 0.0.42 → 0.0.45

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/index.d.mts CHANGED
@@ -21,7 +21,7 @@ declare class BasePlugin<T = unknown> {
21
21
  use(app: App, options?: T): void | Promise<void>;
22
22
  }
23
23
  //#endregion
24
- //#region ../../node_modules/.pnpm/rolldown@1.0.0-rc.2/node_modules/rolldown/dist/shared/logging-CE90D8JR.d.mts
24
+ //#region ../../node_modules/.pnpm/rolldown@1.0.0-rc.9/node_modules/rolldown/dist/shared/logging-C6h4g8dA.d.mts
25
25
  //#region src/log/logging.d.ts
26
26
  /** @inline */
27
27
  type LogLevel = "info" | "debug" | "warn";
@@ -71,7 +71,7 @@ interface RolldownError extends RolldownLog {
71
71
  }
72
72
  type LogOrStringHandler = (level: LogLevelWithError, log: RolldownLogWithString) => void; //#endregion
73
73
  //#endregion
74
- //#region ../../node_modules/.pnpm/@oxc-project+types@0.111.0/node_modules/@oxc-project/types/types.d.ts
74
+ //#region ../../node_modules/.pnpm/@oxc-project+types@0.115.0/node_modules/@oxc-project/types/types.d.ts
75
75
  // Auto-generated code, DO NOT EDIT DIRECTLY!
76
76
  // To edit this generated file you have to edit `tasks/ast_tools/src/generators/typescript.rs`.
77
77
  interface Program extends Span {
@@ -1370,7 +1370,7 @@ interface Span {
1370
1370
  type ModuleKind = "script" | "module" | "commonjs";
1371
1371
  type Node = Program | IdentifierName | IdentifierReference | BindingIdentifier | LabelIdentifier | ThisExpression | ArrayExpression | ObjectExpression | ObjectProperty | TemplateLiteral | TaggedTemplateExpression | TemplateElement | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression | CallExpression | NewExpression | MetaProperty | SpreadElement | UpdateExpression | UnaryExpression | BinaryExpression | PrivateInExpression | LogicalExpression | ConditionalExpression | AssignmentExpression | ArrayAssignmentTarget | ObjectAssignmentTarget | AssignmentTargetRest | AssignmentTargetWithDefault | AssignmentTargetPropertyIdentifier | AssignmentTargetPropertyProperty | SequenceExpression | Super | AwaitExpression | ChainExpression | ParenthesizedExpression | Directive | Hashbang | BlockStatement | VariableDeclaration | VariableDeclarator | EmptyStatement | ExpressionStatement | IfStatement | DoWhileStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | ContinueStatement | BreakStatement | ReturnStatement | WithStatement | SwitchStatement | SwitchCase | LabeledStatement | ThrowStatement | TryStatement | CatchClause | DebuggerStatement | AssignmentPattern | ObjectPattern | BindingProperty | ArrayPattern | BindingRestElement | Function$1 | FunctionBody | ArrowFunctionExpression | YieldExpression | Class | ClassBody | MethodDefinition | PropertyDefinition | PrivateIdentifier | StaticBlock | AccessorProperty | ImportExpression | ImportDeclaration | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportAttribute | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration | ExportSpecifier | V8IntrinsicExpression | BooleanLiteral | NullLiteral | NumericLiteral | StringLiteral | BigIntLiteral | RegExpLiteral | JSXElement | JSXOpeningElement | JSXClosingElement | JSXFragment | JSXOpeningFragment | JSXClosingFragment | JSXNamespacedName | JSXMemberExpression | JSXExpressionContainer | JSXEmptyExpression | JSXAttribute | JSXSpreadAttribute | JSXIdentifier | JSXSpreadChild | JSXText | TSThisParameter | TSEnumDeclaration | TSEnumBody | TSEnumMember | TSTypeAnnotation | TSLiteralType | TSConditionalType | TSUnionType | TSIntersectionType | TSParenthesizedType | TSTypeOperator | TSArrayType | TSIndexedAccessType | TSTupleType | TSNamedTupleMember | TSOptionalType | TSRestType | TSAnyKeyword | TSStringKeyword | TSBooleanKeyword | TSNumberKeyword | TSNeverKeyword | TSIntrinsicKeyword | TSUnknownKeyword | TSNullKeyword | TSUndefinedKeyword | TSVoidKeyword | TSSymbolKeyword | TSThisType | TSObjectKeyword | TSBigIntKeyword | TSTypeReference | TSQualifiedName | TSTypeParameterInstantiation | TSTypeParameter | TSTypeParameterDeclaration | TSTypeAliasDeclaration | TSClassImplements | TSInterfaceDeclaration | TSInterfaceBody | TSPropertySignature | TSIndexSignature | TSCallSignatureDeclaration | TSMethodSignature | TSConstructSignatureDeclaration | TSIndexSignatureName | TSInterfaceHeritage | TSTypePredicate | TSModuleDeclaration | TSGlobalDeclaration | TSModuleBlock | TSTypeLiteral | TSInferType | TSTypeQuery | TSImportType | TSImportTypeQualifiedName | TSFunctionType | TSConstructorType | TSMappedType | TSTemplateLiteralType | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSImportEqualsDeclaration | TSExternalModuleReference | TSNonNullExpression | Decorator | TSExportAssignment | TSNamespaceExportDeclaration | TSInstantiationExpression | JSDocNullableType | JSDocNonNullableType | JSDocUnknownType | ParamPattern;
1372
1372
  //#endregion
1373
- //#region ../../node_modules/.pnpm/rolldown@1.0.0-rc.2/node_modules/rolldown/dist/shared/binding-Bo6UcGYl.d.mts
1373
+ //#region ../../node_modules/.pnpm/rolldown@1.0.0-rc.9/node_modules/rolldown/dist/shared/binding-BohGL_65.d.mts
1374
1374
  interface CodegenOptions {
1375
1375
  /**
1376
1376
  * Remove whitespace.
@@ -1465,7 +1465,7 @@ interface MangleOptions {
1465
1465
  /**
1466
1466
  * Pass `true` to mangle names declared in the top level scope.
1467
1467
  *
1468
- * @default false
1468
+ * @default true for modules and commonjs, otherwise false
1469
1469
  */
1470
1470
  toplevel?: boolean;
1471
1471
  /**
@@ -1491,11 +1491,6 @@ interface MangleOptionsKeepNames {
1491
1491
  */
1492
1492
  class: boolean;
1493
1493
  }
1494
- /**
1495
- * Minify asynchronously.
1496
- *
1497
- * Note: This function can be slower than `minifySync` due to the overhead of spawning a thread.
1498
- */
1499
1494
  interface MinifyOptions$1 {
1500
1495
  /** Use when minifying an ES module. */
1501
1496
  module?: boolean;
@@ -1701,7 +1696,7 @@ interface IsolatedDeclarationsOptions {
1701
1696
  /**
1702
1697
  * Configure how TSX and JSX are transformed.
1703
1698
  *
1704
- * @see {@link https://babeljs.io/docs/babel-plugin-transform-react-jsx#options}
1699
+ * @see {@link https://oxc.rs/docs/guide/usage/transformer/jsx}
1705
1700
  */
1706
1701
  interface JsxOptions {
1707
1702
  /**
@@ -1717,8 +1712,6 @@ interface JsxOptions {
1717
1712
  * Emit development-specific information, such as `__source` and `__self`.
1718
1713
  *
1719
1714
  * @default false
1720
- *
1721
- * @see {@link https://babeljs.io/docs/babel-plugin-transform-react-jsx-development}
1722
1715
  */
1723
1716
  development?: boolean;
1724
1717
  /**
@@ -1732,11 +1725,7 @@ interface JsxOptions {
1732
1725
  */
1733
1726
  throwIfNamespace?: boolean;
1734
1727
  /**
1735
- * Enables `@babel/plugin-transform-react-pure-annotations`.
1736
- *
1737
- * It will mark JSX elements and top-level React method calls as pure for tree shaking.
1738
- *
1739
- * @see {@link https://babeljs.io/docs/en/babel-plugin-transform-react-pure-annotations}
1728
+ * Mark JSX elements and top-level React method calls as pure for tree shaking.
1740
1729
  *
1741
1730
  * @default true
1742
1731
  */
@@ -1812,7 +1801,7 @@ interface ReactRefreshOptions {
1812
1801
  /**
1813
1802
  * Configure how styled-components are transformed.
1814
1803
  *
1815
- * @see {@link https://styled-components.com/docs/tooling#babel-plugin}
1804
+ * @see {@link https://oxc.rs/docs/guide/usage/transformer/plugins#styled-components}
1816
1805
  */
1817
1806
  interface StyledComponentsOptions {
1818
1807
  /**
@@ -1887,20 +1876,6 @@ interface StyledComponentsOptions {
1887
1876
  */
1888
1877
  topLevelImportPaths?: Array<string>;
1889
1878
  }
1890
- /**
1891
- * Transpile a JavaScript or TypeScript into a target ECMAScript version, asynchronously.
1892
- *
1893
- * Note: This function can be slower than `transform` due to the overhead of spawning a thread.
1894
- *
1895
- * @param filename The name of the file being transformed. If this is a
1896
- * relative path, consider setting the {@link TransformOptions#cwd} option.
1897
- * @param sourceText the source code itself
1898
- * @param options The options for the transformation. See {@link
1899
- * TransformOptions} for more information.
1900
- *
1901
- * @returns a promise that resolves to an object containing the transformed code,
1902
- * source maps, and any errors that occurred during parsing or transformation.
1903
- */
1904
1879
  /**
1905
1880
  * Options for transforming a JavaScript or TypeScript file.
1906
1881
  *
@@ -1928,9 +1903,15 @@ interface TransformOptions$1 {
1928
1903
  sourcemap?: boolean;
1929
1904
  /** Set assumptions in order to produce smaller output. */
1930
1905
  assumptions?: CompilerAssumptions;
1931
- /** Configure how TypeScript is transformed. */
1906
+ /**
1907
+ * Configure how TypeScript is transformed.
1908
+ * @see {@link https://oxc.rs/docs/guide/usage/transformer/typescript}
1909
+ */
1932
1910
  typescript?: TypeScriptOptions;
1933
- /** Configure how TSX and JSX are transformed. */
1911
+ /**
1912
+ * Configure how TSX and JSX are transformed.
1913
+ * @see {@link https://oxc.rs/docs/guide/usage/transformer/jsx}
1914
+ */
1934
1915
  jsx?: 'preserve' | JsxOptions;
1935
1916
  /**
1936
1917
  * Sets the target environment for the generated JavaScript.
@@ -1944,18 +1925,27 @@ interface TransformOptions$1 {
1944
1925
  *
1945
1926
  * @default `esnext` (No transformation)
1946
1927
  *
1947
- * @see [esbuild#target](https://esbuild.github.io/api/#target)
1928
+ * @see {@link https://oxc.rs/docs/guide/usage/transformer/lowering#target}
1948
1929
  */
1949
1930
  target?: string | Array<string>;
1950
1931
  /** Behaviour for runtime helpers. */
1951
1932
  helpers?: Helpers;
1952
- /** Define Plugin */
1933
+ /**
1934
+ * Define Plugin
1935
+ * @see {@link https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#define}
1936
+ */
1953
1937
  define?: Record<string, string>;
1954
- /** Inject Plugin */
1938
+ /**
1939
+ * Inject Plugin
1940
+ * @see {@link https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#inject}
1941
+ */
1955
1942
  inject?: Record<string, string | [string, string]>;
1956
1943
  /** Decorator plugin */
1957
1944
  decorator?: DecoratorOptions;
1958
- /** Third-party plugins to use. */
1945
+ /**
1946
+ * Third-party plugins to use.
1947
+ * @see {@link https://oxc.rs/docs/guide/usage/transformer/plugins}
1948
+ */
1959
1949
  plugins?: PluginsOptions;
1960
1950
  }
1961
1951
  interface TypeScriptOptions {
@@ -2047,9 +2037,12 @@ declare class BindingDecodedMap {
2047
2037
  */
2048
2038
  get mappings(): Array<Array<Array<number>>>;
2049
2039
  }
2050
- declare class BindingMagicString {
2040
+ declare class BindingMagicString$1 {
2051
2041
  constructor(source: string, options?: BindingMagicStringOptions | undefined | null);
2042
+ get original(): string;
2052
2043
  get filename(): string | null;
2044
+ get offset(): number;
2045
+ set offset(offset: number);
2053
2046
  replace(from: string, to: string): this;
2054
2047
  replaceAll(from: string, to: string): this;
2055
2048
  prepend(content: string): this;
@@ -2087,13 +2080,13 @@ declare class BindingMagicString {
2087
2080
  */
2088
2081
  insert(index: number, content: string): void;
2089
2082
  /** Returns a clone of the MagicString instance. */
2090
- clone(): BindingMagicString;
2083
+ clone(): BindingMagicString$1;
2091
2084
  /** Returns the last character of the generated string, or an empty string if empty. */
2092
2085
  lastChar(): string;
2093
2086
  /** Returns the content after the last newline in the generated string. */
2094
2087
  lastLine(): string;
2095
2088
  /** Returns a clone with content outside the specified range removed. */
2096
- snip(start: number, end: number): BindingMagicString;
2089
+ snip(start: number, end: number): BindingMagicString$1;
2097
2090
  /**
2098
2091
  * Resets the portion of the string from `start` to `end` to its original content.
2099
2092
  * This undoes any modifications made to that range.
@@ -2152,10 +2145,10 @@ declare class BindingSourceMap {
2152
2145
  toUrl(): string;
2153
2146
  }
2154
2147
  /**
2155
- * Minimal wrapper around the core `Bundler` for watcher events.
2156
- * This is returned from watcher event data to allow access to the bundler instance.
2148
+ * Minimal wrapper around a `BundleHandle` for watcher events.
2149
+ * This is returned from watcher event data to allow calling `result.close()`.
2157
2150
  */
2158
- type BindingBuiltinPluginName = 'builtin:esm-external-require' | 'builtin:isolated-declaration' | 'builtin:replace' | 'builtin:vite-alias' | 'builtin:vite-build-import-analysis' | 'builtin:vite-dynamic-import-vars' | 'builtin:vite-import-glob' | 'builtin:vite-json' | 'builtin:vite-load-fallback' | 'builtin:vite-manifest' | 'builtin:vite-module-preload-polyfill' | 'builtin:vite-react-refresh-wrapper' | 'builtin:vite-reporter' | 'builtin:vite-resolve' | 'builtin:vite-transform' | 'builtin:vite-wasm-fallback' | 'builtin:vite-wasm-helper' | 'builtin:vite-web-worker-post';
2151
+ type BindingBuiltinPluginName = 'builtin:bundle-analyzer' | 'builtin:esm-external-require' | 'builtin:isolated-declaration' | 'builtin:replace' | 'builtin:vite-alias' | 'builtin:vite-build-import-analysis' | 'builtin:vite-dynamic-import-vars' | 'builtin:vite-import-glob' | 'builtin:vite-json' | 'builtin:vite-load-fallback' | 'builtin:vite-manifest' | 'builtin:vite-module-preload-polyfill' | 'builtin:vite-react-refresh-wrapper' | 'builtin:vite-reporter' | 'builtin:vite-resolve' | 'builtin:vite-transform' | 'builtin:vite-wasm-fallback' | 'builtin:vite-web-worker-post';
2159
2152
  interface BindingHookResolveIdExtraArgs {
2160
2153
  custom?: number;
2161
2154
  isEntry: boolean;
@@ -2172,6 +2165,7 @@ interface BindingHookResolveIdExtraArgs {
2172
2165
  }
2173
2166
  interface BindingMagicStringOptions {
2174
2167
  filename?: string;
2168
+ offset?: number;
2175
2169
  }
2176
2170
  interface BindingModules {
2177
2171
  values: Array<BindingRenderedModule>;
@@ -2217,6 +2211,7 @@ interface ExternalMemoryStatus {
2217
2211
  freed: boolean;
2218
2212
  reason?: string;
2219
2213
  }
2214
+ /** Error emitted from native side, it only contains kind and message, no stack trace. */
2220
2215
  interface PreRenderedChunk {
2221
2216
  /** The name of this chunk, which is used in naming patterns. */
2222
2217
  name: string;
@@ -2231,11 +2226,12 @@ interface PreRenderedChunk {
2231
2226
  /** Exported variable names from this chunk. */
2232
2227
  exports: Array<string>;
2233
2228
  }
2229
+ /** @hidden This is only expected to be used by Vite */
2234
2230
  interface ViteImportGlobMeta {
2235
2231
  isSubImportsPattern?: boolean;
2236
2232
  } //#endregion
2237
2233
  //#endregion
2238
- //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-rc.2/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.d.ts
2234
+ //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-rc.9/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.d.ts
2239
2235
  type StringOrRegExp$1 = string | RegExp;
2240
2236
  type PluginModuleType = 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'text' | 'base64' | 'dataurl' | 'binary' | 'empty' | (string & {});
2241
2237
  type FilterExpression = And | Or | Not | Id | ImporterId | ModuleType$1 | Code | Query;
@@ -2297,7 +2293,7 @@ declare class Exclude$1 {
2297
2293
  constructor(expr: FilterExpression);
2298
2294
  }
2299
2295
  //#endregion
2300
- //#region ../../node_modules/.pnpm/rolldown@1.0.0-rc.2/node_modules/rolldown/dist/shared/define-config-Bqat13pE.d.mts
2296
+ //#region ../../node_modules/.pnpm/rolldown@1.0.0-rc.9/node_modules/rolldown/dist/shared/define-config-cG45vHwf.d.mts
2301
2297
  //#region src/types/misc.d.ts
2302
2298
  /** @inline */
2303
2299
  type SourcemapPathTransformOption = (relativeSourcePath: string, sourcemapPath: string) => string;
@@ -2344,6 +2340,16 @@ interface ModuleInfo extends ModuleOptions {
2344
2340
  * Whether this module is a user- or plugin-defined entry point.
2345
2341
  */
2346
2342
  isEntry: boolean;
2343
+ /**
2344
+ * The detected format of the module, based on both its syntax and module definition
2345
+ * metadata (such as `package.json` `type` and file extensions like `.mjs`/`.cjs`/`.mts`/`.cts`).
2346
+ * - "esm" for ES modules (has `import`/`export` statements or is defined as ESM by module metadata)
2347
+ * - "cjs" for CommonJS modules (uses `module.exports`, `exports`, top-level `return`, or is defined as CommonJS by module metadata)
2348
+ * - "unknown" when the format could not be determined from either syntax or module definition metadata
2349
+ *
2350
+ * @experimental
2351
+ */
2352
+ inputFormat: "es" | "cjs" | "unknown";
2347
2353
  } //#endregion
2348
2354
  //#region src/utils/asset-source.d.ts
2349
2355
  /** @inline */
@@ -2594,6 +2600,20 @@ type CodeSplittingNameFunction = (moduleId: string, ctx: ChunkingContext) => str
2594
2600
  /** @inline */
2595
2601
  type CodeSplittingTestFunction = (id: string) => boolean | undefined | void;
2596
2602
  type MinifyOptions = Omit<MinifyOptions$1, "module" | "sourcemap">;
2603
+ interface CommentsOptions {
2604
+ /**
2605
+ * Comments that contain `@license`, `@preserve` or start with `//!` or `/*!`
2606
+ */
2607
+ legal?: boolean;
2608
+ /**
2609
+ * Comments that contain `@__PURE__`, `@__NO_SIDE_EFFECTS__` or `@vite-ignore`
2610
+ */
2611
+ annotation?: boolean;
2612
+ /**
2613
+ * JSDoc comments
2614
+ */
2615
+ jsdoc?: boolean;
2616
+ }
2597
2617
  /** @inline */
2598
2618
  interface ChunkingContext {
2599
2619
  getModuleInfo(moduleId: string): ModuleInfo | null;
@@ -2641,7 +2661,7 @@ interface OutputOptions {
2641
2661
  * - `'iife'` stands for [Immediately Invoked Function Expression](https://developer.mozilla.org/en-US/docs/Glossary/IIFE).
2642
2662
  * - `'umd'` stands for [Universal Module Definition](https://github.com/umdjs/umd).
2643
2663
  *
2644
- * @default 'esm'
2664
+ * @default 'es'
2645
2665
  *
2646
2666
  *
2647
2667
  */
@@ -2722,7 +2742,7 @@ interface OutputOptions {
2722
2742
  */
2723
2743
  sourcemapPathTransform?: SourcemapPathTransformOption;
2724
2744
  /**
2725
- * A string to prepend to the bundle before `renderChunk` hook.
2745
+ * A string to prepend to the bundle before {@linkcode Plugin.renderChunk | renderChunk} hook.
2726
2746
  *
2727
2747
  * See {@linkcode intro | output.intro}, {@linkcode postBanner | output.postBanner} as well.
2728
2748
  *
@@ -2730,7 +2750,7 @@ interface OutputOptions {
2730
2750
  */
2731
2751
  banner?: string | AddonFunction;
2732
2752
  /**
2733
- * A string to append to the bundle before `renderChunk` hook.
2753
+ * A string to append to the bundle before {@linkcode Plugin.renderChunk | renderChunk} hook.
2734
2754
  *
2735
2755
  * See {@linkcode outro | output.outro}, {@linkcode postFooter | output.postFooter} as well.
2736
2756
  *
@@ -2738,7 +2758,7 @@ interface OutputOptions {
2738
2758
  */
2739
2759
  footer?: string | AddonFunction;
2740
2760
  /**
2741
- * A string to prepend to the bundle after `renderChunk` hook and minification.
2761
+ * A string to prepend to the bundle after {@linkcode Plugin.renderChunk | renderChunk} hook and minification.
2742
2762
  *
2743
2763
  * See {@linkcode banner | output.banner}, {@linkcode intro | output.intro} as well.
2744
2764
  *
@@ -2746,7 +2766,7 @@ interface OutputOptions {
2746
2766
  */
2747
2767
  postBanner?: string | AddonFunction;
2748
2768
  /**
2749
- * A string to append to the bundle after `renderChunk` hook and minification.
2769
+ * A string to append to the bundle after {@linkcode Plugin.renderChunk | renderChunk} hook and minification.
2750
2770
  *
2751
2771
  * See {@linkcode footer | output.footer}, {@linkcode outro | output.outro} as well.
2752
2772
  *
@@ -2754,7 +2774,7 @@ interface OutputOptions {
2754
2774
  */
2755
2775
  postFooter?: string | AddonFunction;
2756
2776
  /**
2757
- * A string to prepend inside any format-specific wrapper.
2777
+ * A string to prepend inside any {@link OutputOptions.format | format}-specific wrapper.
2758
2778
  *
2759
2779
  * See {@linkcode banner | output.banner}, {@linkcode postBanner | output.postBanner} as well.
2760
2780
  *
@@ -2762,7 +2782,7 @@ interface OutputOptions {
2762
2782
  */
2763
2783
  intro?: string | AddonFunction;
2764
2784
  /**
2765
- * A string to append inside any format-specific wrapper.
2785
+ * A string to append inside any {@link OutputOptions.format | format}-specific wrapper.
2766
2786
  *
2767
2787
  * See {@linkcode footer | output.footer}, {@linkcode postFooter | output.postFooter} as well.
2768
2788
  *
@@ -2770,7 +2790,7 @@ interface OutputOptions {
2770
2790
  */
2771
2791
  outro?: string | AddonFunction;
2772
2792
  /**
2773
- * Whether to extend the global variable defined by the {@linkcode OutputOptions.name | name} option in `umd` or `iife` formats.
2793
+ * Whether to extend the global variable defined by the {@linkcode OutputOptions.name | name} option in `umd` or `iife` {@link OutputOptions.format | formats}.
2774
2794
  *
2775
2795
  * When `true`, the global variable will be defined as `global.name = global.name || {}`.
2776
2796
  * When `false`, the global defined by name will be overwritten like `global.name = {}`.
@@ -2779,12 +2799,12 @@ interface OutputOptions {
2779
2799
  */
2780
2800
  extend?: boolean;
2781
2801
  /**
2782
- * Whether to add a `__esModule: true` property when generating exports for non-ES formats.
2802
+ * Whether to add a `__esModule: true` property when generating exports for non-ES {@link OutputOptions.format | formats}.
2783
2803
  *
2784
2804
  * This property signifies that the exported value is the namespace of an ES module and that the default export of this module corresponds to the `.default` property of the exported object.
2785
2805
  *
2786
- * - `true`: Always add the property when using named exports mode, which is similar to what other tools do.
2787
- * - `"if-default-prop"`: Only add the property when using named exports mode and there also is a default export. The subtle difference is that if there is no default export, consumers of the CommonJS version of your library will get all named exports as default export instead of an error or `undefined`.
2806
+ * - `true`: Always add the property when using {@link OutputOptions.exports | named exports mode}, which is similar to what other tools do.
2807
+ * - `"if-default-prop"`: Only add the property when using {@link OutputOptions.exports | named exports mode} and there also is a default export. The subtle difference is that if there is no default export, consumers of the CommonJS version of your library will get all named exports as default export instead of an error or `undefined`.
2788
2808
  * - `false`: Never add the property even if the default export would become a property `.default`.
2789
2809
  *
2790
2810
  * @default 'if-default-prop'
@@ -2839,18 +2859,6 @@ interface OutputOptions {
2839
2859
  */
2840
2860
  chunkFileNames?: string | ChunkFileNamesFunction;
2841
2861
  /**
2842
- * @default '[name].css'
2843
- * @experimental
2844
- * @hidden not ready for public usage yet
2845
- */
2846
- cssEntryFileNames?: string | ChunkFileNamesFunction;
2847
- /**
2848
- * @default '[name]-[hash].css'
2849
- * @experimental
2850
- * @hidden not ready for public usage yet
2851
- */
2852
- cssChunkFileNames?: string | ChunkFileNamesFunction;
2853
- /**
2854
2862
  * Whether to enable chunk name sanitization (removal of non-URL-safe characters like `\0`, `?` and `*`).
2855
2863
  *
2856
2864
  * Set `false` to disable the sanitization. You can also provide a custom sanitization function.
@@ -2864,15 +2872,15 @@ interface OutputOptions {
2864
2872
  * Rolldown uses Oxc Minifier under the hood. See Oxc's [minification documentation](https://oxc.rs/docs/guide/usage/minifier#features) for more details.
2865
2873
  *
2866
2874
  * - `true`: Enable full minification including code compression and dead code elimination
2867
- * - `false`: Disable minification (default)
2868
- * - `'dce-only'`: Only perform dead code elimination without code compression
2875
+ * - `false`: Disable minification
2876
+ * - `'dce-only'`: Only perform dead code elimination without code compression (default)
2869
2877
  * - `MinifyOptions`: Fine-grained control over minification settings
2870
2878
  *
2871
- * @default false
2879
+ * @default 'dce-only'
2872
2880
  */
2873
2881
  minify?: boolean | "dce-only" | MinifyOptions;
2874
2882
  /**
2875
- * Specifies the global variable name that contains the exports of `umd` / `iife` bundles.
2883
+ * Specifies the global variable name that contains the exports of `umd` / `iife` {@link OutputOptions.format | formats}.
2876
2884
  *
2877
2885
  * @example
2878
2886
  * ```js
@@ -2894,7 +2902,7 @@ interface OutputOptions {
2894
2902
  */
2895
2903
  name?: string;
2896
2904
  /**
2897
- * Specifies `id: variableName` pairs necessary for external imports in `umd` / `iife` bundles.
2905
+ * Specifies `id: variableName` pairs necessary for {@link InputOptions.external | external} imports in `umd` / `iife` {@link OutputOptions.format | formats}.
2898
2906
  *
2899
2907
  * @example
2900
2908
  * ```js
@@ -2922,7 +2930,7 @@ interface OutputOptions {
2922
2930
  */
2923
2931
  globals?: Record<string, string> | GlobalsFunction;
2924
2932
  /**
2925
- * Maps external module IDs to paths.
2933
+ * Maps {@link InputOptions.external | external} module IDs to paths.
2926
2934
  *
2927
2935
  * Allows customizing the path used when importing external dependencies.
2928
2936
  * This is particularly useful for loading dependencies from CDNs or custom locations.
@@ -2959,7 +2967,7 @@ interface OutputOptions {
2959
2967
  */
2960
2968
  generatedCode?: Partial<GeneratedCodeOptions>;
2961
2969
  /**
2962
- * Whether to generate code to support live bindings for external imports.
2970
+ * Whether to generate code to support live bindings for {@link InputOptions.external | external} imports.
2963
2971
  *
2964
2972
  * With the default value of `true`, Rolldown will generate code to support live bindings for external imports.
2965
2973
  *
@@ -3044,6 +3052,8 @@ interface OutputOptions {
3044
3052
  *
3045
3053
  * For deeper understanding, please refer to the in-depth [documentation](https://rolldown.rs/in-depth/manual-code-splitting).
3046
3054
  *
3055
+ *
3056
+ *
3047
3057
  * @example
3048
3058
  * **Basic vendor chunk**
3049
3059
  * ```js
@@ -3085,13 +3095,32 @@ interface OutputOptions {
3085
3095
  groups?: CodeSplittingGroup[];
3086
3096
  };
3087
3097
  /**
3088
- * Control comments in the output.
3098
+ * Controls how legal comments are preserved in the output.
3089
3099
  *
3090
- * - `none`: no comments
3091
- * - `inline`: preserve comments that contain `@license`, `@preserve` or starts with `//!` `/*!`
3100
+ * - `none`: no legal comments
3101
+ * - `inline`: preserve legal comments that contain `@license`, `@preserve` or starts with `//!` `/*!`
3102
+ *
3103
+ * @deprecated Use `comments.legal` instead. When both `legalComments` and `comments.legal` are set, `comments.legal` takes priority.
3092
3104
  */
3093
3105
  legalComments?: "none" | "inline";
3094
3106
  /**
3107
+ * Control which comments are preserved in the output.
3108
+ *
3109
+ * - `true`: Preserve legal, annotation, and JSDoc comments (default)
3110
+ * - `false`: Strip all comments
3111
+ * - Object: Granular control over comment categories
3112
+ *
3113
+ * Note: Regular line and block comments without these markers
3114
+ * are always removed regardless of this option.
3115
+ *
3116
+ * When both `legalComments` and `comments.legal` are set, `comments.legal` takes priority.
3117
+ *
3118
+ *
3119
+ *
3120
+ * @default true
3121
+ */
3122
+ comments?: boolean | CommentsOptions;
3123
+ /**
3095
3124
  * The list of plugins to use only for this output.
3096
3125
  *
3097
3126
  * @see {@linkcode InputOptions.plugins | plugins}
@@ -3119,13 +3148,13 @@ interface OutputOptions {
3119
3148
  */
3120
3149
  preserveModules?: boolean;
3121
3150
  /**
3122
- * Specifies the directory name for "virtual" files that might be emitted by plugins when using preserve modules mode.
3151
+ * Specifies the directory name for "virtual" files that might be emitted by plugins when using {@link OutputOptions.preserveModules | preserve modules mode}.
3123
3152
  *
3124
3153
  * @default '_virtual'
3125
3154
  */
3126
3155
  virtualDirname?: string;
3127
3156
  /**
3128
- * A directory path to input modules that should be stripped away from {@linkcode dir | output.dir} when using preserve modules mode.
3157
+ * A directory path to input modules that should be stripped away from {@linkcode dir | output.dir} when using {@link OutputOptions.preserveModules | preserve modules mode}.
3129
3158
  *
3130
3159
  *
3131
3160
  */
@@ -3179,6 +3208,18 @@ interface OutputOptions {
3179
3208
  * @default false
3180
3209
  */
3181
3210
  strictExecutionOrder?: boolean;
3211
+ /**
3212
+ * Whether to always output `"use strict"` directive in non-ES module outputs.
3213
+ *
3214
+ * - `true` - Always emit `"use strict"` at the top of the output (not applicable for ESM format since ESM is always strict).
3215
+ * - `false` - Never emit `"use strict"` in the output.
3216
+ * - `'auto'` - Respect the `"use strict"` directives from the source code.
3217
+ *
3218
+ * See [In-depth directive guide](https://rolldown.rs/in-depth/directives) for more details.
3219
+ *
3220
+ * @default 'auto'
3221
+ */
3222
+ strict?: boolean | "auto";
3182
3223
  }
3183
3224
  type CodeSplittingGroup = {
3184
3225
  /**
@@ -3313,6 +3354,36 @@ type CodeSplittingGroup = {
3313
3354
  * @default 0
3314
3355
  */
3315
3356
  minModuleSize?: number;
3357
+ /**
3358
+ * When `false` (default), all matching modules are merged into a single chunk.
3359
+ * Every entry that uses any of these modules must load the entire chunk — even
3360
+ * modules it doesn't need.
3361
+ *
3362
+ * When `true`, matching modules are grouped by which entries actually import them.
3363
+ * Modules shared by the same set of entries go into the same chunk, while modules
3364
+ * shared by a different set go into a separate chunk. This way, each entry only
3365
+ * loads the code it actually uses.
3366
+ *
3367
+ * Example: entries A, B, C all match a `"vendor"` group.
3368
+ * - `moduleX` is used by A, B, C
3369
+ * - `moduleY` is used by A, B only
3370
+ *
3371
+ * With `entriesAware: false` → one `vendor.js` chunk with both modules; C loads `moduleY` unnecessarily.
3372
+ * With `entriesAware: true` → `vendor.js` (moduleX, loaded by all) + `vendor2.js` (moduleY, loaded by A and B only).
3373
+ *
3374
+ * @default false
3375
+ */
3376
+ entriesAware?: boolean;
3377
+ /**
3378
+ * Size threshold in bytes for merging small `entriesAware` subgroups into the
3379
+ * closest neighboring subgroup.
3380
+ *
3381
+ * This option only works when {@linkcode CodeSplittingGroup.entriesAware | entriesAware}
3382
+ * is `true`. Set to `0` to disable subgroup merging.
3383
+ *
3384
+ * @default 0
3385
+ */
3386
+ entriesAwareMergeThreshold?: number;
3316
3387
  };
3317
3388
  /**
3318
3389
  * Alias for {@linkcode CodeSplittingGroup}. Use this type for the `codeSplitting.groups` option.
@@ -3366,6 +3437,15 @@ type CodeSplittingOptions = {
3366
3437
  * @deprecated Please use {@linkcode CodeSplittingOptions} instead.
3367
3438
  */
3368
3439
  //#endregion
3440
+ //#region src/binding-magic-string.d.ts
3441
+ interface BindingMagicString extends BindingMagicString$1 {
3442
+ readonly isRolldownMagicString: true;
3443
+ }
3444
+ type BindingMagicStringConstructor = Omit<typeof BindingMagicString$1, "prototype"> & {
3445
+ new (...args: ConstructorParameters<typeof BindingMagicString$1>): BindingMagicString;
3446
+ prototype: BindingMagicString;
3447
+ };
3448
+ declare const BindingMagicString: BindingMagicStringConstructor; //#endregion
3369
3449
  //#region src/log/log-handler.d.ts
3370
3450
  type LoggingFunction = (log: RolldownLog | string | (() => RolldownLog | string)) => void;
3371
3451
  type LoggingFunctionWithPosition = (log: RolldownLog | string | (() => RolldownLog | string), pos?: number | {
@@ -3503,6 +3583,16 @@ interface ChecksOptions {
3503
3583
  * @default true
3504
3584
  * */
3505
3585
  duplicateShebang?: boolean;
3586
+ /**
3587
+ * Whether to emit warnings when a tsconfig option or combination of options is not supported.
3588
+ * @default true
3589
+ * */
3590
+ unsupportedTsconfigOption?: boolean;
3591
+ /**
3592
+ * Whether to emit warnings when a module is dynamically imported but also statically imported, making the dynamic import ineffective for code splitting.
3593
+ * @default true
3594
+ * */
3595
+ ineffectiveDynamicImport?: boolean;
3506
3596
  } //#endregion
3507
3597
  //#region src/options/transform-options.d.ts
3508
3598
  interface TransformOptions extends Omit<TransformOptions$1, "sourceType" | "lang" | "cwd" | "sourcemap" | "define" | "inject" | "jsx"> {
@@ -3629,6 +3719,8 @@ interface NormalizedInputOptions {
3629
3719
  shimMissingExports: boolean;
3630
3720
  /** @see {@linkcode InputOptions.context | context} */
3631
3721
  context: string;
3722
+ /** @see {@linkcode InputOptions.plugins | plugins} */
3723
+ plugins: RolldownPlugin[];
3632
3724
  } //#endregion
3633
3725
  //#region src/options/normalized-output-options.d.ts
3634
3726
  type PathsFunction = (id: string) => string;
@@ -3659,10 +3751,6 @@ interface NormalizedOutputOptions {
3659
3751
  sourcemap: boolean | "inline" | "hidden";
3660
3752
  /** @see {@linkcode OutputOptions.sourcemapBaseUrl | sourcemapBaseUrl} */
3661
3753
  sourcemapBaseUrl: string | undefined;
3662
- /** @see {@linkcode OutputOptions.cssEntryFileNames | cssEntryFileNames} */
3663
- cssEntryFileNames: string | ChunkFileNamesFunction;
3664
- /** @see {@linkcode OutputOptions.cssChunkFileNames | cssChunkFileNames} */
3665
- cssChunkFileNames: string | ChunkFileNamesFunction;
3666
3754
  /** @see {@linkcode OutputOptions.codeSplitting | codeSplitting} */
3667
3755
  codeSplitting: boolean;
3668
3756
  /** @deprecated Use `codeSplitting` instead. */
@@ -3701,8 +3789,13 @@ interface NormalizedOutputOptions {
3701
3789
  sourcemapPathTransform: SourcemapPathTransformOption | undefined;
3702
3790
  /** @see {@linkcode OutputOptions.minify | minify} */
3703
3791
  minify: false | MinifyOptions | "dce-only";
3704
- /** @see {@linkcode OutputOptions.legalComments | legalComments} */
3792
+ /**
3793
+ * @deprecated Use `comments.legal` instead.
3794
+ * @see {@linkcode OutputOptions.legalComments | legalComments}
3795
+ */
3705
3796
  legalComments: "none" | "inline";
3797
+ /** @see {@linkcode OutputOptions.comments | comments} */
3798
+ comments: Required<CommentsOptions>;
3706
3799
  /** @see {@linkcode OutputOptions.polyfillRequire | polyfillRequire} */
3707
3800
  polyfillRequire: boolean;
3708
3801
  /** @see {@linkcode OutputOptions.plugins | plugins} */
@@ -4319,7 +4412,7 @@ type TreeshakingOptions = {
4319
4412
  *
4320
4413
  * See [related Oxc documentation](https://oxc.rs/docs/guide/usage/minifier/dead-code-elimination#ignoring-invalid-import-statement-side-effects) for more details.
4321
4414
  *
4322
- * @default true
4415
+ * @default false
4323
4416
  */
4324
4417
  invalidImportSideEffects?: boolean;
4325
4418
  /**
@@ -4379,12 +4472,9 @@ interface ExistingRawSourceMap {
4379
4472
  }
4380
4473
  /** @inline @category Plugin APIs */
4381
4474
  type SourceMapInput = ExistingRawSourceMap | string | null; //#endregion
4382
- //#region src/version.d.ts
4475
+ //#region src/utils/error.d.ts
4383
4476
  /**
4384
- * The version of Rolldown.
4385
- * @example `'1.0.0'`
4386
- *
4387
- * @category Plugin APIs
4477
+ * The error type that is thrown by Rolldown for the whole build.
4388
4478
  */
4389
4479
  //#endregion
4390
4480
  //#region src/builtin-plugin/utils.d.ts
@@ -4641,6 +4731,8 @@ interface FunctionPluginHooks {
4641
4731
  *
4642
4732
  * You can use {@linkcode PluginContext.getModuleInfo | this.getModuleInfo()} to find out the previous values of `meta`, `moduleSideEffects` inside this hook.
4643
4733
  *
4734
+ *
4735
+ *
4644
4736
  * @group Build Hooks
4645
4737
  */
4646
4738
  [DEFINED_HOOK_NAMES.transform]: (this: TransformPluginContext, code: string, id: string, meta: BindingTransformHookExtraArgs & {
@@ -4901,7 +4993,53 @@ type InputOption = string | string[] | Record<string, string>;
4901
4993
  type ExternalOptionFunction = (id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>;
4902
4994
  /** @inline */
4903
4995
  type ExternalOption = StringOrRegExp | StringOrRegExp[] | ExternalOptionFunction;
4904
- type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css" | "asset">;
4996
+ type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css" | "asset" | "copy">;
4997
+ interface WatcherFileWatcherOptions {
4998
+ /**
4999
+ * Whether to use polling-based file watching instead of native OS events.
5000
+ *
5001
+ * Polling is useful for environments where native FS events are unreliable,
5002
+ * such as network mounts, Docker volumes, or WSL2.
5003
+ *
5004
+ * @default false
5005
+ */
5006
+ usePolling?: boolean;
5007
+ /**
5008
+ * Interval between each poll in milliseconds.
5009
+ *
5010
+ * This option is only used when {@linkcode usePolling} is `true`.
5011
+ *
5012
+ * @default 100
5013
+ */
5014
+ pollInterval?: number;
5015
+ /**
5016
+ * Whether to compare file contents for poll-based watchers.
5017
+ * When enabled, poll watchers will check file contents to determine if they actually changed.
5018
+ *
5019
+ * This option is only used when {@linkcode usePolling} is `true`.
5020
+ *
5021
+ * @default false
5022
+ */
5023
+ compareContentsForPolling?: boolean;
5024
+ /**
5025
+ * Whether to use debounced event delivery at the filesystem level.
5026
+ * This coalesces rapid filesystem events before they reach the build coordinator.
5027
+ * @default false
5028
+ */
5029
+ useDebounce?: boolean;
5030
+ /**
5031
+ * Debounce delay in milliseconds for fs-level debounced watchers.
5032
+ * Only used when {@linkcode useDebounce} is `true`.
5033
+ * @default 10
5034
+ */
5035
+ debounceDelay?: number;
5036
+ /**
5037
+ * Tick rate in milliseconds for the debouncer's internal polling.
5038
+ * Only used when {@linkcode useDebounce} is `true`.
5039
+ * When undefined, auto-selects 1/4 of debounceDelay.
5040
+ */
5041
+ debounceTickRate?: number;
5042
+ }
4905
5043
  interface WatcherOptions {
4906
5044
  /**
4907
5045
  * Whether to skip the {@linkcode RolldownBuild.write | bundle.write()} step when a rebuild is triggered.
@@ -4927,32 +5065,13 @@ interface WatcherOptions {
4927
5065
  */
4928
5066
  buildDelay?: number;
4929
5067
  /**
4930
- * An optional object of options that will be passed to the [notify](https://github.com/rolldown/notify) file watcher.
5068
+ * File watcher options for configuring how file changes are detected.
4931
5069
  */
4932
- notify?: {
4933
- /**
4934
- * Interval between each re-scan attempt in milliseconds.
4935
- *
4936
- * This option is only used when polling backend is used.
4937
- *
4938
- * @default 30_000
4939
- */
4940
- pollInterval?: number;
4941
- /**
4942
- * Whether to compare file contents when checking for changes.
4943
- *
4944
- * This is especially important for pseudo filesystems like those on Linux
4945
- * under `/sys` and `/proc` which are not obligated to respect any other
4946
- * filesystem norms such as modification timestamps, file sizes, etc. By
4947
- * enabling this feature, performance will be significantly impacted as
4948
- * all files will need to be read and hashed at each interval.
4949
- *
4950
- * This option is only used when polling backend is used.
4951
- *
4952
- * @default false
4953
- */
4954
- compareContents?: boolean;
4955
- };
5070
+ watcher?: WatcherFileWatcherOptions;
5071
+ /**
5072
+ * @deprecated Use {@linkcode watcher} instead.
5073
+ */
5074
+ notify?: WatcherFileWatcherOptions;
4956
5075
  /**
4957
5076
  * Filter to limit the file-watching to certain files.
4958
5077
  *
@@ -5054,7 +5173,7 @@ type OptimizationOptions = {
5054
5173
  * console.log(API_URL);
5055
5174
  * ```
5056
5175
  *
5057
- * @default false
5176
+ * @default { mode: 'smart', pass: 1 }
5058
5177
  */
5059
5178
  inlineConst?: boolean | {
5060
5179
  mode?: "all" | "smart";
@@ -5583,6 +5702,14 @@ interface InputOptions {
5583
5702
  tsconfig?: boolean | string;
5584
5703
  } //#endregion
5585
5704
  //#region src/types/rolldown-options.d.ts
5705
+ interface RolldownOptions extends InputOptions {
5706
+ output?: OutputOptions | OutputOptions[];
5707
+ } //#endregion
5708
+ //#region src/utils/define-config.d.ts
5709
+ /**
5710
+ * Type for `default export` of `rolldown.config.js` file.
5711
+ * @category Config
5712
+ */
5586
5713
  //#endregion
5587
5714
  //#region src/Types/ConfigTypes.d.ts
5588
5715
  /**
@@ -5592,25 +5719,7 @@ declare namespace ConfigTypes {
5592
5719
  /**
5593
5720
  * Runtime configuration interface that can be modified during application execution.
5594
5721
  */
5595
- interface RuntimeConfig {
5596
- /**
5597
- * Session configuration options.
5598
- */
5599
- session?: {
5600
- /**
5601
- * The secret used to sign the session ID cookie.
5602
- */
5603
- secret?: string;
5604
- /**
5605
- * The name of the session ID cookie.
5606
- */
5607
- name?: string;
5608
- /**
5609
- * The duration of time for the session to be active.
5610
- */
5611
- duration?: number;
5612
- };
5613
- }
5722
+ interface RuntimeConfig {}
5614
5723
  /**
5615
5724
  * Helper type to create a fully typed runtime configuration.
5616
5725
  * This allows users to define their own runtime configuration structure
@@ -5636,6 +5745,8 @@ declare namespace ConfigTypes {
5636
5745
  entry?: string | string[];
5637
5746
  /**
5638
5747
  * Defines to pass to the build.
5748
+ * @deprecated Use `rolldownConfig.transform.define` instead.
5749
+ * This field is still applied via the base config but will be removed in a future release.
5639
5750
  */
5640
5751
  define?: Record<string, string>;
5641
5752
  /**
@@ -5648,6 +5759,8 @@ declare namespace ConfigTypes {
5648
5759
  dts?: boolean;
5649
5760
  /**
5650
5761
  * Additional plugins to use in the bundler.
5762
+ * @deprecated Use `rolldownConfig.plugins` instead.
5763
+ * This field is still applied via the base config but will be removed in a future release.
5651
5764
  */
5652
5765
  plugins?: RolldownPluginOption[];
5653
5766
  /**
@@ -5667,6 +5780,12 @@ declare namespace ConfigTypes {
5667
5780
  * The bundler to use for the application build.
5668
5781
  */
5669
5782
  bundler?: 'rolldown';
5783
+ /**
5784
+ * Additional options passed directly to the rolldown bundler.
5785
+ * These options are deep-merged with the base config using `defu`, meaning values provided here take precedence over the defaults.
5786
+ * The `input`, `output`, and `onwarn` fields are managed internally and cannot be overridden here.
5787
+ */
5788
+ rolldownConfig?: Omit<RolldownOptions, 'input' | 'output' | 'onwarn'>;
5670
5789
  }
5671
5790
  /**
5672
5791
  * Server configuration options for the application.