@rolldown/browser 1.0.0-beta.9-commit.ca4e9dd → 1.0.0-rc.1

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 (73) hide show
  1. package/dist/cli-setup.mjs +16 -0
  2. package/dist/cli.mjs +1084 -1281
  3. package/dist/config.d.mts +1 -3
  4. package/dist/config.mjs +7 -5
  5. package/dist/constructors-B8gqcrFr.js +61 -0
  6. package/dist/experimental-index.browser.mjs +225 -50
  7. package/dist/experimental-index.d.mts +164 -76
  8. package/dist/experimental-index.mjs +220 -60
  9. package/dist/experimental-runtime-types.d.ts +98 -0
  10. package/dist/filter-index.d.mts +104 -2
  11. package/dist/filter-index.mjs +123 -3
  12. package/dist/get-log-filter.d.mts +7 -0
  13. package/dist/get-log-filter.mjs +48 -0
  14. package/dist/index.browser.mjs +242 -2
  15. package/dist/index.d.mts +4 -3
  16. package/dist/index.mjs +54 -5
  17. package/dist/{shared/parse-ast-index-BHaE0ECV.cjs → normalize-string-or-regex-CL-PJZI7.js} +70 -137
  18. package/dist/parallel-plugin-worker.mjs +26 -33
  19. package/dist/parallel-plugin.d.mts +7 -7
  20. package/dist/parse-ast-index.d.mts +5 -6
  21. package/dist/parse-ast-index.mjs +1 -2
  22. package/dist/plugins-index.browser.mjs +39 -0
  23. package/dist/plugins-index.d.mts +30 -0
  24. package/dist/plugins-index.mjs +39 -0
  25. package/dist/rolldown-binding.wasi-browser.js +41 -24
  26. package/dist/rolldown-binding.wasi.cjs +62 -24
  27. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  28. package/dist/rolldown-build-C4tDS_XC.js +5055 -0
  29. package/dist/shared/bindingify-input-options-Bp2kpiI8.mjs +2231 -0
  30. package/dist/shared/composable-filters-CIxSuZSM.mjs +227 -0
  31. package/dist/shared/constructors-5bt5oBhE.d.mts +28 -0
  32. package/dist/shared/constructors-BTW-c3jX.mjs +61 -0
  33. package/dist/shared/define-config-CDlEOpr1.d.mts +3531 -0
  34. package/dist/shared/define-config-Dlptvz3X.mjs +7 -0
  35. package/dist/shared/{load-config-vRugYmJ3.mjs → load-config-BBZgIUGN.mjs} +23 -33
  36. package/dist/shared/logging-Nvu645a7.d.mts +50 -0
  37. package/dist/shared/{parse-ast-index-vu376yZ1.mjs → logs-B2CASPcx.mjs} +21 -116
  38. package/dist/shared/normalize-string-or-regex-DIwprzLy.mjs +60 -0
  39. package/dist/shared/parse-ast-index-2ahkCVK6.mjs +98 -0
  40. package/dist/shared/{prompt-CxjDC0Gn.cjs → prompt-B6NrDD1-.mjs} +301 -308
  41. package/dist/shared/rolldown-C0_W0QdY.mjs +42 -0
  42. package/dist/shared/rolldown-build-DLuUhuNw.mjs +2368 -0
  43. package/dist/shared/types-CIYK49jr.d.mts +1300 -0
  44. package/dist/shared/utils-CqMTwlsR.d.mts +22 -0
  45. package/dist/shared/watch-eIop0yN6.mjs +378 -0
  46. package/package.json +33 -38
  47. package/dist/cli.cjs +0 -1748
  48. package/dist/config.cjs +0 -12
  49. package/dist/config.d.cts +0 -11
  50. package/dist/experimental-index.cjs +0 -129
  51. package/dist/experimental-index.d.cts +0 -96
  52. package/dist/filter-index.cjs +0 -53
  53. package/dist/filter-index.d.cts +0 -3
  54. package/dist/index.cjs +0 -9
  55. package/dist/index.d.cts +0 -3
  56. package/dist/parallel-plugin-worker.cjs +0 -33
  57. package/dist/parallel-plugin-worker.d.cts +0 -1
  58. package/dist/parallel-plugin.cjs +0 -8
  59. package/dist/parallel-plugin.d.cts +0 -14
  60. package/dist/parse-ast-index.cjs +0 -4
  61. package/dist/parse-ast-index.d.cts +0 -9
  62. package/dist/shared/chunk-DDkG_k5U.cjs +0 -39
  63. package/dist/shared/chunk-DSsiIF1Z.mjs +0 -30
  64. package/dist/shared/define-config.d-D4lKXE9V.d.cts +0 -1165
  65. package/dist/shared/define-config.d-Dm9iNdt9.d.mts +0 -1165
  66. package/dist/shared/dist-BMVjvV-v.cjs +0 -249
  67. package/dist/shared/dist-CAn6dxW6.mjs +0 -153
  68. package/dist/shared/load-config-42uI5RSv.cjs +0 -125
  69. package/dist/shared/prompt-GFYxfPw7.mjs +0 -854
  70. package/dist/shared/src-Cu4_wKhx.mjs +0 -4691
  71. package/dist/shared/src-CzdOBfDC.cjs +0 -4647
  72. package/dist/src-DQ33eKZS.js +0 -4333
  73. /package/dist/{cli.d.cts → cli-setup.d.mts} +0 -0
@@ -0,0 +1,42 @@
1
+ import { l as PluginDriver, s as validateOption, t as RolldownBuild } from "./rolldown-build-DLuUhuNw.mjs";
2
+
3
+ //#region src/api/rolldown/index.ts
4
+ /**
5
+ * The API compatible with Rollup's `rollup` function.
6
+ *
7
+ * Unlike Rollup, the module graph is not built until the methods of the bundle object are called.
8
+ *
9
+ * @param input The input options object.
10
+ * @returns A Promise that resolves to a bundle object.
11
+ *
12
+ * @example
13
+ * ```js
14
+ * import { rolldown } from 'rolldown';
15
+ *
16
+ * let bundle, failed = false;
17
+ * try {
18
+ * bundle = await rolldown({
19
+ * input: 'src/main.js',
20
+ * });
21
+ * await bundle.write({
22
+ * format: 'esm',
23
+ * });
24
+ * } catch (e) {
25
+ * console.error(e);
26
+ * failed = true;
27
+ * }
28
+ * if (bundle) {
29
+ * await bundle.close();
30
+ * }
31
+ * process.exitCode = failed ? 1 : 0;
32
+ * ```
33
+ *
34
+ * @category Programmatic APIs
35
+ */
36
+ const rolldown = async (input) => {
37
+ validateOption("input", input);
38
+ return new RolldownBuild(await PluginDriver.callOptionsHook(input));
39
+ };
40
+
41
+ //#endregion
42
+ export { rolldown as t };