rolldown 0.14.0-snapshot-6d170b4-20241115003513 → 0.14.0-snapshot-4b84829-20241117003623
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/cjs/cli.cjs +1 -1
- package/dist/cjs/experimental-index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/parallel-plugin-worker.cjs +1 -1
- package/dist/esm/cli.mjs +1 -1
- package/dist/esm/experimental-index.mjs +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/parallel-plugin-worker.mjs +1 -1
- package/dist/shared/rolldown-binding.wasi.cjs +76 -74
- package/dist/shared/{src_index-jNxrh0Pu.cjs → src_index-LPUGGLNn.cjs} +28 -1
- package/dist/shared/{src_index-4Nk_Yx7O.mjs → src_index-x85ePQkZ.mjs} +28 -1
- package/dist/types/binding.d.ts +13 -7
- package/dist/types/rolldown-build.d.ts +2 -0
- package/dist/types/types/rolldown-output.d.ts +1 -1
- package/dist/types/utils/transform-rendered-module.d.ts +2 -0
- package/package.json +15 -15
- package/dist/types/types/rendered-module.d.ts +0 -2
package/dist/cjs/cli.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const { __export, __toESM } = require("../shared/chunk-JoMxl5V2.cjs");
|
|
4
|
-
const { LogLevelOptionSchema, LogLevelSchema, LogLevelWithErrorSchema, RollupLogSchema, RollupLogWithStringSchema, TreeshakingOptionsSchema, arraify, description, rolldown, version, watch } = require("../shared/src_index-
|
|
4
|
+
const { LogLevelOptionSchema, LogLevelSchema, LogLevelWithErrorSchema, RollupLogSchema, RollupLogWithStringSchema, TreeshakingOptionsSchema, arraify, description, rolldown, version, watch } = require("../shared/src_index-LPUGGLNn.cjs");
|
|
5
5
|
const { createConsola } = require("../shared/consola.36c0034f-HcmWcfPe.cjs");
|
|
6
6
|
const { default: nodePath, default: path } = __toESM(require("node:path"));
|
|
7
7
|
const { ZodFirstPartyTypeKind, ZodFirstPartyTypeKind: ZodFirstPartyTypeKind$1, ZodFirstPartyTypeKind: ZodFirstPartyTypeKind$2, z, z: z$1, z: z$2, z: z$3 } = __toESM(require("zod"));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const { __toESM } = require("../shared/chunk-JoMxl5V2.cjs");
|
|
4
|
-
const { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, require_binding, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } = require("../shared/src_index-
|
|
4
|
+
const { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, require_binding, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } = require("../shared/src_index-LPUGGLNn.cjs");
|
|
5
5
|
const { pathToFileURL } = __toESM(require("node:url"));
|
|
6
6
|
|
|
7
7
|
//#region src/plugin/parallel-plugin.ts
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const { VERSION, defineConfig, rolldown, watch } = require("../shared/src_index-
|
|
3
|
+
const { VERSION, defineConfig, rolldown, watch } = require("../shared/src_index-LPUGGLNn.cjs");
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6
6
|
exports.VERSION = VERSION;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const { __toESM } = require("../shared/chunk-JoMxl5V2.cjs");
|
|
4
|
-
const { PluginContextData, bindingifyPlugin, require_binding } = require("../shared/src_index-
|
|
4
|
+
const { PluginContextData, bindingifyPlugin, require_binding } = require("../shared/src_index-LPUGGLNn.cjs");
|
|
5
5
|
const { parentPort, workerData } = __toESM(require("node:worker_threads"));
|
|
6
6
|
|
|
7
7
|
//#region src/parallel-plugin-worker.ts
|
package/dist/esm/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import __node_module__ from 'node:module';
|
|
2
2
|
const require = __node_module__.createRequire(import.meta.url)
|
|
3
|
-
import { LogLevelOptionSchema, LogLevelSchema, LogLevelWithErrorSchema, RollupLogSchema, RollupLogWithStringSchema, TreeshakingOptionsSchema, __export, arraify, description, rolldown, version, watch } from "../shared/src_index-
|
|
3
|
+
import { LogLevelOptionSchema, LogLevelSchema, LogLevelWithErrorSchema, RollupLogSchema, RollupLogWithStringSchema, TreeshakingOptionsSchema, __export, arraify, description, rolldown, version, watch } from "../shared/src_index-x85ePQkZ.mjs";
|
|
4
4
|
import { createConsola } from "../shared/consola.36c0034f-Xyw7SC_7.mjs";
|
|
5
5
|
import { default as nodePath, default as path } from "node:path";
|
|
6
6
|
import { ZodFirstPartyTypeKind, ZodFirstPartyTypeKind as ZodFirstPartyTypeKind$1, ZodFirstPartyTypeKind as ZodFirstPartyTypeKind$2, z, z as z$1, z as z$2, z as z$3 } from "zod";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import __node_module__ from 'node:module';
|
|
2
2
|
const require = __node_module__.createRequire(import.meta.url)
|
|
3
|
-
import { __toESM, aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, require_binding, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src_index-
|
|
3
|
+
import { __toESM, aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, require_binding, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/src_index-x85ePQkZ.mjs";
|
|
4
4
|
import { pathToFileURL } from "node:url";
|
|
5
5
|
|
|
6
6
|
//#region src/plugin/parallel-plugin.ts
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import __node_module__ from 'node:module';
|
|
2
2
|
const require = __node_module__.createRequire(import.meta.url)
|
|
3
|
-
import { VERSION, defineConfig, rolldown, watch } from "../shared/src_index-
|
|
3
|
+
import { VERSION, defineConfig, rolldown, watch } from "../shared/src_index-x85ePQkZ.mjs";
|
|
4
4
|
|
|
5
5
|
export { VERSION, defineConfig, rolldown, watch };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import __node_module__ from 'node:module';
|
|
2
2
|
const require = __node_module__.createRequire(import.meta.url)
|
|
3
|
-
import { PluginContextData, __toESM, bindingifyPlugin, require_binding } from "../shared/src_index-
|
|
3
|
+
import { PluginContextData, __toESM, bindingifyPlugin, require_binding } from "../shared/src_index-x85ePQkZ.mjs";
|
|
4
4
|
import { parentPort, workerData } from "node:worker_threads";
|
|
5
5
|
|
|
6
6
|
//#region src/parallel-plugin-worker.ts
|
|
@@ -95,80 +95,81 @@ function __napi_rs_initialize_modules(__napiInstance) {
|
|
|
95
95
|
__napiInstance.exports['__napi_register__isolated_declaration_0']?.()
|
|
96
96
|
__napiInstance.exports['__napi_register__transform_1']?.()
|
|
97
97
|
__napiInstance.exports['__napi_register__Bundler_struct_0']?.()
|
|
98
|
-
__napiInstance.exports['
|
|
99
|
-
__napiInstance.exports['
|
|
100
|
-
__napiInstance.exports['
|
|
101
|
-
__napiInstance.exports['
|
|
102
|
-
__napiInstance.exports['
|
|
103
|
-
__napiInstance.exports['
|
|
104
|
-
__napiInstance.exports['
|
|
105
|
-
__napiInstance.exports['
|
|
106
|
-
__napiInstance.exports['
|
|
107
|
-
__napiInstance.exports['
|
|
108
|
-
__napiInstance.exports['
|
|
109
|
-
__napiInstance.exports['
|
|
110
|
-
__napiInstance.exports['
|
|
111
|
-
__napiInstance.exports['
|
|
112
|
-
__napiInstance.exports['
|
|
113
|
-
__napiInstance.exports['
|
|
114
|
-
__napiInstance.exports['
|
|
115
|
-
__napiInstance.exports['
|
|
116
|
-
__napiInstance.exports['
|
|
117
|
-
__napiInstance.exports['
|
|
118
|
-
__napiInstance.exports['
|
|
119
|
-
__napiInstance.exports['
|
|
120
|
-
__napiInstance.exports['
|
|
121
|
-
__napiInstance.exports['
|
|
122
|
-
__napiInstance.exports['
|
|
123
|
-
__napiInstance.exports['
|
|
124
|
-
__napiInstance.exports['
|
|
125
|
-
__napiInstance.exports['
|
|
126
|
-
__napiInstance.exports['
|
|
127
|
-
__napiInstance.exports['
|
|
128
|
-
__napiInstance.exports['
|
|
129
|
-
__napiInstance.exports['
|
|
130
|
-
__napiInstance.exports['
|
|
131
|
-
__napiInstance.exports['
|
|
132
|
-
__napiInstance.exports['
|
|
133
|
-
__napiInstance.exports['
|
|
134
|
-
__napiInstance.exports['
|
|
135
|
-
__napiInstance.exports['
|
|
136
|
-
__napiInstance.exports['
|
|
137
|
-
__napiInstance.exports['
|
|
138
|
-
__napiInstance.exports['
|
|
139
|
-
__napiInstance.exports['
|
|
140
|
-
__napiInstance.exports['
|
|
141
|
-
__napiInstance.exports['
|
|
142
|
-
__napiInstance.exports['
|
|
143
|
-
__napiInstance.exports['
|
|
144
|
-
__napiInstance.exports['
|
|
145
|
-
__napiInstance.exports['
|
|
146
|
-
__napiInstance.exports['
|
|
147
|
-
__napiInstance.exports['
|
|
148
|
-
__napiInstance.exports['
|
|
149
|
-
__napiInstance.exports['
|
|
150
|
-
__napiInstance.exports['
|
|
151
|
-
__napiInstance.exports['
|
|
152
|
-
__napiInstance.exports['
|
|
153
|
-
__napiInstance.exports['
|
|
154
|
-
__napiInstance.exports['
|
|
155
|
-
__napiInstance.exports['
|
|
156
|
-
__napiInstance.exports['
|
|
157
|
-
__napiInstance.exports['
|
|
158
|
-
__napiInstance.exports['
|
|
159
|
-
__napiInstance.exports['
|
|
160
|
-
__napiInstance.exports['
|
|
161
|
-
__napiInstance.exports['
|
|
162
|
-
__napiInstance.exports['
|
|
163
|
-
__napiInstance.exports['
|
|
164
|
-
__napiInstance.exports['
|
|
165
|
-
__napiInstance.exports['
|
|
166
|
-
__napiInstance.exports['
|
|
167
|
-
__napiInstance.exports['
|
|
168
|
-
__napiInstance.exports['
|
|
169
|
-
__napiInstance.exports['
|
|
170
|
-
__napiInstance.exports['
|
|
171
|
-
__napiInstance.exports['
|
|
98
|
+
__napiInstance.exports['__napi_register__Bundler_impl_8']?.()
|
|
99
|
+
__napiInstance.exports['__napi_register__BindingExperimentalOptions_struct_9']?.()
|
|
100
|
+
__napiInstance.exports['__napi_register__BindingInjectImportNamed_struct_10']?.()
|
|
101
|
+
__napiInstance.exports['__napi_register__BindingInjectImportNamespace_struct_11']?.()
|
|
102
|
+
__napiInstance.exports['__napi_register__BindingInputItem_struct_12']?.()
|
|
103
|
+
__napiInstance.exports['__napi_register__BindingWatchOption_struct_13']?.()
|
|
104
|
+
__napiInstance.exports['__napi_register__BindingNotifyOption_struct_14']?.()
|
|
105
|
+
__napiInstance.exports['__napi_register__BindingResolveOptions_struct_15']?.()
|
|
106
|
+
__napiInstance.exports['__napi_register__BindingTreeshake_struct_16']?.()
|
|
107
|
+
__napiInstance.exports['__napi_register__BindingModuleSideEffectsRule_struct_17']?.()
|
|
108
|
+
__napiInstance.exports['__napi_register__BindingInputOptions_struct_18']?.()
|
|
109
|
+
__napiInstance.exports['__napi_register__BindingAdvancedChunksOptions_struct_19']?.()
|
|
110
|
+
__napiInstance.exports['__napi_register__BindingMatchGroup_struct_20']?.()
|
|
111
|
+
__napiInstance.exports['__napi_register__BindingOutputOptions_struct_21']?.()
|
|
112
|
+
__napiInstance.exports['__napi_register__BindingPluginContext_struct_22']?.()
|
|
113
|
+
__napiInstance.exports['__napi_register__BindingPluginContext_impl_30']?.()
|
|
114
|
+
__napiInstance.exports['__napi_register__BindingPluginContextResolvedId_struct_31']?.()
|
|
115
|
+
__napiInstance.exports['__napi_register__BindingPluginOptions_struct_32']?.()
|
|
116
|
+
__napiInstance.exports['__napi_register__BindingPluginWithIndex_struct_33']?.()
|
|
117
|
+
__napiInstance.exports['__napi_register__BindingTransformPluginContext_struct_34']?.()
|
|
118
|
+
__napiInstance.exports['__napi_register__BindingTransformPluginContext_impl_36']?.()
|
|
119
|
+
__napiInstance.exports['__napi_register__BindingAssetSource_struct_37']?.()
|
|
120
|
+
__napiInstance.exports['__napi_register__BindingEmittedAsset_struct_38']?.()
|
|
121
|
+
__napiInstance.exports['__napi_register__BindingGeneralHookFilter_struct_39']?.()
|
|
122
|
+
__napiInstance.exports['__napi_register__BindingTransformHookFilter_struct_40']?.()
|
|
123
|
+
__napiInstance.exports['__napi_register__BindingHookLoadOutput_struct_41']?.()
|
|
124
|
+
__napiInstance.exports['__napi_register__BindingHookRenderChunkOutput_struct_42']?.()
|
|
125
|
+
__napiInstance.exports['__napi_register__BindingHookResolveIdExtraArgs_struct_43']?.()
|
|
126
|
+
__napiInstance.exports['__napi_register__BindingHookResolveIdOutput_struct_44']?.()
|
|
127
|
+
__napiInstance.exports['__napi_register__BindingHookSideEffects_45']?.()
|
|
128
|
+
__napiInstance.exports['__napi_register__BindingHookTransformOutput_struct_46']?.()
|
|
129
|
+
__napiInstance.exports['__napi_register__BindingPluginContextResolveOptions_struct_47']?.()
|
|
130
|
+
__napiInstance.exports['__napi_register__BindingTransformHookExtraArgs_struct_48']?.()
|
|
131
|
+
__napiInstance.exports['__napi_register__BindingBuiltinPlugin_struct_49']?.()
|
|
132
|
+
__napiInstance.exports['__napi_register__BindingBuiltinPluginName_50']?.()
|
|
133
|
+
__napiInstance.exports['__napi_register__BindingGlobImportPluginConfig_struct_51']?.()
|
|
134
|
+
__napiInstance.exports['__napi_register__BindingManifestPluginConfig_struct_52']?.()
|
|
135
|
+
__napiInstance.exports['__napi_register__BindingModulePreloadPolyfillPluginConfig_struct_53']?.()
|
|
136
|
+
__napiInstance.exports['__napi_register__BindingJsonPluginConfig_struct_54']?.()
|
|
137
|
+
__napiInstance.exports['__napi_register__BindingTransformPluginConfig_struct_55']?.()
|
|
138
|
+
__napiInstance.exports['__napi_register__BindingAliasPluginConfig_struct_56']?.()
|
|
139
|
+
__napiInstance.exports['__napi_register__BindingAliasPluginAlias_struct_57']?.()
|
|
140
|
+
__napiInstance.exports['__napi_register__BindingBuildImportAnalysisPluginConfig_struct_58']?.()
|
|
141
|
+
__napiInstance.exports['__napi_register__BindingViteResolvePluginConfig_struct_59']?.()
|
|
142
|
+
__napiInstance.exports['__napi_register__BindingViteResolvePluginResolveOptions_struct_60']?.()
|
|
143
|
+
__napiInstance.exports['__napi_register__BindingReplacePluginConfig_struct_61']?.()
|
|
144
|
+
__napiInstance.exports['__napi_register__BindingPluginOrder_62']?.()
|
|
145
|
+
__napiInstance.exports['__napi_register__BindingPluginHookMeta_struct_63']?.()
|
|
146
|
+
__napiInstance.exports['__napi_register__ParallelJsPluginRegistry_struct_64']?.()
|
|
147
|
+
__napiInstance.exports['__napi_register__ParallelJsPluginRegistry_impl_66']?.()
|
|
148
|
+
__napiInstance.exports['__napi_register__register_plugins_67']?.()
|
|
149
|
+
__napiInstance.exports['__napi_register__BindingLog_struct_68']?.()
|
|
150
|
+
__napiInstance.exports['__napi_register__BindingLogLevel_69']?.()
|
|
151
|
+
__napiInstance.exports['__napi_register__BindingModuleInfo_struct_70']?.()
|
|
152
|
+
__napiInstance.exports['__napi_register__BindingModuleInfo_impl_72']?.()
|
|
153
|
+
__napiInstance.exports['__napi_register__BindingOutputAsset_struct_73']?.()
|
|
154
|
+
__napiInstance.exports['__napi_register__BindingOutputAsset_impl_78']?.()
|
|
155
|
+
__napiInstance.exports['__napi_register__JsOutputAsset_struct_79']?.()
|
|
156
|
+
__napiInstance.exports['__napi_register__BindingOutputChunk_struct_80']?.()
|
|
157
|
+
__napiInstance.exports['__napi_register__BindingOutputChunk_impl_95']?.()
|
|
158
|
+
__napiInstance.exports['__napi_register__JsOutputChunk_struct_96']?.()
|
|
159
|
+
__napiInstance.exports['__napi_register__BindingOutputs_struct_97']?.()
|
|
160
|
+
__napiInstance.exports['__napi_register__BindingOutputs_impl_100']?.()
|
|
161
|
+
__napiInstance.exports['__napi_register__JsChangedOutputs_struct_101']?.()
|
|
162
|
+
__napiInstance.exports['__napi_register__PreRenderedChunk_struct_102']?.()
|
|
163
|
+
__napiInstance.exports['__napi_register__RenderedChunk_struct_103']?.()
|
|
164
|
+
__napiInstance.exports['__napi_register__BindingRenderedModule_struct_104']?.()
|
|
165
|
+
__napiInstance.exports['__napi_register__BindingRenderedModule_impl_106']?.()
|
|
166
|
+
__napiInstance.exports['__napi_register__AliasItem_struct_107']?.()
|
|
167
|
+
__napiInstance.exports['__napi_register__ExtensionAliasItem_struct_108']?.()
|
|
168
|
+
__napiInstance.exports['__napi_register__BindingSourcemap_struct_109']?.()
|
|
169
|
+
__napiInstance.exports['__napi_register__BindingJsonSourcemap_struct_110']?.()
|
|
170
|
+
__napiInstance.exports['__napi_register__BindingWatcher_struct_111']?.()
|
|
171
|
+
__napiInstance.exports['__napi_register__BindingWatcher_impl_114']?.()
|
|
172
|
+
__napiInstance.exports['__napi_register__BindingWatcherEvent_115']?.()
|
|
172
173
|
}
|
|
173
174
|
module.exports.BindingLog = __napiModule.exports.BindingLog
|
|
174
175
|
module.exports.BindingModuleInfo = __napiModule.exports.BindingModuleInfo
|
|
@@ -176,6 +177,7 @@ module.exports.BindingOutputAsset = __napiModule.exports.BindingOutputAsset
|
|
|
176
177
|
module.exports.BindingOutputChunk = __napiModule.exports.BindingOutputChunk
|
|
177
178
|
module.exports.BindingOutputs = __napiModule.exports.BindingOutputs
|
|
178
179
|
module.exports.BindingPluginContext = __napiModule.exports.BindingPluginContext
|
|
180
|
+
module.exports.BindingRenderedModule = __napiModule.exports.BindingRenderedModule
|
|
179
181
|
module.exports.BindingTransformPluginContext = __napiModule.exports.BindingTransformPluginContext
|
|
180
182
|
module.exports.BindingWatcher = __napiModule.exports.BindingWatcher
|
|
181
183
|
module.exports.Bundler = __napiModule.exports.Bundler
|
|
@@ -32,6 +32,19 @@ function bindingifySourcemap$1(map) {
|
|
|
32
32
|
}};
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region src/utils/transform-rendered-module.ts
|
|
37
|
+
function transformToRenderedModule(bindingRenderedModule) {
|
|
38
|
+
return {
|
|
39
|
+
get code() {
|
|
40
|
+
return bindingRenderedModule.code;
|
|
41
|
+
},
|
|
42
|
+
get renderedLength() {
|
|
43
|
+
return bindingRenderedModule.code?.length || 0;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
35
48
|
//#endregion
|
|
36
49
|
//#region src/utils/transform-to-rollup-output.ts
|
|
37
50
|
function transformToRollupOutputChunk(bindingChunk, changed) {
|
|
@@ -43,7 +56,7 @@ function transformToRollupOutputChunk(bindingChunk, changed) {
|
|
|
43
56
|
fileName: bindingChunk.fileName,
|
|
44
57
|
name: bindingChunk.name,
|
|
45
58
|
get modules() {
|
|
46
|
-
return Object.fromEntries((Object.entries(bindingChunk.modules)).map(([key,
|
|
59
|
+
return Object.fromEntries((Object.entries(bindingChunk.modules)).map(([key, value]) => [key, transformToRenderedModule(value),]));
|
|
47
60
|
},
|
|
48
61
|
get imports() {
|
|
49
62
|
return bindingChunk.imports;
|
|
@@ -492,6 +505,7 @@ var require_binding = __commonJSMin((exports, module) => {
|
|
|
492
505
|
module.exports.BindingOutputChunk = nativeBinding.BindingOutputChunk;
|
|
493
506
|
module.exports.BindingOutputs = nativeBinding.BindingOutputs;
|
|
494
507
|
module.exports.BindingPluginContext = nativeBinding.BindingPluginContext;
|
|
508
|
+
module.exports.BindingRenderedModule = nativeBinding.BindingRenderedModule;
|
|
495
509
|
module.exports.BindingTransformPluginContext = nativeBinding.BindingTransformPluginContext;
|
|
496
510
|
module.exports.BindingWatcher = nativeBinding.BindingWatcher;
|
|
497
511
|
module.exports.Bundler = nativeBinding.Bundler;
|
|
@@ -1519,6 +1533,9 @@ function bindingifyRenderChunk(plugin, options, outputOptions, pluginContextData
|
|
|
1519
1533
|
const { handler: handler, meta: meta } = normalizeHook(hook);
|
|
1520
1534
|
return {
|
|
1521
1535
|
plugin: async (ctx, code, chunk) => {
|
|
1536
|
+
(Object.entries(chunk.modules)).forEach(([key, module$1]) => {
|
|
1537
|
+
chunk.modules[key] = transformToRenderedModule(module$1);
|
|
1538
|
+
});
|
|
1522
1539
|
const ret = await handler.call(new PluginContext(options, ctx, plugin, pluginContextData), code, chunk, outputOptions);
|
|
1523
1540
|
if (ret == null) {
|
|
1524
1541
|
return;
|
|
@@ -1545,6 +1562,9 @@ function bindingifyAugmentChunkHash(plugin, options, pluginContextData) {
|
|
|
1545
1562
|
const { handler: handler, meta: meta } = normalizeHook(hook);
|
|
1546
1563
|
return {
|
|
1547
1564
|
plugin: async (ctx, chunk) => {
|
|
1565
|
+
(Object.entries(chunk.modules)).forEach(([key, module$1]) => {
|
|
1566
|
+
chunk.modules[key] = transformToRenderedModule(module$1);
|
|
1567
|
+
});
|
|
1548
1568
|
return await handler.call(new PluginContext(options, ctx, plugin, pluginContextData), chunk);
|
|
1549
1569
|
},
|
|
1550
1570
|
meta: bindingifyPluginHookMeta(meta)
|
|
@@ -2681,12 +2701,16 @@ async function createBundler(inputOptions, outputOptions) {
|
|
|
2681
2701
|
|
|
2682
2702
|
//#endregion
|
|
2683
2703
|
//#region src/rolldown-build.ts
|
|
2704
|
+
Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
|
|
2684
2705
|
class RolldownBuild {
|
|
2685
2706
|
#inputOptions;
|
|
2686
2707
|
#bundler;
|
|
2687
2708
|
constructor(inputOptions) {
|
|
2688
2709
|
this.#inputOptions = inputOptions;
|
|
2689
2710
|
}
|
|
2711
|
+
get closed() {
|
|
2712
|
+
return this.#bundler ? this.#bundler.bundler.closed : false;
|
|
2713
|
+
}
|
|
2690
2714
|
async #getBundlerWithStopWorker(outputOptions) {
|
|
2691
2715
|
if (this.#bundler) {
|
|
2692
2716
|
this.#bundler.stopWorkers?.();
|
|
@@ -2708,6 +2732,9 @@ class RolldownBuild {
|
|
|
2708
2732
|
await stopWorkers?.();
|
|
2709
2733
|
await bundler.close();
|
|
2710
2734
|
}
|
|
2735
|
+
async [Symbol.asyncDispose]() {
|
|
2736
|
+
await this.close();
|
|
2737
|
+
}
|
|
2711
2738
|
}
|
|
2712
2739
|
|
|
2713
2740
|
//#endregion
|
|
@@ -63,6 +63,19 @@ function bindingifySourcemap$1(map) {
|
|
|
63
63
|
}};
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/utils/transform-rendered-module.ts
|
|
68
|
+
function transformToRenderedModule(bindingRenderedModule) {
|
|
69
|
+
return {
|
|
70
|
+
get code() {
|
|
71
|
+
return bindingRenderedModule.code;
|
|
72
|
+
},
|
|
73
|
+
get renderedLength() {
|
|
74
|
+
return bindingRenderedModule.code?.length || 0;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
66
79
|
//#endregion
|
|
67
80
|
//#region src/utils/transform-to-rollup-output.ts
|
|
68
81
|
function transformToRollupOutputChunk(bindingChunk, changed) {
|
|
@@ -74,7 +87,7 @@ function transformToRollupOutputChunk(bindingChunk, changed) {
|
|
|
74
87
|
fileName: bindingChunk.fileName,
|
|
75
88
|
name: bindingChunk.name,
|
|
76
89
|
get modules() {
|
|
77
|
-
return Object.fromEntries((Object.entries(bindingChunk.modules)).map(([key,
|
|
90
|
+
return Object.fromEntries((Object.entries(bindingChunk.modules)).map(([key, value]) => [key, transformToRenderedModule(value),]));
|
|
78
91
|
},
|
|
79
92
|
get imports() {
|
|
80
93
|
return bindingChunk.imports;
|
|
@@ -522,6 +535,7 @@ var require_binding = __commonJSMin((exports, module) => {
|
|
|
522
535
|
module.exports.BindingOutputChunk = nativeBinding.BindingOutputChunk;
|
|
523
536
|
module.exports.BindingOutputs = nativeBinding.BindingOutputs;
|
|
524
537
|
module.exports.BindingPluginContext = nativeBinding.BindingPluginContext;
|
|
538
|
+
module.exports.BindingRenderedModule = nativeBinding.BindingRenderedModule;
|
|
525
539
|
module.exports.BindingTransformPluginContext = nativeBinding.BindingTransformPluginContext;
|
|
526
540
|
module.exports.BindingWatcher = nativeBinding.BindingWatcher;
|
|
527
541
|
module.exports.Bundler = nativeBinding.Bundler;
|
|
@@ -1549,6 +1563,9 @@ function bindingifyRenderChunk(plugin, options, outputOptions, pluginContextData
|
|
|
1549
1563
|
const { handler: handler, meta: meta } = normalizeHook(hook);
|
|
1550
1564
|
return {
|
|
1551
1565
|
plugin: async (ctx, code, chunk) => {
|
|
1566
|
+
(Object.entries(chunk.modules)).forEach(([key, module$1]) => {
|
|
1567
|
+
chunk.modules[key] = transformToRenderedModule(module$1);
|
|
1568
|
+
});
|
|
1552
1569
|
const ret = await handler.call(new PluginContext(options, ctx, plugin, pluginContextData), code, chunk, outputOptions);
|
|
1553
1570
|
if (ret == null) {
|
|
1554
1571
|
return;
|
|
@@ -1575,6 +1592,9 @@ function bindingifyAugmentChunkHash(plugin, options, pluginContextData) {
|
|
|
1575
1592
|
const { handler: handler, meta: meta } = normalizeHook(hook);
|
|
1576
1593
|
return {
|
|
1577
1594
|
plugin: async (ctx, chunk) => {
|
|
1595
|
+
(Object.entries(chunk.modules)).forEach(([key, module$1]) => {
|
|
1596
|
+
chunk.modules[key] = transformToRenderedModule(module$1);
|
|
1597
|
+
});
|
|
1578
1598
|
return await handler.call(new PluginContext(options, ctx, plugin, pluginContextData), chunk);
|
|
1579
1599
|
},
|
|
1580
1600
|
meta: bindingifyPluginHookMeta(meta)
|
|
@@ -2711,12 +2731,16 @@ async function createBundler(inputOptions, outputOptions) {
|
|
|
2711
2731
|
|
|
2712
2732
|
//#endregion
|
|
2713
2733
|
//#region src/rolldown-build.ts
|
|
2734
|
+
Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
|
|
2714
2735
|
class RolldownBuild {
|
|
2715
2736
|
#inputOptions;
|
|
2716
2737
|
#bundler;
|
|
2717
2738
|
constructor(inputOptions) {
|
|
2718
2739
|
this.#inputOptions = inputOptions;
|
|
2719
2740
|
}
|
|
2741
|
+
get closed() {
|
|
2742
|
+
return this.#bundler ? this.#bundler.bundler.closed : false;
|
|
2743
|
+
}
|
|
2720
2744
|
async #getBundlerWithStopWorker(outputOptions) {
|
|
2721
2745
|
if (this.#bundler) {
|
|
2722
2746
|
this.#bundler.stopWorkers?.();
|
|
@@ -2738,6 +2762,9 @@ class RolldownBuild {
|
|
|
2738
2762
|
await stopWorkers?.();
|
|
2739
2763
|
await bundler.close();
|
|
2740
2764
|
}
|
|
2765
|
+
async [Symbol.asyncDispose]() {
|
|
2766
|
+
await this.close();
|
|
2767
|
+
}
|
|
2741
2768
|
}
|
|
2742
2769
|
|
|
2743
2770
|
//#endregion
|
package/dist/types/binding.d.ts
CHANGED
|
@@ -3,6 +3,11 @@ type Nullable<T> = T | null | undefined
|
|
|
3
3
|
type VoidNullable<T = void> = T | null | undefined | void
|
|
4
4
|
export type BindingStringOrRegex = string | RegExp
|
|
5
5
|
|
|
6
|
+
export interface RenderedModule {
|
|
7
|
+
readonly code: string | null
|
|
8
|
+
renderedLength: number
|
|
9
|
+
}
|
|
10
|
+
|
|
6
11
|
export declare class BindingLog {
|
|
7
12
|
code: string
|
|
8
13
|
message: string
|
|
@@ -32,7 +37,7 @@ export declare class BindingOutputChunk {
|
|
|
32
37
|
get moduleIds(): Array<string>
|
|
33
38
|
get exports(): Array<string>
|
|
34
39
|
get fileName(): string
|
|
35
|
-
get modules(): Record<string,
|
|
40
|
+
get modules(): Record<string, RenderedModule>
|
|
36
41
|
get imports(): Array<string>
|
|
37
42
|
get dynamicImports(): Array<string>
|
|
38
43
|
get code(): string
|
|
@@ -57,6 +62,10 @@ export declare class BindingPluginContext {
|
|
|
57
62
|
addWatchFile(file: string): void
|
|
58
63
|
}
|
|
59
64
|
|
|
65
|
+
export declare class BindingRenderedModule {
|
|
66
|
+
get code(): string | null
|
|
67
|
+
}
|
|
68
|
+
|
|
60
69
|
export declare class BindingTransformPluginContext {
|
|
61
70
|
inner(): BindingPluginContext
|
|
62
71
|
}
|
|
@@ -73,6 +82,7 @@ export declare class Bundler {
|
|
|
73
82
|
scan(): Promise<void>
|
|
74
83
|
close(): Promise<void>
|
|
75
84
|
watch(): Promise<BindingWatcher>
|
|
85
|
+
get closed(): boolean
|
|
76
86
|
}
|
|
77
87
|
|
|
78
88
|
export declare class ParallelJsPluginRegistry {
|
|
@@ -396,10 +406,6 @@ export interface BindingPluginWithIndex {
|
|
|
396
406
|
plugin: BindingPluginOptions
|
|
397
407
|
}
|
|
398
408
|
|
|
399
|
-
export interface BindingRenderedModule {
|
|
400
|
-
code?: string
|
|
401
|
-
}
|
|
402
|
-
|
|
403
409
|
export interface BindingReplacePluginConfig {
|
|
404
410
|
values: Record<string, string>
|
|
405
411
|
delimiters?: [string, string]
|
|
@@ -536,7 +542,7 @@ export interface JsOutputChunk {
|
|
|
536
542
|
moduleIds: Array<string>
|
|
537
543
|
exports: Array<string>
|
|
538
544
|
filename: string
|
|
539
|
-
modules: Record<string,
|
|
545
|
+
modules: Record<string, RenderedModule>
|
|
540
546
|
imports: Array<string>
|
|
541
547
|
dynamicImports: Array<string>
|
|
542
548
|
code: string
|
|
@@ -675,7 +681,7 @@ export interface RenderedChunk {
|
|
|
675
681
|
moduleIds: Array<string>
|
|
676
682
|
exports: Array<string>
|
|
677
683
|
fileName: string
|
|
678
|
-
modules: Record<string,
|
|
684
|
+
modules: Record<string, RenderedModule>
|
|
679
685
|
imports: Array<string>
|
|
680
686
|
dynamicImports: Array<string>
|
|
681
687
|
}
|
|
@@ -4,7 +4,9 @@ import type { RolldownOutput } from './types/rolldown-output';
|
|
|
4
4
|
export declare class RolldownBuild {
|
|
5
5
|
#private;
|
|
6
6
|
constructor(inputOptions: InputOptions);
|
|
7
|
+
get closed(): boolean;
|
|
7
8
|
generate(outputOptions?: OutputOptions): Promise<RolldownOutput>;
|
|
8
9
|
write(outputOptions?: OutputOptions): Promise<RolldownOutput>;
|
|
9
10
|
close(): Promise<void>;
|
|
11
|
+
[Symbol.asyncDispose](): Promise<void>;
|
|
10
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown",
|
|
3
|
-
"version": "0.14.0-snapshot-
|
|
3
|
+
"version": "0.14.0-snapshot-4b84829-20241117003623",
|
|
4
4
|
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
|
|
5
5
|
"homepage": "https://rolldown.rs/",
|
|
6
6
|
"repository": {
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"fs": true
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
|
-
"dtsHeader": "type MaybePromise<T> = T | Promise<T>\ntype Nullable<T> = T | null | undefined\ntype VoidNullable<T = void> = T | null | undefined | void\nexport type BindingStringOrRegex = string | RegExp\n\n"
|
|
79
|
+
"dtsHeader": "type MaybePromise<T> = T | Promise<T>\ntype Nullable<T> = T | null | undefined\ntype VoidNullable<T = void> = T | null | undefined | void\nexport type BindingStringOrRegex = string | RegExp\n\nexport interface RenderedModule {\n readonly code: string | null\n renderedLength: number\n}\n\n"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"zod": "^3.23.8"
|
|
@@ -105,21 +105,21 @@
|
|
|
105
105
|
"why-is-node-running": "^3.0.0",
|
|
106
106
|
"zod-to-json-schema": "^3.23.2",
|
|
107
107
|
"@rolldown/testing": "0.0.1",
|
|
108
|
-
"rolldown": "0.14.0-snapshot-
|
|
108
|
+
"rolldown": "0.14.0-snapshot-4b84829-20241117003623"
|
|
109
109
|
},
|
|
110
110
|
"optionalDependencies": {
|
|
111
|
-
"@rolldown/binding-darwin-
|
|
112
|
-
"@rolldown/binding-darwin-
|
|
113
|
-
"@rolldown/binding-
|
|
114
|
-
"@rolldown/binding-
|
|
115
|
-
"@rolldown/binding-linux-arm64-
|
|
116
|
-
"@rolldown/binding-linux-arm64-
|
|
117
|
-
"@rolldown/binding-linux-x64-
|
|
118
|
-
"@rolldown/binding-linux-x64-
|
|
119
|
-
"@rolldown/binding-wasm32-wasi": "0.14.0-snapshot-
|
|
120
|
-
"@rolldown/binding-win32-arm64-msvc": "0.14.0-snapshot-
|
|
121
|
-
"@rolldown/binding-win32-ia32-msvc": "0.14.0-snapshot-
|
|
122
|
-
"@rolldown/binding-win32-x64-msvc": "0.14.0-snapshot-
|
|
111
|
+
"@rolldown/binding-darwin-arm64": "0.14.0-snapshot-4b84829-20241117003623",
|
|
112
|
+
"@rolldown/binding-darwin-x64": "0.14.0-snapshot-4b84829-20241117003623",
|
|
113
|
+
"@rolldown/binding-linux-arm-gnueabihf": "0.14.0-snapshot-4b84829-20241117003623",
|
|
114
|
+
"@rolldown/binding-freebsd-x64": "0.14.0-snapshot-4b84829-20241117003623",
|
|
115
|
+
"@rolldown/binding-linux-arm64-musl": "0.14.0-snapshot-4b84829-20241117003623",
|
|
116
|
+
"@rolldown/binding-linux-arm64-gnu": "0.14.0-snapshot-4b84829-20241117003623",
|
|
117
|
+
"@rolldown/binding-linux-x64-musl": "0.14.0-snapshot-4b84829-20241117003623",
|
|
118
|
+
"@rolldown/binding-linux-x64-gnu": "0.14.0-snapshot-4b84829-20241117003623",
|
|
119
|
+
"@rolldown/binding-wasm32-wasi": "0.14.0-snapshot-4b84829-20241117003623",
|
|
120
|
+
"@rolldown/binding-win32-arm64-msvc": "0.14.0-snapshot-4b84829-20241117003623",
|
|
121
|
+
"@rolldown/binding-win32-ia32-msvc": "0.14.0-snapshot-4b84829-20241117003623",
|
|
122
|
+
"@rolldown/binding-win32-x64-msvc": "0.14.0-snapshot-4b84829-20241117003623"
|
|
123
123
|
},
|
|
124
124
|
"scripts": {
|
|
125
125
|
"# Scrips for binding #": "_",
|