@rolldown/browser 1.0.0-beta.33 → 1.0.0-beta.34
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 +31 -31
- package/dist/cli.mjs +31 -31
- 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.browser.mjs +34 -3
- package/dist/experimental-index.cjs +36 -2
- package/dist/experimental-index.d.cts +36 -4
- package/dist/experimental-index.d.mts +36 -4
- package/dist/experimental-index.mjs +35 -4
- package/dist/filter-index.d.cts +2 -2
- package/dist/filter-index.d.mts +2 -2
- package/dist/index.browser.mjs +1 -1
- 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/rolldown-binding.wasi-browser.js +3 -0
- package/dist/rolldown-binding.wasi.cjs +3 -0
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-CFhvYkVn.d.mts → binding-9k0egz6L.d.mts} +107 -7
- package/dist/shared/{binding-DQk9TN_A.d.cts → binding-D13M6Llu.d.cts} +107 -7
- package/dist/shared/{define-config-B3QOs3Kt.d.cts → define-config-D5AluabE.d.cts} +63 -24
- package/dist/shared/{define-config-DyjJkNqG.d.mts → define-config-DzIQxNqU.d.mts} +63 -24
- package/dist/shared/{load-config-CLPLfZVe.mjs → load-config--VYNOtUY.mjs} +1 -1
- package/dist/shared/{load-config-xKQFLlGV.cjs → load-config-DfHD1OI9.cjs} +1 -1
- package/dist/shared/{parse-ast-index-BGzB5Bo-.mjs → parse-ast-index-C_CZT4St.mjs} +1 -1
- package/dist/shared/{parse-ast-index-BZfwAN9P.cjs → parse-ast-index-ChWj_C49.cjs} +1 -1
- package/dist/shared/{src-CZgQg1yE.mjs → src-B4V64IkU.mjs} +105 -90
- package/dist/shared/{src-CGziNJPr.cjs → src-McCMqGpa.cjs} +122 -95
- package/dist/{src-D_htlJ_o.js → src-Bl12Y5ab.js} +102 -87
- package/package.json +19 -11
|
@@ -1,9 +1,40 @@
|
|
|
1
|
-
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { BuiltinPlugin, PluginDriver, assetPlugin, buildImportAnalysisPlugin, createBundlerImpl, createBundlerOptions, dynamicImportVarsPlugin, esmExternalRequirePlugin, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin } from "./shared/src-B4V64IkU.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-C_CZT4St.mjs";
|
|
3
3
|
import "./shared/dist-ByKQkexh.mjs";
|
|
4
|
-
import { BindingBundler, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
4
|
+
import { BindingBundler, BindingDevEngine, ResolverFactory, isolatedDeclaration, moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
|
|
7
|
+
//#region src/api/dev/dev-engine.ts
|
|
8
|
+
var DevEngine = class DevEngine {
|
|
9
|
+
#inner;
|
|
10
|
+
#cachedBuildFinishPromise = null;
|
|
11
|
+
static async create(inputOptions, outputOptions) {
|
|
12
|
+
inputOptions = await PluginDriver.callOptionsHook(inputOptions);
|
|
13
|
+
const options = await createBundlerOptions(inputOptions, outputOptions, false);
|
|
14
|
+
const inner = new BindingDevEngine(options.bundlerOptions);
|
|
15
|
+
return new DevEngine(inner);
|
|
16
|
+
}
|
|
17
|
+
constructor(inner) {
|
|
18
|
+
this.#inner = inner;
|
|
19
|
+
}
|
|
20
|
+
async run() {
|
|
21
|
+
await this.#inner.run();
|
|
22
|
+
}
|
|
23
|
+
async ensureCurrentBuildFinish() {
|
|
24
|
+
if (this.#cachedBuildFinishPromise) return this.#cachedBuildFinishPromise;
|
|
25
|
+
const promise = this.#inner.ensureCurrentBuildFinish().then(() => {
|
|
26
|
+
this.#cachedBuildFinishPromise = null;
|
|
27
|
+
});
|
|
28
|
+
this.#cachedBuildFinishPromise = promise;
|
|
29
|
+
return promise;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/api/dev/index.ts
|
|
35
|
+
var dev = DevEngine.create;
|
|
36
|
+
|
|
37
|
+
//#endregion
|
|
7
38
|
//#region src/api/experimental.ts
|
|
8
39
|
/**
|
|
9
40
|
* This is an experimental API. It's behavior may change in the future.
|
|
@@ -80,4 +111,4 @@ function transformPlugin(config) {
|
|
|
80
111
|
}
|
|
81
112
|
|
|
82
113
|
//#endregion
|
|
83
|
-
export { ResolverFactory, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
|
114
|
+
export { DevEngine, ResolverFactory, aliasPlugin, assetPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dev, dynamicImportVarsPlugin, esmExternalRequirePlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reporterPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, webWorkerPostPlugin };
|
package/dist/filter-index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { withFilter } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-D13M6Llu.cjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-D5AluabE.cjs";
|
|
3
3
|
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
4
4
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { withFilter } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-9k0egz6L.mjs";
|
|
2
|
+
import { withFilter } from "./shared/define-config-DzIQxNqU.mjs";
|
|
3
3
|
import { and, code, exclude, id, include, moduleType, not, or, queries, query } from "@rolldown/pluginutils";
|
|
4
4
|
export { and, code, exclude, id, include, moduleType, not, or, queries, query, withFilter };
|
package/dist/index.browser.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_src = require('./shared/src-
|
|
2
|
-
require('./shared/parse-ast-index-
|
|
1
|
+
const require_src = require('./shared/src-McCMqGpa.cjs');
|
|
2
|
+
require('./shared/parse-ast-index-ChWj_C49.cjs');
|
|
3
3
|
require('./shared/dist-CK0hotcm.cjs');
|
|
4
4
|
|
|
5
5
|
exports.VERSION = require_src.VERSION;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding-
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-D13M6Llu.cjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-D5AluabE.cjs";
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding-
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding-9k0egz6L.mjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch } from "./shared/define-config-DzIQxNqU.mjs";
|
|
3
3
|
export { AddonFunction, AsyncPluginHooks, BufferEncoding, BuildOptions, ChunkFileNamesFunction, ChunkingContext, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, ModuleTypes, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OptimizationOptions, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownDirectoryEntry, RolldownFileStats, RolldownFsModule, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build, defineConfig, rolldown, watch };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { VERSION, build, defineConfig, rolldown, watch } from "./shared/src-B4V64IkU.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-C_CZT4St.mjs";
|
|
3
3
|
import "./shared/dist-ByKQkexh.mjs";
|
|
4
4
|
|
|
5
5
|
export { VERSION, build, defineConfig, rolldown, watch };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-DDkG_k5U.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
3
|
-
require('./shared/parse-ast-index-
|
|
2
|
+
const require_src = require('./shared/src-McCMqGpa.cjs');
|
|
3
|
+
require('./shared/parse-ast-index-ChWj_C49.cjs');
|
|
4
4
|
require('./shared/dist-CK0hotcm.cjs');
|
|
5
5
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
|
|
6
6
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PluginContextData, bindingifyPlugin } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { PluginContextData, bindingifyPlugin } from "./shared/src-B4V64IkU.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-C_CZT4St.mjs";
|
|
3
3
|
import "./shared/dist-ByKQkexh.mjs";
|
|
4
4
|
import { registerPlugins } from "./rolldown-binding.wasi.cjs";
|
|
5
5
|
import { parentPort, workerData } from "node:worker_threads";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-D13M6Llu.cjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-D5AluabE.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding-
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/define-config-
|
|
1
|
+
import "./shared/binding-9k0egz6L.mjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/define-config-DzIQxNqU.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/plugin/parallel-plugin-implementation.d.ts
|
|
5
5
|
type ParallelPluginImplementation = Plugin;
|
package/dist/parse-ast-index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_parse_ast_index = require('./shared/parse-ast-index-
|
|
1
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-ChWj_C49.cjs');
|
|
2
2
|
|
|
3
3
|
exports.parseAst = require_parse_ast_index.parseAst;
|
|
4
4
|
exports.parseAstAsync = require_parse_ast_index.parseAstAsync;
|
package/dist/parse-ast-index.mjs
CHANGED
|
@@ -63,6 +63,7 @@ const {
|
|
|
63
63
|
},
|
|
64
64
|
})
|
|
65
65
|
export default __napiModule.exports
|
|
66
|
+
export const minify = __napiModule.exports.minify
|
|
66
67
|
export const Severity = __napiModule.exports.Severity
|
|
67
68
|
export const ParseResult = __napiModule.exports.ParseResult
|
|
68
69
|
export const ExportExportNameKind = __napiModule.exports.ExportExportNameKind
|
|
@@ -86,6 +87,7 @@ export const BindingBundler = __napiModule.exports.BindingBundler
|
|
|
86
87
|
export const BindingBundlerImpl = __napiModule.exports.BindingBundlerImpl
|
|
87
88
|
export const BindingCallableBuiltinPlugin = __napiModule.exports.BindingCallableBuiltinPlugin
|
|
88
89
|
export const BindingChunkingContext = __napiModule.exports.BindingChunkingContext
|
|
90
|
+
export const BindingDevEngine = __napiModule.exports.BindingDevEngine
|
|
89
91
|
export const BindingHmrOutput = __napiModule.exports.BindingHmrOutput
|
|
90
92
|
export const BindingModuleInfo = __napiModule.exports.BindingModuleInfo
|
|
91
93
|
export const BindingNormalizedOptions = __napiModule.exports.BindingNormalizedOptions
|
|
@@ -111,3 +113,4 @@ export const FilterTokenKind = __napiModule.exports.FilterTokenKind
|
|
|
111
113
|
export const registerPlugins = __napiModule.exports.registerPlugins
|
|
112
114
|
export const shutdownAsyncRuntime = __napiModule.exports.shutdownAsyncRuntime
|
|
113
115
|
export const startAsyncRuntime = __napiModule.exports.startAsyncRuntime
|
|
116
|
+
export const JsWatcher = __napiModule.exports.JsWatcher
|
|
@@ -108,6 +108,7 @@ const { instance: __napiInstance, module: __wasiModule, napiModule: __napiModule
|
|
|
108
108
|
},
|
|
109
109
|
})
|
|
110
110
|
module.exports = __napiModule.exports
|
|
111
|
+
module.exports.minify = __napiModule.exports.minify
|
|
111
112
|
module.exports.Severity = __napiModule.exports.Severity
|
|
112
113
|
module.exports.ParseResult = __napiModule.exports.ParseResult
|
|
113
114
|
module.exports.ExportExportNameKind = __napiModule.exports.ExportExportNameKind
|
|
@@ -131,6 +132,7 @@ module.exports.BindingBundler = __napiModule.exports.BindingBundler
|
|
|
131
132
|
module.exports.BindingBundlerImpl = __napiModule.exports.BindingBundlerImpl
|
|
132
133
|
module.exports.BindingCallableBuiltinPlugin = __napiModule.exports.BindingCallableBuiltinPlugin
|
|
133
134
|
module.exports.BindingChunkingContext = __napiModule.exports.BindingChunkingContext
|
|
135
|
+
module.exports.BindingDevEngine = __napiModule.exports.BindingDevEngine
|
|
134
136
|
module.exports.BindingHmrOutput = __napiModule.exports.BindingHmrOutput
|
|
135
137
|
module.exports.BindingModuleInfo = __napiModule.exports.BindingModuleInfo
|
|
136
138
|
module.exports.BindingNormalizedOptions = __napiModule.exports.BindingNormalizedOptions
|
|
@@ -156,3 +158,4 @@ module.exports.FilterTokenKind = __napiModule.exports.FilterTokenKind
|
|
|
156
158
|
module.exports.registerPlugins = __napiModule.exports.registerPlugins
|
|
157
159
|
module.exports.shutdownAsyncRuntime = __napiModule.exports.shutdownAsyncRuntime
|
|
158
160
|
module.exports.startAsyncRuntime = __napiModule.exports.startAsyncRuntime
|
|
161
|
+
module.exports.JsWatcher = __napiModule.exports.JsWatcher
|
|
Binary file
|
|
@@ -4,6 +4,108 @@ import * as _oxc_project_types0 from "@oxc-project/types";
|
|
|
4
4
|
type MaybePromise<T> = T | Promise<T>;
|
|
5
5
|
type VoidNullable<T = void> = T | null | undefined | void;
|
|
6
6
|
type BindingStringOrRegex = string | RegExp;
|
|
7
|
+
interface CodegenOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Remove whitespace.
|
|
10
|
+
*
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
removeWhitespace?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface CompressOptions {
|
|
16
|
+
/**
|
|
17
|
+
* Set desired EcmaScript standard version for output.
|
|
18
|
+
*
|
|
19
|
+
* Set `esnext` to enable all target highering.
|
|
20
|
+
*
|
|
21
|
+
* e.g.
|
|
22
|
+
*
|
|
23
|
+
* * catch optional binding when >= es2019
|
|
24
|
+
* * `??` operator >= es2020
|
|
25
|
+
*
|
|
26
|
+
* @default 'esnext'
|
|
27
|
+
*/
|
|
28
|
+
target?: 'esnext' | 'es2015' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020' | 'es2021' | 'es2022' | 'es2023' | 'es2024';
|
|
29
|
+
/**
|
|
30
|
+
* Pass true to discard calls to `console.*`.
|
|
31
|
+
*
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
dropConsole?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Remove `debugger;` statements.
|
|
37
|
+
*
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
dropDebugger?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Drop unreferenced functions and variables.
|
|
43
|
+
*
|
|
44
|
+
* Simple direct variable assignments do not count as references unless set to "keep_assign".
|
|
45
|
+
*/
|
|
46
|
+
unused?: true | false | 'keep_assign';
|
|
47
|
+
/** Keep function / class names. */
|
|
48
|
+
keepNames?: CompressOptionsKeepNames;
|
|
49
|
+
}
|
|
50
|
+
interface CompressOptionsKeepNames {
|
|
51
|
+
/**
|
|
52
|
+
* Keep function names so that `Function.prototype.name` is preserved.
|
|
53
|
+
*
|
|
54
|
+
* This does not guarantee that the `undefined` name is preserved.
|
|
55
|
+
*
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
function: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Keep class names so that `Class.prototype.name` is preserved.
|
|
61
|
+
*
|
|
62
|
+
* This does not guarantee that the `undefined` name is preserved.
|
|
63
|
+
*
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
66
|
+
class: boolean;
|
|
67
|
+
}
|
|
68
|
+
interface MangleOptions {
|
|
69
|
+
/**
|
|
70
|
+
* Pass `true` to mangle names declared in the top level scope.
|
|
71
|
+
*
|
|
72
|
+
* @default false
|
|
73
|
+
*/
|
|
74
|
+
toplevel?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Preserve `name` property for functions and classes.
|
|
77
|
+
*
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
keepNames?: boolean | MangleOptionsKeepNames;
|
|
81
|
+
/** Debug mangled names. */
|
|
82
|
+
debug?: boolean;
|
|
83
|
+
}
|
|
84
|
+
interface MangleOptionsKeepNames {
|
|
85
|
+
/**
|
|
86
|
+
* Preserve `name` property for functions.
|
|
87
|
+
*
|
|
88
|
+
* @default false
|
|
89
|
+
*/
|
|
90
|
+
function: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Preserve `name` property for classes.
|
|
93
|
+
*
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
class: boolean;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Minify synchronously. */
|
|
100
|
+
|
|
101
|
+
interface MinifyOptions {
|
|
102
|
+
/** Use when minifying an ES6 module. */
|
|
103
|
+
module?: boolean;
|
|
104
|
+
compress?: boolean | CompressOptions;
|
|
105
|
+
mangle?: boolean | MangleOptions;
|
|
106
|
+
codegen?: boolean | CodegenOptions;
|
|
107
|
+
sourcemap?: boolean;
|
|
108
|
+
}
|
|
7
109
|
interface Comment {
|
|
8
110
|
type: 'Line' | 'Block';
|
|
9
111
|
value: string;
|
|
@@ -1162,7 +1264,7 @@ interface BindingBuildImportAnalysisPluginConfig {
|
|
|
1162
1264
|
renderBuiltUrl: boolean;
|
|
1163
1265
|
isRelativeBase: boolean;
|
|
1164
1266
|
}
|
|
1165
|
-
type BindingBuiltinPluginName = 'builtin:alias' | 'builtin:asset' | 'builtin:asset-import-meta-url' | 'builtin:build-import-analysis' | 'builtin:dynamic-import-vars' | 'builtin:import-glob' | 'builtin:isolated-declaration' | 'builtin:json' | 'builtin:load-fallback' | 'builtin:manifest' | 'builtin:module-preload-polyfill' | 'builtin:oxc-runtime' | 'builtin:reporter' | 'builtin:replace' | 'builtin:transform' | 'builtin:vite-resolve' | 'builtin:wasm-fallback' | 'builtin:wasm-helper' | 'builtin:web-worker-post';
|
|
1267
|
+
type BindingBuiltinPluginName = 'builtin:alias' | 'builtin:asset' | 'builtin:asset-import-meta-url' | 'builtin:build-import-analysis' | 'builtin:dynamic-import-vars' | 'builtin:import-glob' | 'builtin:isolated-declaration' | 'builtin:json' | 'builtin:load-fallback' | 'builtin:manifest' | 'builtin:module-preload-polyfill' | 'builtin:oxc-runtime' | 'builtin:reporter' | 'builtin:replace' | 'builtin:esm-external-require' | 'builtin:transform' | 'builtin:vite-resolve' | 'builtin:wasm-fallback' | 'builtin:wasm-helper' | 'builtin:web-worker-post';
|
|
1166
1268
|
interface BindingDynamicImportVarsPluginConfig {
|
|
1167
1269
|
include?: Array<BindingStringOrRegex>;
|
|
1168
1270
|
exclude?: Array<BindingStringOrRegex>;
|
|
@@ -1172,6 +1274,9 @@ interface BindingError {
|
|
|
1172
1274
|
kind: string;
|
|
1173
1275
|
message: string;
|
|
1174
1276
|
}
|
|
1277
|
+
interface BindingEsmExternalRequirePluginConfig {
|
|
1278
|
+
external: Array<BindingStringOrRegex>;
|
|
1279
|
+
}
|
|
1175
1280
|
type BindingGenerateHmrPatchReturn = {
|
|
1176
1281
|
type: 'Ok';
|
|
1177
1282
|
field0: Array<BindingHmrUpdate>;
|
|
@@ -1229,11 +1334,6 @@ interface BindingManifestPluginConfig {
|
|
|
1229
1334
|
isLegacy?: () => boolean;
|
|
1230
1335
|
cssEntries: () => Set<string>;
|
|
1231
1336
|
}
|
|
1232
|
-
interface BindingMinifyOptions {
|
|
1233
|
-
mangle?: boolean;
|
|
1234
|
-
compress?: boolean;
|
|
1235
|
-
removeWhitespace?: boolean;
|
|
1236
|
-
}
|
|
1237
1337
|
interface BindingModulePreloadPolyfillPluginConfig {
|
|
1238
1338
|
isServer?: boolean;
|
|
1239
1339
|
}
|
|
@@ -1322,4 +1422,4 @@ interface PreRenderedChunk {
|
|
|
1322
1422
|
exports: Array<string>;
|
|
1323
1423
|
}
|
|
1324
1424
|
//#endregion
|
|
1325
|
-
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig,
|
|
1425
|
+
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, MinifyOptions, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
|
|
@@ -4,6 +4,108 @@ import * as _oxc_project_types0 from "@oxc-project/types";
|
|
|
4
4
|
type MaybePromise<T> = T | Promise<T>;
|
|
5
5
|
type VoidNullable<T = void> = T | null | undefined | void;
|
|
6
6
|
type BindingStringOrRegex = string | RegExp;
|
|
7
|
+
interface CodegenOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Remove whitespace.
|
|
10
|
+
*
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
removeWhitespace?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface CompressOptions {
|
|
16
|
+
/**
|
|
17
|
+
* Set desired EcmaScript standard version for output.
|
|
18
|
+
*
|
|
19
|
+
* Set `esnext` to enable all target highering.
|
|
20
|
+
*
|
|
21
|
+
* e.g.
|
|
22
|
+
*
|
|
23
|
+
* * catch optional binding when >= es2019
|
|
24
|
+
* * `??` operator >= es2020
|
|
25
|
+
*
|
|
26
|
+
* @default 'esnext'
|
|
27
|
+
*/
|
|
28
|
+
target?: 'esnext' | 'es2015' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020' | 'es2021' | 'es2022' | 'es2023' | 'es2024';
|
|
29
|
+
/**
|
|
30
|
+
* Pass true to discard calls to `console.*`.
|
|
31
|
+
*
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
dropConsole?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Remove `debugger;` statements.
|
|
37
|
+
*
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
dropDebugger?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Drop unreferenced functions and variables.
|
|
43
|
+
*
|
|
44
|
+
* Simple direct variable assignments do not count as references unless set to "keep_assign".
|
|
45
|
+
*/
|
|
46
|
+
unused?: true | false | 'keep_assign';
|
|
47
|
+
/** Keep function / class names. */
|
|
48
|
+
keepNames?: CompressOptionsKeepNames;
|
|
49
|
+
}
|
|
50
|
+
interface CompressOptionsKeepNames {
|
|
51
|
+
/**
|
|
52
|
+
* Keep function names so that `Function.prototype.name` is preserved.
|
|
53
|
+
*
|
|
54
|
+
* This does not guarantee that the `undefined` name is preserved.
|
|
55
|
+
*
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
function: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Keep class names so that `Class.prototype.name` is preserved.
|
|
61
|
+
*
|
|
62
|
+
* This does not guarantee that the `undefined` name is preserved.
|
|
63
|
+
*
|
|
64
|
+
* @default false
|
|
65
|
+
*/
|
|
66
|
+
class: boolean;
|
|
67
|
+
}
|
|
68
|
+
interface MangleOptions {
|
|
69
|
+
/**
|
|
70
|
+
* Pass `true` to mangle names declared in the top level scope.
|
|
71
|
+
*
|
|
72
|
+
* @default false
|
|
73
|
+
*/
|
|
74
|
+
toplevel?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Preserve `name` property for functions and classes.
|
|
77
|
+
*
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
keepNames?: boolean | MangleOptionsKeepNames;
|
|
81
|
+
/** Debug mangled names. */
|
|
82
|
+
debug?: boolean;
|
|
83
|
+
}
|
|
84
|
+
interface MangleOptionsKeepNames {
|
|
85
|
+
/**
|
|
86
|
+
* Preserve `name` property for functions.
|
|
87
|
+
*
|
|
88
|
+
* @default false
|
|
89
|
+
*/
|
|
90
|
+
function: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Preserve `name` property for classes.
|
|
93
|
+
*
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
class: boolean;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Minify synchronously. */
|
|
100
|
+
|
|
101
|
+
interface MinifyOptions {
|
|
102
|
+
/** Use when minifying an ES6 module. */
|
|
103
|
+
module?: boolean;
|
|
104
|
+
compress?: boolean | CompressOptions;
|
|
105
|
+
mangle?: boolean | MangleOptions;
|
|
106
|
+
codegen?: boolean | CodegenOptions;
|
|
107
|
+
sourcemap?: boolean;
|
|
108
|
+
}
|
|
7
109
|
interface Comment {
|
|
8
110
|
type: 'Line' | 'Block';
|
|
9
111
|
value: string;
|
|
@@ -1162,7 +1264,7 @@ interface BindingBuildImportAnalysisPluginConfig {
|
|
|
1162
1264
|
renderBuiltUrl: boolean;
|
|
1163
1265
|
isRelativeBase: boolean;
|
|
1164
1266
|
}
|
|
1165
|
-
type BindingBuiltinPluginName = 'builtin:alias' | 'builtin:asset' | 'builtin:asset-import-meta-url' | 'builtin:build-import-analysis' | 'builtin:dynamic-import-vars' | 'builtin:import-glob' | 'builtin:isolated-declaration' | 'builtin:json' | 'builtin:load-fallback' | 'builtin:manifest' | 'builtin:module-preload-polyfill' | 'builtin:oxc-runtime' | 'builtin:reporter' | 'builtin:replace' | 'builtin:transform' | 'builtin:vite-resolve' | 'builtin:wasm-fallback' | 'builtin:wasm-helper' | 'builtin:web-worker-post';
|
|
1267
|
+
type BindingBuiltinPluginName = 'builtin:alias' | 'builtin:asset' | 'builtin:asset-import-meta-url' | 'builtin:build-import-analysis' | 'builtin:dynamic-import-vars' | 'builtin:import-glob' | 'builtin:isolated-declaration' | 'builtin:json' | 'builtin:load-fallback' | 'builtin:manifest' | 'builtin:module-preload-polyfill' | 'builtin:oxc-runtime' | 'builtin:reporter' | 'builtin:replace' | 'builtin:esm-external-require' | 'builtin:transform' | 'builtin:vite-resolve' | 'builtin:wasm-fallback' | 'builtin:wasm-helper' | 'builtin:web-worker-post';
|
|
1166
1268
|
interface BindingDynamicImportVarsPluginConfig {
|
|
1167
1269
|
include?: Array<BindingStringOrRegex>;
|
|
1168
1270
|
exclude?: Array<BindingStringOrRegex>;
|
|
@@ -1172,6 +1274,9 @@ interface BindingError {
|
|
|
1172
1274
|
kind: string;
|
|
1173
1275
|
message: string;
|
|
1174
1276
|
}
|
|
1277
|
+
interface BindingEsmExternalRequirePluginConfig {
|
|
1278
|
+
external: Array<BindingStringOrRegex>;
|
|
1279
|
+
}
|
|
1175
1280
|
type BindingGenerateHmrPatchReturn = {
|
|
1176
1281
|
type: 'Ok';
|
|
1177
1282
|
field0: Array<BindingHmrUpdate>;
|
|
@@ -1229,11 +1334,6 @@ interface BindingManifestPluginConfig {
|
|
|
1229
1334
|
isLegacy?: () => boolean;
|
|
1230
1335
|
cssEntries: () => Set<string>;
|
|
1231
1336
|
}
|
|
1232
|
-
interface BindingMinifyOptions {
|
|
1233
|
-
mangle?: boolean;
|
|
1234
|
-
compress?: boolean;
|
|
1235
|
-
removeWhitespace?: boolean;
|
|
1236
|
-
}
|
|
1237
1337
|
interface BindingModulePreloadPolyfillPluginConfig {
|
|
1238
1338
|
isServer?: boolean;
|
|
1239
1339
|
}
|
|
@@ -1322,4 +1422,4 @@ interface PreRenderedChunk {
|
|
|
1322
1422
|
exports: Array<string>;
|
|
1323
1423
|
}
|
|
1324
1424
|
//#endregion
|
|
1325
|
-
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig,
|
|
1425
|
+
export { BindingAssetPluginConfig, BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingBundlerImpl, BindingDynamicImportVarsPluginConfig, BindingEsmExternalRequirePluginConfig, BindingHmrUpdate, BindingHookResolveIdExtraArgs, BindingImportGlobPluginConfig, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingModulePreloadPolyfillPluginConfig, BindingRenderedChunk, BindingReplacePluginConfig, BindingReporterPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWasmHelperPluginConfig, BindingWatcherEvent, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, MinifyOptions, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult, isolatedDeclaration, moduleRunnerTransform, transform };
|