@rolldown/browser 1.0.0-beta.58 → 1.0.0-beta.60
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 +32 -32
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +7 -7
- package/dist/{constructors-BuqTjXTF.js → constructors-CPMzz58l.js} +2 -8
- package/dist/experimental-index.browser.mjs +18 -37
- package/dist/experimental-index.d.mts +17 -63
- package/dist/experimental-index.mjs +20 -39
- package/dist/experimental-runtime-types.d.ts +6 -2
- package/dist/filter-index.d.mts +1 -1
- package/dist/filter-index.mjs +1 -2
- package/dist/get-log-filter.d.mts +1 -1
- package/dist/index.browser.mjs +6 -6
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +11 -11
- package/dist/normalize-string-or-regex-DcX5TPjK.js +247 -0
- package/dist/parallel-plugin-worker.mjs +3 -3
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/plugins-index.browser.mjs +2 -2
- package/dist/plugins-index.d.mts +3 -3
- package/dist/plugins-index.mjs +2 -2
- package/dist/rolldown-binding.wasi-browser.js +0 -1
- package/dist/rolldown-binding.wasi.cjs +0 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/{rolldown-build-CRqas5jO.js → rolldown-build-Zb6e1FlF.js} +661 -80
- package/dist/shared/{binding-MAEzB4KA.d.mts → binding-CAB1xlCZ.d.mts} +58 -134
- package/dist/shared/{bindingify-input-options--qcSYuhh.mjs → bindingify-input-options-C4xVxTKf.mjs} +602 -51
- package/dist/shared/{composable-filters-C5qA4jo-.mjs → composable-filters-DmVadxLf.mjs} +41 -20
- package/dist/shared/{constructors-CQP6o3cR.d.mts → constructors-D_KDVVwY.d.mts} +3 -5
- package/dist/shared/{constructors-kOch67Sb.mjs → constructors-KqJrL3Ok.mjs} +2 -8
- package/dist/shared/{define-config-yInAJbA1.d.mts → define-config-CUEbSpq4.d.mts} +967 -408
- package/dist/shared/{load-config-BZhApFJg.mjs → load-config-DN8SQL2o.mjs} +1 -1
- package/dist/shared/{logging-B4x9qar8.d.mts → logging-DGAQcdLz.d.mts} +4 -0
- package/dist/shared/{logs-DEfpOy5A.mjs → logs-cXucB9vK.mjs} +8 -8
- package/dist/shared/normalize-string-or-regex-Bn5eoSii.mjs +60 -0
- package/dist/shared/{parse-ast-index-CgzK6cxG.mjs → parse-ast-index-B54CTqgh.mjs} +2 -2
- package/dist/shared/{prompt-CNt8OM9C.mjs → prompt-D80rO-gq.mjs} +220 -220
- package/dist/shared/{rolldown-Vl5SnJ_J.mjs → rolldown-BhEWsQWt.mjs} +1 -1
- package/dist/shared/{rolldown-build-7kWB1jqY.mjs → rolldown-build-PEQvqPGC.mjs} +48 -36
- package/dist/shared/{utils-BGxZdOXA.d.mts → utils-0UHbNgk4.d.mts} +2 -11
- package/dist/shared/{watch-CGYro6go.mjs → watch-avpeg13R.mjs} +11 -12
- package/package.json +1 -1
- package/dist/normalize-string-or-regex-3ql5-z8-.js +0 -872
- package/dist/shared/misc-BubmxcE3.mjs +0 -22
- package/dist/shared/normalize-string-or-regex-CIiT1lMg.mjs +0 -669
- /package/dist/shared/{define-config-BF4P-Pum.mjs → define-config-DrUTwApf.mjs} +0 -0
|
@@ -1274,24 +1274,63 @@ declare class BindingBundleErrorEventData {
|
|
|
1274
1274
|
get error(): Array<BindingError>;
|
|
1275
1275
|
}
|
|
1276
1276
|
declare class BindingMagicString {
|
|
1277
|
-
constructor(source: string);
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1277
|
+
constructor(source: string, options?: BindingMagicStringOptions | undefined | null);
|
|
1278
|
+
get filename(): string | null;
|
|
1279
|
+
replace(from: string, to: string): this;
|
|
1280
|
+
replaceAll(from: string, to: string): this;
|
|
1281
|
+
prepend(content: string): this;
|
|
1282
|
+
append(content: string): this;
|
|
1283
|
+
prependLeft(index: number, content: string): this;
|
|
1284
|
+
prependRight(index: number, content: string): this;
|
|
1285
|
+
appendLeft(index: number, content: string): this;
|
|
1286
|
+
appendRight(index: number, content: string): this;
|
|
1287
|
+
overwrite(start: number, end: number, content: string): this;
|
|
1287
1288
|
toString(): string;
|
|
1288
1289
|
hasChanged(): boolean;
|
|
1289
1290
|
length(): number;
|
|
1290
1291
|
isEmpty(): boolean;
|
|
1291
|
-
remove(start: number, end: number):
|
|
1292
|
-
update(start: number, end: number, content: string):
|
|
1293
|
-
relocate(start: number, end: number, to: number):
|
|
1294
|
-
|
|
1292
|
+
remove(start: number, end: number): this;
|
|
1293
|
+
update(start: number, end: number, content: string): this;
|
|
1294
|
+
relocate(start: number, end: number, to: number): this;
|
|
1295
|
+
/**
|
|
1296
|
+
* Alias for `relocate` to match the original magic-string API.
|
|
1297
|
+
* Moves the characters from `start` to `end` to `index`.
|
|
1298
|
+
* Returns `this` for method chaining.
|
|
1299
|
+
*/
|
|
1300
|
+
move(start: number, end: number, index: number): this;
|
|
1301
|
+
indent(indentor?: string | undefined | null): this;
|
|
1302
|
+
/** Trims whitespace or specified characters from the start and end. */
|
|
1303
|
+
trim(charType?: string | undefined | null): this;
|
|
1304
|
+
/** Trims whitespace or specified characters from the start. */
|
|
1305
|
+
trimStart(charType?: string | undefined | null): this;
|
|
1306
|
+
/** Trims whitespace or specified characters from the end. */
|
|
1307
|
+
trimEnd(charType?: string | undefined | null): this;
|
|
1308
|
+
/** Trims newlines from the start and end. */
|
|
1309
|
+
trimLines(): this;
|
|
1310
|
+
/**
|
|
1311
|
+
* Deprecated method that throws an error directing users to use prependRight or appendLeft.
|
|
1312
|
+
* This matches the original magic-string API which deprecated this method.
|
|
1313
|
+
*/
|
|
1314
|
+
insert(index: number, content: string): void;
|
|
1315
|
+
/** Returns a clone of the MagicString instance. */
|
|
1316
|
+
clone(): BindingMagicString;
|
|
1317
|
+
/** Returns the last character of the generated string, or an empty string if empty. */
|
|
1318
|
+
lastChar(): string;
|
|
1319
|
+
/** Returns the content after the last newline in the generated string. */
|
|
1320
|
+
lastLine(): string;
|
|
1321
|
+
/** Returns a clone with content outside the specified range removed. */
|
|
1322
|
+
snip(start: number, end: number): BindingMagicString;
|
|
1323
|
+
/**
|
|
1324
|
+
* Resets the portion of the string from `start` to `end` to its original content.
|
|
1325
|
+
* This undoes any modifications made to that range.
|
|
1326
|
+
* Supports negative indices (counting from the end).
|
|
1327
|
+
*/
|
|
1328
|
+
reset(start: number, end: number): this;
|
|
1329
|
+
/**
|
|
1330
|
+
* Returns the content between the specified original character positions.
|
|
1331
|
+
* Supports negative indices (counting from the end).
|
|
1332
|
+
*/
|
|
1333
|
+
slice(start?: number | undefined | null, end?: number | undefined | null): string;
|
|
1295
1334
|
}
|
|
1296
1335
|
declare class BindingNormalizedOptions {
|
|
1297
1336
|
get input(): Array<string> | Record<string, string>;
|
|
@@ -1334,32 +1373,6 @@ declare class BindingNormalizedOptions {
|
|
|
1334
1373
|
get minifyInternalExports(): boolean;
|
|
1335
1374
|
get context(): string;
|
|
1336
1375
|
}
|
|
1337
|
-
declare class BindingOutputAsset {
|
|
1338
|
-
dropInner(): ExternalMemoryStatus;
|
|
1339
|
-
getFileName(): string;
|
|
1340
|
-
getOriginalFileName(): string | null;
|
|
1341
|
-
getOriginalFileNames(): Array<string>;
|
|
1342
|
-
getSource(): BindingAssetSource;
|
|
1343
|
-
getName(): string | null;
|
|
1344
|
-
getNames(): Array<string>;
|
|
1345
|
-
}
|
|
1346
|
-
declare class BindingOutputChunk {
|
|
1347
|
-
dropInner(): ExternalMemoryStatus;
|
|
1348
|
-
getIsEntry(): boolean;
|
|
1349
|
-
getIsDynamicEntry(): boolean;
|
|
1350
|
-
getFacadeModuleId(): string | null;
|
|
1351
|
-
getModuleIds(): Array<string>;
|
|
1352
|
-
getExports(): Array<string>;
|
|
1353
|
-
getFileName(): string;
|
|
1354
|
-
getModules(): BindingModules;
|
|
1355
|
-
getImports(): Array<string>;
|
|
1356
|
-
getDynamicImports(): Array<string>;
|
|
1357
|
-
getCode(): string;
|
|
1358
|
-
getMap(): string | null;
|
|
1359
|
-
getSourcemapFileName(): string | null;
|
|
1360
|
-
getPreliminaryFileName(): string;
|
|
1361
|
-
getName(): string;
|
|
1362
|
-
}
|
|
1363
1376
|
declare class BindingRenderedChunk {
|
|
1364
1377
|
get name(): string;
|
|
1365
1378
|
get isEntry(): boolean;
|
|
@@ -1376,9 +1389,6 @@ declare class BindingRenderedModule {
|
|
|
1376
1389
|
get code(): string | null;
|
|
1377
1390
|
get renderedExports(): Array<string>;
|
|
1378
1391
|
}
|
|
1379
|
-
declare class BindingUrlResolver {
|
|
1380
|
-
call(url: string, importer?: string): Promise<[string, string | undefined]>;
|
|
1381
|
-
}
|
|
1382
1392
|
/**
|
|
1383
1393
|
* Minimal wrapper around the core `Bundler` for watcher events.
|
|
1384
1394
|
* This is returned from watcher event data to allow access to the bundler instance.
|
|
@@ -1397,10 +1407,7 @@ declare class BindingWatcherEvent {
|
|
|
1397
1407
|
bundleEventKind(): string;
|
|
1398
1408
|
bundleErrorData(): BindingBundleErrorEventData;
|
|
1399
1409
|
}
|
|
1400
|
-
|
|
1401
|
-
inner: string | Uint8Array;
|
|
1402
|
-
}
|
|
1403
|
-
type BindingBuiltinPluginName = 'builtin:esm-external-require' | 'builtin:isolated-declaration' | 'builtin:replace' | 'builtin:vite-alias' | 'builtin:vite-asset' | 'builtin:vite-asset-import-meta-url' | 'builtin:vite-build-import-analysis' | 'builtin:vite-css' | 'builtin:vite-css-post' | 'builtin:vite-dynamic-import-vars' | 'builtin:vite-html' | 'builtin:vite-html-inline-proxy' | '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-wasm-fallback' | 'builtin:vite-wasm-helper' | 'builtin:vite-web-worker-post';
|
|
1410
|
+
type BindingBuiltinPluginName = '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-wasm-fallback' | 'builtin:vite-wasm-helper' | 'builtin:vite-web-worker-post';
|
|
1404
1411
|
interface BindingBundleState {
|
|
1405
1412
|
lastFullBuildFailed: boolean;
|
|
1406
1413
|
hasStaleOutput: boolean;
|
|
@@ -1454,16 +1461,6 @@ interface BindingHookResolveIdExtraArgs {
|
|
|
1454
1461
|
interface BindingIsolatedDeclarationPluginConfig {
|
|
1455
1462
|
stripInternal?: boolean;
|
|
1456
1463
|
}
|
|
1457
|
-
interface BindingJsonSourcemap {
|
|
1458
|
-
file?: string;
|
|
1459
|
-
mappings?: string;
|
|
1460
|
-
sourceRoot?: string;
|
|
1461
|
-
sources?: Array<string | undefined | null>;
|
|
1462
|
-
sourcesContent?: Array<string | undefined | null>;
|
|
1463
|
-
names?: Array<string>;
|
|
1464
|
-
debugId?: string;
|
|
1465
|
-
x_google_ignoreList?: Array<number>;
|
|
1466
|
-
}
|
|
1467
1464
|
interface BindingLogLocation {
|
|
1468
1465
|
/** 1-based */
|
|
1469
1466
|
line: number;
|
|
@@ -1471,6 +1468,9 @@ interface BindingLogLocation {
|
|
|
1471
1468
|
column: number;
|
|
1472
1469
|
file?: string;
|
|
1473
1470
|
}
|
|
1471
|
+
interface BindingMagicStringOptions {
|
|
1472
|
+
filename?: string;
|
|
1473
|
+
}
|
|
1474
1474
|
interface BindingModulePreloadOptions {
|
|
1475
1475
|
polyfill: boolean;
|
|
1476
1476
|
resolveDependencies?: (filename: string, deps: string[], context: {
|
|
@@ -1482,10 +1482,6 @@ interface BindingModules {
|
|
|
1482
1482
|
values: Array<BindingRenderedModule>;
|
|
1483
1483
|
keys: Array<string>;
|
|
1484
1484
|
}
|
|
1485
|
-
interface BindingOutputs {
|
|
1486
|
-
chunks: Array<BindingOutputChunk>;
|
|
1487
|
-
assets: Array<BindingOutputAsset>;
|
|
1488
|
-
}
|
|
1489
1485
|
declare enum BindingRebuildStrategy {
|
|
1490
1486
|
Always = 0,
|
|
1491
1487
|
Auto = 1,
|
|
@@ -1508,34 +1504,9 @@ interface BindingReplacePluginConfig {
|
|
|
1508
1504
|
objectGuards?: boolean;
|
|
1509
1505
|
sourcemap?: boolean;
|
|
1510
1506
|
}
|
|
1511
|
-
interface BindingSourcemap {
|
|
1512
|
-
inner: string | BindingJsonSourcemap;
|
|
1513
|
-
}
|
|
1514
1507
|
interface BindingTransformHookExtraArgs {
|
|
1515
1508
|
moduleType: string;
|
|
1516
1509
|
}
|
|
1517
|
-
interface BindingViteAssetImportMetaUrlPluginConfig {
|
|
1518
|
-
root: string;
|
|
1519
|
-
isLib: boolean;
|
|
1520
|
-
publicDir: string;
|
|
1521
|
-
clientEntry: string;
|
|
1522
|
-
tryFsResolve: (id: string) => string | undefined;
|
|
1523
|
-
assetResolver: (id: string, importer: string) => Promise<string | undefined>;
|
|
1524
|
-
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1525
|
-
}
|
|
1526
|
-
interface BindingViteAssetPluginConfig {
|
|
1527
|
-
root: string;
|
|
1528
|
-
isLib: boolean;
|
|
1529
|
-
isSsr: boolean;
|
|
1530
|
-
isWorker: boolean;
|
|
1531
|
-
urlBase: string;
|
|
1532
|
-
publicDir: string;
|
|
1533
|
-
decodedBase: string;
|
|
1534
|
-
isSkipAssets: boolean;
|
|
1535
|
-
assetsInclude: Array<BindingStringOrRegex>;
|
|
1536
|
-
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1537
|
-
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1538
|
-
}
|
|
1539
1510
|
interface BindingViteBuildImportAnalysisPluginConfig {
|
|
1540
1511
|
preloadCode: string;
|
|
1541
1512
|
insertPreload: boolean;
|
|
@@ -1551,36 +1522,6 @@ interface BindingViteBuildImportAnalysisPluginV2Config {
|
|
|
1551
1522
|
modulePreload: false | BindingModulePreloadOptions;
|
|
1552
1523
|
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1553
1524
|
}
|
|
1554
|
-
interface BindingViteCssPluginConfig {
|
|
1555
|
-
root: string;
|
|
1556
|
-
isLib: boolean;
|
|
1557
|
-
publicDir: string;
|
|
1558
|
-
compileCSS: (url: string, importer: string, resolver: BindingUrlResolver) => Promise<{
|
|
1559
|
-
code: string;
|
|
1560
|
-
map?: BindingSourcemap;
|
|
1561
|
-
modules?: Record<string, string>;
|
|
1562
|
-
deps?: Set<string>;
|
|
1563
|
-
}>;
|
|
1564
|
-
resolveUrl: (url: string, importer?: string) => MaybePromise<string | undefined>;
|
|
1565
|
-
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1566
|
-
}
|
|
1567
|
-
interface BindingViteCssPostPluginConfig {
|
|
1568
|
-
root: string;
|
|
1569
|
-
isLib: boolean;
|
|
1570
|
-
isSsr: boolean;
|
|
1571
|
-
isWorker: boolean;
|
|
1572
|
-
isClient: boolean;
|
|
1573
|
-
cssCodeSplit: boolean;
|
|
1574
|
-
sourcemap: boolean;
|
|
1575
|
-
assetsDir: string;
|
|
1576
|
-
urlBase: string;
|
|
1577
|
-
decodedBase: string;
|
|
1578
|
-
libCssFilename?: string;
|
|
1579
|
-
isLegacy?: (args: BindingNormalizedOptions) => boolean;
|
|
1580
|
-
cssMinify?: (css: string, inline: boolean) => Promise<string>;
|
|
1581
|
-
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1582
|
-
cssScopeTo: () => Record<string, readonly [string, string | undefined]>;
|
|
1583
|
-
}
|
|
1584
1525
|
interface BindingViteDynamicImportVarsPluginConfig {
|
|
1585
1526
|
include?: Array<BindingStringOrRegex>;
|
|
1586
1527
|
exclude?: Array<BindingStringOrRegex>;
|
|
@@ -1590,23 +1531,6 @@ interface BindingViteDynamicImportVarsPluginConfig {
|
|
|
1590
1531
|
interface BindingViteDynamicImportVarsPluginV2Config {
|
|
1591
1532
|
sourcemap: boolean;
|
|
1592
1533
|
}
|
|
1593
|
-
interface BindingViteHtmlInlineProxyPluginConfig {
|
|
1594
|
-
root: string;
|
|
1595
|
-
}
|
|
1596
|
-
interface BindingViteHtmlPluginConfig {
|
|
1597
|
-
root: string;
|
|
1598
|
-
isLib: boolean;
|
|
1599
|
-
isSsr: boolean;
|
|
1600
|
-
urlBase: string;
|
|
1601
|
-
publicDir: string;
|
|
1602
|
-
decodedBase: string;
|
|
1603
|
-
cssCodeSplit: boolean;
|
|
1604
|
-
modulePreload: false | BindingModulePreloadOptions;
|
|
1605
|
-
assetInlineLimit: number | ((file: string, content: Buffer) => boolean | undefined);
|
|
1606
|
-
renderBuiltUrl?: (filename: string, type: BindingRenderBuiltUrlConfig) => undefined | string | BindingRenderBuiltUrlRet;
|
|
1607
|
-
transformIndexHtml: (html: string, path: string, filename: string, hook: 'transform' | 'generateBundle', output?: BindingOutputs, chunk?: BindingOutputChunk) => Promise<string>;
|
|
1608
|
-
setModuleSideEffects: (id: string) => void;
|
|
1609
|
-
}
|
|
1610
1534
|
interface BindingViteImportGlobPluginConfig {
|
|
1611
1535
|
root?: string;
|
|
1612
1536
|
restoreQueryExtension?: boolean;
|
|
@@ -1730,4 +1654,4 @@ interface PreRenderedChunk {
|
|
|
1730
1654
|
exports: Array<string>;
|
|
1731
1655
|
}
|
|
1732
1656
|
//#endregion
|
|
1733
|
-
export {
|
|
1657
|
+
export { MinifyResult as A, isolatedDeclaration as B, BindingWatcherBundler as C, IsolatedDeclarationsResult as D, IsolatedDeclarationsOptions as E, ResolveResult as F, transform as G, minify as H, ResolverFactory as I, transformSync as K, TransformOptions as L, ParseResult as M, ParserOptions as N, JsxOptions as O, PreRenderedChunk as P, TransformResult as R, BindingViteWasmHelperPluginConfig as S, ExternalMemoryStatus as T, minifySync as U, isolatedDeclarationSync as V, moduleRunnerTransform as W, BindingViteModulePreloadPolyfillPluginConfig as _, BindingHookResolveIdExtraArgs as a, BindingViteResolvePluginConfig as b, BindingRebuildStrategy as c, BindingTransformHookExtraArgs as d, BindingViteBuildImportAnalysisPluginConfig as f, BindingViteManifestPluginConfig as g, BindingViteJsonPluginConfig as h, BindingEsmExternalRequirePluginConfig as i, NapiResolveOptions as j, MinifyOptions as k, BindingRenderedChunk as l, BindingViteImportGlobPluginConfig as m, BindingBundleState as n, BindingIsolatedDeclarationPluginConfig as o, BindingViteDynamicImportVarsPluginConfig as p, BindingClientHmrUpdate as r, BindingMagicString as s, BindingBuiltinPluginName as t, BindingReplacePluginConfig as u, BindingViteReactRefreshWrapperPluginConfig as v, BindingWatcherEvent as w, BindingViteTransformPluginConfig as x, BindingViteReporterPluginConfig as y, createTokioRuntime as z };
|