@rolldown/browser 1.0.0-beta.31 → 1.0.0-beta.31-commit.832324a

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.
Files changed (44) hide show
  1. package/dist/cli.cjs +6 -6
  2. package/dist/cli.mjs +6 -6
  3. package/dist/config.cjs +4 -4
  4. package/dist/config.d.cts +2 -2
  5. package/dist/config.d.mts +2 -2
  6. package/dist/config.mjs +4 -4
  7. package/dist/experimental-index.browser.mjs +1 -1
  8. package/dist/experimental-index.cjs +3 -3
  9. package/dist/experimental-index.d.cts +2 -2
  10. package/dist/experimental-index.d.mts +2 -2
  11. package/dist/experimental-index.mjs +3 -3
  12. package/dist/experimental-runtime-types.d.ts +7 -4
  13. package/dist/filter-index.cjs +1 -1
  14. package/dist/filter-index.d.cts +2 -2
  15. package/dist/filter-index.d.mts +2 -2
  16. package/dist/filter-index.mjs +1 -1
  17. package/dist/index.browser.mjs +1 -1
  18. package/dist/index.cjs +3 -3
  19. package/dist/index.d.cts +2 -2
  20. package/dist/index.d.mts +2 -2
  21. package/dist/index.mjs +3 -3
  22. package/dist/parallel-plugin-worker.cjs +3 -3
  23. package/dist/parallel-plugin-worker.mjs +3 -3
  24. package/dist/parallel-plugin.d.cts +2 -2
  25. package/dist/parallel-plugin.d.mts +2 -2
  26. package/dist/parse-ast-index.cjs +1 -1
  27. package/dist/parse-ast-index.d.cts +1 -1
  28. package/dist/parse-ast-index.d.mts +1 -1
  29. package/dist/parse-ast-index.mjs +1 -1
  30. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  31. package/dist/shared/{binding-B2f_h9DF.d.mts → binding-BIqlUgrm.d.cts} +1 -0
  32. package/dist/shared/{binding-CCkTRaSB.d.cts → binding-COE5UL-B.d.mts} +1 -0
  33. package/dist/shared/{define-config-xzVj_WrD.d.mts → define-config-Cf2D2abn.d.mts} +18 -4
  34. package/dist/shared/{define-config-BzVT47Bj.d.cts → define-config-DFC0Nu7H.d.cts} +18 -4
  35. package/dist/shared/{load-config-DCz6MK3j.mjs → load-config-CoJFc3w2.mjs} +1 -1
  36. package/dist/shared/{load-config-9KWiC1Y_.cjs → load-config-Dw0YNzS-.cjs} +1 -1
  37. package/dist/shared/{parse-ast-index-r9XO-GhB.mjs → parse-ast-index-CqHkFxPM.mjs} +1 -1
  38. package/dist/shared/{parse-ast-index-DZ5uPSgP.cjs → parse-ast-index-DAsDnaa1.cjs} +1 -1
  39. package/dist/shared/{src-BSeUgDdv.mjs → src-38thNb51.mjs} +18 -7
  40. package/dist/shared/{src-gD0LmYxq.cjs → src-DEIlKgUM.cjs} +18 -7
  41. package/dist/{src-C8_hb_FH.js → src-jf6KDQ1I.js} +209 -198
  42. package/package.json +2 -2
  43. /package/dist/shared/{dist-DvBwroyk.mjs → dist-ByKQkexh.mjs} +0 -0
  44. /package/dist/shared/{dist-BVAp8sOm.cjs → dist-CK0hotcm.cjs} +0 -0
package/dist/cli.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-gD0LmYxq.cjs');
3
- const require_dist = require('./shared/dist-BVAp8sOm.cjs');
4
- require('./shared/parse-ast-index-DZ5uPSgP.cjs');
5
- const require_load_config = require('./shared/load-config-9KWiC1Y_.cjs');
2
+ const require_src = require('./shared/src-DEIlKgUM.cjs');
3
+ require('./shared/parse-ast-index-DAsDnaa1.cjs');
4
+ const require_dist = require('./shared/dist-CK0hotcm.cjs');
5
+ const require_load_config = require('./shared/load-config-Dw0YNzS-.cjs');
6
6
  const node_path = require_chunk.__toESM(require("node:path"));
7
7
  const node_process = require_chunk.__toESM(require("node:process"));
8
8
  const node_util = require_chunk.__toESM(require("node:util"));
@@ -1434,8 +1434,8 @@ function getClearScreenFunction(options$1) {
1434
1434
  }
1435
1435
 
1436
1436
  //#endregion
1437
- //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.80.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
1438
- var require_usingCtx = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.80.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js": ((exports, module) => {
1437
+ //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.81.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
1438
+ var require_usingCtx = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.81.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js": ((exports, module) => {
1439
1439
  function _usingCtx() {
1440
1440
  var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
1441
1441
  var n$2 = Error();
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { __commonJS, __toESM, ansis_default, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-BSeUgDdv.mjs";
2
- import { arraify } from "./shared/dist-DvBwroyk.mjs";
3
- import "./shared/parse-ast-index-r9XO-GhB.mjs";
4
- import { loadConfig } from "./shared/load-config-DCz6MK3j.mjs";
1
+ import { __commonJS, __toESM, ansis_default, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, rolldown, validateCliOptions, version, watch } from "./shared/src-38thNb51.mjs";
2
+ import "./shared/parse-ast-index-CqHkFxPM.mjs";
3
+ import { arraify } from "./shared/dist-ByKQkexh.mjs";
4
+ import { loadConfig } from "./shared/load-config-CoJFc3w2.mjs";
5
5
  import path, { sep } from "node:path";
6
6
  import process$1 from "node:process";
7
7
  import { formatWithOptions, parseArgs } from "node:util";
@@ -1433,8 +1433,8 @@ function getClearScreenFunction(options$1) {
1433
1433
  }
1434
1434
 
1435
1435
  //#endregion
1436
- //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.80.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
1437
- var require_usingCtx = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.80.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js": ((exports, module) => {
1436
+ //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.81.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
1437
+ var require_usingCtx = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.81.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js": ((exports, module) => {
1438
1438
  function _usingCtx() {
1439
1439
  var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
1440
1440
  var n$2 = Error();
package/dist/config.cjs CHANGED
@@ -1,7 +1,7 @@
1
- const require_src = require('./shared/src-gD0LmYxq.cjs');
2
- require('./shared/dist-BVAp8sOm.cjs');
3
- require('./shared/parse-ast-index-DZ5uPSgP.cjs');
4
- const require_load_config = require('./shared/load-config-9KWiC1Y_.cjs');
1
+ const require_src = require('./shared/src-DEIlKgUM.cjs');
2
+ require('./shared/parse-ast-index-DAsDnaa1.cjs');
3
+ require('./shared/dist-CK0hotcm.cjs');
4
+ const require_load_config = require('./shared/load-config-Dw0YNzS-.cjs');
5
5
 
6
6
  //#region src/config.ts
7
7
  const VERSION = require_src.version;
package/dist/config.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import "./shared/binding-CCkTRaSB.cjs";
2
- import { ConfigExport, defineConfig } from "./shared/define-config-BzVT47Bj.cjs";
1
+ import "./shared/binding-BIqlUgrm.cjs";
2
+ import { ConfigExport, defineConfig } from "./shared/define-config-DFC0Nu7H.cjs";
3
3
 
4
4
  //#region src/utils/load-config.d.ts
5
5
  declare function loadConfig(configPath: string): Promise<ConfigExport>;
package/dist/config.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import "./shared/binding-B2f_h9DF.mjs";
2
- import { ConfigExport, defineConfig } from "./shared/define-config-xzVj_WrD.mjs";
1
+ import "./shared/binding-COE5UL-B.mjs";
2
+ import { ConfigExport, defineConfig } from "./shared/define-config-Cf2D2abn.mjs";
3
3
 
4
4
  //#region src/utils/load-config.d.ts
5
5
  declare function loadConfig(configPath: string): Promise<ConfigExport>;
package/dist/config.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { defineConfig, version } from "./shared/src-BSeUgDdv.mjs";
2
- import "./shared/dist-DvBwroyk.mjs";
3
- import "./shared/parse-ast-index-r9XO-GhB.mjs";
4
- import { loadConfig } from "./shared/load-config-DCz6MK3j.mjs";
1
+ import { defineConfig, version } from "./shared/src-38thNb51.mjs";
2
+ import "./shared/parse-ast-index-CqHkFxPM.mjs";
3
+ import "./shared/dist-ByKQkexh.mjs";
4
+ import { loadConfig } from "./shared/load-config-CoJFc3w2.mjs";
5
5
 
6
6
  //#region src/config.ts
7
7
  const VERSION = version;
@@ -1,4 +1,4 @@
1
- import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-C8_hb_FH.js";
1
+ import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./src-jf6KDQ1I.js";
2
2
  import { BindingBundler, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
3
3
 
4
4
  //#region src/api/experimental.ts
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-gD0LmYxq.cjs');
3
- require('./shared/dist-BVAp8sOm.cjs');
4
- require('./shared/parse-ast-index-DZ5uPSgP.cjs');
2
+ const require_src = require('./shared/src-DEIlKgUM.cjs');
3
+ require('./shared/parse-ast-index-DAsDnaa1.cjs');
4
+ require('./shared/dist-CK0hotcm.cjs');
5
5
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
6
6
  const node_url = require_chunk.__toESM(require("node:url"));
7
7
 
@@ -1,5 +1,5 @@
1
- import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-CCkTRaSB.cjs";
2
- import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-BzVT47Bj.cjs";
1
+ import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-BIqlUgrm.cjs";
2
+ import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-DFC0Nu7H.cjs";
3
3
 
4
4
  //#region src/api/experimental.d.ts
5
5
 
@@ -1,5 +1,5 @@
1
- import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-B2f_h9DF.mjs";
2
- import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-xzVj_WrD.mjs";
1
+ import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-COE5UL-B.mjs";
2
+ import { BuiltinPlugin, InputOptions, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/define-config-Cf2D2abn.mjs";
3
3
 
4
4
  //#region src/api/experimental.d.ts
5
5
 
@@ -1,6 +1,6 @@
1
- import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-BSeUgDdv.mjs";
2
- import "./shared/dist-DvBwroyk.mjs";
3
- import "./shared/parse-ast-index-r9XO-GhB.mjs";
1
+ import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-38thNb51.mjs";
2
+ import "./shared/parse-ast-index-CqHkFxPM.mjs";
3
+ import "./shared/dist-ByKQkexh.mjs";
4
4
  import { BindingBundler, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
5
5
  import { pathToFileURL } from "node:url";
6
6
 
@@ -13,9 +13,9 @@ export class DevRuntime {
13
13
  applyUpdates(_boundaries: string[]): void;
14
14
  /**
15
15
  * @param {string} id
16
- * @param {{ exports: any }} meta
16
+ * @param {{ exports: any }} exportsHolder
17
17
  */
18
- registerModule(id: string, meta: {
18
+ registerModule(id: string, exportsHolder: {
19
19
  exports: any;
20
20
  }): void;
21
21
  /**
@@ -57,12 +57,15 @@ declare class Module {
57
57
  */
58
58
  constructor(id: string);
59
59
  /**
60
- * @type {any}
60
+ * @type {{ exports: any }}
61
61
  */
62
- exports: any;
62
+ exportsHolder: {
63
+ exports: any;
64
+ };
63
65
  /**
64
66
  * @type {string}
65
67
  */
66
68
  id: string;
69
+ get exports(): any;
67
70
  }
68
71
  export {};
@@ -1,4 +1,4 @@
1
- const require_dist = require('./shared/dist-BVAp8sOm.cjs');
1
+ const require_dist = require('./shared/dist-CK0hotcm.cjs');
2
2
 
3
3
  //#region src/plugin/with-filter.ts
4
4
  function withFilterImpl(pluginOption, filterObjectList) {
@@ -1,4 +1,4 @@
1
- import "./shared/binding-CCkTRaSB.cjs";
2
- import { withFilter } from "./shared/define-config-BzVT47Bj.cjs";
1
+ import "./shared/binding-BIqlUgrm.cjs";
2
+ import { withFilter } from "./shared/define-config-DFC0Nu7H.cjs";
3
3
  import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
4
4
  export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
@@ -1,4 +1,4 @@
1
- import "./shared/binding-B2f_h9DF.mjs";
2
- import { withFilter } from "./shared/define-config-xzVj_WrD.mjs";
1
+ import "./shared/binding-COE5UL-B.mjs";
2
+ import { withFilter } from "./shared/define-config-Cf2D2abn.mjs";
3
3
  import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
4
4
  export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
@@ -1,4 +1,4 @@
1
- import { and, arraify, code, exclude, id, include, isPromiseLike, moduleType, not, or, queries, query } from "./shared/dist-DvBwroyk.mjs";
1
+ import { and, arraify, code, exclude, id, include, isPromiseLike, moduleType, not, or, queries, query } from "./shared/dist-ByKQkexh.mjs";
2
2
 
3
3
  //#region src/plugin/with-filter.ts
4
4
  function withFilterImpl(pluginOption, filterObjectList) {
@@ -1,3 +1,3 @@
1
- import { VERSION, build, defineConfig, rolldown, watch } from "./src-C8_hb_FH.js";
1
+ import { VERSION, build, defineConfig, rolldown, watch } from "./src-jf6KDQ1I.js";
2
2
 
3
3
  export { VERSION, build, defineConfig, rolldown, watch };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
- const require_src = require('./shared/src-gD0LmYxq.cjs');
2
- require('./shared/dist-BVAp8sOm.cjs');
3
- require('./shared/parse-ast-index-DZ5uPSgP.cjs');
1
+ const require_src = require('./shared/src-DEIlKgUM.cjs');
2
+ require('./shared/parse-ast-index-DAsDnaa1.cjs');
3
+ require('./shared/dist-CK0hotcm.cjs');
4
4
 
5
5
  exports.VERSION = require_src.VERSION;
6
6
  exports.build = require_src.build;
package/dist/index.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { PreRenderedChunk } from "./shared/binding-CCkTRaSB.cjs";
2
- import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-BzVT47Bj.cjs";
1
+ import { PreRenderedChunk } from "./shared/binding-BIqlUgrm.cjs";
2
+ import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-DFC0Nu7H.cjs";
3
3
  export { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
package/dist/index.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { PreRenderedChunk } from "./shared/binding-B2f_h9DF.mjs";
2
- import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-xzVj_WrD.mjs";
1
+ import { PreRenderedChunk } from "./shared/binding-COE5UL-B.mjs";
2
+ import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-Cf2D2abn.mjs";
3
3
  export { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-BSeUgDdv.mjs";
2
- import "./shared/dist-DvBwroyk.mjs";
3
- import "./shared/parse-ast-index-r9XO-GhB.mjs";
1
+ import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-38thNb51.mjs";
2
+ import "./shared/parse-ast-index-CqHkFxPM.mjs";
3
+ import "./shared/dist-ByKQkexh.mjs";
4
4
 
5
5
  export { VERSION, build, defineConfig, rolldown, watch };
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
2
- const require_src = require('./shared/src-gD0LmYxq.cjs');
3
- require('./shared/dist-BVAp8sOm.cjs');
4
- require('./shared/parse-ast-index-DZ5uPSgP.cjs');
2
+ const require_src = require('./shared/src-DEIlKgUM.cjs');
3
+ require('./shared/parse-ast-index-DAsDnaa1.cjs');
4
+ require('./shared/dist-CK0hotcm.cjs');
5
5
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
6
6
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
7
7
 
@@ -1,6 +1,6 @@
1
- import { PluginContextData, bindingifyPlugin } from "./shared/src-BSeUgDdv.mjs";
2
- import "./shared/dist-DvBwroyk.mjs";
3
- import "./shared/parse-ast-index-r9XO-GhB.mjs";
1
+ import { PluginContextData, bindingifyPlugin } from "./shared/src-38thNb51.mjs";
2
+ import "./shared/parse-ast-index-CqHkFxPM.mjs";
3
+ import "./shared/dist-ByKQkexh.mjs";
4
4
  import { registerPlugins } from "./rolldown-binding.wasi.cjs";
5
5
  import { parentPort, workerData } from "node:worker_threads";
6
6
 
@@ -1,5 +1,5 @@
1
- import "./shared/binding-CCkTRaSB.cjs";
2
- import { MaybePromise, Plugin } from "./shared/define-config-BzVT47Bj.cjs";
1
+ import "./shared/binding-BIqlUgrm.cjs";
2
+ import { MaybePromise, Plugin } from "./shared/define-config-DFC0Nu7H.cjs";
3
3
 
4
4
  //#region src/plugin/parallel-plugin-implementation.d.ts
5
5
  type ParallelPluginImplementation = Plugin;
@@ -1,5 +1,5 @@
1
- import "./shared/binding-B2f_h9DF.mjs";
2
- import { MaybePromise, Plugin } from "./shared/define-config-xzVj_WrD.mjs";
1
+ import "./shared/binding-COE5UL-B.mjs";
2
+ import { MaybePromise, Plugin } from "./shared/define-config-Cf2D2abn.mjs";
3
3
 
4
4
  //#region src/plugin/parallel-plugin-implementation.d.ts
5
5
  type ParallelPluginImplementation = Plugin;
@@ -1,4 +1,4 @@
1
- const require_parse_ast_index = require('./shared/parse-ast-index-DZ5uPSgP.cjs');
1
+ const require_parse_ast_index = require('./shared/parse-ast-index-DAsDnaa1.cjs');
2
2
 
3
3
  exports.parseAst = require_parse_ast_index.parseAst;
4
4
  exports.parseAstAsync = require_parse_ast_index.parseAstAsync;
@@ -1,4 +1,4 @@
1
- import { ParseResult, ParserOptions } from "./shared/binding-CCkTRaSB.cjs";
1
+ import { ParseResult, ParserOptions } from "./shared/binding-BIqlUgrm.cjs";
2
2
  import { Program } from "@oxc-project/types";
3
3
 
4
4
  //#region src/parse-ast-index.d.ts
@@ -1,4 +1,4 @@
1
- import { ParseResult, ParserOptions } from "./shared/binding-B2f_h9DF.mjs";
1
+ import { ParseResult, ParserOptions } from "./shared/binding-COE5UL-B.mjs";
2
2
  import { Program } from "@oxc-project/types";
3
3
 
4
4
  //#region src/parse-ast-index.d.ts
@@ -1,3 +1,3 @@
1
- import { parseAst, parseAstAsync } from "./shared/parse-ast-index-r9XO-GhB.mjs";
1
+ import { parseAst, parseAstAsync } from "./shared/parse-ast-index-CqHkFxPM.mjs";
2
2
 
3
3
  export { parseAst, parseAstAsync };
@@ -1226,6 +1226,7 @@ type BindingJsonPluginStringify = boolean | string;
1226
1226
  interface BindingManifestPluginConfig {
1227
1227
  root: string;
1228
1228
  outPath: string;
1229
+ cssEntries: () => Set<string>;
1229
1230
  }
1230
1231
  interface BindingMinifyOptions {
1231
1232
  mangle?: boolean;
@@ -1226,6 +1226,7 @@ type BindingJsonPluginStringify = boolean | string;
1226
1226
  interface BindingManifestPluginConfig {
1227
1227
  root: string;
1228
1228
  outPath: string;
1229
+ cssEntries: () => Set<string>;
1229
1230
  }
1230
1231
  interface BindingMinifyOptions {
1231
1232
  mangle?: boolean;
@@ -1,4 +1,4 @@
1
- import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMinifyOptions, BindingModulePreloadPolyfillPluginConfig, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-B2f_h9DF.mjs";
1
+ import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMinifyOptions, BindingModulePreloadPolyfillPluginConfig, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-COE5UL-B.mjs";
2
2
  import { Program } from "@oxc-project/types";
3
3
  import { TopLevelFilterExpression } from "@rolldown/pluginutils";
4
4
 
@@ -242,6 +242,19 @@ interface OutputOptions {
242
242
  * Allows you to do manual chunking. For deeper understanding, please refer to the in-depth [documentation](https://rolldown.rs/guide/in-depth/advanced-chunks).
243
243
  */
244
244
  advancedChunks?: {
245
+ /**
246
+ * - Type: `boolean`
247
+ * - Default: `true`
248
+ *
249
+ * By default, each group will also include captured modules' dependencies. This reduces the chance of generating circular chunks.
250
+ *
251
+ * If you want to disable this behavior, it's recommended to both set
252
+ * - `preserveEntrySignatures: false`
253
+ * - `strictExecutionOrder: true`
254
+ *
255
+ * to avoid generating invalid chunks.
256
+ */
257
+ includeDependenciesRecursively?: boolean;
245
258
  /**
246
259
  * - Type: `number`
247
260
  *
@@ -762,14 +775,14 @@ interface ModuleSideEffectsRule {
762
775
  external?: boolean;
763
776
  sideEffects: boolean;
764
777
  }
765
- type ModuleSideEffectsOption = boolean | ModuleSideEffectsRule[] | ((id: string, isResolved: boolean) => boolean | undefined) | "no-external";
778
+ type ModuleSideEffectsOption = boolean | readonly string[] | ModuleSideEffectsRule[] | ((id: string, external: boolean) => boolean | undefined) | "no-external";
766
779
  type TreeshakingOptions = {
767
780
  moduleSideEffects?: ModuleSideEffectsOption;
768
781
  annotations?: boolean;
769
- manualPureFunctions?: string[];
782
+ manualPureFunctions?: readonly string[];
770
783
  unknownGlobalSideEffects?: boolean;
771
784
  commonjs?: boolean;
772
- } | boolean;
785
+ };
773
786
  //#endregion
774
787
  //#region src/types/output-bundle.d.ts
775
788
  interface OutputBundle {
@@ -1314,6 +1327,7 @@ interface InputOptions {
1314
1327
  };
1315
1328
  preserveEntrySignatures?: false | "strict" | "allow-extension" | "exports-only";
1316
1329
  optimization?: OptimizationOptions;
1330
+ context?: string;
1317
1331
  }
1318
1332
  //#endregion
1319
1333
  //#region src/types/rolldown-options.d.ts
@@ -1,4 +1,4 @@
1
- import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMinifyOptions, BindingModulePreloadPolyfillPluginConfig, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-CCkTRaSB.cjs";
1
+ import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMinifyOptions, BindingModulePreloadPolyfillPluginConfig, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-BIqlUgrm.cjs";
2
2
  import { Program } from "@oxc-project/types";
3
3
  import { TopLevelFilterExpression } from "@rolldown/pluginutils";
4
4
 
@@ -242,6 +242,19 @@ interface OutputOptions {
242
242
  * Allows you to do manual chunking. For deeper understanding, please refer to the in-depth [documentation](https://rolldown.rs/guide/in-depth/advanced-chunks).
243
243
  */
244
244
  advancedChunks?: {
245
+ /**
246
+ * - Type: `boolean`
247
+ * - Default: `true`
248
+ *
249
+ * By default, each group will also include captured modules' dependencies. This reduces the chance of generating circular chunks.
250
+ *
251
+ * If you want to disable this behavior, it's recommended to both set
252
+ * - `preserveEntrySignatures: false`
253
+ * - `strictExecutionOrder: true`
254
+ *
255
+ * to avoid generating invalid chunks.
256
+ */
257
+ includeDependenciesRecursively?: boolean;
245
258
  /**
246
259
  * - Type: `number`
247
260
  *
@@ -762,14 +775,14 @@ interface ModuleSideEffectsRule {
762
775
  external?: boolean;
763
776
  sideEffects: boolean;
764
777
  }
765
- type ModuleSideEffectsOption = boolean | ModuleSideEffectsRule[] | ((id: string, isResolved: boolean) => boolean | undefined) | "no-external";
778
+ type ModuleSideEffectsOption = boolean | readonly string[] | ModuleSideEffectsRule[] | ((id: string, external: boolean) => boolean | undefined) | "no-external";
766
779
  type TreeshakingOptions = {
767
780
  moduleSideEffects?: ModuleSideEffectsOption;
768
781
  annotations?: boolean;
769
- manualPureFunctions?: string[];
782
+ manualPureFunctions?: readonly string[];
770
783
  unknownGlobalSideEffects?: boolean;
771
784
  commonjs?: boolean;
772
- } | boolean;
785
+ };
773
786
  //#endregion
774
787
  //#region src/types/output-bundle.d.ts
775
788
  interface OutputBundle {
@@ -1314,6 +1327,7 @@ interface InputOptions {
1314
1327
  };
1315
1328
  preserveEntrySignatures?: false | "strict" | "allow-extension" | "exports-only";
1316
1329
  optimization?: OptimizationOptions;
1330
+ context?: string;
1317
1331
  }
1318
1332
  //#endregion
1319
1333
  //#region src/types/rolldown-options.d.ts
@@ -1,4 +1,4 @@
1
- import { rolldown } from "./src-BSeUgDdv.mjs";
1
+ import { rolldown } from "./src-38thNb51.mjs";
2
2
  import path from "node:path";
3
3
  import { pathToFileURL } from "node:url";
4
4
  import { readdir } from "node:fs/promises";
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./chunk-DDkG_k5U.cjs');
2
- const require_src = require('./src-gD0LmYxq.cjs');
2
+ const require_src = require('./src-DEIlKgUM.cjs');
3
3
  const node_path = require_chunk.__toESM(require("node:path"));
4
4
  const node_url = require_chunk.__toESM(require("node:url"));
5
5
  const node_fs_promises = require_chunk.__toESM(require("node:fs/promises"));
@@ -186,7 +186,7 @@ function augmentCodeLocation(properties, pos, source, id) {
186
186
  }
187
187
 
188
188
  //#endregion
189
- //#region ../../node_modules/.pnpm/oxc-parser@0.80.0/node_modules/oxc-parser/wrap.mjs
189
+ //#region ../../node_modules/.pnpm/oxc-parser@0.81.0/node_modules/oxc-parser/wrap.mjs
190
190
  function wrap$1(result) {
191
191
  let program, module, comments, errors;
192
192
  return {
@@ -187,7 +187,7 @@ function augmentCodeLocation(properties, pos, source, id) {
187
187
  }
188
188
 
189
189
  //#endregion
190
- //#region ../../node_modules/.pnpm/oxc-parser@0.80.0/node_modules/oxc-parser/wrap.mjs
190
+ //#region ../../node_modules/.pnpm/oxc-parser@0.81.0/node_modules/oxc-parser/wrap.mjs
191
191
  function wrap$1(result) {
192
192
  let program, module$1, comments, errors;
193
193
  return {
@@ -1,5 +1,5 @@
1
- import { and, arraify, code, exclude, id, include, moduleType, noop, or, unimplemented, unreachable, unsupported } from "./dist-DvBwroyk.mjs";
2
- import { augmentCodeLocation, error, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-r9XO-GhB.mjs";
1
+ import { augmentCodeLocation, error, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-CqHkFxPM.mjs";
2
+ import { and, arraify, code, exclude, id, include, moduleType, noop, or, unimplemented, unreachable, unsupported } from "./dist-ByKQkexh.mjs";
3
3
  import { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingChunkModuleOrderBy, BindingJsx, BindingLogLevel, BindingPluginOrder, BindingWatcher, ParallelJsPluginRegistry, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
4
4
  import path from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -34,7 +34,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
34
34
 
35
35
  //#endregion
36
36
  //#region package.json
37
- var version = "1.0.0-beta.31";
37
+ var version = "1.0.0-beta.31-commit.832324a";
38
38
  var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
39
39
 
40
40
  //#endregion
@@ -53,8 +53,16 @@ function isReadonlyArray(input) {
53
53
  function makeBuiltinPluginCallable(plugin) {
54
54
  let callablePlugin = new BindingCallableBuiltinPlugin(bindingifyBuiltInPlugin(plugin));
55
55
  const wrappedPlugin = plugin;
56
- for (const key in callablePlugin) wrappedPlugin[key] = function(...args$1) {
57
- return callablePlugin[key](...args$1);
56
+ for (const key in callablePlugin) wrappedPlugin[key] = async function(...args$1) {
57
+ try {
58
+ return await callablePlugin[key](...args$1);
59
+ } catch (e$1) {
60
+ if (e$1 instanceof Error && !e$1.stack?.includes("at ")) Error.captureStackTrace(e$1, wrappedPlugin[key]);
61
+ return error(logPluginError(e$1, plugin.name, {
62
+ hook: key,
63
+ id: key === "transform" ? args$1[2] : void 0
64
+ }));
65
+ }
58
66
  };
59
67
  return wrappedPlugin;
60
68
  }
@@ -2172,7 +2180,8 @@ const InputCliOverrideSchema = strictObject({
2172
2180
  literal("react-jsx"),
2173
2181
  literal("preserve")
2174
2182
  ])), description("Jsx options preset")),
2175
- preserveEntrySignatures: pipe(optional(union([literal(false)])), description("Avoid facade chunks for entry points"))
2183
+ preserveEntrySignatures: pipe(optional(union([literal(false)])), description("Avoid facade chunks for entry points")),
2184
+ context: pipe(optional(string()), description("The entity top-level `this` represents."))
2176
2185
  });
2177
2186
  const InputCliOptionsSchema = omit(strictObject({
2178
2187
  ...InputOptionsSchema.entries,
@@ -2201,6 +2210,7 @@ const AssetFileNamesSchema = union([string(), pipe(function_(), args(tuple([cust
2201
2210
  const SanitizeFileNameSchema = union([boolean(), pipe(function_(), args(tuple([string()])), returns(string()))]);
2202
2211
  const GlobalsFunctionSchema = pipe(function_(), args(tuple([string()])), returns(string()));
2203
2212
  const AdvancedChunksSchema = strictObject({
2213
+ includeDependenciesRecursively: optional(boolean()),
2204
2214
  minSize: optional(number()),
2205
2215
  maxSize: optional(number()),
2206
2216
  minModuleSize: optional(number()),
@@ -3964,7 +3974,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
3964
3974
  invalidateJsSideCache: pluginContextData.clear.bind(pluginContextData),
3965
3975
  markModuleLoaded: pluginContextData.markModuleLoaded.bind(pluginContextData),
3966
3976
  preserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures),
3967
- optimization: inputOptions.optimization
3977
+ optimization: inputOptions.optimization,
3978
+ context: inputOptions.context
3968
3979
  };
3969
3980
  }
3970
3981
  function bindingifyHmr(hmr) {
@@ -1,6 +1,6 @@
1
1
  const require_chunk = require('./chunk-DDkG_k5U.cjs');
2
- const require_dist = require('./dist-BVAp8sOm.cjs');
3
- const require_parse_ast_index = require('./parse-ast-index-DZ5uPSgP.cjs');
2
+ const require_parse_ast_index = require('./parse-ast-index-DAsDnaa1.cjs');
3
+ const require_dist = require('./dist-CK0hotcm.cjs');
4
4
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("../rolldown-binding.wasi.cjs"));
5
5
  const node_path = require_chunk.__toESM(require("node:path"));
6
6
  const node_url = require_chunk.__toESM(require("node:url"));
@@ -9,7 +9,7 @@ const node_os = require_chunk.__toESM(require("node:os"));
9
9
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
10
10
 
11
11
  //#region package.json
12
- var version = "1.0.0-beta.31";
12
+ var version = "1.0.0-beta.31-commit.832324a";
13
13
  var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
14
14
 
15
15
  //#endregion
@@ -28,8 +28,16 @@ function isReadonlyArray(input) {
28
28
  function makeBuiltinPluginCallable(plugin) {
29
29
  let callablePlugin = new src_rolldown_binding_wasi_cjs.BindingCallableBuiltinPlugin(bindingifyBuiltInPlugin(plugin));
30
30
  const wrappedPlugin = plugin;
31
- for (const key in callablePlugin) wrappedPlugin[key] = function(...args$1) {
32
- return callablePlugin[key](...args$1);
31
+ for (const key in callablePlugin) wrappedPlugin[key] = async function(...args$1) {
32
+ try {
33
+ return await callablePlugin[key](...args$1);
34
+ } catch (e$1) {
35
+ if (e$1 instanceof Error && !e$1.stack?.includes("at ")) Error.captureStackTrace(e$1, wrappedPlugin[key]);
36
+ return require_parse_ast_index.error(require_parse_ast_index.logPluginError(e$1, plugin.name, {
37
+ hook: key,
38
+ id: key === "transform" ? args$1[2] : void 0
39
+ }));
40
+ }
33
41
  };
34
42
  return wrappedPlugin;
35
43
  }
@@ -2147,7 +2155,8 @@ const InputCliOverrideSchema = strictObject({
2147
2155
  literal("react-jsx"),
2148
2156
  literal("preserve")
2149
2157
  ])), description("Jsx options preset")),
2150
- preserveEntrySignatures: pipe(optional(union([literal(false)])), description("Avoid facade chunks for entry points"))
2158
+ preserveEntrySignatures: pipe(optional(union([literal(false)])), description("Avoid facade chunks for entry points")),
2159
+ context: pipe(optional(string()), description("The entity top-level `this` represents."))
2151
2160
  });
2152
2161
  const InputCliOptionsSchema = omit(strictObject({
2153
2162
  ...InputOptionsSchema.entries,
@@ -2176,6 +2185,7 @@ const AssetFileNamesSchema = union([string(), pipe(function_(), args(tuple([cust
2176
2185
  const SanitizeFileNameSchema = union([boolean(), pipe(function_(), args(tuple([string()])), returns(string()))]);
2177
2186
  const GlobalsFunctionSchema = pipe(function_(), args(tuple([string()])), returns(string()));
2178
2187
  const AdvancedChunksSchema = strictObject({
2188
+ includeDependenciesRecursively: optional(boolean()),
2179
2189
  minSize: optional(number()),
2180
2190
  maxSize: optional(number()),
2181
2191
  minModuleSize: optional(number()),
@@ -3939,7 +3949,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
3939
3949
  invalidateJsSideCache: pluginContextData.clear.bind(pluginContextData),
3940
3950
  markModuleLoaded: pluginContextData.markModuleLoaded.bind(pluginContextData),
3941
3951
  preserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures),
3942
- optimization: inputOptions.optimization
3952
+ optimization: inputOptions.optimization,
3953
+ context: inputOptions.context
3943
3954
  };
3944
3955
  }
3945
3956
  function bindingifyHmr(hmr) {
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
 
28
28
  //#endregion
29
29
  //#region package.json
30
- var version = "1.0.0-beta.31";
30
+ var version = "1.0.0-beta.31-commit.832324a";
31
31
 
32
32
  //#endregion
33
33
  //#region src/utils/normalize-string-or-regex.ts
@@ -40,13 +40,213 @@ function isReadonlyArray(input) {
40
40
  return Array.isArray(input);
41
41
  }
42
42
 
43
+ //#endregion
44
+ //#region src/utils/code-frame.ts
45
+ function spaces(index) {
46
+ let result = "";
47
+ while (index--) result += " ";
48
+ return result;
49
+ }
50
+ function tabsToSpaces(value) {
51
+ return value.replace(/^\t+/, (match) => match.split(" ").join(" "));
52
+ }
53
+ const LINE_TRUNCATE_LENGTH = 120;
54
+ const MIN_CHARACTERS_SHOWN_AFTER_LOCATION = 10;
55
+ const ELLIPSIS = "...";
56
+ function getCodeFrame(source, line, column) {
57
+ let lines = source.split("\n");
58
+ if (line > lines.length) return "";
59
+ const maxLineLength = Math.max(tabsToSpaces(lines[line - 1].slice(0, column)).length + MIN_CHARACTERS_SHOWN_AFTER_LOCATION + 3, LINE_TRUNCATE_LENGTH);
60
+ const frameStart = Math.max(0, line - 3);
61
+ let frameEnd = Math.min(line + 2, lines.length);
62
+ lines = lines.slice(frameStart, frameEnd);
63
+ while (!/\S/.test(lines[lines.length - 1])) {
64
+ lines.pop();
65
+ frameEnd -= 1;
66
+ }
67
+ const digits = String(frameEnd).length;
68
+ return lines.map((sourceLine, index) => {
69
+ const isErrorLine = frameStart + index + 1 === line;
70
+ let lineNumber = String(index + frameStart + 1);
71
+ while (lineNumber.length < digits) lineNumber = ` ${lineNumber}`;
72
+ let displayedLine = tabsToSpaces(sourceLine);
73
+ if (displayedLine.length > maxLineLength) displayedLine = `${displayedLine.slice(0, maxLineLength - 3)}${ELLIPSIS}`;
74
+ if (isErrorLine) {
75
+ const indicator = spaces(digits + 2 + tabsToSpaces(sourceLine.slice(0, column)).length) + "^";
76
+ return `${lineNumber}: ${displayedLine}\n${indicator}`;
77
+ }
78
+ return `${lineNumber}: ${displayedLine}`;
79
+ }).join("\n");
80
+ }
81
+
82
+ //#endregion
83
+ //#region src/log/locate-character/index.js
84
+ /** @typedef {import('./types').Location} Location */
85
+ /**
86
+ * @param {import('./types').Range} range
87
+ * @param {number} index
88
+ */
89
+ function rangeContains(range, index) {
90
+ return range.start <= index && index < range.end;
91
+ }
92
+ /**
93
+ * @param {string} source
94
+ * @param {import('./types').Options} [options]
95
+ */
96
+ function getLocator(source, options = {}) {
97
+ const { offsetLine = 0, offsetColumn = 0 } = options;
98
+ let start = 0;
99
+ const ranges = source.split("\n").map((line, i$3) => {
100
+ const end = start + line.length + 1;
101
+ /** @type {import('./types').Range} */
102
+ const range = {
103
+ start,
104
+ end,
105
+ line: i$3
106
+ };
107
+ start = end;
108
+ return range;
109
+ });
110
+ let i$2 = 0;
111
+ /**
112
+ * @param {string | number} search
113
+ * @param {number} [index]
114
+ * @returns {Location | undefined}
115
+ */
116
+ function locator(search, index) {
117
+ if (typeof search === "string") search = source.indexOf(search, index ?? 0);
118
+ if (search === -1) return void 0;
119
+ let range = ranges[i$2];
120
+ const d$2 = search >= range.end ? 1 : -1;
121
+ while (range) {
122
+ if (rangeContains(range, search)) return {
123
+ line: offsetLine + range.line,
124
+ column: offsetColumn + search - range.start,
125
+ character: search
126
+ };
127
+ i$2 += d$2;
128
+ range = ranges[i$2];
129
+ }
130
+ }
131
+ return locator;
132
+ }
133
+ /**
134
+ * @param {string} source
135
+ * @param {string | number} search
136
+ * @param {import('./types').Options} [options]
137
+ * @returns {Location | undefined}
138
+ */
139
+ function locate(source, search, options) {
140
+ return getLocator(source, options)(search, options && options.startIndex);
141
+ }
142
+
143
+ //#endregion
144
+ //#region src/log/logs.ts
145
+ const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR", DUPLICATE_JSX_CONFIG = "DUPLICATE_JSX_CONFIG", NO_FS_IN_BROWSER = "NO_FS_IN_BROWSER";
146
+ function logParseError(message) {
147
+ return {
148
+ code: PARSE_ERROR,
149
+ message
150
+ };
151
+ }
152
+ function logInvalidLogPosition(pluginName) {
153
+ return {
154
+ code: INVALID_LOG_POSITION,
155
+ message: `Plugin "${pluginName}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`
156
+ };
157
+ }
158
+ function logInputHookInOutputPlugin(pluginName, hookName) {
159
+ return {
160
+ code: INPUT_HOOK_IN_OUTPUT_PLUGIN,
161
+ message: `The "${hookName}" hook used by the output plugin ${pluginName} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`
162
+ };
163
+ }
164
+ function logCycleLoading(pluginName, moduleId) {
165
+ return {
166
+ code: CYCLE_LOADING,
167
+ message: `Found the module "${moduleId}" cycle loading at ${pluginName} plugin, it maybe blocking fetching modules.`
168
+ };
169
+ }
170
+ function logMultiplyNotifyOption() {
171
+ return {
172
+ code: MULTIPLY_NOTIFY_OPTION,
173
+ message: `Found multiply notify option at watch options, using first one to start notify watcher.`
174
+ };
175
+ }
176
+ function logDuplicateJsxConfig() {
177
+ return {
178
+ code: DUPLICATE_JSX_CONFIG,
179
+ message: "Both `options.jsx` and `options.transform.jsx` are set so `options.jsx` is ignored"
180
+ };
181
+ }
182
+ function logNoFileSystemInBrowser(method) {
183
+ return {
184
+ code: NO_FS_IN_BROWSER,
185
+ message: `Cannot access the file system (via "${method}") when using the browser build of Rolldown.`
186
+ };
187
+ }
188
+ function logPluginError(error$1, plugin, { hook, id: id$1 } = {}) {
189
+ try {
190
+ const code$1 = error$1.code;
191
+ if (!error$1.pluginCode && code$1 != null && (typeof code$1 !== "string" || !code$1.startsWith("PLUGIN_"))) error$1.pluginCode = code$1;
192
+ error$1.code = PLUGIN_ERROR;
193
+ error$1.plugin = plugin;
194
+ if (hook) error$1.hook = hook;
195
+ if (id$1) error$1.id = id$1;
196
+ } catch (_) {} finally {
197
+ return error$1;
198
+ }
199
+ }
200
+ function error(base) {
201
+ if (!(base instanceof Error)) {
202
+ base = Object.assign(new Error(base.message), base);
203
+ Object.defineProperty(base, "name", {
204
+ value: "RollupError",
205
+ writable: true
206
+ });
207
+ }
208
+ throw base;
209
+ }
210
+ function augmentCodeLocation(properties, pos, source, id$1) {
211
+ if (typeof pos === "object") {
212
+ const { line, column } = pos;
213
+ properties.loc = {
214
+ column,
215
+ file: id$1,
216
+ line
217
+ };
218
+ } else {
219
+ properties.pos = pos;
220
+ const location = locate(source, pos, { offsetLine: 1 });
221
+ if (!location) return;
222
+ const { line, column } = location;
223
+ properties.loc = {
224
+ column,
225
+ file: id$1,
226
+ line
227
+ };
228
+ }
229
+ if (properties.frame === void 0) {
230
+ const { line, column } = properties.loc;
231
+ properties.frame = getCodeFrame(source, line, column);
232
+ }
233
+ }
234
+
43
235
  //#endregion
44
236
  //#region src/builtin-plugin/utils.ts
45
237
  function makeBuiltinPluginCallable(plugin) {
46
238
  let callablePlugin = new BindingCallableBuiltinPlugin(bindingifyBuiltInPlugin(plugin));
47
239
  const wrappedPlugin = plugin;
48
- for (const key in callablePlugin) wrappedPlugin[key] = function(...args$1) {
49
- return callablePlugin[key](...args$1);
240
+ for (const key in callablePlugin) wrappedPlugin[key] = async function(...args$1) {
241
+ try {
242
+ return await callablePlugin[key](...args$1);
243
+ } catch (e$1) {
244
+ if (e$1 instanceof Error && !e$1.stack?.includes("at ")) Error.captureStackTrace(e$1, wrappedPlugin[key]);
245
+ return error(logPluginError(e$1, plugin.name, {
246
+ hook: key,
247
+ id: key === "transform" ? args$1[2] : void 0
248
+ }));
249
+ }
50
250
  };
51
251
  return wrappedPlugin;
52
252
  }
@@ -601,198 +801,6 @@ const logLevelPriority = {
601
801
  [LOG_LEVEL_SILENT]: 3
602
802
  };
603
803
 
604
- //#endregion
605
- //#region src/utils/code-frame.ts
606
- function spaces(index) {
607
- let result = "";
608
- while (index--) result += " ";
609
- return result;
610
- }
611
- function tabsToSpaces(value) {
612
- return value.replace(/^\t+/, (match) => match.split(" ").join(" "));
613
- }
614
- const LINE_TRUNCATE_LENGTH = 120;
615
- const MIN_CHARACTERS_SHOWN_AFTER_LOCATION = 10;
616
- const ELLIPSIS = "...";
617
- function getCodeFrame(source, line, column) {
618
- let lines = source.split("\n");
619
- if (line > lines.length) return "";
620
- const maxLineLength = Math.max(tabsToSpaces(lines[line - 1].slice(0, column)).length + MIN_CHARACTERS_SHOWN_AFTER_LOCATION + 3, LINE_TRUNCATE_LENGTH);
621
- const frameStart = Math.max(0, line - 3);
622
- let frameEnd = Math.min(line + 2, lines.length);
623
- lines = lines.slice(frameStart, frameEnd);
624
- while (!/\S/.test(lines[lines.length - 1])) {
625
- lines.pop();
626
- frameEnd -= 1;
627
- }
628
- const digits = String(frameEnd).length;
629
- return lines.map((sourceLine, index) => {
630
- const isErrorLine = frameStart + index + 1 === line;
631
- let lineNumber = String(index + frameStart + 1);
632
- while (lineNumber.length < digits) lineNumber = ` ${lineNumber}`;
633
- let displayedLine = tabsToSpaces(sourceLine);
634
- if (displayedLine.length > maxLineLength) displayedLine = `${displayedLine.slice(0, maxLineLength - 3)}${ELLIPSIS}`;
635
- if (isErrorLine) {
636
- const indicator = spaces(digits + 2 + tabsToSpaces(sourceLine.slice(0, column)).length) + "^";
637
- return `${lineNumber}: ${displayedLine}\n${indicator}`;
638
- }
639
- return `${lineNumber}: ${displayedLine}`;
640
- }).join("\n");
641
- }
642
-
643
- //#endregion
644
- //#region src/log/locate-character/index.js
645
- /** @typedef {import('./types').Location} Location */
646
- /**
647
- * @param {import('./types').Range} range
648
- * @param {number} index
649
- */
650
- function rangeContains(range, index) {
651
- return range.start <= index && index < range.end;
652
- }
653
- /**
654
- * @param {string} source
655
- * @param {import('./types').Options} [options]
656
- */
657
- function getLocator(source, options = {}) {
658
- const { offsetLine = 0, offsetColumn = 0 } = options;
659
- let start = 0;
660
- const ranges = source.split("\n").map((line, i$3) => {
661
- const end = start + line.length + 1;
662
- /** @type {import('./types').Range} */
663
- const range = {
664
- start,
665
- end,
666
- line: i$3
667
- };
668
- start = end;
669
- return range;
670
- });
671
- let i$2 = 0;
672
- /**
673
- * @param {string | number} search
674
- * @param {number} [index]
675
- * @returns {Location | undefined}
676
- */
677
- function locator(search, index) {
678
- if (typeof search === "string") search = source.indexOf(search, index ?? 0);
679
- if (search === -1) return void 0;
680
- let range = ranges[i$2];
681
- const d$2 = search >= range.end ? 1 : -1;
682
- while (range) {
683
- if (rangeContains(range, search)) return {
684
- line: offsetLine + range.line,
685
- column: offsetColumn + search - range.start,
686
- character: search
687
- };
688
- i$2 += d$2;
689
- range = ranges[i$2];
690
- }
691
- }
692
- return locator;
693
- }
694
- /**
695
- * @param {string} source
696
- * @param {string | number} search
697
- * @param {import('./types').Options} [options]
698
- * @returns {Location | undefined}
699
- */
700
- function locate(source, search, options) {
701
- return getLocator(source, options)(search, options && options.startIndex);
702
- }
703
-
704
- //#endregion
705
- //#region src/log/logs.ts
706
- const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR", DUPLICATE_JSX_CONFIG = "DUPLICATE_JSX_CONFIG", NO_FS_IN_BROWSER = "NO_FS_IN_BROWSER";
707
- function logParseError(message) {
708
- return {
709
- code: PARSE_ERROR,
710
- message
711
- };
712
- }
713
- function logInvalidLogPosition(pluginName) {
714
- return {
715
- code: INVALID_LOG_POSITION,
716
- message: `Plugin "${pluginName}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`
717
- };
718
- }
719
- function logInputHookInOutputPlugin(pluginName, hookName) {
720
- return {
721
- code: INPUT_HOOK_IN_OUTPUT_PLUGIN,
722
- message: `The "${hookName}" hook used by the output plugin ${pluginName} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`
723
- };
724
- }
725
- function logCycleLoading(pluginName, moduleId) {
726
- return {
727
- code: CYCLE_LOADING,
728
- message: `Found the module "${moduleId}" cycle loading at ${pluginName} plugin, it maybe blocking fetching modules.`
729
- };
730
- }
731
- function logMultiplyNotifyOption() {
732
- return {
733
- code: MULTIPLY_NOTIFY_OPTION,
734
- message: `Found multiply notify option at watch options, using first one to start notify watcher.`
735
- };
736
- }
737
- function logDuplicateJsxConfig() {
738
- return {
739
- code: DUPLICATE_JSX_CONFIG,
740
- message: "Both `options.jsx` and `options.transform.jsx` are set so `options.jsx` is ignored"
741
- };
742
- }
743
- function logNoFileSystemInBrowser(method) {
744
- return {
745
- code: NO_FS_IN_BROWSER,
746
- message: `Cannot access the file system (via "${method}") when using the browser build of Rolldown.`
747
- };
748
- }
749
- function logPluginError(error$1, plugin, { hook, id: id$1 } = {}) {
750
- try {
751
- const code$1 = error$1.code;
752
- if (!error$1.pluginCode && code$1 != null && (typeof code$1 !== "string" || !code$1.startsWith("PLUGIN_"))) error$1.pluginCode = code$1;
753
- error$1.code = PLUGIN_ERROR;
754
- error$1.plugin = plugin;
755
- if (hook) error$1.hook = hook;
756
- if (id$1) error$1.id = id$1;
757
- } catch (_) {} finally {
758
- return error$1;
759
- }
760
- }
761
- function error(base) {
762
- if (!(base instanceof Error)) {
763
- base = Object.assign(new Error(base.message), base);
764
- Object.defineProperty(base, "name", {
765
- value: "RollupError",
766
- writable: true
767
- });
768
- }
769
- throw base;
770
- }
771
- function augmentCodeLocation(properties, pos, source, id$1) {
772
- if (typeof pos === "object") {
773
- const { line, column } = pos;
774
- properties.loc = {
775
- column,
776
- file: id$1,
777
- line
778
- };
779
- } else {
780
- properties.pos = pos;
781
- const location = locate(source, pos, { offsetLine: 1 });
782
- if (!location) return;
783
- const { line, column } = location;
784
- properties.loc = {
785
- column,
786
- file: id$1,
787
- line
788
- };
789
- }
790
- if (properties.frame === void 0) {
791
- const { line, column } = properties.loc;
792
- properties.frame = getCodeFrame(source, line, column);
793
- }
794
- }
795
-
796
804
  //#endregion
797
805
  //#region src/log/log-handler.ts
798
806
  const normalizeLog = (log) => typeof log === "string" ? { message: log } : typeof log === "function" ? normalizeLog(log()) : log;
@@ -2409,7 +2417,8 @@ const InputCliOverrideSchema = strictObject({
2409
2417
  literal("react-jsx"),
2410
2418
  literal("preserve")
2411
2419
  ])), description("Jsx options preset")),
2412
- preserveEntrySignatures: pipe(optional(union([literal(false)])), description("Avoid facade chunks for entry points"))
2420
+ preserveEntrySignatures: pipe(optional(union([literal(false)])), description("Avoid facade chunks for entry points")),
2421
+ context: pipe(optional(string()), description("The entity top-level `this` represents."))
2413
2422
  });
2414
2423
  const InputCliOptionsSchema = omit(strictObject({
2415
2424
  ...InputOptionsSchema.entries,
@@ -2438,6 +2447,7 @@ const AssetFileNamesSchema = union([string(), pipe(function_(), args(tuple([cust
2438
2447
  const SanitizeFileNameSchema = union([boolean(), pipe(function_(), args(tuple([string()])), returns(string()))]);
2439
2448
  const GlobalsFunctionSchema = pipe(function_(), args(tuple([string()])), returns(string()));
2440
2449
  const AdvancedChunksSchema = strictObject({
2450
+ includeDependenciesRecursively: optional(boolean()),
2441
2451
  minSize: optional(number()),
2442
2452
  maxSize: optional(number()),
2443
2453
  minModuleSize: optional(number()),
@@ -2947,7 +2957,7 @@ function bindingPluginOrder(order) {
2947
2957
  }
2948
2958
 
2949
2959
  //#endregion
2950
- //#region ../../node_modules/.pnpm/oxc-parser@0.80.0/node_modules/oxc-parser/wrap.mjs
2960
+ //#region ../../node_modules/.pnpm/oxc-parser@0.81.0/node_modules/oxc-parser/wrap.mjs
2951
2961
  function wrap$1(result) {
2952
2962
  let program, module$1, comments, errors;
2953
2963
  return {
@@ -4345,7 +4355,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
4345
4355
  invalidateJsSideCache: pluginContextData.clear.bind(pluginContextData),
4346
4356
  markModuleLoaded: pluginContextData.markModuleLoaded.bind(pluginContextData),
4347
4357
  preserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures),
4348
- optimization: inputOptions.optimization
4358
+ optimization: inputOptions.optimization,
4359
+ context: inputOptions.context
4349
4360
  };
4350
4361
  }
4351
4362
  function bindingifyHmr(hmr) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolldown/browser",
3
- "version": "1.0.0-beta.31",
3
+ "version": "1.0.0-beta.31-commit.832324a",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "homepage": "https://rolldown.rs/",
6
6
  "type": "module",
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@napi-rs/wasm-runtime": "^1.0.0",
59
- "@oxc-project/runtime": "=0.80.0"
59
+ "@oxc-project/runtime": "=0.81.0"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "pnpm run build:debug",