@rolldown/browser 1.0.0-beta.57 → 1.0.0-beta.58

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 (37) hide show
  1. package/dist/cli.mjs +8 -8
  2. package/dist/config.d.mts +1 -1
  3. package/dist/config.mjs +6 -6
  4. package/dist/{constructors-hZ5LHCkF.js → constructors-BuqTjXTF.js} +1 -1
  5. package/dist/experimental-index.browser.mjs +3 -3
  6. package/dist/experimental-index.d.mts +4 -4
  7. package/dist/experimental-index.mjs +5 -5
  8. package/dist/filter-index.d.mts +1 -1
  9. package/dist/get-log-filter.d.mts +1 -1
  10. package/dist/index.browser.mjs +4 -2
  11. package/dist/index.d.mts +5 -5
  12. package/dist/index.mjs +6 -6
  13. package/dist/{normalize-string-or-regex-DewaIpuo.js → normalize-string-or-regex-3ql5-z8-.js} +3 -2
  14. package/dist/parallel-plugin-worker.mjs +3 -3
  15. package/dist/parallel-plugin.d.mts +2 -2
  16. package/dist/parse-ast-index.d.mts +1 -1
  17. package/dist/parse-ast-index.mjs +1 -1
  18. package/dist/plugins-index.browser.mjs +2 -2
  19. package/dist/plugins-index.d.mts +3 -3
  20. package/dist/plugins-index.mjs +2 -2
  21. package/dist/rolldown-binding.wasi.cjs +1 -1
  22. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  23. package/dist/{rolldown-build-32P3iU2U.js → rolldown-build-CRqas5jO.js} +12 -5
  24. package/dist/shared/{binding-CDyF6W3D.d.mts → binding-MAEzB4KA.d.mts} +10 -0
  25. package/dist/shared/{bindingify-input-options-CwdDrVAR.mjs → bindingify-input-options--qcSYuhh.mjs} +7 -3
  26. package/dist/shared/{constructors-B0L_9ar3.d.mts → constructors-CQP6o3cR.d.mts} +2 -2
  27. package/dist/shared/{constructors-Ch7pGFBC.mjs → constructors-kOch67Sb.mjs} +1 -1
  28. package/dist/shared/{define-config-Bho_aQn8.d.mts → define-config-yInAJbA1.d.mts} +471 -130
  29. package/dist/shared/{load-config-DUtgyO78.mjs → load-config-BZhApFJg.mjs} +1 -1
  30. package/dist/shared/{logging-BpAvp7KV.d.mts → logging-B4x9qar8.d.mts} +1 -0
  31. package/dist/shared/{normalize-string-or-regex-Dt2VqAqy.mjs → normalize-string-or-regex-CIiT1lMg.mjs} +3 -2
  32. package/dist/shared/{parse-ast-index-DZPue_kI.mjs → parse-ast-index-CgzK6cxG.mjs} +1 -1
  33. package/dist/shared/{rolldown-D1ymUD73.mjs → rolldown-Vl5SnJ_J.mjs} +2 -1
  34. package/dist/shared/{rolldown-build-rs9zb03O.mjs → rolldown-build-7kWB1jqY.mjs} +6 -3
  35. package/dist/shared/{utils-B3dcnHc8.d.mts → utils-BGxZdOXA.d.mts} +2 -2
  36. package/dist/shared/{watch-CbHTfwHk.mjs → watch-CGYro6go.mjs} +4 -3
  37. package/package.json +16 -16
@@ -1,4 +1,4 @@
1
- import { t as rolldown } from "./rolldown-D1ymUD73.mjs";
1
+ import { t as rolldown } from "./rolldown-Vl5SnJ_J.mjs";
2
2
  import path from "node:path";
3
3
  import { readdir } from "node:fs/promises";
4
4
  import { pathToFileURL } from "node:url";
@@ -27,6 +27,7 @@ interface RollupLog {
27
27
  url?: string;
28
28
  }
29
29
  type RollupLogWithString = RollupLog | string;
30
+ /** @category Plugin APIs */
30
31
  interface RollupError extends RollupLog {
31
32
  name?: string;
32
33
  stack?: string;
@@ -32,11 +32,12 @@ function getLogHandler(level, code, logger, pluginName, logLevel) {
32
32
 
33
33
  //#endregion
34
34
  //#region package.json
35
- var version = "1.0.0-beta.57";
35
+ var version = "1.0.0-beta.58";
36
36
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
37
37
 
38
38
  //#endregion
39
39
  //#region src/version.ts
40
+ /** @category Plugin APIs */
40
41
  const VERSION = version;
41
42
 
42
43
  //#endregion
@@ -190,7 +191,7 @@ function bindingAssetSource(source) {
190
191
  }
191
192
 
192
193
  //#endregion
193
- //#region \0@oxc-project+runtime@0.103.0/helpers/decorate.js
194
+ //#region \0@oxc-project+runtime@0.106.0/helpers/decorate.js
194
195
  function __decorate(decorators, target, key, desc) {
195
196
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
196
197
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -1,7 +1,7 @@
1
1
  import { l as locate, n as error, s as logParseError, t as augmentCodeLocation, u as getCodeFrame } from "./logs-DEfpOy5A.mjs";
2
2
  import { parse, parseSync } from "../rolldown-binding.wasi.cjs";
3
3
 
4
- //#region ../../node_modules/.pnpm/oxc-parser@0.103.0/node_modules/oxc-parser/src-js/wrap.js
4
+ //#region ../../node_modules/.pnpm/oxc-parser@0.106.0/node_modules/oxc-parser/src-js/wrap.js
5
5
  function wrap$1(result) {
6
6
  let program, module, comments, errors;
7
7
  return {
@@ -1,6 +1,7 @@
1
- import { l as PluginDriver, s as validateOption, t as RolldownBuild } from "./rolldown-build-rs9zb03O.mjs";
1
+ import { l as PluginDriver, s as validateOption, t as RolldownBuild } from "./rolldown-build-7kWB1jqY.mjs";
2
2
 
3
3
  //#region src/api/rolldown/index.ts
4
+ /** @category Programmatic APIs */
4
5
  const rolldown = async (input) => {
5
6
  validateOption("input", input);
6
7
  return new RolldownBuild(await PluginDriver.callOptionsHook(input));
@@ -1,7 +1,7 @@
1
1
  import { i as logInputHookInOutputPlugin, n as error } from "./logs-DEfpOy5A.mjs";
2
2
  import { i as unimplemented } from "./misc-BubmxcE3.mjs";
3
- import { C as LOG_LEVEL_DEBUG, D as logLevelPriority, E as LOG_LEVEL_WARN, S as normalizeLog, T as LOG_LEVEL_INFO, _ as PlainObjectLike, f as transformRenderedChunk, g as lazyProp, h as transformAssetSource, n as BuiltinPlugin, p as __decorate, u as transformToRollupOutput, v as MinimalPluginContextImpl, w as LOG_LEVEL_ERROR, y as VERSION } from "./normalize-string-or-regex-Dt2VqAqy.mjs";
4
- import { c as normalizeHook, i as transformModuleInfo, s as unwrapBindingResult, t as bindingifyInputOptions } from "./bindingify-input-options-CwdDrVAR.mjs";
3
+ import { C as LOG_LEVEL_DEBUG, D as logLevelPriority, E as LOG_LEVEL_WARN, S as normalizeLog, T as LOG_LEVEL_INFO, _ as PlainObjectLike, f as transformRenderedChunk, g as lazyProp, h as transformAssetSource, n as BuiltinPlugin, p as __decorate, u as transformToRollupOutput, v as MinimalPluginContextImpl, w as LOG_LEVEL_ERROR, y as VERSION } from "./normalize-string-or-regex-CIiT1lMg.mjs";
4
+ import { c as normalizeHook, i as transformModuleInfo, s as unwrapBindingResult, t as bindingifyInputOptions } from "./bindingify-input-options--qcSYuhh.mjs";
5
5
  import { Worker } from "node:worker_threads";
6
6
  import { BindingBundler, ParallelJsPluginRegistry, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
7
7
  import path from "node:path";
@@ -1746,7 +1746,7 @@ const InputOptionsSchema = strictObject({
1746
1746
  transform: optional(TransformOptionsSchema),
1747
1747
  watch: optional(union([WatchOptionsSchema, literal(false)])),
1748
1748
  checks: optional(ChecksOptionsSchema),
1749
- debug: pipe(optional(object({ sessionId: pipe(optional(string()), description("Used to name the build.")) })), description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly.")),
1749
+ devtools: pipe(optional(object({ sessionId: pipe(optional(string()), description("Used to name the build.")) })), description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly.")),
1750
1750
  preserveEntrySignatures: pipe(optional(union([
1751
1751
  literal("strict"),
1752
1752
  literal("allow-extension"),
@@ -1876,6 +1876,7 @@ const OutputOptionsSchema = strictObject({
1876
1876
  generatedCode: pipe(optional(partial(GeneratedCodeOptionsSchema)), description("Generated code options")),
1877
1877
  externalLiveBindings: pipe(optional(boolean()), description("external live bindings")),
1878
1878
  inlineDynamicImports: pipe(optional(boolean()), description("Inline dynamic imports")),
1879
+ dynamicImportInCjs: pipe(optional(boolean()), description("Dynamic import in CJS output")),
1879
1880
  manualChunks: optional(ManualChunksFunctionSchema),
1880
1881
  advancedChunks: optional(AdvancedChunksSchema),
1881
1882
  legalComments: pipe(optional(union([literal("none"), literal("inline")])), description("Control comments in the output")),
@@ -2056,6 +2057,7 @@ function bindingifyOutputOptions(outputOptions) {
2056
2057
  minify: outputOptions.minify,
2057
2058
  externalLiveBindings: outputOptions.externalLiveBindings,
2058
2059
  inlineDynamicImports: outputOptions.inlineDynamicImports,
2060
+ dynamicImportInCjs: outputOptions.dynamicImportInCjs,
2059
2061
  advancedChunks,
2060
2062
  polyfillRequire: outputOptions.polyfillRequire,
2061
2063
  sanitizeFileName,
@@ -2221,6 +2223,7 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
2221
2223
  //#endregion
2222
2224
  //#region src/api/rolldown/rolldown-build.ts
2223
2225
  Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
2226
+ /** @category Programmatic APIs */
2224
2227
  var RolldownBuild = class RolldownBuild {
2225
2228
  #inputOptions;
2226
2229
  #bundler;
@@ -1,5 +1,5 @@
1
- import { a as RollupLog } from "./logging-BpAvp7KV.mjs";
2
- import { t as BindingBuiltinPluginName } from "./binding-CDyF6W3D.mjs";
1
+ import { a as RollupLog } from "./logging-B4x9qar8.mjs";
2
+ import { t as BindingBuiltinPluginName } from "./binding-MAEzB4KA.mjs";
3
3
 
4
4
  //#region src/types/utils.d.ts
5
5
  type MaybePromise<T> = T | Promise<T>;
@@ -1,8 +1,8 @@
1
1
  import { o as logMultiplyNotifyOption } from "./logs-DEfpOy5A.mjs";
2
2
  import { t as arraify } from "./misc-BubmxcE3.mjs";
3
- import { E as LOG_LEVEL_WARN } from "./normalize-string-or-regex-Dt2VqAqy.mjs";
4
- import { l as PluginDriver, n as createBundlerOptions } from "./rolldown-build-rs9zb03O.mjs";
5
- import { a as aggregateBindingErrorsIntoJsError } from "./bindingify-input-options-CwdDrVAR.mjs";
3
+ import { E as LOG_LEVEL_WARN } from "./normalize-string-or-regex-CIiT1lMg.mjs";
4
+ import { l as PluginDriver, n as createBundlerOptions } from "./rolldown-build-7kWB1jqY.mjs";
5
+ import { a as aggregateBindingErrorsIntoJsError } from "./bindingify-input-options--qcSYuhh.mjs";
6
6
  import { BindingWatcher, shutdownAsyncRuntime } from "../rolldown-binding.wasi.cjs";
7
7
 
8
8
  //#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
@@ -340,6 +340,7 @@ function getValidNotifyOption(bundlerOptions) {
340
340
 
341
341
  //#endregion
342
342
  //#region src/api/watch/index.ts
343
+ /** @category Programmatic APIs */
343
344
  const watch = (input) => {
344
345
  const emitter = new WatcherEmitter();
345
346
  createWatcher(emitter, input);
package/package.json CHANGED
@@ -1,31 +1,31 @@
1
1
  {
2
2
  "name": "@rolldown/browser",
3
- "version": "1.0.0-beta.57",
3
+ "version": "1.0.0-beta.58",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
+ "keywords": [
6
+ "bundler",
7
+ "esbuild",
8
+ "parcel",
9
+ "rolldown",
10
+ "rollup",
11
+ "webpack"
12
+ ],
5
13
  "homepage": "https://rolldown.rs/",
6
- "type": "module",
14
+ "license": "MIT",
7
15
  "repository": {
8
16
  "type": "git",
9
17
  "url": "git+https://github.com/rolldown/rolldown.git",
10
18
  "directory": "packages/browser"
11
19
  },
12
- "license": "MIT",
13
- "keywords": [
14
- "webpack",
15
- "parcel",
16
- "esbuild",
17
- "rollup",
18
- "bundler",
19
- "rolldown"
20
- ],
20
+ "bin": {
21
+ "rolldown": "./bin/cli.mjs"
22
+ },
21
23
  "files": [
22
24
  "bin",
23
25
  "dist",
24
26
  "!*/.tsbuildinfo"
25
27
  ],
26
- "bin": {
27
- "rolldown": "./bin/cli.mjs"
28
- },
28
+ "type": "module",
29
29
  "main": "./dist/index.mjs",
30
30
  "module": "./dist/index.mjs",
31
31
  "types": "./dist/index.d.mts",
@@ -49,8 +49,8 @@
49
49
  "./package.json": "./package.json"
50
50
  },
51
51
  "publishConfig": {
52
- "registry": "https://registry.npmjs.org/",
53
- "access": "public"
52
+ "access": "public",
53
+ "registry": "https://registry.npmjs.org/"
54
54
  },
55
55
  "dependencies": {
56
56
  "@napi-rs/wasm-runtime": "^1.0.0"