@rolldown/browser 1.0.0-beta.56 → 1.0.0-beta.57

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 (31) hide show
  1. package/dist/cli.mjs +6 -6
  2. package/dist/config.d.mts +1 -1
  3. package/dist/config.mjs +5 -5
  4. package/dist/{constructors-DMeuUDyD.js → constructors-hZ5LHCkF.js} +1 -1
  5. package/dist/experimental-index.browser.mjs +3 -3
  6. package/dist/experimental-index.d.mts +1 -1
  7. package/dist/experimental-index.mjs +4 -4
  8. package/dist/experimental-runtime-types.d.ts +1 -1
  9. package/dist/filter-index.d.mts +3 -3
  10. package/dist/filter-index.mjs +123 -2
  11. package/dist/index.browser.mjs +2 -2
  12. package/dist/index.d.mts +1 -1
  13. package/dist/index.mjs +5 -5
  14. package/dist/{normalize-string-or-regex-B-Y4k0qo.js → normalize-string-or-regex-DewaIpuo.js} +1 -1
  15. package/dist/parallel-plugin-worker.mjs +2 -2
  16. package/dist/parallel-plugin.d.mts +1 -1
  17. package/dist/plugins-index.browser.mjs +2 -2
  18. package/dist/plugins-index.mjs +2 -2
  19. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  20. package/dist/{rolldown-build-BEV6JVIl.js → rolldown-build-32P3iU2U.js} +3 -2
  21. package/dist/shared/{bindingify-input-options-kzSFdf_-.mjs → bindingify-input-options-CwdDrVAR.mjs} +2 -2
  22. package/dist/shared/composable-filters-C5qA4jo-.mjs +206 -0
  23. package/dist/shared/{constructors-Dw9UOO6Z.mjs → constructors-Ch7pGFBC.mjs} +1 -1
  24. package/dist/shared/{define-config-CrCCK_Ci.d.mts → define-config-Bho_aQn8.d.mts} +5 -0
  25. package/dist/shared/{load-config-vlnYfd7q.mjs → load-config-DUtgyO78.mjs} +1 -1
  26. package/dist/shared/{normalize-string-or-regex-CwM9ci6w.mjs → normalize-string-or-regex-Dt2VqAqy.mjs} +1 -1
  27. package/dist/shared/{rolldown-DtiFL1Ph.mjs → rolldown-D1ymUD73.mjs} +1 -1
  28. package/dist/shared/{rolldown-build-B3XDwemQ.mjs → rolldown-build-rs9zb03O.mjs} +3 -2
  29. package/dist/shared/{watch-BHMj7YNj.mjs → watch-CbHTfwHk.mjs} +3 -3
  30. package/package.json +1 -1
  31. package/dist/shared/composable-filters-G1eqjHFo.mjs +0 -122
package/dist/cli.mjs CHANGED
@@ -1,11 +1,11 @@
1
- import { n as onExit, t as watch } from "./shared/watch-BHMj7YNj.mjs";
1
+ import { n as onExit, t as watch } from "./shared/watch-CbHTfwHk.mjs";
2
2
  import { t as arraify } from "./shared/misc-BubmxcE3.mjs";
3
- import { b as description, x as version } from "./shared/normalize-string-or-regex-CwM9ci6w.mjs";
4
- import { a as getOutputCliKeys, c as styleText$1, i as getInputCliKeys, o as validateCliOptions, r as getCliSchemaInfo } from "./shared/rolldown-build-B3XDwemQ.mjs";
5
- import "./shared/bindingify-input-options-kzSFdf_-.mjs";
3
+ import { b as description, x as version } from "./shared/normalize-string-or-regex-Dt2VqAqy.mjs";
4
+ import { a as getOutputCliKeys, c as styleText$1, i as getInputCliKeys, o as validateCliOptions, r as getCliSchemaInfo } from "./shared/rolldown-build-rs9zb03O.mjs";
5
+ import "./shared/bindingify-input-options-CwdDrVAR.mjs";
6
6
  import "./shared/parse-ast-index-DZPue_kI.mjs";
7
- import { t as rolldown } from "./shared/rolldown-DtiFL1Ph.mjs";
8
- import { t as loadConfig } from "./shared/load-config-vlnYfd7q.mjs";
7
+ import { t as rolldown } from "./shared/rolldown-D1ymUD73.mjs";
8
+ import { t as loadConfig } from "./shared/load-config-DUtgyO78.mjs";
9
9
  import path, { sep } from "node:path";
10
10
  import { formatWithOptions, parseArgs } from "node:util";
11
11
  import process$1 from "node:process";
package/dist/config.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as ConfigExport, t as defineConfig } from "./shared/define-config-CrCCK_Ci.mjs";
1
+ import { n as ConfigExport, t as defineConfig } from "./shared/define-config-Bho_aQn8.mjs";
2
2
 
3
3
  //#region src/utils/load-config.d.ts
4
4
  declare function loadConfig(configPath: string): Promise<ConfigExport>;
package/dist/config.mjs CHANGED
@@ -1,10 +1,10 @@
1
- import { x as version } from "./shared/normalize-string-or-regex-CwM9ci6w.mjs";
2
- import "./shared/rolldown-build-B3XDwemQ.mjs";
3
- import "./shared/bindingify-input-options-kzSFdf_-.mjs";
1
+ import { x as version } from "./shared/normalize-string-or-regex-Dt2VqAqy.mjs";
2
+ import "./shared/rolldown-build-rs9zb03O.mjs";
3
+ import "./shared/bindingify-input-options-CwdDrVAR.mjs";
4
4
  import "./shared/parse-ast-index-DZPue_kI.mjs";
5
- import "./shared/rolldown-DtiFL1Ph.mjs";
5
+ import "./shared/rolldown-D1ymUD73.mjs";
6
6
  import { t as defineConfig } from "./shared/define-config-BF4P-Pum.mjs";
7
- import { t as loadConfig } from "./shared/load-config-vlnYfd7q.mjs";
7
+ import { t as loadConfig } from "./shared/load-config-DUtgyO78.mjs";
8
8
 
9
9
  //#region src/config.ts
10
10
  const VERSION = version;
@@ -1,4 +1,4 @@
1
- import { n as BuiltinPlugin, s as makeBuiltinPluginCallable, t as normalizedStringOrRegex } from "./normalize-string-or-regex-B-Y4k0qo.js";
1
+ import { n as BuiltinPlugin, s as makeBuiltinPluginCallable, t as normalizedStringOrRegex } from "./normalize-string-or-regex-DewaIpuo.js";
2
2
 
3
3
  //#region src/builtin-plugin/constructors.ts
4
4
  function viteModulePreloadPolyfillPlugin(config) {
@@ -1,6 +1,6 @@
1
- import { d as bindingifySourcemap, n as BuiltinPlugin, t as normalizedStringOrRegex, u as transformToRollupOutput } from "./normalize-string-or-regex-B-Y4k0qo.js";
2
- import { a as unwrapBindingResult, c as validateOption, i as normalizeBindingResult, l as PluginDriver, n as createBundlerOptions, o as parse, s as parseSync, t as RolldownBuild } from "./rolldown-build-BEV6JVIl.js";
3
- import { a as viteDynamicImportVarsPlugin, c as viteJsonPlugin, d as viteReactRefreshWrapperPlugin, f as viteReporterPlugin, g as viteWebWorkerPostPlugin, h as viteWasmHelperPlugin, i as viteBuildImportAnalysisPlugin, l as viteLoadFallbackPlugin, m as viteWasmFallbackPlugin, n as isolatedDeclarationPlugin, o as viteHtmlInlineProxyPlugin, p as viteResolvePlugin, r as viteAssetImportMetaUrlPlugin, s as viteImportGlobPlugin, u as viteModulePreloadPolyfillPlugin } from "./constructors-DMeuUDyD.js";
1
+ import { d as bindingifySourcemap, n as BuiltinPlugin, t as normalizedStringOrRegex, u as transformToRollupOutput } from "./normalize-string-or-regex-DewaIpuo.js";
2
+ import { a as unwrapBindingResult, c as validateOption, i as normalizeBindingResult, l as PluginDriver, n as createBundlerOptions, o as parse, s as parseSync, t as RolldownBuild } from "./rolldown-build-32P3iU2U.js";
3
+ import { a as viteDynamicImportVarsPlugin, c as viteJsonPlugin, d as viteReactRefreshWrapperPlugin, f as viteReporterPlugin, g as viteWebWorkerPostPlugin, h as viteWasmHelperPlugin, i as viteBuildImportAnalysisPlugin, l as viteLoadFallbackPlugin, m as viteWasmFallbackPlugin, n as isolatedDeclarationPlugin, o as viteHtmlInlineProxyPlugin, p as viteResolvePlugin, r as viteAssetImportMetaUrlPlugin, s as viteImportGlobPlugin, u as viteModulePreloadPolyfillPlugin } from "./constructors-hZ5LHCkF.js";
4
4
  import * as binding from "./rolldown-binding.wasi-browser.js";
5
5
  import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, createTokioRuntime, isolatedDeclaration, isolatedDeclarationSync, minify, minifySync, moduleRunnerTransform, shutdownAsyncRuntime, startAsyncRuntime, transform, transformSync } from "./rolldown-binding.wasi-browser.js";
6
6
 
@@ -1,5 +1,5 @@
1
1
  import { $ as transformSync, B as ParserOptions, C as BindingViteManifestPluginConfig, G as TransformResult, H as ResolveResult, I as MinifyOptions, J as isolatedDeclarationSync, K as createTokioRuntime, L as MinifyResult, N as IsolatedDeclarationsOptions, O as BindingViteTransformPluginConfig, P as IsolatedDeclarationsResult, Q as transform, R as NapiResolveOptions, U as ResolverFactory, W as TransformOptions, X as minifySync, Y as minify, Z as moduleRunnerTransform, _ as BindingViteCssPostPluginConfig, b as BindingViteHtmlPluginConfig, c as BindingRebuildStrategy, f as BindingUrlResolver, g as BindingViteCssPluginConfig, m as BindingViteAssetPluginConfig, n as BindingBundleState, q as isolatedDeclaration, r as BindingClientHmrUpdate, z as ParseResult } from "./shared/binding-CDyF6W3D.mjs";
2
- import { Et as freeExternalMemory, M as SourceMapInput, P as OutputBundle, U as defineParallelPlugin, W as MinimalPluginContext, et as NormalizedOutputOptions, o as InputOptions, vt as OutputOptions, wt as RolldownOutput, xt as OutputChunk } from "./shared/define-config-CrCCK_Ci.mjs";
2
+ import { Et as freeExternalMemory, M as SourceMapInput, P as OutputBundle, U as defineParallelPlugin, W as MinimalPluginContext, et as NormalizedOutputOptions, o as InputOptions, vt as OutputOptions, wt as RolldownOutput, xt as OutputChunk } from "./shared/define-config-Bho_aQn8.mjs";
3
3
  import { t as BuiltinPlugin } from "./shared/utils-B3dcnHc8.mjs";
4
4
  import { a as viteDynamicImportVarsPlugin, c as viteJsonPlugin, d as viteReactRefreshWrapperPlugin, f as viteReporterPlugin, g as viteWebWorkerPostPlugin, h as viteWasmHelperPlugin, i as viteBuildImportAnalysisPlugin, l as viteLoadFallbackPlugin, m as viteWasmFallbackPlugin, n as isolatedDeclarationPlugin, o as viteHtmlInlineProxyPlugin, p as viteResolvePlugin, r as viteAssetImportMetaUrlPlugin, s as viteImportGlobPlugin, u as viteModulePreloadPolyfillPlugin } from "./shared/constructors-B0L_9ar3.mjs";
5
5
 
@@ -1,8 +1,8 @@
1
- import { d as bindingifySourcemap, n as BuiltinPlugin, t as normalizedStringOrRegex, u as transformToRollupOutput } from "./shared/normalize-string-or-regex-CwM9ci6w.mjs";
2
- import { l as PluginDriver, n as createBundlerOptions, s as validateOption, t as RolldownBuild } from "./shared/rolldown-build-B3XDwemQ.mjs";
3
- import { o as normalizeBindingResult, s as unwrapBindingResult } from "./shared/bindingify-input-options-kzSFdf_-.mjs";
1
+ import { d as bindingifySourcemap, n as BuiltinPlugin, t as normalizedStringOrRegex, u as transformToRollupOutput } from "./shared/normalize-string-or-regex-Dt2VqAqy.mjs";
2
+ import { l as PluginDriver, n as createBundlerOptions, s as validateOption, t as RolldownBuild } from "./shared/rolldown-build-rs9zb03O.mjs";
3
+ import { o as normalizeBindingResult, s as unwrapBindingResult } from "./shared/bindingify-input-options-CwdDrVAR.mjs";
4
4
  import { i as parseSync, r as parse } from "./shared/parse-ast-index-DZPue_kI.mjs";
5
- import { a as viteDynamicImportVarsPlugin, c as viteJsonPlugin, d as viteReactRefreshWrapperPlugin, f as viteReporterPlugin, g as viteWebWorkerPostPlugin, h as viteWasmHelperPlugin, i as viteBuildImportAnalysisPlugin, l as viteLoadFallbackPlugin, m as viteWasmFallbackPlugin, n as isolatedDeclarationPlugin, o as viteHtmlInlineProxyPlugin, p as viteResolvePlugin, r as viteAssetImportMetaUrlPlugin, s as viteImportGlobPlugin, u as viteModulePreloadPolyfillPlugin } from "./shared/constructors-Dw9UOO6Z.mjs";
5
+ import { a as viteDynamicImportVarsPlugin, c as viteJsonPlugin, d as viteReactRefreshWrapperPlugin, f as viteReporterPlugin, g as viteWebWorkerPostPlugin, h as viteWasmHelperPlugin, i as viteBuildImportAnalysisPlugin, l as viteLoadFallbackPlugin, m as viteWasmFallbackPlugin, n as isolatedDeclarationPlugin, o as viteHtmlInlineProxyPlugin, p as viteResolvePlugin, r as viteAssetImportMetaUrlPlugin, s as viteImportGlobPlugin, u as viteModulePreloadPolyfillPlugin } from "./shared/constructors-Ch7pGFBC.mjs";
6
6
  import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, createTokioRuntime, isolatedDeclaration, isolatedDeclarationSync, minify, minifySync, moduleRunnerTransform, shutdownAsyncRuntime, startAsyncRuntime, transform, transformSync } from "./rolldown-binding.wasi.cjs";
7
7
  import { pathToFileURL } from "node:url";
8
8
 
@@ -54,7 +54,7 @@ export class DevRuntime {
54
54
  /** @internal */
55
55
  __toCommonJS: any;
56
56
  /** @internal */
57
- __export: any;
57
+ __exportAll: any;
58
58
  /** @internal */
59
59
  __toDynamicImportESM: any;
60
60
  /** @internal */
@@ -1,3 +1,3 @@
1
- import { k as withFilter } from "./shared/define-config-CrCCK_Ci.mjs";
2
- import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
3
- export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
1
+ import { k as withFilter } from "./shared/define-config-Bho_aQn8.mjs";
2
+ export * from "@rolldown/pluginutils/filter";
3
+ export { withFilter };
@@ -1,6 +1,127 @@
1
1
  import { n as isPromiseLike, t as arraify } from "./shared/misc-BubmxcE3.mjs";
2
- import { a as include, c as or, i as id, l as queries, n as code, o as moduleType, r as exclude, s as not, t as and, u as query } from "./shared/composable-filters-G1eqjHFo.mjs";
2
+ import { a as id, c as interpreter, d as not, f as or, i as exprInterpreter, l as interpreterImpl, m as query, n as code, o as importerId, p as queries, r as exclude, s as include, t as and, u as moduleType } from "./shared/composable-filters-C5qA4jo-.mjs";
3
3
 
4
+ //#region ../pluginutils/dist/filter/filter-vite-plugins.js
5
+ /**
6
+ * Filters out Vite plugins that have `apply: 'serve'` set.
7
+ *
8
+ * Since Rolldown operates in build mode, plugins marked with `apply: 'serve'`
9
+ * are intended only for Vite's dev server and should be excluded from the build process.
10
+ *
11
+ * @param plugins - Array of plugins (can include nested arrays)
12
+ * @returns Filtered array with serve-only plugins removed
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * import { defineConfig } from 'rolldown';
17
+ * import { filterVitePlugins } from '@rolldown/pluginutils';
18
+ * import viteReact from '@vitejs/plugin-react';
19
+ *
20
+ * export default defineConfig({
21
+ * plugins: filterVitePlugins([
22
+ * viteReact(),
23
+ * {
24
+ * name: 'dev-only',
25
+ * apply: 'serve', // This will be filtered out
26
+ * // ...
27
+ * }
28
+ * ])
29
+ * });
30
+ * ```
31
+ */
32
+ function filterVitePlugins(plugins) {
33
+ if (!plugins) return [];
34
+ const pluginArray = Array.isArray(plugins) ? plugins : [plugins];
35
+ const result = [];
36
+ for (const plugin of pluginArray) {
37
+ if (!plugin) continue;
38
+ if (Array.isArray(plugin)) {
39
+ result.push(...filterVitePlugins(plugin));
40
+ continue;
41
+ }
42
+ const pluginWithApply = plugin;
43
+ if ("apply" in pluginWithApply) {
44
+ const applyValue = pluginWithApply.apply;
45
+ if (typeof applyValue === "function") try {
46
+ if (applyValue({}, {
47
+ command: "build",
48
+ mode: "production"
49
+ })) result.push(plugin);
50
+ } catch {
51
+ result.push(plugin);
52
+ }
53
+ else if (applyValue === "serve") continue;
54
+ else result.push(plugin);
55
+ } else result.push(plugin);
56
+ }
57
+ return result;
58
+ }
59
+
60
+ //#endregion
61
+ //#region ../pluginutils/dist/filter/simple-filters.js
62
+ /**
63
+ * Constructs a RegExp that matches the exact string specified.
64
+ *
65
+ * This is useful for plugin hook filters.
66
+ *
67
+ * @param str the string to match.
68
+ * @param flags flags for the RegExp.
69
+ *
70
+ * @example
71
+ * ```ts
72
+ * import { exactRegex } from '@rolldown/pluginutils';
73
+ * const plugin = {
74
+ * name: 'plugin',
75
+ * resolveId: {
76
+ * filter: { id: exactRegex('foo') },
77
+ * handler(id) {} // will only be called for `foo`
78
+ * }
79
+ * }
80
+ * ```
81
+ */
82
+ function exactRegex(str, flags) {
83
+ return new RegExp(`^${escapeRegex(str)}$`, flags);
84
+ }
85
+ /**
86
+ * Constructs a RegExp that matches a value that has the specified prefix.
87
+ *
88
+ * This is useful for plugin hook filters.
89
+ *
90
+ * @param str the string to match.
91
+ * @param flags flags for the RegExp.
92
+ *
93
+ * @example
94
+ * ```ts
95
+ * import { prefixRegex } from '@rolldown/pluginutils';
96
+ * const plugin = {
97
+ * name: 'plugin',
98
+ * resolveId: {
99
+ * filter: { id: prefixRegex('foo') },
100
+ * handler(id) {} // will only be called for IDs starting with `foo`
101
+ * }
102
+ * }
103
+ * ```
104
+ */
105
+ function prefixRegex(str, flags) {
106
+ return new RegExp(`^${escapeRegex(str)}`, flags);
107
+ }
108
+ const escapeRegexRE = /[-/\\^$*+?.()|[\]{}]/g;
109
+ function escapeRegex(str) {
110
+ return str.replace(escapeRegexRE, "\\$&");
111
+ }
112
+ function makeIdFiltersToMatchWithQuery(input) {
113
+ if (!Array.isArray(input)) return makeIdFilterToMatchWithQuery(input);
114
+ return input.map((i) => makeIdFilterToMatchWithQuery(i));
115
+ }
116
+ function makeIdFilterToMatchWithQuery(input) {
117
+ if (typeof input === "string") return `${input}{?*,}`;
118
+ return makeRegexIdFilterToMatchWithQuery(input);
119
+ }
120
+ function makeRegexIdFilterToMatchWithQuery(input) {
121
+ return new RegExp(input.source.replace(/(?<!\\)\$/g, "(?:\\?.*)?$"), input.flags);
122
+ }
123
+
124
+ //#endregion
4
125
  //#region src/plugin/with-filter.ts
5
126
  function withFilterImpl(pluginOption, filterObjectList) {
6
127
  if (isPromiseLike(pluginOption)) return pluginOption.then((p) => withFilter(p, filterObjectList));
@@ -41,4 +162,4 @@ function findMatchedFilterObject(pluginName, overrideFilterObjectList) {
41
162
  }
42
163
 
43
164
  //#endregion
44
- export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
165
+ export { and, code, exactRegex, exclude, exprInterpreter, filterVitePlugins, id, importerId, include, interpreter, interpreterImpl, makeIdFiltersToMatchWithQuery, moduleType, not, or, prefixRegex, queries, query, withFilter };
@@ -1,5 +1,5 @@
1
- import { E as arraify, P as logMultiplyNotifyOption, w as LOG_LEVEL_WARN, y as VERSION } from "./normalize-string-or-regex-B-Y4k0qo.js";
2
- import { c as validateOption, l as PluginDriver, n as createBundlerOptions, r as aggregateBindingErrorsIntoJsError, t as RolldownBuild } from "./rolldown-build-BEV6JVIl.js";
1
+ import { E as arraify, P as logMultiplyNotifyOption, w as LOG_LEVEL_WARN, y as VERSION } from "./normalize-string-or-regex-DewaIpuo.js";
2
+ import { c as validateOption, l as PluginDriver, n as createBundlerOptions, r as aggregateBindingErrorsIntoJsError, t as RolldownBuild } from "./rolldown-build-32P3iU2U.js";
3
3
  import { BindingMagicString, BindingWatcher, shutdownAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
4
4
 
5
5
  //#region src/api/rolldown/index.ts
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as RollupLog, i as RollupError, n as LogLevelOption, o as RollupLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-BpAvp7KV.mjs";
2
2
  import { V as PreRenderedChunk, s as BindingMagicString } from "./shared/binding-CDyF6W3D.mjs";
3
- import { $ as InternalModuleFormat, A as VERSION, B as GetModuleInfo, C as ResolveIdResult, Ct as RenderedModule, D as SourceDescription, Dt as ModuleInfo, E as RolldownPluginOption, F as TreeshakingOptions, G as PluginContextMeta, H as DefineParallelPluginResult, I as TransformPluginContext, J as ModuleTypeFilter, K as GeneralHookFilter, L as EmittedAsset, M as SourceMapInput, N as RolldownOptionsFunction, O as TransformResult, Ot as SourcemapIgnoreListOption, P as OutputBundle, Q as RolldownFsModule, R as EmittedFile, S as ResolveIdExtraOptions, St as RenderedChunk, T as RolldownPlugin, Tt as SourceMap, V as PluginContext, W as MinimalPluginContext, X as RolldownDirectoryEntry, Y as BufferEncoding, Z as RolldownFileStats, _ as ModuleType, _t as ModuleFormat, a as InputOption, at as WatchOptions, b as PartialResolvedId, bt as OutputAsset, c as OptimizationOptions, ct as BuildOptions, d as CustomPluginOptions, dt as ChunkFileNamesFunction, et as NormalizedOutputOptions, f as FunctionPluginHooks, ft as ChunkingContext, g as ModuleOptions, gt as MinifyOptions, h as LoadResult, ht as GlobalsFunction, i as ExternalOption, it as RolldownWatcherEvent, j as ExistingRawSourceMap, l as WatcherOptions, lt as build, m as ImportKind, mt as GeneratedCodePreset, n as ConfigExport, nt as watch, o as InputOptions, ot as rolldown, p as HookFilterExtension, pt as GeneratedCodeOptions, q as HookFilter, r as RolldownOptions, rt as RolldownWatcher, s as ModuleTypes, st as RolldownBuild, t as defineConfig, tt as NormalizedInputOptions, u as AsyncPluginHooks, ut as AddonFunction, v as ObjectHook, vt as OutputOptions, w as ResolvedId, wt as RolldownOutput, x as Plugin, xt as OutputChunk, y as ParallelPluginHooks, yt as PreRenderedAsset, z as EmittedPrebuiltChunk } from "./shared/define-config-CrCCK_Ci.mjs";
3
+ import { $ as InternalModuleFormat, A as VERSION, B as GetModuleInfo, C as ResolveIdResult, Ct as RenderedModule, D as SourceDescription, Dt as ModuleInfo, E as RolldownPluginOption, F as TreeshakingOptions, G as PluginContextMeta, H as DefineParallelPluginResult, I as TransformPluginContext, J as ModuleTypeFilter, K as GeneralHookFilter, L as EmittedAsset, M as SourceMapInput, N as RolldownOptionsFunction, O as TransformResult, Ot as SourcemapIgnoreListOption, P as OutputBundle, Q as RolldownFsModule, R as EmittedFile, S as ResolveIdExtraOptions, St as RenderedChunk, T as RolldownPlugin, Tt as SourceMap, V as PluginContext, W as MinimalPluginContext, X as RolldownDirectoryEntry, Y as BufferEncoding, Z as RolldownFileStats, _ as ModuleType, _t as ModuleFormat, a as InputOption, at as WatchOptions, b as PartialResolvedId, bt as OutputAsset, c as OptimizationOptions, ct as BuildOptions, d as CustomPluginOptions, dt as ChunkFileNamesFunction, et as NormalizedOutputOptions, f as FunctionPluginHooks, ft as ChunkingContext, g as ModuleOptions, gt as MinifyOptions, h as LoadResult, ht as GlobalsFunction, i as ExternalOption, it as RolldownWatcherEvent, j as ExistingRawSourceMap, l as WatcherOptions, lt as build, m as ImportKind, mt as GeneratedCodePreset, n as ConfigExport, nt as watch, o as InputOptions, ot as rolldown, p as HookFilterExtension, pt as GeneratedCodeOptions, q as HookFilter, r as RolldownOptions, rt as RolldownWatcher, s as ModuleTypes, st as RolldownBuild, t as defineConfig, tt as NormalizedInputOptions, u as AsyncPluginHooks, ut as AddonFunction, v as ObjectHook, vt as OutputOptions, w as ResolvedId, wt as RolldownOutput, x as Plugin, xt as OutputChunk, y as ParallelPluginHooks, yt as PreRenderedAsset, z as EmittedPrebuiltChunk } from "./shared/define-config-Bho_aQn8.mjs";
4
4
  import { i as WarningHandlerWithDefault, l as PartialNull, n as LoggingFunction } from "./shared/utils-B3dcnHc8.mjs";
5
5
  export { AddonFunction, AsyncPluginHooks, BindingMagicString, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, EmittedPrebuiltChunk, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GeneratedCodeOptions, GeneratedCodePreset, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, 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,9 +1,9 @@
1
- import { n as onExit, t as watch } from "./shared/watch-BHMj7YNj.mjs";
2
- import { y as VERSION } from "./shared/normalize-string-or-regex-CwM9ci6w.mjs";
3
- import "./shared/rolldown-build-B3XDwemQ.mjs";
4
- import "./shared/bindingify-input-options-kzSFdf_-.mjs";
1
+ import { n as onExit, t as watch } from "./shared/watch-CbHTfwHk.mjs";
2
+ import { y as VERSION } from "./shared/normalize-string-or-regex-Dt2VqAqy.mjs";
3
+ import "./shared/rolldown-build-rs9zb03O.mjs";
4
+ import "./shared/bindingify-input-options-CwdDrVAR.mjs";
5
5
  import "./shared/parse-ast-index-DZPue_kI.mjs";
6
- import { t as rolldown } from "./shared/rolldown-DtiFL1Ph.mjs";
6
+ import { t as rolldown } from "./shared/rolldown-D1ymUD73.mjs";
7
7
  import { t as defineConfig } from "./shared/define-config-BF4P-Pum.mjs";
8
8
  import { isMainThread } from "node:worker_threads";
9
9
  import { BindingMagicString, initTraceSubscriber } from "./rolldown-binding.wasi.cjs";
@@ -236,7 +236,7 @@ function getLogHandler(level, code, logger, pluginName, logLevel) {
236
236
 
237
237
  //#endregion
238
238
  //#region package.json
239
- var version = "1.0.0-beta.56";
239
+ var version = "1.0.0-beta.57";
240
240
 
241
241
  //#endregion
242
242
  //#region src/version.ts
@@ -1,5 +1,5 @@
1
- import "./shared/normalize-string-or-regex-CwM9ci6w.mjs";
2
- import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-kzSFdf_-.mjs";
1
+ import "./shared/normalize-string-or-regex-Dt2VqAqy.mjs";
2
+ import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-CwdDrVAR.mjs";
3
3
  import "./shared/parse-ast-index-DZPue_kI.mjs";
4
4
  import { parentPort, workerData } from "node:worker_threads";
5
5
  import { registerPlugins } from "./rolldown-binding.wasi.cjs";
@@ -1,4 +1,4 @@
1
- import { x as Plugin } from "./shared/define-config-CrCCK_Ci.mjs";
1
+ import { x as Plugin } from "./shared/define-config-Bho_aQn8.mjs";
2
2
  import { s as MaybePromise } from "./shared/utils-B3dcnHc8.mjs";
3
3
 
4
4
  //#region src/plugin/parallel-plugin-implementation.d.ts
@@ -1,5 +1,5 @@
1
- import { n as BuiltinPlugin, s as makeBuiltinPluginCallable } from "./normalize-string-or-regex-B-Y4k0qo.js";
2
- import { t as esmExternalRequirePlugin } from "./constructors-DMeuUDyD.js";
1
+ import { n as BuiltinPlugin, s as makeBuiltinPluginCallable } from "./normalize-string-or-regex-DewaIpuo.js";
2
+ import { t as esmExternalRequirePlugin } from "./constructors-hZ5LHCkF.js";
3
3
 
4
4
  //#region src/builtin-plugin/replace-plugin.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { n as BuiltinPlugin, s as makeBuiltinPluginCallable } from "./shared/normalize-string-or-regex-CwM9ci6w.mjs";
2
- import { t as esmExternalRequirePlugin } from "./shared/constructors-Dw9UOO6Z.mjs";
1
+ import { n as BuiltinPlugin, s as makeBuiltinPluginCallable } from "./shared/normalize-string-or-regex-Dt2VqAqy.mjs";
2
+ import { t as esmExternalRequirePlugin } from "./shared/constructors-Ch7pGFBC.mjs";
3
3
 
4
4
  //#region src/builtin-plugin/replace-plugin.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { A as augmentCodeLocation, C as LOG_LEVEL_INFO, D as unimplemented, E as arraify, F as logNoFileSystemInBrowser, I as logParseError, L as logPluginError, M as logCycleLoading, N as logInputHookInOutputPlugin, O as unreachable, R as locate, S as LOG_LEVEL_ERROR, T as logLevelPriority, _ as PlainObjectLike, a as bindingifyManifestPlugin, b as normalizeLog, c as collectChangedBundle, d as bindingifySourcemap$1, f as transformRenderedChunk, g as lazyProp, h as transformAssetSource, i as bindingifyCSSPostPlugin, j as error, k as unsupported, l as transformToOutputBundle, m as bindingAssetSource, n as BuiltinPlugin, o as bindingifyViteHtmlPlugin, p as __decorate, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex, u as transformToRollupOutput, v as MinimalPluginContextImpl, w as LOG_LEVEL_WARN, x as LOG_LEVEL_DEBUG, y as VERSION, z as getCodeFrame } from "./normalize-string-or-regex-B-Y4k0qo.js";
1
+ import { A as augmentCodeLocation, C as LOG_LEVEL_INFO, D as unimplemented, E as arraify, F as logNoFileSystemInBrowser, I as logParseError, L as logPluginError, M as logCycleLoading, N as logInputHookInOutputPlugin, O as unreachable, R as locate, S as LOG_LEVEL_ERROR, T as logLevelPriority, _ as PlainObjectLike, a as bindingifyManifestPlugin, b as normalizeLog, c as collectChangedBundle, d as bindingifySourcemap$1, f as transformRenderedChunk, g as lazyProp, h as transformAssetSource, i as bindingifyCSSPostPlugin, j as error, k as unsupported, l as transformToOutputBundle, m as bindingAssetSource, n as BuiltinPlugin, o as bindingifyViteHtmlPlugin, p as __decorate, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex, u as transformToRollupOutput, v as MinimalPluginContextImpl, w as LOG_LEVEL_WARN, x as LOG_LEVEL_DEBUG, y as VERSION, z as getCodeFrame } from "./normalize-string-or-regex-DewaIpuo.js";
2
2
  import { BindingAttachDebugInfo, BindingBundler, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, parse, parseSync, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
3
3
 
4
4
  //#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
@@ -1981,6 +1981,7 @@ const ChecksOptionsSchema = strictObject({
1981
1981
  commonJsVariableInEsm: pipe(optional(boolean()), description("Whether to emit warning when detecting common js variable in esm")),
1982
1982
  importIsUndefined: pipe(optional(boolean()), description("Whether to emit warning when detecting import is undefined")),
1983
1983
  emptyImportMeta: pipe(optional(boolean()), description("Whether to emit warning when detecting empty import meta")),
1984
+ cannotCallNamespace: pipe(optional(boolean()), description("Whether to emit warning when detecting cannot call namespace")),
1984
1985
  configurationFieldConflict: pipe(optional(boolean()), description("Whether to emit warning when detecting configuration field conflict")),
1985
1986
  preferBuiltinFeature: pipe(optional(boolean()), description("Whether to emit warning when detecting prefer builtin feature")),
1986
1987
  couldNotCleanDirectory: pipe(optional(boolean()), description("Whether to emit warning when detecting could not clean directory")),
@@ -2546,7 +2547,7 @@ function normalizeTransformHookSourcemap(id$1, originalCode, rawMap) {
2546
2547
  }
2547
2548
 
2548
2549
  //#endregion
2549
- //#region ../pluginutils/dist/composable-filters.js
2550
+ //#region ../pluginutils/dist/filter/composable-filters.js
2550
2551
  var And = class {
2551
2552
  kind;
2552
2553
  args;
@@ -1,8 +1,8 @@
1
1
  import { c as logPluginError, n as error, r as logCycleLoading, t as augmentCodeLocation } from "./logs-DEfpOy5A.mjs";
2
2
  import { a as unreachable, o as unsupported, t as arraify } from "./misc-BubmxcE3.mjs";
3
- import { E as LOG_LEVEL_WARN, S as normalizeLog, _ as PlainObjectLike, a as bindingifyManifestPlugin, c as collectChangedBundle, d as bindingifySourcemap, f as transformRenderedChunk, g as lazyProp, i as bindingifyCSSPostPlugin, l as transformToOutputBundle, m as bindingAssetSource, n as BuiltinPlugin, o as bindingifyViteHtmlPlugin, p as __decorate, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex, v as MinimalPluginContextImpl } from "./normalize-string-or-regex-CwM9ci6w.mjs";
3
+ import { E as LOG_LEVEL_WARN, S as normalizeLog, _ as PlainObjectLike, a as bindingifyManifestPlugin, c as collectChangedBundle, d as bindingifySourcemap, f as transformRenderedChunk, g as lazyProp, i as bindingifyCSSPostPlugin, l as transformToOutputBundle, m as bindingAssetSource, n as BuiltinPlugin, o as bindingifyViteHtmlPlugin, p as __decorate, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex, v as MinimalPluginContextImpl } from "./normalize-string-or-regex-Dt2VqAqy.mjs";
4
4
  import { t as parseAst } from "./parse-ast-index-DZPue_kI.mjs";
5
- import { a as include, c as or, i as id, n as code, o as moduleType, r as exclude, t as and } from "./composable-filters-G1eqjHFo.mjs";
5
+ import { a as id, f as or, n as code, r as exclude, s as include, t as and, u as moduleType } from "./composable-filters-C5qA4jo-.mjs";
6
6
  import { BindingAttachDebugInfo, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects } from "../rolldown-binding.wasi.cjs";
7
7
  import path from "node:path";
8
8
  import fsp from "node:fs/promises";
@@ -0,0 +1,206 @@
1
+ //#region ../pluginutils/dist/utils.js
2
+ const postfixRE = /[?#].*$/;
3
+ function cleanUrl(url) {
4
+ return url.replace(postfixRE, "");
5
+ }
6
+ function extractQueryWithoutFragment(url) {
7
+ const questionMarkIndex = url.indexOf("?");
8
+ if (questionMarkIndex === -1) return "";
9
+ const fragmentIndex = url.indexOf("#", questionMarkIndex);
10
+ if (fragmentIndex === -1) return url.substring(questionMarkIndex);
11
+ else return url.substring(questionMarkIndex, fragmentIndex);
12
+ }
13
+
14
+ //#endregion
15
+ //#region ../pluginutils/dist/filter/composable-filters.js
16
+ var And = class {
17
+ kind;
18
+ args;
19
+ constructor(...args) {
20
+ if (args.length === 0) throw new Error("`And` expects at least one operand");
21
+ this.args = args;
22
+ this.kind = "and";
23
+ }
24
+ };
25
+ var Or = class {
26
+ kind;
27
+ args;
28
+ constructor(...args) {
29
+ if (args.length === 0) throw new Error("`Or` expects at least one operand");
30
+ this.args = args;
31
+ this.kind = "or";
32
+ }
33
+ };
34
+ var Not = class {
35
+ kind;
36
+ expr;
37
+ constructor(expr) {
38
+ this.expr = expr;
39
+ this.kind = "not";
40
+ }
41
+ };
42
+ var Id = class {
43
+ kind;
44
+ pattern;
45
+ params;
46
+ constructor(pattern, params) {
47
+ this.pattern = pattern;
48
+ this.kind = "id";
49
+ this.params = params ?? { cleanUrl: false };
50
+ }
51
+ };
52
+ var ImporterId = class {
53
+ kind;
54
+ pattern;
55
+ params;
56
+ constructor(pattern, params) {
57
+ this.pattern = pattern;
58
+ this.kind = "importerId";
59
+ this.params = params ?? { cleanUrl: false };
60
+ }
61
+ };
62
+ var ModuleType = class {
63
+ kind;
64
+ pattern;
65
+ constructor(pattern) {
66
+ this.pattern = pattern;
67
+ this.kind = "moduleType";
68
+ }
69
+ };
70
+ var Code = class {
71
+ kind;
72
+ pattern;
73
+ constructor(expr) {
74
+ this.pattern = expr;
75
+ this.kind = "code";
76
+ }
77
+ };
78
+ var Query = class {
79
+ kind;
80
+ key;
81
+ pattern;
82
+ constructor(key, pattern) {
83
+ this.pattern = pattern;
84
+ this.key = key;
85
+ this.kind = "query";
86
+ }
87
+ };
88
+ var Include = class {
89
+ kind;
90
+ expr;
91
+ constructor(expr) {
92
+ this.expr = expr;
93
+ this.kind = "include";
94
+ }
95
+ };
96
+ var Exclude = class {
97
+ kind;
98
+ expr;
99
+ constructor(expr) {
100
+ this.expr = expr;
101
+ this.kind = "exclude";
102
+ }
103
+ };
104
+ function and(...args) {
105
+ return new And(...args);
106
+ }
107
+ function or(...args) {
108
+ return new Or(...args);
109
+ }
110
+ function not(expr) {
111
+ return new Not(expr);
112
+ }
113
+ function id(pattern, params) {
114
+ return new Id(pattern, params);
115
+ }
116
+ function importerId(pattern, params) {
117
+ return new ImporterId(pattern, params);
118
+ }
119
+ function moduleType(pattern) {
120
+ return new ModuleType(pattern);
121
+ }
122
+ function code(pattern) {
123
+ return new Code(pattern);
124
+ }
125
+ function query(key, pattern) {
126
+ return new Query(key, pattern);
127
+ }
128
+ function include(expr) {
129
+ return new Include(expr);
130
+ }
131
+ function exclude(expr) {
132
+ return new Exclude(expr);
133
+ }
134
+ /**
135
+ * convert a queryObject to FilterExpression like
136
+ * ```js
137
+ * and(query(k1, v1), query(k2, v2))
138
+ * ```
139
+ * @param queryFilterObject The query filter object needs to be matched.
140
+ * @returns a `And` FilterExpression
141
+ */
142
+ function queries(queryFilter) {
143
+ return and(...Object.entries(queryFilter).map(([key, value]) => {
144
+ return new Query(key, value);
145
+ }));
146
+ }
147
+ function interpreter(exprs, code$1, id$1, moduleType$1, importerId$1) {
148
+ let arr = [];
149
+ if (Array.isArray(exprs)) arr = exprs;
150
+ else arr = [exprs];
151
+ return interpreterImpl(arr, code$1, id$1, moduleType$1, importerId$1);
152
+ }
153
+ function interpreterImpl(expr, code$1, id$1, moduleType$1, importerId$1, ctx = {}) {
154
+ let hasInclude = false;
155
+ for (const e of expr) switch (e.kind) {
156
+ case "include":
157
+ hasInclude = true;
158
+ if (exprInterpreter(e.expr, code$1, id$1, moduleType$1, importerId$1, ctx)) return true;
159
+ break;
160
+ case "exclude":
161
+ if (exprInterpreter(e.expr, code$1, id$1, moduleType$1, importerId$1, ctx)) return false;
162
+ break;
163
+ }
164
+ return !hasInclude;
165
+ }
166
+ function exprInterpreter(expr, code$1, id$1, moduleType$1, importerId$1, ctx = {}) {
167
+ switch (expr.kind) {
168
+ case "and": return expr.args.every((e) => exprInterpreter(e, code$1, id$1, moduleType$1, importerId$1, ctx));
169
+ case "or": return expr.args.some((e) => exprInterpreter(e, code$1, id$1, moduleType$1, importerId$1, ctx));
170
+ case "not": return !exprInterpreter(expr.expr, code$1, id$1, moduleType$1, importerId$1, ctx);
171
+ case "id": {
172
+ if (id$1 === void 0) throw new Error("`id` is required for `id` expression");
173
+ let idToMatch = id$1;
174
+ if (expr.params.cleanUrl) idToMatch = cleanUrl(idToMatch);
175
+ return typeof expr.pattern === "string" ? idToMatch === expr.pattern : expr.pattern.test(idToMatch);
176
+ }
177
+ case "importerId": {
178
+ if (importerId$1 === void 0) return false;
179
+ let importerIdToMatch = importerId$1;
180
+ if (expr.params.cleanUrl) importerIdToMatch = cleanUrl(importerIdToMatch);
181
+ return typeof expr.pattern === "string" ? importerIdToMatch === expr.pattern : expr.pattern.test(importerIdToMatch);
182
+ }
183
+ case "moduleType":
184
+ if (moduleType$1 === void 0) throw new Error("`moduleType` is required for `moduleType` expression");
185
+ return moduleType$1 === expr.pattern;
186
+ case "code":
187
+ if (code$1 === void 0) throw new Error("`code` is required for `code` expression");
188
+ return typeof expr.pattern === "string" ? code$1.includes(expr.pattern) : expr.pattern.test(code$1);
189
+ case "query": {
190
+ if (id$1 === void 0) throw new Error("`id` is required for `Query` expression");
191
+ if (!ctx.urlSearchParamsCache) {
192
+ let queryString = extractQueryWithoutFragment(id$1);
193
+ ctx.urlSearchParamsCache = new URLSearchParams(queryString);
194
+ }
195
+ let urlParams = ctx.urlSearchParamsCache;
196
+ if (typeof expr.pattern === "boolean") if (expr.pattern) return urlParams.has(expr.key);
197
+ else return !urlParams.has(expr.key);
198
+ else if (typeof expr.pattern === "string") return urlParams.get(expr.key) === expr.pattern;
199
+ else return expr.pattern.test(urlParams.get(expr.key) ?? "");
200
+ }
201
+ default: throw new Error(`Expression ${JSON.stringify(expr)} is not expected.`);
202
+ }
203
+ }
204
+
205
+ //#endregion
206
+ export { id as a, interpreter as c, not as d, or as f, exprInterpreter as i, interpreterImpl as l, query as m, code as n, importerId as o, queries as p, exclude as r, include as s, and as t, moduleType as u };
@@ -1,4 +1,4 @@
1
- import { n as BuiltinPlugin, s as makeBuiltinPluginCallable, t as normalizedStringOrRegex } from "./normalize-string-or-regex-CwM9ci6w.mjs";
1
+ import { n as BuiltinPlugin, s as makeBuiltinPluginCallable, t as normalizedStringOrRegex } from "./normalize-string-or-regex-Dt2VqAqy.mjs";
2
2
 
3
3
  //#region src/builtin-plugin/constructors.ts
4
4
  function viteModulePreloadPolyfillPlugin(config) {
@@ -1179,6 +1179,11 @@ interface ChecksOptions {
1179
1179
  */
1180
1180
  emptyImportMeta?: boolean;
1181
1181
  /**
1182
+ * Whether to emit warning when detecting cannot call namespace
1183
+ * @default true
1184
+ */
1185
+ cannotCallNamespace?: boolean;
1186
+ /**
1182
1187
  * Whether to emit warning when detecting configuration field conflict
1183
1188
  * @default true
1184
1189
  */
@@ -1,4 +1,4 @@
1
- import { t as rolldown } from "./rolldown-DtiFL1Ph.mjs";
1
+ import { t as rolldown } from "./rolldown-D1ymUD73.mjs";
2
2
  import path from "node:path";
3
3
  import { readdir } from "node:fs/promises";
4
4
  import { pathToFileURL } from "node:url";
@@ -32,7 +32,7 @@ function getLogHandler(level, code, logger, pluginName, logLevel) {
32
32
 
33
33
  //#endregion
34
34
  //#region package.json
35
- var version = "1.0.0-beta.56";
35
+ var version = "1.0.0-beta.57";
36
36
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
37
37
 
38
38
  //#endregion
@@ -1,4 +1,4 @@
1
- import { l as PluginDriver, s as validateOption, t as RolldownBuild } from "./rolldown-build-B3XDwemQ.mjs";
1
+ import { l as PluginDriver, s as validateOption, t as RolldownBuild } from "./rolldown-build-rs9zb03O.mjs";
2
2
 
3
3
  //#region src/api/rolldown/index.ts
4
4
  const rolldown = async (input) => {
@@ -1,7 +1,7 @@
1
1
  import { i as logInputHookInOutputPlugin, n as error } from "./logs-DEfpOy5A.mjs";
2
2
  import { i as unimplemented } from "./misc-BubmxcE3.mjs";
3
- import { C as LOG_LEVEL_DEBUG, D as logLevelPriority, E as LOG_LEVEL_WARN, S as normalizeLog, T as LOG_LEVEL_INFO, _ as PlainObjectLike, f as transformRenderedChunk, g as lazyProp, h as transformAssetSource, n as BuiltinPlugin, p as __decorate, u as transformToRollupOutput, v as MinimalPluginContextImpl, w as LOG_LEVEL_ERROR, y as VERSION } from "./normalize-string-or-regex-CwM9ci6w.mjs";
4
- import { c as normalizeHook, i as transformModuleInfo, s as unwrapBindingResult, t as bindingifyInputOptions } from "./bindingify-input-options-kzSFdf_-.mjs";
3
+ import { C as LOG_LEVEL_DEBUG, D as logLevelPriority, E as LOG_LEVEL_WARN, S as normalizeLog, T as LOG_LEVEL_INFO, _ as PlainObjectLike, f as transformRenderedChunk, g as lazyProp, h as transformAssetSource, n as BuiltinPlugin, p as __decorate, u as transformToRollupOutput, v as MinimalPluginContextImpl, w as LOG_LEVEL_ERROR, y as VERSION } from "./normalize-string-or-regex-Dt2VqAqy.mjs";
4
+ import { c as normalizeHook, i as transformModuleInfo, s as unwrapBindingResult, t as bindingifyInputOptions } from "./bindingify-input-options-CwdDrVAR.mjs";
5
5
  import { Worker } from "node:worker_threads";
6
6
  import { BindingBundler, ParallelJsPluginRegistry, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
7
7
  import path from "node:path";
@@ -1614,6 +1614,7 @@ const ChecksOptionsSchema = strictObject({
1614
1614
  commonJsVariableInEsm: pipe(optional(boolean()), description("Whether to emit warning when detecting common js variable in esm")),
1615
1615
  importIsUndefined: pipe(optional(boolean()), description("Whether to emit warning when detecting import is undefined")),
1616
1616
  emptyImportMeta: pipe(optional(boolean()), description("Whether to emit warning when detecting empty import meta")),
1617
+ cannotCallNamespace: pipe(optional(boolean()), description("Whether to emit warning when detecting cannot call namespace")),
1617
1618
  configurationFieldConflict: pipe(optional(boolean()), description("Whether to emit warning when detecting configuration field conflict")),
1618
1619
  preferBuiltinFeature: pipe(optional(boolean()), description("Whether to emit warning when detecting prefer builtin feature")),
1619
1620
  couldNotCleanDirectory: pipe(optional(boolean()), description("Whether to emit warning when detecting could not clean directory")),
@@ -1,8 +1,8 @@
1
1
  import { o as logMultiplyNotifyOption } from "./logs-DEfpOy5A.mjs";
2
2
  import { t as arraify } from "./misc-BubmxcE3.mjs";
3
- import { E as LOG_LEVEL_WARN } from "./normalize-string-or-regex-CwM9ci6w.mjs";
4
- import { l as PluginDriver, n as createBundlerOptions } from "./rolldown-build-B3XDwemQ.mjs";
5
- import { a as aggregateBindingErrorsIntoJsError } from "./bindingify-input-options-kzSFdf_-.mjs";
3
+ import { E as LOG_LEVEL_WARN } from "./normalize-string-or-regex-Dt2VqAqy.mjs";
4
+ import { l as PluginDriver, n as createBundlerOptions } from "./rolldown-build-rs9zb03O.mjs";
5
+ import { a as aggregateBindingErrorsIntoJsError } from "./bindingify-input-options-CwdDrVAR.mjs";
6
6
  import { BindingWatcher, shutdownAsyncRuntime } from "../rolldown-binding.wasi.cjs";
7
7
 
8
8
  //#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolldown/browser",
3
- "version": "1.0.0-beta.56",
3
+ "version": "1.0.0-beta.57",
4
4
  "description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
5
5
  "homepage": "https://rolldown.rs/",
6
6
  "type": "module",
@@ -1,122 +0,0 @@
1
- //#region ../pluginutils/dist/composable-filters.js
2
- var And = class {
3
- kind;
4
- args;
5
- constructor(...args) {
6
- if (args.length === 0) throw new Error("`And` expects at least one operand");
7
- this.args = args;
8
- this.kind = "and";
9
- }
10
- };
11
- var Or = class {
12
- kind;
13
- args;
14
- constructor(...args) {
15
- if (args.length === 0) throw new Error("`Or` expects at least one operand");
16
- this.args = args;
17
- this.kind = "or";
18
- }
19
- };
20
- var Not = class {
21
- kind;
22
- expr;
23
- constructor(expr) {
24
- this.expr = expr;
25
- this.kind = "not";
26
- }
27
- };
28
- var Id = class {
29
- kind;
30
- pattern;
31
- params;
32
- constructor(pattern, params) {
33
- this.pattern = pattern;
34
- this.kind = "id";
35
- this.params = params ?? { cleanUrl: false };
36
- }
37
- };
38
- var ModuleType = class {
39
- kind;
40
- pattern;
41
- constructor(pattern) {
42
- this.pattern = pattern;
43
- this.kind = "moduleType";
44
- }
45
- };
46
- var Code = class {
47
- kind;
48
- pattern;
49
- constructor(expr) {
50
- this.pattern = expr;
51
- this.kind = "code";
52
- }
53
- };
54
- var Query = class {
55
- kind;
56
- key;
57
- pattern;
58
- constructor(key, pattern) {
59
- this.pattern = pattern;
60
- this.key = key;
61
- this.kind = "query";
62
- }
63
- };
64
- var Include = class {
65
- kind;
66
- expr;
67
- constructor(expr) {
68
- this.expr = expr;
69
- this.kind = "include";
70
- }
71
- };
72
- var Exclude = class {
73
- kind;
74
- expr;
75
- constructor(expr) {
76
- this.expr = expr;
77
- this.kind = "exclude";
78
- }
79
- };
80
- function and(...args) {
81
- return new And(...args);
82
- }
83
- function or(...args) {
84
- return new Or(...args);
85
- }
86
- function not(expr) {
87
- return new Not(expr);
88
- }
89
- function id(pattern, params) {
90
- return new Id(pattern, params);
91
- }
92
- function moduleType(pattern) {
93
- return new ModuleType(pattern);
94
- }
95
- function code(pattern) {
96
- return new Code(pattern);
97
- }
98
- function query(key, pattern) {
99
- return new Query(key, pattern);
100
- }
101
- function include(expr) {
102
- return new Include(expr);
103
- }
104
- function exclude(expr) {
105
- return new Exclude(expr);
106
- }
107
- /**
108
- * convert a queryObject to FilterExpression like
109
- * ```js
110
- * and(query(k1, v1), query(k2, v2))
111
- * ```
112
- * @param queryFilterObject The query filter object needs to be matched.
113
- * @returns a `And` FilterExpression
114
- */
115
- function queries(queryFilter) {
116
- return and(...Object.entries(queryFilter).map(([key, value]) => {
117
- return new Query(key, value);
118
- }));
119
- }
120
-
121
- //#endregion
122
- export { include as a, or as c, id as i, queries as l, code as n, moduleType as o, exclude as r, not as s, and as t, query as u };