@rolldown/browser 1.0.0-beta.8-commit.c76291c → 1.0.0-beta.8-commit.56abf23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +8 -8
- package/dist/cli.mjs +5 -5
- package/dist/experimental-index.browser.mjs +76 -0
- package/dist/experimental-index.cjs +2 -2
- package/dist/experimental-index.d.cts +1 -1
- package/dist/experimental-index.d.mts +1 -1
- package/dist/experimental-index.mjs +2 -2
- package/dist/filter-index.cjs +51 -11
- package/dist/filter-index.d.cts +2 -2
- package/dist/filter-index.d.mts +2 -2
- package/dist/filter-index.mjs +47 -3
- package/dist/index.browser.mjs +3 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/parallel-plugin-worker.cjs +2 -2
- package/dist/parallel-plugin-worker.mjs +2 -2
- package/dist/parallel-plugin.d.cts +1 -1
- package/dist/parallel-plugin.d.mts +1 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{filter-index-ChddWdsi.cjs → composable-filters-Dbe8wGLg.cjs} +7 -53
- package/dist/shared/{filter-index-DmisSKZF.mjs → esm-CW9DP8HJ.mjs} +14 -53
- package/dist/shared/{input-options.d-_u3jt0Ca.d.mts → input-options.d-BzRVeVzs.d.mts} +36 -35
- package/dist/shared/{input-options.d-CZDp2VXD.d.cts → input-options.d-b875W0uo.d.cts} +36 -35
- package/dist/shared/{src-DSgk2sIq.cjs → src-CTpSZALv.cjs} +25 -25
- package/dist/shared/{src-RC_sW9pl.mjs → src-QAqIvxUw.mjs} +3 -3
- package/dist/{browser.mjs → src-xSRj8hhl.js} +106 -40
- package/package.json +4 -3
|
@@ -120,7 +120,7 @@ type NullValue<T = void> = T | undefined | null | void;
|
|
|
120
120
|
type PartialNull<T> = { [P in keyof T] : T[P] | null };
|
|
121
121
|
type MakeAsync<Function_> = Function_ extends (this: infer This, ...parameters: infer Arguments) => infer Return ? (this: This, ...parameters: Arguments) => Return | Promise<Return> : never;
|
|
122
122
|
type MaybeArray<T> = T | T[];
|
|
123
|
-
type StringOrRegExp = string | RegExp;
|
|
123
|
+
type StringOrRegExp$1 = string | RegExp;
|
|
124
124
|
|
|
125
125
|
//#endregion
|
|
126
126
|
//#region src/options/output-options.d.ts
|
|
@@ -226,7 +226,7 @@ interface OutputOptions {
|
|
|
226
226
|
* If `test` is a regular expression, the module whose id matches the regular expression will be captured.
|
|
227
227
|
* if `test` is empty, any module will be considered as matched.
|
|
228
228
|
*/
|
|
229
|
-
test?: StringOrRegExp
|
|
229
|
+
test?: StringOrRegExp$1
|
|
230
230
|
/**
|
|
231
231
|
* - Type: `number`
|
|
232
232
|
*
|
|
@@ -423,62 +423,63 @@ interface NormalizedOutputOptions {
|
|
|
423
423
|
}
|
|
424
424
|
|
|
425
425
|
//#endregion
|
|
426
|
-
//#region
|
|
427
|
-
type
|
|
426
|
+
//#region ../pluginutils/dist/esm/composable-filters.d.ts
|
|
427
|
+
type StringOrRegExp = string | RegExp;
|
|
428
|
+
type PluginModuleType = 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'text' | 'base64' | 'dataurl' | 'binary' | 'empty' | (string & {});
|
|
428
429
|
type FilterExpression = And | Or | Not | Id | ModuleType$1 | Code | Include | Exclude$1;
|
|
429
430
|
type TopLevelFilterExpression = Include | Exclude$1;
|
|
430
431
|
declare class And {
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
432
|
+
kind: 'and';
|
|
433
|
+
args: FilterExpression[];
|
|
434
|
+
constructor(...args: FilterExpression[]);
|
|
434
435
|
}
|
|
435
436
|
declare class Or {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
437
|
+
kind: 'or';
|
|
438
|
+
args: FilterExpression[];
|
|
439
|
+
constructor(...args: FilterExpression[]);
|
|
439
440
|
}
|
|
440
441
|
declare class Not {
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
442
|
+
kind: 'not';
|
|
443
|
+
expr: FilterExpression;
|
|
444
|
+
constructor(expr: FilterExpression);
|
|
444
445
|
}
|
|
445
446
|
declare class Id {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
447
|
+
kind: 'id';
|
|
448
|
+
pattern: StringOrRegExp;
|
|
449
|
+
constructor(pattern: StringOrRegExp);
|
|
449
450
|
}
|
|
450
451
|
declare class ModuleType$1 {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
452
|
+
kind: 'moduleType';
|
|
453
|
+
pattern: PluginModuleType;
|
|
454
|
+
constructor(pattern: PluginModuleType);
|
|
454
455
|
}
|
|
455
456
|
declare class Code {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
457
|
+
kind: 'code';
|
|
458
|
+
pattern: StringOrRegExp;
|
|
459
|
+
constructor(expr: StringOrRegExp);
|
|
459
460
|
}
|
|
460
461
|
declare class Include {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
462
|
+
kind: 'include';
|
|
463
|
+
expr: FilterExpression;
|
|
464
|
+
constructor(expr: FilterExpression);
|
|
464
465
|
}
|
|
465
466
|
declare class Exclude$1 {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
467
|
+
kind: 'exclude';
|
|
468
|
+
expr: FilterExpression;
|
|
469
|
+
constructor(expr: FilterExpression);
|
|
469
470
|
}
|
|
470
471
|
declare function and(...args: FilterExpression[]): And;
|
|
471
472
|
declare function or(...args: FilterExpression[]): Or;
|
|
472
473
|
declare function not(expr: FilterExpression): Not;
|
|
473
474
|
declare function id(pattern: StringOrRegExp): Id;
|
|
474
|
-
declare function moduleType(pattern:
|
|
475
|
+
declare function moduleType(pattern: PluginModuleType): ModuleType$1;
|
|
475
476
|
declare function code(pattern: StringOrRegExp): Code;
|
|
476
477
|
declare function include(expr: FilterExpression): Include;
|
|
477
478
|
declare function exclude(expr: FilterExpression): Exclude$1;
|
|
478
479
|
|
|
479
480
|
//#endregion
|
|
480
481
|
//#region src/plugin/hook-filter.d.ts
|
|
481
|
-
type GeneralHookFilter<Value = StringOrRegExp> = MaybeArray<Value> | {
|
|
482
|
+
type GeneralHookFilter<Value = StringOrRegExp$1> = MaybeArray<Value> | {
|
|
482
483
|
include?: MaybeArray<Value>
|
|
483
484
|
exclude?: MaybeArray<Value>
|
|
484
485
|
};
|
|
@@ -767,7 +768,7 @@ type OverrideFilterObject = {
|
|
|
767
768
|
transform?: HookFilterExtension<"transform">["filter"]
|
|
768
769
|
resolveId?: HookFilterExtension<"resolveId">["filter"]
|
|
769
770
|
load?: HookFilterExtension<"load">["filter"]
|
|
770
|
-
pluginNamePattern?: StringOrRegExp[]
|
|
771
|
+
pluginNamePattern?: StringOrRegExp$1[]
|
|
771
772
|
};
|
|
772
773
|
declare function withFilter<
|
|
773
774
|
A,
|
|
@@ -957,7 +958,7 @@ interface ChecksOptions {
|
|
|
957
958
|
//#region src/options/input-options.d.ts
|
|
958
959
|
type InputOption = string | string[] | Record<string, string>;
|
|
959
960
|
type OxcTransformOption = Omit<TransformOptions, "sourceType" | "lang" | "cwd" | "sourcemap" | "jsx" | "define" | "inject" | "target">;
|
|
960
|
-
type ExternalOption = StringOrRegExp | StringOrRegExp[] | ((id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>);
|
|
961
|
+
type ExternalOption = StringOrRegExp$1 | StringOrRegExp$1[] | ((id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>);
|
|
961
962
|
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css">;
|
|
962
963
|
interface JsxOptions {
|
|
963
964
|
mode?: "classic" | "automatic" | "preserve";
|
|
@@ -975,8 +976,8 @@ interface WatcherOptions {
|
|
|
975
976
|
pollInterval?: number
|
|
976
977
|
compareContents?: boolean
|
|
977
978
|
};
|
|
978
|
-
include?: StringOrRegExp | StringOrRegExp[];
|
|
979
|
-
exclude?: StringOrRegExp | StringOrRegExp[];
|
|
979
|
+
include?: StringOrRegExp$1 | StringOrRegExp$1[];
|
|
980
|
+
exclude?: StringOrRegExp$1 | StringOrRegExp$1[];
|
|
980
981
|
}
|
|
981
982
|
type MakeAbsoluteExternalsRelative = boolean | "ifRelativeSource";
|
|
982
983
|
type HmrOptions = boolean | {
|
|
@@ -1129,4 +1130,4 @@ interface InputOptions {
|
|
|
1129
1130
|
}
|
|
1130
1131
|
|
|
1131
1132
|
//#endregion
|
|
1132
|
-
export { AddonFunction,
|
|
1133
|
+
export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin as BuiltinPlugin$1, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk$1 as PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION as VERSION$1, WarningHandlerWithDefault, WatchOptions, WatcherOptions, and, build as build$1, buildImportAnalysisPlugin as buildImportAnalysisPlugin$1, code, defineConfig as defineConfig$1, defineParallelPlugin, dynamicImportVarsPlugin as dynamicImportVarsPlugin$1, exclude, id, importGlobPlugin as importGlobPlugin$1, include, isolatedDeclarationPlugin as isolatedDeclarationPlugin$1, jsonPlugin as jsonPlugin$1, loadFallbackPlugin as loadFallbackPlugin$1, manifestPlugin as manifestPlugin$1, moduleFederationPlugin as moduleFederationPlugin$1, modulePreloadPolyfillPlugin as modulePreloadPolyfillPlugin$1, moduleType, not, or, reportPlugin as reportPlugin$1, rolldown as rolldown$1, viteResolvePlugin as viteResolvePlugin$1, wasmFallbackPlugin as wasmFallbackPlugin$1, wasmHelperPlugin as wasmHelperPlugin$1, watch as watch$1, withFilter };
|
|
@@ -120,7 +120,7 @@ type NullValue<T = void> = T | undefined | null | void;
|
|
|
120
120
|
type PartialNull<T> = { [P in keyof T] : T[P] | null };
|
|
121
121
|
type MakeAsync<Function_> = Function_ extends (this: infer This, ...parameters: infer Arguments) => infer Return ? (this: This, ...parameters: Arguments) => Return | Promise<Return> : never;
|
|
122
122
|
type MaybeArray<T> = T | T[];
|
|
123
|
-
type StringOrRegExp = string | RegExp;
|
|
123
|
+
type StringOrRegExp$1 = string | RegExp;
|
|
124
124
|
|
|
125
125
|
//#endregion
|
|
126
126
|
//#region src/options/output-options.d.ts
|
|
@@ -226,7 +226,7 @@ interface OutputOptions {
|
|
|
226
226
|
* If `test` is a regular expression, the module whose id matches the regular expression will be captured.
|
|
227
227
|
* if `test` is empty, any module will be considered as matched.
|
|
228
228
|
*/
|
|
229
|
-
test?: StringOrRegExp
|
|
229
|
+
test?: StringOrRegExp$1
|
|
230
230
|
/**
|
|
231
231
|
* - Type: `number`
|
|
232
232
|
*
|
|
@@ -423,62 +423,63 @@ interface NormalizedOutputOptions {
|
|
|
423
423
|
}
|
|
424
424
|
|
|
425
425
|
//#endregion
|
|
426
|
-
//#region
|
|
427
|
-
type
|
|
426
|
+
//#region ../pluginutils/dist/esm/composable-filters.d.ts
|
|
427
|
+
type StringOrRegExp = string | RegExp;
|
|
428
|
+
type PluginModuleType = 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'text' | 'base64' | 'dataurl' | 'binary' | 'empty' | (string & {});
|
|
428
429
|
type FilterExpression = And | Or | Not | Id | ModuleType$1 | Code | Include | Exclude$1;
|
|
429
430
|
type TopLevelFilterExpression = Include | Exclude$1;
|
|
430
431
|
declare class And {
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
432
|
+
kind: 'and';
|
|
433
|
+
args: FilterExpression[];
|
|
434
|
+
constructor(...args: FilterExpression[]);
|
|
434
435
|
}
|
|
435
436
|
declare class Or {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
437
|
+
kind: 'or';
|
|
438
|
+
args: FilterExpression[];
|
|
439
|
+
constructor(...args: FilterExpression[]);
|
|
439
440
|
}
|
|
440
441
|
declare class Not {
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
442
|
+
kind: 'not';
|
|
443
|
+
expr: FilterExpression;
|
|
444
|
+
constructor(expr: FilterExpression);
|
|
444
445
|
}
|
|
445
446
|
declare class Id {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
447
|
+
kind: 'id';
|
|
448
|
+
pattern: StringOrRegExp;
|
|
449
|
+
constructor(pattern: StringOrRegExp);
|
|
449
450
|
}
|
|
450
451
|
declare class ModuleType$1 {
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
452
|
+
kind: 'moduleType';
|
|
453
|
+
pattern: PluginModuleType;
|
|
454
|
+
constructor(pattern: PluginModuleType);
|
|
454
455
|
}
|
|
455
456
|
declare class Code {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
457
|
+
kind: 'code';
|
|
458
|
+
pattern: StringOrRegExp;
|
|
459
|
+
constructor(expr: StringOrRegExp);
|
|
459
460
|
}
|
|
460
461
|
declare class Include {
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
462
|
+
kind: 'include';
|
|
463
|
+
expr: FilterExpression;
|
|
464
|
+
constructor(expr: FilterExpression);
|
|
464
465
|
}
|
|
465
466
|
declare class Exclude$1 {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
467
|
+
kind: 'exclude';
|
|
468
|
+
expr: FilterExpression;
|
|
469
|
+
constructor(expr: FilterExpression);
|
|
469
470
|
}
|
|
470
471
|
declare function and(...args: FilterExpression[]): And;
|
|
471
472
|
declare function or(...args: FilterExpression[]): Or;
|
|
472
473
|
declare function not(expr: FilterExpression): Not;
|
|
473
474
|
declare function id(pattern: StringOrRegExp): Id;
|
|
474
|
-
declare function moduleType(pattern:
|
|
475
|
+
declare function moduleType(pattern: PluginModuleType): ModuleType$1;
|
|
475
476
|
declare function code(pattern: StringOrRegExp): Code;
|
|
476
477
|
declare function include(expr: FilterExpression): Include;
|
|
477
478
|
declare function exclude(expr: FilterExpression): Exclude$1;
|
|
478
479
|
|
|
479
480
|
//#endregion
|
|
480
481
|
//#region src/plugin/hook-filter.d.ts
|
|
481
|
-
type GeneralHookFilter<Value = StringOrRegExp> = MaybeArray<Value> | {
|
|
482
|
+
type GeneralHookFilter<Value = StringOrRegExp$1> = MaybeArray<Value> | {
|
|
482
483
|
include?: MaybeArray<Value>
|
|
483
484
|
exclude?: MaybeArray<Value>
|
|
484
485
|
};
|
|
@@ -767,7 +768,7 @@ type OverrideFilterObject = {
|
|
|
767
768
|
transform?: HookFilterExtension<"transform">["filter"]
|
|
768
769
|
resolveId?: HookFilterExtension<"resolveId">["filter"]
|
|
769
770
|
load?: HookFilterExtension<"load">["filter"]
|
|
770
|
-
pluginNamePattern?: StringOrRegExp[]
|
|
771
|
+
pluginNamePattern?: StringOrRegExp$1[]
|
|
771
772
|
};
|
|
772
773
|
declare function withFilter<
|
|
773
774
|
A,
|
|
@@ -957,7 +958,7 @@ interface ChecksOptions {
|
|
|
957
958
|
//#region src/options/input-options.d.ts
|
|
958
959
|
type InputOption = string | string[] | Record<string, string>;
|
|
959
960
|
type OxcTransformOption = Omit<TransformOptions, "sourceType" | "lang" | "cwd" | "sourcemap" | "jsx" | "define" | "inject" | "target">;
|
|
960
|
-
type ExternalOption = StringOrRegExp | StringOrRegExp[] | ((id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>);
|
|
961
|
+
type ExternalOption = StringOrRegExp$1 | StringOrRegExp$1[] | ((id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>);
|
|
961
962
|
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css">;
|
|
962
963
|
interface JsxOptions {
|
|
963
964
|
mode?: "classic" | "automatic" | "preserve";
|
|
@@ -975,8 +976,8 @@ interface WatcherOptions {
|
|
|
975
976
|
pollInterval?: number
|
|
976
977
|
compareContents?: boolean
|
|
977
978
|
};
|
|
978
|
-
include?: StringOrRegExp | StringOrRegExp[];
|
|
979
|
-
exclude?: StringOrRegExp | StringOrRegExp[];
|
|
979
|
+
include?: StringOrRegExp$1 | StringOrRegExp$1[];
|
|
980
|
+
exclude?: StringOrRegExp$1 | StringOrRegExp$1[];
|
|
980
981
|
}
|
|
981
982
|
type MakeAbsoluteExternalsRelative = boolean | "ifRelativeSource";
|
|
982
983
|
type HmrOptions = boolean | {
|
|
@@ -1129,4 +1130,4 @@ interface InputOptions {
|
|
|
1129
1130
|
}
|
|
1130
1131
|
|
|
1131
1132
|
//#endregion
|
|
1132
|
-
export { AddonFunction,
|
|
1133
|
+
export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk$1 as PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, and, build, buildImportAnalysisPlugin, code, defineConfig, defineParallelPlugin, dynamicImportVarsPlugin, exclude, id, importGlobPlugin, include, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleType, not, or, reportPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, withFilter };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_chunk = require('./chunk-qZFfknuJ.cjs');
|
|
3
|
-
const
|
|
3
|
+
const require_composable_filters = require('./composable-filters-Dbe8wGLg.cjs');
|
|
4
4
|
const require_parse_ast_index = require('./parse-ast-index-C4XbfZ6x.cjs');
|
|
5
5
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("../rolldown-binding.wasi.cjs"));
|
|
6
6
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
@@ -9,7 +9,7 @@ const node_os = require_chunk.__toESM(require("node:os"));
|
|
|
9
9
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "1.0.0-beta.8-commit.
|
|
12
|
+
var version = "1.0.0-beta.8-commit.56abf23";
|
|
13
13
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
@@ -114,7 +114,7 @@ const logLevelPriority = {
|
|
|
114
114
|
//#region src/log/log-handler.ts
|
|
115
115
|
const normalizeLog = (log) => typeof log === "string" ? { message: log } : typeof log === "function" ? normalizeLog(log()) : log;
|
|
116
116
|
function getLogHandler(level, code$1, logger, pluginName, logLevel) {
|
|
117
|
-
if (logLevelPriority[level] < logLevelPriority[logLevel]) return
|
|
117
|
+
if (logLevelPriority[level] < logLevelPriority[logLevel]) return require_composable_filters.noop;
|
|
118
118
|
return (log, pos) => {
|
|
119
119
|
if (pos != null) logger(LOG_LEVEL_WARN, require_parse_ast_index.logInvalidLogPosition(pluginName));
|
|
120
120
|
log = normalizeLog(log);
|
|
@@ -217,7 +217,7 @@ function normalizeHook(hook) {
|
|
|
217
217
|
meta: { order }
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
|
-
|
|
220
|
+
require_composable_filters.unreachable("Invalid hook type");
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
//#endregion
|
|
@@ -2183,7 +2183,7 @@ function joinNewLine(s1, s2) {
|
|
|
2183
2183
|
function transformModuleInfo(info, option) {
|
|
2184
2184
|
return {
|
|
2185
2185
|
get ast() {
|
|
2186
|
-
return
|
|
2186
|
+
return require_composable_filters.unsupported("ModuleInfo#ast");
|
|
2187
2187
|
},
|
|
2188
2188
|
get code() {
|
|
2189
2189
|
return info.code;
|
|
@@ -2266,15 +2266,15 @@ function t(...n) {
|
|
|
2266
2266
|
//#endregion
|
|
2267
2267
|
//#region src/plugin/bindingify-hook-filter.ts
|
|
2268
2268
|
function generalHookFilterMatcherToFilterExprs(matcher, stringKind) {
|
|
2269
|
-
if (typeof matcher === "string" || matcher instanceof RegExp) return [
|
|
2270
|
-
if (Array.isArray(matcher)) return matcher.map((m) =>
|
|
2269
|
+
if (typeof matcher === "string" || matcher instanceof RegExp) return [require_composable_filters.include(generateAtomMatcher(stringKind, matcher))];
|
|
2270
|
+
if (Array.isArray(matcher)) return matcher.map((m) => require_composable_filters.include(generateAtomMatcher(stringKind, m)));
|
|
2271
2271
|
let ret = [];
|
|
2272
|
-
if (matcher.exclude) ret.push(...
|
|
2273
|
-
if (matcher.include) ret.push(...
|
|
2272
|
+
if (matcher.exclude) ret.push(...require_composable_filters.arraify(matcher.exclude).map((m) => require_composable_filters.exclude(generateAtomMatcher(stringKind, m))));
|
|
2273
|
+
if (matcher.include) ret.push(...require_composable_filters.arraify(matcher.include).map((m) => require_composable_filters.include(generateAtomMatcher(stringKind, m))));
|
|
2274
2274
|
return ret;
|
|
2275
2275
|
}
|
|
2276
2276
|
function generateAtomMatcher(kind, matcher) {
|
|
2277
|
-
return kind === "code" ?
|
|
2277
|
+
return kind === "code" ? require_composable_filters.code(matcher) : require_composable_filters.id(matcher);
|
|
2278
2278
|
}
|
|
2279
2279
|
function transformFilterMatcherToFilterExprs(filterOption) {
|
|
2280
2280
|
if (!filterOption) return void 0;
|
|
@@ -2292,11 +2292,11 @@ function transformFilterMatcherToFilterExprs(filterOption) {
|
|
|
2292
2292
|
let andExprList = [];
|
|
2293
2293
|
if (moduleType$1) {
|
|
2294
2294
|
let moduleTypes = Array.isArray(moduleType$1) ? moduleType$1 : moduleType$1.include ?? [];
|
|
2295
|
-
andExprList.push(
|
|
2295
|
+
andExprList.push(require_composable_filters.or(...moduleTypes.map((m) => require_composable_filters.moduleType(m))));
|
|
2296
2296
|
}
|
|
2297
|
-
if (idIncludes.length) andExprList.push(
|
|
2298
|
-
if (codeIncludes.length) andExprList.push(
|
|
2299
|
-
if (andExprList.length) ret.push(
|
|
2297
|
+
if (idIncludes.length) andExprList.push(require_composable_filters.or(...idIncludes.map((item) => item.expr)));
|
|
2298
|
+
if (codeIncludes.length) andExprList.push(require_composable_filters.or(...codeIncludes.map((item) => item.expr)));
|
|
2299
|
+
if (andExprList.length) ret.push(require_composable_filters.include(require_composable_filters.and(...andExprList)));
|
|
2300
2300
|
return ret;
|
|
2301
2301
|
}
|
|
2302
2302
|
function bindingifyGeneralHookFilter(stringKind, pattern) {
|
|
@@ -2471,12 +2471,12 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
2471
2471
|
const info = this.data.getModuleOption(res.id) || {};
|
|
2472
2472
|
return {
|
|
2473
2473
|
...res,
|
|
2474
|
-
external: res.external === "relative" ?
|
|
2474
|
+
external: res.external === "relative" ? require_composable_filters.unreachable(`The PluginContext resolve result external couldn't be 'relative'`) : res.external,
|
|
2475
2475
|
...info
|
|
2476
2476
|
};
|
|
2477
2477
|
}
|
|
2478
2478
|
emitFile = (file) => {
|
|
2479
|
-
if (file.type === "prebuilt-chunk") return
|
|
2479
|
+
if (file.type === "prebuilt-chunk") return require_composable_filters.unimplemented("PluginContext.emitFile with type prebuilt-chunk");
|
|
2480
2480
|
if (file.type === "chunk") return this.context.emitChunk(file);
|
|
2481
2481
|
const fnSanitizedFileName = file.fileName || typeof this.outputOptions.sanitizeFileName !== "function" ? void 0 : this.outputOptions.sanitizeFileName(file.name || "asset");
|
|
2482
2482
|
const filename = file.fileName ? void 0 : this.getAssetFileNames(file);
|
|
@@ -2821,7 +2821,7 @@ function bindingifyFormat(format) {
|
|
|
2821
2821
|
case "iife": return "iife";
|
|
2822
2822
|
case "umd": return "umd";
|
|
2823
2823
|
case "experimental-app": return "app";
|
|
2824
|
-
default:
|
|
2824
|
+
default: require_composable_filters.unimplemented(`output.format: ${format}`);
|
|
2825
2825
|
}
|
|
2826
2826
|
}
|
|
2827
2827
|
function bindingifySourcemap(sourcemap) {
|
|
@@ -3615,7 +3615,7 @@ function bindingifyExternal(external) {
|
|
|
3615
3615
|
if (id$1.startsWith("\0")) return false;
|
|
3616
3616
|
return external(id$1, importer, isResolved) ?? false;
|
|
3617
3617
|
};
|
|
3618
|
-
const externalArr =
|
|
3618
|
+
const externalArr = require_composable_filters.arraify(external);
|
|
3619
3619
|
return (id$1, _importer, _isResolved) => {
|
|
3620
3620
|
return externalArr.some((pat) => {
|
|
3621
3621
|
if (pat instanceof RegExp) return pat.test(id$1);
|
|
@@ -3630,7 +3630,7 @@ function bindingifyResolve(resolve) {
|
|
|
3630
3630
|
return {
|
|
3631
3631
|
alias: alias ? Object.entries(alias).map(([name, replacement]) => ({
|
|
3632
3632
|
find: name,
|
|
3633
|
-
replacements:
|
|
3633
|
+
replacements: require_composable_filters.arraify(replacement)
|
|
3634
3634
|
})) : void 0,
|
|
3635
3635
|
extensionAlias: extensionAlias ? Object.entries(extensionAlias).map(([name, value]) => ({
|
|
3636
3636
|
target: name,
|
|
@@ -3877,7 +3877,7 @@ function createComposedPlugin(plugins) {
|
|
|
3877
3877
|
if (symbolForCallerThatSkipSelf === handlerSymbol) continue;
|
|
3878
3878
|
const { handler: handlerFn } = normalizeHook(handler);
|
|
3879
3879
|
const result = await handlerFn.call(applyFixedPluginResolveFn(this, plugin), source, importer, rawHookResolveIdOptions);
|
|
3880
|
-
if (!
|
|
3880
|
+
if (!require_composable_filters.isNullish(result)) return result;
|
|
3881
3881
|
}
|
|
3882
3882
|
};
|
|
3883
3883
|
}
|
|
@@ -3903,7 +3903,7 @@ function createComposedPlugin(plugins) {
|
|
|
3903
3903
|
for (const [handler, plugin] of batchedHandlers) {
|
|
3904
3904
|
const { handler: handlerFn } = normalizeHook(handler);
|
|
3905
3905
|
const result = await handlerFn.call(applyFixedPluginResolveFn(this, plugin), id$1);
|
|
3906
|
-
if (!
|
|
3906
|
+
if (!require_composable_filters.isNullish(result)) return result;
|
|
3907
3907
|
}
|
|
3908
3908
|
};
|
|
3909
3909
|
}
|
|
@@ -3925,7 +3925,7 @@ function createComposedPlugin(plugins) {
|
|
|
3925
3925
|
throw new Error(`The getCombinedSourcemap is not implement in transform hook at composedJsPlugins`);
|
|
3926
3926
|
};
|
|
3927
3927
|
const result = await handlerFn.call(applyFixedPluginResolveFn(this, plugin), code$1, id$1, moduleType$1);
|
|
3928
|
-
if (!
|
|
3928
|
+
if (!require_composable_filters.isNullish(result)) {
|
|
3929
3929
|
if (typeof result === "string") updateOutput(result);
|
|
3930
3930
|
else if (result.code) updateOutput(result.code, result.moduleSideEffects);
|
|
3931
3931
|
}
|
|
@@ -3957,7 +3957,7 @@ function createComposedPlugin(plugins) {
|
|
|
3957
3957
|
for (const [handler, plugin] of batchedHandlers) {
|
|
3958
3958
|
const { handler: handlerFn } = normalizeHook(handler);
|
|
3959
3959
|
const result = await handlerFn.call(applyFixedPluginResolveFn(this, plugin), code$1, chunk, options, meta);
|
|
3960
|
-
if (!
|
|
3960
|
+
if (!require_composable_filters.isNullish(result)) return result;
|
|
3961
3961
|
}
|
|
3962
3962
|
};
|
|
3963
3963
|
}
|
|
@@ -4337,8 +4337,8 @@ var Watcher = class {
|
|
|
4337
4337
|
}
|
|
4338
4338
|
};
|
|
4339
4339
|
async function createWatcher(emitter, input) {
|
|
4340
|
-
const options =
|
|
4341
|
-
const bundlerOptions = await Promise.all(options.map((option) =>
|
|
4340
|
+
const options = require_composable_filters.arraify(input);
|
|
4341
|
+
const bundlerOptions = await Promise.all(options.map((option) => require_composable_filters.arraify(option.output || {}).map(async (output) => {
|
|
4342
4342
|
const inputOptions = await PluginDriver.callOptionsHook(option, true);
|
|
4343
4343
|
return createBundlerOptions(inputOptions, output, true);
|
|
4344
4344
|
})).flat());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __esm } from "./chunk-DSsiIF1Z.mjs";
|
|
2
|
-
import { and, arraify, code, exclude, id, include,
|
|
2
|
+
import { and$1 as and, arraify, code$1 as code, exclude$1 as exclude, id$1 as id, include$1 as include, init_esm, init_misc, isNullish, moduleType$1 as moduleType, noop, or$1 as or, unimplemented, unreachable, unsupported } from "./esm-CW9DP8HJ.mjs";
|
|
3
3
|
import { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-D_ZB9M77.mjs";
|
|
4
4
|
import { BindingCallableBuiltinPlugin, BindingHookSideEffects, BindingLogLevel, BindingPluginOrder, BindingWatcher, Bundler, ParallelJsPluginRegistry, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
|
|
5
5
|
import path from "node:path";
|
|
@@ -8,7 +8,7 @@ import { availableParallelism } from "node:os";
|
|
|
8
8
|
import { Worker } from "node:worker_threads";
|
|
9
9
|
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version = "1.0.0-beta.8-commit.
|
|
11
|
+
var version = "1.0.0-beta.8-commit.56abf23";
|
|
12
12
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
@@ -3623,8 +3623,8 @@ function bindingifyRenderChunkFilter(filterOption) {
|
|
|
3623
3623
|
return filterOption.code ? bindingifyGeneralHookFilter("code", filterOption.code) : void 0;
|
|
3624
3624
|
}
|
|
3625
3625
|
var init_bindingify_hook_filter = __esm({ "src/plugin/bindingify-hook-filter.ts"() {
|
|
3626
|
+
init_esm();
|
|
3626
3627
|
init_dist();
|
|
3627
|
-
init_filter_index();
|
|
3628
3628
|
init_misc();
|
|
3629
3629
|
} });
|
|
3630
3630
|
|