@rolldown/browser 1.0.0-beta.15 → 1.0.0-beta.17

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 (49) hide show
  1. package/dist/cli.cjs +8 -8
  2. package/dist/cli.mjs +1042 -1083
  3. package/dist/config.cjs +3 -3
  4. package/dist/config.d.cts +2 -2
  5. package/dist/config.d.mts +2 -2
  6. package/dist/config.mjs +4 -5
  7. package/dist/experimental-index.browser.mjs +3 -3
  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 +5 -17
  12. package/dist/experimental-runtime-types.d.ts +52 -0
  13. package/dist/filter-index.d.cts +2 -2
  14. package/dist/filter-index.d.mts +2 -2
  15. package/dist/filter-index.mjs +1 -2
  16. package/dist/index.browser.mjs +1 -1
  17. package/dist/index.cjs +2 -2
  18. package/dist/index.d.cts +2 -2
  19. package/dist/index.d.mts +2 -2
  20. package/dist/index.mjs +3 -4
  21. package/dist/parallel-plugin-worker.cjs +2 -2
  22. package/dist/parallel-plugin-worker.mjs +27 -33
  23. package/dist/parallel-plugin.d.cts +2 -2
  24. package/dist/parallel-plugin.d.mts +2 -2
  25. package/dist/parse-ast-index.cjs +1 -1
  26. package/dist/parse-ast-index.d.cts +1 -1
  27. package/dist/parse-ast-index.d.mts +1 -1
  28. package/dist/parse-ast-index.mjs +1 -2
  29. package/dist/rolldown-binding.wasi-browser.js +4 -2
  30. package/dist/rolldown-binding.wasi.cjs +3 -1
  31. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  32. package/dist/shared/{binding-CZdobbZA.d.cts → binding-CWvDTpOw.d.mts} +23 -15
  33. package/dist/shared/{binding-Dze8QVpf.d.mts → binding-um3VI33z.d.cts} +23 -15
  34. package/dist/shared/{define-config-CnVvtpOm.d.mts → define-config-DETTMcOl.d.mts} +73 -12
  35. package/dist/shared/{define-config-BE-fkZNW.d.cts → define-config-POPyhxOq.d.cts} +73 -12
  36. package/dist/shared/dist-BoWaIc-K.mjs +147 -0
  37. package/dist/shared/{load-config-CmZwBnZf.mjs → load-config-C0FU-xTD.mjs} +14 -19
  38. package/dist/shared/{load-config-DlY_Bz-0.cjs → load-config-Cp5Lu-qW.cjs} +1 -1
  39. package/dist/shared/{parse-ast-index-IepkD-LB.mjs → parse-ast-index-B5AmHtd5.mjs} +10 -28
  40. package/dist/shared/{parse-ast-index-5MuKtufe.cjs → parse-ast-index-X4pECV1E.cjs} +1 -1
  41. package/dist/shared/prompt-C5jz26Zn.mjs +852 -0
  42. package/dist/shared/{prompt-8EeOGx1_.cjs → prompt-QNI93ne7.cjs} +2 -2
  43. package/dist/shared/{src-Do34b1Pc.mjs → src-CsIMaM6C.mjs} +1157 -1367
  44. package/dist/shared/{src-CYvvndv2.cjs → src-D8KQ1KMN.cjs} +43 -28
  45. package/dist/{src-B1yRSHcw.js → src-Bv_xHi2_.js} +43 -28
  46. package/package.json +3 -2
  47. package/dist/shared/chunk-DSsiIF1Z.mjs +0 -30
  48. package/dist/shared/dist-DeDsdiza.mjs +0 -153
  49. package/dist/shared/prompt-jPdbaKAj.mjs +0 -854
@@ -1,4 +1,3 @@
1
- import { __esm } from "./chunk-DSsiIF1Z.mjs";
2
1
  import { parseAsync, parseSync } from "../rolldown-binding.wasi.cjs";
3
2
 
4
3
  //#region src/utils/code-frame.ts
@@ -10,6 +9,9 @@ function spaces(index) {
10
9
  function tabsToSpaces(value) {
11
10
  return value.replace(/^\t+/, (match) => match.split(" ").join(" "));
12
11
  }
12
+ const LINE_TRUNCATE_LENGTH = 120;
13
+ const MIN_CHARACTERS_SHOWN_AFTER_LOCATION = 10;
14
+ const ELLIPSIS = "...";
13
15
  function getCodeFrame(source, line, column) {
14
16
  let lines = source.split("\n");
15
17
  if (line > lines.length) return "";
@@ -35,12 +37,6 @@ function getCodeFrame(source, line, column) {
35
37
  return `${lineNumber}: ${displayedLine}`;
36
38
  }).join("\n");
37
39
  }
38
- var LINE_TRUNCATE_LENGTH, MIN_CHARACTERS_SHOWN_AFTER_LOCATION, ELLIPSIS;
39
- var init_code_frame = __esm({ "src/utils/code-frame.ts"() {
40
- LINE_TRUNCATE_LENGTH = 120;
41
- MIN_CHARACTERS_SHOWN_AFTER_LOCATION = 10;
42
- ELLIPSIS = "...";
43
- } });
44
40
 
45
41
  //#endregion
46
42
  //#region src/log/locate-character/index.js
@@ -102,10 +98,10 @@ function getLocator(source, options = {}) {
102
98
  function locate(source, search, options) {
103
99
  return getLocator(source, options)(search, options && options.startIndex);
104
100
  }
105
- var init_locate_character = __esm({ "src/log/locate-character/index.js"() {} });
106
101
 
107
102
  //#endregion
108
103
  //#region src/log/logs.ts
104
+ 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";
109
105
  function logParseError(message) {
110
106
  return {
111
107
  code: PARSE_ERROR,
@@ -182,15 +178,9 @@ function augmentCodeLocation(properties, pos, source, id) {
182
178
  properties.frame = getCodeFrame(source, line, column);
183
179
  }
184
180
  }
185
- var INVALID_LOG_POSITION, PLUGIN_ERROR, INPUT_HOOK_IN_OUTPUT_PLUGIN, CYCLE_LOADING, MULTIPLY_NOTIFY_OPTION, PARSE_ERROR;
186
- var init_logs = __esm({ "src/log/logs.ts"() {
187
- init_code_frame();
188
- init_locate_character();
189
- 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";
190
- } });
191
181
 
192
182
  //#endregion
193
- //#region ../../node_modules/.pnpm/oxc-parser@0.72.3/node_modules/oxc-parser/wrap.mjs
183
+ //#region ../../node_modules/.pnpm/oxc-parser@0.73.0/node_modules/oxc-parser/wrap.mjs
194
184
  function wrap$1(result) {
195
185
  let program, module, comments, errors;
196
186
  return {
@@ -225,7 +215,6 @@ function applyFix(program, fixPath) {
225
215
  node.value = RegExp(node.regex.pattern, node.regex.flags);
226
216
  } catch (_err) {}
227
217
  }
228
- var init_wrap = __esm({ "../../node_modules/.pnpm/oxc-parser@0.72.3/node_modules/oxc-parser/wrap.mjs"() {} });
229
218
 
230
219
  //#endregion
231
220
  //#region src/parse-ast-index.ts
@@ -250,6 +239,10 @@ function normalizeParseError(sourceText, errors) {
250
239
  }
251
240
  return error(logParseError(message));
252
241
  }
242
+ const defaultParserOptions = {
243
+ lang: "js",
244
+ preserveParens: false
245
+ };
253
246
  function parseAst(sourceText, options, filename) {
254
247
  return wrap(parseSync(filename ?? "file.js", sourceText, {
255
248
  ...defaultParserOptions,
@@ -262,17 +255,6 @@ async function parseAstAsync(sourceText, options, filename) {
262
255
  ...options
263
256
  }), sourceText);
264
257
  }
265
- var defaultParserOptions;
266
- var init_parse_ast_index = __esm({ "src/parse-ast-index.ts"() {
267
- init_locate_character();
268
- init_logs();
269
- init_code_frame();
270
- init_wrap();
271
- defaultParserOptions = {
272
- lang: "js",
273
- preserveParens: false
274
- };
275
- } });
276
258
 
277
259
  //#endregion
278
- export { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst, parseAstAsync };
260
+ export { augmentCodeLocation, error, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst, parseAstAsync };
@@ -181,7 +181,7 @@ function augmentCodeLocation(properties, pos, source, id) {
181
181
  }
182
182
 
183
183
  //#endregion
184
- //#region ../../node_modules/.pnpm/oxc-parser@0.72.3/node_modules/oxc-parser/wrap.mjs
184
+ //#region ../../node_modules/.pnpm/oxc-parser@0.73.0/node_modules/oxc-parser/wrap.mjs
185
185
  function wrap$1(result) {
186
186
  let program, module$1, comments, errors;
187
187
  return {