rolldown 1.0.0-beta.10-commit.174c548 → 1.0.0-beta.11
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 +3 -3
- package/dist/cli.mjs +3 -3
- package/dist/config.cjs +3 -3
- package/dist/config.d.cts +2 -2
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +3 -3
- 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 +2 -2
- package/dist/filter-index.d.cts +2 -2
- package/dist/filter-index.d.mts +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/parallel-plugin-worker.cjs +2 -2
- package/dist/parallel-plugin-worker.mjs +2 -2
- 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-BYafUgFF.d.cts → binding-B_dRhqIG.d.cts} +1506 -1525
- package/dist/shared/{binding-CHPrEDXp.d.mts → binding-DTvNTuqj.d.mts} +1506 -1525
- package/dist/shared/{define-config-BL025qn5.d.mts → define-config-B0QE1WB_.d.cts} +2 -2
- package/dist/shared/{define-config-BetvTt9D.d.cts → define-config-DQdGW4Nz.d.mts} +2 -2
- package/dist/shared/{load-config-BYNxN4-l.mjs → load-config-DGi1XIvO.mjs} +1 -1
- package/dist/shared/{load-config-DWdmvHuq.cjs → load-config-DkEgW4Zd.cjs} +1 -1
- package/dist/shared/{parse-ast-index-D7OUxwJp.cjs → parse-ast-index-Cuw1ssCX.cjs} +20 -20
- package/dist/shared/{parse-ast-index-BkTjw5qC.mjs → parse-ast-index-ivqsbL-R.mjs} +20 -20
- package/dist/shared/{src-CH08hUyG.cjs → src-Bzms56_9.cjs} +30 -12
- package/dist/shared/{src-Dy1CUrVb.mjs → src-DhxNQlne.mjs} +30 -12
- package/package.json +17 -17
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
2
|
-
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
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-B_dRhqIG.cjs";
|
|
3
2
|
import { Program } from "@oxc-project/types";
|
|
3
|
+
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
5
5
|
//#region src/log/logging.d.ts
|
|
6
6
|
type LogLevel = "info" | "debug" | "warn";
|
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
2
|
-
import { Program } from "@oxc-project/types";
|
|
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-DTvNTuqj.mjs";
|
|
3
2
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
3
|
+
import { Program } from "@oxc-project/types";
|
|
4
4
|
|
|
5
5
|
//#region src/log/logging.d.ts
|
|
6
6
|
type LogLevel = "info" | "debug" | "warn";
|
|
@@ -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-DhxNQlne.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-Bzms56_9.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"));
|
|
@@ -328,6 +328,26 @@ var require_binding = require_chunk.__commonJS({ "src/binding.js"(exports, modul
|
|
|
328
328
|
throw new Error(`Failed to load native binding`);
|
|
329
329
|
}
|
|
330
330
|
module.exports = nativeBinding;
|
|
331
|
+
module.exports.Severity = nativeBinding.Severity;
|
|
332
|
+
module.exports.ParseResult = nativeBinding.ParseResult;
|
|
333
|
+
module.exports.ExportExportNameKind = nativeBinding.ExportExportNameKind;
|
|
334
|
+
module.exports.ExportImportNameKind = nativeBinding.ExportImportNameKind;
|
|
335
|
+
module.exports.ExportLocalNameKind = nativeBinding.ExportLocalNameKind;
|
|
336
|
+
module.exports.getBufferOffset = nativeBinding.getBufferOffset;
|
|
337
|
+
module.exports.ImportNameKind = nativeBinding.ImportNameKind;
|
|
338
|
+
module.exports.parseAsync = nativeBinding.parseAsync;
|
|
339
|
+
module.exports.parseAsyncRaw = nativeBinding.parseAsyncRaw;
|
|
340
|
+
module.exports.parseSync = nativeBinding.parseSync;
|
|
341
|
+
module.exports.parseSyncRaw = nativeBinding.parseSyncRaw;
|
|
342
|
+
module.exports.rawTransferSupported = nativeBinding.rawTransferSupported;
|
|
343
|
+
module.exports.ResolverFactory = nativeBinding.ResolverFactory;
|
|
344
|
+
module.exports.EnforceExtension = nativeBinding.EnforceExtension;
|
|
345
|
+
module.exports.ModuleType = nativeBinding.ModuleType;
|
|
346
|
+
module.exports.sync = nativeBinding.sync;
|
|
347
|
+
module.exports.HelperMode = nativeBinding.HelperMode;
|
|
348
|
+
module.exports.isolatedDeclaration = nativeBinding.isolatedDeclaration;
|
|
349
|
+
module.exports.moduleRunnerTransform = nativeBinding.moduleRunnerTransform;
|
|
350
|
+
module.exports.transform = nativeBinding.transform;
|
|
331
351
|
module.exports.BindingBundleEndEventData = nativeBinding.BindingBundleEndEventData;
|
|
332
352
|
module.exports.BindingBundleErrorEventData = nativeBinding.BindingBundleErrorEventData;
|
|
333
353
|
module.exports.BindingCallableBuiltinPlugin = nativeBinding.BindingCallableBuiltinPlugin;
|
|
@@ -347,35 +367,15 @@ var require_binding = require_chunk.__commonJS({ "src/binding.js"(exports, modul
|
|
|
347
367
|
module.exports.BindingWatcherEvent = nativeBinding.BindingWatcherEvent;
|
|
348
368
|
module.exports.Bundler = nativeBinding.Bundler;
|
|
349
369
|
module.exports.ParallelJsPluginRegistry = nativeBinding.ParallelJsPluginRegistry;
|
|
350
|
-
module.exports.ParseResult = nativeBinding.ParseResult;
|
|
351
|
-
module.exports.ResolverFactory = nativeBinding.ResolverFactory;
|
|
352
370
|
module.exports.BindingBuiltinPluginName = nativeBinding.BindingBuiltinPluginName;
|
|
353
371
|
module.exports.BindingHookSideEffects = nativeBinding.BindingHookSideEffects;
|
|
354
372
|
module.exports.BindingJsx = nativeBinding.BindingJsx;
|
|
355
373
|
module.exports.BindingLogLevel = nativeBinding.BindingLogLevel;
|
|
356
374
|
module.exports.BindingPluginOrder = nativeBinding.BindingPluginOrder;
|
|
357
|
-
module.exports.EnforceExtension = nativeBinding.EnforceExtension;
|
|
358
|
-
module.exports.ExportExportNameKind = nativeBinding.ExportExportNameKind;
|
|
359
|
-
module.exports.ExportImportNameKind = nativeBinding.ExportImportNameKind;
|
|
360
|
-
module.exports.ExportLocalNameKind = nativeBinding.ExportLocalNameKind;
|
|
361
375
|
module.exports.FilterTokenKind = nativeBinding.FilterTokenKind;
|
|
362
|
-
module.exports.getBufferOffset = nativeBinding.getBufferOffset;
|
|
363
|
-
module.exports.HelperMode = nativeBinding.HelperMode;
|
|
364
|
-
module.exports.ImportNameKind = nativeBinding.ImportNameKind;
|
|
365
|
-
module.exports.isolatedDeclaration = nativeBinding.isolatedDeclaration;
|
|
366
|
-
module.exports.moduleRunnerTransform = nativeBinding.moduleRunnerTransform;
|
|
367
|
-
module.exports.ModuleType = nativeBinding.ModuleType;
|
|
368
|
-
module.exports.parseAsync = nativeBinding.parseAsync;
|
|
369
|
-
module.exports.parseAsyncRaw = nativeBinding.parseAsyncRaw;
|
|
370
|
-
module.exports.parseSync = nativeBinding.parseSync;
|
|
371
|
-
module.exports.parseSyncRaw = nativeBinding.parseSyncRaw;
|
|
372
|
-
module.exports.rawTransferSupported = nativeBinding.rawTransferSupported;
|
|
373
376
|
module.exports.registerPlugins = nativeBinding.registerPlugins;
|
|
374
|
-
module.exports.Severity = nativeBinding.Severity;
|
|
375
377
|
module.exports.shutdownAsyncRuntime = nativeBinding.shutdownAsyncRuntime;
|
|
376
378
|
module.exports.startAsyncRuntime = nativeBinding.startAsyncRuntime;
|
|
377
|
-
module.exports.sync = nativeBinding.sync;
|
|
378
|
-
module.exports.transform = nativeBinding.transform;
|
|
379
379
|
} });
|
|
380
380
|
|
|
381
381
|
//#endregion
|
|
@@ -328,6 +328,26 @@ var require_binding = __commonJS({ "src/binding.js"(exports, module) {
|
|
|
328
328
|
throw new Error(`Failed to load native binding`);
|
|
329
329
|
}
|
|
330
330
|
module.exports = nativeBinding;
|
|
331
|
+
module.exports.Severity = nativeBinding.Severity;
|
|
332
|
+
module.exports.ParseResult = nativeBinding.ParseResult;
|
|
333
|
+
module.exports.ExportExportNameKind = nativeBinding.ExportExportNameKind;
|
|
334
|
+
module.exports.ExportImportNameKind = nativeBinding.ExportImportNameKind;
|
|
335
|
+
module.exports.ExportLocalNameKind = nativeBinding.ExportLocalNameKind;
|
|
336
|
+
module.exports.getBufferOffset = nativeBinding.getBufferOffset;
|
|
337
|
+
module.exports.ImportNameKind = nativeBinding.ImportNameKind;
|
|
338
|
+
module.exports.parseAsync = nativeBinding.parseAsync;
|
|
339
|
+
module.exports.parseAsyncRaw = nativeBinding.parseAsyncRaw;
|
|
340
|
+
module.exports.parseSync = nativeBinding.parseSync;
|
|
341
|
+
module.exports.parseSyncRaw = nativeBinding.parseSyncRaw;
|
|
342
|
+
module.exports.rawTransferSupported = nativeBinding.rawTransferSupported;
|
|
343
|
+
module.exports.ResolverFactory = nativeBinding.ResolverFactory;
|
|
344
|
+
module.exports.EnforceExtension = nativeBinding.EnforceExtension;
|
|
345
|
+
module.exports.ModuleType = nativeBinding.ModuleType;
|
|
346
|
+
module.exports.sync = nativeBinding.sync;
|
|
347
|
+
module.exports.HelperMode = nativeBinding.HelperMode;
|
|
348
|
+
module.exports.isolatedDeclaration = nativeBinding.isolatedDeclaration;
|
|
349
|
+
module.exports.moduleRunnerTransform = nativeBinding.moduleRunnerTransform;
|
|
350
|
+
module.exports.transform = nativeBinding.transform;
|
|
331
351
|
module.exports.BindingBundleEndEventData = nativeBinding.BindingBundleEndEventData;
|
|
332
352
|
module.exports.BindingBundleErrorEventData = nativeBinding.BindingBundleErrorEventData;
|
|
333
353
|
module.exports.BindingCallableBuiltinPlugin = nativeBinding.BindingCallableBuiltinPlugin;
|
|
@@ -347,35 +367,15 @@ var require_binding = __commonJS({ "src/binding.js"(exports, module) {
|
|
|
347
367
|
module.exports.BindingWatcherEvent = nativeBinding.BindingWatcherEvent;
|
|
348
368
|
module.exports.Bundler = nativeBinding.Bundler;
|
|
349
369
|
module.exports.ParallelJsPluginRegistry = nativeBinding.ParallelJsPluginRegistry;
|
|
350
|
-
module.exports.ParseResult = nativeBinding.ParseResult;
|
|
351
|
-
module.exports.ResolverFactory = nativeBinding.ResolverFactory;
|
|
352
370
|
module.exports.BindingBuiltinPluginName = nativeBinding.BindingBuiltinPluginName;
|
|
353
371
|
module.exports.BindingHookSideEffects = nativeBinding.BindingHookSideEffects;
|
|
354
372
|
module.exports.BindingJsx = nativeBinding.BindingJsx;
|
|
355
373
|
module.exports.BindingLogLevel = nativeBinding.BindingLogLevel;
|
|
356
374
|
module.exports.BindingPluginOrder = nativeBinding.BindingPluginOrder;
|
|
357
|
-
module.exports.EnforceExtension = nativeBinding.EnforceExtension;
|
|
358
|
-
module.exports.ExportExportNameKind = nativeBinding.ExportExportNameKind;
|
|
359
|
-
module.exports.ExportImportNameKind = nativeBinding.ExportImportNameKind;
|
|
360
|
-
module.exports.ExportLocalNameKind = nativeBinding.ExportLocalNameKind;
|
|
361
375
|
module.exports.FilterTokenKind = nativeBinding.FilterTokenKind;
|
|
362
|
-
module.exports.getBufferOffset = nativeBinding.getBufferOffset;
|
|
363
|
-
module.exports.HelperMode = nativeBinding.HelperMode;
|
|
364
|
-
module.exports.ImportNameKind = nativeBinding.ImportNameKind;
|
|
365
|
-
module.exports.isolatedDeclaration = nativeBinding.isolatedDeclaration;
|
|
366
|
-
module.exports.moduleRunnerTransform = nativeBinding.moduleRunnerTransform;
|
|
367
|
-
module.exports.ModuleType = nativeBinding.ModuleType;
|
|
368
|
-
module.exports.parseAsync = nativeBinding.parseAsync;
|
|
369
|
-
module.exports.parseAsyncRaw = nativeBinding.parseAsyncRaw;
|
|
370
|
-
module.exports.parseSync = nativeBinding.parseSync;
|
|
371
|
-
module.exports.parseSyncRaw = nativeBinding.parseSyncRaw;
|
|
372
|
-
module.exports.rawTransferSupported = nativeBinding.rawTransferSupported;
|
|
373
376
|
module.exports.registerPlugins = nativeBinding.registerPlugins;
|
|
374
|
-
module.exports.Severity = nativeBinding.Severity;
|
|
375
377
|
module.exports.shutdownAsyncRuntime = nativeBinding.shutdownAsyncRuntime;
|
|
376
378
|
module.exports.startAsyncRuntime = nativeBinding.startAsyncRuntime;
|
|
377
|
-
module.exports.sync = nativeBinding.sync;
|
|
378
|
-
module.exports.transform = nativeBinding.transform;
|
|
379
379
|
} });
|
|
380
380
|
|
|
381
381
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_parse_ast_index = require('./parse-ast-index-
|
|
2
|
+
const require_parse_ast_index = require('./parse-ast-index-Cuw1ssCX.cjs');
|
|
3
3
|
const require_misc = require('./misc-BKp5iIef.cjs');
|
|
4
4
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
5
5
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
@@ -9,7 +9,7 @@ const node_os = require_chunk.__toESM(require("node:os"));
|
|
|
9
9
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "1.0.0-beta.
|
|
12
|
+
var version = "1.0.0-beta.11";
|
|
13
13
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
@@ -2005,6 +2005,7 @@ const InputOptionsSchema = strictObject({
|
|
|
2005
2005
|
input: optional(InputOptionSchema),
|
|
2006
2006
|
plugins: optional(custom(() => true)),
|
|
2007
2007
|
external: optional(ExternalSchema),
|
|
2008
|
+
makeAbsoluteExternalsRelative: optional(union([boolean(), literal("ifRelativeSource")])),
|
|
2008
2009
|
resolve: optional(ResolveOptionsSchema),
|
|
2009
2010
|
cwd: pipe(optional(string()), description("Current working directory")),
|
|
2010
2011
|
platform: pipe(optional(union([
|
|
@@ -2048,6 +2049,7 @@ const InputCliOverrideSchema = strictObject({
|
|
|
2048
2049
|
external: pipe(optional(array(string())), description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
|
|
2049
2050
|
inject: pipe(optional(record(string(), string())), description("Inject import statements on demand")),
|
|
2050
2051
|
treeshake: pipe(optional(boolean()), description("enable treeshaking")),
|
|
2052
|
+
makeAbsoluteExternalsRelative: pipe(optional(boolean()), description("Prevent normalization of external imports")),
|
|
2051
2053
|
jsx: pipe(optional(union([
|
|
2052
2054
|
literal(false),
|
|
2053
2055
|
literal("react"),
|
|
@@ -2757,7 +2759,7 @@ function bindingifyResolveId(args$1) {
|
|
|
2757
2759
|
};
|
|
2758
2760
|
if (typeof ret === "string") return {
|
|
2759
2761
|
id: ret,
|
|
2760
|
-
normalizeExternalId:
|
|
2762
|
+
normalizeExternalId: false
|
|
2761
2763
|
};
|
|
2762
2764
|
let exist = args$1.pluginContextData.updateModuleOption(ret.id, {
|
|
2763
2765
|
meta: ret.meta || {},
|
|
@@ -3236,12 +3238,26 @@ function handleOutputErrors(output) {
|
|
|
3236
3238
|
const rawErrors = output.errors;
|
|
3237
3239
|
if (rawErrors.length > 0) throw normalizeErrors(rawErrors);
|
|
3238
3240
|
}
|
|
3239
|
-
function transformToOutputBundle(output, changed) {
|
|
3241
|
+
function transformToOutputBundle(context, output, changed) {
|
|
3240
3242
|
const bundle = Object.fromEntries(transformToRollupOutput(output, changed).output.map((item) => [item.fileName, item]));
|
|
3241
|
-
return new Proxy(bundle, {
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3243
|
+
return new Proxy(bundle, {
|
|
3244
|
+
set(_target, _p, _newValue, _receiver) {
|
|
3245
|
+
const originalStackTraceLimit = Error.stackTraceLimit;
|
|
3246
|
+
Error.stackTraceLimit = 2;
|
|
3247
|
+
const message = "This plugin assigns to bundle variable. This is discouraged by Rollup and is not supported by Rolldown. This will be ignored.";
|
|
3248
|
+
const stack = new Error(message).stack ?? message;
|
|
3249
|
+
Error.stackTraceLimit = originalStackTraceLimit;
|
|
3250
|
+
context.warn({
|
|
3251
|
+
message: stack,
|
|
3252
|
+
code: "UNSUPPORTED_BUNDLE_ASSIGNMENT"
|
|
3253
|
+
});
|
|
3254
|
+
return true;
|
|
3255
|
+
},
|
|
3256
|
+
deleteProperty(target, property) {
|
|
3257
|
+
if (typeof property === "string") changed.deleted.add(property);
|
|
3258
|
+
return true;
|
|
3259
|
+
}
|
|
3260
|
+
});
|
|
3245
3261
|
}
|
|
3246
3262
|
function collectChangedBundle(changed, bundle) {
|
|
3247
3263
|
const assets = [];
|
|
@@ -3344,8 +3360,9 @@ function bindingifyGenerateBundle(args$1) {
|
|
|
3344
3360
|
updated: /* @__PURE__ */ new Set(),
|
|
3345
3361
|
deleted: /* @__PURE__ */ new Set()
|
|
3346
3362
|
};
|
|
3347
|
-
const
|
|
3348
|
-
|
|
3363
|
+
const context = new PluginContextImpl(args$1.outputOptions, ctx, args$1.plugin, args$1.pluginContextData, args$1.onLog, args$1.logLevel, args$1.watchMode);
|
|
3364
|
+
const output = transformToOutputBundle(context, bundle, changed);
|
|
3365
|
+
await handler.call(context, new NormalizedOutputOptionsImpl(opts, args$1.outputOptions, args$1.normalizedOutputPlugins), output, isWrite);
|
|
3349
3366
|
return collectChangedBundle(changed, output);
|
|
3350
3367
|
},
|
|
3351
3368
|
meta: bindingifyPluginHookMeta(meta)
|
|
@@ -3361,8 +3378,9 @@ function bindingifyWriteBundle(args$1) {
|
|
|
3361
3378
|
updated: /* @__PURE__ */ new Set(),
|
|
3362
3379
|
deleted: /* @__PURE__ */ new Set()
|
|
3363
3380
|
};
|
|
3364
|
-
const
|
|
3365
|
-
|
|
3381
|
+
const context = new PluginContextImpl(args$1.outputOptions, ctx, args$1.plugin, args$1.pluginContextData, args$1.onLog, args$1.logLevel, args$1.watchMode);
|
|
3382
|
+
const output = transformToOutputBundle(context, bundle, changed);
|
|
3383
|
+
await handler.call(context, new NormalizedOutputOptionsImpl(opts, args$1.outputOptions, args$1.normalizedOutputPlugins), output);
|
|
3366
3384
|
return collectChangedBundle(changed, output);
|
|
3367
3385
|
},
|
|
3368
3386
|
meta: bindingifyPluginHookMeta(meta)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __esm, __toESM } from "./chunk--iN_1bjD.mjs";
|
|
2
|
-
import { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst, require_binding } from "./parse-ast-index-
|
|
2
|
+
import { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst, require_binding } from "./parse-ast-index-ivqsbL-R.mjs";
|
|
3
3
|
import { arraify, init_misc, isNullish, noop, unimplemented, unreachable, unsupported } from "./misc-DGAe2XOW.mjs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -9,7 +9,7 @@ import os from "node:os";
|
|
|
9
9
|
import { Worker } from "node:worker_threads";
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "1.0.0-beta.
|
|
12
|
+
var version = "1.0.0-beta.11";
|
|
13
13
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
@@ -2094,6 +2094,7 @@ var init_validator = __esm({ "src/utils/validator.ts"() {
|
|
|
2094
2094
|
input: optional(InputOptionSchema),
|
|
2095
2095
|
plugins: optional(custom(() => true)),
|
|
2096
2096
|
external: optional(ExternalSchema),
|
|
2097
|
+
makeAbsoluteExternalsRelative: optional(union([boolean(), literal("ifRelativeSource")])),
|
|
2097
2098
|
resolve: optional(ResolveOptionsSchema),
|
|
2098
2099
|
cwd: pipe(optional(string()), description("Current working directory")),
|
|
2099
2100
|
platform: pipe(optional(union([
|
|
@@ -2137,6 +2138,7 @@ var init_validator = __esm({ "src/utils/validator.ts"() {
|
|
|
2137
2138
|
external: pipe(optional(array(string())), description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
|
|
2138
2139
|
inject: pipe(optional(record(string(), string())), description("Inject import statements on demand")),
|
|
2139
2140
|
treeshake: pipe(optional(boolean()), description("enable treeshaking")),
|
|
2141
|
+
makeAbsoluteExternalsRelative: pipe(optional(boolean()), description("Prevent normalization of external imports")),
|
|
2140
2142
|
jsx: pipe(optional(union([
|
|
2141
2143
|
literal(false),
|
|
2142
2144
|
literal("react"),
|
|
@@ -2860,7 +2862,7 @@ function bindingifyResolveId(args$1) {
|
|
|
2860
2862
|
};
|
|
2861
2863
|
if (typeof ret === "string") return {
|
|
2862
2864
|
id: ret,
|
|
2863
|
-
normalizeExternalId:
|
|
2865
|
+
normalizeExternalId: false
|
|
2864
2866
|
};
|
|
2865
2867
|
let exist = args$1.pluginContextData.updateModuleOption(ret.id, {
|
|
2866
2868
|
meta: ret.meta || {},
|
|
@@ -3366,12 +3368,26 @@ function handleOutputErrors(output) {
|
|
|
3366
3368
|
const rawErrors = output.errors;
|
|
3367
3369
|
if (rawErrors.length > 0) throw normalizeErrors(rawErrors);
|
|
3368
3370
|
}
|
|
3369
|
-
function transformToOutputBundle(output, changed) {
|
|
3371
|
+
function transformToOutputBundle(context, output, changed) {
|
|
3370
3372
|
const bundle = Object.fromEntries(transformToRollupOutput(output, changed).output.map((item) => [item.fileName, item]));
|
|
3371
|
-
return new Proxy(bundle, {
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3373
|
+
return new Proxy(bundle, {
|
|
3374
|
+
set(_target, _p, _newValue, _receiver) {
|
|
3375
|
+
const originalStackTraceLimit = Error.stackTraceLimit;
|
|
3376
|
+
Error.stackTraceLimit = 2;
|
|
3377
|
+
const message = "This plugin assigns to bundle variable. This is discouraged by Rollup and is not supported by Rolldown. This will be ignored.";
|
|
3378
|
+
const stack = new Error(message).stack ?? message;
|
|
3379
|
+
Error.stackTraceLimit = originalStackTraceLimit;
|
|
3380
|
+
context.warn({
|
|
3381
|
+
message: stack,
|
|
3382
|
+
code: "UNSUPPORTED_BUNDLE_ASSIGNMENT"
|
|
3383
|
+
});
|
|
3384
|
+
return true;
|
|
3385
|
+
},
|
|
3386
|
+
deleteProperty(target, property) {
|
|
3387
|
+
if (typeof property === "string") changed.deleted.add(property);
|
|
3388
|
+
return true;
|
|
3389
|
+
}
|
|
3390
|
+
});
|
|
3375
3391
|
}
|
|
3376
3392
|
function collectChangedBundle(changed, bundle) {
|
|
3377
3393
|
const assets = [];
|
|
@@ -3480,8 +3496,9 @@ function bindingifyGenerateBundle(args$1) {
|
|
|
3480
3496
|
updated: /* @__PURE__ */ new Set(),
|
|
3481
3497
|
deleted: /* @__PURE__ */ new Set()
|
|
3482
3498
|
};
|
|
3483
|
-
const
|
|
3484
|
-
|
|
3499
|
+
const context = new PluginContextImpl(args$1.outputOptions, ctx, args$1.plugin, args$1.pluginContextData, args$1.onLog, args$1.logLevel, args$1.watchMode);
|
|
3500
|
+
const output = transformToOutputBundle(context, bundle, changed);
|
|
3501
|
+
await handler.call(context, new NormalizedOutputOptionsImpl(opts, args$1.outputOptions, args$1.normalizedOutputPlugins), output, isWrite);
|
|
3485
3502
|
return collectChangedBundle(changed, output);
|
|
3486
3503
|
},
|
|
3487
3504
|
meta: bindingifyPluginHookMeta(meta)
|
|
@@ -3497,8 +3514,9 @@ function bindingifyWriteBundle(args$1) {
|
|
|
3497
3514
|
updated: /* @__PURE__ */ new Set(),
|
|
3498
3515
|
deleted: /* @__PURE__ */ new Set()
|
|
3499
3516
|
};
|
|
3500
|
-
const
|
|
3501
|
-
|
|
3517
|
+
const context = new PluginContextImpl(args$1.outputOptions, ctx, args$1.plugin, args$1.pluginContextData, args$1.onLog, args$1.logLevel, args$1.watchMode);
|
|
3518
|
+
const output = transformToOutputBundle(context, bundle, changed);
|
|
3519
|
+
await handler.call(context, new NormalizedOutputOptionsImpl(opts, args$1.outputOptions, args$1.normalizedOutputPlugins), output);
|
|
3502
3520
|
return collectChangedBundle(changed, output);
|
|
3503
3521
|
},
|
|
3504
3522
|
meta: bindingifyPluginHookMeta(meta)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.11",
|
|
4
4
|
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"homepage": "https://rolldown.rs/",
|
|
@@ -93,10 +93,10 @@
|
|
|
93
93
|
"@oxc-project/runtime": "=0.72.2",
|
|
94
94
|
"@oxc-project/types": "=0.72.2",
|
|
95
95
|
"ansis": "^4.0.0",
|
|
96
|
-
"@rolldown/pluginutils": "1.0.0-beta.
|
|
96
|
+
"@rolldown/pluginutils": "1.0.0-beta.11"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
|
-
"@napi-rs/cli": "3.0.0-alpha.
|
|
99
|
+
"@napi-rs/cli": "3.0.0-alpha.84",
|
|
100
100
|
"@napi-rs/wasm-runtime": "^0.2.10",
|
|
101
101
|
"@oxc-node/cli": "^0.0.27",
|
|
102
102
|
"@rollup/plugin-json": "^6.1.0",
|
|
@@ -117,22 +117,22 @@
|
|
|
117
117
|
"typedoc": "^0.28.0",
|
|
118
118
|
"typescript": "^5.7.3",
|
|
119
119
|
"valibot": "1.1.0",
|
|
120
|
-
"rolldown": "
|
|
121
|
-
"
|
|
120
|
+
"@rolldown/testing": "0.0.1",
|
|
121
|
+
"rolldown": "1.0.0-beta.11"
|
|
122
122
|
},
|
|
123
123
|
"optionalDependencies": {
|
|
124
|
-
"@rolldown/binding-darwin-
|
|
125
|
-
"@rolldown/binding-darwin-
|
|
126
|
-
"@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.
|
|
127
|
-
"@rolldown/binding-freebsd-x64": "1.0.0-beta.
|
|
128
|
-
"@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.
|
|
129
|
-
"@rolldown/binding-linux-arm64-musl": "1.0.0-beta.
|
|
130
|
-
"@rolldown/binding-linux-x64-
|
|
131
|
-
"@rolldown/binding-
|
|
132
|
-
"@rolldown/binding-wasm32-wasi": "1.0.0-beta.
|
|
133
|
-
"@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.
|
|
134
|
-
"@rolldown/binding-win32-x64-msvc": "1.0.0-beta.
|
|
135
|
-
"@rolldown/binding-
|
|
124
|
+
"@rolldown/binding-darwin-x64": "1.0.0-beta.11",
|
|
125
|
+
"@rolldown/binding-darwin-arm64": "1.0.0-beta.11",
|
|
126
|
+
"@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.11",
|
|
127
|
+
"@rolldown/binding-freebsd-x64": "1.0.0-beta.11",
|
|
128
|
+
"@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.11",
|
|
129
|
+
"@rolldown/binding-linux-arm64-musl": "1.0.0-beta.11",
|
|
130
|
+
"@rolldown/binding-linux-x64-musl": "1.0.0-beta.11",
|
|
131
|
+
"@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.11",
|
|
132
|
+
"@rolldown/binding-wasm32-wasi": "1.0.0-beta.11",
|
|
133
|
+
"@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.11",
|
|
134
|
+
"@rolldown/binding-win32-x64-msvc": "1.0.0-beta.11",
|
|
135
|
+
"@rolldown/binding-linux-x64-gnu": "1.0.0-beta.11"
|
|
136
136
|
},
|
|
137
137
|
"scripts": {
|
|
138
138
|
"# Scrips for binding #": "_",
|