rolldown 1.0.0-beta.54 → 1.0.0-beta.55

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 (36) hide show
  1. package/dist/cli-setup.mjs +2 -2
  2. package/dist/cli.mjs +19 -19
  3. package/dist/config.d.mts +2 -2
  4. package/dist/config.mjs +8 -8
  5. package/dist/experimental-index.d.mts +10 -4
  6. package/dist/experimental-index.mjs +14 -15
  7. package/dist/filter-index.d.mts +2 -2
  8. package/dist/filter-index.mjs +1 -1
  9. package/dist/get-log-filter.d.mts +7 -0
  10. package/dist/get-log-filter.mjs +48 -0
  11. package/dist/index.d.mts +3 -2
  12. package/dist/index.mjs +10 -14
  13. package/dist/parallel-plugin-worker.mjs +5 -5
  14. package/dist/parallel-plugin.d.mts +2 -2
  15. package/dist/parse-ast-index.d.mts +1 -1
  16. package/dist/parse-ast-index.mjs +2 -2
  17. package/dist/plugins-index.d.mts +3 -3
  18. package/dist/plugins-index.mjs +3 -3
  19. package/dist/shared/{binding-BgawCXFG.mjs → binding-DMnPPQ90.mjs} +51 -27
  20. package/dist/shared/{binding-yIBVkeOE.d.mts → binding-r9j8jqRV.d.mts} +2 -0
  21. package/dist/shared/{bindingify-input-options-DvsExmEF.mjs → bindingify-input-options-A-rLIOKA.mjs} +28 -22
  22. package/dist/shared/{constructors-DqAPGbqJ.mjs → constructors-BGI2r6Tk.mjs} +1 -1
  23. package/dist/shared/{constructors-BgO0Ou3T.d.mts → constructors-DO8UjlE5.d.mts} +2 -2
  24. package/dist/shared/{define-config-COJu-A7R.d.mts → define-config-MdVaFcie.d.mts} +15 -40
  25. package/dist/shared/{load-config--qXpT-nH.mjs → load-config-DnirbDRj.mjs} +1 -1
  26. package/dist/shared/logging-BpAvp7KV.d.mts +37 -0
  27. package/dist/shared/{normalize-string-or-regex-CF1OWLn9.mjs → normalize-string-or-regex-B4d0IHth.mjs} +6 -6
  28. package/dist/shared/{parse-ast-index-DeJDe-DO.mjs → parse-ast-index-CoZSRGeP.mjs} +4 -4
  29. package/dist/shared/{rolldown-BsTgRBvz.mjs → rolldown-BTFK71hw.mjs} +1 -1
  30. package/dist/shared/{rolldown-build-DtYoS8Tq.mjs → rolldown-build-CNW2eye_.mjs} +22 -15
  31. package/dist/shared/{watch-CfGzq0YA.mjs → watch-CKam-d6K.mjs} +11 -11
  32. package/package.json +19 -18
  33. /package/dist/shared/{define-config-DfeZGBEt.mjs → define-config-BF4P-Pum.mjs} +0 -0
  34. /package/dist/shared/{logs-CSQ_UMWp.mjs → logs-sGci9sux.mjs} +0 -0
  35. /package/dist/shared/{misc-CxyvWjTr.mjs → misc-DpjTMcQQ.mjs} +0 -0
  36. /package/dist/shared/{prompt-pmGBC3ws.mjs → prompt-CNt8OM9C.mjs} +0 -0
@@ -1,7 +1,7 @@
1
- import { t as require_binding } from "./binding-BgawCXFG.mjs";
2
- import { l as locate, n as error, s as logParseError, u as getCodeFrame } from "./logs-CSQ_UMWp.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-DMnPPQ90.mjs";
2
+ import { l as locate, n as error, s as logParseError, u as getCodeFrame } from "./logs-sGci9sux.mjs";
3
3
 
4
- //#region ../../node_modules/.pnpm/oxc-parser@0.102.0/node_modules/oxc-parser/src-js/wrap.js
4
+ //#region ../../node_modules/.pnpm/oxc-parser@0.103.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 {
@@ -39,7 +39,7 @@ function applyFix(program, fixPath) {
39
39
 
40
40
  //#endregion
41
41
  //#region src/utils/parse.ts
42
- var import_binding = require_binding();
42
+ var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
43
43
  /**
44
44
  * Parse asynchronously.
45
45
  *
@@ -1,4 +1,4 @@
1
- import { l as PluginDriver, s as validateOption, t as RolldownBuild } from "./rolldown-build-DtYoS8Tq.mjs";
1
+ import { l as PluginDriver, s as validateOption, t as RolldownBuild } from "./rolldown-build-CNW2eye_.mjs";
2
2
 
3
3
  //#region src/api/rolldown/index.ts
4
4
  const rolldown = async (input) => {
@@ -1,8 +1,8 @@
1
- import { t as require_binding } from "./binding-BgawCXFG.mjs";
2
- import { i as logInputHookInOutputPlugin, n as error } from "./logs-CSQ_UMWp.mjs";
3
- import { i as unimplemented } from "./misc-CxyvWjTr.mjs";
4
- 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-CF1OWLn9.mjs";
5
- import { c as normalizeHook, i as transformModuleInfo, s as unwrapBindingResult, t as bindingifyInputOptions } from "./bindingify-input-options-DvsExmEF.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-DMnPPQ90.mjs";
2
+ import { i as logInputHookInOutputPlugin, n as error } from "./logs-sGci9sux.mjs";
3
+ import { i as unimplemented } from "./misc-DpjTMcQQ.mjs";
4
+ 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-B4d0IHth.mjs";
5
+ import { c as normalizeHook, i as transformModuleInfo, s as unwrapBindingResult, t as bindingifyInputOptions } from "./bindingify-input-options-A-rLIOKA.mjs";
6
6
  import { Worker } from "node:worker_threads";
7
7
  import path from "node:path";
8
8
  import { styleText } from "node:util";
@@ -1696,7 +1696,7 @@ const OnLogSchema = pipe(vFunction(), args(tuple([
1696
1696
  LogOrStringHandlerSchema
1697
1697
  ])));
1698
1698
  const OnwarnSchema = pipe(vFunction(), args(tuple([RollupLogSchema, pipe(vFunction(), args(tuple([union([RollupLogWithStringSchema, pipe(vFunction(), returns(RollupLogWithStringSchema))])])))])));
1699
- const HmrSchema = union([boolean(), strictObject({
1699
+ const DevModeSchema = union([boolean(), strictObject({
1700
1700
  new: optional(boolean()),
1701
1701
  port: optional(number()),
1702
1702
  host: optional(string()),
@@ -1729,7 +1729,7 @@ const InputOptionsSchema = strictObject({
1729
1729
  strictExecutionOrder: optional(boolean()),
1730
1730
  onDemandWrapping: optional(boolean()),
1731
1731
  incrementalBuild: optional(boolean()),
1732
- hmr: optional(HmrSchema),
1732
+ devMode: optional(DevModeSchema),
1733
1733
  attachDebugInfo: optional(union([
1734
1734
  literal("none"),
1735
1735
  literal("simple"),
@@ -1852,6 +1852,8 @@ const OutputOptionsSchema = strictObject({
1852
1852
  sourcemapPathTransform: optional(custom(() => true)),
1853
1853
  banner: optional(union([string(), AddonFunctionSchema])),
1854
1854
  footer: optional(union([string(), AddonFunctionSchema])),
1855
+ postBanner: optional(union([string(), AddonFunctionSchema])),
1856
+ postFooter: optional(union([string(), AddonFunctionSchema])),
1855
1857
  intro: optional(union([string(), AddonFunctionSchema])),
1856
1858
  outro: optional(union([string(), AddonFunctionSchema])),
1857
1859
  extend: pipe(optional(boolean()), description("Extend global variable defined by name in IIFE / UMD formats")),
@@ -1899,6 +1901,8 @@ const OutputCliOverrideSchema = strictObject({
1899
1901
  sanitizeFileName: pipe(optional(boolean()), description("Sanitize file name")),
1900
1902
  banner: pipe(optional(string()), description(getAddonDescription("top", "outside"))),
1901
1903
  footer: pipe(optional(string()), description(getAddonDescription("bottom", "outside"))),
1904
+ postBanner: pipe(optional(string()), description("A string to prepend to the top of each chunk. Applied after the `renderChunk` hook and minification")),
1905
+ postFooter: pipe(optional(string()), description("A string to append to the bottom of each chunk. Applied after the `renderChunk` hook and minification")),
1902
1906
  intro: pipe(optional(string()), description(getAddonDescription("top", "inside"))),
1903
1907
  outro: pipe(optional(string()), description(getAddonDescription("bottom", "inside"))),
1904
1908
  esModule: pipe(optional(boolean()), description("Always generate `__esModule` marks in non-ESM formats, defaults to `if-default-prop` (use `--no-esModule` to always disable)")),
@@ -2014,7 +2018,10 @@ var ChunkingContextImpl = class {
2014
2018
  //#endregion
2015
2019
  //#region src/utils/bindingify-output-options.ts
2016
2020
  function bindingifyOutputOptions(outputOptions) {
2017
- const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir } = outputOptions;
2021
+ const { dir, format, exports, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, postBanner, postFooter, intro, outro, esModule, globals, paths, generatedCode, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar, cleanDir } = outputOptions;
2022
+ if (outputOptions.inlineDynamicImports === true) {
2023
+ if (manualChunks != null) throw new Error("Invalid value \"true\" for option \"output.inlineDynamicImports\" - this option is not supported for \"output.manualChunks\".");
2024
+ }
2018
2025
  const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
2019
2026
  return {
2020
2027
  dir,
@@ -2029,6 +2036,8 @@ function bindingifyOutputOptions(outputOptions) {
2029
2036
  sourcemapPathTransform,
2030
2037
  banner: bindingifyAddon(banner),
2031
2038
  footer: bindingifyAddon(footer),
2039
+ postBanner: bindingifyAddon(postBanner),
2040
+ postFooter: bindingifyAddon(postFooter),
2032
2041
  intro: bindingifyAddon(intro),
2033
2042
  outro: bindingifyAddon(outro),
2034
2043
  extend: outputOptions.extend,
@@ -2059,10 +2068,9 @@ function bindingifyOutputOptions(outputOptions) {
2059
2068
  };
2060
2069
  }
2061
2070
  function bindingifyAddon(configAddon) {
2062
- return async (chunk) => {
2063
- if (typeof configAddon === "function") return configAddon(transformRenderedChunk(chunk));
2064
- return configAddon || "";
2065
- };
2071
+ if (configAddon == null || configAddon === "") return;
2072
+ if (typeof configAddon === "function") return async (chunk) => configAddon(transformRenderedChunk(chunk));
2073
+ return configAddon;
2066
2074
  }
2067
2075
  function bindingifyFormat(format) {
2068
2076
  switch (format) {
@@ -2121,7 +2129,7 @@ function bindingifyAdvancedChunks(advancedChunks, manualChunks) {
2121
2129
 
2122
2130
  //#endregion
2123
2131
  //#region src/utils/initialize-parallel-plugins.ts
2124
- var import_binding$1 = require_binding();
2132
+ var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
2125
2133
  async function initializeParallelPlugins(plugins) {
2126
2134
  const pluginInfos = [];
2127
2135
  for (const [index, plugin] of plugins.entries()) if ("_parallel" in plugin) {
@@ -2134,7 +2142,7 @@ async function initializeParallelPlugins(plugins) {
2134
2142
  }
2135
2143
  if (pluginInfos.length <= 0) return;
2136
2144
  const count = availableParallelism();
2137
- const parallelJsPluginRegistry = new import_binding$1.ParallelJsPluginRegistry(count);
2145
+ const parallelJsPluginRegistry = new import_binding.ParallelJsPluginRegistry(count);
2138
2146
  const registryId = parallelJsPluginRegistry.id;
2139
2147
  const workers = await initializeWorkers(registryId, count, pluginInfos);
2140
2148
  const stopWorkers = async () => {
@@ -2212,7 +2220,6 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
2212
2220
 
2213
2221
  //#endregion
2214
2222
  //#region src/api/rolldown/rolldown-build.ts
2215
- var import_binding = require_binding();
2216
2223
  Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
2217
2224
  var RolldownBuild = class RolldownBuild {
2218
2225
  #inputOptions;
@@ -1,9 +1,9 @@
1
- import { t as require_binding } from "./binding-BgawCXFG.mjs";
2
- import { o as logMultiplyNotifyOption } from "./logs-CSQ_UMWp.mjs";
3
- import { t as arraify } from "./misc-CxyvWjTr.mjs";
4
- import { E as LOG_LEVEL_WARN } from "./normalize-string-or-regex-CF1OWLn9.mjs";
5
- import { l as PluginDriver, n as createBundlerOptions } from "./rolldown-build-DtYoS8Tq.mjs";
6
- import { a as aggregateBindingErrorsIntoJsError } from "./bindingify-input-options-DvsExmEF.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-DMnPPQ90.mjs";
2
+ import { o as logMultiplyNotifyOption } from "./logs-sGci9sux.mjs";
3
+ import { t as arraify } from "./misc-DpjTMcQQ.mjs";
4
+ import { E as LOG_LEVEL_WARN } from "./normalize-string-or-regex-B4d0IHth.mjs";
5
+ import { l as PluginDriver, n as createBundlerOptions } from "./rolldown-build-CNW2eye_.mjs";
6
+ import { a as aggregateBindingErrorsIntoJsError } from "./bindingify-input-options-A-rLIOKA.mjs";
7
7
 
8
8
  //#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
9
9
  /**
@@ -203,18 +203,18 @@ var SignalExit = class extends SignalExitBase {
203
203
  }
204
204
  };
205
205
  const process$1 = globalThis.process;
206
- const { onExit, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
206
+ const { onExit: onExit$1, load, unload } = signalExitWrap(processOk(process$1) ? new SignalExit(process$1) : new SignalExitFallback());
207
207
 
208
208
  //#endregion
209
209
  //#region src/utils/signal-exit.ts
210
- function onExit$1(...args) {
210
+ function onExit(...args) {
211
211
  if (typeof process === "object" && process.versions.webcontainer) {
212
212
  process.on("exit", (code) => {
213
213
  args[0](code, null);
214
214
  });
215
215
  return;
216
216
  }
217
- onExit(...args);
217
+ onExit$1(...args);
218
218
  }
219
219
 
220
220
  //#endregion
@@ -292,7 +292,7 @@ var WatcherEmitter = class {
292
292
 
293
293
  //#endregion
294
294
  //#region src/api/watch/watcher.ts
295
- var import_binding = require_binding();
295
+ var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
296
296
  var Watcher = class {
297
297
  closed;
298
298
  inner;
@@ -348,4 +348,4 @@ const watch = (input) => {
348
348
  };
349
349
 
350
350
  //#endregion
351
- export { onExit$1 as n, watch as t };
351
+ export { onExit as n, watch as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rolldown",
3
- "version": "1.0.0-beta.54",
3
+ "version": "1.0.0-beta.55",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "type": "module",
6
6
  "homepage": "https://rolldown.rs/",
@@ -38,6 +38,7 @@
38
38
  "types": "./dist/experimental-runtime-types.d.ts"
39
39
  },
40
40
  "./filter": "./dist/filter-index.mjs",
41
+ "./getLogFilter": "./dist/get-log-filter.mjs",
41
42
  "./parallelPlugin": "./dist/parallel-plugin.mjs",
42
43
  "./parseAst": "./dist/parse-ast-index.mjs",
43
44
  "./package.json": "./package.json",
@@ -78,8 +79,8 @@
78
79
  "dtsHeader": "type MaybePromise<T> = T | Promise<T>\ntype Nullable<T> = T | null | undefined\ntype VoidNullable<T = void> = T | null | undefined | void\nexport type BindingStringOrRegex = string | RegExp\ntype BindingResult<T> = { errors: BindingError[], isBindingErrors: boolean } | T\n\n"
79
80
  },
80
81
  "dependencies": {
81
- "@oxc-project/types": "=0.102.0",
82
- "@rolldown/pluginutils": "1.0.0-beta.54"
82
+ "@oxc-project/types": "=0.103.0",
83
+ "@rolldown/pluginutils": "1.0.0-beta.55"
83
84
  },
84
85
  "devDependencies": {
85
86
  "@napi-rs/cli": "^3.4.1",
@@ -90,7 +91,7 @@
90
91
  "consola": "^3.4.2",
91
92
  "execa": "^9.2.0",
92
93
  "glob": "^13.0.0",
93
- "oxc-parser": "=0.102.0",
94
+ "oxc-parser": "=0.103.0",
94
95
  "pathe": "^2.0.3",
95
96
  "remeda": "^2.10.0",
96
97
  "rolldown-plugin-dts": "^0.18.0",
@@ -99,25 +100,25 @@
99
100
  "source-map": "^0.7.4",
100
101
  "typescript": "^5.8.3",
101
102
  "valibot": "1.2.0",
102
- "rolldown": "1.0.0-beta.54"
103
+ "rolldown": "1.0.0-beta.55"
103
104
  },
104
105
  "engines": {
105
106
  "node": "^20.19.0 || >=22.12.0"
106
107
  },
107
108
  "optionalDependencies": {
108
- "@rolldown/binding-darwin-x64": "1.0.0-beta.54",
109
- "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.54",
110
- "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.54",
111
- "@rolldown/binding-linux-x64-musl": "1.0.0-beta.54",
112
- "@rolldown/binding-freebsd-x64": "1.0.0-beta.54",
113
- "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.54",
114
- "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.54",
115
- "@rolldown/binding-darwin-arm64": "1.0.0-beta.54",
116
- "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.54",
117
- "@rolldown/binding-openharmony-arm64": "1.0.0-beta.54",
118
- "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.54",
119
- "@rolldown/binding-android-arm64": "1.0.0-beta.54",
120
- "@rolldown/binding-wasm32-wasi": "1.0.0-beta.54"
109
+ "@rolldown/binding-darwin-x64": "1.0.0-beta.55",
110
+ "@rolldown/binding-win32-x64-msvc": "1.0.0-beta.55",
111
+ "@rolldown/binding-linux-x64-gnu": "1.0.0-beta.55",
112
+ "@rolldown/binding-linux-x64-musl": "1.0.0-beta.55",
113
+ "@rolldown/binding-freebsd-x64": "1.0.0-beta.55",
114
+ "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.55",
115
+ "@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.55",
116
+ "@rolldown/binding-darwin-arm64": "1.0.0-beta.55",
117
+ "@rolldown/binding-linux-arm64-musl": "1.0.0-beta.55",
118
+ "@rolldown/binding-openharmony-arm64": "1.0.0-beta.55",
119
+ "@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.55",
120
+ "@rolldown/binding-android-arm64": "1.0.0-beta.55",
121
+ "@rolldown/binding-wasm32-wasi": "1.0.0-beta.55"
121
122
  },
122
123
  "scripts": {
123
124
  "# Scrips for binding #": "_",