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

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 (38) 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-c0HHH7Qq.js} +1 -1
  5. package/dist/experimental-index.browser.mjs +17 -3
  6. package/dist/experimental-index.d.mts +16 -4
  7. package/dist/experimental-index.mjs +19 -5
  8. package/dist/experimental-runtime-types.d.ts +6 -2
  9. package/dist/filter-index.d.mts +1 -1
  10. package/dist/get-log-filter.d.mts +1 -1
  11. package/dist/index.browser.mjs +4 -2
  12. package/dist/index.d.mts +5 -5
  13. package/dist/index.mjs +6 -6
  14. package/dist/{normalize-string-or-regex-DewaIpuo.js → normalize-string-or-regex-BB1FWNyl.js} +3 -2
  15. package/dist/parallel-plugin-worker.mjs +3 -3
  16. package/dist/parallel-plugin.d.mts +2 -2
  17. package/dist/parse-ast-index.d.mts +1 -1
  18. package/dist/parse-ast-index.mjs +1 -1
  19. package/dist/plugins-index.browser.mjs +2 -2
  20. package/dist/plugins-index.d.mts +3 -3
  21. package/dist/plugins-index.mjs +2 -2
  22. package/dist/rolldown-binding.wasi.cjs +1 -1
  23. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  24. package/dist/{rolldown-build-32P3iU2U.js → rolldown-build-Bfw5c2c3.js} +19 -10
  25. package/dist/shared/{binding-CDyF6W3D.d.mts → binding-MAEzB4KA.d.mts} +10 -0
  26. package/dist/shared/{bindingify-input-options-CwdDrVAR.mjs → bindingify-input-options-BTd8uAdf.mjs} +12 -7
  27. package/dist/shared/{constructors-Ch7pGFBC.mjs → constructors-C8tBnLHP.mjs} +1 -1
  28. package/dist/shared/{constructors-B0L_9ar3.d.mts → constructors-CQP6o3cR.d.mts} +2 -2
  29. package/dist/shared/{define-config-Bho_aQn8.d.mts → define-config-CpZLzJD0.d.mts} +484 -130
  30. package/dist/shared/{load-config-DUtgyO78.mjs → load-config-cKGxDu4K.mjs} +1 -1
  31. package/dist/shared/{logging-BpAvp7KV.d.mts → logging-B4x9qar8.d.mts} +1 -0
  32. package/dist/shared/{normalize-string-or-regex-Dt2VqAqy.mjs → normalize-string-or-regex-DJ5EwPtg.mjs} +3 -2
  33. package/dist/shared/{parse-ast-index-DZPue_kI.mjs → parse-ast-index-BLdgtc2B.mjs} +1 -1
  34. package/dist/shared/{rolldown-D1ymUD73.mjs → rolldown-8m9pjMU2.mjs} +2 -1
  35. package/dist/shared/{rolldown-build-rs9zb03O.mjs → rolldown-build-DKF_S8hw.mjs} +8 -4
  36. package/dist/shared/{utils-B3dcnHc8.d.mts → utils-BGxZdOXA.d.mts} +2 -2
  37. package/dist/shared/{watch-CbHTfwHk.mjs → watch-BEzOq0zm.mjs} +4 -3
  38. 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-8m9pjMU2.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.59";
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.107.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.107.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-DKF_S8hw.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-DJ5EwPtg.mjs";
4
+ import { c as normalizeHook, i as transformModuleInfo, s as unwrapBindingResult, t as bindingifyInputOptions } from "./bindingify-input-options-BTd8uAdf.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";
@@ -1741,12 +1741,13 @@ const InputOptionsSchema = strictObject({
1741
1741
  baseUrl: optional(string()),
1742
1742
  fileName: optional(string())
1743
1743
  })])),
1744
- nativeMagicString: optional(boolean())
1744
+ nativeMagicString: optional(boolean()),
1745
+ chunkOptimization: optional(boolean())
1745
1746
  })),
1746
1747
  transform: optional(TransformOptionsSchema),
1747
1748
  watch: optional(union([WatchOptionsSchema, literal(false)])),
1748
1749
  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.")),
1750
+ 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
1751
  preserveEntrySignatures: pipe(optional(union([
1751
1752
  literal("strict"),
1752
1753
  literal("allow-extension"),
@@ -1876,6 +1877,7 @@ const OutputOptionsSchema = strictObject({
1876
1877
  generatedCode: pipe(optional(partial(GeneratedCodeOptionsSchema)), description("Generated code options")),
1877
1878
  externalLiveBindings: pipe(optional(boolean()), description("external live bindings")),
1878
1879
  inlineDynamicImports: pipe(optional(boolean()), description("Inline dynamic imports")),
1880
+ dynamicImportInCjs: pipe(optional(boolean()), description("Dynamic import in CJS output")),
1879
1881
  manualChunks: optional(ManualChunksFunctionSchema),
1880
1882
  advancedChunks: optional(AdvancedChunksSchema),
1881
1883
  legalComments: pipe(optional(union([literal("none"), literal("inline")])), description("Control comments in the output")),
@@ -2056,6 +2058,7 @@ function bindingifyOutputOptions(outputOptions) {
2056
2058
  minify: outputOptions.minify,
2057
2059
  externalLiveBindings: outputOptions.externalLiveBindings,
2058
2060
  inlineDynamicImports: outputOptions.inlineDynamicImports,
2061
+ dynamicImportInCjs: outputOptions.dynamicImportInCjs,
2059
2062
  advancedChunks,
2060
2063
  polyfillRequire: outputOptions.polyfillRequire,
2061
2064
  sanitizeFileName,
@@ -2221,6 +2224,7 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
2221
2224
  //#endregion
2222
2225
  //#region src/api/rolldown/rolldown-build.ts
2223
2226
  Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
2227
+ /** @category Programmatic APIs */
2224
2228
  var RolldownBuild = class RolldownBuild {
2225
2229
  #inputOptions;
2226
2230
  #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-DJ5EwPtg.mjs";
4
+ import { l as PluginDriver, n as createBundlerOptions } from "./rolldown-build-DKF_S8hw.mjs";
5
+ import { a as aggregateBindingErrorsIntoJsError } from "./bindingify-input-options-BTd8uAdf.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.59",
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"