rolldown 1.0.0-beta.55 → 1.0.0-beta.57
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/README.md +11 -0
- package/dist/cli-setup.mjs +1 -1
- package/dist/cli.mjs +8 -8
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +7 -7
- package/dist/experimental-index.d.mts +30 -3
- package/dist/experimental-index.mjs +50 -22
- package/dist/experimental-runtime-types.d.ts +1 -1
- package/dist/filter-index.d.mts +4 -4
- package/dist/filter-index.mjs +327 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +7 -7
- package/dist/parallel-plugin-worker.mjs +4 -4
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +2 -2
- package/dist/plugins-index.d.mts +3 -3
- package/dist/plugins-index.mjs +3 -3
- package/dist/shared/{binding-r9j8jqRV.d.mts → binding-CDyF6W3D.d.mts} +13 -10
- package/dist/shared/{binding-DMnPPQ90.mjs → binding-Cuiiq-jL.mjs} +26 -26
- package/dist/shared/{bindingify-input-options-A-rLIOKA.mjs → bindingify-input-options-B8B4dvr-.mjs} +34 -6
- package/dist/shared/{constructors-DO8UjlE5.d.mts → constructors-BnPlw43Q.d.mts} +2 -2
- package/dist/shared/{constructors-BGI2r6Tk.mjs → constructors-CxTKGwaB.mjs} +1 -1
- package/dist/shared/{define-config-MdVaFcie.d.mts → define-config-kYHtCO-M.d.mts} +10 -4
- package/dist/shared/{load-config-DnirbDRj.mjs → load-config-BvbZUaFt.mjs} +1 -1
- package/dist/shared/{logs-sGci9sux.mjs → logs-Up1RAnkl.mjs} +4 -2
- package/dist/shared/{normalize-string-or-regex-B4d0IHth.mjs → normalize-string-or-regex-0t36Z7KW.mjs} +3 -3
- package/dist/shared/{parse-ast-index-CoZSRGeP.mjs → parse-ast-index-Bcjhsr8U.mjs} +11 -8
- package/dist/shared/{rolldown-BTFK71hw.mjs → rolldown-CF29fS6Z.mjs} +1 -1
- package/dist/shared/{rolldown-build-CNW2eye_.mjs → rolldown-build--qygLwCL.mjs} +8 -7
- package/dist/shared/{watch-CKam-d6K.mjs → watch-CyvuFK7g.mjs} +5 -5
- package/package.json +18 -18
package/dist/parse-ast-index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { n as parseAstAsync, t as parseAst } from "./shared/parse-ast-index-
|
|
1
|
+
import "./shared/binding-Cuiiq-jL.mjs";
|
|
2
|
+
import { n as parseAstAsync, t as parseAst } from "./shared/parse-ast-index-Bcjhsr8U.mjs";
|
|
3
3
|
|
|
4
4
|
export { parseAst, parseAstAsync };
|
package/dist/plugins-index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { u as BindingReplacePluginConfig } from "./shared/binding-
|
|
2
|
-
import { A as BuiltinPlugin } from "./shared/define-config-
|
|
3
|
-
import { t as esmExternalRequirePlugin } from "./shared/constructors-
|
|
1
|
+
import { u as BindingReplacePluginConfig } from "./shared/binding-CDyF6W3D.mjs";
|
|
2
|
+
import { A as BuiltinPlugin } from "./shared/define-config-kYHtCO-M.mjs";
|
|
3
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-BnPlw43Q.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/builtin-plugin/replace-plugin.d.ts
|
|
6
6
|
|
package/dist/plugins-index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { n as BuiltinPlugin, s as makeBuiltinPluginCallable } from "./shared/normalize-string-or-regex-
|
|
3
|
-
import { t as esmExternalRequirePlugin } from "./shared/constructors-
|
|
1
|
+
import "./shared/binding-Cuiiq-jL.mjs";
|
|
2
|
+
import { n as BuiltinPlugin, s as makeBuiltinPluginCallable } from "./shared/normalize-string-or-regex-0t36Z7KW.mjs";
|
|
3
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-CxTKGwaB.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
6
6
|
/**
|
|
@@ -409,7 +409,11 @@ declare class ResolverFactory {
|
|
|
409
409
|
static default(): ResolverFactory;
|
|
410
410
|
/** Clone the resolver using the same underlying cache. */
|
|
411
411
|
cloneWithOptions(options: NapiResolveOptions): ResolverFactory;
|
|
412
|
-
/**
|
|
412
|
+
/**
|
|
413
|
+
* Clear the underlying cache.
|
|
414
|
+
*
|
|
415
|
+
* Warning: The caller must ensure that there're no ongoing resolution operations when calling this method. Otherwise, it may cause those operations to return an incorrect result.
|
|
416
|
+
*/
|
|
413
417
|
clearCache(): void;
|
|
414
418
|
/** Synchronously resolve `specifier` at an absolute path to a `directory`. */
|
|
415
419
|
sync(directory: string, request: string): ResolveResult;
|
|
@@ -1450,6 +1454,13 @@ interface BindingJsonSourcemap {
|
|
|
1450
1454
|
debugId?: string;
|
|
1451
1455
|
x_google_ignoreList?: Array<number>;
|
|
1452
1456
|
}
|
|
1457
|
+
interface BindingLogLocation {
|
|
1458
|
+
/** 1-based */
|
|
1459
|
+
line: number;
|
|
1460
|
+
/** 0-based position in the line in UTF-16 code units */
|
|
1461
|
+
column: number;
|
|
1462
|
+
file?: string;
|
|
1463
|
+
}
|
|
1453
1464
|
interface BindingModulePreloadOptions {
|
|
1454
1465
|
polyfill: boolean;
|
|
1455
1466
|
resolveDependencies?: (filename: string, deps: string[], context: {
|
|
@@ -1696,18 +1707,10 @@ interface NativeError {
|
|
|
1696
1707
|
/** The exporter associated with the error (for import/export errors) */
|
|
1697
1708
|
exporter?: string;
|
|
1698
1709
|
/** Location information (line, column, file) */
|
|
1699
|
-
loc?:
|
|
1710
|
+
loc?: BindingLogLocation;
|
|
1700
1711
|
/** Position in the source file in UTF-16 code units */
|
|
1701
1712
|
pos?: number;
|
|
1702
1713
|
}
|
|
1703
|
-
/** Location information for errors */
|
|
1704
|
-
interface NativeErrorLocation {
|
|
1705
|
-
/** 1-based */
|
|
1706
|
-
line: number;
|
|
1707
|
-
/** 0-based position in the line in UTF-16 code units */
|
|
1708
|
-
column: number;
|
|
1709
|
-
file?: string;
|
|
1710
|
-
}
|
|
1711
1714
|
interface PreRenderedChunk {
|
|
1712
1715
|
name: string;
|
|
1713
1716
|
isEntry: boolean;
|
|
@@ -110,7 +110,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
110
110
|
try {
|
|
111
111
|
const binding = __require("@rolldown/binding-android-arm64");
|
|
112
112
|
const bindingPackageVersion = __require("@rolldown/binding-android-arm64/package.json").version;
|
|
113
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
113
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
114
114
|
return binding;
|
|
115
115
|
} catch (e) {
|
|
116
116
|
loadErrors.push(e);
|
|
@@ -124,7 +124,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
124
124
|
try {
|
|
125
125
|
const binding = __require("@rolldown/binding-android-arm-eabi");
|
|
126
126
|
const bindingPackageVersion = __require("@rolldown/binding-android-arm-eabi/package.json").version;
|
|
127
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
127
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
128
128
|
return binding;
|
|
129
129
|
} catch (e) {
|
|
130
130
|
loadErrors.push(e);
|
|
@@ -139,7 +139,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
139
139
|
try {
|
|
140
140
|
const binding = __require("@rolldown/binding-win32-x64-gnu");
|
|
141
141
|
const bindingPackageVersion = __require("@rolldown/binding-win32-x64-gnu/package.json").version;
|
|
142
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
142
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
143
143
|
return binding;
|
|
144
144
|
} catch (e) {
|
|
145
145
|
loadErrors.push(e);
|
|
@@ -153,7 +153,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
153
153
|
try {
|
|
154
154
|
const binding = __require("@rolldown/binding-win32-x64-msvc");
|
|
155
155
|
const bindingPackageVersion = __require("@rolldown/binding-win32-x64-msvc/package.json").version;
|
|
156
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
156
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
157
157
|
return binding;
|
|
158
158
|
} catch (e) {
|
|
159
159
|
loadErrors.push(e);
|
|
@@ -168,7 +168,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
168
168
|
try {
|
|
169
169
|
const binding = __require("@rolldown/binding-win32-ia32-msvc");
|
|
170
170
|
const bindingPackageVersion = __require("@rolldown/binding-win32-ia32-msvc/package.json").version;
|
|
171
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
171
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
172
172
|
return binding;
|
|
173
173
|
} catch (e) {
|
|
174
174
|
loadErrors.push(e);
|
|
@@ -182,7 +182,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
182
182
|
try {
|
|
183
183
|
const binding = __require("@rolldown/binding-win32-arm64-msvc");
|
|
184
184
|
const bindingPackageVersion = __require("@rolldown/binding-win32-arm64-msvc/package.json").version;
|
|
185
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
185
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
186
186
|
return binding;
|
|
187
187
|
} catch (e) {
|
|
188
188
|
loadErrors.push(e);
|
|
@@ -197,7 +197,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
197
197
|
try {
|
|
198
198
|
const binding = __require("@rolldown/binding-darwin-universal");
|
|
199
199
|
const bindingPackageVersion = __require("@rolldown/binding-darwin-universal/package.json").version;
|
|
200
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
200
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
201
201
|
return binding;
|
|
202
202
|
} catch (e) {
|
|
203
203
|
loadErrors.push(e);
|
|
@@ -211,7 +211,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
211
211
|
try {
|
|
212
212
|
const binding = __require("@rolldown/binding-darwin-x64");
|
|
213
213
|
const bindingPackageVersion = __require("@rolldown/binding-darwin-x64/package.json").version;
|
|
214
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
214
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
215
215
|
return binding;
|
|
216
216
|
} catch (e) {
|
|
217
217
|
loadErrors.push(e);
|
|
@@ -225,7 +225,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
225
225
|
try {
|
|
226
226
|
const binding = __require("@rolldown/binding-darwin-arm64");
|
|
227
227
|
const bindingPackageVersion = __require("@rolldown/binding-darwin-arm64/package.json").version;
|
|
228
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
228
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
229
229
|
return binding;
|
|
230
230
|
} catch (e) {
|
|
231
231
|
loadErrors.push(e);
|
|
@@ -240,7 +240,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
240
240
|
try {
|
|
241
241
|
const binding = __require("@rolldown/binding-freebsd-x64");
|
|
242
242
|
const bindingPackageVersion = __require("@rolldown/binding-freebsd-x64/package.json").version;
|
|
243
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
243
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
244
244
|
return binding;
|
|
245
245
|
} catch (e) {
|
|
246
246
|
loadErrors.push(e);
|
|
@@ -254,7 +254,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
254
254
|
try {
|
|
255
255
|
const binding = __require("@rolldown/binding-freebsd-arm64");
|
|
256
256
|
const bindingPackageVersion = __require("@rolldown/binding-freebsd-arm64/package.json").version;
|
|
257
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
257
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
258
258
|
return binding;
|
|
259
259
|
} catch (e) {
|
|
260
260
|
loadErrors.push(e);
|
|
@@ -269,7 +269,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
269
269
|
try {
|
|
270
270
|
const binding = __require("@rolldown/binding-linux-x64-musl");
|
|
271
271
|
const bindingPackageVersion = __require("@rolldown/binding-linux-x64-musl/package.json").version;
|
|
272
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
272
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
273
273
|
return binding;
|
|
274
274
|
} catch (e) {
|
|
275
275
|
loadErrors.push(e);
|
|
@@ -283,7 +283,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
283
283
|
try {
|
|
284
284
|
const binding = __require("@rolldown/binding-linux-x64-gnu");
|
|
285
285
|
const bindingPackageVersion = __require("@rolldown/binding-linux-x64-gnu/package.json").version;
|
|
286
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
286
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
287
287
|
return binding;
|
|
288
288
|
} catch (e) {
|
|
289
289
|
loadErrors.push(e);
|
|
@@ -298,7 +298,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
298
298
|
try {
|
|
299
299
|
const binding = __require("@rolldown/binding-linux-arm64-musl");
|
|
300
300
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm64-musl/package.json").version;
|
|
301
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
301
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
302
302
|
return binding;
|
|
303
303
|
} catch (e) {
|
|
304
304
|
loadErrors.push(e);
|
|
@@ -312,7 +312,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
312
312
|
try {
|
|
313
313
|
const binding = __require("@rolldown/binding-linux-arm64-gnu");
|
|
314
314
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm64-gnu/package.json").version;
|
|
315
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
315
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
316
316
|
return binding;
|
|
317
317
|
} catch (e) {
|
|
318
318
|
loadErrors.push(e);
|
|
@@ -327,7 +327,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
327
327
|
try {
|
|
328
328
|
const binding = __require("@rolldown/binding-linux-arm-musleabihf");
|
|
329
329
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm-musleabihf/package.json").version;
|
|
330
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
330
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
331
331
|
return binding;
|
|
332
332
|
} catch (e) {
|
|
333
333
|
loadErrors.push(e);
|
|
@@ -341,7 +341,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
341
341
|
try {
|
|
342
342
|
const binding = __require("@rolldown/binding-linux-arm-gnueabihf");
|
|
343
343
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm-gnueabihf/package.json").version;
|
|
344
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
344
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
345
345
|
return binding;
|
|
346
346
|
} catch (e) {
|
|
347
347
|
loadErrors.push(e);
|
|
@@ -356,7 +356,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
356
356
|
try {
|
|
357
357
|
const binding = __require("@rolldown/binding-linux-loong64-musl");
|
|
358
358
|
const bindingPackageVersion = __require("@rolldown/binding-linux-loong64-musl/package.json").version;
|
|
359
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
359
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
360
360
|
return binding;
|
|
361
361
|
} catch (e) {
|
|
362
362
|
loadErrors.push(e);
|
|
@@ -370,7 +370,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
370
370
|
try {
|
|
371
371
|
const binding = __require("@rolldown/binding-linux-loong64-gnu");
|
|
372
372
|
const bindingPackageVersion = __require("@rolldown/binding-linux-loong64-gnu/package.json").version;
|
|
373
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
373
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
374
374
|
return binding;
|
|
375
375
|
} catch (e) {
|
|
376
376
|
loadErrors.push(e);
|
|
@@ -385,7 +385,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
385
385
|
try {
|
|
386
386
|
const binding = __require("@rolldown/binding-linux-riscv64-musl");
|
|
387
387
|
const bindingPackageVersion = __require("@rolldown/binding-linux-riscv64-musl/package.json").version;
|
|
388
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
388
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
389
389
|
return binding;
|
|
390
390
|
} catch (e) {
|
|
391
391
|
loadErrors.push(e);
|
|
@@ -399,7 +399,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
399
399
|
try {
|
|
400
400
|
const binding = __require("@rolldown/binding-linux-riscv64-gnu");
|
|
401
401
|
const bindingPackageVersion = __require("@rolldown/binding-linux-riscv64-gnu/package.json").version;
|
|
402
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
402
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
403
403
|
return binding;
|
|
404
404
|
} catch (e) {
|
|
405
405
|
loadErrors.push(e);
|
|
@@ -414,7 +414,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
414
414
|
try {
|
|
415
415
|
const binding = __require("@rolldown/binding-linux-ppc64-gnu");
|
|
416
416
|
const bindingPackageVersion = __require("@rolldown/binding-linux-ppc64-gnu/package.json").version;
|
|
417
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
417
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
418
418
|
return binding;
|
|
419
419
|
} catch (e) {
|
|
420
420
|
loadErrors.push(e);
|
|
@@ -428,7 +428,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
428
428
|
try {
|
|
429
429
|
const binding = __require("@rolldown/binding-linux-s390x-gnu");
|
|
430
430
|
const bindingPackageVersion = __require("@rolldown/binding-linux-s390x-gnu/package.json").version;
|
|
431
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
431
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
432
432
|
return binding;
|
|
433
433
|
} catch (e) {
|
|
434
434
|
loadErrors.push(e);
|
|
@@ -443,7 +443,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
443
443
|
try {
|
|
444
444
|
const binding = __require("@rolldown/binding-openharmony-arm64");
|
|
445
445
|
const bindingPackageVersion = __require("@rolldown/binding-openharmony-arm64/package.json").version;
|
|
446
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
446
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
447
447
|
return binding;
|
|
448
448
|
} catch (e) {
|
|
449
449
|
loadErrors.push(e);
|
|
@@ -457,7 +457,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
457
457
|
try {
|
|
458
458
|
const binding = __require("@rolldown/binding-openharmony-x64");
|
|
459
459
|
const bindingPackageVersion = __require("@rolldown/binding-openharmony-x64/package.json").version;
|
|
460
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
460
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
461
461
|
return binding;
|
|
462
462
|
} catch (e) {
|
|
463
463
|
loadErrors.push(e);
|
|
@@ -471,7 +471,7 @@ var require_binding = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
471
471
|
try {
|
|
472
472
|
const binding = __require("@rolldown/binding-openharmony-arm");
|
|
473
473
|
const bindingPackageVersion = __require("@rolldown/binding-openharmony-arm/package.json").version;
|
|
474
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
474
|
+
if (bindingPackageVersion !== "1.0.0-beta.57" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.57 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
475
475
|
return binding;
|
|
476
476
|
} catch (e) {
|
|
477
477
|
loadErrors.push(e);
|
package/dist/shared/{bindingify-input-options-A-rLIOKA.mjs → bindingify-input-options-B8B4dvr-.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./binding-
|
|
2
|
-
import { c as logPluginError, n as error, r as logCycleLoading, t as augmentCodeLocation } from "./logs-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./binding-Cuiiq-jL.mjs";
|
|
2
|
+
import { c as logPluginError, n as error, r as logCycleLoading, t as augmentCodeLocation } from "./logs-Up1RAnkl.mjs";
|
|
3
3
|
import { a as unreachable, o as unsupported, t as arraify } from "./misc-DpjTMcQQ.mjs";
|
|
4
|
-
import { E as LOG_LEVEL_WARN, S as normalizeLog, _ as PlainObjectLike, a as bindingifyManifestPlugin, c as collectChangedBundle, d as bindingifySourcemap, f as transformRenderedChunk, g as lazyProp, i as bindingifyCSSPostPlugin, l as transformToOutputBundle, m as bindingAssetSource, n as BuiltinPlugin, o as bindingifyViteHtmlPlugin, p as __decorate, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex, v as MinimalPluginContextImpl } from "./normalize-string-or-regex-
|
|
5
|
-
import { t as parseAst } from "./parse-ast-index-
|
|
4
|
+
import { E as LOG_LEVEL_WARN, S as normalizeLog, _ as PlainObjectLike, a as bindingifyManifestPlugin, c as collectChangedBundle, d as bindingifySourcemap, f as transformRenderedChunk, g as lazyProp, i as bindingifyCSSPostPlugin, l as transformToOutputBundle, m as bindingAssetSource, n as BuiltinPlugin, o as bindingifyViteHtmlPlugin, p as __decorate, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex, v as MinimalPluginContextImpl } from "./normalize-string-or-regex-0t36Z7KW.mjs";
|
|
5
|
+
import { t as parseAst } from "./parse-ast-index-Bcjhsr8U.mjs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import * as filter from "@rolldown/pluginutils";
|
|
8
8
|
import fsp from "node:fs/promises";
|
|
@@ -208,6 +208,20 @@ function bindingifyFilterExpr(expr) {
|
|
|
208
208
|
bindingifyFilterExprImpl(expr, list);
|
|
209
209
|
return list;
|
|
210
210
|
}
|
|
211
|
+
function containsImporterId(expr) {
|
|
212
|
+
switch (expr.kind) {
|
|
213
|
+
case "and":
|
|
214
|
+
case "or": return expr.args.some(containsImporterId);
|
|
215
|
+
case "not":
|
|
216
|
+
case "include":
|
|
217
|
+
case "exclude": return containsImporterId(expr.expr);
|
|
218
|
+
case "importerId": return true;
|
|
219
|
+
default: return false;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
function assertNoImporterId(filterExprs, hookName) {
|
|
223
|
+
if (filterExprs?.some(containsImporterId)) throw new Error(`The \`importerId\` filter can only be used with the \`resolveId\` hook, but it was used with the \`${hookName}\` hook.`);
|
|
224
|
+
}
|
|
211
225
|
function bindingifyFilterExprImpl(expr, list) {
|
|
212
226
|
switch (expr.kind) {
|
|
213
227
|
case "and": {
|
|
@@ -239,6 +253,13 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
239
253
|
});
|
|
240
254
|
if (expr.params.cleanUrl) list.push({ kind: "CleanUrl" });
|
|
241
255
|
break;
|
|
256
|
+
case "importerId":
|
|
257
|
+
list.push({
|
|
258
|
+
kind: "ImporterId",
|
|
259
|
+
payload: expr.pattern
|
|
260
|
+
});
|
|
261
|
+
if (expr.params.cleanUrl) list.push({ kind: "CleanUrl" });
|
|
262
|
+
break;
|
|
242
263
|
case "moduleType":
|
|
243
264
|
list.push({
|
|
244
265
|
kind: "ModuleType",
|
|
@@ -279,19 +300,26 @@ function bindingifyResolveIdFilter(filterOption) {
|
|
|
279
300
|
}
|
|
280
301
|
function bindingifyLoadFilter(filterOption) {
|
|
281
302
|
if (!filterOption) return;
|
|
282
|
-
if (Array.isArray(filterOption))
|
|
303
|
+
if (Array.isArray(filterOption)) {
|
|
304
|
+
assertNoImporterId(filterOption, "load");
|
|
305
|
+
return { value: filterOption.map(bindingifyFilterExpr) };
|
|
306
|
+
}
|
|
283
307
|
return filterOption.id ? bindingifyGeneralHookFilter("id", filterOption.id) : void 0;
|
|
284
308
|
}
|
|
285
309
|
function bindingifyTransformFilter(filterOption) {
|
|
286
310
|
if (!filterOption) return;
|
|
287
311
|
let filterExprs = transformFilterMatcherToFilterExprs(filterOption);
|
|
312
|
+
assertNoImporterId(filterExprs, "transform");
|
|
288
313
|
let ret = [];
|
|
289
314
|
if (filterExprs) ret = filterExprs.map(bindingifyFilterExpr);
|
|
290
315
|
return { value: ret.length > 0 ? ret : void 0 };
|
|
291
316
|
}
|
|
292
317
|
function bindingifyRenderChunkFilter(filterOption) {
|
|
293
318
|
if (!filterOption) return;
|
|
294
|
-
if (Array.isArray(filterOption))
|
|
319
|
+
if (Array.isArray(filterOption)) {
|
|
320
|
+
assertNoImporterId(filterOption, "renderChunk");
|
|
321
|
+
return { value: filterOption.map(bindingifyFilterExpr) };
|
|
322
|
+
}
|
|
295
323
|
return filterOption.code ? bindingifyGeneralHookFilter("code", filterOption.code) : void 0;
|
|
296
324
|
}
|
|
297
325
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as BindingViteResolvePluginConfig, E as BindingViteReporterPluginConfig, S as BindingViteJsonPluginConfig, T as BindingViteReactRefreshWrapperPluginConfig, h as BindingViteBuildImportAnalysisPluginConfig, i as BindingEsmExternalRequirePluginConfig, k as BindingViteWasmHelperPluginConfig, o as BindingIsolatedDeclarationPluginConfig, p as BindingViteAssetImportMetaUrlPluginConfig, v as BindingViteDynamicImportVarsPluginConfig, w as BindingViteModulePreloadPolyfillPluginConfig, x as BindingViteImportGlobPluginConfig, y as BindingViteHtmlInlineProxyPluginConfig } from "./binding-
|
|
2
|
-
import { A as BuiltinPlugin, Tt as StringOrRegExp } from "./define-config-
|
|
1
|
+
import { D as BindingViteResolvePluginConfig, E as BindingViteReporterPluginConfig, S as BindingViteJsonPluginConfig, T as BindingViteReactRefreshWrapperPluginConfig, h as BindingViteBuildImportAnalysisPluginConfig, i as BindingEsmExternalRequirePluginConfig, k as BindingViteWasmHelperPluginConfig, o as BindingIsolatedDeclarationPluginConfig, p as BindingViteAssetImportMetaUrlPluginConfig, v as BindingViteDynamicImportVarsPluginConfig, w as BindingViteModulePreloadPolyfillPluginConfig, x as BindingViteImportGlobPluginConfig, y as BindingViteHtmlInlineProxyPluginConfig } from "./binding-CDyF6W3D.mjs";
|
|
2
|
+
import { A as BuiltinPlugin, Tt as StringOrRegExp } from "./define-config-kYHtCO-M.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/builtin-plugin/constructors.d.ts
|
|
5
5
|
declare function viteModulePreloadPolyfillPlugin(config?: BindingViteModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as BuiltinPlugin, s as makeBuiltinPluginCallable, t as normalizedStringOrRegex } from "./normalize-string-or-regex-
|
|
1
|
+
import { n as BuiltinPlugin, s as makeBuiltinPluginCallable, t as normalizedStringOrRegex } from "./normalize-string-or-regex-0t36Z7KW.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/builtin-plugin/constructors.ts
|
|
4
4
|
function viteModulePreloadPolyfillPlugin(config) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as RollupLog, i as RollupError, n as LogLevelOption, o as RollupLogWithString, r as LogOrStringHandler, t as LogLevel } from "./logging-BpAvp7KV.mjs";
|
|
2
|
-
import { A as BindingWatcherBundler, B as ParserOptions, F as JsxOptions, I as MinifyOptions$1, M as ExternalMemoryStatus, V as PreRenderedChunk, W as TransformOptions$1, a as BindingHookResolveIdExtraArgs, d as BindingTransformHookExtraArgs, j as BindingWatcherEvent, l as BindingRenderedChunk, s as BindingMagicString, t as BindingBuiltinPluginName } from "./binding-
|
|
2
|
+
import { A as BindingWatcherBundler, B as ParserOptions, F as JsxOptions, I as MinifyOptions$1, M as ExternalMemoryStatus, V as PreRenderedChunk, W as TransformOptions$1, a as BindingHookResolveIdExtraArgs, d as BindingTransformHookExtraArgs, j as BindingWatcherEvent, l as BindingRenderedChunk, s as BindingMagicString, t as BindingBuiltinPluginName } from "./binding-CDyF6W3D.mjs";
|
|
3
3
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
import { Program } from "@oxc-project/types";
|
|
5
5
|
|
|
@@ -1130,7 +1130,7 @@ type PluginHooks = { [K in keyof FunctionPluginHooks]: ObjectHook<K extends Asyn
|
|
|
1130
1130
|
} : {})> };
|
|
1131
1131
|
type AddonHookFunction = (this: PluginContext, chunk: RenderedChunk) => string | Promise<string>;
|
|
1132
1132
|
type AddonHook = string | AddonHookFunction;
|
|
1133
|
-
interface OutputPlugin extends Partial<{ [K in OutputPluginHooks]: PluginHooks[K] }>, Partial<{ [K in AddonHooks]: ObjectHook<AddonHook> }> {
|
|
1133
|
+
interface OutputPlugin extends Partial<{ [K in keyof PluginHooks as K & OutputPluginHooks]: PluginHooks[K] }>, Partial<{ [K in AddonHooks]: ObjectHook<AddonHook> }> {
|
|
1134
1134
|
name: string;
|
|
1135
1135
|
}
|
|
1136
1136
|
interface Plugin<A = any> extends OutputPlugin, Partial<PluginHooks> {
|
|
@@ -1168,10 +1168,10 @@ interface ChecksOptions {
|
|
|
1168
1168
|
*/
|
|
1169
1169
|
missingNameOptionForIifeExport?: boolean;
|
|
1170
1170
|
/**
|
|
1171
|
-
* Whether to emit warning when detecting mixed
|
|
1171
|
+
* Whether to emit warning when detecting mixed exports
|
|
1172
1172
|
* @default true
|
|
1173
1173
|
*/
|
|
1174
|
-
|
|
1174
|
+
mixedExports?: boolean;
|
|
1175
1175
|
/**
|
|
1176
1176
|
* Whether to emit warning when detecting unresolved entry
|
|
1177
1177
|
* @default true
|
|
@@ -1203,6 +1203,11 @@ interface ChecksOptions {
|
|
|
1203
1203
|
*/
|
|
1204
1204
|
emptyImportMeta?: boolean;
|
|
1205
1205
|
/**
|
|
1206
|
+
* Whether to emit warning when detecting cannot call namespace
|
|
1207
|
+
* @default true
|
|
1208
|
+
*/
|
|
1209
|
+
cannotCallNamespace?: boolean;
|
|
1210
|
+
/**
|
|
1206
1211
|
* Whether to emit warning when detecting configuration field conflict
|
|
1207
1212
|
* @default true
|
|
1208
1213
|
*/
|
|
@@ -1352,6 +1357,7 @@ type DevModeOptions = boolean | {
|
|
|
1352
1357
|
host?: string;
|
|
1353
1358
|
port?: number;
|
|
1354
1359
|
implement?: string;
|
|
1360
|
+
lazy?: boolean;
|
|
1355
1361
|
};
|
|
1356
1362
|
type OptimizationOptions = {
|
|
1357
1363
|
/**
|
|
@@ -100,10 +100,12 @@ function locate(source, search, options) {
|
|
|
100
100
|
//#endregion
|
|
101
101
|
//#region src/log/logs.ts
|
|
102
102
|
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", NO_FS_IN_BROWSER = "NO_FS_IN_BROWSER";
|
|
103
|
-
function logParseError(message) {
|
|
103
|
+
function logParseError(message, id, pos) {
|
|
104
104
|
return {
|
|
105
105
|
code: PARSE_ERROR,
|
|
106
|
-
|
|
106
|
+
id,
|
|
107
|
+
message,
|
|
108
|
+
pos
|
|
107
109
|
};
|
|
108
110
|
}
|
|
109
111
|
function logInvalidLogPosition(pluginName) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./binding-
|
|
2
|
-
import { a as logInvalidLogPosition, c as logPluginError, n as error } from "./logs-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./binding-Cuiiq-jL.mjs";
|
|
2
|
+
import { a as logInvalidLogPosition, c as logPluginError, n as error } from "./logs-Up1RAnkl.mjs";
|
|
3
3
|
import { r as noop } from "./misc-DpjTMcQQ.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/log/logging.ts
|
|
@@ -32,7 +32,7 @@ function getLogHandler(level, code, logger, pluginName, logLevel) {
|
|
|
32
32
|
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region package.json
|
|
35
|
-
var version = "1.0.0-beta.
|
|
35
|
+
var version = "1.0.0-beta.57";
|
|
36
36
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
37
37
|
|
|
38
38
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./binding-
|
|
2
|
-
import { l as locate, n as error, s as logParseError, u as getCodeFrame } from "./logs-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./binding-Cuiiq-jL.mjs";
|
|
2
|
+
import { l as locate, n as error, s as logParseError, t as augmentCodeLocation, u as getCodeFrame } from "./logs-Up1RAnkl.mjs";
|
|
3
3
|
|
|
4
4
|
//#region ../../node_modules/.pnpm/oxc-parser@0.103.0/node_modules/oxc-parser/src-js/wrap.js
|
|
5
5
|
function wrap$1(result) {
|
|
@@ -55,12 +55,13 @@ function parseSync(filename, sourceText, options) {
|
|
|
55
55
|
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/parse-ast-index.ts
|
|
58
|
-
function wrap(result, sourceText) {
|
|
59
|
-
if (result.errors.length > 0) return normalizeParseError(sourceText, result.errors);
|
|
58
|
+
function wrap(result, filename, sourceText) {
|
|
59
|
+
if (result.errors.length > 0) return normalizeParseError(filename, sourceText, result.errors);
|
|
60
60
|
return result.program;
|
|
61
61
|
}
|
|
62
|
-
function normalizeParseError(sourceText, errors) {
|
|
62
|
+
function normalizeParseError(filename, sourceText, errors) {
|
|
63
63
|
let message = `Parse failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
|
|
64
|
+
const pos = errors[0]?.labels?.[0]?.start;
|
|
64
65
|
for (let i = 0; i < errors.length; i++) {
|
|
65
66
|
if (i >= 5) {
|
|
66
67
|
message += "\n...";
|
|
@@ -73,7 +74,9 @@ function normalizeParseError(sourceText, errors) {
|
|
|
73
74
|
return getCodeFrame(sourceText, location.line, location.column);
|
|
74
75
|
}).filter(Boolean).join("\n");
|
|
75
76
|
}
|
|
76
|
-
|
|
77
|
+
const log = logParseError(message, filename, pos);
|
|
78
|
+
if (pos !== void 0 && filename) augmentCodeLocation(log, pos, sourceText, filename);
|
|
79
|
+
return error(log);
|
|
77
80
|
}
|
|
78
81
|
const defaultParserOptions = {
|
|
79
82
|
lang: "js",
|
|
@@ -83,13 +86,13 @@ function parseAst(sourceText, options, filename) {
|
|
|
83
86
|
return wrap(parseSync(filename ?? "file.js", sourceText, {
|
|
84
87
|
...defaultParserOptions,
|
|
85
88
|
...options
|
|
86
|
-
}), sourceText);
|
|
89
|
+
}), filename, sourceText);
|
|
87
90
|
}
|
|
88
91
|
async function parseAstAsync(sourceText, options, filename) {
|
|
89
92
|
return wrap(await parse(filename ?? "file.js", sourceText, {
|
|
90
93
|
...defaultParserOptions,
|
|
91
94
|
...options
|
|
92
|
-
}), sourceText);
|
|
95
|
+
}), filename, sourceText);
|
|
93
96
|
}
|
|
94
97
|
|
|
95
98
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as PluginDriver, s as validateOption, t as RolldownBuild } from "./rolldown-build
|
|
1
|
+
import { l as PluginDriver, s as validateOption, t as RolldownBuild } from "./rolldown-build--qygLwCL.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/api/rolldown/index.ts
|
|
4
4
|
const rolldown = async (input) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as __toESM, t as require_binding } from "./binding-
|
|
2
|
-
import { i as logInputHookInOutputPlugin, n as error } from "./logs-
|
|
1
|
+
import { n as __toESM, t as require_binding } from "./binding-Cuiiq-jL.mjs";
|
|
2
|
+
import { i as logInputHookInOutputPlugin, n as error } from "./logs-Up1RAnkl.mjs";
|
|
3
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-
|
|
5
|
-
import { c as normalizeHook, i as transformModuleInfo, s as unwrapBindingResult, t as bindingifyInputOptions } from "./bindingify-input-options-
|
|
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-0t36Z7KW.mjs";
|
|
5
|
+
import { c as normalizeHook, i as transformModuleInfo, s as unwrapBindingResult, t as bindingifyInputOptions } from "./bindingify-input-options-B8B4dvr-.mjs";
|
|
6
6
|
import { Worker } from "node:worker_threads";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import { styleText } from "node:util";
|
|
@@ -1607,13 +1607,14 @@ const ChecksOptionsSchema = strictObject({
|
|
|
1607
1607
|
eval: pipe(optional(boolean()), description("Whether to emit warning when detecting eval")),
|
|
1608
1608
|
missingGlobalName: pipe(optional(boolean()), description("Whether to emit warning when detecting missing global name")),
|
|
1609
1609
|
missingNameOptionForIifeExport: pipe(optional(boolean()), description("Whether to emit warning when detecting missing name option for iife export")),
|
|
1610
|
-
|
|
1610
|
+
mixedExports: pipe(optional(boolean()), description("Whether to emit warning when detecting mixed exports")),
|
|
1611
1611
|
unresolvedEntry: pipe(optional(boolean()), description("Whether to emit warning when detecting unresolved entry")),
|
|
1612
1612
|
unresolvedImport: pipe(optional(boolean()), description("Whether to emit warning when detecting unresolved import")),
|
|
1613
1613
|
filenameConflict: pipe(optional(boolean()), description("Whether to emit warning when detecting filename conflict")),
|
|
1614
1614
|
commonJsVariableInEsm: pipe(optional(boolean()), description("Whether to emit warning when detecting common js variable in esm")),
|
|
1615
1615
|
importIsUndefined: pipe(optional(boolean()), description("Whether to emit warning when detecting import is undefined")),
|
|
1616
1616
|
emptyImportMeta: pipe(optional(boolean()), description("Whether to emit warning when detecting empty import meta")),
|
|
1617
|
+
cannotCallNamespace: pipe(optional(boolean()), description("Whether to emit warning when detecting cannot call namespace")),
|
|
1617
1618
|
configurationFieldConflict: pipe(optional(boolean()), description("Whether to emit warning when detecting configuration field conflict")),
|
|
1618
1619
|
preferBuiltinFeature: pipe(optional(boolean()), description("Whether to emit warning when detecting prefer builtin feature")),
|
|
1619
1620
|
couldNotCleanDirectory: pipe(optional(boolean()), description("Whether to emit warning when detecting could not clean directory")),
|
|
@@ -1697,10 +1698,10 @@ const OnLogSchema = pipe(vFunction(), args(tuple([
|
|
|
1697
1698
|
])));
|
|
1698
1699
|
const OnwarnSchema = pipe(vFunction(), args(tuple([RollupLogSchema, pipe(vFunction(), args(tuple([union([RollupLogWithStringSchema, pipe(vFunction(), returns(RollupLogWithStringSchema))])])))])));
|
|
1699
1700
|
const DevModeSchema = union([boolean(), strictObject({
|
|
1700
|
-
new: optional(boolean()),
|
|
1701
1701
|
port: optional(number()),
|
|
1702
1702
|
host: optional(string()),
|
|
1703
|
-
implement: optional(string())
|
|
1703
|
+
implement: optional(string()),
|
|
1704
|
+
lazy: optional(boolean())
|
|
1704
1705
|
})]);
|
|
1705
1706
|
const InputOptionsSchema = strictObject({
|
|
1706
1707
|
input: optional(InputOptionSchema),
|