@rolldown/browser 1.0.0-rc.9 → 1.0.0
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 +207 -72
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +2 -7
- package/dist/{constructors-BgL_dmUe.js → constructors-BXVEHwHm.js} +8 -2
- package/dist/{error-DkAP_6fk.js → error-DMfKBGWU.js} +1 -1
- package/dist/experimental-index.browser.mjs +10 -10
- package/dist/experimental-index.d.mts +17 -19
- package/dist/experimental-index.mjs +11 -11
- package/dist/experimental-runtime-types.d.ts +14 -5
- package/dist/filter-index.d.mts +1 -1
- package/dist/index.browser.mjs +4 -4
- package/dist/index.d.mts +4 -3
- package/dist/index.mjs +4 -8
- package/dist/{normalize-string-or-regex-TtAGUp42.js → normalize-string-or-regex-CBPw_c5O.js} +21 -11
- package/dist/parallel-plugin-worker.mjs +1 -4
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +1 -2
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/plugins-index.browser.mjs +2 -2
- package/dist/plugins-index.d.mts +3 -3
- package/dist/plugins-index.mjs +2 -2
- package/dist/{transform-UkHb5h4g.js → resolve-tsconfig-eqfrsvjc.js} +28 -5
- package/dist/rolldown-binding.wasi-browser.js +6 -0
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/{rolldown-build-sRmdtwRU.js → rolldown-build-CKS7EawU.js} +211 -197
- package/dist/shared/binding-CaVxb0SV.d.mts +3198 -0
- package/dist/shared/{bindingify-input-options-Cfptl9gw.mjs → bindingify-input-options-CboGFdC4.mjs} +125 -57
- package/dist/shared/{constructors-C1tQjDsj.d.mts → constructors-B1JYJxhf.d.mts} +7 -3
- package/dist/shared/{constructors-C7Kkidxk.mjs → constructors-DO36gIcC.mjs} +8 -2
- package/dist/shared/{define-config-B1J71V4c.d.mts → define-config-Bah0mfyR.d.mts} +81 -29
- package/dist/shared/{load-config-B6MMusXN.mjs → load-config-BwBgui4p.mjs} +1 -1
- package/dist/shared/{normalize-string-or-regex-CF3Uz6aU.mjs → normalize-string-or-regex-Dq6w-2tU.mjs} +21 -11
- package/dist/shared/{parse-DDUnGYGU.mjs → parse-Lc1YQk0q.mjs} +1 -1
- package/dist/shared/{prompt-BYQIwEjg.mjs → prompt-U5ajztzG.mjs} +4 -2
- package/dist/shared/{transform-B_n5An0U.mjs → resolve-tsconfig-Cwoo4h_o.mjs} +27 -4
- package/dist/shared/{rolldown-BDqeiCX1.mjs → rolldown-WowDTCZP.mjs} +1 -1
- package/dist/shared/{rolldown-build-DZ7tJkeQ.mjs → rolldown-build-DIb-iqkO.mjs} +89 -143
- package/dist/shared/{transform-BSAGL1b_.d.mts → transform-kP3ISMFT.d.mts} +30 -13
- package/dist/shared/{utils-6wxe_LMG.d.mts → utils-KRVeJqya.d.mts} +1 -1
- package/dist/shared/{watch-Cj4uDLQX.mjs → watch-B81_EvN-.mjs} +2 -2
- package/dist/utils-index.browser.mjs +5 -5
- package/dist/utils-index.d.mts +4 -4
- package/dist/utils-index.mjs +5 -6
- package/dist/wasi-worker-browser.mjs +8 -0
- package/package.json +4 -2
- package/dist/shared/types-Cx3HYorz.d.mts +0 -1302
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import { BindingBundleState, BindingClientHmrUpdate as BindingClientHmrUpdate$1 } from "../../binding.cjs";
|
|
7
|
-
import { BindingClientHmrUpdate, BindingRebuildStrategy, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions as ResolveOptions, ResolveResult, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, resolveTsconfig } from "./binding.cjs";
|
|
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-CaVxb0SV.mjs";
|
|
2
|
+
import { c as InputOptions, cn as freeExternalMemory, en as OutputOptions, on as RolldownOutput, pt as defineParallelPlugin, wt as NormalizedOutputOptions } from "./shared/define-config-Bah0mfyR.mjs";
|
|
3
|
+
import { t as BuiltinPlugin } from "./shared/utils-KRVeJqya.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-kP3ISMFT.mjs";
|
|
5
|
+
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-B1JYJxhf.mjs";
|
|
8
6
|
|
|
9
7
|
//#region src/api/dev/dev-options.d.ts
|
|
10
8
|
type DevOnHmrUpdates = (result: Error | {
|
|
11
|
-
updates: BindingClientHmrUpdate
|
|
9
|
+
updates: BindingClientHmrUpdate[];
|
|
12
10
|
changedFiles: string[];
|
|
13
11
|
}) => void | Promise<void>;
|
|
14
12
|
type DevOnOutput = (result: Error | RolldownOutput) => void | Promise<void>;
|
|
@@ -75,7 +73,7 @@ declare class DevEngine {
|
|
|
75
73
|
ensureCurrentBuildFinish(): Promise<void>;
|
|
76
74
|
getBundleState(): Promise<BindingBundleState>;
|
|
77
75
|
ensureLatestBuildOutput(): Promise<void>;
|
|
78
|
-
invalidate(file: string, firstInvalidatedBy?: string): Promise<BindingClientHmrUpdate
|
|
76
|
+
invalidate(file: string, firstInvalidatedBy?: string): Promise<BindingClientHmrUpdate[]>;
|
|
79
77
|
registerModules(clientId: string, modules: string[]): Promise<void>;
|
|
80
78
|
removeClient(clientId: string): Promise<void>;
|
|
81
79
|
close(): Promise<void>;
|
|
@@ -161,11 +159,11 @@ declare function viteAliasPlugin(config: ViteAliasPluginConfig): BuiltinPlugin;
|
|
|
161
159
|
* @example
|
|
162
160
|
* **LLM-friendly markdown output**
|
|
163
161
|
* ```js
|
|
164
|
-
* import {
|
|
162
|
+
* import { bundleAnalyzerPlugin } from 'rolldown/experimental';
|
|
165
163
|
*
|
|
166
164
|
* export default {
|
|
167
165
|
* plugins: [
|
|
168
|
-
*
|
|
166
|
+
* bundleAnalyzerPlugin({
|
|
169
167
|
* format: 'md'
|
|
170
168
|
* })
|
|
171
169
|
* ]
|
|
@@ -227,30 +225,30 @@ declare const parse: typeof parse$1;
|
|
|
227
225
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
228
226
|
declare const parseSync: typeof parseSync$1;
|
|
229
227
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
230
|
-
type ParseResult = ParseResult$
|
|
228
|
+
type ParseResult = ParseResult$1;
|
|
231
229
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
232
|
-
type ParserOptions = ParserOptions$
|
|
230
|
+
type ParserOptions = ParserOptions$1;
|
|
233
231
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
234
232
|
declare const minify: typeof minify$1;
|
|
235
233
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
236
234
|
declare const minifySync: typeof minifySync$1;
|
|
237
235
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
238
|
-
type MinifyOptions = MinifyOptions$
|
|
236
|
+
type MinifyOptions = MinifyOptions$1;
|
|
239
237
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
240
|
-
type MinifyResult = MinifyResult$
|
|
238
|
+
type MinifyResult = MinifyResult$1;
|
|
241
239
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
242
240
|
declare const transform: typeof transform$1;
|
|
243
241
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
244
242
|
declare const transformSync: typeof transformSync$1;
|
|
245
243
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
246
|
-
type TransformOptions = TransformOptions$
|
|
244
|
+
type TransformOptions = TransformOptions$1;
|
|
247
245
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
248
246
|
type TransformResult = TransformResult$1;
|
|
249
247
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
250
248
|
declare const TsconfigCache: typeof TsconfigCache$1;
|
|
251
249
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
252
|
-
type TsconfigRawOptions =
|
|
250
|
+
type TsconfigRawOptions = BindingTsconfigRawOptions;
|
|
253
251
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
254
|
-
type TsconfigCompilerOptions =
|
|
252
|
+
type TsconfigCompilerOptions = BindingTsconfigCompilerOptions;
|
|
255
253
|
//#endregion
|
|
256
|
-
export { type BindingClientHmrUpdate, BindingRebuildStrategy, DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, MinifyOptions, MinifyResult, ParseResult, ParserOptions, type ResolveOptions, type ResolveResult, ResolverFactory, TransformOptions, TransformResult, TsconfigCache, TsconfigCompilerOptions, TsconfigRawOptions, bundleAnalyzerPlugin, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, parse, parseSync, resolveTsconfig, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWebWorkerPostPlugin };
|
|
254
|
+
export { type BindingClientHmrUpdate, BindingRebuildStrategy, DevEngine, type DevOptions, type DevWatchOptions, type IsolatedDeclarationsOptions, type IsolatedDeclarationsResult, MinifyOptions, MinifyResult, ParseResult, ParserOptions, type NapiResolveOptions as ResolveOptions, type ResolveResult, ResolverFactory, TransformOptions, TransformResult, TsconfigCache, TsconfigCompilerOptions, TsconfigRawOptions, bundleAnalyzerPlugin, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, oxcRuntimePlugin, parse, parseSync, resolveTsconfig, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWebWorkerPostPlugin };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-
|
|
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-
|
|
1
|
+
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-Dq6w-2tU.mjs";
|
|
2
|
+
import { o as transformToRollupOutput } from "./shared/bindingify-input-options-CboGFdC4.mjs";
|
|
3
|
+
import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-DIb-iqkO.mjs";
|
|
4
4
|
import { i as unwrapBindingResult, r as normalizeBindingResult } from "./shared/error-CQ6njWsV.mjs";
|
|
5
|
-
import { n as parseSync$2, t as parse$2 } from "./shared/parse-
|
|
6
|
-
import { a as
|
|
7
|
-
import { a as
|
|
8
|
-
import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform,
|
|
5
|
+
import { n as parseSync$2, t as parse$2 } from "./shared/parse-Lc1YQk0q.mjs";
|
|
6
|
+
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-DO36gIcC.mjs";
|
|
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-Cwoo4h_o.mjs";
|
|
8
|
+
import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi.cjs";
|
|
9
9
|
import { pathToFileURL } from "node:url";
|
|
10
10
|
//#region src/api/dev/dev-engine.ts
|
|
11
11
|
var DevEngine = class DevEngine {
|
|
@@ -235,11 +235,11 @@ function viteAliasPlugin(config) {
|
|
|
235
235
|
* @example
|
|
236
236
|
* **LLM-friendly markdown output**
|
|
237
237
|
* ```js
|
|
238
|
-
* import {
|
|
238
|
+
* import { bundleAnalyzerPlugin } from 'rolldown/experimental';
|
|
239
239
|
*
|
|
240
240
|
* export default {
|
|
241
241
|
* plugins: [
|
|
242
|
-
*
|
|
242
|
+
* bundleAnalyzerPlugin({
|
|
243
243
|
* format: 'md'
|
|
244
244
|
* })
|
|
245
245
|
* ]
|
|
@@ -309,6 +309,6 @@ const transform = transform$1;
|
|
|
309
309
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
310
310
|
const transformSync = transformSync$1;
|
|
311
311
|
/** @deprecated Use from `rolldown/utils` instead. */
|
|
312
|
-
const TsconfigCache = TsconfigCache$
|
|
312
|
+
const TsconfigCache = TsconfigCache$2;
|
|
313
313
|
//#endregion
|
|
314
|
-
export { BindingRebuildStrategy, DevEngine, ResolverFactory, TsconfigCache, bundleAnalyzerPlugin, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, parse, parseSync, resolveTsconfig, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWebWorkerPostPlugin };
|
|
314
|
+
export { BindingRebuildStrategy, DevEngine, ResolverFactory, TsconfigCache, bundleAnalyzerPlugin, defineParallelPlugin, dev, viteDynamicImportVarsPlugin as dynamicImportVarsPlugin, viteDynamicImportVarsPlugin, freeExternalMemory, viteImportGlobPlugin as importGlobPlugin, viteImportGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, isolatedDeclarationSync, memfs, minify, minifySync, moduleRunnerTransform, oxcRuntimePlugin, parse, parseSync, resolveTsconfig, scan, transform, transformSync, viteAliasPlugin, viteBuildImportAnalysisPlugin, viteJsonPlugin, viteLoadFallbackPlugin, viteManifestPlugin, viteModulePreloadPolyfillPlugin, viteReactRefreshWrapperPlugin, viteReporterPlugin, viteResolvePlugin, viteTransformPlugin, viteWasmFallbackPlugin, viteWebWorkerPostPlugin };
|
|
@@ -40,21 +40,30 @@ export class DevRuntime {
|
|
|
40
40
|
/**
|
|
41
41
|
* __esmMin
|
|
42
42
|
*
|
|
43
|
-
*
|
|
43
|
+
* When `dedup` is truthy and `id` is already registered on the runtime,
|
|
44
|
+
* skip the factory: another lazy blob got there first. HMR patches pass
|
|
45
|
+
* no `dedup` so they always re-run the factory and replace the registered
|
|
46
|
+
* exports.
|
|
47
|
+
*
|
|
48
|
+
* @type {<T>(id: string, fn: any, dedup: any, res: T) => () => T}
|
|
44
49
|
* @internal
|
|
45
50
|
*/
|
|
46
|
-
createEsmInitializer: <T>(fn: any, res: T) => () => T;
|
|
51
|
+
createEsmInitializer: <T>(id: string, fn: any, dedup: any, res: T) => () => T;
|
|
47
52
|
/**
|
|
48
53
|
* __commonJSMin
|
|
49
54
|
*
|
|
50
|
-
*
|
|
55
|
+
* Same dedup gate as createEsmInitializer. With `dedup` truthy and `id`
|
|
56
|
+
* registered, reuse the registered exports object; otherwise run the
|
|
57
|
+
* factory.
|
|
58
|
+
*
|
|
59
|
+
* @type {<T extends { exports: any }>(id: string, cb: any, dedup: any, mod: { exports: any }, registered: any) => () => T}
|
|
51
60
|
* @internal
|
|
52
61
|
*/
|
|
53
62
|
createCjsInitializer: <T extends {
|
|
54
63
|
exports: any;
|
|
55
|
-
}>(cb: any, mod: {
|
|
64
|
+
}>(id: string, cb: any, dedup: any, mod: {
|
|
56
65
|
exports: any;
|
|
57
|
-
}) => () => T;
|
|
66
|
+
}, registered: any) => () => T;
|
|
58
67
|
/** @internal */
|
|
59
68
|
__toESM: any;
|
|
60
69
|
/** @internal */
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as exprInterpreter, F as QueryFilterObject, G as interpreterImpl, H as importerId, I as TopLevelFilterExpression, J as or, K as moduleType, L as and, M as withFilter, N as FilterExpression, P as FilterExpressionKind, R as code, U as include, V as id, W as interpreter, X as query, Y as queries, q as not, z as exclude } from "./shared/define-config-
|
|
1
|
+
import { B as exprInterpreter, F as QueryFilterObject, G as interpreterImpl, H as importerId, I as TopLevelFilterExpression, J as or, K as moduleType, L as and, M as withFilter, N as FilterExpression, P as FilterExpressionKind, R as code, U as include, V as id, W as interpreter, X as query, Y as queries, q as not, z as exclude } from "./shared/define-config-Bah0mfyR.mjs";
|
|
2
2
|
|
|
3
3
|
//#region ../pluginutils/dist/filter/filter-vite-plugins.d.ts
|
|
4
4
|
/**
|
package/dist/index.browser.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as logMultipleWatcherOption } from "./normalize-string-or-regex-
|
|
2
|
-
import { a as validateOption, c as arraify, l as RUNTIME_MODULE_ID, n as createBundlerOptions, o as PluginDriver, r as
|
|
3
|
-
import { t as aggregateBindingErrorsIntoJsError } from "./error-
|
|
1
|
+
import { d as logMultipleWatcherOption } from "./normalize-string-or-regex-CBPw_c5O.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-CKS7EawU.js";
|
|
3
|
+
import { t as aggregateBindingErrorsIntoJsError } from "./error-DMfKBGWU.js";
|
|
4
4
|
import { BindingWatcher, shutdownAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
5
5
|
//#region src/api/rolldown/index.ts
|
|
6
6
|
/**
|
|
@@ -235,4 +235,4 @@ function defineConfig(config) {
|
|
|
235
235
|
return config;
|
|
236
236
|
}
|
|
237
237
|
//#endregion
|
|
238
|
-
export { RUNTIME_MODULE_ID,
|
|
238
|
+
export { RUNTIME_MODULE_ID, RolldownMagicString, VERSION, build, defineConfig, rolldown, watch };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { z as PreRenderedChunk } from "./shared/binding-CaVxb0SV.mjs";
|
|
1
2
|
import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-C6h4g8dA.mjs";
|
|
2
|
-
import { $ as
|
|
3
|
-
import { o as PartialNull } from "./shared/utils-
|
|
4
|
-
export { AddonFunction, AdvancedChunksGroup, AdvancedChunksOptions, AsyncPluginHooks, BufferEncoding, BuildOptions, BundleError, ChecksOptions, ChunkFileNamesFunction, ChunkingContext, CodeSplittingGroup, CodeSplittingNameFunction, CodeSplittingOptions, CommentsOptions, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedChunk, EmittedFile, EmittedPrebuiltChunk, ExistingRawSourceMap, ExternalOption, ExternalOptionFunction, FunctionPluginHooks, GeneralHookFilter, GeneratedCodeOptions, GeneratedCodePreset, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PluginContextResolveOptions, PreRenderedAsset, PreRenderedChunk, RUNTIME_MODULE_ID, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownError, RolldownError as RollupError, RolldownFileStats, RolldownFsModule, RolldownLog, RolldownLog as RollupLog, RolldownLogWithString, RolldownLogWithString as RollupLogWithString,
|
|
3
|
+
import { $ as BundleError, $t as ModuleFormat, A as SourceDescription, At as RolldownMagicString, Bt as AddonFunction, C as PartialResolvedId, Ct as InternalModuleFormat, D as ResolvedId, Dt as ChecksOptions, E as ResolveIdResult, Et as TransformOptions, Ft as WatchOptions, Gt as CodeSplittingGroup, Ht as AdvancedChunksOptions, It as rolldown, Jt as CommentsOptions, Kt as CodeSplittingNameFunction, Lt as RolldownBuild, Mt as RolldownWatcher, Nt as RolldownWatcherEvent, O as RolldownPlugin, Ot as LoggingFunction, Pt as RolldownWatcherWatcherEventMap, Q as VERSION, Qt as MinifyOptions, Rt as BuildOptions, S as ParallelPluginHooks, St as RolldownFsModule, T as ResolveIdExtraOptions, Tt as NormalizedInputOptions, Ut as ChunkFileNamesFunction, Vt as AdvancedChunksGroup, Wt as ChunkingContext, Xt as GeneratedCodePreset, Yt as GeneratedCodeOptions, Z as RUNTIME_MODULE_ID, Zt as GlobalsFunction, _ as ImportKind, _t as HookFilter, a as ExternalOption, an as RenderedModule, at as EmittedAsset, b as ModuleType, bt as RolldownDirectoryEntry, c as InputOptions, ct as EmittedPrebuiltChunk, d as WatcherFileWatcherOptions, dt as PluginContextResolveOptions, en as OutputOptions, et as ExistingRawSourceMap, f as WatcherOptions, ft as DefineParallelPluginResult, g as HookFilterExtension, gt as GeneralHookFilter, h as FunctionPluginHooks, ht as PluginContextMeta, i as RolldownOptions, in as RenderedChunk, it as TransformPluginContext, j as TransformResult, jt as watch, k as RolldownPluginOption, kt as WarningHandlerWithDefault, l as ModuleTypes, ln as ModuleInfo, lt as GetModuleInfo, m as CustomPluginOptions, mt as MinimalPluginContext, n as RolldownOptionsFunction, nn as OutputAsset, nt as OutputBundle, o as ExternalOptionFunction, on as RolldownOutput, ot as EmittedChunk, p as AsyncPluginHooks, qt as CodeSplittingOptions, r as defineConfig, rn as OutputChunk, rt as TreeshakingOptions, s as InputOption, sn as SourceMap, st as EmittedFile, t as ConfigExport, tn as PreRenderedAsset, tt as SourceMapInput, u as OptimizationOptions, un as SourcemapIgnoreListOption, ut as PluginContext, v as LoadResult, vt as ModuleTypeFilter, w as Plugin, wt as NormalizedOutputOptions, x as ObjectHook, xt as RolldownFileStats, y as ModuleOptions, yt as BufferEncoding, zt as build } from "./shared/define-config-Bah0mfyR.mjs";
|
|
4
|
+
import { o as PartialNull } from "./shared/utils-KRVeJqya.mjs";
|
|
5
|
+
export { AddonFunction, AdvancedChunksGroup, AdvancedChunksOptions, AsyncPluginHooks, BufferEncoding, BuildOptions, BundleError, ChecksOptions, ChunkFileNamesFunction, ChunkingContext, CodeSplittingGroup, CodeSplittingNameFunction, CodeSplittingOptions, CommentsOptions, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedChunk, EmittedFile, EmittedPrebuiltChunk, ExistingRawSourceMap, ExternalOption, ExternalOptionFunction, FunctionPluginHooks, GeneralHookFilter, GeneratedCodeOptions, GeneratedCodePreset, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PluginContextResolveOptions, PreRenderedAsset, PreRenderedChunk, RUNTIME_MODULE_ID, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownError, RolldownError as RollupError, RolldownFileStats, RolldownFsModule, RolldownLog, RolldownLog as RollupLog, RolldownLogWithString, RolldownLogWithString as RollupLogWithString, RolldownMagicString, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RolldownWatcherWatcherEventMap, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformOptions, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherFileWatcherOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
2
|
-
import "./shared/
|
|
3
|
-
import {
|
|
4
|
-
import "./shared/rolldown-build-DZ7tJkeQ.mjs";
|
|
5
|
-
import "./shared/error-CQ6njWsV.mjs";
|
|
6
|
-
import "./shared/parse-DDUnGYGU.mjs";
|
|
7
|
-
import { t as rolldown } from "./shared/rolldown-BDqeiCX1.mjs";
|
|
1
|
+
import { n as onExit, t as watch } from "./shared/watch-B81_EvN-.mjs";
|
|
2
|
+
import { a as RolldownMagicString, b as RUNTIME_MODULE_ID, x as VERSION } from "./shared/bindingify-input-options-CboGFdC4.mjs";
|
|
3
|
+
import { t as rolldown } from "./shared/rolldown-WowDTCZP.mjs";
|
|
8
4
|
import { t as defineConfig } from "./shared/define-config-DJOr6Iwt.mjs";
|
|
9
5
|
import { isMainThread } from "node:worker_threads";
|
|
10
6
|
import { initTraceSubscriber } from "./rolldown-binding.wasi.cjs";
|
|
@@ -50,4 +46,4 @@ async function build(options) {
|
|
|
50
46
|
}
|
|
51
47
|
}
|
|
52
48
|
//#endregion
|
|
53
|
-
export { RUNTIME_MODULE_ID,
|
|
49
|
+
export { RUNTIME_MODULE_ID, RolldownMagicString, VERSION, build, defineConfig, rolldown, watch };
|
package/dist/{normalize-string-or-regex-TtAGUp42.js → normalize-string-or-regex-CBPw_c5O.js}
RENAMED
|
@@ -186,6 +186,8 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
186
186
|
//#endregion
|
|
187
187
|
//#region src/builtin-plugin/utils.ts
|
|
188
188
|
var BuiltinPlugin = class {
|
|
189
|
+
name;
|
|
190
|
+
_options;
|
|
189
191
|
/** Vite-specific option to control plugin ordering */
|
|
190
192
|
enforce;
|
|
191
193
|
constructor(name, _options) {
|
|
@@ -196,17 +198,25 @@ var BuiltinPlugin = class {
|
|
|
196
198
|
function makeBuiltinPluginCallable(plugin) {
|
|
197
199
|
let callablePlugin = new BindingCallableBuiltinPlugin(bindingifyBuiltInPlugin(plugin));
|
|
198
200
|
const wrappedPlugin = plugin;
|
|
199
|
-
for (const key in callablePlugin)
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
201
|
+
for (const key in callablePlugin) {
|
|
202
|
+
const wrappedHook = async function(...args) {
|
|
203
|
+
try {
|
|
204
|
+
return await callablePlugin[key](...args);
|
|
205
|
+
} catch (e) {
|
|
206
|
+
if (e instanceof Error && !e.stack?.includes("at ")) Error.captureStackTrace(e, wrappedPlugin[key]);
|
|
207
|
+
return error(logPluginError(e, plugin.name, {
|
|
208
|
+
hook: key,
|
|
209
|
+
id: key === "transform" ? args[2] : void 0
|
|
210
|
+
}));
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
const order = callablePlugin.getOrder(key);
|
|
214
|
+
if (order == void 0) wrappedPlugin[key] = wrappedHook;
|
|
215
|
+
else wrappedPlugin[key] = {
|
|
216
|
+
handler: wrappedHook,
|
|
217
|
+
order
|
|
218
|
+
};
|
|
219
|
+
}
|
|
210
220
|
return wrappedPlugin;
|
|
211
221
|
}
|
|
212
222
|
function bindingifyBuiltInPlugin(plugin) {
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import "./shared/
|
|
2
|
-
import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-Cfptl9gw.mjs";
|
|
3
|
-
import "./shared/error-CQ6njWsV.mjs";
|
|
4
|
-
import "./shared/parse-DDUnGYGU.mjs";
|
|
1
|
+
import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-CboGFdC4.mjs";
|
|
5
2
|
import { parentPort, workerData } from "node:worker_threads";
|
|
6
3
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
7
4
|
//#region src/parallel-plugin-worker.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { w as Plugin } from "./shared/define-config-
|
|
2
|
-
import { i as MaybePromise } from "./shared/utils-
|
|
1
|
+
import { w as Plugin } from "./shared/define-config-Bah0mfyR.mjs";
|
|
2
|
+
import { i as MaybePromise } from "./shared/utils-KRVeJqya.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ParseResult as ParseResult$1, ParserOptions as ParserOptions$1 } from "./binding.cjs";
|
|
1
|
+
import { L as ParseResult$1, R as ParserOptions$1, bn as Program } from "./shared/binding-CaVxb0SV.mjs";
|
|
3
2
|
|
|
4
3
|
//#region src/parse-ast-index.d.ts
|
|
5
4
|
/**
|
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-D80CXhvg.mjs";
|
|
2
|
-
import { n as parseSync, t as parse } from "./shared/parse-
|
|
2
|
+
import { n as parseSync, t as parse } from "./shared/parse-Lc1YQk0q.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);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./normalize-string-or-regex-
|
|
2
|
-
import { t as esmExternalRequirePlugin } from "./constructors-
|
|
1
|
+
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./normalize-string-or-regex-CBPw_c5O.js";
|
|
2
|
+
import { t as esmExternalRequirePlugin } from "./constructors-BXVEHwHm.js";
|
|
3
3
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
4
4
|
/**
|
|
5
5
|
* Replaces targeted strings in files while bundling.
|
package/dist/plugins-index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
1
|
+
import { m as BindingReplacePluginConfig } from "./shared/binding-CaVxb0SV.mjs";
|
|
2
|
+
import { t as BuiltinPlugin } from "./shared/utils-KRVeJqya.mjs";
|
|
3
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-B1JYJxhf.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/builtin-plugin/replace-plugin.d.ts
|
|
6
6
|
/**
|
package/dist/plugins-index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./shared/normalize-string-or-regex-
|
|
2
|
-
import { t as esmExternalRequirePlugin } from "./shared/constructors-
|
|
1
|
+
import { a as makeBuiltinPluginCallable, n as BuiltinPlugin } from "./shared/normalize-string-or-regex-Dq6w-2tU.mjs";
|
|
2
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-DO36gIcC.mjs";
|
|
3
3
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
4
4
|
/**
|
|
5
5
|
* Replaces targeted strings in files while bundling.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as normalizeBindingError, s as bindingifySourcemap } from "./error-
|
|
2
|
-
import { TsconfigCache, collapseSourcemaps, enhancedTransform, enhancedTransformSync, minify, minifySync } from "./rolldown-binding.wasi-browser.js";
|
|
1
|
+
import { n as normalizeBindingError, s as bindingifySourcemap } from "./error-DMfKBGWU.js";
|
|
2
|
+
import { TsconfigCache, collapseSourcemaps, enhancedTransform, enhancedTransformSync, minify, minifySync, resolveTsconfig } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
//#region src/utils/minify.ts
|
|
4
4
|
/**
|
|
5
5
|
* Minify asynchronously.
|
|
@@ -35,6 +35,7 @@ function minifySync$1(filename, sourceText, options) {
|
|
|
35
35
|
}
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/utils/transform.ts
|
|
38
|
+
const yarnPnp$1 = typeof process === "object" && !!process.versions?.pnp;
|
|
38
39
|
/**
|
|
39
40
|
* Transpile a JavaScript or TypeScript into a target ECMAScript version, asynchronously.
|
|
40
41
|
*
|
|
@@ -54,7 +55,7 @@ function minifySync$1(filename, sourceText, options) {
|
|
|
54
55
|
* @experimental
|
|
55
56
|
*/
|
|
56
57
|
async function transform(filename, sourceText, options, cache) {
|
|
57
|
-
const result = await enhancedTransform(filename, sourceText, options, cache);
|
|
58
|
+
const result = await enhancedTransform(filename, sourceText, options, cache, yarnPnp$1);
|
|
58
59
|
return {
|
|
59
60
|
...result,
|
|
60
61
|
errors: result.errors.map(normalizeBindingError),
|
|
@@ -78,7 +79,7 @@ async function transform(filename, sourceText, options, cache) {
|
|
|
78
79
|
* @experimental
|
|
79
80
|
*/
|
|
80
81
|
function transformSync(filename, sourceText, options, cache) {
|
|
81
|
-
const result = enhancedTransformSync(filename, sourceText, options, cache);
|
|
82
|
+
const result = enhancedTransformSync(filename, sourceText, options, cache, yarnPnp$1);
|
|
82
83
|
return {
|
|
83
84
|
...result,
|
|
84
85
|
errors: result.errors.map(normalizeBindingError),
|
|
@@ -86,4 +87,26 @@ function transformSync(filename, sourceText, options, cache) {
|
|
|
86
87
|
};
|
|
87
88
|
}
|
|
88
89
|
//#endregion
|
|
89
|
-
|
|
90
|
+
//#region src/utils/resolve-tsconfig.ts
|
|
91
|
+
const yarnPnp = typeof process === "object" && !!process.versions?.pnp;
|
|
92
|
+
/**
|
|
93
|
+
* Cache for tsconfig resolution to avoid redundant file system operations.
|
|
94
|
+
*
|
|
95
|
+
* The cache stores resolved tsconfig configurations keyed by their file paths.
|
|
96
|
+
* When transforming multiple files in the same project, tsconfig lookups are
|
|
97
|
+
* deduplicated, improving performance.
|
|
98
|
+
*
|
|
99
|
+
* @category Utilities
|
|
100
|
+
* @experimental
|
|
101
|
+
*/
|
|
102
|
+
var TsconfigCache$1 = class extends TsconfigCache {
|
|
103
|
+
constructor() {
|
|
104
|
+
super(yarnPnp);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
/** @hidden This is only expected to be used by Vite */
|
|
108
|
+
function resolveTsconfig$1(filename, cache) {
|
|
109
|
+
return resolveTsconfig(filename, cache, yarnPnp);
|
|
110
|
+
}
|
|
111
|
+
//#endregion
|
|
112
|
+
export { minify$1 as a, transformSync as i, resolveTsconfig$1 as n, minifySync$1 as o, transform as r, TsconfigCache$1 as t };
|
|
@@ -43,6 +43,12 @@ const {
|
|
|
43
43
|
})
|
|
44
44
|
worker.addEventListener('message', __wasmCreateOnMessageForFsProxy(__fs))
|
|
45
45
|
|
|
46
|
+
worker.addEventListener('error', (event) => {
|
|
47
|
+
if (event.data && typeof event.data === 'object' && event.data.type === 'error') {
|
|
48
|
+
window.dispatchEvent(new CustomEvent('napi-rs-worker-error', { detail: event.data }))
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
|
|
46
52
|
return worker
|
|
47
53
|
},
|
|
48
54
|
overwriteImports(importObject) {
|
|
Binary file
|