@rolldown/browser 1.0.0-beta.8-commit.852c603 → 1.0.0-beta.8-commit.baf6ca1

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.
Files changed (35) hide show
  1. package/dist/browser.mjs +113 -119
  2. package/dist/cli.cjs +7 -7
  3. package/dist/cli.mjs +3 -3
  4. package/dist/experimental-index.cjs +3 -3
  5. package/dist/experimental-index.d.cts +1 -1
  6. package/dist/experimental-index.d.mts +1 -1
  7. package/dist/experimental-index.mjs +3 -3
  8. package/dist/filter-index.cjs +12 -0
  9. package/dist/{filter-expression-index.d.cts → filter-index.d.cts} +2 -2
  10. package/dist/{filter-expression-index.d.mts → filter-index.d.mts} +2 -2
  11. package/dist/filter-index.mjs +4 -0
  12. package/dist/index.cjs +4 -5
  13. package/dist/index.d.cts +2 -2
  14. package/dist/index.d.mts +2 -2
  15. package/dist/index.mjs +4 -4
  16. package/dist/parallel-plugin-worker.cjs +3 -3
  17. package/dist/parallel-plugin-worker.mjs +3 -3
  18. package/dist/parallel-plugin.d.cts +1 -1
  19. package/dist/parallel-plugin.d.mts +1 -1
  20. package/dist/parse-ast-index.cjs +1 -1
  21. package/dist/parse-ast-index.mjs +1 -1
  22. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  23. package/dist/shared/filter-index-ChddWdsi.cjs +255 -0
  24. package/dist/shared/filter-index-DmisSKZF.mjs +174 -0
  25. package/dist/shared/{input-options.d-D_2wMOSn.d.mts → input-options.d-9IzFBPMw.d.mts} +13 -16
  26. package/dist/shared/{input-options.d-C0G2toUx.d.cts → input-options.d-BFt2wKBM.d.cts} +13 -16
  27. package/dist/shared/{src-RM00Zc4c.mjs → src-DN1_B1_m.mjs} +53 -126
  28. package/dist/shared/{src-DbbYa-_8.cjs → src-glXqJCVJ.cjs} +64 -138
  29. package/package.json +1 -1
  30. package/dist/filter-expression-index.cjs +0 -11
  31. package/dist/filter-expression-index.mjs +0 -4
  32. package/dist/shared/filter-expression-index-CIS7Rrin.mjs +0 -69
  33. package/dist/shared/filter-expression-index-CRtoeipP.cjs +0 -119
  34. /package/dist/shared/{parse-ast-index-DWHg_E7J.mjs → parse-ast-index-B5wGnMSg.mjs} +0 -0
  35. /package/dist/shared/{parse-ast-index-B9pj8J1q.cjs → parse-ast-index-DTWvag1h.cjs} +0 -0
package/dist/browser.mjs CHANGED
@@ -5,7 +5,7 @@ import colors from "ansis";
5
5
  import * as v from "valibot";
6
6
 
7
7
  //#region package.json
8
- var version = "1.0.0-beta.8-commit.852c603";
8
+ var version = "1.0.0-beta.8-commit.baf6ca1";
9
9
 
10
10
  //#endregion
11
11
  //#region src/builtin-plugin/utils.ts
@@ -33,9 +33,6 @@ function arraify(value) {
33
33
  function isNullish(value) {
34
34
  return value === null || value === void 0;
35
35
  }
36
- function isPromiseLike(value) {
37
- return value && (typeof value === "object" || typeof value === "function") && typeof value.then === "function";
38
- }
39
36
  function unimplemented(info) {
40
37
  if (info) throw new Error(`unimplemented: ${info}`);
41
38
  throw new Error("unimplemented");
@@ -1097,50 +1094,85 @@ function t(...n) {
1097
1094
  }
1098
1095
 
1099
1096
  //#endregion
1100
- //#region src/filter-expression-index.ts
1101
- function and(left, right) {
1102
- return {
1103
- kind: "and",
1104
- left,
1105
- right
1106
- };
1097
+ //#region src/filter-index.ts
1098
+ var And = class {
1099
+ kind;
1100
+ args;
1101
+ constructor(...args) {
1102
+ if (args.length === 0) throw new Error("`And` expects at least one operand");
1103
+ this.args = args;
1104
+ this.kind = "and";
1105
+ }
1106
+ };
1107
+ var Or = class {
1108
+ kind;
1109
+ args;
1110
+ constructor(...args) {
1111
+ if (args.length === 0) throw new Error("`Or` expects at least one operand");
1112
+ this.args = args;
1113
+ this.kind = "or";
1114
+ }
1115
+ };
1116
+ var Id = class {
1117
+ kind;
1118
+ pattern;
1119
+ constructor(pattern) {
1120
+ this.pattern = pattern;
1121
+ this.kind = "id";
1122
+ }
1123
+ };
1124
+ var ModuleType = class {
1125
+ kind;
1126
+ pattern;
1127
+ constructor(pattern) {
1128
+ this.pattern = pattern;
1129
+ this.kind = "moduleType";
1130
+ }
1131
+ };
1132
+ var Code = class {
1133
+ kind;
1134
+ pattern;
1135
+ constructor(expr) {
1136
+ this.pattern = expr;
1137
+ this.kind = "code";
1138
+ }
1139
+ };
1140
+ var Include = class {
1141
+ kind;
1142
+ expr;
1143
+ constructor(expr) {
1144
+ this.expr = expr;
1145
+ this.kind = "include";
1146
+ }
1147
+ };
1148
+ var Exclude = class {
1149
+ kind;
1150
+ expr;
1151
+ constructor(expr) {
1152
+ this.expr = expr;
1153
+ this.kind = "exclude";
1154
+ }
1155
+ };
1156
+ function and(...args) {
1157
+ return new And(...args);
1107
1158
  }
1108
- function or(left, right) {
1109
- return {
1110
- kind: "or",
1111
- left,
1112
- right
1113
- };
1159
+ function or(...args) {
1160
+ return new Or(...args);
1114
1161
  }
1115
1162
  function id(pattern) {
1116
- return {
1117
- kind: "id",
1118
- pattern
1119
- };
1163
+ return new Id(pattern);
1120
1164
  }
1121
1165
  function moduleType(pattern) {
1122
- return {
1123
- kind: "moduleType",
1124
- pattern
1125
- };
1166
+ return new ModuleType(pattern);
1126
1167
  }
1127
1168
  function code(pattern) {
1128
- return {
1129
- kind: "code",
1130
- pattern
1131
- };
1169
+ return new Code(pattern);
1132
1170
  }
1133
1171
  function include(expr) {
1134
- return {
1135
- kind: "include",
1136
- expr
1137
- };
1172
+ return new Include(expr);
1138
1173
  }
1139
1174
  function exclude(expr) {
1140
- return {
1141
- kind: "exclude",
1142
- expr
1143
- };
1175
+ return new Exclude(expr);
1144
1176
  }
1145
1177
 
1146
1178
  //#endregion
@@ -1148,7 +1180,6 @@ function exclude(expr) {
1148
1180
  function generalHookFilterMatcherToFilterExprs(matcher, stringKind) {
1149
1181
  if (typeof matcher === "string" || matcher instanceof RegExp) return [include(id(matcher))];
1150
1182
  if (Array.isArray(matcher)) return matcher.map((m) => include(id(m)));
1151
- if (matcher.custom) return matcher.custom;
1152
1183
  let ret = [];
1153
1184
  let isCode = stringKind === "code";
1154
1185
  if (matcher.exclude) ret.push(...arraify(matcher.exclude).map((m) => exclude(isCode ? code(m) : id(m))));
@@ -1157,8 +1188,8 @@ function generalHookFilterMatcherToFilterExprs(matcher, stringKind) {
1157
1188
  }
1158
1189
  function transformFilterMatcherToFilterExprs(filterOption) {
1159
1190
  if (!filterOption) return void 0;
1160
- const { id: id$1, code: code$1, moduleType: moduleType$1, custom } = filterOption;
1161
- if (custom) return custom;
1191
+ if (Array.isArray(filterOption)) return filterOption;
1192
+ const { id: id$1, code: code$1, moduleType: moduleType$1 } = filterOption;
1162
1193
  let ret = [];
1163
1194
  let idIncludes = [];
1164
1195
  let idExcludes = [];
@@ -1168,33 +1199,21 @@ function transformFilterMatcherToFilterExprs(filterOption) {
1168
1199
  if (code$1) [codeIncludes, codeExcludes] = d(generalHookFilterMatcherToFilterExprs(code$1, "code") ?? [], (m) => m.kind === "include");
1169
1200
  ret.push(...idExcludes);
1170
1201
  ret.push(...codeExcludes);
1171
- let cursor;
1202
+ let andExprList = [];
1172
1203
  if (moduleType$1) {
1173
1204
  let moduleTypes = Array.isArray(moduleType$1) ? moduleType$1 : moduleType$1.include ?? [];
1174
- cursor = joinFilterExprsWithOr(moduleTypes.map((m) => moduleType(m)));
1175
- }
1176
- if (idIncludes.length) {
1177
- let joinedOrExpr = joinFilterExprsWithOr(idIncludes.map((item) => item.expr));
1178
- if (!cursor) cursor = joinedOrExpr;
1179
- else cursor = and(cursor, joinedOrExpr);
1180
- }
1181
- if (codeIncludes.length) {
1182
- let joinedOrExpr = joinFilterExprsWithOr(codeIncludes.map((item) => item.expr));
1183
- if (!cursor) cursor = joinedOrExpr;
1184
- else cursor = and(cursor, joinedOrExpr);
1205
+ andExprList.push(or(...moduleTypes.map((m) => moduleType(m))));
1185
1206
  }
1186
- if (cursor) ret.push(include(cursor));
1207
+ if (idIncludes.length) andExprList.push(or(...idIncludes.map((item) => item.expr)));
1208
+ if (codeIncludes.length) andExprList.push(or(...codeIncludes.map((item) => item.expr)));
1209
+ if (andExprList.length) ret.push(include(and(...andExprList)));
1187
1210
  return ret;
1188
1211
  }
1189
- function joinFilterExprsWithOr(filterExprs) {
1190
- if (filterExprs.length === 1) return filterExprs[0];
1191
- return or(filterExprs[0], joinFilterExprsWithOr(filterExprs.slice(1)));
1192
- }
1193
- function bindingifyGeneralHookFilter(matcher, stringKind) {
1194
- let filterExprs = generalHookFilterMatcherToFilterExprs(matcher, stringKind);
1195
- let custom = [];
1196
- if (filterExprs) custom = filterExprs.map(bindingifyFilterExpr);
1197
- return { custom: custom.length > 0 ? custom : void 0 };
1212
+ function bindingifyGeneralHookFilter(stringKind, pattern) {
1213
+ let filterExprs = generalHookFilterMatcherToFilterExprs(pattern, stringKind);
1214
+ let ret = [];
1215
+ if (filterExprs) ret = filterExprs.map(bindingifyFilterExpr);
1216
+ return ret.length > 0 ? { value: ret } : void 0;
1198
1217
  }
1199
1218
  function bindingifyFilterExpr(expr) {
1200
1219
  let list = [];
@@ -1204,9 +1223,21 @@ function bindingifyFilterExpr(expr) {
1204
1223
  function bindingifyFilterExprImpl(expr, list) {
1205
1224
  switch (expr.kind) {
1206
1225
  case "and": {
1207
- bindingifyFilterExprImpl(expr.right, list);
1208
- bindingifyFilterExprImpl(expr.left, list);
1209
- list.push({ kind: "And" });
1226
+ let args = expr.args;
1227
+ for (let i$1 = args.length - 1; i$1 >= 0; i$1--) bindingifyFilterExprImpl(args[i$1], list);
1228
+ list.push({
1229
+ kind: "And",
1230
+ payload: args.length
1231
+ });
1232
+ break;
1233
+ }
1234
+ case "or": {
1235
+ let args = expr.args;
1236
+ for (let i$1 = args.length - 1; i$1 >= 0; i$1--) bindingifyFilterExprImpl(args[i$1], list);
1237
+ list.push({
1238
+ kind: "Or",
1239
+ payload: args.length
1240
+ });
1210
1241
  break;
1211
1242
  }
1212
1243
  case "not": {
@@ -1217,21 +1248,21 @@ function bindingifyFilterExprImpl(expr, list) {
1217
1248
  case "id": {
1218
1249
  list.push({
1219
1250
  kind: "Id",
1220
- value: expr.pattern
1251
+ payload: expr.pattern
1221
1252
  });
1222
1253
  break;
1223
1254
  }
1224
1255
  case "moduleType": {
1225
1256
  list.push({
1226
1257
  kind: "ModuleType",
1227
- value: expr.pattern
1258
+ payload: expr.pattern
1228
1259
  });
1229
1260
  break;
1230
1261
  }
1231
1262
  case "code": {
1232
1263
  list.push({
1233
1264
  kind: "Code",
1234
- value: expr.pattern
1265
+ payload: expr.pattern
1235
1266
  });
1236
1267
  break;
1237
1268
  }
@@ -1245,27 +1276,30 @@ function bindingifyFilterExprImpl(expr, list) {
1245
1276
  list.push({ kind: "Exclude" });
1246
1277
  break;
1247
1278
  }
1248
- default: throw new Error(`Unknown filter expression kind: ${expr.kind}`);
1279
+ default: throw new Error(`Unknown filter expression: ${expr}`);
1249
1280
  }
1250
1281
  }
1251
1282
  function bindingifyResolveIdFilter(filterOption) {
1252
- return filterOption?.id ? bindingifyGeneralHookFilter(filterOption.id, "id") : void 0;
1283
+ if (!filterOption) return void 0;
1284
+ if (Array.isArray(filterOption)) return { value: filterOption.map(bindingifyFilterExpr) };
1285
+ return filterOption.id ? bindingifyGeneralHookFilter("id", filterOption.id) : void 0;
1253
1286
  }
1254
1287
  function bindingifyLoadFilter(filterOption) {
1255
- return filterOption?.id ? bindingifyGeneralHookFilter(filterOption.id, "id") : void 0;
1288
+ if (!filterOption) return void 0;
1289
+ if (Array.isArray(filterOption)) return { value: filterOption.map(bindingifyFilterExpr) };
1290
+ return filterOption.id ? bindingifyGeneralHookFilter("id", filterOption.id) : void 0;
1256
1291
  }
1257
1292
  function bindingifyTransformFilter(filterOption) {
1258
1293
  if (!filterOption) return void 0;
1259
- let custom = transformFilterMatcherToFilterExprs(filterOption);
1294
+ let filterExprs = transformFilterMatcherToFilterExprs(filterOption);
1260
1295
  let ret = [];
1261
- if (custom) ret = custom.map(bindingifyFilterExpr);
1262
- return { custom: ret.length > 0 ? ret : void 0 };
1296
+ if (filterExprs) ret = filterExprs.map(bindingifyFilterExpr);
1297
+ return { value: ret.length > 0 ? ret : void 0 };
1263
1298
  }
1264
1299
  function bindingifyRenderChunkFilter(filterOption) {
1265
- if (filterOption) {
1266
- const { code: code$1 } = filterOption;
1267
- return { custom: code$1 ? bindingifyGeneralHookFilter(code$1, "code").custom : void 0 };
1268
- }
1300
+ if (!filterOption) return void 0;
1301
+ if (Array.isArray(filterOption)) return { value: filterOption.map(bindingifyFilterExpr) };
1302
+ return filterOption.code ? bindingifyGeneralHookFilter("code", filterOption.code) : void 0;
1269
1303
  }
1270
1304
 
1271
1305
  //#endregion
@@ -3250,46 +3284,6 @@ const watch = (input) => {
3250
3284
  return emitter;
3251
3285
  };
3252
3286
 
3253
- //#endregion
3254
- //#region src/plugin/with-filter.ts
3255
- function withFilterImpl(pluginOption, filterObjectList) {
3256
- if (isPromiseLike(pluginOption)) return pluginOption.then((p) => withFilter(p, filterObjectList));
3257
- if (pluginOption == false || pluginOption == null) return pluginOption;
3258
- if (Array.isArray(pluginOption)) return pluginOption.map((p) => withFilter(p, filterObjectList));
3259
- let plugin = pluginOption;
3260
- let filterObjectIndex = findMatchedFilterObject(plugin.name, filterObjectList);
3261
- if (filterObjectIndex === -1) return plugin;
3262
- let filterObject = filterObjectList[filterObjectIndex];
3263
- Object.keys(plugin).forEach((key) => {
3264
- switch (key) {
3265
- case "transform":
3266
- case "resolveId":
3267
- case "load":
3268
- if (!plugin[key]) return;
3269
- if (typeof plugin[key] === "object") plugin[key].filter = filterObject[key] ?? plugin[key].filter;
3270
- else plugin[key] = {
3271
- handler: plugin[key],
3272
- filter: filterObject[key]
3273
- };
3274
- break;
3275
- default: break;
3276
- }
3277
- });
3278
- return plugin;
3279
- }
3280
- function withFilter(pluginOption, filterObject) {
3281
- return withFilterImpl(pluginOption, arraify(filterObject));
3282
- }
3283
- function findMatchedFilterObject(pluginName, overrideFilterObjectList) {
3284
- if (overrideFilterObjectList.length === 1 && overrideFilterObjectList[0].pluginNamePattern === void 0) return 0;
3285
- for (let i$1 = 0; i$1 < overrideFilterObjectList.length; i$1++) for (let j = 0; j < (overrideFilterObjectList[i$1].pluginNamePattern ?? []).length; j++) {
3286
- let pattern = overrideFilterObjectList[i$1].pluginNamePattern[j];
3287
- if (typeof pattern === "string" && pattern === pluginName) return i$1;
3288
- else if (pattern instanceof RegExp && pattern.test(pluginName)) return i$1;
3289
- }
3290
- return -1;
3291
- }
3292
-
3293
3287
  //#endregion
3294
3288
  //#region src/utils/define-config.ts
3295
3289
  function defineConfig(config) {
@@ -3301,4 +3295,4 @@ function defineConfig(config) {
3301
3295
  const VERSION = version;
3302
3296
 
3303
3297
  //#endregion
3304
- export { VERSION, build, defineConfig, rolldown, watch, withFilter };
3298
+ export { VERSION, build, defineConfig, rolldown, watch };
package/dist/cli.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
2
- const require_src = require('./shared/src-DbbYa-_8.cjs');
3
- require('./shared/parse-ast-index-B9pj8J1q.cjs');
4
- require('./shared/filter-expression-index-CRtoeipP.cjs');
2
+ const require_src = require('./shared/src-glXqJCVJ.cjs');
3
+ const require_filter_index = require('./shared/filter-index-ChddWdsi.cjs');
4
+ require('./shared/parse-ast-index-DTWvag1h.cjs');
5
5
  const node_path = require_chunk.__toESM(require("node:path"));
6
6
  const ansis = require_chunk.__toESM(require("ansis"));
7
7
  const node_process = require_chunk.__toESM(require("node:process"));
@@ -1664,11 +1664,11 @@ async function bundleWithCliOptions(cliOptions) {
1664
1664
  }
1665
1665
  }
1666
1666
  async function watchInner(config, cliOptions) {
1667
- let normalizedConfig = require_src.arraify(config).map((option) => {
1667
+ let normalizedConfig = require_filter_index.arraify(config).map((option) => {
1668
1668
  return {
1669
1669
  ...option,
1670
1670
  ...cliOptions.input,
1671
- output: require_src.arraify(option.output || {}).map((output) => {
1671
+ output: require_filter_index.arraify(option.output || {}).map((output) => {
1672
1672
  return {
1673
1673
  ...output,
1674
1674
  ...cliOptions.output
@@ -1707,9 +1707,9 @@ async function watchInner(config, cliOptions) {
1707
1707
  async function bundleInner(config, cliOptions) {
1708
1708
  const startTime = node_perf_hooks.performance.now();
1709
1709
  const result = [];
1710
- const configList = require_src.arraify(config);
1710
+ const configList = require_filter_index.arraify(config);
1711
1711
  for (const config$1 of configList) {
1712
- const outputList = require_src.arraify(config$1.output || {});
1712
+ const outputList = require_filter_index.arraify(config$1.output || {});
1713
1713
  const build = await require_src.rolldown({
1714
1714
  ...config$1,
1715
1715
  ...cliOptions.input
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { __commonJS, __esm, __toESM } from "./shared/chunk-DSsiIF1Z.mjs";
2
- import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_misc, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-RM00Zc4c.mjs";
3
- import "./shared/parse-ast-index-DWHg_E7J.mjs";
4
- import "./shared/filter-expression-index-CIS7Rrin.mjs";
2
+ import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-DN1_B1_m.mjs";
3
+ import { arraify, init_misc } from "./shared/filter-index-DmisSKZF.mjs";
4
+ import "./shared/parse-ast-index-B5wGnMSg.mjs";
5
5
  import path, { sep } from "node:path";
6
6
  import colors from "ansis";
7
7
  import process$1, { cwd } from "node:process";
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('./shared/src-DbbYa-_8.cjs');
4
- require('./shared/parse-ast-index-B9pj8J1q.cjs');
5
- require('./shared/filter-expression-index-CRtoeipP.cjs');
3
+ const require_src = require('./shared/src-glXqJCVJ.cjs');
4
+ require('./shared/filter-index-ChddWdsi.cjs');
5
+ require('./shared/parse-ast-index-DTWvag1h.cjs');
6
6
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
7
7
  const node_url = require_chunk.__toESM(require("node:url"));
8
8
 
@@ -1,4 +1,4 @@
1
- import { BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/input-options.d-C0G2toUx.cjs";
1
+ import { BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/input-options.d-BFt2wKBM.cjs";
2
2
  import { BindingReplacePluginConfig, BindingTransformPluginConfig, TransformOptions, TransformResult, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
3
3
 
4
4
  //#region src/api/experimental.d.ts
@@ -1,4 +1,4 @@
1
- import { BuiltinPlugin$1 as BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin$1 as buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin$1 as dynamicImportVarsPlugin, importGlobPlugin$1 as importGlobPlugin, isolatedDeclarationPlugin$1 as isolatedDeclarationPlugin, jsonPlugin$1 as jsonPlugin, loadFallbackPlugin$1 as loadFallbackPlugin, manifestPlugin$1 as manifestPlugin, moduleFederationPlugin$1 as moduleFederationPlugin, modulePreloadPolyfillPlugin$1 as modulePreloadPolyfillPlugin, reportPlugin$1 as reportPlugin, viteResolvePlugin$1 as viteResolvePlugin, wasmFallbackPlugin$1 as wasmFallbackPlugin, wasmHelperPlugin$1 as wasmHelperPlugin } from "./shared/input-options.d-D_2wMOSn.mjs";
1
+ import { BuiltinPlugin$1 as BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin$1 as buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin$1 as dynamicImportVarsPlugin, importGlobPlugin$1 as importGlobPlugin, isolatedDeclarationPlugin$1 as isolatedDeclarationPlugin, jsonPlugin$1 as jsonPlugin, loadFallbackPlugin$1 as loadFallbackPlugin, manifestPlugin$1 as manifestPlugin, moduleFederationPlugin$1 as moduleFederationPlugin, modulePreloadPolyfillPlugin$1 as modulePreloadPolyfillPlugin, reportPlugin$1 as reportPlugin, viteResolvePlugin$1 as viteResolvePlugin, wasmFallbackPlugin$1 as wasmFallbackPlugin, wasmHelperPlugin$1 as wasmHelperPlugin } from "./shared/input-options.d-9IzFBPMw.mjs";
2
2
  import { BindingReplacePluginConfig, BindingTransformPluginConfig, TransformOptions, TransformResult, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
3
3
 
4
4
  //#region src/api/experimental.d.ts
@@ -1,6 +1,6 @@
1
- import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-RM00Zc4c.mjs";
2
- import "./shared/parse-ast-index-DWHg_E7J.mjs";
3
- import "./shared/filter-expression-index-CIS7Rrin.mjs";
1
+ import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-DN1_B1_m.mjs";
2
+ import "./shared/filter-index-DmisSKZF.mjs";
3
+ import "./shared/parse-ast-index-B5wGnMSg.mjs";
4
4
  import { moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
5
5
  import { pathToFileURL } from "node:url";
6
6
 
@@ -0,0 +1,12 @@
1
+ const require_filter_index = require('./shared/filter-index-ChddWdsi.cjs');
2
+
3
+ exports.And = require_filter_index.And
4
+ exports.and = require_filter_index.and
5
+ exports.code = require_filter_index.code
6
+ exports.exclude = require_filter_index.exclude
7
+ exports.id = require_filter_index.id
8
+ exports.include = require_filter_index.include
9
+ exports.moduleType = require_filter_index.moduleType
10
+ exports.not = require_filter_index.not
11
+ exports.or = require_filter_index.or
12
+ exports.withFilter = require_filter_index.withFilter
@@ -1,3 +1,3 @@
1
- import { And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and, code, exclude, id, include, moduleType, not, or } from "./shared/input-options.d-C0G2toUx.cjs";
1
+ import { And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and, code, exclude, id, include, moduleType, not, or, withFilter } from "./shared/input-options.d-BFt2wKBM.cjs";
2
2
 
3
- export { And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and, code, exclude, id, include, moduleType, not, or };
3
+ export { And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and, code, exclude, id, include, moduleType, not, or, withFilter };
@@ -1,3 +1,3 @@
1
- import { And$1 as And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and$1 as and, code$1 as code, exclude$1 as exclude, id$1 as id, include$1 as include, moduleType$1 as moduleType, not$1 as not, or$1 as or } from "./shared/input-options.d-D_2wMOSn.mjs";
1
+ import { And$1 as And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and$1 as and, code$1 as code, exclude$1 as exclude, id$1 as id, include$1 as include, moduleType$1 as moduleType, not$1 as not, or$1 as or, withFilter$1 as withFilter } from "./shared/input-options.d-9IzFBPMw.mjs";
2
2
 
3
- export { And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and, code, exclude, id, include, moduleType, not, or };
3
+ export { And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and, code, exclude, id, include, moduleType, not, or, withFilter };
@@ -0,0 +1,4 @@
1
+ import { And, and, code, exclude, id, include, init_filter_index, moduleType, not, or, withFilter } from "./shared/filter-index-DmisSKZF.mjs";
2
+
3
+ init_filter_index();
4
+ export { And, and, code, exclude, id, include, moduleType, not, or, withFilter };
package/dist/index.cjs CHANGED
@@ -1,10 +1,9 @@
1
- const require_src = require('./shared/src-DbbYa-_8.cjs');
2
- require('./shared/parse-ast-index-B9pj8J1q.cjs');
3
- require('./shared/filter-expression-index-CRtoeipP.cjs');
1
+ const require_src = require('./shared/src-glXqJCVJ.cjs');
2
+ require('./shared/filter-index-ChddWdsi.cjs');
3
+ require('./shared/parse-ast-index-DTWvag1h.cjs');
4
4
 
5
5
  exports.VERSION = require_src.VERSION
6
6
  exports.build = require_src.build
7
7
  exports.defineConfig = require_src.defineConfig
8
8
  exports.rolldown = require_src.rolldown
9
- exports.watch = require_src.watch
10
- exports.withFilter = require_src.withFilter
9
+ exports.watch = require_src.watch
package/dist/index.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch, withFilter } from "./shared/input-options.d-C0G2toUx.cjs";
1
+ import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch } from "./shared/input-options.d-BFt2wKBM.cjs";
2
2
 
3
- export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch, withFilter };
3
+ export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch };
package/dist/index.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION$1 as VERSION, WarningHandlerWithDefault, WatchOptions, build$1 as build, defineConfig$1 as defineConfig, rolldown$1 as rolldown, watch$1 as watch, withFilter$1 as withFilter } from "./shared/input-options.d-D_2wMOSn.mjs";
1
+ import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION$1 as VERSION, WarningHandlerWithDefault, WatchOptions, build$1 as build, defineConfig$1 as defineConfig, rolldown$1 as rolldown, watch$1 as watch } from "./shared/input-options.d-9IzFBPMw.mjs";
2
2
 
3
- export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch, withFilter };
3
+ export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { VERSION, build, defineConfig, init_src, rolldown, watch, withFilter } from "./shared/src-RM00Zc4c.mjs";
2
- import "./shared/parse-ast-index-DWHg_E7J.mjs";
3
- import "./shared/filter-expression-index-CIS7Rrin.mjs";
1
+ import { VERSION, build, defineConfig, init_src, rolldown, watch } from "./shared/src-DN1_B1_m.mjs";
2
+ import "./shared/filter-index-DmisSKZF.mjs";
3
+ import "./shared/parse-ast-index-B5wGnMSg.mjs";
4
4
 
5
5
  init_src();
6
- export { VERSION, build, defineConfig, rolldown, watch, withFilter };
6
+ export { VERSION, build, defineConfig, rolldown, watch };
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
2
- const require_src = require('./shared/src-DbbYa-_8.cjs');
3
- require('./shared/parse-ast-index-B9pj8J1q.cjs');
4
- require('./shared/filter-expression-index-CRtoeipP.cjs');
2
+ const require_src = require('./shared/src-glXqJCVJ.cjs');
3
+ require('./shared/filter-index-ChddWdsi.cjs');
4
+ require('./shared/parse-ast-index-DTWvag1h.cjs');
5
5
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
6
6
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { __commonJS } from "./shared/chunk-DSsiIF1Z.mjs";
2
- import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-RM00Zc4c.mjs";
3
- import "./shared/parse-ast-index-DWHg_E7J.mjs";
4
- import "./shared/filter-expression-index-CIS7Rrin.mjs";
2
+ import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-DN1_B1_m.mjs";
3
+ import "./shared/filter-index-DmisSKZF.mjs";
4
+ import "./shared/parse-ast-index-B5wGnMSg.mjs";
5
5
  import { registerPlugins } from "./rolldown-binding.wasi.cjs";
6
6
  import { parentPort, workerData } from "node:worker_threads";
7
7
 
@@ -1,4 +1,4 @@
1
- import { MaybePromise, Plugin } from "./shared/input-options.d-C0G2toUx.cjs";
1
+ import { MaybePromise, Plugin } from "./shared/input-options.d-BFt2wKBM.cjs";
2
2
 
3
3
  //#region src/plugin/parallel-plugin-implementation.d.ts
4
4
  type ParallelPluginImplementation = Plugin;
@@ -1,4 +1,4 @@
1
- import { MaybePromise, Plugin } from "./shared/input-options.d-D_2wMOSn.mjs";
1
+ import { MaybePromise, Plugin } from "./shared/input-options.d-9IzFBPMw.mjs";
2
2
 
3
3
  //#region src/plugin/parallel-plugin-implementation.d.ts
4
4
  type ParallelPluginImplementation = Plugin;
@@ -1,4 +1,4 @@
1
- const require_parse_ast_index = require('./shared/parse-ast-index-B9pj8J1q.cjs');
1
+ const require_parse_ast_index = require('./shared/parse-ast-index-DTWvag1h.cjs');
2
2
 
3
3
  exports.parseAst = require_parse_ast_index.parseAst
4
4
  exports.parseAstAsync = require_parse_ast_index.parseAstAsync
@@ -1,4 +1,4 @@
1
- import { init_parse_ast_index, parseAst, parseAstAsync } from "./shared/parse-ast-index-DWHg_E7J.mjs";
1
+ import { init_parse_ast_index, parseAst, parseAstAsync } from "./shared/parse-ast-index-B5wGnMSg.mjs";
2
2
 
3
3
  init_parse_ast_index();
4
4
  export { parseAst, parseAstAsync };