rolldown 1.0.0-beta.9-commit.d91dfb5 → 1.0.0-beta.9-commit.273d50e
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.cjs +5 -5
- package/dist/cli.mjs +46 -57
- package/dist/config.cjs +3 -3
- package/dist/config.d.cts +2 -2
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +4 -5
- package/dist/experimental-index.cjs +2 -2
- package/dist/experimental-index.d.cts +2 -2
- package/dist/experimental-index.d.mts +2 -2
- package/dist/experimental-index.mjs +3 -4
- package/dist/filter-index.d.cts +2 -2
- package/dist/filter-index.d.mts +2 -2
- package/dist/filter-index.mjs +1 -2
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/parallel-plugin-worker.cjs +2 -2
- package/dist/parallel-plugin-worker.mjs +3 -3
- package/dist/parallel-plugin.d.cts +2 -2
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.cjs +1 -1
- package/dist/parse-ast-index.d.cts +1 -1
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/shared/{binding.d-B9SSHAER.d.mts → binding.d-D3r4zbxz.d.mts} +6 -9
- package/dist/shared/{binding.d-CrH1UT-g.d.cts → binding.d-p8euY1Wh.d.cts} +6 -9
- package/dist/shared/{define-config.d-CUCXQ5Qr.d.mts → define-config.d-CPoyfJeO.d.mts} +5 -15
- package/dist/shared/{define-config.d-2mCqGCzl.d.cts → define-config.d-DsyTAkf3.d.cts} +5 -15
- package/dist/shared/{load-config-D6Rgj8MR.mjs → load-config-BK3hMJOe.mjs} +1 -1
- package/dist/shared/{load-config-BPPSpnzp.cjs → load-config-GL1xItfo.cjs} +1 -1
- package/dist/shared/{misc-DGAe2XOW.mjs → misc-F8g_dc1D.mjs} +1 -4
- package/dist/shared/{parse-ast-index-BloqIIaY.mjs → parse-ast-index-Bnh8Dob0.mjs} +5 -14
- package/dist/shared/{parse-ast-index-BAVp-hzy.cjs → parse-ast-index-Cn_efzjO.cjs} +2 -1
- package/dist/shared/{src-DgKqmPhz.mjs → src-CG2mUfiN.mjs} +180 -573
- package/dist/shared/{src-WmbJgr9s.cjs → src-ndIZkCCf.cjs} +22 -41
- package/package.json +19 -19
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingHmrOutput, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding.d-
|
|
1
|
+
import { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingHmrOutput, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingRemote, BindingRenderedChunk, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding.d-p8euY1Wh.cjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
@@ -282,7 +282,6 @@ interface OutputOptions {
|
|
|
282
282
|
legalComments?: "none" | "inline";
|
|
283
283
|
plugins?: RolldownOutputPluginOption;
|
|
284
284
|
polyfillRequire?: boolean;
|
|
285
|
-
target?: string | string[];
|
|
286
285
|
hoistTransitiveImports?: false;
|
|
287
286
|
preserveModules?: boolean;
|
|
288
287
|
virtualDirname?: string;
|
|
@@ -893,18 +892,9 @@ interface ChecksOptions {
|
|
|
893
892
|
//#endregion
|
|
894
893
|
//#region src/options/input-options.d.ts
|
|
895
894
|
type InputOption = string | string[] | Record<string, string>;
|
|
896
|
-
type OxcTransformOption = Omit<TransformOptions, "sourceType" | "lang" | "cwd" | "sourcemap" | "
|
|
895
|
+
type OxcTransformOption = Omit<TransformOptions, "sourceType" | "lang" | "cwd" | "sourcemap" | "define" | "inject">;
|
|
897
896
|
type ExternalOption = StringOrRegExp | StringOrRegExp[] | ((id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>);
|
|
898
897
|
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css" | "asset">;
|
|
899
|
-
interface JsxOptions {
|
|
900
|
-
mode?: "classic" | "automatic" | "preserve";
|
|
901
|
-
factory?: string;
|
|
902
|
-
fragment?: string;
|
|
903
|
-
importSource?: string;
|
|
904
|
-
jsxImportSource?: string;
|
|
905
|
-
refresh?: boolean;
|
|
906
|
-
development?: boolean;
|
|
907
|
-
}
|
|
908
898
|
interface WatcherOptions {
|
|
909
899
|
skipWrite?: boolean;
|
|
910
900
|
buildDelay?: number;
|
|
@@ -1050,9 +1040,9 @@ interface InputOptions {
|
|
|
1050
1040
|
* - `"react"` enables the `classic` JSX transformer.
|
|
1051
1041
|
* - `"react-jsx"` enables the `automatic` JSX transformer.
|
|
1052
1042
|
*
|
|
1053
|
-
* @default
|
|
1043
|
+
* @default runtime = "automatic"
|
|
1054
1044
|
*/
|
|
1055
|
-
jsx?: false | "react" | "react-jsx" | "preserve"
|
|
1045
|
+
jsx?: false | "react" | "react-jsx" | "preserve";
|
|
1056
1046
|
transform?: OxcTransformOption;
|
|
1057
1047
|
watch?: WatcherOptions | false;
|
|
1058
1048
|
dropLabels?: string[];
|
|
@@ -1087,4 +1077,4 @@ declare function defineConfig(config: RolldownOptions[]): RolldownOptions[];
|
|
|
1087
1077
|
declare function defineConfig(config: ConfigExport): ConfigExport;
|
|
1088
1078
|
|
|
1089
1079
|
//#endregion
|
|
1090
|
-
export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat,
|
|
1080
|
+
export { AddonFunction, AsyncPluginHooks, BuildOptions, BuiltinPlugin, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MaybePromise, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, assetPlugin, build, buildImportAnalysisPlugin, defineConfig, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reporterPlugin, rolldown, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin, withFilter };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __esm } from "./chunk--iN_1bjD.mjs";
|
|
2
|
-
import { init_rolldown, rolldown } from "./src-
|
|
2
|
+
import { init_rolldown, rolldown } from "./src-CG2mUfiN.mjs";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./src-
|
|
2
|
+
const require_src = require('./src-ndIZkCCf.cjs');
|
|
3
3
|
const node_fs = require_chunk.__toESM(require("node:fs"));
|
|
4
4
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
5
5
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { __esm } from "./chunk--iN_1bjD.mjs";
|
|
2
|
-
|
|
3
1
|
//#region src/utils/misc.ts
|
|
4
2
|
function arraify(value) {
|
|
5
3
|
return Array.isArray(value) ? value : [value];
|
|
@@ -22,7 +20,6 @@ function unsupported(info) {
|
|
|
22
20
|
throw new Error(`UNSUPPORTED: ${info}`);
|
|
23
21
|
}
|
|
24
22
|
function noop(..._args) {}
|
|
25
|
-
var init_misc = __esm({ "src/utils/misc.ts"() {} });
|
|
26
23
|
|
|
27
24
|
//#endregion
|
|
28
|
-
export { arraify,
|
|
25
|
+
export { arraify, isNullish, isPromiseLike, noop, unimplemented, unreachable, unsupported };
|
|
@@ -351,6 +351,7 @@ var require_binding = __commonJS({ "src/binding.js"(exports, module) {
|
|
|
351
351
|
module.exports.ResolverFactory = nativeBinding.ResolverFactory;
|
|
352
352
|
module.exports.BindingBuiltinPluginName = nativeBinding.BindingBuiltinPluginName;
|
|
353
353
|
module.exports.BindingHookSideEffects = nativeBinding.BindingHookSideEffects;
|
|
354
|
+
module.exports.BindingJsx = nativeBinding.BindingJsx;
|
|
354
355
|
module.exports.BindingLogLevel = nativeBinding.BindingLogLevel;
|
|
355
356
|
module.exports.BindingPluginOrder = nativeBinding.BindingPluginOrder;
|
|
356
357
|
module.exports.EnforceExtension = nativeBinding.EnforceExtension;
|
|
@@ -385,6 +386,9 @@ function spaces(index) {
|
|
|
385
386
|
function tabsToSpaces(value) {
|
|
386
387
|
return value.replace(/^\t+/, (match) => match.split(" ").join(" "));
|
|
387
388
|
}
|
|
389
|
+
const LINE_TRUNCATE_LENGTH = 120;
|
|
390
|
+
const MIN_CHARACTERS_SHOWN_AFTER_LOCATION = 10;
|
|
391
|
+
const ELLIPSIS = "...";
|
|
388
392
|
function getCodeFrame(source, line, column) {
|
|
389
393
|
let lines = source.split("\n");
|
|
390
394
|
if (line > lines.length) return "";
|
|
@@ -410,12 +414,6 @@ function getCodeFrame(source, line, column) {
|
|
|
410
414
|
return `${lineNumber}: ${displayedLine}`;
|
|
411
415
|
}).join("\n");
|
|
412
416
|
}
|
|
413
|
-
var LINE_TRUNCATE_LENGTH, MIN_CHARACTERS_SHOWN_AFTER_LOCATION, ELLIPSIS;
|
|
414
|
-
var init_code_frame = __esm({ "src/utils/code-frame.ts"() {
|
|
415
|
-
LINE_TRUNCATE_LENGTH = 120;
|
|
416
|
-
MIN_CHARACTERS_SHOWN_AFTER_LOCATION = 10;
|
|
417
|
-
ELLIPSIS = "...";
|
|
418
|
-
} });
|
|
419
417
|
|
|
420
418
|
//#endregion
|
|
421
419
|
//#region src/log/locate-character/index.js
|
|
@@ -477,7 +475,6 @@ function getLocator(source, options = {}) {
|
|
|
477
475
|
function locate(source, search, options) {
|
|
478
476
|
return getLocator(source, options)(search, options && options.startIndex);
|
|
479
477
|
}
|
|
480
|
-
var init_locate_character = __esm({ "src/log/locate-character/index.js"() {} });
|
|
481
478
|
|
|
482
479
|
//#endregion
|
|
483
480
|
//#region src/log/logs.ts
|
|
@@ -559,13 +556,11 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
559
556
|
}
|
|
560
557
|
var INVALID_LOG_POSITION, PLUGIN_ERROR, INPUT_HOOK_IN_OUTPUT_PLUGIN, CYCLE_LOADING, MULTIPLY_NOTIFY_OPTION, PARSE_ERROR;
|
|
561
558
|
var init_logs = __esm({ "src/log/logs.ts"() {
|
|
562
|
-
init_code_frame();
|
|
563
|
-
init_locate_character();
|
|
564
559
|
INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR";
|
|
565
560
|
} });
|
|
566
561
|
|
|
567
562
|
//#endregion
|
|
568
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
563
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.72.0/node_modules/oxc-parser/wrap.mjs
|
|
569
564
|
function wrap$1(result) {
|
|
570
565
|
let program, module$1, comments, errors;
|
|
571
566
|
return {
|
|
@@ -600,7 +595,6 @@ function applyFix(program, fixPath) {
|
|
|
600
595
|
node.value = RegExp(node.regex.pattern, node.regex.flags);
|
|
601
596
|
} catch (_err) {}
|
|
602
597
|
}
|
|
603
|
-
var init_wrap = __esm({ "../../node_modules/.pnpm/oxc-parser@0.71.0/node_modules/oxc-parser/wrap.mjs"() {} });
|
|
604
598
|
|
|
605
599
|
//#endregion
|
|
606
600
|
//#region src/parse-ast-index.ts
|
|
@@ -640,10 +634,7 @@ async function parseAstAsync(sourceText, options, filename) {
|
|
|
640
634
|
var import_binding, defaultParserOptions;
|
|
641
635
|
var init_parse_ast_index = __esm({ "src/parse-ast-index.ts"() {
|
|
642
636
|
import_binding = __toESM(require_binding());
|
|
643
|
-
init_locate_character();
|
|
644
637
|
init_logs();
|
|
645
|
-
init_code_frame();
|
|
646
|
-
init_wrap();
|
|
647
638
|
defaultParserOptions = {
|
|
648
639
|
lang: "js",
|
|
649
640
|
preserveParens: false
|
|
@@ -351,6 +351,7 @@ var require_binding = require_chunk.__commonJS({ "src/binding.js"(exports, modul
|
|
|
351
351
|
module.exports.ResolverFactory = nativeBinding.ResolverFactory;
|
|
352
352
|
module.exports.BindingBuiltinPluginName = nativeBinding.BindingBuiltinPluginName;
|
|
353
353
|
module.exports.BindingHookSideEffects = nativeBinding.BindingHookSideEffects;
|
|
354
|
+
module.exports.BindingJsx = nativeBinding.BindingJsx;
|
|
354
355
|
module.exports.BindingLogLevel = nativeBinding.BindingLogLevel;
|
|
355
356
|
module.exports.BindingPluginOrder = nativeBinding.BindingPluginOrder;
|
|
356
357
|
module.exports.EnforceExtension = nativeBinding.EnforceExtension;
|
|
@@ -556,7 +557,7 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
556
557
|
}
|
|
557
558
|
|
|
558
559
|
//#endregion
|
|
559
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
560
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.72.0/node_modules/oxc-parser/wrap.mjs
|
|
560
561
|
function wrap$1(result) {
|
|
561
562
|
let program, module$1, comments, errors;
|
|
562
563
|
return {
|