@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.
- package/dist/cli.cjs +8 -8
- package/dist/cli.mjs +1042 -1083
- package/dist/config.cjs +3 -3
- package/dist/config.d.cts +2 -2
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +4 -5
- package/dist/experimental-index.browser.mjs +3 -3
- package/dist/experimental-index.cjs +3 -3
- package/dist/experimental-index.d.cts +2 -2
- package/dist/experimental-index.d.mts +2 -2
- package/dist/experimental-index.mjs +5 -17
- package/dist/experimental-runtime-types.d.ts +52 -0
- package/dist/filter-index.d.cts +2 -2
- package/dist/filter-index.d.mts +2 -2
- package/dist/filter-index.mjs +1 -2
- package/dist/index.browser.mjs +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -4
- package/dist/parallel-plugin-worker.cjs +2 -2
- package/dist/parallel-plugin-worker.mjs +27 -33
- package/dist/parallel-plugin.d.cts +2 -2
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.cjs +1 -1
- package/dist/parse-ast-index.d.cts +1 -1
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -2
- package/dist/rolldown-binding.wasi-browser.js +4 -2
- package/dist/rolldown-binding.wasi.cjs +3 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-CZdobbZA.d.cts → binding-CWvDTpOw.d.mts} +23 -15
- package/dist/shared/{binding-Dze8QVpf.d.mts → binding-um3VI33z.d.cts} +23 -15
- package/dist/shared/{define-config-CnVvtpOm.d.mts → define-config-DETTMcOl.d.mts} +73 -12
- package/dist/shared/{define-config-BE-fkZNW.d.cts → define-config-POPyhxOq.d.cts} +73 -12
- package/dist/shared/dist-BoWaIc-K.mjs +147 -0
- package/dist/shared/{load-config-CmZwBnZf.mjs → load-config-C0FU-xTD.mjs} +14 -19
- package/dist/shared/{load-config-DlY_Bz-0.cjs → load-config-Cp5Lu-qW.cjs} +1 -1
- package/dist/shared/{parse-ast-index-IepkD-LB.mjs → parse-ast-index-B5AmHtd5.mjs} +10 -28
- package/dist/shared/{parse-ast-index-5MuKtufe.cjs → parse-ast-index-X4pECV1E.cjs} +1 -1
- package/dist/shared/prompt-C5jz26Zn.mjs +852 -0
- package/dist/shared/{prompt-8EeOGx1_.cjs → prompt-QNI93ne7.cjs} +2 -2
- package/dist/shared/{src-Do34b1Pc.mjs → src-CsIMaM6C.mjs} +1157 -1367
- package/dist/shared/{src-CYvvndv2.cjs → src-D8KQ1KMN.cjs} +43 -28
- package/dist/{src-B1yRSHcw.js → src-Bv_xHi2_.js} +43 -28
- package/package.json +3 -2
- package/dist/shared/chunk-DSsiIF1Z.mjs +0 -30
- package/dist/shared/dist-DeDsdiza.mjs +0 -153
- 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.
|
|
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,
|
|
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.
|
|
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 {
|