rolldown 0.13.0-snapshot-514fd69-20240905003110 → 0.13.1
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 +8 -3
- package/dist/cjs/experimental-index.cjs +1 -1
- package/dist/cjs/index.cjs +2 -2
- package/dist/esm/cli.mjs +8 -3
- package/dist/esm/experimental-index.mjs +1 -1
- package/dist/esm/index.mjs +2 -2
- package/dist/shared/{package-OJCNSbf0.cjs → package-E2RafUbX.cjs} +1 -1
- package/dist/shared/{package-3VR4tEG7.mjs → package-PjxauRxS.mjs} +1 -1
- package/dist/shared/{rolldown-NGdGAW73.mjs → rolldown-6vsB7_d4.mjs} +4 -2
- package/dist/shared/{rolldown-z62CIhEW.cjs → rolldown-ESzFTeqV.cjs} +4 -2
- package/dist/shared/rolldown-binding.wasi.cjs +61 -58
- package/dist/types/binding.d.ts +31 -4
- package/dist/types/cli/arguments/schema.d.ts +41 -0
- package/dist/types/options/output-options.d.ts +82 -0
- package/package.json +14 -14
package/dist/cjs/cli.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
const { __export, __toESM } = require("../shared/chunk-gQ4GMlVi.cjs");
|
|
4
4
|
const { LogLevelOptionSchema, LogLevelSchema, LogLevelWithErrorSchema, RollupLogSchema, RollupLogWithStringSchema, arraify } = require("../shared/plugin-context-data-S1bXhfAf.cjs");
|
|
5
|
-
const { rolldown } = require("../shared/rolldown-
|
|
6
|
-
const { description, version } = require("../shared/package-
|
|
5
|
+
const { rolldown } = require("../shared/rolldown-ESzFTeqV.cjs");
|
|
6
|
+
const { description, version } = require("../shared/package-E2RafUbX.cjs");
|
|
7
7
|
const { createConsola } = require("../shared/consola.36c0034f-eps_ogJv.cjs");
|
|
8
8
|
const { default: nodePath } = __toESM(require("node:path"));
|
|
9
9
|
const { ZodFirstPartyTypeKind, ZodFirstPartyTypeKind: ZodFirstPartyTypeKind$1, ZodFirstPartyTypeKind: ZodFirstPartyTypeKind$2, z, z: z$1, z: z$2, z: z$3 } = __toESM(require("zod"));
|
|
@@ -1376,7 +1376,12 @@ const outputOptionsSchema = z$1.strictObject({
|
|
|
1376
1376
|
name: ((z$1.string()).describe("name for UMD / IIFE format outputs")).optional(),
|
|
1377
1377
|
globals: ((z$1.record(z$1.string())).describe("Comma-separated list of `module-id:global` pairs (`<module-id>:<global>,...`)")).optional(),
|
|
1378
1378
|
externalLiveBindings: (((z$1.boolean()).describe("use external live bindings")).default(true)).optional(),
|
|
1379
|
-
inlineDynamicImports: (((z$1.boolean()).describe("inline dynamic imports")).default(false)).optional()
|
|
1379
|
+
inlineDynamicImports: (((z$1.boolean()).describe("inline dynamic imports")).default(false)).optional(),
|
|
1380
|
+
advancedChunks: (z$1.strictObject({groups: (z$1.array(z$1.strictObject({
|
|
1381
|
+
name: z$1.string(),
|
|
1382
|
+
test: (z$1.string()).optional(),
|
|
1383
|
+
priority: (z$1.number()).optional()
|
|
1384
|
+
}))).optional()})).optional()
|
|
1380
1385
|
});
|
|
1381
1386
|
const getAddonDescription = (placement, wrapper) => {
|
|
1382
1387
|
return `code to insert the ${bold(placement)} of the bundled file (${bold(wrapper)} the wrapper function).`;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const { __toESM } = require("../shared/chunk-gQ4GMlVi.cjs");
|
|
4
4
|
const { require_binding } = require("../shared/plugin-context-data-S1bXhfAf.cjs");
|
|
5
|
-
const { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, transformPlugin, wasmFallbackPlugin, wasmHelperPlugin } = require("../shared/rolldown-
|
|
5
|
+
const { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, transformPlugin, wasmFallbackPlugin, wasmHelperPlugin } = require("../shared/rolldown-ESzFTeqV.cjs");
|
|
6
6
|
const { pathToFileURL } = __toESM(require("node:url"));
|
|
7
7
|
|
|
8
8
|
//#region src/plugin/parallel-plugin.ts
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
require("../shared/plugin-context-data-S1bXhfAf.cjs");
|
|
4
|
-
const { rolldown } = require("../shared/rolldown-
|
|
5
|
-
const { version } = require("../shared/package-
|
|
4
|
+
const { rolldown } = require("../shared/rolldown-ESzFTeqV.cjs");
|
|
5
|
+
const { version } = require("../shared/package-E2RafUbX.cjs");
|
|
6
6
|
|
|
7
7
|
//#region src/utils/define-config.ts
|
|
8
8
|
function defineConfig(config) {
|
package/dist/esm/cli.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import __node_module__ from 'node:module';
|
|
2
2
|
const require = __node_module__.createRequire(import.meta.url)
|
|
3
3
|
import { LogLevelOptionSchema, LogLevelSchema, LogLevelWithErrorSchema, RollupLogSchema, RollupLogWithStringSchema, __export, arraify } from "../shared/plugin-context-data-AMG1kfMv.mjs";
|
|
4
|
-
import { rolldown } from "../shared/rolldown-
|
|
5
|
-
import { description, version } from "../shared/package-
|
|
4
|
+
import { rolldown } from "../shared/rolldown-6vsB7_d4.mjs";
|
|
5
|
+
import { description, version } from "../shared/package-PjxauRxS.mjs";
|
|
6
6
|
import { createConsola } from "../shared/consola.36c0034f-m5cABVv4.mjs";
|
|
7
7
|
import { default as nodePath } from "node:path";
|
|
8
8
|
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";
|
|
@@ -1375,7 +1375,12 @@ const outputOptionsSchema = z$1.strictObject({
|
|
|
1375
1375
|
name: ((z$1.string()).describe("name for UMD / IIFE format outputs")).optional(),
|
|
1376
1376
|
globals: ((z$1.record(z$1.string())).describe("Comma-separated list of `module-id:global` pairs (`<module-id>:<global>,...`)")).optional(),
|
|
1377
1377
|
externalLiveBindings: (((z$1.boolean()).describe("use external live bindings")).default(true)).optional(),
|
|
1378
|
-
inlineDynamicImports: (((z$1.boolean()).describe("inline dynamic imports")).default(false)).optional()
|
|
1378
|
+
inlineDynamicImports: (((z$1.boolean()).describe("inline dynamic imports")).default(false)).optional(),
|
|
1379
|
+
advancedChunks: (z$1.strictObject({groups: (z$1.array(z$1.strictObject({
|
|
1380
|
+
name: z$1.string(),
|
|
1381
|
+
test: (z$1.string()).optional(),
|
|
1382
|
+
priority: (z$1.number()).optional()
|
|
1383
|
+
}))).optional()})).optional()
|
|
1379
1384
|
});
|
|
1380
1385
|
const getAddonDescription = (placement, wrapper) => {
|
|
1381
1386
|
return `code to insert the ${bold(placement)} of the bundled file (${bold(wrapper)} the wrapper function).`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import __node_module__ from 'node:module';
|
|
2
2
|
const require = __node_module__.createRequire(import.meta.url)
|
|
3
3
|
import { __toESM, require_binding } from "../shared/plugin-context-data-AMG1kfMv.mjs";
|
|
4
|
-
import { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, transformPlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/rolldown-
|
|
4
|
+
import { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins, dynamicImportVarsPlugin, experimental_scan, importGlobPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, replacePlugin, transformPlugin, wasmFallbackPlugin, wasmHelperPlugin } from "../shared/rolldown-6vsB7_d4.mjs";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
|
|
7
7
|
//#region src/plugin/parallel-plugin.ts
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import __node_module__ from 'node:module';
|
|
2
2
|
const require = __node_module__.createRequire(import.meta.url)
|
|
3
3
|
import "../shared/plugin-context-data-AMG1kfMv.mjs";
|
|
4
|
-
import { rolldown } from "../shared/rolldown-
|
|
5
|
-
import { version } from "../shared/package-
|
|
4
|
+
import { rolldown } from "../shared/rolldown-6vsB7_d4.mjs";
|
|
5
|
+
import { version } from "../shared/package-PjxauRxS.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/utils/define-config.ts
|
|
8
8
|
function defineConfig(config) {
|
|
@@ -2,7 +2,7 @@ import __node_module__ from 'node:module';
|
|
|
2
2
|
const require = __node_module__.createRequire(import.meta.url)
|
|
3
3
|
|
|
4
4
|
//#region package.json
|
|
5
|
-
const version = "0.13.
|
|
5
|
+
const version = "0.13.1";
|
|
6
6
|
const description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
@@ -916,7 +916,8 @@ function normalizeOutputOptions(opts) {
|
|
|
916
916
|
extend: opts.extend,
|
|
917
917
|
name,
|
|
918
918
|
externalLiveBindings: opts.externalLiveBindings ?? true,
|
|
919
|
-
inlineDynamicImports: opts.inlineDynamicImports ?? false
|
|
919
|
+
inlineDynamicImports: opts.inlineDynamicImports ?? false,
|
|
920
|
+
advancedChunks: opts.advancedChunks
|
|
920
921
|
};
|
|
921
922
|
}
|
|
922
923
|
function getFormat(format) {
|
|
@@ -978,7 +979,8 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
978
979
|
plugins: [],
|
|
979
980
|
minify: outputOptions.minify,
|
|
980
981
|
externalLiveBindings: outputOptions.externalLiveBindings,
|
|
981
|
-
inlineDynamicImports: outputOptions.inlineDynamicImports
|
|
982
|
+
inlineDynamicImports: outputOptions.inlineDynamicImports,
|
|
983
|
+
advancedChunks: outputOptions.advancedChunks
|
|
982
984
|
};
|
|
983
985
|
}
|
|
984
986
|
function bindingifySourcemap(sourcemap) {
|
|
@@ -917,7 +917,8 @@ function normalizeOutputOptions(opts) {
|
|
|
917
917
|
extend: opts.extend,
|
|
918
918
|
name,
|
|
919
919
|
externalLiveBindings: opts.externalLiveBindings ?? true,
|
|
920
|
-
inlineDynamicImports: opts.inlineDynamicImports ?? false
|
|
920
|
+
inlineDynamicImports: opts.inlineDynamicImports ?? false,
|
|
921
|
+
advancedChunks: opts.advancedChunks
|
|
921
922
|
};
|
|
922
923
|
}
|
|
923
924
|
function getFormat(format) {
|
|
@@ -979,7 +980,8 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
979
980
|
plugins: [],
|
|
980
981
|
minify: outputOptions.minify,
|
|
981
982
|
externalLiveBindings: outputOptions.externalLiveBindings,
|
|
982
|
-
inlineDynamicImports: outputOptions.inlineDynamicImports
|
|
983
|
+
inlineDynamicImports: outputOptions.inlineDynamicImports,
|
|
984
|
+
advancedChunks: outputOptions.advancedChunks
|
|
983
985
|
};
|
|
984
986
|
}
|
|
985
987
|
function bindingifySourcemap(sourcemap) {
|
|
@@ -89,9 +89,10 @@ function __napi_rs_initialize_modules(__napiInstance) {
|
|
|
89
89
|
__napiInstance.exports['__napi_register__TransformOptions_struct_4']?.()
|
|
90
90
|
__napiInstance.exports['__napi_register__SourceMap_struct_5']?.()
|
|
91
91
|
__napiInstance.exports['__napi_register__IsolatedDeclarationsResult_struct_6']?.()
|
|
92
|
-
__napiInstance.exports['
|
|
93
|
-
__napiInstance.exports['
|
|
94
|
-
__napiInstance.exports['
|
|
92
|
+
__napiInstance.exports['__napi_register__IsolatedDeclarationsOptions_struct_7']?.()
|
|
93
|
+
__napiInstance.exports['__napi_register__isolated_declaration_8']?.()
|
|
94
|
+
__napiInstance.exports['__napi_register__TransformResult_struct_9']?.()
|
|
95
|
+
__napiInstance.exports['__napi_register__transform_10']?.()
|
|
95
96
|
__napiInstance.exports['__napi_register__Bundler_struct_0']?.()
|
|
96
97
|
__napiInstance.exports['__napi_register__Bundler_impl_5']?.()
|
|
97
98
|
__napiInstance.exports['__napi_register__BindingInjectImportNamed_struct_6']?.()
|
|
@@ -100,61 +101,63 @@ function __napi_rs_initialize_modules(__napiInstance) {
|
|
|
100
101
|
__napiInstance.exports['__napi_register__BindingResolveOptions_struct_9']?.()
|
|
101
102
|
__napiInstance.exports['__napi_register__BindingTreeshake_struct_10']?.()
|
|
102
103
|
__napiInstance.exports['__napi_register__BindingInputOptions_struct_11']?.()
|
|
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['
|
|
104
|
+
__napiInstance.exports['__napi_register__BindingAdvancedChunksOptions_struct_12']?.()
|
|
105
|
+
__napiInstance.exports['__napi_register__BindingMatchGroup_struct_13']?.()
|
|
106
|
+
__napiInstance.exports['__napi_register__BindingOutputOptions_struct_14']?.()
|
|
107
|
+
__napiInstance.exports['__napi_register__BindingPluginContext_struct_15']?.()
|
|
108
|
+
__napiInstance.exports['__napi_register__BindingPluginContext_impl_21']?.()
|
|
109
|
+
__napiInstance.exports['__napi_register__BindingPluginContextResolvedId_struct_22']?.()
|
|
110
|
+
__napiInstance.exports['__napi_register__BindingPluginOptions_struct_23']?.()
|
|
111
|
+
__napiInstance.exports['__napi_register__BindingPluginWithIndex_struct_24']?.()
|
|
112
|
+
__napiInstance.exports['__napi_register__BindingTransformPluginContext_struct_25']?.()
|
|
113
|
+
__napiInstance.exports['__napi_register__BindingTransformPluginContext_impl_27']?.()
|
|
114
|
+
__napiInstance.exports['__napi_register__BindingAssetSource_struct_28']?.()
|
|
115
|
+
__napiInstance.exports['__napi_register__BindingEmittedAsset_struct_29']?.()
|
|
116
|
+
__napiInstance.exports['__napi_register__BindingGeneralHookFilter_struct_30']?.()
|
|
117
|
+
__napiInstance.exports['__napi_register__BindingTransformHookFilter_struct_31']?.()
|
|
118
|
+
__napiInstance.exports['__napi_register__BindingHookLoadOutput_struct_32']?.()
|
|
119
|
+
__napiInstance.exports['__napi_register__BindingHookRenderChunkOutput_struct_33']?.()
|
|
120
|
+
__napiInstance.exports['__napi_register__BindingHookResolveIdExtraArgs_struct_34']?.()
|
|
121
|
+
__napiInstance.exports['__napi_register__BindingHookResolveIdOutput_struct_35']?.()
|
|
122
|
+
__napiInstance.exports['__napi_register__BindingHookSideEffects_36']?.()
|
|
123
|
+
__napiInstance.exports['__napi_register__BindingHookTransformOutput_struct_37']?.()
|
|
124
|
+
__napiInstance.exports['__napi_register__BindingStringOrRegex_struct_38']?.()
|
|
125
|
+
__napiInstance.exports['__napi_register__BindingPluginContextResolveOptions_struct_39']?.()
|
|
126
|
+
__napiInstance.exports['__napi_register__BindingTransformHookExtraArgs_struct_40']?.()
|
|
127
|
+
__napiInstance.exports['__napi_register__BindingBuiltinPlugin_struct_41']?.()
|
|
128
|
+
__napiInstance.exports['__napi_register__BindingBuiltinPluginName_42']?.()
|
|
129
|
+
__napiInstance.exports['__napi_register__BindingGlobImportPluginConfig_struct_43']?.()
|
|
130
|
+
__napiInstance.exports['__napi_register__BindingManifestPluginConfig_struct_44']?.()
|
|
131
|
+
__napiInstance.exports['__napi_register__BindingModulePreloadPolyfillPluginConfig_struct_45']?.()
|
|
132
|
+
__napiInstance.exports['__napi_register__BindingJsonPluginConfig_struct_46']?.()
|
|
133
|
+
__napiInstance.exports['__napi_register__BindingTransformPluginConfig_struct_47']?.()
|
|
134
|
+
__napiInstance.exports['__napi_register__BindingAliasPluginConfig_struct_48']?.()
|
|
135
|
+
__napiInstance.exports['__napi_register__BindingAliasPluginAlias_struct_49']?.()
|
|
136
|
+
__napiInstance.exports['__napi_register__BindingBuildImportAnalysisPluginConfig_struct_50']?.()
|
|
137
|
+
__napiInstance.exports['__napi_register__BindingReplacePluginConfig_struct_51']?.()
|
|
138
|
+
__napiInstance.exports['__napi_register__BindingPluginOrder_52']?.()
|
|
139
|
+
__napiInstance.exports['__napi_register__BindingPluginHookMeta_struct_53']?.()
|
|
140
|
+
__napiInstance.exports['__napi_register__ParallelJsPluginRegistry_struct_54']?.()
|
|
141
|
+
__napiInstance.exports['__napi_register__ParallelJsPluginRegistry_impl_56']?.()
|
|
142
|
+
__napiInstance.exports['__napi_register__register_plugins_57']?.()
|
|
143
|
+
__napiInstance.exports['__napi_register__BindingLog_struct_58']?.()
|
|
144
|
+
__napiInstance.exports['__napi_register__BindingLogLevel_59']?.()
|
|
145
|
+
__napiInstance.exports['__napi_register__BindingModuleInfo_struct_60']?.()
|
|
146
|
+
__napiInstance.exports['__napi_register__BindingModuleInfo_impl_62']?.()
|
|
147
|
+
__napiInstance.exports['__napi_register__BindingOutputAsset_struct_63']?.()
|
|
148
|
+
__napiInstance.exports['__napi_register__BindingOutputAsset_impl_69']?.()
|
|
149
|
+
__napiInstance.exports['__napi_register__BindingOutputChunk_struct_70']?.()
|
|
150
|
+
__napiInstance.exports['__napi_register__BindingOutputChunk_impl_88']?.()
|
|
151
|
+
__napiInstance.exports['__napi_register__BindingOutputs_struct_89']?.()
|
|
152
|
+
__napiInstance.exports['__napi_register__BindingOutputs_impl_93']?.()
|
|
153
|
+
__napiInstance.exports['__napi_register__FinalBindingOutputs_struct_94']?.()
|
|
154
|
+
__napiInstance.exports['__napi_register__FinalBindingOutputs_impl_97']?.()
|
|
155
|
+
__napiInstance.exports['__napi_register__PreRenderedChunk_struct_98']?.()
|
|
156
|
+
__napiInstance.exports['__napi_register__RenderedChunk_struct_99']?.()
|
|
157
|
+
__napiInstance.exports['__napi_register__BindingRenderedModule_struct_100']?.()
|
|
158
|
+
__napiInstance.exports['__napi_register__AliasItem_struct_101']?.()
|
|
159
|
+
__napiInstance.exports['__napi_register__BindingSourcemap_struct_102']?.()
|
|
160
|
+
__napiInstance.exports['__napi_register__BindingJsonSourcemap_struct_103']?.()
|
|
158
161
|
}
|
|
159
162
|
module.exports.BindingLog = __napiModule.exports.BindingLog
|
|
160
163
|
module.exports.BindingModuleInfo = __napiModule.exports.BindingModuleInfo
|
package/dist/types/binding.d.ts
CHANGED
|
@@ -102,6 +102,10 @@ export interface ArrowFunctionsBindingOptions {
|
|
|
102
102
|
spec?: boolean
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
export interface BindingAdvancedChunksOptions {
|
|
106
|
+
groups?: Array<BindingMatchGroup>
|
|
107
|
+
}
|
|
108
|
+
|
|
105
109
|
export interface BindingAliasPluginAlias {
|
|
106
110
|
find: BindingStringOrRegex
|
|
107
111
|
replacement: string
|
|
@@ -257,6 +261,12 @@ export interface BindingManifestPluginConfig {
|
|
|
257
261
|
outPath: string
|
|
258
262
|
}
|
|
259
263
|
|
|
264
|
+
export interface BindingMatchGroup {
|
|
265
|
+
name: string
|
|
266
|
+
test?: string
|
|
267
|
+
priority?: number
|
|
268
|
+
}
|
|
269
|
+
|
|
260
270
|
export interface BindingModulePreloadPolyfillPluginConfig {
|
|
261
271
|
skip?: boolean
|
|
262
272
|
}
|
|
@@ -283,6 +293,7 @@ export interface BindingOutputOptions {
|
|
|
283
293
|
sourcemapIgnoreList?: (source: string, sourcemapPath: string) => boolean
|
|
284
294
|
sourcemapPathTransform?: (source: string, sourcemapPath: string) => string
|
|
285
295
|
minify?: boolean
|
|
296
|
+
advancedChunks?: BindingAdvancedChunksOptions
|
|
286
297
|
}
|
|
287
298
|
|
|
288
299
|
export interface BindingPluginContextResolvedId {
|
|
@@ -419,10 +430,15 @@ export interface Es2015BindingOptions {
|
|
|
419
430
|
}
|
|
420
431
|
|
|
421
432
|
/** TypeScript Isolated Declarations for Standalone DTS Emit */
|
|
422
|
-
export declare function isolatedDeclaration(filename: string, sourceText: string): IsolatedDeclarationsResult
|
|
433
|
+
export declare function isolatedDeclaration(filename: string, sourceText: string, options: IsolatedDeclarationsOptions): IsolatedDeclarationsResult
|
|
434
|
+
|
|
435
|
+
export interface IsolatedDeclarationsOptions {
|
|
436
|
+
sourcemap: boolean
|
|
437
|
+
}
|
|
423
438
|
|
|
424
439
|
export interface IsolatedDeclarationsResult {
|
|
425
|
-
|
|
440
|
+
code: string
|
|
441
|
+
map?: SourceMap
|
|
426
442
|
errors: Array<string>
|
|
427
443
|
}
|
|
428
444
|
|
|
@@ -600,13 +616,13 @@ export interface TransformResult {
|
|
|
600
616
|
*
|
|
601
617
|
* If parsing failed, this will be an empty string.
|
|
602
618
|
*/
|
|
603
|
-
|
|
619
|
+
code: string
|
|
604
620
|
/**
|
|
605
621
|
* The source map for the transformed code.
|
|
606
622
|
*
|
|
607
623
|
* This will be set if {@link TransformOptions#sourcemap} is `true`.
|
|
608
624
|
*/
|
|
609
|
-
|
|
625
|
+
map?: SourceMap
|
|
610
626
|
/**
|
|
611
627
|
* The `.d.ts` declaration file for the transformed code. Declarations are
|
|
612
628
|
* only generated if `declaration` is set to `true` and a TypeScript file
|
|
@@ -650,5 +666,16 @@ export interface TypeScriptBindingOptions {
|
|
|
650
666
|
* @default false
|
|
651
667
|
*/
|
|
652
668
|
declaration?: boolean
|
|
669
|
+
/**
|
|
670
|
+
* Rewrite or remove TypeScript import/export declaration extensions.
|
|
671
|
+
*
|
|
672
|
+
* - When set to `rewrite`, it will change `.ts`, `.mts`, `.cts` extensions to `.js`, `.mjs`, `.cjs` respectively.
|
|
673
|
+
* - When set to `remove`, it will remove `.ts`/`.mts`/`.cts`/`.tsx` extension entirely.
|
|
674
|
+
* - When set to `true`, it's equivalent to `rewrite`.
|
|
675
|
+
* - When set to `false` or omitted, no changes will be made to the extensions.
|
|
676
|
+
*
|
|
677
|
+
* @default false
|
|
678
|
+
*/
|
|
679
|
+
rewriteImportExtensions?: 'rewrite' | 'remove' | boolean
|
|
653
680
|
}
|
|
654
681
|
|
|
@@ -84,6 +84,33 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
84
84
|
globals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
85
85
|
externalLiveBindings: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
86
86
|
inlineDynamicImports: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
87
|
+
advancedChunks: z.ZodOptional<z.ZodObject<{
|
|
88
|
+
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
89
|
+
name: z.ZodString;
|
|
90
|
+
test: z.ZodOptional<z.ZodString>;
|
|
91
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
}, "strict", z.ZodTypeAny, {
|
|
93
|
+
name: string;
|
|
94
|
+
test?: string | undefined;
|
|
95
|
+
priority?: number | undefined;
|
|
96
|
+
}, {
|
|
97
|
+
name: string;
|
|
98
|
+
test?: string | undefined;
|
|
99
|
+
priority?: number | undefined;
|
|
100
|
+
}>, "many">>;
|
|
101
|
+
}, "strict", z.ZodTypeAny, {
|
|
102
|
+
groups?: {
|
|
103
|
+
name: string;
|
|
104
|
+
test?: string | undefined;
|
|
105
|
+
priority?: number | undefined;
|
|
106
|
+
}[] | undefined;
|
|
107
|
+
}, {
|
|
108
|
+
groups?: {
|
|
109
|
+
name: string;
|
|
110
|
+
test?: string | undefined;
|
|
111
|
+
priority?: number | undefined;
|
|
112
|
+
}[] | undefined;
|
|
113
|
+
}>>;
|
|
87
114
|
}, {
|
|
88
115
|
banner: z.ZodOptional<z.ZodString>;
|
|
89
116
|
footer: z.ZodOptional<z.ZodString>;
|
|
@@ -121,6 +148,13 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
121
148
|
globals?: Record<string, string> | undefined;
|
|
122
149
|
externalLiveBindings?: boolean | undefined;
|
|
123
150
|
inlineDynamicImports?: boolean | undefined;
|
|
151
|
+
advancedChunks?: {
|
|
152
|
+
groups?: {
|
|
153
|
+
name: string;
|
|
154
|
+
test?: string | undefined;
|
|
155
|
+
priority?: number | undefined;
|
|
156
|
+
}[] | undefined;
|
|
157
|
+
} | undefined;
|
|
124
158
|
version?: boolean | undefined;
|
|
125
159
|
config?: string | boolean | undefined;
|
|
126
160
|
help?: boolean | undefined;
|
|
@@ -153,6 +187,13 @@ export declare const cliOptionsSchema: z.ZodObject<z.objectUtil.extendShape<z.ob
|
|
|
153
187
|
globals?: Record<string, string> | undefined;
|
|
154
188
|
externalLiveBindings?: boolean | undefined;
|
|
155
189
|
inlineDynamicImports?: boolean | undefined;
|
|
190
|
+
advancedChunks?: {
|
|
191
|
+
groups?: {
|
|
192
|
+
name: string;
|
|
193
|
+
test?: string | undefined;
|
|
194
|
+
priority?: number | undefined;
|
|
195
|
+
}[] | undefined;
|
|
196
|
+
} | undefined;
|
|
156
197
|
version?: boolean | undefined;
|
|
157
198
|
config?: string | boolean | undefined;
|
|
158
199
|
help?: boolean | undefined;
|
|
@@ -22,6 +22,33 @@ declare const outputOptionsSchema: z.ZodObject<{
|
|
|
22
22
|
globals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
23
23
|
externalLiveBindings: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
24
24
|
inlineDynamicImports: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
25
|
+
advancedChunks: z.ZodOptional<z.ZodObject<{
|
|
26
|
+
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
27
|
+
name: z.ZodString;
|
|
28
|
+
test: z.ZodOptional<z.ZodString>;
|
|
29
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
}, "strict", z.ZodTypeAny, {
|
|
31
|
+
name: string;
|
|
32
|
+
test?: string | undefined;
|
|
33
|
+
priority?: number | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
name: string;
|
|
36
|
+
test?: string | undefined;
|
|
37
|
+
priority?: number | undefined;
|
|
38
|
+
}>, "many">>;
|
|
39
|
+
}, "strict", z.ZodTypeAny, {
|
|
40
|
+
groups?: {
|
|
41
|
+
name: string;
|
|
42
|
+
test?: string | undefined;
|
|
43
|
+
priority?: number | undefined;
|
|
44
|
+
}[] | undefined;
|
|
45
|
+
}, {
|
|
46
|
+
groups?: {
|
|
47
|
+
name: string;
|
|
48
|
+
test?: string | undefined;
|
|
49
|
+
priority?: number | undefined;
|
|
50
|
+
}[] | undefined;
|
|
51
|
+
}>>;
|
|
25
52
|
}, "strict", z.ZodTypeAny, {
|
|
26
53
|
footer?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
27
54
|
banner?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
@@ -43,6 +70,13 @@ declare const outputOptionsSchema: z.ZodObject<{
|
|
|
43
70
|
globals?: Record<string, string> | undefined;
|
|
44
71
|
externalLiveBindings?: boolean | undefined;
|
|
45
72
|
inlineDynamicImports?: boolean | undefined;
|
|
73
|
+
advancedChunks?: {
|
|
74
|
+
groups?: {
|
|
75
|
+
name: string;
|
|
76
|
+
test?: string | undefined;
|
|
77
|
+
priority?: number | undefined;
|
|
78
|
+
}[] | undefined;
|
|
79
|
+
} | undefined;
|
|
46
80
|
}, {
|
|
47
81
|
footer?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
48
82
|
banner?: string | ((args_0: RenderedChunk, ...args_1: unknown[]) => string | Promise<string>) | undefined;
|
|
@@ -64,6 +98,13 @@ declare const outputOptionsSchema: z.ZodObject<{
|
|
|
64
98
|
globals?: Record<string, string> | undefined;
|
|
65
99
|
externalLiveBindings?: boolean | undefined;
|
|
66
100
|
inlineDynamicImports?: boolean | undefined;
|
|
101
|
+
advancedChunks?: {
|
|
102
|
+
groups?: {
|
|
103
|
+
name: string;
|
|
104
|
+
test?: string | undefined;
|
|
105
|
+
priority?: number | undefined;
|
|
106
|
+
}[] | undefined;
|
|
107
|
+
} | undefined;
|
|
67
108
|
}>;
|
|
68
109
|
export declare const outputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
69
110
|
dir: z.ZodOptional<z.ZodString>;
|
|
@@ -86,6 +127,33 @@ export declare const outputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.exten
|
|
|
86
127
|
globals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
87
128
|
externalLiveBindings: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
88
129
|
inlineDynamicImports: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
130
|
+
advancedChunks: z.ZodOptional<z.ZodObject<{
|
|
131
|
+
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
132
|
+
name: z.ZodString;
|
|
133
|
+
test: z.ZodOptional<z.ZodString>;
|
|
134
|
+
priority: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
}, "strict", z.ZodTypeAny, {
|
|
136
|
+
name: string;
|
|
137
|
+
test?: string | undefined;
|
|
138
|
+
priority?: number | undefined;
|
|
139
|
+
}, {
|
|
140
|
+
name: string;
|
|
141
|
+
test?: string | undefined;
|
|
142
|
+
priority?: number | undefined;
|
|
143
|
+
}>, "many">>;
|
|
144
|
+
}, "strict", z.ZodTypeAny, {
|
|
145
|
+
groups?: {
|
|
146
|
+
name: string;
|
|
147
|
+
test?: string | undefined;
|
|
148
|
+
priority?: number | undefined;
|
|
149
|
+
}[] | undefined;
|
|
150
|
+
}, {
|
|
151
|
+
groups?: {
|
|
152
|
+
name: string;
|
|
153
|
+
test?: string | undefined;
|
|
154
|
+
priority?: number | undefined;
|
|
155
|
+
}[] | undefined;
|
|
156
|
+
}>>;
|
|
89
157
|
}, {
|
|
90
158
|
banner: z.ZodOptional<z.ZodString>;
|
|
91
159
|
footer: z.ZodOptional<z.ZodString>;
|
|
@@ -114,6 +182,13 @@ export declare const outputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.exten
|
|
|
114
182
|
globals?: Record<string, string> | undefined;
|
|
115
183
|
externalLiveBindings?: boolean | undefined;
|
|
116
184
|
inlineDynamicImports?: boolean | undefined;
|
|
185
|
+
advancedChunks?: {
|
|
186
|
+
groups?: {
|
|
187
|
+
name: string;
|
|
188
|
+
test?: string | undefined;
|
|
189
|
+
priority?: number | undefined;
|
|
190
|
+
}[] | undefined;
|
|
191
|
+
} | undefined;
|
|
117
192
|
}, {
|
|
118
193
|
footer?: string | undefined;
|
|
119
194
|
banner?: string | undefined;
|
|
@@ -134,6 +209,13 @@ export declare const outputCliOptionsSchema: z.ZodObject<Omit<z.objectUtil.exten
|
|
|
134
209
|
globals?: Record<string, string> | undefined;
|
|
135
210
|
externalLiveBindings?: boolean | undefined;
|
|
136
211
|
inlineDynamicImports?: boolean | undefined;
|
|
212
|
+
advancedChunks?: {
|
|
213
|
+
groups?: {
|
|
214
|
+
name: string;
|
|
215
|
+
test?: string | undefined;
|
|
216
|
+
priority?: number | undefined;
|
|
217
|
+
}[] | undefined;
|
|
218
|
+
} | undefined;
|
|
137
219
|
}>;
|
|
138
220
|
export type OutputOptions = z.infer<typeof outputOptionsSchema>;
|
|
139
221
|
export type SourcemapIgnoreListOption = (relativeSourcePath: string, sourcemapPath: string) => boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
|
|
5
5
|
"homepage": "https://rolldown.rs/",
|
|
6
6
|
"repository": {
|
|
@@ -103,21 +103,21 @@
|
|
|
103
103
|
"why-is-node-running": "^3.0.0",
|
|
104
104
|
"zod-to-json-schema": "^3.23.2",
|
|
105
105
|
"@rolldown/testing": "0.0.1",
|
|
106
|
-
"rolldown": "0.13.
|
|
106
|
+
"rolldown": "0.13.1"
|
|
107
107
|
},
|
|
108
108
|
"optionalDependencies": {
|
|
109
|
-
"@rolldown/binding-
|
|
110
|
-
"@rolldown/binding-darwin-
|
|
111
|
-
"@rolldown/binding-
|
|
112
|
-
"@rolldown/binding-
|
|
113
|
-
"@rolldown/binding-linux-arm64-
|
|
114
|
-
"@rolldown/binding-linux-
|
|
115
|
-
"@rolldown/binding-linux-x64-
|
|
116
|
-
"@rolldown/binding-linux-
|
|
117
|
-
"@rolldown/binding-wasm32-wasi": "0.13.
|
|
118
|
-
"@rolldown/binding-win32-
|
|
119
|
-
"@rolldown/binding-win32-arm64-msvc": "0.13.
|
|
120
|
-
"@rolldown/binding-win32-
|
|
109
|
+
"@rolldown/binding-darwin-arm64": "0.13.1",
|
|
110
|
+
"@rolldown/binding-darwin-x64": "0.13.1",
|
|
111
|
+
"@rolldown/binding-freebsd-x64": "0.13.1",
|
|
112
|
+
"@rolldown/binding-linux-arm64-gnu": "0.13.1",
|
|
113
|
+
"@rolldown/binding-linux-arm64-musl": "0.13.1",
|
|
114
|
+
"@rolldown/binding-linux-arm-gnueabihf": "0.13.1",
|
|
115
|
+
"@rolldown/binding-linux-x64-gnu": "0.13.1",
|
|
116
|
+
"@rolldown/binding-linux-x64-musl": "0.13.1",
|
|
117
|
+
"@rolldown/binding-wasm32-wasi": "0.13.1",
|
|
118
|
+
"@rolldown/binding-win32-ia32-msvc": "0.13.1",
|
|
119
|
+
"@rolldown/binding-win32-arm64-msvc": "0.13.1",
|
|
120
|
+
"@rolldown/binding-win32-x64-msvc": "0.13.1"
|
|
121
121
|
},
|
|
122
122
|
"scripts": {
|
|
123
123
|
"# Scrips for binding #": "_",
|