@rolldown/browser 1.1.1 → 1.1.3
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 +25 -14
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +2 -2
- package/dist/{constructors-B3MtwuwE.js → constructors-CnlRXsZI.js} +1 -4
- package/dist/{error-Azs8e8cN.js → error-DOcnYe1L.js} +1 -1
- package/dist/experimental-index.browser.mjs +17 -12
- package/dist/experimental-index.d.mts +16 -6
- package/dist/experimental-index.mjs +17 -12
- package/dist/filter-index.d.mts +1 -1
- 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.browser.mjs +1 -1
- package/dist/plugins-index.d.mts +3 -3
- package/dist/plugins-index.mjs +1 -1
- package/dist/{resolve-tsconfig-Cmw0SAxd.js → resolve-tsconfig-B_KTldgL.js} +1 -1
- package/dist/rolldown-binding.wasi-browser.js +1 -0
- package/dist/rolldown-binding.wasi.cjs +1 -0
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/{rolldown-build-C9wAyTYG.js → rolldown-build-AEs_8s-I.js} +1481 -1514
- package/dist/shared/{binding-BPMI4t0-.d.mts → binding-DyMVbTi5.d.mts} +65 -142
- package/dist/shared/{bindingify-input-options-EBZ5IFF2.mjs → bindingify-input-options-C6gxQEeC.mjs} +1325 -1326
- package/dist/shared/{constructors-YQsI-lJq.mjs → constructors-CAjrhG6p.mjs} +1 -4
- package/dist/shared/{constructors-DAokZVCk.d.mts → constructors-CDyv7p8V.d.mts} +3 -4
- package/dist/shared/{define-config-Nwe1joYW.d.mts → define-config-Tz8fY30o.d.mts} +2 -2
- package/dist/shared/{load-config-2QjEcEu4.mjs → load-config-C6ynET_w.mjs} +1 -1
- package/dist/shared/{parse-DNkPrz4w.mjs → parse-DzXgx0D0.mjs} +1 -1
- package/dist/shared/{prompt-DYnaB1Nb.mjs → prompt-B1Yc1NPt.mjs} +5 -5
- package/dist/shared/{rolldown-build-BgBj9qUV.mjs → rolldown-build-CVwFjky2.mjs} +21 -53
- package/dist/shared/{rolldown-Bqp7kINm.mjs → rolldown-ro17jDL2.mjs} +1 -1
- package/dist/shared/{transform-DulXg6tQ.d.mts → transform-DudVZDD5.d.mts} +1 -1
- package/dist/shared/{utils-Bp1VejKQ.d.mts → utils-DLIXIK5m.d.mts} +1 -1
- package/dist/shared/{watch-C6WxUyjE.mjs → watch-DyYqAbie.mjs} +2 -2
- package/dist/utils-index.browser.mjs +6 -6
- package/dist/utils-index.d.mts +3 -3
- package/dist/utils-index.mjs +5 -5
- package/package.json +4 -4
|
@@ -2283,94 +2283,6 @@ 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
|
-
}
|
|
2374
2286
|
interface ReactRefreshOptions {
|
|
2375
2287
|
/**
|
|
2376
2288
|
* Specify the identifier of the refresh registration variable.
|
|
@@ -2417,7 +2329,10 @@ interface StyledComponentsOptions {
|
|
|
2417
2329
|
* Transpiles styled-components tagged template literals to a smaller representation
|
|
2418
2330
|
* than what Babel normally creates, helping to reduce bundle size.
|
|
2419
2331
|
*
|
|
2420
|
-
*
|
|
2332
|
+
* Disabled by default because Oxc does not down-level template literals, so this
|
|
2333
|
+
* transform only increases output size.
|
|
2334
|
+
*
|
|
2335
|
+
* @default false
|
|
2421
2336
|
*/
|
|
2422
2337
|
transpileTemplateLiterals?: boolean;
|
|
2423
2338
|
/**
|
|
@@ -2467,6 +2382,13 @@ interface StyledComponentsOptions {
|
|
|
2467
2382
|
/**
|
|
2468
2383
|
* Options for transforming a JavaScript or TypeScript file.
|
|
2469
2384
|
*
|
|
2385
|
+
* Options are listed in evaluation order: the source is parsed (`lang`,
|
|
2386
|
+
* `sourceType`), declarations are emitted (`typescript.declaration`), then
|
|
2387
|
+
* transforms run (`typescript`, `decorator`, `plugins`,
|
|
2388
|
+
* `jsx`, `target`), followed by the `inject` and `define` plugins, and
|
|
2389
|
+
* finally codegen (`sourcemap`). `helpers` configures the runtime helpers
|
|
2390
|
+
* the transforms emit.
|
|
2391
|
+
*
|
|
2470
2392
|
* @see {@link transform}
|
|
2471
2393
|
*/
|
|
2472
2394
|
interface TransformOptions {
|
|
@@ -2479,23 +2401,23 @@ interface TransformOptions {
|
|
|
2479
2401
|
* options.
|
|
2480
2402
|
*/
|
|
2481
2403
|
cwd?: string;
|
|
2482
|
-
/**
|
|
2483
|
-
* Enable source map generation.
|
|
2484
|
-
*
|
|
2485
|
-
* When `true`, the `sourceMap` field of transform result objects will be populated.
|
|
2486
|
-
*
|
|
2487
|
-
* @default false
|
|
2488
|
-
*
|
|
2489
|
-
* @see {@link SourceMap}
|
|
2490
|
-
*/
|
|
2491
|
-
sourcemap?: boolean;
|
|
2492
2404
|
/** Set assumptions in order to produce smaller output. */
|
|
2493
2405
|
assumptions?: CompilerAssumptions;
|
|
2494
2406
|
/**
|
|
2495
2407
|
* Configure how TypeScript is transformed.
|
|
2408
|
+
*
|
|
2409
|
+
* `typescript.declaration` is evaluated before all transforms.
|
|
2410
|
+
*
|
|
2496
2411
|
* @see {@link https://oxc.rs/docs/guide/usage/transformer/typescript}
|
|
2497
2412
|
*/
|
|
2498
2413
|
typescript?: TypeScriptOptions;
|
|
2414
|
+
/** Decorator plugin */
|
|
2415
|
+
decorator?: DecoratorOptions;
|
|
2416
|
+
/**
|
|
2417
|
+
* Third-party plugins to use.
|
|
2418
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/plugins}
|
|
2419
|
+
*/
|
|
2420
|
+
plugins?: PluginsOptions;
|
|
2499
2421
|
/**
|
|
2500
2422
|
* Configure how TSX and JSX are transformed.
|
|
2501
2423
|
* @see {@link https://oxc.rs/docs/guide/usage/transformer/jsx}
|
|
@@ -2518,31 +2440,32 @@ interface TransformOptions {
|
|
|
2518
2440
|
target?: string | Array<string>;
|
|
2519
2441
|
/** Behaviour for runtime helpers. */
|
|
2520
2442
|
helpers?: Helpers;
|
|
2521
|
-
/**
|
|
2522
|
-
* Define Plugin
|
|
2523
|
-
* @see {@link https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#define}
|
|
2524
|
-
*/
|
|
2525
|
-
define?: Record<string, string>;
|
|
2526
2443
|
/**
|
|
2527
2444
|
* Inject Plugin
|
|
2445
|
+
*
|
|
2446
|
+
* Runs after all transforms.
|
|
2447
|
+
*
|
|
2528
2448
|
* @see {@link https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#inject}
|
|
2529
2449
|
*/
|
|
2530
2450
|
inject?: Record<string, string | [string, string]>;
|
|
2531
|
-
/** Decorator plugin */
|
|
2532
|
-
decorator?: DecoratorOptions;
|
|
2533
2451
|
/**
|
|
2534
|
-
*
|
|
2452
|
+
* Define Plugin
|
|
2453
|
+
*
|
|
2454
|
+
* Runs after the inject plugin.
|
|
2535
2455
|
*
|
|
2536
|
-
*
|
|
2537
|
-
* given options; `false` or omitted disables it. When enabled, the compiler
|
|
2538
|
-
* runs as the first transform and memoizes React components and hooks.
|
|
2456
|
+
* @see {@link https://oxc.rs/docs/guide/usage/transformer/global-variable-replacement#define}
|
|
2539
2457
|
*/
|
|
2540
|
-
|
|
2458
|
+
define?: Record<string, string>;
|
|
2541
2459
|
/**
|
|
2542
|
-
*
|
|
2543
|
-
*
|
|
2460
|
+
* Enable source map generation.
|
|
2461
|
+
*
|
|
2462
|
+
* When `true`, the `sourceMap` field of transform result objects will be populated.
|
|
2463
|
+
*
|
|
2464
|
+
* @default false
|
|
2465
|
+
*
|
|
2466
|
+
* @see {@link SourceMap}
|
|
2544
2467
|
*/
|
|
2545
|
-
|
|
2468
|
+
sourcemap?: boolean;
|
|
2546
2469
|
}
|
|
2547
2470
|
interface TypeScriptOptions {
|
|
2548
2471
|
jsxPragma?: string;
|
|
@@ -2836,7 +2759,7 @@ declare class TsconfigCache {
|
|
|
2836
2759
|
/** Get the number of cached entries. */
|
|
2837
2760
|
size(): number;
|
|
2838
2761
|
}
|
|
2839
|
-
type BindingBuiltinPluginName = 'builtin:bundle-analyzer' | 'builtin:esm-external-require' | 'builtin:isolated-declaration' | 'builtin:replace' | 'builtin:vite-alias' | 'builtin:vite-build-import-analysis' | 'builtin:vite-dynamic-import-vars' | 'builtin:vite-import-glob' | 'builtin:vite-json' | 'builtin:vite-load-fallback' | 'builtin:vite-manifest' | 'builtin:vite-module-preload-polyfill' | 'builtin:vite-react-refresh-wrapper' | 'builtin:vite-reporter' | 'builtin:vite-resolve' | 'builtin:vite-transform' | 'builtin:vite-
|
|
2762
|
+
type BindingBuiltinPluginName = 'builtin:bundle-analyzer' | 'builtin:esm-external-require' | 'builtin:isolated-declaration' | 'builtin:replace' | 'builtin:vite-alias' | 'builtin:vite-build-import-analysis' | 'builtin:vite-dynamic-import-vars' | 'builtin:vite-import-glob' | 'builtin:vite-json' | 'builtin:vite-load-fallback' | 'builtin:vite-manifest' | 'builtin:vite-module-preload-polyfill' | 'builtin:vite-react-refresh-wrapper' | 'builtin:vite-reporter' | 'builtin:vite-resolve' | 'builtin:vite-transform' | 'builtin:vite-web-worker-post' | 'builtin:oxc-runtime';
|
|
2840
2763
|
interface BindingBundleAnalyzerPluginConfig {
|
|
2841
2764
|
/** Output filename for the bundle analysis data (default: "analyze-data.json") */
|
|
2842
2765
|
fileName?: string;
|
|
@@ -2844,7 +2767,16 @@ interface BindingBundleAnalyzerPluginConfig {
|
|
|
2844
2767
|
format?: 'json' | 'md';
|
|
2845
2768
|
}
|
|
2846
2769
|
interface BindingBundleState {
|
|
2847
|
-
|
|
2770
|
+
lastBuildErrored: boolean;
|
|
2771
|
+
/**
|
|
2772
|
+
* The stage of the last incremental failure, when `last_build_errored`
|
|
2773
|
+
* is true and the engine is in an incremental-failure state. Absent on
|
|
2774
|
+
* success and for an initial full-build failure (use
|
|
2775
|
+
* `last_build_errored` to detect that). The consumer can force a full
|
|
2776
|
+
* rebuild on the next page load when this is `Hmr`. See
|
|
2777
|
+
* `internal-docs/dev-engine/implementation.md` §12.
|
|
2778
|
+
*/
|
|
2779
|
+
lastErrorStage?: BindingErrorStage;
|
|
2848
2780
|
hasStaleOutput: boolean;
|
|
2849
2781
|
}
|
|
2850
2782
|
interface BindingClientHmrUpdate {
|
|
@@ -3006,6 +2938,16 @@ type BindingError = {
|
|
|
3006
2938
|
type: 'NativeError';
|
|
3007
2939
|
field0: NativeError;
|
|
3008
2940
|
};
|
|
2941
|
+
/**
|
|
2942
|
+
* Which stage of an incremental dev build produced the last error.
|
|
2943
|
+
*
|
|
2944
|
+
* Mirrors `rolldown_dev::ErrorStage`. Surfaced on
|
|
2945
|
+
* [`crate::binding_dev_engine::BindingBundleState`] so the consumer can
|
|
2946
|
+
* treat an `Hmr`-stage failure as recoverable by forcing a full rebuild
|
|
2947
|
+
* on the next page load (HMR generation may itself be buggy). See
|
|
2948
|
+
* `internal-docs/dev-engine/implementation.md` §12.
|
|
2949
|
+
*/
|
|
2950
|
+
type BindingErrorStage = 'Hmr' | 'Rebuild';
|
|
3009
2951
|
interface BindingEsmExternalRequirePluginConfig {
|
|
3010
2952
|
external: Array<BindingStringOrRegex>;
|
|
3011
2953
|
skipDuplicateCheck?: boolean;
|
|
@@ -3060,13 +3002,6 @@ interface BindingMagicStringOptions {
|
|
|
3060
3002
|
indentExclusionRanges?: Array<Array<number>> | Array<number>;
|
|
3061
3003
|
ignoreList?: boolean;
|
|
3062
3004
|
}
|
|
3063
|
-
interface BindingModulePreloadOptions {
|
|
3064
|
-
polyfill: boolean;
|
|
3065
|
-
resolveDependencies?: (filename: string, deps: string[], context: {
|
|
3066
|
-
hostId: string;
|
|
3067
|
-
hostType: 'html' | 'js';
|
|
3068
|
-
}) => string[];
|
|
3069
|
-
}
|
|
3070
3005
|
interface BindingModules {
|
|
3071
3006
|
values: Array<BindingRenderedModule>;
|
|
3072
3007
|
keys: Array<string>;
|
|
@@ -3095,16 +3030,6 @@ declare enum BindingRebuildStrategy {
|
|
|
3095
3030
|
Auto = 1,
|
|
3096
3031
|
Never = 2
|
|
3097
3032
|
}
|
|
3098
|
-
interface BindingRenderBuiltUrlConfig {
|
|
3099
|
-
ssr: boolean;
|
|
3100
|
-
type: 'asset' | 'public';
|
|
3101
|
-
hostId: string;
|
|
3102
|
-
hostType: 'js' | 'css' | 'html';
|
|
3103
|
-
}
|
|
3104
|
-
interface BindingRenderBuiltUrlRet {
|
|
3105
|
-
relative?: boolean;
|
|
3106
|
-
runtime?: string;
|
|
3107
|
-
}
|
|
3108
3033
|
interface BindingReplacePluginConfig {
|
|
3109
3034
|
values: Record<string, string>;
|
|
3110
3035
|
delimiters?: [string, string];
|
|
@@ -3153,6 +3078,13 @@ interface BindingTsconfigCompilerOptions {
|
|
|
3153
3078
|
experimentalDecorators?: boolean;
|
|
3154
3079
|
/** Enables decorator metadata emission. */
|
|
3155
3080
|
emitDecoratorMetadata?: boolean;
|
|
3081
|
+
/** Enables all strict type-checking options. Used as the fallback for `strictNullChecks`. */
|
|
3082
|
+
strict?: boolean;
|
|
3083
|
+
/**
|
|
3084
|
+
* Enables strict null checks. Controls whether `null`/`undefined` are elided from
|
|
3085
|
+
* nullable-union `design:type` decorator metadata.
|
|
3086
|
+
*/
|
|
3087
|
+
strictNullChecks?: boolean;
|
|
3156
3088
|
/** Preserves module structure of imports/exports. */
|
|
3157
3089
|
verbatimModuleSyntax?: boolean;
|
|
3158
3090
|
/** Configures how class fields are emitted. */
|
|
@@ -3186,14 +3118,6 @@ interface BindingViteBuildImportAnalysisPluginConfig {
|
|
|
3186
3118
|
optimizeModulePreloadRelativePaths: boolean;
|
|
3187
3119
|
renderBuiltUrl: boolean;
|
|
3188
3120
|
isRelativeBase: boolean;
|
|
3189
|
-
v2?: BindingViteBuildImportAnalysisPluginV2Config;
|
|
3190
|
-
}
|
|
3191
|
-
interface BindingViteBuildImportAnalysisPluginV2Config {
|
|
3192
|
-
isSsr: boolean;
|
|
3193
|
-
urlBase: string;
|
|
3194
|
-
decodedBase: string;
|
|
3195
|
-
modulePreload: false | BindingModulePreloadOptions;
|
|
3196
|
-
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
3197
3121
|
}
|
|
3198
3122
|
interface BindingViteDynamicImportVarsPluginConfig {
|
|
3199
3123
|
sourcemap?: boolean;
|
|
@@ -3215,7 +3139,6 @@ type BindingViteJsonPluginStringify = boolean | string;
|
|
|
3215
3139
|
interface BindingViteManifestPluginConfig {
|
|
3216
3140
|
root: string;
|
|
3217
3141
|
outPath: string;
|
|
3218
|
-
isEnableV2?: boolean;
|
|
3219
3142
|
isLegacy?: (args: BindingNormalizedOptions) => boolean;
|
|
3220
3143
|
cssEntries: () => Record<string, string>;
|
|
3221
3144
|
}
|