rolldown 1.0.0-beta.7-commit.faf9dd3 → 1.0.0-beta.7-commit.a1a360c
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 +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/experimental-index.cjs +1 -1
- package/dist/experimental-index.mjs +1 -1
- package/dist/index.cjs +3 -2
- package/dist/index.mjs +2 -2
- package/dist/parallel-plugin-worker.cjs +1 -1
- package/dist/parallel-plugin-worker.mjs +1 -1
- package/dist/shared/{src-HvyAOKEg.mjs → src-DAi_EMVt.mjs} +41 -9
- package/dist/shared/{src-BvX-yBx9.cjs → src-DobjSb9g.cjs} +33 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/binding.d.ts +7 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/options/input-options.d.ts +3 -0
- package/dist/types/plugin/index.d.ts +1 -0
- package/dist/types/plugin/with-filter.d.ts +8 -0
- package/package.json +14 -16
package/dist/cli.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
2
|
+
const require_src = require('./shared/src-DobjSb9g.cjs');
|
|
3
3
|
const require_parse_ast_index = require('./shared/parse-ast-index-BfKb9n4T.cjs');
|
|
4
4
|
const node_fs = require_chunk.__toESM(require("node:fs"));
|
|
5
5
|
const node_path = require_chunk.__toESM(require("node:path"));
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __commonJS, __esm } from "./shared/chunk-DUYDk_2O.mjs";
|
|
2
|
-
import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_misc, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-
|
|
2
|
+
import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_misc, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-DAi_EMVt.mjs";
|
|
3
3
|
import { colors, init_colors } from "./shared/parse-ast-index-5U4JtZBO.mjs";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path, { sep } from "node:path";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
|
|
3
|
-
const require_src = require('./shared/src-
|
|
3
|
+
const require_src = require('./shared/src-DobjSb9g.cjs');
|
|
4
4
|
const require_parse_ast_index = require('./shared/parse-ast-index-BfKb9n4T.cjs');
|
|
5
5
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-
|
|
1
|
+
import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-DAi_EMVt.mjs";
|
|
2
2
|
import { import_binding } from "./shared/parse-ast-index-5U4JtZBO.mjs";
|
|
3
3
|
import { pathToFileURL } from "node:url";
|
|
4
4
|
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
1
|
+
const require_src = require('./shared/src-DobjSb9g.cjs');
|
|
2
2
|
require('./shared/parse-ast-index-BfKb9n4T.cjs');
|
|
3
3
|
|
|
4
4
|
exports.VERSION = require_src.VERSION
|
|
5
5
|
exports.build = require_src.build
|
|
6
6
|
exports.defineConfig = require_src.defineConfig
|
|
7
7
|
exports.rolldown = require_src.rolldown
|
|
8
|
-
exports.watch = require_src.watch
|
|
8
|
+
exports.watch = require_src.watch
|
|
9
|
+
exports.withFilter = require_src.withFilter
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VERSION, build, defineConfig, init_src, rolldown, watch } from "./shared/src-
|
|
1
|
+
import { VERSION, build, defineConfig, init_src, rolldown, watch, withFilter } from "./shared/src-DAi_EMVt.mjs";
|
|
2
2
|
import "./shared/parse-ast-index-5U4JtZBO.mjs";
|
|
3
3
|
|
|
4
4
|
init_src();
|
|
5
|
-
export { VERSION, build, defineConfig, rolldown, watch };
|
|
5
|
+
export { VERSION, build, defineConfig, rolldown, watch, withFilter };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
2
|
+
const require_src = require('./shared/src-DobjSb9g.cjs');
|
|
3
3
|
const require_parse_ast_index = require('./shared/parse-ast-index-BfKb9n4T.cjs');
|
|
4
4
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __commonJS } from "./shared/chunk-DUYDk_2O.mjs";
|
|
2
|
-
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-
|
|
2
|
+
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-DAi_EMVt.mjs";
|
|
3
3
|
import { import_binding } from "./shared/parse-ast-index-5U4JtZBO.mjs";
|
|
4
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
5
|
|
|
@@ -8,7 +8,7 @@ import { availableParallelism } from "node:os";
|
|
|
8
8
|
import { Worker } from "node:worker_threads";
|
|
9
9
|
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version = "1.0.0-beta.7-commit.
|
|
11
|
+
var version = "1.0.0-beta.7-commit.a1a360c";
|
|
12
12
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
@@ -269,7 +269,7 @@ var init_normalize_hook = __esm({ "src/utils/normalize-hook.ts"() {
|
|
|
269
269
|
//#endregion
|
|
270
270
|
//#region src/constants/plugin.ts
|
|
271
271
|
var ENUMERATED_INPUT_PLUGIN_HOOK_NAMES, ENUMERATED_OUTPUT_PLUGIN_HOOK_NAMES, ENUMERATED_PLUGIN_HOOK_NAMES, DEFINED_HOOK_NAMES;
|
|
272
|
-
var init_plugin$
|
|
272
|
+
var init_plugin$2 = __esm({ "src/constants/plugin.ts"() {
|
|
273
273
|
ENUMERATED_INPUT_PLUGIN_HOOK_NAMES = [
|
|
274
274
|
"options",
|
|
275
275
|
"buildStart",
|
|
@@ -358,7 +358,7 @@ function normalizePlugins(plugins, anonymousPrefix) {
|
|
|
358
358
|
var normalizePluginOption, ANONYMOUS_PLUGIN_PREFIX, ANONYMOUS_OUTPUT_PLUGIN_PREFIX;
|
|
359
359
|
var init_normalize_plugin_option = __esm({ "src/utils/normalize-plugin-option.ts"() {
|
|
360
360
|
init_constructors();
|
|
361
|
-
init_plugin$
|
|
361
|
+
init_plugin$2();
|
|
362
362
|
init_logging();
|
|
363
363
|
init_logs();
|
|
364
364
|
init_async_flatten();
|
|
@@ -699,7 +699,8 @@ var init_validator = __esm({ "src/utils/validator.ts"() {
|
|
|
699
699
|
watch: v.optional(v.union([WatchOptionsSchema, v.literal(false)])),
|
|
700
700
|
dropLabels: v.pipe(v.optional(v.array(v.string())), v.description("Remove labeled statements with these label names")),
|
|
701
701
|
checks: v.optional(ChecksOptionsSchema),
|
|
702
|
-
keepNames: v.pipe(v.optional(v.boolean()), v.description("Keep function/class name"))
|
|
702
|
+
keepNames: v.pipe(v.optional(v.boolean()), v.description("Keep function/class name")),
|
|
703
|
+
debug: v.pipe(v.optional(v.object({ buildId: v.pipe(v.optional(v.string()), v.description("Used to name the build.")) })), v.description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly."))
|
|
703
704
|
});
|
|
704
705
|
InputCliOverrideSchema = v.strictObject({
|
|
705
706
|
external: v.pipe(v.optional(v.array(v.string())), v.description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
|
|
@@ -2272,7 +2273,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
2272
2273
|
});
|
|
2273
2274
|
return ret;
|
|
2274
2275
|
},
|
|
2275
|
-
makeAbsoluteExternalsRelative: bindingifyMakeAbsoluteExternalsRelative(inputOptions.makeAbsoluteExternalsRelative)
|
|
2276
|
+
makeAbsoluteExternalsRelative: bindingifyMakeAbsoluteExternalsRelative(inputOptions.makeAbsoluteExternalsRelative),
|
|
2277
|
+
debug: inputOptions.debug
|
|
2276
2278
|
};
|
|
2277
2279
|
}
|
|
2278
2280
|
function bindingifyHmr(hmr) {
|
|
@@ -3625,8 +3627,8 @@ var init_dist = __esm({ "../../node_modules/.pnpm/remeda@2.21.2/node_modules/rem
|
|
|
3625
3627
|
//#endregion
|
|
3626
3628
|
//#region src/utils/plugin/index.ts
|
|
3627
3629
|
var isPluginHookName;
|
|
3628
|
-
var init_plugin = __esm({ "src/utils/plugin/index.ts"() {
|
|
3629
|
-
init_plugin$
|
|
3630
|
+
var init_plugin$1 = __esm({ "src/utils/plugin/index.ts"() {
|
|
3631
|
+
init_plugin$2();
|
|
3630
3632
|
isPluginHookName = function() {
|
|
3631
3633
|
const PLUGIN_HOOK_NAMES_SET = new Set(ENUMERATED_PLUGIN_HOOK_NAMES);
|
|
3632
3634
|
return function isPluginHookName$1(hookName) {
|
|
@@ -3936,7 +3938,7 @@ var init_compose_js_plugins = __esm({ "src/utils/compose-js-plugins.ts"() {
|
|
|
3936
3938
|
init_plugin_context$1();
|
|
3937
3939
|
init_misc();
|
|
3938
3940
|
init_normalize_hook();
|
|
3939
|
-
init_plugin();
|
|
3941
|
+
init_plugin$1();
|
|
3940
3942
|
unsupportedHookName = [
|
|
3941
3943
|
"augmentChunkHash",
|
|
3942
3944
|
"generateBundle",
|
|
@@ -4297,6 +4299,35 @@ var init_watch = __esm({ "src/api/watch/index.ts"() {
|
|
|
4297
4299
|
};
|
|
4298
4300
|
} });
|
|
4299
4301
|
|
|
4302
|
+
//#endregion
|
|
4303
|
+
//#region src/plugin/with-filter.ts
|
|
4304
|
+
function withFilter(plugin, filter_obj) {
|
|
4305
|
+
plugin["transform"];
|
|
4306
|
+
Object.keys(plugin).forEach((key) => {
|
|
4307
|
+
switch (key) {
|
|
4308
|
+
case "transform":
|
|
4309
|
+
case "resolveId":
|
|
4310
|
+
case "load":
|
|
4311
|
+
if (!plugin[key]) return;
|
|
4312
|
+
if (typeof plugin[key] === "object") plugin[key].filter = filter_obj[key] ?? plugin[key].filter;
|
|
4313
|
+
else plugin[key] = {
|
|
4314
|
+
handler: plugin[key],
|
|
4315
|
+
filter: filter_obj[key]
|
|
4316
|
+
};
|
|
4317
|
+
break;
|
|
4318
|
+
default: break;
|
|
4319
|
+
}
|
|
4320
|
+
});
|
|
4321
|
+
return plugin;
|
|
4322
|
+
}
|
|
4323
|
+
var init_with_filter = __esm({ "src/plugin/with-filter.ts"() {} });
|
|
4324
|
+
|
|
4325
|
+
//#endregion
|
|
4326
|
+
//#region src/plugin/index.ts
|
|
4327
|
+
var init_plugin = __esm({ "src/plugin/index.ts"() {
|
|
4328
|
+
init_with_filter();
|
|
4329
|
+
} });
|
|
4330
|
+
|
|
4300
4331
|
//#endregion
|
|
4301
4332
|
//#region src/utils/define-config.ts
|
|
4302
4333
|
function defineConfig(config) {
|
|
@@ -4311,9 +4342,10 @@ var init_src = __esm({ "src/index.ts"() {
|
|
|
4311
4342
|
init_build();
|
|
4312
4343
|
init_rolldown();
|
|
4313
4344
|
init_watch();
|
|
4345
|
+
init_plugin();
|
|
4314
4346
|
init_define_config();
|
|
4315
4347
|
VERSION = version;
|
|
4316
4348
|
} });
|
|
4317
4349
|
|
|
4318
4350
|
//#endregion
|
|
4319
|
-
export { BuiltinPlugin, PluginContextData, VERSION, arraify, bindingifyPlugin, build, buildImportAnalysisPlugin, composeJsPlugins, createBundler, defineConfig, description, dynamicImportVarsPlugin, getInputCliKeys, getJsonSchema, getOutputCliKeys, handleOutputErrors, importGlobPlugin, init_bindingify_plugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_misc, init_normalize_string_or_regex, init_plugin_context_data, init_rolldown, init_src, init_transform_to_rollup_output, init_validator, init_watch, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, rolldown, validateCliOptions, version, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch };
|
|
4351
|
+
export { BuiltinPlugin, PluginContextData, VERSION, arraify, bindingifyPlugin, build, buildImportAnalysisPlugin, composeJsPlugins, createBundler, defineConfig, description, dynamicImportVarsPlugin, getInputCliKeys, getJsonSchema, getOutputCliKeys, handleOutputErrors, importGlobPlugin, init_bindingify_plugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_misc, init_normalize_string_or_regex, init_plugin_context_data, init_rolldown, init_src, init_transform_to_rollup_output, init_validator, init_watch, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, rolldown, validateCliOptions, version, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, withFilter };
|
|
@@ -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.7-commit.
|
|
12
|
+
var version = "1.0.0-beta.7-commit.a1a360c";
|
|
13
13
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
@@ -605,7 +605,8 @@ const InputOptionsSchema = valibot.strictObject({
|
|
|
605
605
|
watch: valibot.optional(valibot.union([WatchOptionsSchema, valibot.literal(false)])),
|
|
606
606
|
dropLabels: valibot.pipe(valibot.optional(valibot.array(valibot.string())), valibot.description("Remove labeled statements with these label names")),
|
|
607
607
|
checks: valibot.optional(ChecksOptionsSchema),
|
|
608
|
-
keepNames: valibot.pipe(valibot.optional(valibot.boolean()), valibot.description("Keep function/class name"))
|
|
608
|
+
keepNames: valibot.pipe(valibot.optional(valibot.boolean()), valibot.description("Keep function/class name")),
|
|
609
|
+
debug: valibot.pipe(valibot.optional(valibot.object({ buildId: valibot.pipe(valibot.optional(valibot.string()), valibot.description("Used to name the build.")) })), valibot.description("Enable debug mode. Emit debug information to disk. This might slow down the build process significantly."))
|
|
609
610
|
});
|
|
610
611
|
const InputCliOverrideSchema = valibot.strictObject({
|
|
611
612
|
external: valibot.pipe(valibot.optional(valibot.array(valibot.string())), valibot.description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
|
|
@@ -2116,7 +2117,8 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
2116
2117
|
});
|
|
2117
2118
|
return ret;
|
|
2118
2119
|
},
|
|
2119
|
-
makeAbsoluteExternalsRelative: bindingifyMakeAbsoluteExternalsRelative(inputOptions.makeAbsoluteExternalsRelative)
|
|
2120
|
+
makeAbsoluteExternalsRelative: bindingifyMakeAbsoluteExternalsRelative(inputOptions.makeAbsoluteExternalsRelative),
|
|
2121
|
+
debug: inputOptions.debug
|
|
2120
2122
|
};
|
|
2121
2123
|
}
|
|
2122
2124
|
function bindingifyHmr(hmr) {
|
|
@@ -2895,6 +2897,28 @@ const watch = (input) => {
|
|
|
2895
2897
|
return emitter;
|
|
2896
2898
|
};
|
|
2897
2899
|
|
|
2900
|
+
//#endregion
|
|
2901
|
+
//#region src/plugin/with-filter.ts
|
|
2902
|
+
function withFilter(plugin, filter_obj) {
|
|
2903
|
+
plugin["transform"];
|
|
2904
|
+
Object.keys(plugin).forEach((key) => {
|
|
2905
|
+
switch (key) {
|
|
2906
|
+
case "transform":
|
|
2907
|
+
case "resolveId":
|
|
2908
|
+
case "load":
|
|
2909
|
+
if (!plugin[key]) return;
|
|
2910
|
+
if (typeof plugin[key] === "object") plugin[key].filter = filter_obj[key] ?? plugin[key].filter;
|
|
2911
|
+
else plugin[key] = {
|
|
2912
|
+
handler: plugin[key],
|
|
2913
|
+
filter: filter_obj[key]
|
|
2914
|
+
};
|
|
2915
|
+
break;
|
|
2916
|
+
default: break;
|
|
2917
|
+
}
|
|
2918
|
+
});
|
|
2919
|
+
return plugin;
|
|
2920
|
+
}
|
|
2921
|
+
|
|
2898
2922
|
//#endregion
|
|
2899
2923
|
//#region src/utils/define-config.ts
|
|
2900
2924
|
function defineConfig(config) {
|
|
@@ -3091,4 +3115,10 @@ Object.defineProperty(exports, 'watch', {
|
|
|
3091
3115
|
get: function () {
|
|
3092
3116
|
return watch;
|
|
3093
3117
|
}
|
|
3118
|
+
});
|
|
3119
|
+
Object.defineProperty(exports, 'withFilter', {
|
|
3120
|
+
enumerable: true,
|
|
3121
|
+
get: function () {
|
|
3122
|
+
return withFilter;
|
|
3123
|
+
}
|
|
3094
3124
|
});
|