@rolldown/browser 1.0.0-beta.38 → 1.0.0-beta.39
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 +4 -4
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +3 -3
- package/dist/experimental-index.browser.mjs +5 -4
- package/dist/experimental-index.d.mts +3 -3
- package/dist/experimental-index.mjs +7 -6
- package/dist/filter-index.d.mts +2 -3
- package/dist/index.browser.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/parallel-plugin-worker.mjs +3 -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/rolldown-binding.wasi-browser.js +1 -0
- package/dist/rolldown-binding.wasi.cjs +1 -0
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-D6vpD1fz.d.mts → binding-aYdpw2Yk.d.mts} +0 -1
- package/dist/shared/{define-config-D-OneP9q.d.mts → define-config-BtZ0vxTw.d.mts} +80 -3
- package/dist/shared/{load-config-BGatf3rT.mjs → load-config-CqwQxoUE.mjs} +1 -1
- package/dist/shared/{parse-ast-index-CR2E9ZQS.mjs → parse-ast-index-CIyujJMQ.mjs} +2 -2
- package/dist/shared/{src-E1KQKxjT.mjs → src-ChJBGGvK.mjs} +9 -25
- package/dist/{src-DE1CLQYz.js → src-Da5FndSU.js} +8 -24
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ansis_default, description, getCliSchemaInfo, getInputCliKeys, getOutputCliKeys, onExit, rolldown, validateCliOptions, version, watch } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { ansis_default, description, getCliSchemaInfo, getInputCliKeys, getOutputCliKeys, onExit, rolldown, validateCliOptions, version, watch } from "./shared/src-ChJBGGvK.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-CIyujJMQ.mjs";
|
|
3
3
|
import { arraify } from "./shared/dist-CHTC3-kR.mjs";
|
|
4
4
|
import { logger } from "./shared/logger-CiCY7ucm.mjs";
|
|
5
|
-
import { loadConfig } from "./shared/load-config-
|
|
5
|
+
import { loadConfig } from "./shared/load-config-CqwQxoUE.mjs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { parseArgs } from "node:util";
|
|
8
8
|
import process$1 from "node:process";
|
|
@@ -241,7 +241,7 @@ function getClearScreenFunction(options$1) {
|
|
|
241
241
|
}
|
|
242
242
|
|
|
243
243
|
//#endregion
|
|
244
|
-
//#region \0@oxc-project+runtime@0.
|
|
244
|
+
//#region \0@oxc-project+runtime@0.90.0/helpers/usingCtx.js
|
|
245
245
|
function _usingCtx() {
|
|
246
246
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r$1, e$1) {
|
|
247
247
|
var n$1 = Error();
|
package/dist/config.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { ConfigExport, defineConfig } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-aYdpw2Yk.mjs";
|
|
2
|
+
import { ConfigExport, defineConfig } from "./shared/define-config-BtZ0vxTw.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/load-config.d.ts
|
|
5
5
|
declare function loadConfig(configPath: string): Promise<ConfigExport>;
|
package/dist/config.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineConfig, version } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { defineConfig, version } from "./shared/src-ChJBGGvK.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-CIyujJMQ.mjs";
|
|
3
3
|
import "./shared/dist-CHTC3-kR.mjs";
|
|
4
|
-
import { loadConfig } from "./shared/load-config-
|
|
4
|
+
import { loadConfig } from "./shared/load-config-CqwQxoUE.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/config.ts
|
|
7
7
|
const VERSION = version;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPlugin, PluginDriver, RolldownBuild, createBundlerOptions, makeBuiltinPluginCallable, normalizedStringOrRegex } from "./src-
|
|
1
|
+
import { BuiltinPlugin, PluginDriver, RolldownBuild, createBundlerOptions, makeBuiltinPluginCallable, normalizedStringOrRegex } from "./src-Da5FndSU.js";
|
|
2
2
|
import { BindingDevEngine, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
|
|
4
4
|
//#region src/api/dev/dev-engine.ts
|
|
@@ -37,8 +37,8 @@ var DevEngine = class DevEngine {
|
|
|
37
37
|
this.#cachedBuildFinishPromise = promise;
|
|
38
38
|
return promise;
|
|
39
39
|
}
|
|
40
|
-
async
|
|
41
|
-
await this.#inner.
|
|
40
|
+
async ensureLatestBuildOutput() {
|
|
41
|
+
await this.#inner.ensureLatestBuildOutput();
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Returns true if a new build is scheduled.
|
|
@@ -141,7 +141,8 @@ function reactRefreshWrapperPlugin(config) {
|
|
|
141
141
|
config.include = normalizedStringOrRegex(config.include);
|
|
142
142
|
config.exclude = normalizedStringOrRegex(config.exclude);
|
|
143
143
|
}
|
|
144
|
-
|
|
144
|
+
const builtinPlugin = new BuiltinPlugin("builtin:react-refresh-wrapper", config);
|
|
145
|
+
return makeBuiltinPluginCallable(builtinPlugin);
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingHmrUpdate, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingReactRefreshWrapperPluginConfig, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-
|
|
2
|
-
import { BuiltinPlugin, InputOptions, OutputOptions, StringOrRegExp, defineParallelPlugin } from "./shared/define-config-
|
|
1
|
+
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingHmrUpdate, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingReactRefreshWrapperPluginConfig, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding-aYdpw2Yk.mjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, OutputOptions, StringOrRegExp, defineParallelPlugin } from "./shared/define-config-BtZ0vxTw.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/dev/dev-options.d.ts
|
|
5
5
|
interface DevWatchOptions {
|
|
@@ -54,7 +54,7 @@ declare class DevEngine {
|
|
|
54
54
|
private constructor();
|
|
55
55
|
run(): Promise<void>;
|
|
56
56
|
ensureCurrentBuildFinish(): Promise<void>;
|
|
57
|
-
|
|
57
|
+
ensureLatestBuildOutput(): Promise<void>;
|
|
58
58
|
/**
|
|
59
59
|
* Returns true if a new build is scheduled.
|
|
60
60
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BuiltinPlugin, PluginDriver, RolldownBuild, createBundlerOptions, makeBuiltinPluginCallable, normalizedStringOrRegex } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { BuiltinPlugin, PluginDriver, RolldownBuild, createBundlerOptions, makeBuiltinPluginCallable, normalizedStringOrRegex } from "./shared/src-ChJBGGvK.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-CIyujJMQ.mjs";
|
|
3
3
|
import "./shared/dist-CHTC3-kR.mjs";
|
|
4
4
|
import { logger } from "./shared/logger-CiCY7ucm.mjs";
|
|
5
|
-
import { BindingDevEngine, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi
|
|
5
|
+
import { BindingDevEngine, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
|
7
7
|
|
|
8
8
|
//#region src/api/dev/dev-engine.ts
|
|
@@ -41,8 +41,8 @@ var DevEngine = class DevEngine {
|
|
|
41
41
|
this.#cachedBuildFinishPromise = promise;
|
|
42
42
|
return promise;
|
|
43
43
|
}
|
|
44
|
-
async
|
|
45
|
-
await this.#inner.
|
|
44
|
+
async ensureLatestBuildOutput() {
|
|
45
|
+
await this.#inner.ensureLatestBuildOutput();
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Returns true if a new build is scheduled.
|
|
@@ -150,7 +150,8 @@ function reactRefreshWrapperPlugin(config) {
|
|
|
150
150
|
config.include = normalizedStringOrRegex(config.include);
|
|
151
151
|
config.exclude = normalizedStringOrRegex(config.exclude);
|
|
152
152
|
}
|
|
153
|
-
|
|
153
|
+
const builtinPlugin = new BuiltinPlugin("builtin:react-refresh-wrapper", config);
|
|
154
|
+
return makeBuiltinPluginCallable(builtinPlugin);
|
|
154
155
|
}
|
|
155
156
|
|
|
156
157
|
//#endregion
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { withFilter } from "./shared/define-config-
|
|
3
|
-
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
1
|
+
import "./shared/binding-aYdpw2Yk.mjs";
|
|
2
|
+
import { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter } from "./shared/define-config-BtZ0vxTw.mjs";
|
|
4
3
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/index.browser.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding-
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, 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, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-aYdpw2Yk.mjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, 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, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-BtZ0vxTw.mjs";
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, 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, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOptionsFunction, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-ChJBGGvK.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-CIyujJMQ.mjs";
|
|
3
3
|
import "./shared/dist-CHTC3-kR.mjs";
|
|
4
4
|
|
|
5
5
|
export { VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PluginContextData, bindingifyPlugin } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { PluginContextData, bindingifyPlugin } from "./shared/src-ChJBGGvK.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-CIyujJMQ.mjs";
|
|
3
3
|
import "./shared/dist-CHTC3-kR.mjs";
|
|
4
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
|
-
import { registerPlugins } from "./rolldown-binding.wasi
|
|
5
|
+
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
6
6
|
|
|
7
7
|
//#region src/parallel-plugin-worker.ts
|
|
8
8
|
const { registryId, pluginInfos, threadNumber } = workerData;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-aYdpw2Yk.mjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-BtZ0vxTw.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
|
@@ -81,6 +81,7 @@ export const HelperMode = __napiModule.exports.HelperMode
|
|
|
81
81
|
export const isolatedDeclaration = __napiModule.exports.isolatedDeclaration
|
|
82
82
|
export const moduleRunnerTransform = __napiModule.exports.moduleRunnerTransform
|
|
83
83
|
export const transform = __napiModule.exports.transform
|
|
84
|
+
export const transformAsync = __napiModule.exports.transformAsync
|
|
84
85
|
export const BindingBundleEndEventData = __napiModule.exports.BindingBundleEndEventData
|
|
85
86
|
export const BindingBundleErrorEventData = __napiModule.exports.BindingBundleErrorEventData
|
|
86
87
|
export const BindingBundler = __napiModule.exports.BindingBundler
|
|
@@ -126,6 +126,7 @@ module.exports.HelperMode = __napiModule.exports.HelperMode
|
|
|
126
126
|
module.exports.isolatedDeclaration = __napiModule.exports.isolatedDeclaration
|
|
127
127
|
module.exports.moduleRunnerTransform = __napiModule.exports.moduleRunnerTransform
|
|
128
128
|
module.exports.transform = __napiModule.exports.transform
|
|
129
|
+
module.exports.transformAsync = __napiModule.exports.transformAsync
|
|
129
130
|
module.exports.BindingBundleEndEventData = __napiModule.exports.BindingBundleEndEventData
|
|
130
131
|
module.exports.BindingBundleErrorEventData = __napiModule.exports.BindingBundleErrorEventData
|
|
131
132
|
module.exports.BindingBundler = __napiModule.exports.BindingBundler
|
|
Binary file
|
|
@@ -1361,7 +1361,6 @@ interface BindingTransformPluginConfig {
|
|
|
1361
1361
|
jsxRefreshInclude?: Array<BindingStringOrRegex>;
|
|
1362
1362
|
jsxRefreshExclude?: Array<BindingStringOrRegex>;
|
|
1363
1363
|
isServerConsumer?: boolean;
|
|
1364
|
-
runtimeResolveBase?: string;
|
|
1365
1364
|
jsxInject?: string;
|
|
1366
1365
|
transformOptions?: TransformOptions;
|
|
1367
1366
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { BindingBuiltinPluginName, BindingBundlerImpl, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingRenderedChunk, BindingTransformHookExtraArgs, BindingWatcherEvent, MinifyOptions as MinifyOptions$1, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-
|
|
1
|
+
import { BindingBuiltinPluginName, BindingBundlerImpl, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingRenderedChunk, BindingTransformHookExtraArgs, BindingWatcherEvent, MinifyOptions as MinifyOptions$1, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding-aYdpw2Yk.mjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
|
-
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
3
|
|
|
5
4
|
//#region src/log/logging.d.ts
|
|
6
5
|
type LogLevel = "info" | "debug" | "warn";
|
|
@@ -658,6 +657,84 @@ interface RolldownFileStats {
|
|
|
658
657
|
birthtime: Date;
|
|
659
658
|
}
|
|
660
659
|
//#endregion
|
|
660
|
+
//#region ../pluginutils/dist/index.d.mts
|
|
661
|
+
//#region src/composable-filters.d.ts
|
|
662
|
+
type StringOrRegExp$1 = string | RegExp;
|
|
663
|
+
type PluginModuleType = "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | (string & {});
|
|
664
|
+
type FilterExpression = And | Or | Not | Id | ModuleType$1 | Code | Query;
|
|
665
|
+
type TopLevelFilterExpression = Include | Exclude$1;
|
|
666
|
+
declare class And {
|
|
667
|
+
kind: "and";
|
|
668
|
+
args: FilterExpression[];
|
|
669
|
+
constructor(...args: FilterExpression[]);
|
|
670
|
+
}
|
|
671
|
+
declare class Or {
|
|
672
|
+
kind: "or";
|
|
673
|
+
args: FilterExpression[];
|
|
674
|
+
constructor(...args: FilterExpression[]);
|
|
675
|
+
}
|
|
676
|
+
declare class Not {
|
|
677
|
+
kind: "not";
|
|
678
|
+
expr: FilterExpression;
|
|
679
|
+
constructor(expr: FilterExpression);
|
|
680
|
+
}
|
|
681
|
+
interface QueryFilterObject {
|
|
682
|
+
[key: string]: StringOrRegExp$1 | boolean;
|
|
683
|
+
}
|
|
684
|
+
interface IdParams {
|
|
685
|
+
cleanUrl?: boolean;
|
|
686
|
+
}
|
|
687
|
+
declare class Id {
|
|
688
|
+
kind: "id";
|
|
689
|
+
pattern: StringOrRegExp$1;
|
|
690
|
+
params: IdParams;
|
|
691
|
+
constructor(pattern: StringOrRegExp$1, params?: IdParams);
|
|
692
|
+
}
|
|
693
|
+
declare class ModuleType$1 {
|
|
694
|
+
kind: "moduleType";
|
|
695
|
+
pattern: PluginModuleType;
|
|
696
|
+
constructor(pattern: PluginModuleType);
|
|
697
|
+
}
|
|
698
|
+
declare class Code {
|
|
699
|
+
kind: "code";
|
|
700
|
+
pattern: StringOrRegExp$1;
|
|
701
|
+
constructor(expr: StringOrRegExp$1);
|
|
702
|
+
}
|
|
703
|
+
declare class Query {
|
|
704
|
+
kind: "query";
|
|
705
|
+
key: string;
|
|
706
|
+
pattern: StringOrRegExp$1 | boolean;
|
|
707
|
+
constructor(key: string, pattern: StringOrRegExp$1 | boolean);
|
|
708
|
+
}
|
|
709
|
+
declare class Include {
|
|
710
|
+
kind: "include";
|
|
711
|
+
expr: FilterExpression;
|
|
712
|
+
constructor(expr: FilterExpression);
|
|
713
|
+
}
|
|
714
|
+
declare class Exclude$1 {
|
|
715
|
+
kind: "exclude";
|
|
716
|
+
expr: FilterExpression;
|
|
717
|
+
constructor(expr: FilterExpression);
|
|
718
|
+
}
|
|
719
|
+
declare function and(...args: FilterExpression[]): And;
|
|
720
|
+
declare function or(...args: FilterExpression[]): Or;
|
|
721
|
+
declare function not(expr: FilterExpression): Not;
|
|
722
|
+
declare function id(pattern: StringOrRegExp$1, params?: IdParams): Id;
|
|
723
|
+
declare function moduleType(pattern: PluginModuleType): ModuleType$1;
|
|
724
|
+
declare function code(pattern: StringOrRegExp$1): Code;
|
|
725
|
+
declare function query(key: string, pattern: StringOrRegExp$1 | boolean): Query;
|
|
726
|
+
declare function include(expr: FilterExpression): Include;
|
|
727
|
+
declare function exclude(expr: FilterExpression): Exclude$1;
|
|
728
|
+
/**
|
|
729
|
+
* convert a queryObject to FilterExpression like
|
|
730
|
+
* ```js
|
|
731
|
+
* and(query(k1, v1), query(k2, v2))
|
|
732
|
+
* ```
|
|
733
|
+
* @param queryFilterObject The query filter object needs to be matched.
|
|
734
|
+
* @returns a `And` FilterExpression
|
|
735
|
+
*/
|
|
736
|
+
declare function queries(queryFilter: QueryFilterObject): And;
|
|
737
|
+
//#endregion
|
|
661
738
|
//#region src/plugin/hook-filter.d.ts
|
|
662
739
|
type GeneralHookFilter<Value = StringOrRegExp> = MaybeArray<Value> | {
|
|
663
740
|
include?: MaybeArray<Value>;
|
|
@@ -1420,4 +1497,4 @@ declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
|
|
|
1420
1497
|
declare function defineConfig(config: RolldownOptionsFunction): RolldownOptionsFunction;
|
|
1421
1498
|
declare function defineConfig(config: ConfigExport): ConfigExport;
|
|
1422
1499
|
//#endregion
|
|
1423
|
-
export { type AddonFunction, type AsyncPluginHooks, type BufferEncoding, type BuildOptions, BuiltinPlugin, type ChunkFileNamesFunction, type ChunkingContext, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedFile, type ExistingRawSourceMap, type ExternalOption, type FunctionPluginHooks, type GeneralHookFilter, 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, MaybePromise, 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 PreRenderedAsset, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownFileStats, type RolldownFsModule, type RolldownOptions, type RolldownOptionsFunction, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RollupError, type RollupLog, type RollupLogWithString, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, StringOrRegExp, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherOptions, build, defineConfig, defineParallelPlugin, rolldown, watch, withFilter };
|
|
1500
|
+
export { type AddonFunction, type AsyncPluginHooks, type BufferEncoding, type BuildOptions, BuiltinPlugin, type ChunkFileNamesFunction, type ChunkingContext, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedFile, type ExistingRawSourceMap, type ExternalOption, type FunctionPluginHooks, type GeneralHookFilter, 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, MaybePromise, 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 PreRenderedAsset, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownFileStats, type RolldownFsModule, type RolldownOptions, type RolldownOptionsFunction, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RollupError, type RollupLog, type RollupLogWithString, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, StringOrRegExp, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherOptions, and, build, code, defineConfig, defineParallelPlugin, exclude, id, include, moduleType, not, or, queries, query, rolldown, watch, withFilter };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseAsync, parseSync } from "../rolldown-binding.wasi
|
|
1
|
+
import { parseAsync, parseSync } from "../rolldown-binding.wasi.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/utils/code-frame.ts
|
|
4
4
|
function spaces(index) {
|
|
@@ -186,7 +186,7 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
//#endregion
|
|
189
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
189
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.90.0/node_modules/oxc-parser/wrap.mjs
|
|
190
190
|
function wrap$1(result) {
|
|
191
191
|
let program, module, comments, errors;
|
|
192
192
|
return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { augmentCodeLocation, error, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-
|
|
1
|
+
import { augmentCodeLocation, error, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-CIyujJMQ.mjs";
|
|
2
2
|
import { and, arraify, code, exclude, id, include, moduleType, noop, or, unimplemented, unreachable, unsupported } from "./dist-CHTC3-kR.mjs";
|
|
3
3
|
import { Worker, isMainThread } from "node:worker_threads";
|
|
4
|
-
import { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingChunkModuleOrderBy, BindingJsx, BindingLogLevel, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, BindingWatcher, ParallelJsPluginRegistry, initTraceSubscriber, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi
|
|
4
|
+
import { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingChunkModuleOrderBy, BindingJsx, BindingLogLevel, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, BindingWatcher, ParallelJsPluginRegistry, initTraceSubscriber, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import fsp from "node:fs/promises";
|
|
7
7
|
import os from "node:os";
|
|
@@ -243,7 +243,7 @@ if (isMainThread) {
|
|
|
243
243
|
|
|
244
244
|
//#endregion
|
|
245
245
|
//#region package.json
|
|
246
|
-
var version = "1.0.0-beta.
|
|
246
|
+
var version = "1.0.0-beta.39";
|
|
247
247
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
248
248
|
|
|
249
249
|
//#endregion
|
|
@@ -2572,23 +2572,14 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
2572
2572
|
invalidate: false
|
|
2573
2573
|
};
|
|
2574
2574
|
this.data.updateModuleOption(id$1, rawOptions);
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
data.loadModulePromiseResolveFnMap.set(id$1, resolve);
|
|
2575
|
+
let loadPromise = this.data.loadModulePromiseMap.get(id$1);
|
|
2576
|
+
if (!loadPromise) {
|
|
2577
|
+
loadPromise = this.context.load(id$1, options.moduleSideEffects ?? void 0).catch(() => {
|
|
2578
|
+
this.data.loadModulePromiseMap.delete(id$1);
|
|
2580
2579
|
});
|
|
2581
|
-
data.loadModulePromiseMap.set(id$1,
|
|
2582
|
-
try {
|
|
2583
|
-
await context.load(id$1, options.moduleSideEffects ?? void 0);
|
|
2584
|
-
} catch (e$2) {
|
|
2585
|
-
data.loadModulePromiseMap.delete(id$1);
|
|
2586
|
-
data.loadModulePromiseResolveFnMap.delete(id$1);
|
|
2587
|
-
throw e$2;
|
|
2588
|
-
}
|
|
2589
|
-
return promise$1;
|
|
2580
|
+
this.data.loadModulePromiseMap.set(id$1, loadPromise);
|
|
2590
2581
|
}
|
|
2591
|
-
await
|
|
2582
|
+
await loadPromise;
|
|
2592
2583
|
return this.data.getModuleInfo(id$1, this.context);
|
|
2593
2584
|
}
|
|
2594
2585
|
async resolve(source, importer, options) {
|
|
@@ -3708,7 +3699,6 @@ var PluginContextData = class {
|
|
|
3708
3699
|
moduleOptionMap = /* @__PURE__ */ new Map();
|
|
3709
3700
|
resolveOptionsMap = /* @__PURE__ */ new Map();
|
|
3710
3701
|
loadModulePromiseMap = /* @__PURE__ */ new Map();
|
|
3711
|
-
loadModulePromiseResolveFnMap = /* @__PURE__ */ new Map();
|
|
3712
3702
|
renderedChunkMeta = null;
|
|
3713
3703
|
normalizedInputOptions = null;
|
|
3714
3704
|
normalizedOutputOptions = null;
|
|
@@ -3794,14 +3784,9 @@ var PluginContextData = class {
|
|
|
3794
3784
|
this.normalizedOutputOptions ??= new NormalizedOutputOptionsImpl(opts, this.outputOptions, this.normalizedOutputPlugins);
|
|
3795
3785
|
return this.normalizedOutputOptions;
|
|
3796
3786
|
}
|
|
3797
|
-
markModuleLoaded(id$1, _success) {
|
|
3798
|
-
const resolve = this.loadModulePromiseResolveFnMap.get(id$1);
|
|
3799
|
-
if (resolve) resolve();
|
|
3800
|
-
}
|
|
3801
3787
|
clear() {
|
|
3802
3788
|
this.renderedChunkMeta = null;
|
|
3803
3789
|
this.loadModulePromiseMap.clear();
|
|
3804
|
-
this.loadModulePromiseResolveFnMap.clear();
|
|
3805
3790
|
}
|
|
3806
3791
|
};
|
|
3807
3792
|
|
|
@@ -3861,7 +3846,6 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
3861
3846
|
makeAbsoluteExternalsRelative: bindingifyMakeAbsoluteExternalsRelative(inputOptions.makeAbsoluteExternalsRelative),
|
|
3862
3847
|
debug: inputOptions.debug,
|
|
3863
3848
|
invalidateJsSideCache: pluginContextData.clear.bind(pluginContextData),
|
|
3864
|
-
markModuleLoaded: pluginContextData.markModuleLoaded.bind(pluginContextData),
|
|
3865
3849
|
preserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures),
|
|
3866
3850
|
optimization: inputOptions.optimization,
|
|
3867
3851
|
context: inputOptions.context,
|
|
@@ -27,7 +27,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
|
|
28
28
|
//#endregion
|
|
29
29
|
//#region package.json
|
|
30
|
-
var version = "1.0.0-beta.
|
|
30
|
+
var version = "1.0.0-beta.39";
|
|
31
31
|
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region src/utils/code-frame.ts
|
|
@@ -2946,7 +2946,7 @@ function bindingPluginOrder(order) {
|
|
|
2946
2946
|
}
|
|
2947
2947
|
|
|
2948
2948
|
//#endregion
|
|
2949
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
2949
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.90.0/node_modules/oxc-parser/wrap.mjs
|
|
2950
2950
|
function wrap$1(result) {
|
|
2951
2951
|
let program, module$1, comments, errors;
|
|
2952
2952
|
return {
|
|
@@ -3073,23 +3073,14 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
3073
3073
|
invalidate: false
|
|
3074
3074
|
};
|
|
3075
3075
|
this.data.updateModuleOption(id$1, rawOptions);
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
data.loadModulePromiseResolveFnMap.set(id$1, resolve$1);
|
|
3076
|
+
let loadPromise = this.data.loadModulePromiseMap.get(id$1);
|
|
3077
|
+
if (!loadPromise) {
|
|
3078
|
+
loadPromise = this.context.load(id$1, options.moduleSideEffects ?? void 0).catch(() => {
|
|
3079
|
+
this.data.loadModulePromiseMap.delete(id$1);
|
|
3081
3080
|
});
|
|
3082
|
-
data.loadModulePromiseMap.set(id$1,
|
|
3083
|
-
try {
|
|
3084
|
-
await context.load(id$1, options.moduleSideEffects ?? void 0);
|
|
3085
|
-
} catch (e$2) {
|
|
3086
|
-
data.loadModulePromiseMap.delete(id$1);
|
|
3087
|
-
data.loadModulePromiseResolveFnMap.delete(id$1);
|
|
3088
|
-
throw e$2;
|
|
3089
|
-
}
|
|
3090
|
-
return promise$1;
|
|
3081
|
+
this.data.loadModulePromiseMap.set(id$1, loadPromise);
|
|
3091
3082
|
}
|
|
3092
|
-
await
|
|
3083
|
+
await loadPromise;
|
|
3093
3084
|
return this.data.getModuleInfo(id$1, this.context);
|
|
3094
3085
|
}
|
|
3095
3086
|
async resolve(source, importer, options) {
|
|
@@ -4209,7 +4200,6 @@ var PluginContextData = class {
|
|
|
4209
4200
|
moduleOptionMap = /* @__PURE__ */ new Map();
|
|
4210
4201
|
resolveOptionsMap = /* @__PURE__ */ new Map();
|
|
4211
4202
|
loadModulePromiseMap = /* @__PURE__ */ new Map();
|
|
4212
|
-
loadModulePromiseResolveFnMap = /* @__PURE__ */ new Map();
|
|
4213
4203
|
renderedChunkMeta = null;
|
|
4214
4204
|
normalizedInputOptions = null;
|
|
4215
4205
|
normalizedOutputOptions = null;
|
|
@@ -4295,14 +4285,9 @@ var PluginContextData = class {
|
|
|
4295
4285
|
this.normalizedOutputOptions ??= new NormalizedOutputOptionsImpl(opts, this.outputOptions, this.normalizedOutputPlugins);
|
|
4296
4286
|
return this.normalizedOutputOptions;
|
|
4297
4287
|
}
|
|
4298
|
-
markModuleLoaded(id$1, _success) {
|
|
4299
|
-
const resolve$1 = this.loadModulePromiseResolveFnMap.get(id$1);
|
|
4300
|
-
if (resolve$1) resolve$1();
|
|
4301
|
-
}
|
|
4302
4288
|
clear() {
|
|
4303
4289
|
this.renderedChunkMeta = null;
|
|
4304
4290
|
this.loadModulePromiseMap.clear();
|
|
4305
|
-
this.loadModulePromiseResolveFnMap.clear();
|
|
4306
4291
|
}
|
|
4307
4292
|
};
|
|
4308
4293
|
|
|
@@ -4362,7 +4347,6 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
4362
4347
|
makeAbsoluteExternalsRelative: bindingifyMakeAbsoluteExternalsRelative(inputOptions.makeAbsoluteExternalsRelative),
|
|
4363
4348
|
debug: inputOptions.debug,
|
|
4364
4349
|
invalidateJsSideCache: pluginContextData.clear.bind(pluginContextData),
|
|
4365
|
-
markModuleLoaded: pluginContextData.markModuleLoaded.bind(pluginContextData),
|
|
4366
4350
|
preserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures),
|
|
4367
4351
|
optimization: inputOptions.optimization,
|
|
4368
4352
|
context: inputOptions.context,
|
package/package.json
CHANGED