rolldown 0.13.2 → 0.14.0
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/LICENSE +1 -1
- package/dist/cjs/cli.cjs +388 -95
- package/dist/cjs/experimental-index.cjs +2 -3
- package/dist/cjs/index.cjs +2 -13
- package/dist/cjs/parallel-plugin-worker.cjs +2 -2
- package/dist/esm/cli.mjs +387 -94
- package/dist/esm/experimental-index.mjs +1 -2
- package/dist/esm/index.mjs +2 -14
- package/dist/esm/parallel-plugin-worker.mjs +1 -1
- package/dist/shared/{consola.36c0034f-eps_ogJv.cjs → consola.36c0034f-HcmWcfPe.cjs} +2 -2
- package/dist/shared/{consola.36c0034f-m5cABVv4.mjs → consola.36c0034f-Xyw7SC_7.mjs} +1 -1
- package/dist/shared/{prompt-Ah5G71p-.cjs → prompt-9Ij3R3TG.cjs} +2 -2
- package/dist/shared/{prompt-9VjtYvi_.mjs → prompt-hoPhcrA-.mjs} +1 -1
- package/dist/shared/rolldown-binding.wasi.cjs +82 -73
- package/dist/shared/src_index-3pqhEViJ.cjs +2785 -0
- package/dist/shared/src_index-ywYMd4vB.mjs +2786 -0
- package/dist/shared/watcher-worker.js +1 -0
- package/dist/types/binding.d.ts +154 -66
- package/dist/types/cli/arguments/alias.d.ts +1 -0
- package/dist/types/cli/arguments/index.d.ts +1 -1
- package/dist/types/cli/arguments/normalize.d.ts +1 -0
- package/dist/types/cli/arguments/schema.d.ts +120 -35
- package/dist/types/constants/plugin.d.ts +1 -1
- package/dist/types/constants/types.d.ts +1 -0
- package/dist/types/experimental-index.d.ts +1 -0
- package/dist/types/index.d.ts +6 -5
- package/dist/types/log/logger.d.ts +9 -2
- package/dist/types/options/input-options.d.ts +241 -13
- package/dist/types/options/normalized-alias-plugin-config.d.ts +0 -2
- package/dist/types/options/normalized-output-options.d.ts +1 -1
- package/dist/types/options/output-options.d.ts +52 -54
- package/dist/types/options/watch-option.d.ts +5 -0
- package/dist/types/plugin/bindingify-hook-filter.d.ts +2 -0
- package/dist/types/plugin/bindingify-output-hooks.d.ts +1 -0
- package/dist/types/plugin/bindingify-watch-hooks.d.ts +7 -0
- package/dist/types/plugin/hook-filter.d.ts +48 -0
- package/dist/types/plugin/index.d.ts +9 -15
- package/dist/types/plugin/plugin-context-data.d.ts +1 -1
- package/dist/types/plugin/plugin-context.d.ts +2 -6
- package/dist/types/plugin/plugin-driver.d.ts +1 -0
- package/dist/types/rolldown-build.d.ts +1 -1
- package/dist/types/rolldown.d.ts +3 -0
- package/dist/types/types/utils.d.ts +1 -0
- package/dist/types/utils/create-bundler.d.ts +3 -2
- package/dist/types/utils/transform-to-rollup-output.d.ts +8 -3
- package/dist/types/watcher.d.ts +31 -0
- package/package.json +19 -17
- package/dist/shared/package-8qJYyGdm.cjs +0 -11
- package/dist/shared/package-unZcnfG9.mjs +0 -9
- package/dist/shared/plugin-context-data-F1I9ytXp.cjs +0 -1435
- package/dist/shared/plugin-context-data-iKSAvmTX.mjs +0 -1442
- package/dist/shared/rolldown-ESzFTeqV.cjs +0 -1087
- package/dist/shared/rolldown-Hf7txSlh.mjs +0 -1071
- /package/dist/shared/{chunk-gQ4GMlVi.cjs → chunk-JoMxl5V2.cjs} +0 -0
|
@@ -4,6 +4,7 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
4
4
|
config: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
5
5
|
help: z.ZodOptional<z.ZodBoolean>;
|
|
6
6
|
version: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
watch: z.ZodOptional<z.ZodBoolean>;
|
|
7
8
|
}, Omit<z.objectUtil.extendShape<{
|
|
8
9
|
input: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>, z.ZodRecord<z.ZodString, z.ZodString>]>>;
|
|
9
10
|
plugins: z.ZodOptional<z.ZodArray<z.ZodType<import("../../plugin").RolldownPluginRec, z.ZodTypeDef, import("../../plugin").RolldownPluginRec>, "many">>;
|
|
@@ -12,6 +13,7 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
12
13
|
alias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
13
14
|
aliasFields: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
|
|
14
15
|
conditionNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
16
|
+
extensionAlias: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
|
|
15
17
|
exportsFields: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
|
|
16
18
|
extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
17
19
|
mainFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -23,6 +25,7 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
23
25
|
alias?: Record<string, string> | undefined;
|
|
24
26
|
aliasFields?: string[][] | undefined;
|
|
25
27
|
conditionNames?: string[] | undefined;
|
|
28
|
+
extensionAlias?: Record<string, string[]> | undefined;
|
|
26
29
|
exportsFields?: string[][] | undefined;
|
|
27
30
|
extensions?: string[] | undefined;
|
|
28
31
|
mainFields?: string[] | undefined;
|
|
@@ -34,6 +37,7 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
34
37
|
alias?: Record<string, string> | undefined;
|
|
35
38
|
aliasFields?: string[][] | undefined;
|
|
36
39
|
conditionNames?: string[] | undefined;
|
|
40
|
+
extensionAlias?: Record<string, string[]> | undefined;
|
|
37
41
|
exportsFields?: string[][] | undefined;
|
|
38
42
|
extensions?: string[] | undefined;
|
|
39
43
|
mainFields?: string[] | undefined;
|
|
@@ -49,24 +53,91 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
49
53
|
logLevel: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"silent">]>>;
|
|
50
54
|
onLog: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"info">, z.ZodLiteral<"debug">]>, z.ZodLiteral<"warn">]>, z.ZodLiteral<"error">]>, z.ZodUnion<[z.ZodAny, z.ZodString]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>;
|
|
51
55
|
onwarn: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodFunction<z.ZodTuple<[z.ZodUnion<[z.ZodUnion<[z.ZodAny, z.ZodString]>, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodAny, z.ZodString]>>]>], z.ZodUnknown>, z.ZodUnknown>], z.ZodUnknown>, z.ZodUnknown>>;
|
|
52
|
-
moduleTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"js">, z.ZodLiteral<"jsx">]>, z.ZodLiteral<"ts">]>, z.ZodLiteral<"tsx">]>, z.ZodLiteral<"json">]>, z.ZodLiteral<"text">]>, z.ZodLiteral<"base64">]>, z.ZodLiteral<"dataurl">]>, z.ZodLiteral<"binary">]>, z.ZodLiteral<"empty">]>>>;
|
|
56
|
+
moduleTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"js">, z.ZodLiteral<"jsx">]>, z.ZodLiteral<"ts">]>, z.ZodLiteral<"tsx">]>, z.ZodLiteral<"json">]>, z.ZodLiteral<"text">]>, z.ZodLiteral<"base64">]>, z.ZodLiteral<"dataurl">]>, z.ZodLiteral<"binary">]>, z.ZodLiteral<"empty">]>, z.ZodLiteral<"css">]>>>;
|
|
53
57
|
experimental: z.ZodOptional<z.ZodObject<{
|
|
54
58
|
enableComposingJsPlugins: z.ZodOptional<z.ZodBoolean>;
|
|
59
|
+
strictExecutionOrder: z.ZodOptional<z.ZodBoolean>;
|
|
60
|
+
disableLiveBindings: z.ZodOptional<z.ZodBoolean>;
|
|
55
61
|
}, "strict", z.ZodTypeAny, {
|
|
56
62
|
enableComposingJsPlugins?: boolean | undefined;
|
|
63
|
+
strictExecutionOrder?: boolean | undefined;
|
|
64
|
+
disableLiveBindings?: boolean | undefined;
|
|
57
65
|
}, {
|
|
58
66
|
enableComposingJsPlugins?: boolean | undefined;
|
|
67
|
+
strictExecutionOrder?: boolean | undefined;
|
|
68
|
+
disableLiveBindings?: boolean | undefined;
|
|
59
69
|
}>>;
|
|
60
70
|
define: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
61
71
|
inject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodTuple<[z.ZodString, z.ZodString], null>]>>>;
|
|
72
|
+
profilerNames: z.ZodOptional<z.ZodBoolean>;
|
|
73
|
+
jsx: z.ZodOptional<z.ZodObject<{
|
|
74
|
+
mode: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"automatic">]>>;
|
|
75
|
+
factory: z.ZodOptional<z.ZodString>;
|
|
76
|
+
fragment: z.ZodOptional<z.ZodString>;
|
|
77
|
+
importSource: z.ZodOptional<z.ZodString>;
|
|
78
|
+
jsxImportSource: z.ZodOptional<z.ZodString>;
|
|
79
|
+
refresh: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
+
development: z.ZodOptional<z.ZodBoolean>;
|
|
81
|
+
}, "strict", z.ZodTypeAny, {
|
|
82
|
+
mode?: "classic" | "automatic" | undefined;
|
|
83
|
+
factory?: string | undefined;
|
|
84
|
+
fragment?: string | undefined;
|
|
85
|
+
importSource?: string | undefined;
|
|
86
|
+
jsxImportSource?: string | undefined;
|
|
87
|
+
refresh?: boolean | undefined;
|
|
88
|
+
development?: boolean | undefined;
|
|
89
|
+
}, {
|
|
90
|
+
mode?: "classic" | "automatic" | undefined;
|
|
91
|
+
factory?: string | undefined;
|
|
92
|
+
fragment?: string | undefined;
|
|
93
|
+
importSource?: string | undefined;
|
|
94
|
+
jsxImportSource?: string | undefined;
|
|
95
|
+
refresh?: boolean | undefined;
|
|
96
|
+
development?: boolean | undefined;
|
|
97
|
+
}>>;
|
|
98
|
+
watch: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
99
|
+
skipWrite: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
+
notify: z.ZodOptional<z.ZodObject<{
|
|
101
|
+
pollInterval: z.ZodOptional<z.ZodNumber>;
|
|
102
|
+
compareContents: z.ZodOptional<z.ZodBoolean>;
|
|
103
|
+
}, "strict", z.ZodTypeAny, {
|
|
104
|
+
pollInterval?: number | undefined;
|
|
105
|
+
compareContents?: boolean | undefined;
|
|
106
|
+
}, {
|
|
107
|
+
pollInterval?: number | undefined;
|
|
108
|
+
compareContents?: boolean | undefined;
|
|
109
|
+
}>>;
|
|
110
|
+
include: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
|
|
111
|
+
exclude: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, "many">]>>;
|
|
112
|
+
chokidar: z.ZodOptional<z.ZodAny>;
|
|
113
|
+
}, "strict", z.ZodTypeAny, {
|
|
114
|
+
skipWrite?: boolean | undefined;
|
|
115
|
+
notify?: {
|
|
116
|
+
pollInterval?: number | undefined;
|
|
117
|
+
compareContents?: boolean | undefined;
|
|
118
|
+
} | undefined;
|
|
119
|
+
include?: string | RegExp | (string | RegExp)[] | undefined;
|
|
120
|
+
exclude?: string | RegExp | (string | RegExp)[] | undefined;
|
|
121
|
+
chokidar?: any;
|
|
122
|
+
}, {
|
|
123
|
+
skipWrite?: boolean | undefined;
|
|
124
|
+
notify?: {
|
|
125
|
+
pollInterval?: number | undefined;
|
|
126
|
+
compareContents?: boolean | undefined;
|
|
127
|
+
} | undefined;
|
|
128
|
+
include?: string | RegExp | (string | RegExp)[] | undefined;
|
|
129
|
+
exclude?: string | RegExp | (string | RegExp)[] | undefined;
|
|
130
|
+
chokidar?: any;
|
|
131
|
+
}>, z.ZodLiteral<false>]>>;
|
|
62
132
|
}, {
|
|
63
133
|
external: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
64
134
|
inject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
65
135
|
treeshake: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
66
|
-
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental">>, Omit<z.objectUtil.extendShape<{
|
|
136
|
+
}>, "input" | "plugins" | "resolve" | "onLog" | "onwarn" | "experimental" | "profilerNames" | "watch">>, Omit<z.objectUtil.extendShape<{
|
|
67
137
|
dir: z.ZodOptional<z.ZodString>;
|
|
138
|
+
file: z.ZodOptional<z.ZodString>;
|
|
68
139
|
exports: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"named">]>, z.ZodLiteral<"default">]>, z.ZodLiteral<"none">]>>;
|
|
69
|
-
format: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"es">, z.ZodLiteral<"cjs">]>, z.ZodLiteral<"esm">]>, z.ZodLiteral<"module">]>, z.ZodLiteral<"commonjs">]>, z.ZodLiteral<"iife">]>>;
|
|
140
|
+
format: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"es">, z.ZodLiteral<"cjs">]>, z.ZodLiteral<"esm">]>, z.ZodLiteral<"module">]>, z.ZodLiteral<"commonjs">]>, z.ZodLiteral<"iife">]>, z.ZodLiteral<"umd">]>>;
|
|
70
141
|
sourcemap: z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodBoolean, z.ZodLiteral<"inline">]>, z.ZodLiteral<"hidden">]>>;
|
|
71
142
|
sourcemapIgnoreList: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodType<import("../../options/output-options").SourcemapIgnoreListOption, z.ZodTypeDef, import("../../options/output-options").SourcemapIgnoreListOption>]>>;
|
|
72
143
|
sourcemapPathTransform: z.ZodOptional<z.ZodType<import("../../options/output-options").SourcemapPathTransformOption, z.ZodTypeDef, import("../../options/output-options").SourcemapPathTransformOption>>;
|
|
@@ -89,7 +160,7 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
89
160
|
minShareCount: z.ZodOptional<z.ZodNumber>;
|
|
90
161
|
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
91
162
|
name: z.ZodString;
|
|
92
|
-
test: z.ZodOptional<z.ZodString
|
|
163
|
+
test: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>>;
|
|
93
164
|
priority: z.ZodOptional<z.ZodNumber>;
|
|
94
165
|
minSize: z.ZodOptional<z.ZodNumber>;
|
|
95
166
|
minShareCount: z.ZodOptional<z.ZodNumber>;
|
|
@@ -97,13 +168,13 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
97
168
|
name: string;
|
|
98
169
|
minSize?: number | undefined;
|
|
99
170
|
minShareCount?: number | undefined;
|
|
100
|
-
test?: string | undefined;
|
|
171
|
+
test?: string | RegExp | undefined;
|
|
101
172
|
priority?: number | undefined;
|
|
102
173
|
}, {
|
|
103
174
|
name: string;
|
|
104
175
|
minSize?: number | undefined;
|
|
105
176
|
minShareCount?: number | undefined;
|
|
106
|
-
test?: string | undefined;
|
|
177
|
+
test?: string | RegExp | undefined;
|
|
107
178
|
priority?: number | undefined;
|
|
108
179
|
}>, "many">>;
|
|
109
180
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -113,7 +184,7 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
113
184
|
name: string;
|
|
114
185
|
minSize?: number | undefined;
|
|
115
186
|
minShareCount?: number | undefined;
|
|
116
|
-
test?: string | undefined;
|
|
187
|
+
test?: string | RegExp | undefined;
|
|
117
188
|
priority?: number | undefined;
|
|
118
189
|
}[] | undefined;
|
|
119
190
|
}, {
|
|
@@ -123,7 +194,7 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
123
194
|
name: string;
|
|
124
195
|
minSize?: number | undefined;
|
|
125
196
|
minShareCount?: number | undefined;
|
|
126
|
-
test?: string | undefined;
|
|
197
|
+
test?: string | RegExp | undefined;
|
|
127
198
|
priority?: number | undefined;
|
|
128
199
|
}[] | undefined;
|
|
129
200
|
}>>;
|
|
@@ -133,32 +204,50 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
133
204
|
intro: z.ZodOptional<z.ZodString>;
|
|
134
205
|
outro: z.ZodOptional<z.ZodString>;
|
|
135
206
|
esModule: z.ZodOptional<z.ZodBoolean>;
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
207
|
+
advancedChunks: z.ZodOptional<z.ZodObject<{
|
|
208
|
+
minSize: z.ZodOptional<z.ZodNumber>;
|
|
209
|
+
minShareCount: z.ZodOptional<z.ZodNumber>;
|
|
210
|
+
}, "strict", z.ZodTypeAny, {
|
|
211
|
+
minSize?: number | undefined;
|
|
212
|
+
minShareCount?: number | undefined;
|
|
213
|
+
}, {
|
|
214
|
+
minSize?: number | undefined;
|
|
215
|
+
minShareCount?: number | undefined;
|
|
216
|
+
}>>;
|
|
217
|
+
}>, "sourcemapIgnoreList" | "sourcemapPathTransform">>, "strict", z.ZodTypeAny, {
|
|
139
218
|
external?: string[] | undefined;
|
|
140
219
|
cwd?: string | undefined;
|
|
141
220
|
platform?: "node" | "browser" | "neutral" | undefined;
|
|
142
221
|
shimMissingExports?: boolean | undefined;
|
|
143
222
|
treeshake?: boolean | undefined;
|
|
144
223
|
logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
|
|
145
|
-
|
|
224
|
+
jsx?: {
|
|
225
|
+
mode?: "classic" | "automatic" | undefined;
|
|
226
|
+
factory?: string | undefined;
|
|
227
|
+
fragment?: string | undefined;
|
|
228
|
+
importSource?: string | undefined;
|
|
229
|
+
jsxImportSource?: string | undefined;
|
|
230
|
+
refresh?: boolean | undefined;
|
|
231
|
+
development?: boolean | undefined;
|
|
232
|
+
} | undefined;
|
|
233
|
+
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
|
|
146
234
|
define?: Record<string, string> | undefined;
|
|
147
235
|
inject?: Record<string, string> | undefined;
|
|
236
|
+
watch?: boolean | undefined;
|
|
148
237
|
footer?: string | undefined;
|
|
149
238
|
banner?: string | undefined;
|
|
150
239
|
intro?: string | undefined;
|
|
151
240
|
outro?: string | undefined;
|
|
241
|
+
file?: string | undefined;
|
|
152
242
|
name?: string | undefined;
|
|
153
243
|
exports?: "auto" | "named" | "default" | "none" | undefined;
|
|
154
244
|
dir?: string | undefined;
|
|
155
|
-
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | undefined;
|
|
245
|
+
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;
|
|
156
246
|
sourcemap?: boolean | "inline" | "hidden" | undefined;
|
|
157
|
-
sourcemapIgnoreList?: boolean | undefined;
|
|
158
247
|
extend?: boolean | undefined;
|
|
159
248
|
esModule?: boolean | undefined;
|
|
160
|
-
entryFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...
|
|
161
|
-
chunkFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...
|
|
249
|
+
entryFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
250
|
+
chunkFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
162
251
|
assetFileNames?: string | undefined;
|
|
163
252
|
minify?: boolean | undefined;
|
|
164
253
|
globals?: Record<string, string> | undefined;
|
|
@@ -167,13 +256,6 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
167
256
|
advancedChunks?: {
|
|
168
257
|
minSize?: number | undefined;
|
|
169
258
|
minShareCount?: number | undefined;
|
|
170
|
-
groups?: {
|
|
171
|
-
name: string;
|
|
172
|
-
minSize?: number | undefined;
|
|
173
|
-
minShareCount?: number | undefined;
|
|
174
|
-
test?: string | undefined;
|
|
175
|
-
priority?: number | undefined;
|
|
176
|
-
}[] | undefined;
|
|
177
259
|
} | undefined;
|
|
178
260
|
version?: boolean | undefined;
|
|
179
261
|
config?: string | boolean | undefined;
|
|
@@ -185,23 +267,33 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
185
267
|
shimMissingExports?: boolean | undefined;
|
|
186
268
|
treeshake?: boolean | undefined;
|
|
187
269
|
logLevel?: "info" | "debug" | "warn" | "silent" | undefined;
|
|
188
|
-
|
|
270
|
+
jsx?: {
|
|
271
|
+
mode?: "classic" | "automatic" | undefined;
|
|
272
|
+
factory?: string | undefined;
|
|
273
|
+
fragment?: string | undefined;
|
|
274
|
+
importSource?: string | undefined;
|
|
275
|
+
jsxImportSource?: string | undefined;
|
|
276
|
+
refresh?: boolean | undefined;
|
|
277
|
+
development?: boolean | undefined;
|
|
278
|
+
} | undefined;
|
|
279
|
+
moduleTypes?: Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css"> | undefined;
|
|
189
280
|
define?: Record<string, string> | undefined;
|
|
190
281
|
inject?: Record<string, string> | undefined;
|
|
282
|
+
watch?: boolean | undefined;
|
|
191
283
|
footer?: string | undefined;
|
|
192
284
|
banner?: string | undefined;
|
|
193
285
|
intro?: string | undefined;
|
|
194
286
|
outro?: string | undefined;
|
|
287
|
+
file?: string | undefined;
|
|
195
288
|
name?: string | undefined;
|
|
196
289
|
exports?: "auto" | "named" | "default" | "none" | undefined;
|
|
197
290
|
dir?: string | undefined;
|
|
198
|
-
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | undefined;
|
|
291
|
+
format?: "es" | "cjs" | "esm" | "module" | "commonjs" | "iife" | "umd" | undefined;
|
|
199
292
|
sourcemap?: boolean | "inline" | "hidden" | undefined;
|
|
200
|
-
sourcemapIgnoreList?: boolean | undefined;
|
|
201
293
|
extend?: boolean | undefined;
|
|
202
294
|
esModule?: boolean | undefined;
|
|
203
|
-
entryFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...
|
|
204
|
-
chunkFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...
|
|
295
|
+
entryFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
296
|
+
chunkFileNames?: string | ((args_0: import("../..").PreRenderedChunk, ...args: unknown[]) => string) | undefined;
|
|
205
297
|
assetFileNames?: string | undefined;
|
|
206
298
|
minify?: boolean | undefined;
|
|
207
299
|
globals?: Record<string, string> | undefined;
|
|
@@ -210,13 +302,6 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
210
302
|
advancedChunks?: {
|
|
211
303
|
minSize?: number | undefined;
|
|
212
304
|
minShareCount?: number | undefined;
|
|
213
|
-
groups?: {
|
|
214
|
-
name: string;
|
|
215
|
-
minSize?: number | undefined;
|
|
216
|
-
minShareCount?: number | undefined;
|
|
217
|
-
test?: string | undefined;
|
|
218
|
-
priority?: number | undefined;
|
|
219
|
-
}[] | undefined;
|
|
220
305
|
} | undefined;
|
|
221
306
|
version?: boolean | undefined;
|
|
222
307
|
config?: string | boolean | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Plugin } from '../plugin';
|
|
2
|
-
export declare const ENUMERATED_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "augmentChunkHash", "buildEnd", "onLog", "resolveDynamicImport", "generateBundle", "outputOptions", "renderChunk", "renderStart", "renderError", "writeBundle", "footer", "banner", "intro", "outro"];
|
|
2
|
+
export declare const ENUMERATED_PLUGIN_HOOK_NAMES: readonly ["options", "buildStart", "resolveId", "load", "transform", "moduleParsed", "augmentChunkHash", "buildEnd", "onLog", "resolveDynamicImport", "generateBundle", "outputOptions", "renderChunk", "renderStart", "renderError", "writeBundle", "footer", "banner", "intro", "outro", "closeBundle", "watchChange", "closeWatcher"];
|
|
3
3
|
/**
|
|
4
4
|
* Names of all properties in a `Plugin` object. Includes `name` and `api`.
|
|
5
5
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type StringOrRegExp = string | RegExp;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { defineParallelPlugin } from './plugin/parallel-plugin';
|
|
2
2
|
export { experimental_scan as scan } from './rolldown';
|
|
3
3
|
export { transform } from './binding';
|
|
4
|
+
export type { TransformOptions, TransformResult } from './binding';
|
|
4
5
|
export { composeJsPlugins as composePlugins } from './utils/compose-js-plugins';
|
|
5
6
|
export { modulePreloadPolyfillPlugin, dynamicImportVarsPlugin, wasmHelperPlugin, wasmFallbackPlugin, importGlobPlugin, manifestPlugin, loadFallbackPlugin, transformPlugin, aliasPlugin, jsonPlugin, buildImportAnalysisPlugin, replacePlugin, } from './plugin/builtin-plugin';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { RolldownOutput, RolldownOutputAsset, RolldownOutputChunk, SourceMap } from './types/rolldown-output';
|
|
2
|
-
import type { ExternalOption, InputOption, InputOptions } from './options/input-options';
|
|
2
|
+
import type { ExternalOption, InputOption, InputOptions, JsxOptions } from './options/input-options';
|
|
3
3
|
import type { ModuleFormat, OutputOptions } from './options/output-options';
|
|
4
4
|
import type { RolldownOptions } from './types/rolldown-options';
|
|
5
|
-
import type { AsyncPluginHooks, CustomPluginOptions, FunctionPluginHooks, ImportKind, LoadResult, ModuleOptions, ObjectHook, ParallelPluginHooks, PartialResolvedId, Plugin, RolldownPlugin, ResolveIdResult, ResolvedId, SourceDescription, TransformResult } from './plugin';
|
|
5
|
+
import type { AsyncPluginHooks, CustomPluginOptions, FunctionPluginHooks, ImportKind, LoadResult, ModuleOptions, ModuleType, ObjectHook, ParallelPluginHooks, PartialResolvedId, Plugin, RolldownPlugin, ResolveIdResult, ResolvedId, SourceDescription, TransformResult } from './plugin';
|
|
6
6
|
import { DefineParallelPluginResult } from './plugin/parallel-plugin';
|
|
7
7
|
import { defineConfig } from './utils/define-config';
|
|
8
|
-
import { rolldown } from './rolldown';
|
|
8
|
+
import { rolldown, watch } from './rolldown';
|
|
9
9
|
import { ConfigExport } from './types/config-export';
|
|
10
10
|
import { RolldownBuild } from './rolldown-build';
|
|
11
11
|
import { EmittedAsset, EmittedFile, PluginContext } from './plugin/plugin-context';
|
|
@@ -18,8 +18,9 @@ import { ModuleInfo } from './types/module-info';
|
|
|
18
18
|
import { MinimalPluginContext } from './log/logger';
|
|
19
19
|
import { ExistingRawSourceMap, SourceMapInput } from './types/sourcemap';
|
|
20
20
|
import { OutputBundle } from './types/output-bundle';
|
|
21
|
-
|
|
21
|
+
import { WatchOptions } from './options/watch-option';
|
|
22
|
+
export { defineConfig, rolldown, watch };
|
|
22
23
|
export declare const VERSION: string;
|
|
23
|
-
export type { RolldownOutputAsset, RolldownOutputChunk, RolldownOptions, RolldownOutput, RolldownBuild, InputOptions, NormalizedInputOptions, OutputOptions, NormalizedOutputOptions, Plugin, RolldownPlugin, DefineParallelPluginResult, ConfigExport, ImportKind, InputOption, ExternalOption, ModuleFormat, InternalModuleFormat, LoadResult, TransformResult, ResolveIdResult, PluginContext, TransformPluginContext, ObjectHook, RenderedChunk, PreRenderedChunk, SourceMap, SourceDescription, PartialNull, PartialResolvedId, ResolvedId, ModuleOptions, ModuleInfo, MinimalPluginContext, EmittedFile, EmittedAsset, CustomPluginOptions, AsyncPluginHooks, ParallelPluginHooks, FunctionPluginHooks, ExistingRawSourceMap, SourceMapInput, OutputBundle, };
|
|
24
|
+
export type { RolldownOutputAsset, RolldownOutputChunk, RolldownOptions, RolldownOutput, RolldownBuild, InputOptions, NormalizedInputOptions, OutputOptions, NormalizedOutputOptions, Plugin, RolldownPlugin, DefineParallelPluginResult, ConfigExport, ImportKind, InputOption, ExternalOption, ModuleFormat, ModuleType, InternalModuleFormat, LoadResult, TransformResult, ResolveIdResult, PluginContext, TransformPluginContext, ObjectHook, RenderedChunk, PreRenderedChunk, SourceMap, SourceDescription, PartialNull, PartialResolvedId, ResolvedId, ModuleOptions, ModuleInfo, MinimalPluginContext, EmittedFile, EmittedAsset, CustomPluginOptions, AsyncPluginHooks, ParallelPluginHooks, FunctionPluginHooks, ExistingRawSourceMap, SourceMapInput, OutputBundle, JsxOptions, WatchOptions, };
|
|
24
25
|
export type { RolldownOutput as RollupOutput, RolldownOptions as RollupOptions, RolldownBuild as RollupBuild, RolldownOutputChunk as OutputChunk, RolldownOutputAsset as OutputAsset, };
|
|
25
26
|
export type { RollupError, RollupLog, LoggingFunction } from './rollup';
|
|
@@ -3,11 +3,18 @@ import type { Plugin } from '../plugin';
|
|
|
3
3
|
import { type LogLevelOption } from './logging';
|
|
4
4
|
import type { InputOptions } from '../options/input-options';
|
|
5
5
|
import type { NormalizedInputOptions } from '../options/normalized-input-options';
|
|
6
|
-
export interface
|
|
6
|
+
export interface PluginContextMeta {
|
|
7
|
+
rollupVersion: string;
|
|
8
|
+
rolldownVersion: string;
|
|
9
|
+
watchMode: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare class MinimalPluginContext {
|
|
7
12
|
debug: LoggingFunction;
|
|
8
|
-
error: (error: RollupError | string) => never;
|
|
9
13
|
info: LoggingFunction;
|
|
14
|
+
meta: PluginContextMeta;
|
|
10
15
|
warn: LoggingFunction;
|
|
16
|
+
readonly error: (error: RollupError | string) => never;
|
|
17
|
+
constructor(options: NormalizedInputOptions, plugin: Plugin);
|
|
11
18
|
}
|
|
12
19
|
export declare function getLogger(plugins: Plugin[], onLog: LogHandler, logLevel: LogLevelOption): LogHandler;
|
|
13
20
|
export declare const getOnLog: (config: InputOptions, logLevel: LogLevelOption, printLog?: LogHandler) => NormalizedInputOptions["onLog"];
|