@rolldown/browser 1.1.2 → 1.1.4
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.mjs +20 -9
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +2 -2
- package/dist/{error-DOcnYe1L.js → error-uXB8-_dW.js} +1 -1
- package/dist/experimental-index.browser.mjs +17 -11
- package/dist/experimental-index.d.mts +15 -5
- package/dist/experimental-index.mjs +17 -11
- package/dist/filter-index.d.mts +1 -1
- package/dist/index.browser.mjs +2 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/parallel-plugin-worker.mjs +4 -3
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/plugins-index.d.mts +3 -3
- package/dist/{resolve-tsconfig-B_KTldgL.js → resolve-tsconfig-CSjtpIN2.js} +1 -1
- package/dist/rolldown-binding.wasi-browser.js +0 -1
- package/dist/rolldown-binding.wasi.cjs +0 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/{rolldown-build-DkMkdHEX.js → rolldown-build-TKZlH-S1.js} +1461 -1462
- package/dist/shared/{binding-dOJO0Ipo.d.mts → binding-DyMVbTi5.d.mts} +0 -26
- package/dist/shared/{bindingify-input-options-CM59dkv7.mjs → bindingify-input-options-DrP86yzF.mjs} +1327 -1328
- package/dist/shared/{constructors-DXDHUcCD.d.mts → constructors-CDyv7p8V.d.mts} +2 -2
- package/dist/shared/{define-config-VyEuugfx.d.mts → define-config-CJihcT25.d.mts} +3 -3
- package/dist/shared/{load-config-ZI8T7gXR.mjs → load-config-CZP4Hm1w.mjs} +1 -1
- package/dist/shared/{parse-DzXgx0D0.mjs → parse-BodSuh47.mjs} +1 -1
- package/dist/shared/{rolldown-DWdNBjur.mjs → rolldown-Bn41UR3A.mjs} +1 -1
- package/dist/shared/{rolldown-build-CNErHQbt.mjs → rolldown-build-DoAvyAYi.mjs} +12 -12
- package/dist/shared/{transform-Wt-zRSFQ.d.mts → transform-DudVZDD5.d.mts} +1 -1
- package/dist/shared/{utils-CuJMMtAZ.d.mts → utils-DLIXIK5m.d.mts} +1 -1
- package/dist/shared/{watch-DNIwEbWZ.mjs → watch-DVVUiYsP.mjs} +2 -2
- package/dist/utils-index.browser.mjs +5 -5
- package/dist/utils-index.d.mts +3 -3
- package/dist/utils-index.mjs +4 -4
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
2
|
-
import { C as version, S as description } from "./shared/bindingify-input-options-
|
|
1
|
+
import { n as onExit, t as watch } from "./shared/watch-DVVUiYsP.mjs";
|
|
2
|
+
import { C as version, S as description } from "./shared/bindingify-input-options-DrP86yzF.mjs";
|
|
3
3
|
import { y as arraify } from "./shared/filter-B_mD-HGz-Cbrk-2bt.mjs";
|
|
4
|
-
import { a as getInputCliKeys, i as getCliSchemaInfo, l as styleText, o as getOutputCliKeys, r as logger, s as validateCliOptions } from "./shared/rolldown-build-
|
|
5
|
-
import { t as rolldown } from "./shared/rolldown-
|
|
6
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
4
|
+
import { a as getInputCliKeys, i as getCliSchemaInfo, l as styleText, o as getOutputCliKeys, r as logger, s as validateCliOptions } from "./shared/rolldown-build-DoAvyAYi.mjs";
|
|
5
|
+
import { t as rolldown } from "./shared/rolldown-Bn41UR3A.mjs";
|
|
6
|
+
import { t as loadConfig } from "./shared/load-config-CZP4Hm1w.mjs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import g$1 from "node:process";
|
|
9
9
|
import { performance } from "node:perf_hooks";
|
|
@@ -736,8 +736,7 @@ const options = Object.fromEntries(Object.entries(schemaInfo).filter(([_key, inf
|
|
|
736
736
|
};
|
|
737
737
|
if (config?.abbreviation) result.short = config.abbreviation;
|
|
738
738
|
if (config?.hint) result.hint = config.hint;
|
|
739
|
-
|
|
740
|
-
return [config?.reverse ? `no-${kebabKey}` : kebabKey, result];
|
|
739
|
+
return [config?.reverse ? `no-${key}` : key, result];
|
|
741
740
|
}));
|
|
742
741
|
const knownKeys = new Set(Object.keys(schemaInfo));
|
|
743
742
|
for (const key of Object.keys(schemaInfo)) {
|
|
@@ -746,6 +745,18 @@ for (const key of Object.keys(schemaInfo)) {
|
|
|
746
745
|
}
|
|
747
746
|
const shortAliases = /* @__PURE__ */ new Set();
|
|
748
747
|
for (const config of Object.values(alias)) if (config?.abbreviation) shortAliases.add(config.abbreviation);
|
|
748
|
+
function kebabToCamelCase(input) {
|
|
749
|
+
return input.replaceAll(/([a-z])-([a-z])/g, (_, p1, p2) => {
|
|
750
|
+
return p1 + p2.toUpperCase();
|
|
751
|
+
});
|
|
752
|
+
}
|
|
753
|
+
function camelizeNestedKeys(value) {
|
|
754
|
+
const result = {};
|
|
755
|
+
for (const [key, nestedValue] of Object.entries(value)) if (Array.isArray(nestedValue)) result[kebabToCamelCase(key)] = nestedValue;
|
|
756
|
+
else if (nestedValue && typeof nestedValue === "object") result[kebabToCamelCase(key)] = camelizeNestedKeys(nestedValue);
|
|
757
|
+
else result[kebabToCamelCase(key)] = nestedValue;
|
|
758
|
+
return result;
|
|
759
|
+
}
|
|
749
760
|
function parseCliArguments() {
|
|
750
761
|
const cli = cac("rolldown");
|
|
751
762
|
for (const [key, info] of Object.entries(schemaInfo)) {
|
|
@@ -790,6 +801,7 @@ function parseCliArguments() {
|
|
|
790
801
|
const single = unknownKeys.length === 1;
|
|
791
802
|
logger.warn(`Option \`${unknownKeys.join(",")}\` ${single ? "is" : "are"} unrecognized. We will ignore ${single ? "this" : "those"} option${single ? "" : "s"}.`);
|
|
792
803
|
}
|
|
804
|
+
parsedOptions = camelizeNestedKeys(parsedOptions);
|
|
793
805
|
const rawArgs = { ...parsedOptions };
|
|
794
806
|
for (const key of unknownKeys) delete parsedOptions[key];
|
|
795
807
|
for (const [key, value] of Object.entries(parsedOptions)) {
|
|
@@ -847,7 +859,7 @@ function getClearScreenFunction(options) {
|
|
|
847
859
|
};
|
|
848
860
|
}
|
|
849
861
|
//#endregion
|
|
850
|
-
//#region \0@oxc-project+runtime@0.
|
|
862
|
+
//#region \0@oxc-project+runtime@0.138.0/helpers/esm/usingCtx.js
|
|
851
863
|
function _usingCtx() {
|
|
852
864
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
853
865
|
var n = Error();
|
|
@@ -1121,7 +1133,6 @@ function generateHelpText() {
|
|
|
1121
1133
|
return a.localeCompare(b);
|
|
1122
1134
|
}).map(([option, { type, short, hint, description }]) => {
|
|
1123
1135
|
let optionStr = ` --${option} `;
|
|
1124
|
-
option = camelCaseToKebabCase(option);
|
|
1125
1136
|
if (short) optionStr += `-${short}, `;
|
|
1126
1137
|
if (type === "string") optionStr += `<${hint ?? option}>`;
|
|
1127
1138
|
if (description && description.length > 0) description = description[0].toUpperCase() + description.slice(1);
|
package/dist/config.d.mts
CHANGED
package/dist/config.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { x as VERSION } from "./shared/bindingify-input-options-
|
|
1
|
+
import { x as VERSION } from "./shared/bindingify-input-options-DrP86yzF.mjs";
|
|
2
2
|
import { t as defineConfig } from "./shared/define-config-Demdg3_4.mjs";
|
|
3
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
3
|
+
import { t as loadConfig } from "./shared/load-config-CZP4Hm1w.mjs";
|
|
4
4
|
export { VERSION, defineConfig, loadConfig };
|
|
@@ -14,7 +14,7 @@ function bindingifySourcemap(map) {
|
|
|
14
14
|
} };
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
17
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.138.0/node_modules/oxc-parser/src-js/wrap.js
|
|
18
18
|
function wrap(result) {
|
|
19
19
|
let program, module, comments, errors;
|
|
20
20
|
return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-A9UIvc9j.js";
|
|
2
|
-
import { a as validateOption, i as transformToRollupOutput, n as createBundlerOptions, o as PluginDriver, t as RolldownBuild } from "./rolldown-build-
|
|
3
|
-
import { a as parse$2, i as unwrapBindingResult, o as parseSync$2, r as normalizeBindingResult } from "./error-
|
|
2
|
+
import { a as validateOption, i as transformToRollupOutput, n as createBundlerOptions, o as PluginDriver, t as RolldownBuild } from "./rolldown-build-TKZlH-S1.js";
|
|
3
|
+
import { a as parse$2, i as unwrapBindingResult, o as parseSync$2, r as normalizeBindingResult } from "./error-uXB8-_dW.js";
|
|
4
4
|
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWebWorkerPostPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./constructors-CnlRXsZI.js";
|
|
5
|
-
import { a as minify$2, i as transformSync$1, n as resolveTsconfig, o as minifySync$2, r as transform$1, t as TsconfigCache$2 } from "./resolve-tsconfig-
|
|
5
|
+
import { a as minify$2, i as transformSync$1, n as resolveTsconfig, o as minifySync$2, r as transform$1, t as TsconfigCache$2 } from "./resolve-tsconfig-CSjtpIN2.js";
|
|
6
6
|
import * as binding from "./rolldown-binding.wasi-browser.js";
|
|
7
7
|
import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
8
8
|
//#region src/api/dev/dev-engine.ts
|
|
@@ -26,15 +26,20 @@ var DevEngine = class DevEngine {
|
|
|
26
26
|
});
|
|
27
27
|
} : void 0;
|
|
28
28
|
const userOnOutput = devOptions.onOutput;
|
|
29
|
+
const bindingOnOutput = userOnOutput ? function(rawResult) {
|
|
30
|
+
const result = normalizeBindingResult(rawResult);
|
|
31
|
+
if (result instanceof Error) {
|
|
32
|
+
userOnOutput(result);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
userOnOutput(transformToRollupOutput(result));
|
|
36
|
+
} : void 0;
|
|
37
|
+
const userOnAdditionalAssets = devOptions.onAdditionalAssets;
|
|
29
38
|
const bindingDevOptions = {
|
|
30
39
|
onHmrUpdates: bindingOnHmrUpdates,
|
|
31
|
-
onOutput:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
userOnOutput(result);
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
userOnOutput(transformToRollupOutput(result));
|
|
40
|
+
onOutput: bindingOnOutput,
|
|
41
|
+
onAdditionalAssets: userOnAdditionalAssets ? function(output) {
|
|
42
|
+
userOnAdditionalAssets(transformToRollupOutput(output));
|
|
38
43
|
} : void 0,
|
|
39
44
|
rebuildStrategy: devOptions.rebuildStrategy ? devOptions.rebuildStrategy === "always" ? BindingRebuildStrategy$1.Always : devOptions.rebuildStrategy === "auto" ? BindingRebuildStrategy$1.Auto : BindingRebuildStrategy$1.Never : void 0,
|
|
40
45
|
watch: devOptions.watch && {
|
|
@@ -49,7 +54,8 @@ var DevEngine = class DevEngine {
|
|
|
49
54
|
exclude: normalizedStringOrRegex(devOptions.watch.exclude)
|
|
50
55
|
}
|
|
51
56
|
};
|
|
52
|
-
|
|
57
|
+
const inner = new BindingDevEngine(options.bundlerOptions, bindingDevOptions);
|
|
58
|
+
return new DevEngine(inner);
|
|
53
59
|
}
|
|
54
60
|
constructor(inner) {
|
|
55
61
|
this.#inner = inner;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { B as ResolveResult, C as BindingViteManifestPluginConfig, G as isolatedDeclaration, I as NapiResolveOptions, K as isolatedDeclarationSync, M as IsolatedDeclarationsResult, O as BindingViteTransformPluginConfig, V as ResolverFactory, _ as BindingTsconfigRawOptions, f as BindingRebuildStrategy, g as BindingTsconfigCompilerOptions, i as BindingClientHmrUpdate, j as IsolatedDeclarationsOptions, n as BindingBundleAnalyzerPluginConfig, q as moduleRunnerTransform, r as BindingBundleState } from "./shared/binding-
|
|
2
|
-
import { fn as RolldownOutput, kt as NormalizedOutputOptions, l as InputOptions, mn as freeExternalMemory, on as OutputOptions, vt as defineParallelPlugin } from "./shared/define-config-
|
|
3
|
-
import { s as StringOrRegExp, t as BuiltinPlugin } from "./shared/utils-
|
|
4
|
-
import { a as MinifyOptions$1, c as minifySync$1, d as parse$1, f as parseSync$1, i as transformSync$1, l as ParseResult$1, m as resolveTsconfig, n as TransformResult$1, o as MinifyResult$1, p as TsconfigCache$1, r as transform$1, s as minify$1, t as TransformOptions$1, u as ParserOptions$1 } from "./shared/transform-
|
|
5
|
-
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWebWorkerPostPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-
|
|
1
|
+
import { B as ResolveResult, C as BindingViteManifestPluginConfig, G as isolatedDeclaration, I as NapiResolveOptions, K as isolatedDeclarationSync, M as IsolatedDeclarationsResult, O as BindingViteTransformPluginConfig, V as ResolverFactory, _ as BindingTsconfigRawOptions, f as BindingRebuildStrategy, g as BindingTsconfigCompilerOptions, i as BindingClientHmrUpdate, j as IsolatedDeclarationsOptions, n as BindingBundleAnalyzerPluginConfig, q as moduleRunnerTransform, r as BindingBundleState } from "./shared/binding-DyMVbTi5.mjs";
|
|
2
|
+
import { fn as RolldownOutput, kt as NormalizedOutputOptions, l as InputOptions, mn as freeExternalMemory, on as OutputOptions, vt as defineParallelPlugin } from "./shared/define-config-CJihcT25.mjs";
|
|
3
|
+
import { s as StringOrRegExp, t as BuiltinPlugin } from "./shared/utils-DLIXIK5m.mjs";
|
|
4
|
+
import { a as MinifyOptions$1, c as minifySync$1, d as parse$1, f as parseSync$1, i as transformSync$1, l as ParseResult$1, m as resolveTsconfig, n as TransformResult$1, o as MinifyResult$1, p as TsconfigCache$1, r as transform$1, s as minify$1, t as TransformOptions$1, u as ParserOptions$1 } from "./shared/transform-DudVZDD5.mjs";
|
|
5
|
+
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWebWorkerPostPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-CDyv7p8V.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/api/dev/dev-options.d.ts
|
|
8
8
|
type DevOnHmrUpdates = (result: Error | {
|
|
@@ -10,6 +10,7 @@ type DevOnHmrUpdates = (result: Error | {
|
|
|
10
10
|
changedFiles: string[];
|
|
11
11
|
}) => void | Promise<void>;
|
|
12
12
|
type DevOnOutput = (result: Error | RolldownOutput) => void | Promise<void>;
|
|
13
|
+
type DevOnAdditionalAssets = (output: RolldownOutput) => void | Promise<void>;
|
|
13
14
|
interface DevWatchOptions {
|
|
14
15
|
/**
|
|
15
16
|
* If `true`, files are not written to disk.
|
|
@@ -70,6 +71,15 @@ interface DevOptions {
|
|
|
70
71
|
onHmrUpdates?: DevOnHmrUpdates;
|
|
71
72
|
onOutput?: DevOnOutput;
|
|
72
73
|
/**
|
|
74
|
+
* Called with assets emitted while generating an HMR patch or compiling a
|
|
75
|
+
* lazy entry (e.g. an image newly imported by the changed/lazy module).
|
|
76
|
+
*
|
|
77
|
+
* These never go through {@link onOutput}, so a consumer that serves built
|
|
78
|
+
* files (e.g. Vite's bundled dev server) must register this to receive them
|
|
79
|
+
* and write them to its in-memory file store before the client requests them.
|
|
80
|
+
*/
|
|
81
|
+
onAdditionalAssets?: DevOnAdditionalAssets;
|
|
82
|
+
/**
|
|
73
83
|
* Strategy for triggering rebuilds after HMR updates.
|
|
74
84
|
* - `'always'`: Always trigger a rebuild after HMR updates
|
|
75
85
|
* - `'auto'`: Trigger rebuild only if HMR updates contain full reload updates
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-CHVaSqeF.mjs";
|
|
2
|
-
import { o as transformToRollupOutput } from "./shared/bindingify-input-options-
|
|
3
|
-
import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-
|
|
2
|
+
import { o as transformToRollupOutput } from "./shared/bindingify-input-options-DrP86yzF.mjs";
|
|
3
|
+
import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-DoAvyAYi.mjs";
|
|
4
4
|
import { i as unwrapBindingResult, r as normalizeBindingResult } from "./shared/error-B5cMIevi.mjs";
|
|
5
|
-
import { n as parseSync$2, t as parse$2 } from "./shared/parse-
|
|
5
|
+
import { n as parseSync$2, t as parse$2 } from "./shared/parse-BodSuh47.mjs";
|
|
6
6
|
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWebWorkerPostPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-CAjrhG6p.mjs";
|
|
7
7
|
import { a as minify$2, i as transformSync$1, n as resolveTsconfig, o as minifySync$2, r as transform$1, t as TsconfigCache$2 } from "./shared/resolve-tsconfig-DsK7KzKK.mjs";
|
|
8
8
|
import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi.cjs";
|
|
@@ -28,15 +28,20 @@ var DevEngine = class DevEngine {
|
|
|
28
28
|
});
|
|
29
29
|
} : void 0;
|
|
30
30
|
const userOnOutput = devOptions.onOutput;
|
|
31
|
+
const bindingOnOutput = userOnOutput ? function(rawResult) {
|
|
32
|
+
const result = normalizeBindingResult(rawResult);
|
|
33
|
+
if (result instanceof Error) {
|
|
34
|
+
userOnOutput(result);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
userOnOutput(transformToRollupOutput(result));
|
|
38
|
+
} : void 0;
|
|
39
|
+
const userOnAdditionalAssets = devOptions.onAdditionalAssets;
|
|
31
40
|
const bindingDevOptions = {
|
|
32
41
|
onHmrUpdates: bindingOnHmrUpdates,
|
|
33
|
-
onOutput:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
userOnOutput(result);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
userOnOutput(transformToRollupOutput(result));
|
|
42
|
+
onOutput: bindingOnOutput,
|
|
43
|
+
onAdditionalAssets: userOnAdditionalAssets ? function(output) {
|
|
44
|
+
userOnAdditionalAssets(transformToRollupOutput(output));
|
|
40
45
|
} : void 0,
|
|
41
46
|
rebuildStrategy: devOptions.rebuildStrategy ? devOptions.rebuildStrategy === "always" ? BindingRebuildStrategy$1.Always : devOptions.rebuildStrategy === "auto" ? BindingRebuildStrategy$1.Auto : BindingRebuildStrategy$1.Never : void 0,
|
|
42
47
|
watch: devOptions.watch && {
|
|
@@ -51,7 +56,8 @@ var DevEngine = class DevEngine {
|
|
|
51
56
|
exclude: normalizedStringOrRegex(devOptions.watch.exclude)
|
|
52
57
|
}
|
|
53
58
|
};
|
|
54
|
-
|
|
59
|
+
const inner = new BindingDevEngine(options.bundlerOptions, bindingDevOptions);
|
|
60
|
+
return new DevEngine(inner);
|
|
55
61
|
}
|
|
56
62
|
constructor(inner) {
|
|
57
63
|
this.#inner = inner;
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as prefixRegex, B as exactRegex, F as FilterExpressionKind, G as importerId, H as exprInterpreter, I as QueryFilterObject, J as interpreterImpl, K as include, L as TopLevelFilterExpression, N as withFilter, P as FilterExpression, Q as or, R as and, U as filterVitePlugins, V as exclude, W as id, X as moduleType, Y as makeIdFiltersToMatchWithQuery, Z as not, et as queries, q as interpreter, tt as query, z as code } from "./shared/define-config-
|
|
1
|
+
import { $ as prefixRegex, B as exactRegex, F as FilterExpressionKind, G as importerId, H as exprInterpreter, I as QueryFilterObject, J as interpreterImpl, K as include, L as TopLevelFilterExpression, N as withFilter, P as FilterExpression, Q as or, R as and, U as filterVitePlugins, V as exclude, W as id, X as moduleType, Y as makeIdFiltersToMatchWithQuery, Z as not, et as queries, q as interpreter, tt as query, z as code } from "./shared/define-config-CJihcT25.mjs";
|
|
2
2
|
export { FilterExpression, FilterExpressionKind, QueryFilterObject, TopLevelFilterExpression, and, code, exactRegex, exclude, exprInterpreter, filterVitePlugins, id, importerId, include, interpreter, interpreterImpl, makeIdFiltersToMatchWithQuery, moduleType, not, or, prefixRegex, queries, query, withFilter };
|
package/dist/index.browser.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as logMultipleWatcherOption } from "./normalize-string-or-regex-A9UIvc9j.js";
|
|
2
|
-
import { a as validateOption, c as arraify, l as RUNTIME_MODULE_ID, n as createBundlerOptions, o as PluginDriver, r as RolldownMagicString, s as LOG_LEVEL_WARN, t as RolldownBuild, u as VERSION } from "./rolldown-build-
|
|
3
|
-
import { t as aggregateBindingErrorsIntoJsError } from "./error-
|
|
2
|
+
import { a as validateOption, c as arraify, l as RUNTIME_MODULE_ID, n as createBundlerOptions, o as PluginDriver, r as RolldownMagicString, s as LOG_LEVEL_WARN, t as RolldownBuild, u as VERSION } from "./rolldown-build-TKZlH-S1.js";
|
|
3
|
+
import { t as aggregateBindingErrorsIntoJsError } from "./error-uXB8-_dW.js";
|
|
4
4
|
import { BindingWatcher, shutdownAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
5
5
|
//#region src/api/rolldown/index.ts
|
|
6
6
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z as PreRenderedChunk } from "./shared/binding-
|
|
1
|
+
import { z as PreRenderedChunk } from "./shared/binding-DyMVbTi5.mjs";
|
|
2
2
|
import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-BSNejiLS.mjs";
|
|
3
|
-
import { $t as CodeSplittingOptions, A as RolldownPluginOption, At as NormalizedInputOptions, Bt as WatchOptions, C as ParallelPluginHooks, Ct as ModuleTypeFilter, D as ResolveIdResult, Dt as RolldownFsModule, E as ResolveIdExtraOptions, Et as RolldownFileStats, Ft as RolldownMagicString, Gt as AddonFunction, Ht as RolldownBuild, It as watch, Jt as BuiltinModuleTag, Kt as AdvancedChunksGroup, Lt as RolldownWatcher, M as TransformResult, Mt as ChecksOptions, Nt as LoggingFunction, O as ResolvedId, Ot as InternalModuleFormat, Pt as WarningHandlerWithDefault, Qt as CodeSplittingNameFunction, Rt as RolldownWatcherEvent, S as ObjectHook, St as HookFilter, T as Plugin, Tt as RolldownDirectoryEntry, Ut as BuildOptions, Vt as rolldown, Wt as build, Xt as ChunkingContext, Yt as ChunkFileNamesFunction, Zt as CodeSplittingGroup, _ as HookFilterExtension, _t as DefineParallelPluginResult, a as ChunkOptimizationOptions, an as ModuleFormat, at as ExistingRawSourceMap, b as ModuleOptions, bt as PluginContextMeta, c as InputOption, cn as OutputAsset, ct as TreeshakingOptions, d as OptimizationOptions, dn as RenderedModule, dt as EmittedChunk, en as CommentsOptions, f as WatcherFileWatcherOptions, fn as RolldownOutput, ft as EmittedFile, g as FunctionPluginHooks, gn as SourcemapIgnoreListOption, gt as PluginContextResolveOptions, h as CustomPluginOptions, hn as ModuleInfo, ht as PluginContext, i as RolldownOptions, in as MinifyOptions, it as BundleError, j as SourceDescription, jt as TransformOptions, k as RolldownPlugin, kt as NormalizedOutputOptions, l as InputOptions, ln as OutputChunk, lt as TransformPluginContext, m as AsyncPluginHooks, mt as GetModuleInfo, n as RolldownOptionsFunction, nn as GeneratedCodePreset, nt as RUNTIME_MODULE_ID, o as ExternalOption, on as OutputOptions, ot as SourceMapInput, p as WatcherOptions, pn as SourceMap, pt as EmittedPrebuiltChunk, qt as AdvancedChunksOptions, r as defineConfig, rn as GlobalsFunction, rt as VERSION, s as ExternalOptionFunction, sn as PreRenderedAsset, st as OutputBundle, t as ConfigExport, tn as GeneratedCodeOptions, u as ModuleTypes, un as RenderedChunk, ut as EmittedAsset, v as ImportKind, w as PartialResolvedId, wt as BufferEncoding, x as ModuleType, xt as GeneralHookFilter, y as LoadResult, yt as MinimalPluginContext, zt as RolldownWatcherWatcherEventMap } from "./shared/define-config-
|
|
4
|
-
import { o as PartialNull } from "./shared/utils-
|
|
3
|
+
import { $t as CodeSplittingOptions, A as RolldownPluginOption, At as NormalizedInputOptions, Bt as WatchOptions, C as ParallelPluginHooks, Ct as ModuleTypeFilter, D as ResolveIdResult, Dt as RolldownFsModule, E as ResolveIdExtraOptions, Et as RolldownFileStats, Ft as RolldownMagicString, Gt as AddonFunction, Ht as RolldownBuild, It as watch, Jt as BuiltinModuleTag, Kt as AdvancedChunksGroup, Lt as RolldownWatcher, M as TransformResult, Mt as ChecksOptions, Nt as LoggingFunction, O as ResolvedId, Ot as InternalModuleFormat, Pt as WarningHandlerWithDefault, Qt as CodeSplittingNameFunction, Rt as RolldownWatcherEvent, S as ObjectHook, St as HookFilter, T as Plugin, Tt as RolldownDirectoryEntry, Ut as BuildOptions, Vt as rolldown, Wt as build, Xt as ChunkingContext, Yt as ChunkFileNamesFunction, Zt as CodeSplittingGroup, _ as HookFilterExtension, _t as DefineParallelPluginResult, a as ChunkOptimizationOptions, an as ModuleFormat, at as ExistingRawSourceMap, b as ModuleOptions, bt as PluginContextMeta, c as InputOption, cn as OutputAsset, ct as TreeshakingOptions, d as OptimizationOptions, dn as RenderedModule, dt as EmittedChunk, en as CommentsOptions, f as WatcherFileWatcherOptions, fn as RolldownOutput, ft as EmittedFile, g as FunctionPluginHooks, gn as SourcemapIgnoreListOption, gt as PluginContextResolveOptions, h as CustomPluginOptions, hn as ModuleInfo, ht as PluginContext, i as RolldownOptions, in as MinifyOptions, it as BundleError, j as SourceDescription, jt as TransformOptions, k as RolldownPlugin, kt as NormalizedOutputOptions, l as InputOptions, ln as OutputChunk, lt as TransformPluginContext, m as AsyncPluginHooks, mt as GetModuleInfo, n as RolldownOptionsFunction, nn as GeneratedCodePreset, nt as RUNTIME_MODULE_ID, o as ExternalOption, on as OutputOptions, ot as SourceMapInput, p as WatcherOptions, pn as SourceMap, pt as EmittedPrebuiltChunk, qt as AdvancedChunksOptions, r as defineConfig, rn as GlobalsFunction, rt as VERSION, s as ExternalOptionFunction, sn as PreRenderedAsset, st as OutputBundle, t as ConfigExport, tn as GeneratedCodeOptions, u as ModuleTypes, un as RenderedChunk, ut as EmittedAsset, v as ImportKind, w as PartialResolvedId, wt as BufferEncoding, x as ModuleType, xt as GeneralHookFilter, y as LoadResult, yt as MinimalPluginContext, zt as RolldownWatcherWatcherEventMap } from "./shared/define-config-CJihcT25.mjs";
|
|
4
|
+
import { o as PartialNull } from "./shared/utils-DLIXIK5m.mjs";
|
|
5
5
|
export { type AddonFunction, type AdvancedChunksGroup, type AdvancedChunksOptions, type AsyncPluginHooks, type BufferEncoding, type BuildOptions, type BuiltinModuleTag, type BundleError, type ChecksOptions, type ChunkFileNamesFunction, type ChunkOptimizationOptions, type ChunkingContext, type CodeSplittingGroup, type CodeSplittingNameFunction, type CodeSplittingOptions, type CommentsOptions, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedChunk, type EmittedFile, type EmittedPrebuiltChunk, type ExistingRawSourceMap, type ExternalOption, type ExternalOptionFunction, type FunctionPluginHooks, type GeneralHookFilter, type GeneratedCodeOptions, type GeneratedCodePreset, type GetModuleInfo, type GlobalsFunction, type HookFilter, type HookFilterExtension, type ImportKind, type InputOption, type InputOptions, type InternalModuleFormat, type LoadResult, type LogLevel, type LogLevelOption, type LogOrStringHandler, type LoggingFunction, type MinifyOptions, type MinimalPluginContext, type ModuleFormat, type ModuleInfo, type ModuleOptions, type ModuleType, type ModuleTypeFilter, type ModuleTypes, type NormalizedInputOptions, type NormalizedOutputOptions, type ObjectHook, type OptimizationOptions, type OutputAsset, type OutputBundle, type OutputChunk, type OutputOptions, type ParallelPluginHooks, type PartialNull, type PartialResolvedId, type Plugin, type PluginContext, type PluginContextMeta, type PluginContextResolveOptions, type PreRenderedAsset, type PreRenderedChunk, RUNTIME_MODULE_ID, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownError, type RolldownError as RollupError, type RolldownFileStats, type RolldownFsModule, type RolldownLog, type RolldownLog as RollupLog, type RolldownLogWithString, type RolldownLogWithString as RollupLogWithString, RolldownMagicString, type RolldownOptions, type RolldownOptionsFunction, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RolldownWatcherWatcherEventMap, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, type TransformOptions, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherFileWatcherOptions, type WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
2
|
-
import {
|
|
3
|
-
import { t as rolldown } from "./shared/rolldown-
|
|
1
|
+
import { n as onExit, t as watch } from "./shared/watch-DVVUiYsP.mjs";
|
|
2
|
+
import { b as RUNTIME_MODULE_ID, r as RolldownMagicString, x as VERSION } from "./shared/bindingify-input-options-DrP86yzF.mjs";
|
|
3
|
+
import { t as rolldown } from "./shared/rolldown-Bn41UR3A.mjs";
|
|
4
4
|
import { t as defineConfig } from "./shared/define-config-Demdg3_4.mjs";
|
|
5
5
|
import { isMainThread } from "node:worker_threads";
|
|
6
6
|
import { initTraceSubscriber } from "./rolldown-binding.wasi.cjs";
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as PluginContextData, n as bindingifyPlugin } from "./shared/bindingify-input-options-DrP86yzF.mjs";
|
|
2
2
|
import { parentPort, workerData } from "node:worker_threads";
|
|
3
3
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
4
4
|
//#region src/parallel-plugin-worker.ts
|
|
5
5
|
const { registryId, pluginInfos, threadNumber } = workerData;
|
|
6
6
|
(async () => {
|
|
7
7
|
try {
|
|
8
|
-
|
|
8
|
+
const plugins = await Promise.all(pluginInfos.map(async (pluginInfo) => {
|
|
9
9
|
const definePluginImpl = (await import(pluginInfo.fileUrl)).default;
|
|
10
10
|
const plugin = await definePluginImpl(pluginInfo.options, { threadNumber });
|
|
11
11
|
return {
|
|
12
12
|
index: pluginInfo.index,
|
|
13
13
|
plugin: bindingifyPlugin(plugin, {}, {}, new PluginContextData(() => {}, {}, [], []), [], () => {}, "info", false)
|
|
14
14
|
};
|
|
15
|
-
}))
|
|
15
|
+
}));
|
|
16
|
+
registerPlugins(registryId, plugins);
|
|
16
17
|
parentPort.postMessage({ type: "success" });
|
|
17
18
|
} catch (error) {
|
|
18
19
|
parentPort.postMessage({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Plugin } from "./shared/define-config-
|
|
2
|
-
import { i as MaybePromise } from "./shared/utils-
|
|
1
|
+
import { T as Plugin } from "./shared/define-config-CJihcT25.mjs";
|
|
2
|
+
import { i as MaybePromise } from "./shared/utils-DLIXIK5m.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
package/dist/parse-ast-index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { l as locate, n as error, s as logParseError, t as augmentCodeLocation, u as getCodeFrame } from "./shared/logs-aMKUxRpj.mjs";
|
|
2
|
-
import { n as parseSync, t as parse } from "./shared/parse-
|
|
2
|
+
import { n as parseSync, t as parse } from "./shared/parse-BodSuh47.mjs";
|
|
3
3
|
//#region src/parse-ast-index.ts
|
|
4
4
|
function wrap(result, filename, sourceText) {
|
|
5
5
|
if (result.errors.length > 0) return normalizeParseError(filename, sourceText, result.errors);
|
package/dist/plugins-index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as BindingReplacePluginConfig } from "./shared/binding-
|
|
2
|
-
import { t as BuiltinPlugin } from "./shared/utils-
|
|
3
|
-
import { t as esmExternalRequirePlugin } from "./shared/constructors-
|
|
1
|
+
import { m as BindingReplacePluginConfig } from "./shared/binding-DyMVbTi5.mjs";
|
|
2
|
+
import { t as BuiltinPlugin } from "./shared/utils-DLIXIK5m.mjs";
|
|
3
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-CDyv7p8V.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/builtin-plugin/replace-plugin.d.ts
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as normalizeBindingError, s as bindingifySourcemap } from "./error-
|
|
1
|
+
import { n as normalizeBindingError, s as bindingifySourcemap } from "./error-uXB8-_dW.js";
|
|
2
2
|
import { TsconfigCache, collapseSourcemaps, enhancedTransform, enhancedTransformSync, minify, minifySync, resolveTsconfig } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
//#region src/utils/minify.ts
|
|
4
4
|
/**
|
|
@@ -116,7 +116,6 @@ export const BindingWatcherBundler = __napiModule.exports.BindingWatcherBundler
|
|
|
116
116
|
export const BindingWatcherChangeData = __napiModule.exports.BindingWatcherChangeData
|
|
117
117
|
export const BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
118
118
|
export const ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
|
|
119
|
-
export const ScheduledBuild = __napiModule.exports.ScheduledBuild
|
|
120
119
|
export const TraceSubscriberGuard = __napiModule.exports.TraceSubscriberGuard
|
|
121
120
|
export const TsconfigCache = __napiModule.exports.TsconfigCache
|
|
122
121
|
export const BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
|
|
@@ -155,7 +155,6 @@ module.exports.BindingWatcherBundler = __napiModule.exports.BindingWatcherBundle
|
|
|
155
155
|
module.exports.BindingWatcherChangeData = __napiModule.exports.BindingWatcherChangeData
|
|
156
156
|
module.exports.BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent
|
|
157
157
|
module.exports.ParallelJsPluginRegistry = __napiModule.exports.ParallelJsPluginRegistry
|
|
158
|
-
module.exports.ScheduledBuild = __napiModule.exports.ScheduledBuild
|
|
159
158
|
module.exports.TraceSubscriberGuard = __napiModule.exports.TraceSubscriberGuard
|
|
160
159
|
module.exports.TsconfigCache = __napiModule.exports.TsconfigCache
|
|
161
160
|
module.exports.BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo
|
|
Binary file
|