rolldown 1.0.0-beta.7-commit.25f3c61 → 1.0.0-beta.7-commit.170d158
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/bin/cli.mjs +2 -0
- package/dist/{cjs/cli.cjs → cli.cjs} +4 -5
- package/dist/cli.mjs +1829 -0
- package/dist/{cjs/experimental-index.cjs → experimental-index.cjs} +3 -3
- package/dist/{esm/experimental-index.mjs → experimental-index.mjs} +13 -2
- package/dist/{cjs/index.cjs → index.cjs} +2 -2
- package/dist/index.mjs +5 -0
- package/dist/{cjs/parallel-plugin-worker.cjs → parallel-plugin-worker.cjs} +3 -4
- package/dist/parallel-plugin-worker.mjs +47 -0
- package/dist/parse-ast-index.cjs +4 -0
- package/dist/parse-ast-index.mjs +4 -0
- package/dist/shared/chunk-DUYDk_2O.mjs +33 -0
- package/dist/shared/{parse-ast-index-DNOUVcBy.mjs → parse-ast-index-5U4JtZBO.mjs} +108 -110
- package/dist/shared/{parse-ast-index-0ei4fTjl.cjs → parse-ast-index-BfKb9n4T.cjs} +1 -1
- package/dist/shared/prompt-W5YHe0v6.mjs +854 -0
- package/dist/shared/{src-BPcsb-4N.cjs → src-B0nHUJsv.cjs} +26 -7
- package/dist/shared/src-kyIoH7SP.mjs +4319 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/api/rolldown/rolldown-build.d.ts +1 -0
- package/dist/types/binding.d.ts +8 -2
- package/dist/types/options/input-options.d.ts +5 -1
- package/package.json +32 -31
- package/bin/cli.js +0 -2
- package/dist/cjs/parse-ast-index.cjs +0 -4
- package/dist/esm/cli.mjs +0 -1755
- package/dist/esm/index.mjs +0 -4
- package/dist/esm/parallel-plugin-worker.mjs +0 -41
- package/dist/esm/parse-ast-index.mjs +0 -3
- package/dist/shared/prompt-C6jWWCza.mjs +0 -852
- package/dist/shared/src-DllTyFDp.mjs +0 -2888
- /package/dist/{cjs/parallel-plugin.cjs → parallel-plugin.cjs} +0 -0
- /package/dist/{esm/parallel-plugin.mjs → parallel-plugin.mjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_chunk = require('./chunk-qZFfknuJ.cjs');
|
|
3
|
-
const require_parse_ast_index = require('./parse-ast-index-
|
|
3
|
+
const require_parse_ast_index = require('./parse-ast-index-BfKb9n4T.cjs');
|
|
4
4
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
5
5
|
const __valibot_to_json_schema = require_chunk.__toESM(require("@valibot/to-json-schema"));
|
|
6
6
|
const valibot = require_chunk.__toESM(require("valibot"));
|
|
@@ -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.170d158";
|
|
13
13
|
var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
@@ -563,6 +563,10 @@ const OnLogSchema = valibot.pipe(valibot.function(), valibot.args(valibot.tuple(
|
|
|
563
563
|
valibot.pipe(valibot.function(), valibot.args(valibot.tuple([LogLevelWithErrorSchema, RollupLogWithStringSchema])))
|
|
564
564
|
])));
|
|
565
565
|
const OnwarnSchema = valibot.pipe(valibot.function(), valibot.args(valibot.tuple([RollupLogSchema, valibot.pipe(valibot.function(), valibot.args(valibot.tuple([valibot.union([RollupLogWithStringSchema, valibot.pipe(valibot.function(), valibot.returns(RollupLogWithStringSchema))])])))])));
|
|
566
|
+
const HmrSchema = valibot.union([valibot.boolean(), valibot.strictObject({
|
|
567
|
+
port: valibot.optional(valibot.number()),
|
|
568
|
+
host: valibot.optional(valibot.string())
|
|
569
|
+
})]);
|
|
566
570
|
const InputOptionsSchema = valibot.strictObject({
|
|
567
571
|
input: valibot.optional(InputOptionSchema),
|
|
568
572
|
plugins: valibot.optional(valibot.custom(() => true)),
|
|
@@ -585,7 +589,7 @@ const InputOptionsSchema = valibot.strictObject({
|
|
|
585
589
|
enableComposingJsPlugins: valibot.optional(valibot.boolean()),
|
|
586
590
|
resolveNewUrlToAsset: valibot.optional(valibot.boolean()),
|
|
587
591
|
strictExecutionOrder: valibot.optional(valibot.boolean()),
|
|
588
|
-
hmr: valibot.optional(
|
|
592
|
+
hmr: valibot.optional(HmrSchema)
|
|
589
593
|
})),
|
|
590
594
|
define: valibot.pipe(valibot.optional(valibot.record(valibot.string(), valibot.string())), valibot.description("Define global variables")),
|
|
591
595
|
inject: valibot.optional(valibot.record(valibot.string(), valibot.union([valibot.string(), valibot.tuple([valibot.string(), valibot.string()])]))),
|
|
@@ -1041,7 +1045,9 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
1041
1045
|
});
|
|
1042
1046
|
data.loadModulePromiseMap.set(id, promise);
|
|
1043
1047
|
try {
|
|
1044
|
-
await context.load(id, bindingifySideEffects(options.moduleSideEffects),
|
|
1048
|
+
await context.load(id, bindingifySideEffects(options.moduleSideEffects), (_success) => {
|
|
1049
|
+
resolveFn();
|
|
1050
|
+
});
|
|
1045
1051
|
} finally {
|
|
1046
1052
|
data.loadModulePromiseMap.delete(id);
|
|
1047
1053
|
}
|
|
@@ -1590,7 +1596,9 @@ function transformToRollupOutputChunk(bindingChunk, changed) {
|
|
|
1590
1596
|
return new Proxy(chunk, {
|
|
1591
1597
|
get(target, p) {
|
|
1592
1598
|
if (p in cache) return cache[p];
|
|
1593
|
-
|
|
1599
|
+
const value = target[p];
|
|
1600
|
+
cache[p] = value;
|
|
1601
|
+
return value;
|
|
1594
1602
|
},
|
|
1595
1603
|
set(target, p, newValue) {
|
|
1596
1604
|
cache[p] = newValue;
|
|
@@ -1619,7 +1627,9 @@ function transformToRollupOutputAsset(bindingAsset, changed) {
|
|
|
1619
1627
|
return new Proxy(asset, {
|
|
1620
1628
|
get(target, p) {
|
|
1621
1629
|
if (p in cache) return cache[p];
|
|
1622
|
-
|
|
1630
|
+
const value = target[p];
|
|
1631
|
+
cache[p] = value;
|
|
1632
|
+
return value;
|
|
1623
1633
|
},
|
|
1624
1634
|
set(target, p, newValue) {
|
|
1625
1635
|
cache[p] = newValue;
|
|
@@ -2087,7 +2097,7 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
2087
2097
|
disableLiveBindings: inputOptions.experimental?.disableLiveBindings,
|
|
2088
2098
|
viteMode: inputOptions.experimental?.viteMode,
|
|
2089
2099
|
resolveNewUrlToAsset: inputOptions.experimental?.resolveNewUrlToAsset,
|
|
2090
|
-
hmr: inputOptions.experimental?.hmr
|
|
2100
|
+
hmr: bindingifyHmr(inputOptions.experimental?.hmr)
|
|
2091
2101
|
},
|
|
2092
2102
|
profilerNames: inputOptions?.profilerNames,
|
|
2093
2103
|
jsx: bindingifyJsx(inputOptions.jsx),
|
|
@@ -2109,6 +2119,12 @@ function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normali
|
|
|
2109
2119
|
makeAbsoluteExternalsRelative: bindingifyMakeAbsoluteExternalsRelative(inputOptions.makeAbsoluteExternalsRelative)
|
|
2110
2120
|
};
|
|
2111
2121
|
}
|
|
2122
|
+
function bindingifyHmr(hmr) {
|
|
2123
|
+
if (hmr) {
|
|
2124
|
+
if (typeof hmr === "boolean") return hmr ? {} : void 0;
|
|
2125
|
+
return hmr;
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2112
2128
|
function bindingifyExternal(external) {
|
|
2113
2129
|
if (external) {
|
|
2114
2130
|
if (typeof external === "function") return (id, importer, isResolved) => {
|
|
@@ -2727,6 +2743,9 @@ var RolldownBuild = class {
|
|
|
2727
2743
|
async generateHmrPatch(changedFiles) {
|
|
2728
2744
|
return this.#bundler?.bundler.generateHmrPatch(changedFiles);
|
|
2729
2745
|
}
|
|
2746
|
+
get watchFiles() {
|
|
2747
|
+
return this.#bundler?.bundler.watchFiles ?? [];
|
|
2748
|
+
}
|
|
2730
2749
|
};
|
|
2731
2750
|
|
|
2732
2751
|
//#endregion
|