@rollipop/rolldown 1.0.23 → 1.0.25

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 (39) hide show
  1. package/dist/cli.mjs +6 -6
  2. package/dist/config.d.mts +16 -17
  3. package/dist/config.mjs +2 -2
  4. package/dist/experimental-index.d.mts +214 -205
  5. package/dist/experimental-index.mjs +23 -14
  6. package/dist/experimental-runtime-types.d.ts +111 -41
  7. package/dist/filter-index.d.mts +6 -5
  8. package/dist/get-log-filter.d.mts +2 -2
  9. package/dist/index.d.mts +3 -3
  10. package/dist/index.mjs +4 -4
  11. package/dist/parallel-plugin-worker.mjs +2 -2
  12. package/dist/parallel-plugin.d.mts +3 -4
  13. package/dist/parse-ast-index.d.mts +19 -20
  14. package/dist/parse-ast-index.mjs +1 -1
  15. package/dist/plugins-index.d.mts +27 -28
  16. package/dist/plugins-index.mjs +2 -2
  17. package/dist/shared/{binding-FraDreAW.d.mts → binding-CyCKfYSu.d.mts} +37 -25
  18. package/dist/shared/{binding-BeFnGbcC.mjs → binding-DnitnDvS.mjs} +26 -26
  19. package/dist/shared/{bindingify-input-options-Bn4KwwnQ.mjs → bindingify-input-options-CkSiXecU.mjs} +5 -5
  20. package/dist/shared/{constructors-CXtPAgZN.d.mts → constructors-B1v9buY3.d.mts} +9 -10
  21. package/dist/shared/{constructors-BtPvcMnV.mjs → constructors-CEYV9FDo.mjs} +1 -1
  22. package/dist/shared/define-config-JSiTCvYA.d.mts +4033 -0
  23. package/dist/shared/{error-ByvXiVA5.mjs → error-pMeQY3Ie.mjs} +1 -1
  24. package/dist/shared/get-log-filter-B6CU6b90.d.mts +34 -0
  25. package/dist/shared/{load-config-Bq5f70mp.mjs → load-config-BAsjK_il.mjs} +1 -1
  26. package/dist/shared/{logging-BSNejiLS.d.mts → logging-xuHO4mAy.d.mts} +6 -6
  27. package/dist/shared/{normalize-string-or-regex-BP4QDm1i.mjs → normalize-string-or-regex-CSHtENP1.mjs} +1 -1
  28. package/dist/shared/{parse-fKhlPUp2.mjs → parse-BEeauYyL.mjs} +2 -2
  29. package/dist/shared/{resolve-tsconfig-bMlSU2mx.mjs → resolve-tsconfig-upebNbwm.mjs} +2 -2
  30. package/dist/shared/{rolldown-B8ugj8Jp.mjs → rolldown-DHWEkE2v.mjs} +1 -1
  31. package/dist/shared/{rolldown-build-2x6VVmNU.mjs → rolldown-build-Cy0C2jvD.mjs} +4 -4
  32. package/dist/shared/transform-DJLP9UUk.d.mts +148 -0
  33. package/dist/shared/{watch-Dyck2DYi.mjs → watch-BLrLOBAp.mjs} +4 -4
  34. package/dist/utils-index.d.mts +29 -30
  35. package/dist/utils-index.mjs +5 -5
  36. package/package.json +14 -14
  37. package/dist/shared/define-config-oNOGrLUX.d.mts +0 -4008
  38. package/dist/shared/get-log-filter-B4LpBryx.d.mts +0 -35
  39. package/dist/shared/transform-DmrnpNrQ.d.mts +0 -149
@@ -1,35 +0,0 @@
1
- import { a as RolldownLog } from "./logging-BSNejiLS.mjs";
2
-
3
- //#region src/get-log-filter.d.ts
4
- /**
5
- * @param filters A list of log filters to apply
6
- * @returns A function that tests whether a log should be output
7
- *
8
- * @category Config
9
- */
10
- type GetLogFilter = (filters: string[]) => (log: RolldownLog) => boolean;
11
- /**
12
- * A helper function to generate log filters using the same syntax as the CLI.
13
- *
14
- * @example
15
- * ```ts
16
- * import { defineConfig } from '@rollipop/rolldown';
17
- * import { getLogFilter } from '@rollipop/rolldown/getLogFilter';
18
- *
19
- * const logFilter = getLogFilter(['code:FOO', 'code:BAR']);
20
- *
21
- * export default defineConfig({
22
- * input: 'main.js',
23
- * onLog(level, log, handler) {
24
- * if (logFilter(log)) {
25
- * handler(level, log);
26
- * }
27
- * }
28
- * });
29
- * ```
30
- *
31
- * @category Config
32
- */
33
- declare const getLogFilter: GetLogFilter;
34
- //#endregion
35
- export { getLogFilter as n, GetLogFilter as t };
@@ -1,149 +0,0 @@
1
- import { a as RolldownLog } from "./logging-BSNejiLS.mjs";
2
- import { B as ParseResult$1, I as MinifyOptions$1, J as TsconfigCache$1, K as SourceMap, L as MinifyResult$1, V as ParserOptions$1, a as BindingEnhancedTransformOptions, b as BindingTsconfigResult, o as BindingEnhancedTransformResult } from "./binding-FraDreAW.mjs";
3
-
4
- //#region src/utils/resolve-tsconfig.d.ts
5
- /**
6
- * Cache for tsconfig resolution to avoid redundant file system operations.
7
- *
8
- * The cache stores resolved tsconfig configurations keyed by their file paths.
9
- * When transforming multiple files in the same project, tsconfig lookups are
10
- * deduplicated, improving performance.
11
- *
12
- * @category Utilities
13
- * @experimental
14
- */
15
- declare class TsconfigCache extends TsconfigCache$1 {
16
- constructor();
17
- }
18
- /** @hidden This is only expected to be used by Vite */
19
- declare function resolveTsconfig(filename: string, cache?: TsconfigCache | null): BindingTsconfigResult | null;
20
- //#endregion
21
- //#region src/utils/parse.d.ts
22
- /**
23
- * Result of parsing a code
24
- *
25
- * @category Utilities
26
- */
27
- interface ParseResult extends ParseResult$1 {}
28
- /**
29
- * Options for parsing a code
30
- *
31
- * @category Utilities
32
- */
33
- interface ParserOptions extends ParserOptions$1 {}
34
- /**
35
- * Parse JS/TS source asynchronously on a separate thread.
36
- *
37
- * Note that not all of the workload can happen on a separate thread.
38
- * Parsing on Rust side does happen in a separate thread, but deserialization of the AST to JS objects
39
- * has to happen on current thread. This synchronous deserialization work typically outweighs
40
- * the asynchronous parsing by a factor of between 3 and 20.
41
- *
42
- * i.e. the majority of the workload cannot be parallelized by using this method.
43
- *
44
- * Generally {@linkcode parseSync} is preferable to use as it does not have the overhead of spawning a thread.
45
- * If you need to parallelize parsing multiple files, it is recommended to use worker threads.
46
- *
47
- * @category Utilities
48
- */
49
- declare function parse(filename: string, sourceText: string, options?: ParserOptions | null): Promise<ParseResult>;
50
- /**
51
- * Parse JS/TS source synchronously on current thread.
52
- *
53
- * This is generally preferable over {@linkcode parse} (async) as it does not have the overhead
54
- * of spawning a thread, and the majority of the workload cannot be parallelized anyway
55
- * (see {@linkcode parse} documentation for details).
56
- *
57
- * If you need to parallelize parsing multiple files, it is recommended to use worker threads
58
- * with {@linkcode parseSync} rather than using {@linkcode parse}.
59
- *
60
- * @category Utilities
61
- */
62
- declare function parseSync(filename: string, sourceText: string, options?: ParserOptions | null): ParseResult;
63
- //#endregion
64
- //#region src/utils/minify.d.ts
65
- /**
66
- * Options for minification.
67
- *
68
- * @category Utilities
69
- */
70
- interface MinifyOptions extends MinifyOptions$1 {
71
- inputMap?: SourceMap;
72
- }
73
- /**
74
- * The result of minification.
75
- *
76
- * @category Utilities
77
- */
78
- interface MinifyResult extends MinifyResult$1 {}
79
- /**
80
- * Minify asynchronously.
81
- *
82
- * Note: This function can be slower than {@linkcode minifySync} due to the overhead of spawning a thread.
83
- *
84
- * @category Utilities
85
- * @experimental
86
- */
87
- declare function minify(filename: string, sourceText: string, options?: MinifyOptions | null): Promise<MinifyResult>;
88
- /**
89
- * Minify synchronously.
90
- *
91
- * @category Utilities
92
- * @experimental
93
- */
94
- declare function minifySync(filename: string, sourceText: string, options?: MinifyOptions | null): MinifyResult;
95
- //#endregion
96
- //#region src/utils/transform.d.ts
97
- /**
98
- * Options for transforming a code.
99
- *
100
- * @category Utilities
101
- */
102
- interface TransformOptions extends BindingEnhancedTransformOptions {}
103
- /**
104
- * Result of transforming a code.
105
- *
106
- * @category Utilities
107
- */
108
- type TransformResult = Omit<BindingEnhancedTransformResult, "errors" | "warnings"> & {
109
- errors: Error[];
110
- warnings: RolldownLog[];
111
- };
112
- /**
113
- * Transpile a JavaScript or TypeScript into a target ECMAScript version, asynchronously.
114
- *
115
- * Note: This function can be slower than `transformSync` due to the overhead of spawning a thread.
116
- *
117
- * @param filename The name of the file being transformed. If this is a
118
- * relative path, consider setting the {@linkcode TransformOptions#cwd} option.
119
- * @param sourceText The source code to transform.
120
- * @param options The transform options including tsconfig and inputMap. See {@linkcode TransformOptions} for more information.
121
- * @param cache Optional tsconfig cache for reusing resolved tsconfig across multiple transforms.
122
- * Only used when `options.tsconfig` is `true`.
123
- *
124
- * @returns a promise that resolves to an object containing the transformed code,
125
- * source maps, and any errors that occurred during parsing or transformation.
126
- *
127
- * @category Utilities
128
- * @experimental
129
- */
130
- declare function transform(filename: string, sourceText: string, options?: TransformOptions | null, cache?: TsconfigCache | null): Promise<TransformResult>;
131
- /**
132
- * Transpile a JavaScript or TypeScript into a target ECMAScript version.
133
- *
134
- * @param filename The name of the file being transformed. If this is a
135
- * relative path, consider setting the {@linkcode TransformOptions#cwd} option.
136
- * @param sourceText The source code to transform.
137
- * @param options The transform options including tsconfig and inputMap. See {@linkcode TransformOptions} for more information.
138
- * @param cache Optional tsconfig cache for reusing resolved tsconfig across multiple transforms.
139
- * Only used when `options.tsconfig` is `true`.
140
- *
141
- * @returns an object containing the transformed code, source maps, and any errors
142
- * that occurred during parsing or transformation.
143
- *
144
- * @category Utilities
145
- * @experimental
146
- */
147
- declare function transformSync(filename: string, sourceText: string, options?: TransformOptions | null, cache?: TsconfigCache | null): TransformResult;
148
- //#endregion
149
- export { MinifyOptions as a, minifySync as c, parse as d, parseSync as f, transformSync as i, ParseResult as l, resolveTsconfig as m, TransformResult as n, MinifyResult as o, TsconfigCache as p, transform as r, minify as s, TransformOptions as t, ParserOptions as u };