@rolldown/browser 1.1.0 → 1.1.1
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 +7 -7
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +2 -2
- package/dist/{error-5Tc1aq0X.js → error-Azs8e8cN.js} +1 -1
- package/dist/experimental-index.browser.mjs +3 -3
- package/dist/experimental-index.d.mts +5 -5
- package/dist/experimental-index.mjs +3 -3
- package/dist/filter-index.d.mts +1 -104
- package/dist/filter-index.mjs +1 -120
- package/dist/index.browser.mjs +2 -2
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/parallel-plugin-worker.mjs +1 -1
- 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.d.mts +3 -3
- package/dist/{resolve-tsconfig-zB6S1f4Q.js → resolve-tsconfig-Cmw0SAxd.js} +1 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/{rolldown-build-CDo_414H.js → rolldown-build-C9wAyTYG.js} +41 -5
- package/dist/shared/{binding-BhK3B-Zu.d.mts → binding-BPMI4t0-.d.mts} +97 -1
- package/dist/shared/{bindingify-input-options-Yh0p_yKx.mjs → bindingify-input-options-EBZ5IFF2.mjs} +3 -3
- package/dist/shared/{constructors-CtnJN4Sg.d.mts → constructors-DAokZVCk.d.mts} +2 -2
- package/dist/shared/{define-config-D0lnfATD.d.mts → define-config-Nwe1joYW.d.mts} +106 -5
- package/dist/shared/{composable-filters-BcLvc0mh.mjs → filter-B_mD-HGz-Cbrk-2bt.mjs} +117 -4
- package/dist/shared/{load-config-D8sdE9HQ.mjs → load-config-2QjEcEu4.mjs} +1 -1
- package/dist/shared/{parse-DYBaZ0kb.mjs → parse-DNkPrz4w.mjs} +1 -1
- package/dist/shared/{rolldown-CTBzrYF-.mjs → rolldown-Bqp7kINm.mjs} +1 -1
- package/dist/shared/{rolldown-build-w_8ZCR-S.mjs → rolldown-build-BgBj9qUV.mjs} +39 -3
- package/dist/shared/{transform-HS_zMlQ1.d.mts → transform-DulXg6tQ.d.mts} +1 -1
- package/dist/shared/{utils-m0ogxd-4.d.mts → utils-Bp1VejKQ.d.mts} +1 -1
- package/dist/shared/{watch-C5dPEOJJ.mjs → watch-C6WxUyjE.mjs} +3 -3
- package/dist/utils-index.browser.mjs +5 -5
- package/dist/utils-index.d.mts +3 -3
- package/dist/utils-index.mjs +4 -4
- package/package.json +4 -4
package/dist/cli.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
2
|
-
import { C as version, S as description } from "./shared/bindingify-input-options-
|
|
3
|
-
import {
|
|
4
|
-
import { a as getInputCliKeys, i as getCliSchemaInfo, l as styleText, o as getOutputCliKeys, r as logger, s as validateCliOptions } from "./shared/rolldown-build-
|
|
5
|
-
import { t as rolldown } from "./shared/rolldown-
|
|
6
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
1
|
+
import { n as onExit, t as watch } from "./shared/watch-C6WxUyjE.mjs";
|
|
2
|
+
import { C as version, S as description } from "./shared/bindingify-input-options-EBZ5IFF2.mjs";
|
|
3
|
+
import { y as arraify } from "./shared/filter-B_mD-HGz-Cbrk-2bt.mjs";
|
|
4
|
+
import { a as getInputCliKeys, i as getCliSchemaInfo, l as styleText, o as getOutputCliKeys, r as logger, s as validateCliOptions } from "./shared/rolldown-build-BgBj9qUV.mjs";
|
|
5
|
+
import { t as rolldown } from "./shared/rolldown-Bqp7kINm.mjs";
|
|
6
|
+
import { t as loadConfig } from "./shared/load-config-2QjEcEu4.mjs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
import process$1 from "node:process";
|
|
9
9
|
import { performance } from "node:perf_hooks";
|
|
@@ -847,7 +847,7 @@ function getClearScreenFunction(options) {
|
|
|
847
847
|
};
|
|
848
848
|
}
|
|
849
849
|
//#endregion
|
|
850
|
-
//#region \0@oxc-project+runtime@0.
|
|
850
|
+
//#region \0@oxc-project+runtime@0.135.0/helpers/esm/usingCtx.js
|
|
851
851
|
function _usingCtx() {
|
|
852
852
|
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
853
853
|
var n = Error();
|
package/dist/config.d.mts
CHANGED
package/dist/config.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { x as VERSION } from "./shared/bindingify-input-options-
|
|
1
|
+
import { x as VERSION } from "./shared/bindingify-input-options-EBZ5IFF2.mjs";
|
|
2
2
|
import { t as defineConfig } from "./shared/define-config-Demdg3_4.mjs";
|
|
3
|
-
import { t as loadConfig } from "./shared/load-config-
|
|
3
|
+
import { t as loadConfig } from "./shared/load-config-2QjEcEu4.mjs";
|
|
4
4
|
export { VERSION, defineConfig, loadConfig };
|
|
@@ -14,7 +14,7 @@ function bindingifySourcemap(map) {
|
|
|
14
14
|
} };
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
17
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.135.0/node_modules/oxc-parser/src-js/wrap.js
|
|
18
18
|
function wrap(result) {
|
|
19
19
|
let program, module, comments, errors;
|
|
20
20
|
return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-A9UIvc9j.js";
|
|
2
|
-
import { a as validateOption, i as transformToRollupOutput, n as createBundlerOptions, o as PluginDriver, t as RolldownBuild } from "./rolldown-build-
|
|
3
|
-
import { a as parse$2, i as unwrapBindingResult, o as parseSync$2, r as normalizeBindingResult } from "./error-
|
|
2
|
+
import { a as validateOption, i as transformToRollupOutput, n as createBundlerOptions, o as PluginDriver, t as RolldownBuild } from "./rolldown-build-C9wAyTYG.js";
|
|
3
|
+
import { a as parse$2, i as unwrapBindingResult, o as parseSync$2, r as normalizeBindingResult } from "./error-Azs8e8cN.js";
|
|
4
4
|
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./constructors-B3MtwuwE.js";
|
|
5
|
-
import { a as minify$2, i as transformSync$1, n as resolveTsconfig, o as minifySync$2, r as transform$1, t as TsconfigCache$2 } from "./resolve-tsconfig-
|
|
5
|
+
import { a as minify$2, i as transformSync$1, n as resolveTsconfig, o as minifySync$2, r as transform$1, t as TsconfigCache$2 } from "./resolve-tsconfig-Cmw0SAxd.js";
|
|
6
6
|
import * as binding from "./rolldown-binding.wasi-browser.js";
|
|
7
7
|
import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
8
8
|
//#region src/api/dev/dev-engine.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { B as ResolveResult, C as BindingViteManifestPluginConfig, G as isolatedDeclaration, I as NapiResolveOptions, K as isolatedDeclarationSync, M as IsolatedDeclarationsResult, O as BindingViteTransformPluginConfig, V as ResolverFactory, _ as BindingTsconfigRawOptions, f as BindingRebuildStrategy, g as BindingTsconfigCompilerOptions, i as BindingClientHmrUpdate, j as IsolatedDeclarationsOptions, n as BindingBundleAnalyzerPluginConfig, q as moduleRunnerTransform, r as BindingBundleState } from "./shared/binding-
|
|
2
|
-
import {
|
|
3
|
-
import { s as StringOrRegExp, t as BuiltinPlugin } from "./shared/utils-
|
|
4
|
-
import { a as MinifyOptions$1, c as minifySync$1, d as parse$1, f as parseSync$1, i as transformSync$1, l as ParseResult$1, m as resolveTsconfig, n as TransformResult$1, o as MinifyResult$1, p as TsconfigCache$1, r as transform$1, s as minify$1, t as TransformOptions$1, u as ParserOptions$1 } from "./shared/transform-
|
|
5
|
-
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-
|
|
1
|
+
import { B as ResolveResult, C as BindingViteManifestPluginConfig, G as isolatedDeclaration, I as NapiResolveOptions, K as isolatedDeclarationSync, M as IsolatedDeclarationsResult, O as BindingViteTransformPluginConfig, V as ResolverFactory, _ as BindingTsconfigRawOptions, f as BindingRebuildStrategy, g as BindingTsconfigCompilerOptions, i as BindingClientHmrUpdate, j as IsolatedDeclarationsOptions, n as BindingBundleAnalyzerPluginConfig, q as moduleRunnerTransform, r as BindingBundleState } from "./shared/binding-BPMI4t0-.mjs";
|
|
2
|
+
import { fn as RolldownOutput, kt as NormalizedOutputOptions, l as InputOptions, mn as freeExternalMemory, on as OutputOptions, vt as defineParallelPlugin } from "./shared/define-config-Nwe1joYW.mjs";
|
|
3
|
+
import { s as StringOrRegExp, t as BuiltinPlugin } from "./shared/utils-Bp1VejKQ.mjs";
|
|
4
|
+
import { a as MinifyOptions$1, c as minifySync$1, d as parse$1, f as parseSync$1, i as transformSync$1, l as ParseResult$1, m as resolveTsconfig, n as TransformResult$1, o as MinifyResult$1, p as TsconfigCache$1, r as transform$1, s as minify$1, t as TransformOptions$1, u as ParserOptions$1 } from "./shared/transform-DulXg6tQ.mjs";
|
|
5
|
+
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-DAokZVCk.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/api/dev/dev-options.d.ts
|
|
8
8
|
type DevOnHmrUpdates = (result: Error | {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as BuiltinPlugin, t as normalizedStringOrRegex } from "./shared/normalize-string-or-regex-CHVaSqeF.mjs";
|
|
2
|
-
import { o as transformToRollupOutput } from "./shared/bindingify-input-options-
|
|
3
|
-
import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-
|
|
2
|
+
import { o as transformToRollupOutput } from "./shared/bindingify-input-options-EBZ5IFF2.mjs";
|
|
3
|
+
import { c as validateOption, n as createBundlerOptions, t as RolldownBuild, u as PluginDriver } from "./shared/rolldown-build-BgBj9qUV.mjs";
|
|
4
4
|
import { i as unwrapBindingResult, r as normalizeBindingResult } from "./shared/error-B5cMIevi.mjs";
|
|
5
|
-
import { n as parseSync$2, t as parse$2 } from "./shared/parse-
|
|
5
|
+
import { n as parseSync$2, t as parse$2 } from "./shared/parse-DNkPrz4w.mjs";
|
|
6
6
|
import { a as viteDynamicImportVarsPlugin, c as viteLoadFallbackPlugin, d as viteReporterPlugin, f as viteResolvePlugin, i as viteBuildImportAnalysisPlugin, l as viteModulePreloadPolyfillPlugin, m as viteWebWorkerPostPlugin, n as isolatedDeclarationPlugin, o as viteImportGlobPlugin, p as viteWasmFallbackPlugin, r as oxcRuntimePlugin, s as viteJsonPlugin, u as viteReactRefreshWrapperPlugin } from "./shared/constructors-YQsI-lJq.mjs";
|
|
7
7
|
import { a as minify$2, i as transformSync$1, n as resolveTsconfig, o as minifySync$2, r as transform$1, t as TsconfigCache$2 } from "./shared/resolve-tsconfig-DsK7KzKK.mjs";
|
|
8
8
|
import { BindingBundler, BindingDevEngine, BindingRebuildStrategy, BindingRebuildStrategy as BindingRebuildStrategy$1, ResolverFactory, isolatedDeclaration, isolatedDeclarationSync, moduleRunnerTransform, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi.cjs";
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,105 +1,2 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
|
|
3
|
-
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Filters out Vite plugins that have `apply: 'serve'` set.
|
|
6
|
-
*
|
|
7
|
-
* Since Rolldown operates in build mode, plugins marked with `apply: 'serve'`
|
|
8
|
-
* are intended only for Vite's dev server and should be excluded from the build process.
|
|
9
|
-
*
|
|
10
|
-
* @param plugins - Array of plugins (can include nested arrays)
|
|
11
|
-
* @returns Filtered array with serve-only plugins removed
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* import { defineConfig } from 'rolldown';
|
|
16
|
-
* import { filterVitePlugins } from '@rolldown/pluginutils';
|
|
17
|
-
* import viteReact from '@vitejs/plugin-react';
|
|
18
|
-
*
|
|
19
|
-
* export default defineConfig({
|
|
20
|
-
* plugins: filterVitePlugins([
|
|
21
|
-
* viteReact(),
|
|
22
|
-
* {
|
|
23
|
-
* name: 'dev-only',
|
|
24
|
-
* apply: 'serve', // This will be filtered out
|
|
25
|
-
* // ...
|
|
26
|
-
* }
|
|
27
|
-
* ])
|
|
28
|
-
* });
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
declare function filterVitePlugins<T = any>(plugins: T | T[] | null | undefined | false): T[];
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.d.ts
|
|
34
|
-
/**
|
|
35
|
-
* Constructs a RegExp that matches the exact string specified.
|
|
36
|
-
*
|
|
37
|
-
* This is useful for plugin hook filters.
|
|
38
|
-
*
|
|
39
|
-
* @param str the string to match.
|
|
40
|
-
* @param flags flags for the RegExp.
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```ts
|
|
44
|
-
* import { exactRegex } from '@rolldown/pluginutils';
|
|
45
|
-
* const plugin = {
|
|
46
|
-
* name: 'plugin',
|
|
47
|
-
* resolveId: {
|
|
48
|
-
* filter: { id: exactRegex('foo') },
|
|
49
|
-
* handler(id) {} // will only be called for `foo`
|
|
50
|
-
* }
|
|
51
|
-
* }
|
|
52
|
-
* ```
|
|
53
|
-
*/
|
|
54
|
-
declare function exactRegex(str: string, flags?: string): RegExp;
|
|
55
|
-
/**
|
|
56
|
-
* Constructs a RegExp that matches a value that has the specified prefix.
|
|
57
|
-
*
|
|
58
|
-
* This is useful for plugin hook filters.
|
|
59
|
-
*
|
|
60
|
-
* @param str the string to match.
|
|
61
|
-
* @param flags flags for the RegExp.
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```ts
|
|
65
|
-
* import { prefixRegex } from '@rolldown/pluginutils';
|
|
66
|
-
* const plugin = {
|
|
67
|
-
* name: 'plugin',
|
|
68
|
-
* resolveId: {
|
|
69
|
-
* filter: { id: prefixRegex('foo') },
|
|
70
|
-
* handler(id) {} // will only be called for IDs starting with `foo`
|
|
71
|
-
* }
|
|
72
|
-
* }
|
|
73
|
-
* ```
|
|
74
|
-
*/
|
|
75
|
-
declare function prefixRegex(str: string, flags?: string): RegExp;
|
|
76
|
-
type WidenString<T> = T extends string ? string : T;
|
|
77
|
-
/**
|
|
78
|
-
* Converts a id filter to match with an id with a query.
|
|
79
|
-
*
|
|
80
|
-
* @param input the id filters to convert.
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* ```ts
|
|
84
|
-
* import { makeIdFiltersToMatchWithQuery } from '@rolldown/pluginutils';
|
|
85
|
-
* const plugin = {
|
|
86
|
-
* name: 'plugin',
|
|
87
|
-
* transform: {
|
|
88
|
-
* filter: { id: makeIdFiltersToMatchWithQuery(['**' + '/*.js', /\.ts$/]) },
|
|
89
|
-
* // The handler will be called for IDs like:
|
|
90
|
-
* // - foo.js
|
|
91
|
-
* // - foo.js?foo
|
|
92
|
-
* // - foo.txt?foo.js
|
|
93
|
-
* // - foo.ts
|
|
94
|
-
* // - foo.ts?foo
|
|
95
|
-
* // - foo.txt?foo.ts
|
|
96
|
-
* handler(code, id) {}
|
|
97
|
-
* }
|
|
98
|
-
* }
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
declare function makeIdFiltersToMatchWithQuery<T extends string | RegExp>(input: T): WidenString<T>;
|
|
102
|
-
declare function makeIdFiltersToMatchWithQuery<T extends string | RegExp>(input: readonly T[]): WidenString<T>[];
|
|
103
|
-
declare function makeIdFiltersToMatchWithQuery(input: string | RegExp | readonly (string | RegExp)[]): string | RegExp | (string | RegExp)[];
|
|
104
|
-
//#endregion
|
|
1
|
+
import { $ as prefixRegex, B as exactRegex, F as FilterExpressionKind, G as importerId, H as exprInterpreter, I as QueryFilterObject, J as interpreterImpl, K as include, L as TopLevelFilterExpression, N as withFilter, P as FilterExpression, Q as or, R as and, U as filterVitePlugins, V as exclude, W as id, X as moduleType, Y as makeIdFiltersToMatchWithQuery, Z as not, et as queries, q as interpreter, tt as query, z as code } from "./shared/define-config-Nwe1joYW.mjs";
|
|
105
2
|
export { FilterExpression, FilterExpressionKind, QueryFilterObject, TopLevelFilterExpression, and, code, exactRegex, exclude, exprInterpreter, filterVitePlugins, id, importerId, include, interpreter, interpreterImpl, makeIdFiltersToMatchWithQuery, moduleType, not, or, prefixRegex, queries, query, withFilter };
|
package/dist/filter-index.mjs
CHANGED
|
@@ -1,123 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0/node_modules/@rolldown/pluginutils/dist/filter/filter-vite-plugins.js
|
|
3
|
-
/**
|
|
4
|
-
* Filters out Vite plugins that have `apply: 'serve'` set.
|
|
5
|
-
*
|
|
6
|
-
* Since Rolldown operates in build mode, plugins marked with `apply: 'serve'`
|
|
7
|
-
* are intended only for Vite's dev server and should be excluded from the build process.
|
|
8
|
-
*
|
|
9
|
-
* @param plugins - Array of plugins (can include nested arrays)
|
|
10
|
-
* @returns Filtered array with serve-only plugins removed
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* import { defineConfig } from 'rolldown';
|
|
15
|
-
* import { filterVitePlugins } from '@rolldown/pluginutils';
|
|
16
|
-
* import viteReact from '@vitejs/plugin-react';
|
|
17
|
-
*
|
|
18
|
-
* export default defineConfig({
|
|
19
|
-
* plugins: filterVitePlugins([
|
|
20
|
-
* viteReact(),
|
|
21
|
-
* {
|
|
22
|
-
* name: 'dev-only',
|
|
23
|
-
* apply: 'serve', // This will be filtered out
|
|
24
|
-
* // ...
|
|
25
|
-
* }
|
|
26
|
-
* ])
|
|
27
|
-
* });
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
function filterVitePlugins(plugins) {
|
|
31
|
-
if (!plugins) return [];
|
|
32
|
-
const pluginArray = Array.isArray(plugins) ? plugins : [plugins];
|
|
33
|
-
const result = [];
|
|
34
|
-
for (const plugin of pluginArray) {
|
|
35
|
-
if (!plugin) continue;
|
|
36
|
-
if (Array.isArray(plugin)) {
|
|
37
|
-
result.push(...filterVitePlugins(plugin));
|
|
38
|
-
continue;
|
|
39
|
-
}
|
|
40
|
-
const pluginWithApply = plugin;
|
|
41
|
-
if ("apply" in pluginWithApply) {
|
|
42
|
-
const applyValue = pluginWithApply.apply;
|
|
43
|
-
if (typeof applyValue === "function") try {
|
|
44
|
-
if (applyValue({}, {
|
|
45
|
-
command: "build",
|
|
46
|
-
mode: "production"
|
|
47
|
-
})) result.push(plugin);
|
|
48
|
-
} catch {
|
|
49
|
-
result.push(plugin);
|
|
50
|
-
}
|
|
51
|
-
else if (applyValue === "serve") continue;
|
|
52
|
-
else result.push(plugin);
|
|
53
|
-
} else result.push(plugin);
|
|
54
|
-
}
|
|
55
|
-
return result;
|
|
56
|
-
}
|
|
57
|
-
//#endregion
|
|
58
|
-
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js
|
|
59
|
-
/**
|
|
60
|
-
* Constructs a RegExp that matches the exact string specified.
|
|
61
|
-
*
|
|
62
|
-
* This is useful for plugin hook filters.
|
|
63
|
-
*
|
|
64
|
-
* @param str the string to match.
|
|
65
|
-
* @param flags flags for the RegExp.
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```ts
|
|
69
|
-
* import { exactRegex } from '@rolldown/pluginutils';
|
|
70
|
-
* const plugin = {
|
|
71
|
-
* name: 'plugin',
|
|
72
|
-
* resolveId: {
|
|
73
|
-
* filter: { id: exactRegex('foo') },
|
|
74
|
-
* handler(id) {} // will only be called for `foo`
|
|
75
|
-
* }
|
|
76
|
-
* }
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
|
-
function exactRegex(str, flags) {
|
|
80
|
-
return new RegExp(`^${escapeRegex(str)}$`, flags);
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Constructs a RegExp that matches a value that has the specified prefix.
|
|
84
|
-
*
|
|
85
|
-
* This is useful for plugin hook filters.
|
|
86
|
-
*
|
|
87
|
-
* @param str the string to match.
|
|
88
|
-
* @param flags flags for the RegExp.
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* ```ts
|
|
92
|
-
* import { prefixRegex } from '@rolldown/pluginutils';
|
|
93
|
-
* const plugin = {
|
|
94
|
-
* name: 'plugin',
|
|
95
|
-
* resolveId: {
|
|
96
|
-
* filter: { id: prefixRegex('foo') },
|
|
97
|
-
* handler(id) {} // will only be called for IDs starting with `foo`
|
|
98
|
-
* }
|
|
99
|
-
* }
|
|
100
|
-
* ```
|
|
101
|
-
*/
|
|
102
|
-
function prefixRegex(str, flags) {
|
|
103
|
-
return new RegExp(`^${escapeRegex(str)}`, flags);
|
|
104
|
-
}
|
|
105
|
-
const escapeRegexRE = /[-/\\^$*+?.()|[\]{}]/g;
|
|
106
|
-
function escapeRegex(str) {
|
|
107
|
-
return str.replace(escapeRegexRE, "\\$&");
|
|
108
|
-
}
|
|
109
|
-
function makeIdFiltersToMatchWithQuery(input) {
|
|
110
|
-
if (!Array.isArray(input)) return makeIdFilterToMatchWithQuery(input);
|
|
111
|
-
return input.map((i) => makeIdFilterToMatchWithQuery(i));
|
|
112
|
-
}
|
|
113
|
-
function makeIdFilterToMatchWithQuery(input) {
|
|
114
|
-
if (typeof input === "string") return `${input}{?*,}`;
|
|
115
|
-
return makeRegexIdFilterToMatchWithQuery(input);
|
|
116
|
-
}
|
|
117
|
-
function makeRegexIdFilterToMatchWithQuery(input) {
|
|
118
|
-
return new RegExp(input.source.replace(/(?<!\\)\$/g, "(?:\\?.*)?$"), input.flags);
|
|
119
|
-
}
|
|
120
|
-
//#endregion
|
|
1
|
+
import { _ as queries, a as exprInterpreter, b as isPromiseLike, c as importerId, d as interpreterImpl, f as makeIdFiltersToMatchWithQuery, g as prefixRegex, h as or, i as exclude, l as include, m as not, n as code, o as filterVitePlugins, p as moduleType, r as exactRegex, s as id, t as and, u as interpreter, v as query, y as arraify } from "./shared/filter-B_mD-HGz-Cbrk-2bt.mjs";
|
|
121
2
|
//#region src/plugin/with-filter.ts
|
|
122
3
|
function withFilterImpl(pluginOption, filterObjectList) {
|
|
123
4
|
if (isPromiseLike(pluginOption)) return pluginOption.then((p) => withFilter(p, filterObjectList));
|
package/dist/index.browser.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as logMultipleWatcherOption } from "./normalize-string-or-regex-A9UIvc9j.js";
|
|
2
|
-
import { a as validateOption, c as arraify, l as RUNTIME_MODULE_ID, n as createBundlerOptions, o as PluginDriver, r as RolldownMagicString, s as LOG_LEVEL_WARN, t as RolldownBuild, u as VERSION } from "./rolldown-build-
|
|
3
|
-
import { t as aggregateBindingErrorsIntoJsError } from "./error-
|
|
2
|
+
import { a as validateOption, c as arraify, l as RUNTIME_MODULE_ID, n as createBundlerOptions, o as PluginDriver, r as RolldownMagicString, s as LOG_LEVEL_WARN, t as RolldownBuild, u as VERSION } from "./rolldown-build-C9wAyTYG.js";
|
|
3
|
+
import { t as aggregateBindingErrorsIntoJsError } from "./error-Azs8e8cN.js";
|
|
4
4
|
import { BindingWatcher, shutdownAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
5
5
|
//#region src/api/rolldown/index.ts
|
|
6
6
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z as PreRenderedChunk } from "./shared/binding-
|
|
1
|
+
import { z as PreRenderedChunk } from "./shared/binding-BPMI4t0-.mjs";
|
|
2
2
|
import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./shared/logging-BSNejiLS.mjs";
|
|
3
|
-
import { $
|
|
4
|
-
import { o as PartialNull } from "./shared/utils-
|
|
3
|
+
import { $t as CodeSplittingOptions, A as RolldownPluginOption, At as NormalizedInputOptions, Bt as WatchOptions, C as ParallelPluginHooks, Ct as ModuleTypeFilter, D as ResolveIdResult, Dt as RolldownFsModule, E as ResolveIdExtraOptions, Et as RolldownFileStats, Ft as RolldownMagicString, Gt as AddonFunction, Ht as RolldownBuild, It as watch, Jt as BuiltinModuleTag, Kt as AdvancedChunksGroup, Lt as RolldownWatcher, M as TransformResult, Mt as ChecksOptions, Nt as LoggingFunction, O as ResolvedId, Ot as InternalModuleFormat, Pt as WarningHandlerWithDefault, Qt as CodeSplittingNameFunction, Rt as RolldownWatcherEvent, S as ObjectHook, St as HookFilter, T as Plugin, Tt as RolldownDirectoryEntry, Ut as BuildOptions, Vt as rolldown, Wt as build, Xt as ChunkingContext, Yt as ChunkFileNamesFunction, Zt as CodeSplittingGroup, _ as HookFilterExtension, _t as DefineParallelPluginResult, a as ChunkOptimizationOptions, an as ModuleFormat, at as ExistingRawSourceMap, b as ModuleOptions, bt as PluginContextMeta, c as InputOption, cn as OutputAsset, ct as TreeshakingOptions, d as OptimizationOptions, dn as RenderedModule, dt as EmittedChunk, en as CommentsOptions, f as WatcherFileWatcherOptions, fn as RolldownOutput, ft as EmittedFile, g as FunctionPluginHooks, gn as SourcemapIgnoreListOption, gt as PluginContextResolveOptions, h as CustomPluginOptions, hn as ModuleInfo, ht as PluginContext, i as RolldownOptions, in as MinifyOptions, it as BundleError, j as SourceDescription, jt as TransformOptions, k as RolldownPlugin, kt as NormalizedOutputOptions, l as InputOptions, ln as OutputChunk, lt as TransformPluginContext, m as AsyncPluginHooks, mt as GetModuleInfo, n as RolldownOptionsFunction, nn as GeneratedCodePreset, nt as RUNTIME_MODULE_ID, o as ExternalOption, on as OutputOptions, ot as SourceMapInput, p as WatcherOptions, pn as SourceMap, pt as EmittedPrebuiltChunk, qt as AdvancedChunksOptions, r as defineConfig, rn as GlobalsFunction, rt as VERSION, s as ExternalOptionFunction, sn as PreRenderedAsset, st as OutputBundle, t as ConfigExport, tn as GeneratedCodeOptions, u as ModuleTypes, un as RenderedChunk, ut as EmittedAsset, v as ImportKind, w as PartialResolvedId, wt as BufferEncoding, x as ModuleType, xt as GeneralHookFilter, y as LoadResult, yt as MinimalPluginContext, zt as RolldownWatcherWatcherEventMap } from "./shared/define-config-Nwe1joYW.mjs";
|
|
4
|
+
import { o as PartialNull } from "./shared/utils-Bp1VejKQ.mjs";
|
|
5
5
|
export { type AddonFunction, type AdvancedChunksGroup, type AdvancedChunksOptions, type AsyncPluginHooks, type BufferEncoding, type BuildOptions, type BuiltinModuleTag, type BundleError, type ChecksOptions, type ChunkFileNamesFunction, type ChunkOptimizationOptions, type ChunkingContext, type CodeSplittingGroup, type CodeSplittingNameFunction, type CodeSplittingOptions, type CommentsOptions, type ConfigExport, type CustomPluginOptions, type DefineParallelPluginResult, type EmittedAsset, type EmittedChunk, type EmittedFile, type EmittedPrebuiltChunk, type ExistingRawSourceMap, type ExternalOption, type ExternalOptionFunction, type FunctionPluginHooks, type GeneralHookFilter, type GeneratedCodeOptions, type GeneratedCodePreset, type GetModuleInfo, type GlobalsFunction, type HookFilter, type HookFilterExtension, type ImportKind, type InputOption, type InputOptions, type InternalModuleFormat, type LoadResult, type LogLevel, type LogLevelOption, type LogOrStringHandler, type LoggingFunction, type MinifyOptions, type MinimalPluginContext, type ModuleFormat, type ModuleInfo, type ModuleOptions, type ModuleType, type ModuleTypeFilter, type ModuleTypes, type NormalizedInputOptions, type NormalizedOutputOptions, type ObjectHook, type OptimizationOptions, type OutputAsset, type OutputBundle, type OutputChunk, type OutputOptions, type ParallelPluginHooks, type PartialNull, type PartialResolvedId, type Plugin, type PluginContext, type PluginContextMeta, type PluginContextResolveOptions, type PreRenderedAsset, type PreRenderedChunk, RUNTIME_MODULE_ID, type RenderedChunk, type RenderedModule, type ResolveIdExtraOptions, type ResolveIdResult, type ResolvedId, type RolldownBuild, type RolldownDirectoryEntry, type RolldownError, type RolldownError as RollupError, type RolldownFileStats, type RolldownFsModule, type RolldownLog, type RolldownLog as RollupLog, type RolldownLogWithString, type RolldownLogWithString as RollupLogWithString, RolldownMagicString, type RolldownOptions, type RolldownOptionsFunction, type RolldownOutput, type RolldownPlugin, type RolldownPluginOption, type RolldownWatcher, type RolldownWatcherEvent, type RolldownWatcherWatcherEventMap, type SourceDescription, type SourceMap, type SourceMapInput, type SourcemapIgnoreListOption, type TransformOptions, type TransformPluginContext, type TransformResult, type TreeshakingOptions, VERSION, type WarningHandlerWithDefault, type WatchOptions, type WatcherFileWatcherOptions, type WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as onExit, t as watch } from "./shared/watch-
|
|
2
|
-
import { a as RolldownMagicString, b as RUNTIME_MODULE_ID, x as VERSION } from "./shared/bindingify-input-options-
|
|
3
|
-
import { t as rolldown } from "./shared/rolldown-
|
|
1
|
+
import { n as onExit, t as watch } from "./shared/watch-C6WxUyjE.mjs";
|
|
2
|
+
import { a as RolldownMagicString, b as RUNTIME_MODULE_ID, x as VERSION } from "./shared/bindingify-input-options-EBZ5IFF2.mjs";
|
|
3
|
+
import { t as rolldown } from "./shared/rolldown-Bqp7kINm.mjs";
|
|
4
4
|
import { t as defineConfig } from "./shared/define-config-Demdg3_4.mjs";
|
|
5
5
|
import { isMainThread } from "node:worker_threads";
|
|
6
6
|
import { initTraceSubscriber } from "./rolldown-binding.wasi.cjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-
|
|
1
|
+
import { n as PluginContextData, r as bindingifyPlugin } from "./shared/bindingify-input-options-EBZ5IFF2.mjs";
|
|
2
2
|
import { parentPort, workerData } from "node:worker_threads";
|
|
3
3
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
4
4
|
//#region src/parallel-plugin-worker.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Plugin } from "./shared/define-config-
|
|
2
|
-
import { i as MaybePromise } from "./shared/utils-
|
|
1
|
+
import { T as Plugin } from "./shared/define-config-Nwe1joYW.mjs";
|
|
2
|
+
import { i as MaybePromise } from "./shared/utils-Bp1VejKQ.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
1
|
import { l as locate, n as error, s as logParseError, t as augmentCodeLocation, u as getCodeFrame } from "./shared/logs-aMKUxRpj.mjs";
|
|
2
|
-
import { n as parseSync, t as parse } from "./shared/parse-
|
|
2
|
+
import { n as parseSync, t as parse } from "./shared/parse-DNkPrz4w.mjs";
|
|
3
3
|
//#region src/parse-ast-index.ts
|
|
4
4
|
function wrap(result, filename, sourceText) {
|
|
5
5
|
if (result.errors.length > 0) return normalizeParseError(filename, sourceText, result.errors);
|
package/dist/plugins-index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { m as BindingReplacePluginConfig } from "./shared/binding-
|
|
2
|
-
import { t as BuiltinPlugin } from "./shared/utils-
|
|
3
|
-
import { t as esmExternalRequirePlugin } from "./shared/constructors-
|
|
1
|
+
import { m as BindingReplacePluginConfig } from "./shared/binding-BPMI4t0-.mjs";
|
|
2
|
+
import { t as BuiltinPlugin } from "./shared/utils-Bp1VejKQ.mjs";
|
|
3
|
+
import { t as esmExternalRequirePlugin } from "./shared/constructors-DAokZVCk.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/builtin-plugin/replace-plugin.d.ts
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as normalizeBindingError, s as bindingifySourcemap } from "./error-
|
|
1
|
+
import { n as normalizeBindingError, s as bindingifySourcemap } from "./error-Azs8e8cN.js";
|
|
2
2
|
import { TsconfigCache, collapseSourcemaps, enhancedTransform, enhancedTransformSync, minify, minifySync, resolveTsconfig } from "./rolldown-binding.wasi-browser.js";
|
|
3
3
|
//#region src/utils/minify.ts
|
|
4
4
|
/**
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as logCycleLoading, f as logNoFileSystemInBrowser, g as getCodeFrame, h as locate, i as bindingifyManifestPlugin, l as logInputHookInOutputPlugin, m as logPluginError, n as BuiltinPlugin, o as augmentCodeLocation, p as logParseError, r as bindingifyBuiltInPlugin, s as error, t as normalizedStringOrRegex, u as logInvalidLogPosition } from "./normalize-string-or-regex-A9UIvc9j.js";
|
|
2
|
-
import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-
|
|
2
|
+
import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-Azs8e8cN.js";
|
|
3
3
|
import { BindingAttachDebugInfo, BindingBundler, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
4
4
|
//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
5
5
|
let _lazyMatch = () => {
|
|
@@ -454,7 +454,7 @@ const win32 = /* @__PURE__ */ mix(";");
|
|
|
454
454
|
*
|
|
455
455
|
* @category Plugin APIs
|
|
456
456
|
*/
|
|
457
|
-
const VERSION = "1.1.
|
|
457
|
+
const VERSION = "1.1.1";
|
|
458
458
|
//#endregion
|
|
459
459
|
//#region src/constants/index.ts
|
|
460
460
|
/**
|
|
@@ -1914,7 +1914,43 @@ const TransformOptionsSchema = /* @__PURE__ */ object({
|
|
|
1914
1914
|
plugins: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ object({
|
|
1915
1915
|
styledComponents: /* @__PURE__ */ optional(/* @__PURE__ */ any()),
|
|
1916
1916
|
taggedTemplateEscape: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1917
|
-
})), /* @__PURE__ */ description("Third-party plugins to use"))
|
|
1917
|
+
})), /* @__PURE__ */ description("Third-party plugins to use")),
|
|
1918
|
+
reactCompiler: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ object({
|
|
1919
|
+
compilationMode: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1920
|
+
/* @__PURE__ */ literal("infer"),
|
|
1921
|
+
/* @__PURE__ */ literal("syntax"),
|
|
1922
|
+
/* @__PURE__ */ literal("annotation"),
|
|
1923
|
+
/* @__PURE__ */ literal("all")
|
|
1924
|
+
])),
|
|
1925
|
+
panicThreshold: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1926
|
+
/* @__PURE__ */ literal("none"),
|
|
1927
|
+
/* @__PURE__ */ literal("critical_errors"),
|
|
1928
|
+
/* @__PURE__ */ literal("all_errors")
|
|
1929
|
+
])),
|
|
1930
|
+
target: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1931
|
+
/* @__PURE__ */ literal("17"),
|
|
1932
|
+
/* @__PURE__ */ literal("18"),
|
|
1933
|
+
/* @__PURE__ */ literal("19")
|
|
1934
|
+
])),
|
|
1935
|
+
noEmit: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1936
|
+
outputMode: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1937
|
+
/* @__PURE__ */ literal("client"),
|
|
1938
|
+
/* @__PURE__ */ literal("ssr"),
|
|
1939
|
+
/* @__PURE__ */ literal("lint")
|
|
1940
|
+
])),
|
|
1941
|
+
ignoreUseNoForget: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1942
|
+
flowSuppressions: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1943
|
+
enableReanimated: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1944
|
+
isDev: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1945
|
+
filename: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1946
|
+
eslintSuppressionRules: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1947
|
+
customOptOutDirectives: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1948
|
+
gating: /* @__PURE__ */ optional(/* @__PURE__ */ object({
|
|
1949
|
+
source: /* @__PURE__ */ string(),
|
|
1950
|
+
importSpecifierName: /* @__PURE__ */ string()
|
|
1951
|
+
})),
|
|
1952
|
+
dynamicGating: /* @__PURE__ */ optional(/* @__PURE__ */ object({ source: /* @__PURE__ */ string() }))
|
|
1953
|
+
})]))
|
|
1918
1954
|
});
|
|
1919
1955
|
const WatcherFileWatcherOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1920
1956
|
usePolling: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Use polling-based file watching instead of native OS events")),
|
|
@@ -2441,7 +2477,7 @@ function bindingAssetSource(source) {
|
|
|
2441
2477
|
return { inner: source };
|
|
2442
2478
|
}
|
|
2443
2479
|
//#endregion
|
|
2444
|
-
//#region \0@oxc-project+runtime@0.
|
|
2480
|
+
//#region \0@oxc-project+runtime@0.135.0/helpers/esm/decorate.js
|
|
2445
2481
|
function __decorate(decorators, target, key, desc) {
|
|
2446
2482
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2447
2483
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -2962,7 +2998,7 @@ function normalizeTransformHookSourcemap(id, originalCode, rawMap) {
|
|
|
2962
2998
|
return map;
|
|
2963
2999
|
}
|
|
2964
3000
|
//#endregion
|
|
2965
|
-
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.
|
|
3001
|
+
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.1/node_modules/@rolldown/pluginutils/dist/filter-B_mD-HGz.mjs
|
|
2966
3002
|
var And = class {
|
|
2967
3003
|
kind;
|
|
2968
3004
|
args;
|
|
@@ -1338,7 +1338,7 @@ interface CompressOptions {
|
|
|
1338
1338
|
*
|
|
1339
1339
|
* @default 'esnext'
|
|
1340
1340
|
*
|
|
1341
|
-
* @see [
|
|
1341
|
+
* @see [oxc#target](https://oxc.rs/docs/guide/usage/transformer/lowering#target)
|
|
1342
1342
|
*/
|
|
1343
1343
|
target?: string | Array<string>;
|
|
1344
1344
|
/**
|
|
@@ -2283,6 +2283,94 @@ interface PluginsOptions {
|
|
|
2283
2283
|
styledComponents?: StyledComponentsOptions;
|
|
2284
2284
|
taggedTemplateEscape?: boolean;
|
|
2285
2285
|
}
|
|
2286
|
+
/** Dynamic gating for {@link ReactCompilerOptions#dynamicGating}. */
|
|
2287
|
+
interface ReactCompilerDynamicGating {
|
|
2288
|
+
/** Module the gating import comes from. */
|
|
2289
|
+
source: string;
|
|
2290
|
+
}
|
|
2291
|
+
/** Static gating for {@link ReactCompilerOptions#gating}. */
|
|
2292
|
+
interface ReactCompilerGating {
|
|
2293
|
+
/** Module the gating import comes from. */
|
|
2294
|
+
source: string;
|
|
2295
|
+
/** Imported specifier used as the gate. */
|
|
2296
|
+
importSpecifierName: string;
|
|
2297
|
+
}
|
|
2298
|
+
/**
|
|
2299
|
+
* Options for the experimental [React Compiler](https://github.com/facebook/react/pull/36173).
|
|
2300
|
+
*
|
|
2301
|
+
* Mirrors the compiler's `PluginOptions`. The deep `environment` configuration
|
|
2302
|
+
* (inference / validation flags) is not surfaced here.
|
|
2303
|
+
*
|
|
2304
|
+
* @see {@link TransformOptions#reactCompiler}
|
|
2305
|
+
*/
|
|
2306
|
+
interface ReactCompilerOptions {
|
|
2307
|
+
/**
|
|
2308
|
+
* Which functions to compile.
|
|
2309
|
+
*
|
|
2310
|
+
* @default 'infer'
|
|
2311
|
+
*/
|
|
2312
|
+
compilationMode?: 'infer' | 'syntax' | 'annotation' | 'all';
|
|
2313
|
+
/**
|
|
2314
|
+
* What to do when a function cannot be compiled.
|
|
2315
|
+
*
|
|
2316
|
+
* @default 'none'
|
|
2317
|
+
*/
|
|
2318
|
+
panicThreshold?: 'none' | 'critical_errors' | 'all_errors';
|
|
2319
|
+
/**
|
|
2320
|
+
* React runtime version target. `17` and `18` require the
|
|
2321
|
+
* `react-compiler-runtime` package; `19` ships the runtime in `react`.
|
|
2322
|
+
*
|
|
2323
|
+
* @default '19'
|
|
2324
|
+
*/
|
|
2325
|
+
target?: '17' | '18' | '19';
|
|
2326
|
+
/**
|
|
2327
|
+
* Analyze and report diagnostics only; emit no transformed code.
|
|
2328
|
+
*
|
|
2329
|
+
* @default false
|
|
2330
|
+
*/
|
|
2331
|
+
noEmit?: boolean;
|
|
2332
|
+
/**
|
|
2333
|
+
* Compiler output mode.
|
|
2334
|
+
*
|
|
2335
|
+
* @default undefined
|
|
2336
|
+
*/
|
|
2337
|
+
outputMode?: 'client' | 'ssr' | 'lint';
|
|
2338
|
+
/**
|
|
2339
|
+
* Compile even functions marked with the `"use no memo"` / `"use no forget"`
|
|
2340
|
+
* opt-out directives.
|
|
2341
|
+
*
|
|
2342
|
+
* @default false
|
|
2343
|
+
*/
|
|
2344
|
+
ignoreUseNoForget?: boolean;
|
|
2345
|
+
/**
|
|
2346
|
+
* Treat Flow suppression comments as opt-outs.
|
|
2347
|
+
*
|
|
2348
|
+
* @default true
|
|
2349
|
+
*/
|
|
2350
|
+
flowSuppressions?: boolean;
|
|
2351
|
+
/**
|
|
2352
|
+
* Enable `react-native-reanimated` support.
|
|
2353
|
+
*
|
|
2354
|
+
* @default false
|
|
2355
|
+
*/
|
|
2356
|
+
enableReanimated?: boolean;
|
|
2357
|
+
/**
|
|
2358
|
+
* Development mode (extra validation / instrumentation).
|
|
2359
|
+
*
|
|
2360
|
+
* @default false
|
|
2361
|
+
*/
|
|
2362
|
+
isDev?: boolean;
|
|
2363
|
+
/** Source file name, used for the fast-refresh hash and in diagnostics. */
|
|
2364
|
+
filename?: string;
|
|
2365
|
+
/** ESLint rules whose suppressions opt a function out of compilation. */
|
|
2366
|
+
eslintSuppressionRules?: Array<string>;
|
|
2367
|
+
/** Extra directives that opt a function out of compilation. */
|
|
2368
|
+
customOptOutDirectives?: Array<string>;
|
|
2369
|
+
/** Also emit a gated (feature-flagged) version of each compiled function. */
|
|
2370
|
+
gating?: ReactCompilerGating;
|
|
2371
|
+
/** Dynamically-gated compilation. */
|
|
2372
|
+
dynamicGating?: ReactCompilerDynamicGating;
|
|
2373
|
+
}
|
|
2286
2374
|
interface ReactRefreshOptions {
|
|
2287
2375
|
/**
|
|
2288
2376
|
* Specify the identifier of the refresh registration variable.
|
|
@@ -2442,6 +2530,14 @@ interface TransformOptions {
|
|
|
2442
2530
|
inject?: Record<string, string | [string, string]>;
|
|
2443
2531
|
/** Decorator plugin */
|
|
2444
2532
|
decorator?: DecoratorOptions;
|
|
2533
|
+
/**
|
|
2534
|
+
* Enable the experimental [React Compiler](https://github.com/facebook/react/pull/36173).
|
|
2535
|
+
*
|
|
2536
|
+
* `true` enables it with default options; an object enables it with the
|
|
2537
|
+
* given options; `false` or omitted disables it. When enabled, the compiler
|
|
2538
|
+
* runs as the first transform and memoizes React components and hooks.
|
|
2539
|
+
*/
|
|
2540
|
+
reactCompiler?: boolean | ReactCompilerOptions;
|
|
2445
2541
|
/**
|
|
2446
2542
|
* Third-party plugins to use.
|
|
2447
2543
|
* @see {@link https://oxc.rs/docs/guide/usage/transformer/plugins}
|
package/dist/shared/{bindingify-input-options-Yh0p_yKx.mjs → bindingify-input-options-EBZ5IFF2.mjs}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { a as logInvalidLogPosition, c as logPluginError, n as error, r as logCycleLoading, t as augmentCodeLocation } from "./logs-aMKUxRpj.mjs";
|
|
2
2
|
import { i as bindingifyManifestPlugin, n as BuiltinPlugin, r as bindingifyBuiltInPlugin, t as normalizedStringOrRegex } from "./normalize-string-or-regex-CHVaSqeF.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { C as unreachable, h as or, i as exclude, l as include, n as code, p as moduleType, s as id, t as and, w as unsupported, x as noop, y as arraify } from "./filter-B_mD-HGz-Cbrk-2bt.mjs";
|
|
4
4
|
import { a as bindingifySourcemap, i as unwrapBindingResult, t as aggregateBindingErrorsIntoJsError } from "./error-B5cMIevi.mjs";
|
|
5
5
|
import { parseAst } from "../parse-ast-index.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";
|
|
9
9
|
//#region package.json
|
|
10
|
-
var version = "1.1.
|
|
10
|
+
var version = "1.1.1";
|
|
11
11
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/constants/version.ts
|
|
@@ -218,7 +218,7 @@ function bindingAssetSource(source) {
|
|
|
218
218
|
return { inner: source };
|
|
219
219
|
}
|
|
220
220
|
//#endregion
|
|
221
|
-
//#region \0@oxc-project+runtime@0.
|
|
221
|
+
//#region \0@oxc-project+runtime@0.135.0/helpers/esm/decorate.js
|
|
222
222
|
function __decorate(decorators, target, key, desc) {
|
|
223
223
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
224
224
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as BindingViteResolvePluginConfig, E as BindingViteReporterPluginConfig, S as BindingViteJsonPluginConfig, T as BindingViteReactRefreshWrapperPluginConfig, b as BindingViteDynamicImportVarsPluginConfig, l as BindingIsolatedDeclarationPluginConfig, s as BindingEsmExternalRequirePluginConfig, w as BindingViteModulePreloadPolyfillPluginConfig, x as BindingViteImportGlobPluginConfig, y as BindingViteBuildImportAnalysisPluginConfig } from "./binding-
|
|
2
|
-
import { s as StringOrRegExp, t as BuiltinPlugin } from "./utils-
|
|
1
|
+
import { D as BindingViteResolvePluginConfig, E as BindingViteReporterPluginConfig, S as BindingViteJsonPluginConfig, T as BindingViteReactRefreshWrapperPluginConfig, b as BindingViteDynamicImportVarsPluginConfig, l as BindingIsolatedDeclarationPluginConfig, s as BindingEsmExternalRequirePluginConfig, w as BindingViteModulePreloadPolyfillPluginConfig, x as BindingViteImportGlobPluginConfig, y as BindingViteBuildImportAnalysisPluginConfig } from "./binding-BPMI4t0-.mjs";
|
|
2
|
+
import { s as StringOrRegExp, t as BuiltinPlugin } from "./utils-Bp1VejKQ.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/builtin-plugin/constructors.d.ts
|
|
5
5
|
declare function viteModulePreloadPolyfillPlugin(config?: BindingViteModulePreloadPolyfillPluginConfig): BuiltinPlugin;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as ExternalMemoryStatus, N as JsxOptions, P as MinifyOptions$1, R as ParserOptions, U as TransformOptions$1, bn as Program, c as BindingHookResolveIdExtraArgs, d as BindingPluginContextResolveOptions, h as BindingTransformHookExtraArgs, k as BindingWatcherBundler, p as BindingRenderedChunk, u as BindingMagicString, z as PreRenderedChunk } from "./binding-
|
|
1
|
+
import { A as ExternalMemoryStatus, N as JsxOptions, P as MinifyOptions$1, R as ParserOptions, U as TransformOptions$1, bn as Program, c as BindingHookResolveIdExtraArgs, d as BindingPluginContextResolveOptions, h as BindingTransformHookExtraArgs, k as BindingWatcherBundler, p as BindingRenderedChunk, u as BindingMagicString, z as PreRenderedChunk } from "./binding-BPMI4t0-.mjs";
|
|
2
2
|
import { a as RolldownLog, i as RolldownError, n as LogLevelOption, o as RolldownLogWithString, r as LogOrStringHandler, t as LogLevel } from "./logging-BSNejiLS.mjs";
|
|
3
|
-
import { a as NullValue, i as MaybePromise, n as MakeAsync, o as PartialNull, r as MaybeArray, s as StringOrRegExp$1, t as BuiltinPlugin } from "./utils-
|
|
3
|
+
import { a as NullValue, i as MaybePromise, n as MakeAsync, o as PartialNull, r as MaybeArray, s as StringOrRegExp$1, t as BuiltinPlugin } from "./utils-Bp1VejKQ.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/types/misc.d.ts
|
|
6
6
|
/** @inline */
|
|
@@ -2588,7 +2588,8 @@ type DefinedHookNames = { readonly [K in (typeof ENUMERATED_PLUGIN_HOOK_NAMES)[n
|
|
|
2588
2588
|
*/
|
|
2589
2589
|
declare const DEFINED_HOOK_NAMES: DefinedHookNames;
|
|
2590
2590
|
//#endregion
|
|
2591
|
-
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.
|
|
2591
|
+
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.1/node_modules/@rolldown/pluginutils/dist/filter/index.d.mts
|
|
2592
|
+
//#region src/filter/composable-filters.d.ts
|
|
2592
2593
|
type StringOrRegExp = string | RegExp;
|
|
2593
2594
|
type PluginModuleType = 'js' | 'jsx' | 'ts' | 'tsx' | 'json' | 'text' | 'base64' | 'dataurl' | 'binary' | 'empty' | (string & {});
|
|
2594
2595
|
type FilterExpressionKind = FilterExpression['kind'];
|
|
@@ -2677,7 +2678,107 @@ interface InterpreterCtx {
|
|
|
2677
2678
|
urlSearchParamsCache?: URLSearchParams;
|
|
2678
2679
|
}
|
|
2679
2680
|
declare function interpreterImpl(expr: TopLevelFilterExpression[], code?: string, id?: string, moduleType?: PluginModuleType, importerId?: string, ctx?: InterpreterCtx): boolean;
|
|
2680
|
-
declare function exprInterpreter(expr: FilterExpression, code?: string, id?: string, moduleType?: PluginModuleType, importerId?: string, ctx?: InterpreterCtx): boolean;
|
|
2681
|
+
declare function exprInterpreter(expr: FilterExpression, code?: string, id?: string, moduleType?: PluginModuleType, importerId?: string, ctx?: InterpreterCtx): boolean; //#endregion
|
|
2682
|
+
//#region src/filter/filter-vite-plugins.d.ts
|
|
2683
|
+
/**
|
|
2684
|
+
* Filters out Vite plugins that have `apply: 'serve'` set.
|
|
2685
|
+
*
|
|
2686
|
+
* Since Rolldown operates in build mode, plugins marked with `apply: 'serve'`
|
|
2687
|
+
* are intended only for Vite's dev server and should be excluded from the build process.
|
|
2688
|
+
*
|
|
2689
|
+
* @param plugins - Array of plugins (can include nested arrays)
|
|
2690
|
+
* @returns Filtered array with serve-only plugins removed
|
|
2691
|
+
*
|
|
2692
|
+
* @example
|
|
2693
|
+
* ```ts
|
|
2694
|
+
* import { defineConfig } from 'rolldown';
|
|
2695
|
+
* import { filterVitePlugins } from '@rolldown/pluginutils';
|
|
2696
|
+
* import viteReact from '@vitejs/plugin-react';
|
|
2697
|
+
*
|
|
2698
|
+
* export default defineConfig({
|
|
2699
|
+
* plugins: filterVitePlugins([
|
|
2700
|
+
* viteReact(),
|
|
2701
|
+
* {
|
|
2702
|
+
* name: 'dev-only',
|
|
2703
|
+
* apply: 'serve', // This will be filtered out
|
|
2704
|
+
* // ...
|
|
2705
|
+
* }
|
|
2706
|
+
* ])
|
|
2707
|
+
* });
|
|
2708
|
+
* ```
|
|
2709
|
+
*/
|
|
2710
|
+
declare function filterVitePlugins<T = any>(plugins: T | T[] | null | undefined | false): T[]; //#endregion
|
|
2711
|
+
//#region src/filter/simple-filters.d.ts
|
|
2712
|
+
/**
|
|
2713
|
+
* Constructs a RegExp that matches the exact string specified.
|
|
2714
|
+
*
|
|
2715
|
+
* This is useful for plugin hook filters.
|
|
2716
|
+
*
|
|
2717
|
+
* @param str the string to match.
|
|
2718
|
+
* @param flags flags for the RegExp.
|
|
2719
|
+
*
|
|
2720
|
+
* @example
|
|
2721
|
+
* ```ts
|
|
2722
|
+
* import { exactRegex } from '@rolldown/pluginutils';
|
|
2723
|
+
* const plugin = {
|
|
2724
|
+
* name: 'plugin',
|
|
2725
|
+
* resolveId: {
|
|
2726
|
+
* filter: { id: exactRegex('foo') },
|
|
2727
|
+
* handler(id) {} // will only be called for `foo`
|
|
2728
|
+
* }
|
|
2729
|
+
* }
|
|
2730
|
+
* ```
|
|
2731
|
+
*/
|
|
2732
|
+
declare function exactRegex(str: string, flags?: string): RegExp;
|
|
2733
|
+
/**
|
|
2734
|
+
* Constructs a RegExp that matches a value that has the specified prefix.
|
|
2735
|
+
*
|
|
2736
|
+
* This is useful for plugin hook filters.
|
|
2737
|
+
*
|
|
2738
|
+
* @param str the string to match.
|
|
2739
|
+
* @param flags flags for the RegExp.
|
|
2740
|
+
*
|
|
2741
|
+
* @example
|
|
2742
|
+
* ```ts
|
|
2743
|
+
* import { prefixRegex } from '@rolldown/pluginutils';
|
|
2744
|
+
* const plugin = {
|
|
2745
|
+
* name: 'plugin',
|
|
2746
|
+
* resolveId: {
|
|
2747
|
+
* filter: { id: prefixRegex('foo') },
|
|
2748
|
+
* handler(id) {} // will only be called for IDs starting with `foo`
|
|
2749
|
+
* }
|
|
2750
|
+
* }
|
|
2751
|
+
* ```
|
|
2752
|
+
*/
|
|
2753
|
+
declare function prefixRegex(str: string, flags?: string): RegExp;
|
|
2754
|
+
type WidenString<T> = T extends string ? string : T;
|
|
2755
|
+
/**
|
|
2756
|
+
* Converts a id filter to match with an id with a query.
|
|
2757
|
+
*
|
|
2758
|
+
* @param input the id filters to convert.
|
|
2759
|
+
*
|
|
2760
|
+
* @example
|
|
2761
|
+
* ```ts
|
|
2762
|
+
* import { makeIdFiltersToMatchWithQuery } from '@rolldown/pluginutils';
|
|
2763
|
+
* const plugin = {
|
|
2764
|
+
* name: 'plugin',
|
|
2765
|
+
* transform: {
|
|
2766
|
+
* filter: { id: makeIdFiltersToMatchWithQuery(['**' + '/*.js', /\.ts$/]) },
|
|
2767
|
+
* // The handler will be called for IDs like:
|
|
2768
|
+
* // - foo.js
|
|
2769
|
+
* // - foo.js?foo
|
|
2770
|
+
* // - foo.txt?foo.js
|
|
2771
|
+
* // - foo.ts
|
|
2772
|
+
* // - foo.ts?foo
|
|
2773
|
+
* // - foo.txt?foo.ts
|
|
2774
|
+
* handler(code, id) {}
|
|
2775
|
+
* }
|
|
2776
|
+
* }
|
|
2777
|
+
* ```
|
|
2778
|
+
*/
|
|
2779
|
+
declare function makeIdFiltersToMatchWithQuery<T extends string | RegExp>(input: T): WidenString<T>;
|
|
2780
|
+
declare function makeIdFiltersToMatchWithQuery<T extends string | RegExp>(input: readonly T[]): WidenString<T>[];
|
|
2781
|
+
declare function makeIdFiltersToMatchWithQuery(input: string | RegExp | readonly (string | RegExp)[]): string | RegExp | (string | RegExp)[]; //#endregion
|
|
2681
2782
|
//#endregion
|
|
2682
2783
|
//#region src/plugin/with-filter.d.ts
|
|
2683
2784
|
type OverrideFilterObject = {
|
|
@@ -3969,4 +4070,4 @@ declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
|
|
|
3969
4070
|
declare function defineConfig(config: RolldownOptionsFunction): RolldownOptionsFunction;
|
|
3970
4071
|
declare function defineConfig(config: ConfigExport): ConfigExport;
|
|
3971
4072
|
//#endregion
|
|
3972
|
-
export {
|
|
4073
|
+
export { prefixRegex as $, CodeSplittingOptions as $t, RolldownPluginOption as A, NormalizedInputOptions as At, exactRegex as B, WatchOptions as Bt, ParallelPluginHooks as C, ModuleTypeFilter as Ct, ResolveIdResult as D, RolldownFsModule as Dt, ResolveIdExtraOptions as E, RolldownFileStats as Et, FilterExpressionKind as F, RolldownMagicString as Ft, importerId as G, AddonFunction as Gt, exprInterpreter as H, RolldownBuild as Ht, QueryFilterObject as I, watch as It, interpreterImpl as J, BuiltinModuleTag as Jt, include as K, AdvancedChunksGroup as Kt, TopLevelFilterExpression as L, RolldownWatcher as Lt, TransformResult as M, ChecksOptions as Mt, withFilter as N, LoggingFunction as Nt, ResolvedId as O, InternalModuleFormat as Ot, FilterExpression as P, WarningHandlerWithDefault as Pt, or as Q, CodeSplittingNameFunction as Qt, and as R, RolldownWatcherEvent as Rt, ObjectHook as S, HookFilter as St, Plugin as T, RolldownDirectoryEntry as Tt, filterVitePlugins as U, BuildOptions as Ut, exclude as V, rolldown as Vt, id as W, build as Wt, moduleType as X, ChunkingContext as Xt, makeIdFiltersToMatchWithQuery as Y, ChunkFileNamesFunction as Yt, not as Z, CodeSplittingGroup as Zt, HookFilterExtension as _, DefineParallelPluginResult as _t, ChunkOptimizationOptions as a, ModuleFormat as an, ExistingRawSourceMap as at, ModuleOptions as b, PluginContextMeta as bt, InputOption as c, OutputAsset as cn, TreeshakingOptions as ct, OptimizationOptions as d, RenderedModule as dn, EmittedChunk as dt, CommentsOptions as en, queries as et, WatcherFileWatcherOptions as f, RolldownOutput as fn, EmittedFile as ft, FunctionPluginHooks as g, SourcemapIgnoreListOption as gn, PluginContextResolveOptions as gt, CustomPluginOptions as h, ModuleInfo as hn, PluginContext as ht, RolldownOptions as i, MinifyOptions as in, BundleError as it, SourceDescription as j, TransformOptions as jt, RolldownPlugin as k, NormalizedOutputOptions as kt, InputOptions as l, OutputChunk as ln, TransformPluginContext as lt, AsyncPluginHooks as m, freeExternalMemory as mn, GetModuleInfo as mt, RolldownOptionsFunction as n, GeneratedCodePreset as nn, RUNTIME_MODULE_ID as nt, ExternalOption as o, OutputOptions as on, SourceMapInput as ot, WatcherOptions as p, SourceMap as pn, EmittedPrebuiltChunk as pt, interpreter as q, AdvancedChunksOptions as qt, defineConfig as r, GlobalsFunction as rn, VERSION as rt, ExternalOptionFunction as s, PreRenderedAsset as sn, OutputBundle as st, ConfigExport as t, GeneratedCodeOptions as tn, query as tt, ModuleTypes as u, RenderedChunk as un, EmittedAsset as ut, ImportKind as v, defineParallelPlugin as vt, PartialResolvedId as w, BufferEncoding as wt, ModuleType as x, GeneralHookFilter as xt, LoadResult as y, MinimalPluginContext as yt, code as z, RolldownWatcherWatcherEventMap as zt };
|
|
@@ -18,7 +18,7 @@ function unsupported(info) {
|
|
|
18
18
|
}
|
|
19
19
|
function noop(..._args) {}
|
|
20
20
|
//#endregion
|
|
21
|
-
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.
|
|
21
|
+
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.1/node_modules/@rolldown/pluginutils/dist/filter-B_mD-HGz.mjs
|
|
22
22
|
const postfixRE = /[?#].*$/;
|
|
23
23
|
function cleanUrl(url) {
|
|
24
24
|
return url.replace(postfixRE, "");
|
|
@@ -30,8 +30,6 @@ function extractQueryWithoutFragment(url) {
|
|
|
30
30
|
if (fragmentIndex === -1) return url.substring(questionMarkIndex);
|
|
31
31
|
else return url.substring(questionMarkIndex, fragmentIndex);
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
|
-
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0/node_modules/@rolldown/pluginutils/dist/filter/composable-filters.js
|
|
35
33
|
var And = class {
|
|
36
34
|
kind;
|
|
37
35
|
args;
|
|
@@ -220,5 +218,120 @@ function exprInterpreter(expr, code, id, moduleType, importerId, ctx = {}) {
|
|
|
220
218
|
default: throw new Error(`Expression ${JSON.stringify(expr)} is not expected.`);
|
|
221
219
|
}
|
|
222
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* Filters out Vite plugins that have `apply: 'serve'` set.
|
|
223
|
+
*
|
|
224
|
+
* Since Rolldown operates in build mode, plugins marked with `apply: 'serve'`
|
|
225
|
+
* are intended only for Vite's dev server and should be excluded from the build process.
|
|
226
|
+
*
|
|
227
|
+
* @param plugins - Array of plugins (can include nested arrays)
|
|
228
|
+
* @returns Filtered array with serve-only plugins removed
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* ```ts
|
|
232
|
+
* import { defineConfig } from 'rolldown';
|
|
233
|
+
* import { filterVitePlugins } from '@rolldown/pluginutils';
|
|
234
|
+
* import viteReact from '@vitejs/plugin-react';
|
|
235
|
+
*
|
|
236
|
+
* export default defineConfig({
|
|
237
|
+
* plugins: filterVitePlugins([
|
|
238
|
+
* viteReact(),
|
|
239
|
+
* {
|
|
240
|
+
* name: 'dev-only',
|
|
241
|
+
* apply: 'serve', // This will be filtered out
|
|
242
|
+
* // ...
|
|
243
|
+
* }
|
|
244
|
+
* ])
|
|
245
|
+
* });
|
|
246
|
+
* ```
|
|
247
|
+
*/
|
|
248
|
+
function filterVitePlugins(plugins) {
|
|
249
|
+
if (!plugins) return [];
|
|
250
|
+
const pluginArray = Array.isArray(plugins) ? plugins : [plugins];
|
|
251
|
+
const result = [];
|
|
252
|
+
for (const plugin of pluginArray) {
|
|
253
|
+
if (!plugin) continue;
|
|
254
|
+
if (Array.isArray(plugin)) {
|
|
255
|
+
result.push(...filterVitePlugins(plugin));
|
|
256
|
+
continue;
|
|
257
|
+
}
|
|
258
|
+
const pluginWithApply = plugin;
|
|
259
|
+
if ("apply" in pluginWithApply) {
|
|
260
|
+
const applyValue = pluginWithApply.apply;
|
|
261
|
+
if (typeof applyValue === "function") try {
|
|
262
|
+
if (applyValue({}, {
|
|
263
|
+
command: "build",
|
|
264
|
+
mode: "production"
|
|
265
|
+
})) result.push(plugin);
|
|
266
|
+
} catch {
|
|
267
|
+
result.push(plugin);
|
|
268
|
+
}
|
|
269
|
+
else if (applyValue === "serve") continue;
|
|
270
|
+
else result.push(plugin);
|
|
271
|
+
} else result.push(plugin);
|
|
272
|
+
}
|
|
273
|
+
return result;
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Constructs a RegExp that matches the exact string specified.
|
|
277
|
+
*
|
|
278
|
+
* This is useful for plugin hook filters.
|
|
279
|
+
*
|
|
280
|
+
* @param str the string to match.
|
|
281
|
+
* @param flags flags for the RegExp.
|
|
282
|
+
*
|
|
283
|
+
* @example
|
|
284
|
+
* ```ts
|
|
285
|
+
* import { exactRegex } from '@rolldown/pluginutils';
|
|
286
|
+
* const plugin = {
|
|
287
|
+
* name: 'plugin',
|
|
288
|
+
* resolveId: {
|
|
289
|
+
* filter: { id: exactRegex('foo') },
|
|
290
|
+
* handler(id) {} // will only be called for `foo`
|
|
291
|
+
* }
|
|
292
|
+
* }
|
|
293
|
+
* ```
|
|
294
|
+
*/
|
|
295
|
+
function exactRegex(str, flags) {
|
|
296
|
+
return new RegExp(`^${escapeRegex(str)}$`, flags);
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Constructs a RegExp that matches a value that has the specified prefix.
|
|
300
|
+
*
|
|
301
|
+
* This is useful for plugin hook filters.
|
|
302
|
+
*
|
|
303
|
+
* @param str the string to match.
|
|
304
|
+
* @param flags flags for the RegExp.
|
|
305
|
+
*
|
|
306
|
+
* @example
|
|
307
|
+
* ```ts
|
|
308
|
+
* import { prefixRegex } from '@rolldown/pluginutils';
|
|
309
|
+
* const plugin = {
|
|
310
|
+
* name: 'plugin',
|
|
311
|
+
* resolveId: {
|
|
312
|
+
* filter: { id: prefixRegex('foo') },
|
|
313
|
+
* handler(id) {} // will only be called for IDs starting with `foo`
|
|
314
|
+
* }
|
|
315
|
+
* }
|
|
316
|
+
* ```
|
|
317
|
+
*/
|
|
318
|
+
function prefixRegex(str, flags) {
|
|
319
|
+
return new RegExp(`^${escapeRegex(str)}`, flags);
|
|
320
|
+
}
|
|
321
|
+
const escapeRegexRE = /[-/\\^$*+?.()|[\]{}]/g;
|
|
322
|
+
function escapeRegex(str) {
|
|
323
|
+
return str.replace(escapeRegexRE, "\\$&");
|
|
324
|
+
}
|
|
325
|
+
function makeIdFiltersToMatchWithQuery(input) {
|
|
326
|
+
if (!Array.isArray(input)) return makeIdFilterToMatchWithQuery(input);
|
|
327
|
+
return input.map((i) => makeIdFilterToMatchWithQuery(i));
|
|
328
|
+
}
|
|
329
|
+
function makeIdFilterToMatchWithQuery(input) {
|
|
330
|
+
if (typeof input === "string") return `${input}{?*,}`;
|
|
331
|
+
return makeRegexIdFilterToMatchWithQuery(input);
|
|
332
|
+
}
|
|
333
|
+
function makeRegexIdFilterToMatchWithQuery(input) {
|
|
334
|
+
return new RegExp(input.source.replace(/(?<!\\)\$/g, "(?:\\?.*)?$"), input.flags);
|
|
335
|
+
}
|
|
223
336
|
//#endregion
|
|
224
|
-
export {
|
|
337
|
+
export { unreachable as C, unimplemented as S, queries as _, exprInterpreter as a, isPromiseLike as b, importerId as c, interpreterImpl as d, makeIdFiltersToMatchWithQuery as f, prefixRegex as g, or as h, exclude as i, include as l, not as m, code as n, filterVitePlugins as o, moduleType as p, exactRegex as r, id as s, and as t, interpreter as u, query as v, unsupported as w, noop as x, arraify as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { parse, parseSync } from "../rolldown-binding.wasi.cjs";
|
|
2
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
2
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.135.0/node_modules/oxc-parser/src-js/wrap.js
|
|
3
3
|
function wrap(result) {
|
|
4
4
|
let program, module, comments, errors;
|
|
5
5
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as validateOption, t as RolldownBuild, u as PluginDriver } from "./rolldown-build-
|
|
1
|
+
import { c as validateOption, t as RolldownBuild, u as PluginDriver } from "./rolldown-build-BgBj9qUV.mjs";
|
|
2
2
|
//#region src/api/rolldown/index.ts
|
|
3
3
|
/**
|
|
4
4
|
* The API compatible with Rollup's `rollup` function.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as logInputHookInOutputPlugin, n as error } from "./logs-aMKUxRpj.mjs";
|
|
2
2
|
import { n as BuiltinPlugin } from "./normalize-string-or-regex-CHVaSqeF.mjs";
|
|
3
|
-
import { c as __decorate, d as PlainObjectLike, f as MinimalPluginContextImpl, h as LOG_LEVEL_DEBUG, i as transformModuleInfo, l as transformAssetSource, m as normalizeLog, o as transformToRollupOutput, p as normalizeHook, s as transformRenderedChunk, t as bindingifyInputOptions, u as lazyProp, v as LOG_LEVEL_WARN, x as VERSION, y as logLevelPriority } from "./bindingify-input-options-
|
|
4
|
-
import {
|
|
3
|
+
import { c as __decorate, d as PlainObjectLike, f as MinimalPluginContextImpl, h as LOG_LEVEL_DEBUG, i as transformModuleInfo, l as transformAssetSource, m as normalizeLog, o as transformToRollupOutput, p as normalizeHook, s as transformRenderedChunk, t as bindingifyInputOptions, u as lazyProp, v as LOG_LEVEL_WARN, x as VERSION, y as logLevelPriority } from "./bindingify-input-options-EBZ5IFF2.mjs";
|
|
4
|
+
import { S as unimplemented } from "./filter-B_mD-HGz-Cbrk-2bt.mjs";
|
|
5
5
|
import { i as unwrapBindingResult } from "./error-B5cMIevi.mjs";
|
|
6
6
|
import { Worker } from "node:worker_threads";
|
|
7
7
|
import { BindingBundler, ParallelJsPluginRegistry, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
|
|
@@ -1469,7 +1469,43 @@ const TransformOptionsSchema = /* @__PURE__ */ object({
|
|
|
1469
1469
|
plugins: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ object({
|
|
1470
1470
|
styledComponents: /* @__PURE__ */ optional(/* @__PURE__ */ any()),
|
|
1471
1471
|
taggedTemplateEscape: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
|
|
1472
|
-
})), /* @__PURE__ */ description("Third-party plugins to use"))
|
|
1472
|
+
})), /* @__PURE__ */ description("Third-party plugins to use")),
|
|
1473
|
+
reactCompiler: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ object({
|
|
1474
|
+
compilationMode: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1475
|
+
/* @__PURE__ */ literal("infer"),
|
|
1476
|
+
/* @__PURE__ */ literal("syntax"),
|
|
1477
|
+
/* @__PURE__ */ literal("annotation"),
|
|
1478
|
+
/* @__PURE__ */ literal("all")
|
|
1479
|
+
])),
|
|
1480
|
+
panicThreshold: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1481
|
+
/* @__PURE__ */ literal("none"),
|
|
1482
|
+
/* @__PURE__ */ literal("critical_errors"),
|
|
1483
|
+
/* @__PURE__ */ literal("all_errors")
|
|
1484
|
+
])),
|
|
1485
|
+
target: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1486
|
+
/* @__PURE__ */ literal("17"),
|
|
1487
|
+
/* @__PURE__ */ literal("18"),
|
|
1488
|
+
/* @__PURE__ */ literal("19")
|
|
1489
|
+
])),
|
|
1490
|
+
noEmit: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1491
|
+
outputMode: /* @__PURE__ */ optional(/* @__PURE__ */ union([
|
|
1492
|
+
/* @__PURE__ */ literal("client"),
|
|
1493
|
+
/* @__PURE__ */ literal("ssr"),
|
|
1494
|
+
/* @__PURE__ */ literal("lint")
|
|
1495
|
+
])),
|
|
1496
|
+
ignoreUseNoForget: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1497
|
+
flowSuppressions: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1498
|
+
enableReanimated: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1499
|
+
isDev: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
|
|
1500
|
+
filename: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
|
|
1501
|
+
eslintSuppressionRules: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1502
|
+
customOptOutDirectives: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
|
|
1503
|
+
gating: /* @__PURE__ */ optional(/* @__PURE__ */ object({
|
|
1504
|
+
source: /* @__PURE__ */ string(),
|
|
1505
|
+
importSpecifierName: /* @__PURE__ */ string()
|
|
1506
|
+
})),
|
|
1507
|
+
dynamicGating: /* @__PURE__ */ optional(/* @__PURE__ */ object({ source: /* @__PURE__ */ string() }))
|
|
1508
|
+
})]))
|
|
1473
1509
|
});
|
|
1474
1510
|
const WatcherFileWatcherOptionsSchema = /* @__PURE__ */ strictObject({
|
|
1475
1511
|
usePolling: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Use polling-based file watching instead of native OS events")),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as MinifyResult$1, H as SourceMap, L as ParseResult$1, P as MinifyOptions$1, R as ParserOptions$1, W as TsconfigCache$1, a as BindingEnhancedTransformOptions, o as BindingEnhancedTransformResult, v as BindingTsconfigResult } from "./binding-
|
|
1
|
+
import { F as MinifyResult$1, H as SourceMap, L as ParseResult$1, P as MinifyOptions$1, R as ParserOptions$1, W as TsconfigCache$1, a as BindingEnhancedTransformOptions, o as BindingEnhancedTransformResult, v as BindingTsconfigResult } from "./binding-BPMI4t0-.mjs";
|
|
2
2
|
import { a as RolldownLog } from "./logging-BSNejiLS.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/utils/resolve-tsconfig.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as logMultipleWatcherOption } from "./logs-aMKUxRpj.mjs";
|
|
2
|
-
import { v as LOG_LEVEL_WARN } from "./bindingify-input-options-
|
|
3
|
-
import {
|
|
4
|
-
import { n as createBundlerOptions, u as PluginDriver } from "./rolldown-build-
|
|
2
|
+
import { v as LOG_LEVEL_WARN } from "./bindingify-input-options-EBZ5IFF2.mjs";
|
|
3
|
+
import { y as arraify } from "./filter-B_mD-HGz-Cbrk-2bt.mjs";
|
|
4
|
+
import { n as createBundlerOptions, u as PluginDriver } from "./rolldown-build-BgBj9qUV.mjs";
|
|
5
5
|
import { t as aggregateBindingErrorsIntoJsError } from "./error-B5cMIevi.mjs";
|
|
6
6
|
import { BindingWatcher, shutdownAsyncRuntime } from "../rolldown-binding.wasi.cjs";
|
|
7
7
|
//#region ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as parse, o as parseSync } from "./error-
|
|
2
|
-
import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./resolve-tsconfig-
|
|
3
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
1
|
+
import { a as parse, o as parseSync } from "./error-Azs8e8cN.js";
|
|
2
|
+
import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./resolve-tsconfig-Cmw0SAxd.js";
|
|
3
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.135.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
|
|
4
4
|
function walkNode(node, visitors) {
|
|
5
5
|
if (node == null) return;
|
|
6
6
|
if (Array.isArray(node)) {
|
|
@@ -2010,7 +2010,7 @@ function walkTSUnionType(node, visitors) {
|
|
|
2010
2010
|
exit !== null && exit(node);
|
|
2011
2011
|
}
|
|
2012
2012
|
//#endregion
|
|
2013
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
2013
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.135.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
|
|
2014
2014
|
/** Mapping from node type name to node type ID */
|
|
2015
2015
|
const NODE_TYPE_IDS_MAP = new Map([
|
|
2016
2016
|
["DebuggerStatement", 0],
|
|
@@ -2180,7 +2180,7 @@ const NODE_TYPE_IDS_MAP = new Map([
|
|
|
2180
2180
|
["TSUnionType", 164]
|
|
2181
2181
|
]);
|
|
2182
2182
|
//#endregion
|
|
2183
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
2183
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.135.0/node_modules/oxc-parser/src-js/visit/visitor.js
|
|
2184
2184
|
let compiledVisitor;
|
|
2185
2185
|
function createCompiledVisitor() {
|
|
2186
2186
|
compiledVisitor = [];
|
package/dist/utils-index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as AssignmentPattern, $n as TSInferType, $r as UpdateExpression, $t as JSXMemberExpression, An as SwitchStatement, Ar as TSTupleType, At as ForStatement, Bn as TSConstructorType, Br as TSTypeQuery, Bt as ImportNamespaceSpecifier, Cn as ReturnStatement, Cr as TSRestType, Ct as ExportAllDeclaration, Dn as StringLiteral, Dr as TSTemplateLiteralType, Dt as ExpressionStatement, En as StaticBlock, Er as TSSymbolKeyword, Et as ExportSpecifier, Fn as TSBooleanKeyword, Fr as TSTypeOperator, Ft as IfStatement, Gn as TSExternalModuleReference, Gr as TSVoidKeyword, Gt as JSXAttribute, Hn as TSEnumDeclaration, Hr as TSUndefinedKeyword, Ht as JSDocNonNullableType, In as TSCallSignatureDeclaration, Ir as TSTypeParameter, It as ImportAttribute, J as AccessorProperty, Jn as TSImportEqualsDeclaration, Jr as TemplateLiteral, Jt as JSXElement, Kn as TSFunctionType, Kr as TaggedTemplateExpression, Kt as JSXClosingElement, Ln as TSClassImplements, Lr as TSTypeParameterDeclaration, Lt as ImportDeclaration, Mn as TSArrayType, Mr as TSTypeAnnotation, Mt as Function, Nn as TSAsExpression, Nr as TSTypeAssertion, Nt as IdentifierName, On as Super, Or as TSThisParameter, Ot as ForInStatement, Pn as TSBigIntKeyword, Pr as TSTypeLiteral, Pt as IdentifierReference, Q as AssignmentExpression, Qn as TSIndexedAccessType, Qr as UnaryExpression, Qt as JSXIdentifier, Rn as TSConditionalType, Rr as TSTypeParameterInstantiation, Rt as ImportDefaultSpecifier, Sn as RegExpLiteral, Sr as TSQualifiedName, St as EmptyStatement, Tn as SpreadElement, Tr as TSStringKeyword, Tt as ExportNamedDeclaration, Un as TSEnumMember, Ur as TSUnionType, Ut as JSDocNullableType, Vn as TSEnumBody, Vr as TSTypeReference, Vt as ImportSpecifier, Wn as TSExportAssignment, Wr as TSUnknownKeyword, Wt as JSDocUnknownType, X as ArrayPattern, Xn as TSIndexSignature, Xr as ThrowStatement, Xt as JSXExpressionContainer, Y as ArrayExpression, Yn as TSImportType, Yr as ThisExpression, Yt as JSXEmptyExpression, Z as ArrowFunctionExpression, Zn as TSIndexSignatureName, Zr as TryStatement, Zt as JSXFragment, _ as BindingTsconfigRawOptions, _n as ObjectProperty, _r as TSObjectKeyword, _t as ConditionalExpression, ai as YieldExpression, an as JSXText, ar as TSIntrinsicKeyword, at as BinaryExpression, bn as Program, br as TSParenthesizedType, bt as Decorator, cn as LogicalExpression, cr as TSMethodSignature, ct as BindingRestElement, dn as MethodDefinition, dr as TSNamedTupleMember, dt as BreakStatement, ei as V8IntrinsicExpression, en as JSXNamespacedName, er as TSInstantiationExpression, et as AssignmentTargetProperty, fn as NewExpression, fr as TSNamespaceExportDeclaration, ft as CallExpression, g as BindingTsconfigCompilerOptions, gn as ObjectPattern, gr as TSNumberKeyword, gt as ClassBody, hn as ObjectExpression, hr as TSNullKeyword, ht as Class, ii as WithStatement, in as JSXSpreadChild, ir as TSIntersectionType, it as BigIntLiteral, jn as TSAnyKeyword, jr as TSTypeAliasDeclaration, jt as FormalParameterRest, kn as SwitchCase, kr as TSThisType, kt as ForOfStatement, ln as MemberExpression, lr as TSModuleBlock, lt as BlockStatement, mn as NumericLiteral, mr as TSNonNullExpression, mt as ChainExpression, ni as VariableDeclarator, nn as JSXOpeningFragment, nr as TSInterfaceDeclaration, nt as AssignmentTargetRest, oi as types_d_exports, on as LabelIdentifier, or as TSLiteralType, ot as BindingIdentifier, pn as NullLiteral, pr as TSNeverKeyword, pt as CatchClause, qn as TSGlobalDeclaration, qr as TemplateElement, qt as JSXClosingFragment, ri as WhileStatement, rn as JSXSpreadAttribute, rr as TSInterfaceHeritage, rt as AwaitExpression, sn as LabeledStatement, sr as TSMappedType, st as BindingProperty, ti as VariableDeclaration, tn as JSXOpeningElement, tr as TSInterfaceBody, tt as AssignmentTargetPropertyProperty, un as MetaProperty, ur as TSModuleDeclaration, ut as BooleanLiteral, vn as ParenthesizedExpression, vr as TSOptionalType, vt as ContinueStatement, wn as SequenceExpression, wr as TSSatisfiesExpression, wt as ExportDefaultDeclaration, xn as PropertyDefinition, xr as TSPropertySignature, xt as DoWhileStatement, yn as PrivateIdentifier, yr as TSParameterProperty, yt as DebuggerStatement, zn as TSConstructSignatureDeclaration, zr as TSTypePredicate, zt as ImportExpression } from "./shared/binding-
|
|
2
|
-
import { a as MinifyOptions, c as minifySync, d as parse, f as parseSync, i as transformSync, l as ParseResult, n as TransformResult, o as MinifyResult, p as TsconfigCache, r as transform, s as minify, t as TransformOptions, u as ParserOptions } from "./shared/transform-
|
|
1
|
+
import { $ as AssignmentPattern, $n as TSInferType, $r as UpdateExpression, $t as JSXMemberExpression, An as SwitchStatement, Ar as TSTupleType, At as ForStatement, Bn as TSConstructorType, Br as TSTypeQuery, Bt as ImportNamespaceSpecifier, Cn as ReturnStatement, Cr as TSRestType, Ct as ExportAllDeclaration, Dn as StringLiteral, Dr as TSTemplateLiteralType, Dt as ExpressionStatement, En as StaticBlock, Er as TSSymbolKeyword, Et as ExportSpecifier, Fn as TSBooleanKeyword, Fr as TSTypeOperator, Ft as IfStatement, Gn as TSExternalModuleReference, Gr as TSVoidKeyword, Gt as JSXAttribute, Hn as TSEnumDeclaration, Hr as TSUndefinedKeyword, Ht as JSDocNonNullableType, In as TSCallSignatureDeclaration, Ir as TSTypeParameter, It as ImportAttribute, J as AccessorProperty, Jn as TSImportEqualsDeclaration, Jr as TemplateLiteral, Jt as JSXElement, Kn as TSFunctionType, Kr as TaggedTemplateExpression, Kt as JSXClosingElement, Ln as TSClassImplements, Lr as TSTypeParameterDeclaration, Lt as ImportDeclaration, Mn as TSArrayType, Mr as TSTypeAnnotation, Mt as Function, Nn as TSAsExpression, Nr as TSTypeAssertion, Nt as IdentifierName, On as Super, Or as TSThisParameter, Ot as ForInStatement, Pn as TSBigIntKeyword, Pr as TSTypeLiteral, Pt as IdentifierReference, Q as AssignmentExpression, Qn as TSIndexedAccessType, Qr as UnaryExpression, Qt as JSXIdentifier, Rn as TSConditionalType, Rr as TSTypeParameterInstantiation, Rt as ImportDefaultSpecifier, Sn as RegExpLiteral, Sr as TSQualifiedName, St as EmptyStatement, Tn as SpreadElement, Tr as TSStringKeyword, Tt as ExportNamedDeclaration, Un as TSEnumMember, Ur as TSUnionType, Ut as JSDocNullableType, Vn as TSEnumBody, Vr as TSTypeReference, Vt as ImportSpecifier, Wn as TSExportAssignment, Wr as TSUnknownKeyword, Wt as JSDocUnknownType, X as ArrayPattern, Xn as TSIndexSignature, Xr as ThrowStatement, Xt as JSXExpressionContainer, Y as ArrayExpression, Yn as TSImportType, Yr as ThisExpression, Yt as JSXEmptyExpression, Z as ArrowFunctionExpression, Zn as TSIndexSignatureName, Zr as TryStatement, Zt as JSXFragment, _ as BindingTsconfigRawOptions, _n as ObjectProperty, _r as TSObjectKeyword, _t as ConditionalExpression, ai as YieldExpression, an as JSXText, ar as TSIntrinsicKeyword, at as BinaryExpression, bn as Program, br as TSParenthesizedType, bt as Decorator, cn as LogicalExpression, cr as TSMethodSignature, ct as BindingRestElement, dn as MethodDefinition, dr as TSNamedTupleMember, dt as BreakStatement, ei as V8IntrinsicExpression, en as JSXNamespacedName, er as TSInstantiationExpression, et as AssignmentTargetProperty, fn as NewExpression, fr as TSNamespaceExportDeclaration, ft as CallExpression, g as BindingTsconfigCompilerOptions, gn as ObjectPattern, gr as TSNumberKeyword, gt as ClassBody, hn as ObjectExpression, hr as TSNullKeyword, ht as Class, ii as WithStatement, in as JSXSpreadChild, ir as TSIntersectionType, it as BigIntLiteral, jn as TSAnyKeyword, jr as TSTypeAliasDeclaration, jt as FormalParameterRest, kn as SwitchCase, kr as TSThisType, kt as ForOfStatement, ln as MemberExpression, lr as TSModuleBlock, lt as BlockStatement, mn as NumericLiteral, mr as TSNonNullExpression, mt as ChainExpression, ni as VariableDeclarator, nn as JSXOpeningFragment, nr as TSInterfaceDeclaration, nt as AssignmentTargetRest, oi as types_d_exports, on as LabelIdentifier, or as TSLiteralType, ot as BindingIdentifier, pn as NullLiteral, pr as TSNeverKeyword, pt as CatchClause, qn as TSGlobalDeclaration, qr as TemplateElement, qt as JSXClosingFragment, ri as WhileStatement, rn as JSXSpreadAttribute, rr as TSInterfaceHeritage, rt as AwaitExpression, sn as LabeledStatement, sr as TSMappedType, st as BindingProperty, ti as VariableDeclaration, tn as JSXOpeningElement, tr as TSInterfaceBody, tt as AssignmentTargetPropertyProperty, un as MetaProperty, ur as TSModuleDeclaration, ut as BooleanLiteral, vn as ParenthesizedExpression, vr as TSOptionalType, vt as ContinueStatement, wn as SequenceExpression, wr as TSSatisfiesExpression, wt as ExportDefaultDeclaration, xn as PropertyDefinition, xr as TSPropertySignature, xt as DoWhileStatement, yn as PrivateIdentifier, yr as TSParameterProperty, yt as DebuggerStatement, zn as TSConstructSignatureDeclaration, zr as TSTypePredicate, zt as ImportExpression } from "./shared/binding-BPMI4t0-.mjs";
|
|
2
|
+
import { a as MinifyOptions, c as minifySync, d as parse, f as parseSync, i as transformSync, l as ParseResult, n as TransformResult, o as MinifyResult, p as TsconfigCache, r as transform, s as minify, t as TransformOptions, u as ParserOptions } from "./shared/transform-DulXg6tQ.mjs";
|
|
3
3
|
|
|
4
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
4
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.135.0/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts
|
|
5
5
|
interface VisitorObject$1 {
|
|
6
6
|
DebuggerStatement?: (node: DebuggerStatement) => void;
|
|
7
7
|
"DebuggerStatement:exit"?: (node: DebuggerStatement) => void;
|
package/dist/utils-index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as parseSync, t as parse } from "./shared/parse-
|
|
1
|
+
import { n as parseSync, t as parse } from "./shared/parse-DNkPrz4w.mjs";
|
|
2
2
|
import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./shared/resolve-tsconfig-DsK7KzKK.mjs";
|
|
3
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
3
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.135.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
|
|
4
4
|
function walkNode(node, visitors) {
|
|
5
5
|
if (node == null) return;
|
|
6
6
|
if (Array.isArray(node)) {
|
|
@@ -2010,7 +2010,7 @@ function walkTSUnionType(node, visitors) {
|
|
|
2010
2010
|
exit !== null && exit(node);
|
|
2011
2011
|
}
|
|
2012
2012
|
//#endregion
|
|
2013
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
2013
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.135.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
|
|
2014
2014
|
/** Mapping from node type name to node type ID */
|
|
2015
2015
|
const NODE_TYPE_IDS_MAP = new Map([
|
|
2016
2016
|
["DebuggerStatement", 0],
|
|
@@ -2180,7 +2180,7 @@ const NODE_TYPE_IDS_MAP = new Map([
|
|
|
2180
2180
|
["TSUnionType", 164]
|
|
2181
2181
|
]);
|
|
2182
2182
|
//#endregion
|
|
2183
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
2183
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.135.0/node_modules/oxc-parser/src-js/visit/visitor.js
|
|
2184
2184
|
let compiledVisitor;
|
|
2185
2185
|
function createCompiledVisitor() {
|
|
2186
2186
|
compiledVisitor = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rolldown/browser",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bundler",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"registry": "https://registry.npmjs.org/"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@emnapi/core": "1.
|
|
62
|
-
"@emnapi/runtime": "1.
|
|
63
|
-
"@napi-rs/wasm-runtime": "^1.1.
|
|
61
|
+
"@emnapi/core": "1.11.0",
|
|
62
|
+
"@emnapi/runtime": "1.11.0",
|
|
63
|
+
"@napi-rs/wasm-runtime": "^1.1.5"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"build": "pnpm run build:debug",
|