@rolldown/browser 1.0.0-beta.56 → 1.0.0-beta.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +8 -8
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +6 -6
- package/dist/{constructors-DMeuUDyD.js → constructors-BuqTjXTF.js} +1 -1
- package/dist/experimental-index.browser.mjs +3 -3
- package/dist/experimental-index.d.mts +4 -4
- package/dist/experimental-index.mjs +5 -5
- package/dist/experimental-runtime-types.d.ts +1 -1
- package/dist/filter-index.d.mts +3 -3
- package/dist/filter-index.mjs +123 -2
- package/dist/get-log-filter.d.mts +1 -1
- package/dist/index.browser.mjs +4 -2
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +6 -6
- package/dist/{normalize-string-or-regex-B-Y4k0qo.js → normalize-string-or-regex-3ql5-z8-.js} +3 -2
- package/dist/parallel-plugin-worker.mjs +3 -3
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/plugins-index.browser.mjs +2 -2
- package/dist/plugins-index.d.mts +3 -3
- package/dist/plugins-index.mjs +2 -2
- package/dist/rolldown-binding.wasi.cjs +1 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/{rolldown-build-BEV6JVIl.js → rolldown-build-CRqas5jO.js} +14 -6
- package/dist/shared/{binding-CDyF6W3D.d.mts → binding-MAEzB4KA.d.mts} +10 -0
- package/dist/shared/{bindingify-input-options-kzSFdf_-.mjs → bindingify-input-options--qcSYuhh.mjs} +8 -4
- package/dist/shared/composable-filters-C5qA4jo-.mjs +206 -0
- package/dist/shared/{constructors-B0L_9ar3.d.mts → constructors-CQP6o3cR.d.mts} +2 -2
- package/dist/shared/{constructors-Dw9UOO6Z.mjs → constructors-kOch67Sb.mjs} +1 -1
- package/dist/shared/{define-config-CrCCK_Ci.d.mts → define-config-yInAJbA1.d.mts} +471 -125
- package/dist/shared/{load-config-vlnYfd7q.mjs → load-config-BZhApFJg.mjs} +1 -1
- package/dist/shared/{logging-BpAvp7KV.d.mts → logging-B4x9qar8.d.mts} +1 -0
- package/dist/shared/{normalize-string-or-regex-CwM9ci6w.mjs → normalize-string-or-regex-CIiT1lMg.mjs} +3 -2
- package/dist/shared/{parse-ast-index-DZPue_kI.mjs → parse-ast-index-CgzK6cxG.mjs} +1 -1
- package/dist/shared/{rolldown-DtiFL1Ph.mjs → rolldown-Vl5SnJ_J.mjs} +2 -1
- package/dist/shared/{rolldown-build-B3XDwemQ.mjs → rolldown-build-7kWB1jqY.mjs} +7 -3
- package/dist/shared/{utils-B3dcnHc8.d.mts → utils-BGxZdOXA.d.mts} +2 -2
- package/dist/shared/{watch-BHMj7YNj.mjs → watch-CGYro6go.mjs} +4 -3
- package/package.json +16 -16
- 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-
|
|
1
|
+
import { n as onExit, t as watch } from "./shared/watch-CGYro6go.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-
|
|
4
|
-
import { a as getOutputCliKeys, c as styleText$1, i as getInputCliKeys, o as validateCliOptions, r as getCliSchemaInfo } from "./shared/rolldown-build-
|
|
5
|
-
import "./shared/bindingify-input-options
|
|
6
|
-
import "./shared/parse-ast-index-
|
|
7
|
-
import { t as rolldown } from "./shared/rolldown-
|
|
8
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
3
|
+
import { b as description, x as version } from "./shared/normalize-string-or-regex-CIiT1lMg.mjs";
|
|
4
|
+
import { a as getOutputCliKeys, c as styleText$1, i as getInputCliKeys, o as validateCliOptions, r as getCliSchemaInfo } from "./shared/rolldown-build-7kWB1jqY.mjs";
|
|
5
|
+
import "./shared/bindingify-input-options--qcSYuhh.mjs";
|
|
6
|
+
import "./shared/parse-ast-index-CgzK6cxG.mjs";
|
|
7
|
+
import { t as rolldown } from "./shared/rolldown-Vl5SnJ_J.mjs";
|
|
8
|
+
import { t as loadConfig } from "./shared/load-config-BZhApFJg.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";
|
|
@@ -1237,7 +1237,7 @@ function getClearScreenFunction(options$1) {
|
|
|
1237
1237
|
}
|
|
1238
1238
|
|
|
1239
1239
|
//#endregion
|
|
1240
|
-
//#region \0@oxc-project+runtime@0.
|
|
1240
|
+
//#region \0@oxc-project+runtime@0.106.0/helpers/usingCtx.js
|
|
1241
1241
|
function _usingCtx() {
|
|
1242
1242
|
var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
|
|
1243
1243
|
var n$2 = Error();
|
package/dist/config.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ConfigExport, t as defineConfig } from "./shared/define-config-
|
|
1
|
+
import { n as ConfigExport, t as defineConfig } from "./shared/define-config-yInAJbA1.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-
|
|
2
|
-
import "./shared/rolldown-build-
|
|
3
|
-
import "./shared/bindingify-input-options
|
|
4
|
-
import "./shared/parse-ast-index-
|
|
5
|
-
import "./shared/rolldown-
|
|
1
|
+
import { x as version } from "./shared/normalize-string-or-regex-CIiT1lMg.mjs";
|
|
2
|
+
import "./shared/rolldown-build-7kWB1jqY.mjs";
|
|
3
|
+
import "./shared/bindingify-input-options--qcSYuhh.mjs";
|
|
4
|
+
import "./shared/parse-ast-index-CgzK6cxG.mjs";
|
|
5
|
+
import "./shared/rolldown-Vl5SnJ_J.mjs";
|
|
6
6
|
import { t as defineConfig } from "./shared/define-config-BF4P-Pum.mjs";
|
|
7
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
7
|
+
import { t as loadConfig } from "./shared/load-config-BZhApFJg.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-
|
|
1
|
+
import { n as BuiltinPlugin, s as makeBuiltinPluginCallable, t as normalizedStringOrRegex } from "./normalize-string-or-regex-3ql5-z8-.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-
|
|
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-
|
|
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-
|
|
1
|
+
import { d as bindingifySourcemap, n as BuiltinPlugin, t as normalizedStringOrRegex, u as transformToRollupOutput } from "./normalize-string-or-regex-3ql5-z8-.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-CRqas5jO.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-BuqTjXTF.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,7 +1,7 @@
|
|
|
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-
|
|
2
|
-
import {
|
|
3
|
-
import { t as BuiltinPlugin } from "./shared/utils-
|
|
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-
|
|
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-MAEzB4KA.mjs";
|
|
2
|
+
import { Dt as freeExternalMemory, M as SourceMapInput, P as OutputBundle, St as OutputChunk, Tt as RolldownOutput, U as defineParallelPlugin, W as MinimalPluginContext, et as NormalizedOutputOptions, o as InputOptions, yt as OutputOptions } from "./shared/define-config-yInAJbA1.mjs";
|
|
3
|
+
import { t as BuiltinPlugin } from "./shared/utils-BGxZdOXA.mjs";
|
|
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-CQP6o3cR.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/api/dev/dev-options.d.ts
|
|
7
7
|
type DevOnHmrUpdates = (result: Error | {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { d as bindingifySourcemap, n as BuiltinPlugin, t as normalizedStringOrRegex, u as transformToRollupOutput } from "./shared/normalize-string-or-regex-
|
|
2
|
-
import { l as PluginDriver, n as createBundlerOptions, s as validateOption, t as RolldownBuild } from "./shared/rolldown-build-
|
|
3
|
-
import { o as normalizeBindingResult, s as unwrapBindingResult } from "./shared/bindingify-input-options
|
|
4
|
-
import { i as parseSync, r as parse } from "./shared/parse-ast-index-
|
|
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-
|
|
1
|
+
import { d as bindingifySourcemap, n as BuiltinPlugin, t as normalizedStringOrRegex, u as transformToRollupOutput } from "./shared/normalize-string-or-regex-CIiT1lMg.mjs";
|
|
2
|
+
import { l as PluginDriver, n as createBundlerOptions, s as validateOption, t as RolldownBuild } from "./shared/rolldown-build-7kWB1jqY.mjs";
|
|
3
|
+
import { o as normalizeBindingResult, s as unwrapBindingResult } from "./shared/bindingify-input-options--qcSYuhh.mjs";
|
|
4
|
+
import { i as parseSync, r as parse } from "./shared/parse-ast-index-CgzK6cxG.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-kOch67Sb.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
|
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { k as withFilter } from "./shared/define-config-
|
|
2
|
-
|
|
3
|
-
export {
|
|
1
|
+
import { k as withFilter } from "./shared/define-config-yInAJbA1.mjs";
|
|
2
|
+
export * from "@rolldown/pluginutils/filter";
|
|
3
|
+
export { withFilter };
|
package/dist/filter-index.mjs
CHANGED
|
@@ -1,6 +1,127 @@
|
|
|
1
1
|
import { n as isPromiseLike, t as arraify } from "./shared/misc-BubmxcE3.mjs";
|
|
2
|
-
import { a as
|
|
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 };
|
package/dist/index.browser.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { E as arraify, P as logMultiplyNotifyOption, w as LOG_LEVEL_WARN, y as VERSION } from "./normalize-string-or-regex-
|
|
2
|
-
import { c as validateOption, l as PluginDriver, n as createBundlerOptions, r as aggregateBindingErrorsIntoJsError, t as RolldownBuild } from "./rolldown-build-
|
|
1
|
+
import { E as arraify, P as logMultiplyNotifyOption, w as LOG_LEVEL_WARN, y as VERSION } from "./normalize-string-or-regex-3ql5-z8-.js";
|
|
2
|
+
import { c as validateOption, l as PluginDriver, n as createBundlerOptions, r as aggregateBindingErrorsIntoJsError, t as RolldownBuild } from "./rolldown-build-CRqas5jO.js";
|
|
3
3
|
import { BindingMagicString, BindingWatcher, shutdownAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
4
4
|
|
|
5
5
|
//#region src/api/rolldown/index.ts
|
|
6
|
+
/** @category Programmatic APIs */
|
|
6
7
|
const rolldown = async (input) => {
|
|
7
8
|
validateOption("input", input);
|
|
8
9
|
return new RolldownBuild(await PluginDriver.callOptionsHook(input));
|
|
@@ -147,6 +148,7 @@ function getValidNotifyOption(bundlerOptions) {
|
|
|
147
148
|
|
|
148
149
|
//#endregion
|
|
149
150
|
//#region src/api/watch/index.ts
|
|
151
|
+
/** @category Programmatic APIs */
|
|
150
152
|
const watch = (input) => {
|
|
151
153
|
const emitter = new WatcherEmitter();
|
|
152
154
|
createWatcher(emitter, input);
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as RollupLog, i as RollupError, n as LogLevelOption, o as RollupLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-
|
|
2
|
-
import { V as PreRenderedChunk, s as BindingMagicString } from "./shared/binding-
|
|
3
|
-
import { $ as InternalModuleFormat, A as VERSION, B as GetModuleInfo, C as ResolveIdResult, Ct as
|
|
4
|
-
import { i as WarningHandlerWithDefault, l as PartialNull, n as LoggingFunction } from "./shared/utils-
|
|
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 };
|
|
1
|
+
import { a as RollupLog, i as RollupError, n as LogLevelOption, o as RollupLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-B4x9qar8.mjs";
|
|
2
|
+
import { V as PreRenderedChunk, s as BindingMagicString } from "./shared/binding-MAEzB4KA.mjs";
|
|
3
|
+
import { $ as InternalModuleFormat, A as VERSION, B as GetModuleInfo, C as ResolveIdResult, Ct as RenderedChunk, D as SourceDescription, E as RolldownPluginOption, Et as SourceMap, 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 ModuleInfo, P as OutputBundle, Q as RolldownFsModule, R as EmittedFile, S as ResolveIdExtraOptions, St as OutputChunk, T as RolldownPlugin, Tt as RolldownOutput, V as PluginContext, W as MinimalPluginContext, X as RolldownDirectoryEntry, Y as BufferEncoding, Z as RolldownFileStats, _ as ModuleType, _t as MinifyOptions, a as InputOption, at as RolldownWatcherEvent, b as PartialResolvedId, bt as PreRenderedAsset, c as OptimizationOptions, ct as RolldownBuild, d as CustomPluginOptions, dt as AddonFunction, et as NormalizedOutputOptions, f as FunctionPluginHooks, ft as ChunkFileNamesFunction, g as ModuleOptions, gt as GlobalsFunction, h as LoadResult, ht as GeneratedCodePreset, i as ExternalOption, it as RolldownWatcher, j as ExistingRawSourceMap, kt as SourcemapIgnoreListOption, l as WatcherOptions, lt as BuildOptions, m as ImportKind, mt as GeneratedCodeOptions, n as ConfigExport, nt as ChecksOptions, o as InputOptions, ot as WatchOptions, p as HookFilterExtension, pt as ChunkingContext, q as HookFilter, r as RolldownOptions, rt as watch, s as ModuleTypes, st as rolldown, t as defineConfig, tt as NormalizedInputOptions, u as AsyncPluginHooks, ut as build, v as ObjectHook, vt as ModuleFormat, w as ResolvedId, wt as RenderedModule, x as Plugin, xt as OutputAsset, y as ParallelPluginHooks, yt as OutputOptions, z as EmittedPrebuiltChunk } from "./shared/define-config-yInAJbA1.mjs";
|
|
4
|
+
import { i as WarningHandlerWithDefault, l as PartialNull, n as LoggingFunction } from "./shared/utils-BGxZdOXA.mjs";
|
|
5
|
+
export { AddonFunction, AsyncPluginHooks, BindingMagicString, BufferEncoding, BuildOptions, ChecksOptions, 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-
|
|
2
|
-
import { y as VERSION } from "./shared/normalize-string-or-regex-
|
|
3
|
-
import "./shared/rolldown-build-
|
|
4
|
-
import "./shared/bindingify-input-options
|
|
5
|
-
import "./shared/parse-ast-index-
|
|
6
|
-
import { t as rolldown } from "./shared/rolldown-
|
|
1
|
+
import { n as onExit, t as watch } from "./shared/watch-CGYro6go.mjs";
|
|
2
|
+
import { y as VERSION } from "./shared/normalize-string-or-regex-CIiT1lMg.mjs";
|
|
3
|
+
import "./shared/rolldown-build-7kWB1jqY.mjs";
|
|
4
|
+
import "./shared/bindingify-input-options--qcSYuhh.mjs";
|
|
5
|
+
import "./shared/parse-ast-index-CgzK6cxG.mjs";
|
|
6
|
+
import { t as rolldown } from "./shared/rolldown-Vl5SnJ_J.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";
|
package/dist/{normalize-string-or-regex-B-Y4k0qo.js → normalize-string-or-regex-3ql5-z8-.js}
RENAMED
|
@@ -236,10 +236,11 @@ function getLogHandler(level, code, logger, pluginName, logLevel) {
|
|
|
236
236
|
|
|
237
237
|
//#endregion
|
|
238
238
|
//#region package.json
|
|
239
|
-
var version = "1.0.0-beta.
|
|
239
|
+
var version = "1.0.0-beta.58";
|
|
240
240
|
|
|
241
241
|
//#endregion
|
|
242
242
|
//#region src/version.ts
|
|
243
|
+
/** @category Plugin APIs */
|
|
243
244
|
const VERSION = version;
|
|
244
245
|
|
|
245
246
|
//#endregion
|
|
@@ -393,7 +394,7 @@ function bindingAssetSource(source) {
|
|
|
393
394
|
}
|
|
394
395
|
|
|
395
396
|
//#endregion
|
|
396
|
-
//#region \0@oxc-project+runtime@0.
|
|
397
|
+
//#region \0@oxc-project+runtime@0.106.0/helpers/decorate.js
|
|
397
398
|
function __decorate(decorators, target, key, desc) {
|
|
398
399
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
399
400
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./shared/normalize-string-or-regex-
|
|
2
|
-
import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import "./shared/normalize-string-or-regex-CIiT1lMg.mjs";
|
|
2
|
+
import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options--qcSYuhh.mjs";
|
|
3
|
+
import "./shared/parse-ast-index-CgzK6cxG.mjs";
|
|
4
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
5
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { x as Plugin } from "./shared/define-config-
|
|
2
|
-
import { s as MaybePromise } from "./shared/utils-
|
|
1
|
+
import { x as Plugin } from "./shared/define-config-yInAJbA1.mjs";
|
|
2
|
+
import { s as MaybePromise } from "./shared/utils-BGxZdOXA.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
package/dist/parse-ast-index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as BuiltinPlugin, s as makeBuiltinPluginCallable } from "./normalize-string-or-regex-
|
|
2
|
-
import { t as esmExternalRequirePlugin } from "./constructors-
|
|
1
|
+
import { n as BuiltinPlugin, s as makeBuiltinPluginCallable } from "./normalize-string-or-regex-3ql5-z8-.js";
|
|
2
|
+
import { t as esmExternalRequirePlugin } from "./constructors-BuqTjXTF.js";
|
|
3
3
|
|
|
4
4
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
5
5
|
/**
|
package/dist/plugins-index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { u as BindingReplacePluginConfig } from "./shared/binding-
|
|
2
|
-
import { t as BuiltinPlugin } from "./shared/utils-
|
|
3
|
-
import { t as esmExternalRequirePlugin } from "./shared/constructors-
|
|
1
|
+
import { u as BindingReplacePluginConfig } from "./shared/binding-MAEzB4KA.mjs";
|
|
2
|
+
import { t as BuiltinPlugin } from "./shared/utils-BGxZdOXA.mjs";
|
|
3
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-CQP6o3cR.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/builtin-plugin/replace-plugin.d.ts
|
|
6
6
|
|
package/dist/plugins-index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as BuiltinPlugin, s as makeBuiltinPluginCallable } from "./shared/normalize-string-or-regex-
|
|
2
|
-
import { t as esmExternalRequirePlugin } from "./shared/constructors-
|
|
1
|
+
import { n as BuiltinPlugin, s as makeBuiltinPluginCallable } from "./shared/normalize-string-or-regex-CIiT1lMg.mjs";
|
|
2
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-kOch67Sb.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/builtin-plugin/replace-plugin.ts
|
|
5
5
|
/**
|
|
@@ -39,7 +39,7 @@ if (__nodeFs.existsSync(__wasmDebugFilePath)) {
|
|
|
39
39
|
__wasmFilePath = __wasmDebugFilePath
|
|
40
40
|
} else if (!__nodeFs.existsSync(__wasmFilePath)) {
|
|
41
41
|
try {
|
|
42
|
-
__wasmFilePath =
|
|
42
|
+
__wasmFilePath = require.resolve('@rolldown/binding-wasm32-wasi/rolldown-binding.wasm32-wasi.wasm')
|
|
43
43
|
} catch {
|
|
44
44
|
throw new Error('Cannot find rolldown-binding.wasm32-wasi.wasm file, and @rolldown/binding-wasm32-wasi package is not installed.')
|
|
45
45
|
}
|
|
Binary file
|
|
@@ -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-
|
|
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-3ql5-z8-.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
|
|
@@ -433,7 +433,7 @@ const _path = {
|
|
|
433
433
|
|
|
434
434
|
//#endregion
|
|
435
435
|
//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.mjs
|
|
436
|
-
const delimiter =
|
|
436
|
+
const delimiter = globalThis.process?.platform === "win32" ? ";" : ":";
|
|
437
437
|
const _platforms = {
|
|
438
438
|
posix: void 0,
|
|
439
439
|
win32: void 0
|
|
@@ -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")),
|
|
@@ -2112,7 +2113,7 @@ const InputOptionsSchema = strictObject({
|
|
|
2112
2113
|
transform: optional(TransformOptionsSchema),
|
|
2113
2114
|
watch: optional(union([WatchOptionsSchema, literal(false)])),
|
|
2114
2115
|
checks: optional(ChecksOptionsSchema),
|
|
2115
|
-
|
|
2116
|
+
devtools: pipe(optional(object({ sessionId: pipe(optional(string()), description("Used to name the build.")) })), description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly.")),
|
|
2116
2117
|
preserveEntrySignatures: pipe(optional(union([
|
|
2117
2118
|
literal("strict"),
|
|
2118
2119
|
literal("allow-extension"),
|
|
@@ -2242,6 +2243,7 @@ const OutputOptionsSchema = strictObject({
|
|
|
2242
2243
|
generatedCode: pipe(optional(partial(GeneratedCodeOptionsSchema)), description("Generated code options")),
|
|
2243
2244
|
externalLiveBindings: pipe(optional(boolean()), description("external live bindings")),
|
|
2244
2245
|
inlineDynamicImports: pipe(optional(boolean()), description("Inline dynamic imports")),
|
|
2246
|
+
dynamicImportInCjs: pipe(optional(boolean()), description("Dynamic import in CJS output")),
|
|
2245
2247
|
manualChunks: optional(ManualChunksFunctionSchema),
|
|
2246
2248
|
advancedChunks: optional(AdvancedChunksSchema),
|
|
2247
2249
|
legalComments: pipe(optional(union([literal("none"), literal("inline")])), description("Control comments in the output")),
|
|
@@ -2352,7 +2354,7 @@ var RolldownOutputImpl = class extends PlainObjectLike {
|
|
|
2352
2354
|
__decorate([lazyProp], RolldownOutputImpl.prototype, "output", null);
|
|
2353
2355
|
|
|
2354
2356
|
//#endregion
|
|
2355
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
2357
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.106.0/node_modules/oxc-parser/src-js/wrap.js
|
|
2356
2358
|
function wrap$1(result) {
|
|
2357
2359
|
let program, module, comments, errors;
|
|
2358
2360
|
return {
|
|
@@ -2546,7 +2548,7 @@ function normalizeTransformHookSourcemap(id$1, originalCode, rawMap) {
|
|
|
2546
2548
|
}
|
|
2547
2549
|
|
|
2548
2550
|
//#endregion
|
|
2549
|
-
//#region ../pluginutils/dist/composable-filters.js
|
|
2551
|
+
//#region ../pluginutils/dist/filter/composable-filters.js
|
|
2550
2552
|
var And = class {
|
|
2551
2553
|
kind;
|
|
2552
2554
|
args;
|
|
@@ -3639,6 +3641,9 @@ var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
|
3639
3641
|
get inlineDynamicImports() {
|
|
3640
3642
|
return this.inner.inlineDynamicImports;
|
|
3641
3643
|
}
|
|
3644
|
+
get dynamicImportInCjs() {
|
|
3645
|
+
return this.inner.dynamicImportInCjs;
|
|
3646
|
+
}
|
|
3642
3647
|
get externalLiveBindings() {
|
|
3643
3648
|
return this.inner.externalLiveBindings;
|
|
3644
3649
|
}
|
|
@@ -3732,6 +3737,7 @@ __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "shimMissingExport
|
|
|
3732
3737
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "name", null);
|
|
3733
3738
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "file", null);
|
|
3734
3739
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "inlineDynamicImports", null);
|
|
3740
|
+
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "dynamicImportInCjs", null);
|
|
3735
3741
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "externalLiveBindings", null);
|
|
3736
3742
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "banner", null);
|
|
3737
3743
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "footer", null);
|
|
@@ -3933,7 +3939,7 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
3933
3939
|
return ret;
|
|
3934
3940
|
},
|
|
3935
3941
|
makeAbsoluteExternalsRelative: bindingifyMakeAbsoluteExternalsRelative(inputOptions.makeAbsoluteExternalsRelative),
|
|
3936
|
-
|
|
3942
|
+
devtools: inputOptions.devtools,
|
|
3937
3943
|
invalidateJsSideCache: pluginContextData.clear.bind(pluginContextData),
|
|
3938
3944
|
preserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures),
|
|
3939
3945
|
optimization: inputOptions.optimization,
|
|
@@ -4172,6 +4178,7 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
4172
4178
|
minify: outputOptions.minify,
|
|
4173
4179
|
externalLiveBindings: outputOptions.externalLiveBindings,
|
|
4174
4180
|
inlineDynamicImports: outputOptions.inlineDynamicImports,
|
|
4181
|
+
dynamicImportInCjs: outputOptions.dynamicImportInCjs,
|
|
4175
4182
|
advancedChunks,
|
|
4176
4183
|
polyfillRequire: outputOptions.polyfillRequire,
|
|
4177
4184
|
sanitizeFileName,
|
|
@@ -4275,6 +4282,7 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
|
|
|
4275
4282
|
//#endregion
|
|
4276
4283
|
//#region src/api/rolldown/rolldown-build.ts
|
|
4277
4284
|
Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
|
|
4285
|
+
/** @category Programmatic APIs */
|
|
4278
4286
|
var RolldownBuild = class RolldownBuild {
|
|
4279
4287
|
#inputOptions;
|
|
4280
4288
|
#bundler;
|
|
@@ -177,6 +177,15 @@ interface TreeShakeOptions {
|
|
|
177
177
|
* @default true
|
|
178
178
|
*/
|
|
179
179
|
unknownGlobalSideEffects?: boolean;
|
|
180
|
+
/**
|
|
181
|
+
* Whether invalid import statements have side effects.
|
|
182
|
+
*
|
|
183
|
+
* Accessing a non-existing import name will throw an error.
|
|
184
|
+
* Also import statements that cannot be resolved will throw an error.
|
|
185
|
+
*
|
|
186
|
+
* @default true
|
|
187
|
+
*/
|
|
188
|
+
invalidImportSideEffects?: boolean;
|
|
180
189
|
}
|
|
181
190
|
interface Comment {
|
|
182
191
|
type: 'Line' | 'Block';
|
|
@@ -1301,6 +1310,7 @@ declare class BindingNormalizedOptions {
|
|
|
1301
1310
|
get exports(): 'default' | 'named' | 'none' | 'auto';
|
|
1302
1311
|
get esModule(): boolean | 'if-default-prop';
|
|
1303
1312
|
get inlineDynamicImports(): boolean;
|
|
1313
|
+
get dynamicImportInCjs(): boolean;
|
|
1304
1314
|
get sourcemap(): boolean | 'inline' | 'hidden';
|
|
1305
1315
|
get sourcemapBaseUrl(): string | null;
|
|
1306
1316
|
get banner(): string | undefined | null | undefined;
|
package/dist/shared/{bindingify-input-options-kzSFdf_-.mjs → bindingify-input-options--qcSYuhh.mjs}
RENAMED
|
@@ -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-
|
|
4
|
-
import { t as parseAst } from "./parse-ast-index-
|
|
5
|
-
import { a as
|
|
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-CIiT1lMg.mjs";
|
|
4
|
+
import { t as parseAst } from "./parse-ast-index-CgzK6cxG.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";
|
|
@@ -1136,6 +1136,9 @@ var NormalizedOutputOptionsImpl = class extends PlainObjectLike {
|
|
|
1136
1136
|
get inlineDynamicImports() {
|
|
1137
1137
|
return this.inner.inlineDynamicImports;
|
|
1138
1138
|
}
|
|
1139
|
+
get dynamicImportInCjs() {
|
|
1140
|
+
return this.inner.dynamicImportInCjs;
|
|
1141
|
+
}
|
|
1139
1142
|
get externalLiveBindings() {
|
|
1140
1143
|
return this.inner.externalLiveBindings;
|
|
1141
1144
|
}
|
|
@@ -1229,6 +1232,7 @@ __decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "shimMissingExport
|
|
|
1229
1232
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "name", null);
|
|
1230
1233
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "file", null);
|
|
1231
1234
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "inlineDynamicImports", null);
|
|
1235
|
+
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "dynamicImportInCjs", null);
|
|
1232
1236
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "externalLiveBindings", null);
|
|
1233
1237
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "banner", null);
|
|
1234
1238
|
__decorate([lazyProp], NormalizedOutputOptionsImpl.prototype, "footer", null);
|
|
@@ -1430,7 +1434,7 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
1430
1434
|
return ret;
|
|
1431
1435
|
},
|
|
1432
1436
|
makeAbsoluteExternalsRelative: bindingifyMakeAbsoluteExternalsRelative(inputOptions.makeAbsoluteExternalsRelative),
|
|
1433
|
-
|
|
1437
|
+
devtools: inputOptions.devtools,
|
|
1434
1438
|
invalidateJsSideCache: pluginContextData.clear.bind(pluginContextData),
|
|
1435
1439
|
preserveEntrySignatures: bindingifyPreserveEntrySignatures(inputOptions.preserveEntrySignatures),
|
|
1436
1440
|
optimization: inputOptions.optimization,
|