rolldown 1.0.0-beta.8-commit.e5c11c6 → 1.0.0-beta.8-commit.2a5c6a6
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 +4 -4
- package/dist/cli.mjs +4 -4
- package/dist/experimental-index.cjs +8 -2
- package/dist/experimental-index.d.cts +3 -3
- package/dist/experimental-index.d.mts +3 -3
- package/dist/experimental-index.mjs +4 -3
- package/dist/filter-index.d.cts +2 -2
- package/dist/filter-index.d.mts +2 -2
- 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/shared/{binding.d-Ddl7hcN3.d.cts → binding.d-CIezRvPc.d.cts} +235 -3
- package/dist/shared/{binding.d-Y-OUMnnv.d.mts → binding.d-Dzvdb9zV.d.mts} +235 -3
- package/dist/shared/{input-options.d-DVmWlHE9.d.cts → input-options.d-C_cplVCl.d.cts} +2 -2
- package/dist/shared/{input-options.d-Dnzz-V9o.d.mts → input-options.d-Eu4mqqAi.d.mts} +2 -2
- package/dist/shared/{parse-ast-index-C37DYnt2.cjs → parse-ast-index-BFFqcofG.cjs} +15 -14
- package/dist/shared/{parse-ast-index-BXDjUzKF.mjs → parse-ast-index-CMF-2Ku4.mjs} +16 -15
- package/dist/shared/{src-B00XkiPL.mjs → src-B7q5LpyT.mjs} +4 -2
- package/dist/shared/{src-B-uItItQ.cjs → src-CWd1c7_l.cjs} +4 -2
- package/package.json +18 -18
package/dist/cli.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
3
|
-
require('./shared/parse-ast-index-
|
|
2
|
+
const require_src = require('./shared/src-CWd1c7_l.cjs');
|
|
3
|
+
require('./shared/parse-ast-index-BFFqcofG.cjs');
|
|
4
4
|
const require_misc = require('./shared/misc-BWx4LNta.cjs');
|
|
5
5
|
const node_fs = require_chunk.__toESM(require("node:fs"));
|
|
6
6
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
@@ -1560,8 +1560,8 @@ async function loadConfig(configPath) {
|
|
|
1560
1560
|
}
|
|
1561
1561
|
|
|
1562
1562
|
//#endregion
|
|
1563
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1564
|
-
var require_usingCtx = require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1563
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.69.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
|
|
1564
|
+
var require_usingCtx = require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.69.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
|
|
1565
1565
|
function _usingCtx() {
|
|
1566
1566
|
var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
|
|
1567
1567
|
var n$2 = Error();
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __commonJS, __esm, __toESM } from "./shared/chunk--iN_1bjD.mjs";
|
|
2
|
-
import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-
|
|
3
|
-
import "./shared/parse-ast-index-
|
|
2
|
+
import { description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-B7q5LpyT.mjs";
|
|
3
|
+
import "./shared/parse-ast-index-CMF-2Ku4.mjs";
|
|
4
4
|
import { arraify, init_misc } from "./shared/misc-DGAe2XOW.mjs";
|
|
5
5
|
import fs from "node:fs";
|
|
6
6
|
import path, { sep } from "node:path";
|
|
@@ -1565,8 +1565,8 @@ var init_load_config = __esm({ "src/cli/load-config.ts"() {
|
|
|
1565
1565
|
} });
|
|
1566
1566
|
|
|
1567
1567
|
//#endregion
|
|
1568
|
-
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1569
|
-
var require_usingCtx = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.
|
|
1568
|
+
//#region ../../node_modules/.pnpm/@oxc-project+runtime@0.69.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
|
|
1569
|
+
var require_usingCtx = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.69.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
|
|
1570
1570
|
function _usingCtx() {
|
|
1571
1571
|
var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
|
|
1572
1572
|
var n$2 = Error();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
|
|
3
|
-
const require_src = require('./shared/src-
|
|
4
|
-
const require_parse_ast_index = require('./shared/parse-ast-index-
|
|
3
|
+
const require_src = require('./shared/src-CWd1c7_l.cjs');
|
|
4
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-BFFqcofG.cjs');
|
|
5
5
|
require('./shared/misc-BWx4LNta.cjs');
|
|
6
6
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
7
7
|
|
|
@@ -86,6 +86,12 @@ function transformPlugin(config) {
|
|
|
86
86
|
var import_binding = require_chunk.__toESM(require_parse_ast_index.require_binding());
|
|
87
87
|
|
|
88
88
|
//#endregion
|
|
89
|
+
Object.defineProperty(exports, 'ResolverFactory', {
|
|
90
|
+
enumerable: true,
|
|
91
|
+
get: function () {
|
|
92
|
+
return import_binding.ResolverFactory;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
89
95
|
exports.aliasPlugin = aliasPlugin
|
|
90
96
|
exports.buildImportAnalysisPlugin = require_src.buildImportAnalysisPlugin
|
|
91
97
|
exports.composePlugins = require_src.composeJsPlugins
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, TransformOptions, TransformResult$1 as TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding.d-
|
|
2
|
-
import { BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/input-options.d-
|
|
1
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult$1 as TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding.d-CIezRvPc.cjs";
|
|
2
|
+
import { BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/input-options.d-C_cplVCl.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
/**
|
|
@@ -93,4 +93,4 @@ type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exc
|
|
|
93
93
|
declare function transformPlugin(config?: TransformPluginConfig): BuiltinPlugin;
|
|
94
94
|
|
|
95
95
|
//#endregion
|
|
96
|
-
export { IsolatedDeclarationsOptions, IsolatedDeclarationsResult, TransformOptions, TransformResult, aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reportPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
|
96
|
+
export { IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions as ResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reportPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, TransformOptions, TransformResult$1 as TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding.d-
|
|
2
|
-
import { BuiltinPlugin$1 as BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin$1 as buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin$1 as dynamicImportVarsPlugin, importGlobPlugin$1 as importGlobPlugin, isolatedDeclarationPlugin$1 as isolatedDeclarationPlugin, jsonPlugin$1 as jsonPlugin, loadFallbackPlugin$1 as loadFallbackPlugin, manifestPlugin$1 as manifestPlugin, moduleFederationPlugin$1 as moduleFederationPlugin, modulePreloadPolyfillPlugin$1 as modulePreloadPolyfillPlugin, reportPlugin$1 as reportPlugin, viteResolvePlugin$1 as viteResolvePlugin, wasmFallbackPlugin$1 as wasmFallbackPlugin, wasmHelperPlugin$1 as wasmHelperPlugin } from "./shared/input-options.d-
|
|
1
|
+
import { BindingReplacePluginConfig, BindingTransformPluginConfig, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult$1 as TransformResult, isolatedDeclaration, moduleRunnerTransform, transform } from "./shared/binding.d-Dzvdb9zV.mjs";
|
|
2
|
+
import { BuiltinPlugin$1 as BuiltinPlugin, InputOptions, RolldownPlugin, buildImportAnalysisPlugin$1 as buildImportAnalysisPlugin, defineParallelPlugin, dynamicImportVarsPlugin$1 as dynamicImportVarsPlugin, importGlobPlugin$1 as importGlobPlugin, isolatedDeclarationPlugin$1 as isolatedDeclarationPlugin, jsonPlugin$1 as jsonPlugin, loadFallbackPlugin$1 as loadFallbackPlugin, manifestPlugin$1 as manifestPlugin, moduleFederationPlugin$1 as moduleFederationPlugin, modulePreloadPolyfillPlugin$1 as modulePreloadPolyfillPlugin, reportPlugin$1 as reportPlugin, viteResolvePlugin$1 as viteResolvePlugin, wasmFallbackPlugin$1 as wasmFallbackPlugin, wasmHelperPlugin$1 as wasmHelperPlugin } from "./shared/input-options.d-Eu4mqqAi.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/experimental.d.ts
|
|
5
5
|
/**
|
|
@@ -93,4 +93,4 @@ type TransformPluginConfig = Omit<BindingTransformPluginConfig, "include" | "exc
|
|
|
93
93
|
declare function transformPlugin(config?: TransformPluginConfig): BuiltinPlugin;
|
|
94
94
|
|
|
95
95
|
//#endregion
|
|
96
|
-
export { IsolatedDeclarationsOptions, IsolatedDeclarationsResult, TransformOptions, TransformResult, aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reportPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
|
96
|
+
export { IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions as ResolveOptions, ResolveResult, ResolverFactory, TransformOptions, TransformResult, aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reportPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __toESM } from "./shared/chunk--iN_1bjD.mjs";
|
|
2
|
-
import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-
|
|
3
|
-
import { require_binding } from "./shared/parse-ast-index-
|
|
2
|
+
import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reportPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-B7q5LpyT.mjs";
|
|
3
|
+
import { require_binding } from "./shared/parse-ast-index-CMF-2Ku4.mjs";
|
|
4
4
|
import "./shared/misc-DGAe2XOW.mjs";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
|
|
@@ -93,7 +93,8 @@ init_compose_js_plugins();
|
|
|
93
93
|
init_constructors();
|
|
94
94
|
|
|
95
95
|
//#endregion
|
|
96
|
+
var ResolverFactory = import_binding.ResolverFactory;
|
|
96
97
|
var isolatedDeclaration = import_binding.isolatedDeclaration;
|
|
97
98
|
var moduleRunnerTransform = import_binding.moduleRunnerTransform;
|
|
98
99
|
var transform = import_binding.transform;
|
|
99
|
-
export { aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reportPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
|
100
|
+
export { ResolverFactory, aliasPlugin, buildImportAnalysisPlugin, composeJsPlugins as composePlugins, defineParallelPlugin, dynamicImportVarsPlugin, importGlobPlugin, isolatedDeclaration, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, moduleRunnerTransform, replacePlugin, reportPlugin, experimental_scan as scan, transform, transformPlugin, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin };
|
package/dist/filter-index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding.d-
|
|
2
|
-
import { withFilter } from "./shared/input-options.d-
|
|
1
|
+
import "./shared/binding.d-CIezRvPc.cjs";
|
|
2
|
+
import { withFilter } from "./shared/input-options.d-C_cplVCl.cjs";
|
|
3
3
|
import { and, code, exclude, id, include, moduleType, not, or } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
5
5
|
export { and, code, exclude, id, include, moduleType, not, or, withFilter };
|
package/dist/filter-index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding.d-
|
|
2
|
-
import { withFilter } from "./shared/input-options.d-
|
|
1
|
+
import "./shared/binding.d-Dzvdb9zV.mjs";
|
|
2
|
+
import { withFilter } from "./shared/input-options.d-Eu4mqqAi.mjs";
|
|
3
3
|
import { and, code, exclude, id, include, moduleType, not, or } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
5
5
|
export { and, code, exclude, id, include, moduleType, not, or, withFilter };
|
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-CWd1c7_l.cjs');
|
|
2
|
+
require('./shared/parse-ast-index-BFFqcofG.cjs');
|
|
3
3
|
require('./shared/misc-BWx4LNta.cjs');
|
|
4
4
|
|
|
5
5
|
exports.VERSION = require_src.VERSION
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding.d-
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, 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/input-options.d-
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding.d-CIezRvPc.cjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, 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/input-options.d-C_cplVCl.cjs";
|
|
3
3
|
|
|
4
4
|
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, 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,4 +1,4 @@
|
|
|
1
|
-
import { PreRenderedChunk } from "./shared/binding.d-
|
|
2
|
-
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION$1 as VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build$1 as build, defineConfig$1 as defineConfig, rolldown$1 as rolldown, watch$1 as watch } from "./shared/input-options.d-
|
|
1
|
+
import { PreRenderedChunk } from "./shared/binding.d-Dzvdb9zV.mjs";
|
|
2
|
+
import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, RolldownOptions, RolldownOutput, RolldownPlugin, RolldownPluginOption, RolldownWatcher, RolldownWatcherEvent, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION$1 as VERSION, WarningHandlerWithDefault, WatchOptions, WatcherOptions, build$1 as build, defineConfig$1 as defineConfig, rolldown$1 as rolldown, watch$1 as watch } from "./shared/input-options.d-Eu4mqqAi.mjs";
|
|
3
3
|
|
|
4
4
|
export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, GeneralHookFilter, GetModuleInfo, GlobalsFunction, HookFilter, HookFilterExtension, ImportKind, InputOption, InputOptions, InternalModuleFormat, JsxOptions, LoadResult, LogLevel, LogLevelOption, LogOrStringHandler, LoggingFunction, MinifyOptions, MinimalPluginContext, ModuleFormat, ModuleInfo, ModuleOptions, ModuleType, ModuleTypeFilter, NormalizedInputOptions, NormalizedOutputOptions, ObjectHook, OutputAsset, OutputBundle, OutputChunk, OutputOptions, ParallelPluginHooks, PartialNull, PartialResolvedId, Plugin, PluginContext, PluginContextMeta, PreRenderedAsset, PreRenderedChunk, RenderedChunk, RenderedModule, ResolveIdExtraOptions, ResolveIdResult, ResolvedId, RolldownBuild, 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, init_src, rolldown, watch } from "./shared/src-
|
|
2
|
-
import "./shared/parse-ast-index-
|
|
1
|
+
import { VERSION, build, defineConfig, init_src, rolldown, watch } from "./shared/src-B7q5LpyT.mjs";
|
|
2
|
+
import "./shared/parse-ast-index-CMF-2Ku4.mjs";
|
|
3
3
|
import "./shared/misc-DGAe2XOW.mjs";
|
|
4
4
|
|
|
5
5
|
init_src();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
|
|
2
|
-
const require_src = require('./shared/src-
|
|
3
|
-
const require_parse_ast_index = require('./shared/parse-ast-index-
|
|
2
|
+
const require_src = require('./shared/src-CWd1c7_l.cjs');
|
|
3
|
+
const require_parse_ast_index = require('./shared/parse-ast-index-BFFqcofG.cjs');
|
|
4
4
|
require('./shared/misc-BWx4LNta.cjs');
|
|
5
5
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __commonJS, __toESM } from "./shared/chunk--iN_1bjD.mjs";
|
|
2
|
-
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-
|
|
3
|
-
import { require_binding } from "./shared/parse-ast-index-
|
|
2
|
+
import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-B7q5LpyT.mjs";
|
|
3
|
+
import { require_binding } from "./shared/parse-ast-index-CMF-2Ku4.mjs";
|
|
4
4
|
import "./shared/misc-DGAe2XOW.mjs";
|
|
5
5
|
import { parentPort, workerData } from "node:worker_threads";
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./shared/binding.d-
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/input-options.d-
|
|
1
|
+
import "./shared/binding.d-CIezRvPc.cjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/input-options.d-C_cplVCl.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.d-
|
|
2
|
-
import { MaybePromise, Plugin } from "./shared/input-options.d-
|
|
1
|
+
import "./shared/binding.d-Dzvdb9zV.mjs";
|
|
2
|
+
import { MaybePromise, Plugin } from "./shared/input-options.d-Eu4mqqAi.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-BFFqcofG.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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { init_parse_ast_index, parseAst, parseAstAsync } from "./shared/parse-ast-index-
|
|
1
|
+
import { init_parse_ast_index, parseAst, parseAstAsync } from "./shared/parse-ast-index-CMF-2Ku4.mjs";
|
|
2
2
|
|
|
3
3
|
init_parse_ast_index();
|
|
4
4
|
export { parseAst, parseAstAsync };
|
|
@@ -154,6 +154,18 @@ declare class ParseResult {
|
|
|
154
154
|
get comments(): Array<Comment>
|
|
155
155
|
get errors(): Array<OxcError>
|
|
156
156
|
}
|
|
157
|
+
declare class ResolverFactory {
|
|
158
|
+
constructor(options?: NapiResolveOptions | undefined | null)
|
|
159
|
+
static default(): ResolverFactory
|
|
160
|
+
/** Clone the resolver using the same underlying cache. */
|
|
161
|
+
cloneWithOptions(options: NapiResolveOptions): ResolverFactory
|
|
162
|
+
/** Clear the underlying cache. */
|
|
163
|
+
clearCache(): void
|
|
164
|
+
/** Synchronously resolve `specifier` at an absolute path to a `directory`. */
|
|
165
|
+
sync(directory: string, request: string): ResolveResult
|
|
166
|
+
/** Asynchronously resolve `specifier` at an absolute path to a `directory`. */
|
|
167
|
+
async(directory: string, request: string): Promise<ResolveResult>
|
|
168
|
+
}
|
|
157
169
|
interface AliasItem {
|
|
158
170
|
find: string
|
|
159
171
|
replacements: Array<string>
|
|
@@ -556,8 +568,11 @@ interface BindingReplacePluginConfig {
|
|
|
556
568
|
}
|
|
557
569
|
interface BindingReportPluginConfig {
|
|
558
570
|
isTty: boolean
|
|
559
|
-
|
|
571
|
+
isLib: boolean
|
|
572
|
+
assetsDir: string
|
|
573
|
+
chunkLimit: number
|
|
560
574
|
shouldLogInfo: boolean
|
|
575
|
+
reportCompressedSize: boolean
|
|
561
576
|
}
|
|
562
577
|
type BindingResolvedExternal =
|
|
563
578
|
boolean | string
|
|
@@ -735,6 +750,11 @@ interface EcmaScriptModule {
|
|
|
735
750
|
/** Span positions` of `import.meta` */
|
|
736
751
|
importMetas: Array<Span>
|
|
737
752
|
}
|
|
753
|
+
declare enum EnforceExtension {
|
|
754
|
+
Auto = 0,
|
|
755
|
+
Enabled = 1,
|
|
756
|
+
Disabled = 2
|
|
757
|
+
}
|
|
738
758
|
interface ErrorLabel {
|
|
739
759
|
message?: string
|
|
740
760
|
start: number
|
|
@@ -792,7 +812,8 @@ type FilterTokenKind = 'Id'|
|
|
|
792
812
|
'Or'|
|
|
793
813
|
'Not'|
|
|
794
814
|
'Include'|
|
|
795
|
-
'Exclude'
|
|
815
|
+
'Exclude'|
|
|
816
|
+
'CleanUrl';
|
|
796
817
|
type HelperMode = /**
|
|
797
818
|
* Runtime mode (default): Helper functions are imported from a runtime package.
|
|
798
819
|
*
|
|
@@ -1038,6 +1059,172 @@ interface ModuleRunnerTransformResult {
|
|
|
1038
1059
|
*/
|
|
1039
1060
|
errors: Array<OxcError>
|
|
1040
1061
|
}
|
|
1062
|
+
/**
|
|
1063
|
+
* Module Resolution Options
|
|
1064
|
+
*
|
|
1065
|
+
* Options are directly ported from [enhanced-resolve](https://github.com/webpack/enhanced-resolve#resolver-options).
|
|
1066
|
+
*
|
|
1067
|
+
* See [webpack resolve](https://webpack.js.org/configuration/resolve/) for information and examples
|
|
1068
|
+
*/
|
|
1069
|
+
/**
|
|
1070
|
+
* Module Resolution Options
|
|
1071
|
+
*
|
|
1072
|
+
* Options are directly ported from [enhanced-resolve](https://github.com/webpack/enhanced-resolve#resolver-options).
|
|
1073
|
+
*
|
|
1074
|
+
* See [webpack resolve](https://webpack.js.org/configuration/resolve/) for information and examples
|
|
1075
|
+
*/
|
|
1076
|
+
interface NapiResolveOptions {
|
|
1077
|
+
/**
|
|
1078
|
+
* Path to TypeScript configuration file.
|
|
1079
|
+
*
|
|
1080
|
+
* Default `None`
|
|
1081
|
+
*/
|
|
1082
|
+
tsconfig?: TsconfigOptions
|
|
1083
|
+
/**
|
|
1084
|
+
* Alias for [ResolveOptions::alias] and [ResolveOptions::fallback].
|
|
1085
|
+
*
|
|
1086
|
+
* For the second value of the tuple, `None -> AliasValue::Ignore`, Some(String) ->
|
|
1087
|
+
* AliasValue::Path(String)`
|
|
1088
|
+
* Create aliases to import or require certain modules more easily.
|
|
1089
|
+
* A trailing $ can also be added to the given object's keys to signify an exact match.
|
|
1090
|
+
*/
|
|
1091
|
+
alias?: Record<string, Array<string | undefined | null>>
|
|
1092
|
+
/**
|
|
1093
|
+
* A list of alias fields in description files.
|
|
1094
|
+
* Specify a field, such as `browser`, to be parsed according to [this specification](https://github.com/defunctzombie/package-browser-field-spec).
|
|
1095
|
+
* Can be a path to json object such as `["path", "to", "exports"]`.
|
|
1096
|
+
*
|
|
1097
|
+
* Default `[]`
|
|
1098
|
+
*/
|
|
1099
|
+
aliasFields?: (string | string[])[]
|
|
1100
|
+
/**
|
|
1101
|
+
* Condition names for exports field which defines entry points of a package.
|
|
1102
|
+
* The key order in the exports field is significant. During condition matching, earlier entries have higher priority and take precedence over later entries.
|
|
1103
|
+
*
|
|
1104
|
+
* Default `[]`
|
|
1105
|
+
*/
|
|
1106
|
+
conditionNames?: Array<string>
|
|
1107
|
+
/**
|
|
1108
|
+
* If true, it will not allow extension-less files.
|
|
1109
|
+
* So by default `require('./foo')` works if `./foo` has a `.js` extension,
|
|
1110
|
+
* but with this enabled only `require('./foo.js')` will work.
|
|
1111
|
+
*
|
|
1112
|
+
* Default to `true` when [ResolveOptions::extensions] contains an empty string.
|
|
1113
|
+
* Use `Some(false)` to disable the behavior.
|
|
1114
|
+
* See <https://github.com/webpack/enhanced-resolve/pull/285>
|
|
1115
|
+
*
|
|
1116
|
+
* Default None, which is the same as `Some(false)` when the above empty rule is not applied.
|
|
1117
|
+
*/
|
|
1118
|
+
enforceExtension?: EnforceExtension
|
|
1119
|
+
/**
|
|
1120
|
+
* A list of exports fields in description files.
|
|
1121
|
+
* Can be a path to json object such as `["path", "to", "exports"]`.
|
|
1122
|
+
*
|
|
1123
|
+
* Default `[["exports"]]`.
|
|
1124
|
+
*/
|
|
1125
|
+
exportsFields?: (string | string[])[]
|
|
1126
|
+
/**
|
|
1127
|
+
* Fields from `package.json` which are used to provide the internal requests of a package
|
|
1128
|
+
* (requests starting with # are considered internal).
|
|
1129
|
+
*
|
|
1130
|
+
* Can be a path to a JSON object such as `["path", "to", "imports"]`.
|
|
1131
|
+
*
|
|
1132
|
+
* Default `[["imports"]]`.
|
|
1133
|
+
*/
|
|
1134
|
+
importsFields?: (string | string[])[]
|
|
1135
|
+
/**
|
|
1136
|
+
* An object which maps extension to extension aliases.
|
|
1137
|
+
*
|
|
1138
|
+
* Default `{}`
|
|
1139
|
+
*/
|
|
1140
|
+
extensionAlias?: Record<string, Array<string>>
|
|
1141
|
+
/**
|
|
1142
|
+
* Attempt to resolve these extensions in order.
|
|
1143
|
+
* If multiple files share the same name but have different extensions,
|
|
1144
|
+
* will resolve the one with the extension listed first in the array and skip the rest.
|
|
1145
|
+
*
|
|
1146
|
+
* Default `[".js", ".json", ".node"]`
|
|
1147
|
+
*/
|
|
1148
|
+
extensions?: Array<string>
|
|
1149
|
+
/**
|
|
1150
|
+
* Redirect module requests when normal resolving fails.
|
|
1151
|
+
*
|
|
1152
|
+
* Default `[]`
|
|
1153
|
+
*/
|
|
1154
|
+
fallback?: Record<string, Array<string | undefined | null>>
|
|
1155
|
+
/**
|
|
1156
|
+
* Request passed to resolve is already fully specified and extensions or main files are not resolved for it (they are still resolved for internal requests).
|
|
1157
|
+
*
|
|
1158
|
+
* See also webpack configuration [resolve.fullySpecified](https://webpack.js.org/configuration/module/#resolvefullyspecified)
|
|
1159
|
+
*
|
|
1160
|
+
* Default `false`
|
|
1161
|
+
*/
|
|
1162
|
+
fullySpecified?: boolean
|
|
1163
|
+
/**
|
|
1164
|
+
* A list of main fields in description files
|
|
1165
|
+
*
|
|
1166
|
+
* Default `["main"]`.
|
|
1167
|
+
*/
|
|
1168
|
+
mainFields?: string | string[]
|
|
1169
|
+
/**
|
|
1170
|
+
* The filename to be used while resolving directories.
|
|
1171
|
+
*
|
|
1172
|
+
* Default `["index"]`
|
|
1173
|
+
*/
|
|
1174
|
+
mainFiles?: Array<string>
|
|
1175
|
+
/**
|
|
1176
|
+
* A list of directories to resolve modules from, can be absolute path or folder name.
|
|
1177
|
+
*
|
|
1178
|
+
* Default `["node_modules"]`
|
|
1179
|
+
*/
|
|
1180
|
+
modules?: string | string[]
|
|
1181
|
+
/**
|
|
1182
|
+
* Resolve to a context instead of a file.
|
|
1183
|
+
*
|
|
1184
|
+
* Default `false`
|
|
1185
|
+
*/
|
|
1186
|
+
resolveToContext?: boolean
|
|
1187
|
+
/**
|
|
1188
|
+
* Prefer to resolve module requests as relative requests instead of using modules from node_modules directories.
|
|
1189
|
+
*
|
|
1190
|
+
* Default `false`
|
|
1191
|
+
*/
|
|
1192
|
+
preferRelative?: boolean
|
|
1193
|
+
/**
|
|
1194
|
+
* Prefer to resolve server-relative urls as absolute paths before falling back to resolve in ResolveOptions::roots.
|
|
1195
|
+
*
|
|
1196
|
+
* Default `false`
|
|
1197
|
+
*/
|
|
1198
|
+
preferAbsolute?: boolean
|
|
1199
|
+
/**
|
|
1200
|
+
* A list of resolve restrictions to restrict the paths that a request can be resolved on.
|
|
1201
|
+
*
|
|
1202
|
+
* Default `[]`
|
|
1203
|
+
*/
|
|
1204
|
+
restrictions?: Array<Restriction>
|
|
1205
|
+
/**
|
|
1206
|
+
* A list of directories where requests of server-relative URLs (starting with '/') are resolved.
|
|
1207
|
+
* On non-Windows systems these requests are resolved as an absolute path first.
|
|
1208
|
+
*
|
|
1209
|
+
* Default `[]`
|
|
1210
|
+
*/
|
|
1211
|
+
roots?: Array<string>
|
|
1212
|
+
/**
|
|
1213
|
+
* Whether to resolve symlinks to their symlinked location.
|
|
1214
|
+
* When enabled, symlinked resources are resolved to their real path, not their symlinked location.
|
|
1215
|
+
* Note that this may cause module resolution to fail when using tools that symlink packages (like npm link).
|
|
1216
|
+
*
|
|
1217
|
+
* Default `true`
|
|
1218
|
+
*/
|
|
1219
|
+
symlinks?: boolean
|
|
1220
|
+
/**
|
|
1221
|
+
* Whether to parse [module.builtinModules](https://nodejs.org/api/module.html#modulebuiltinmodules) or not.
|
|
1222
|
+
* For example, "zlib" will throw [crate::ResolveError::Builtin] when set to true.
|
|
1223
|
+
*
|
|
1224
|
+
* Default `false`
|
|
1225
|
+
*/
|
|
1226
|
+
builtinModules?: boolean
|
|
1227
|
+
}
|
|
1041
1228
|
interface OxcError {
|
|
1042
1229
|
severity: Severity
|
|
1043
1230
|
message: string
|
|
@@ -1099,6 +1286,25 @@ interface ReactRefreshOptions {
|
|
|
1099
1286
|
refreshSig?: string
|
|
1100
1287
|
emitFullSignatures?: boolean
|
|
1101
1288
|
}
|
|
1289
|
+
interface ResolveResult {
|
|
1290
|
+
path?: string
|
|
1291
|
+
error?: string
|
|
1292
|
+
/** "type" field in the package.json file */
|
|
1293
|
+
moduleType?: string
|
|
1294
|
+
packageJsonPath?: string
|
|
1295
|
+
}
|
|
1296
|
+
/**
|
|
1297
|
+
* Alias Value for [ResolveOptions::alias] and [ResolveOptions::fallback].
|
|
1298
|
+
* Use struct because napi don't support structured union now
|
|
1299
|
+
*/
|
|
1300
|
+
/**
|
|
1301
|
+
* Alias Value for [ResolveOptions::alias] and [ResolveOptions::fallback].
|
|
1302
|
+
* Use struct because napi don't support structured union now
|
|
1303
|
+
*/
|
|
1304
|
+
interface Restriction {
|
|
1305
|
+
path?: string
|
|
1306
|
+
regex?: string
|
|
1307
|
+
}
|
|
1102
1308
|
type Severity = 'Error'|
|
|
1103
1309
|
'Warning'|
|
|
1104
1310
|
'Advice';
|
|
@@ -1335,6 +1541,32 @@ interface TransformResult {
|
|
|
1335
1541
|
*/
|
|
1336
1542
|
errors: Array<OxcError>
|
|
1337
1543
|
}
|
|
1544
|
+
/**
|
|
1545
|
+
* Tsconfig Options
|
|
1546
|
+
*
|
|
1547
|
+
* Derived from [tsconfig-paths-webpack-plugin](https://github.com/dividab/tsconfig-paths-webpack-plugin#options)
|
|
1548
|
+
*/
|
|
1549
|
+
/**
|
|
1550
|
+
* Tsconfig Options
|
|
1551
|
+
*
|
|
1552
|
+
* Derived from [tsconfig-paths-webpack-plugin](https://github.com/dividab/tsconfig-paths-webpack-plugin#options)
|
|
1553
|
+
*/
|
|
1554
|
+
interface TsconfigOptions {
|
|
1555
|
+
/**
|
|
1556
|
+
* Allows you to specify where to find the TypeScript configuration file.
|
|
1557
|
+
* You may provide
|
|
1558
|
+
* * a relative path to the configuration file. It will be resolved relative to cwd.
|
|
1559
|
+
* * an absolute path to the configuration file.
|
|
1560
|
+
*/
|
|
1561
|
+
configFile: string
|
|
1562
|
+
/**
|
|
1563
|
+
* Support for Typescript Project References.
|
|
1564
|
+
*
|
|
1565
|
+
* * `'auto'`: use the `references` field from tsconfig of `config_file`.
|
|
1566
|
+
* * `string[]`: manually provided relative or absolute path.
|
|
1567
|
+
*/
|
|
1568
|
+
references?: 'auto' | string[]
|
|
1569
|
+
}
|
|
1338
1570
|
interface TypeScriptOptions {
|
|
1339
1571
|
jsxPragma?: string
|
|
1340
1572
|
jsxPragmaFrag?: string
|
|
@@ -1413,4 +1645,4 @@ interface ValueSpan {
|
|
|
1413
1645
|
}
|
|
1414
1646
|
|
|
1415
1647
|
//#endregion
|
|
1416
|
-
export { BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingGlobImportPluginConfig, BindingHmrOutput, BindingHookResolveIdExtraArgs, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReportPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, ParseResult, ParserOptions, PreRenderedChunk, TransformOptions, TransformResult as TransformResult$1, isolatedDeclaration, moduleRunnerTransform, transform };
|
|
1648
|
+
export { BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingGlobImportPluginConfig, BindingHmrOutput, BindingHookResolveIdExtraArgs, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReportPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult as TransformResult$1, isolatedDeclaration, moduleRunnerTransform, transform };
|
|
@@ -154,6 +154,18 @@ declare class ParseResult {
|
|
|
154
154
|
get comments(): Array<Comment>
|
|
155
155
|
get errors(): Array<OxcError>
|
|
156
156
|
}
|
|
157
|
+
declare class ResolverFactory {
|
|
158
|
+
constructor(options?: NapiResolveOptions | undefined | null)
|
|
159
|
+
static default(): ResolverFactory
|
|
160
|
+
/** Clone the resolver using the same underlying cache. */
|
|
161
|
+
cloneWithOptions(options: NapiResolveOptions): ResolverFactory
|
|
162
|
+
/** Clear the underlying cache. */
|
|
163
|
+
clearCache(): void
|
|
164
|
+
/** Synchronously resolve `specifier` at an absolute path to a `directory`. */
|
|
165
|
+
sync(directory: string, request: string): ResolveResult
|
|
166
|
+
/** Asynchronously resolve `specifier` at an absolute path to a `directory`. */
|
|
167
|
+
async(directory: string, request: string): Promise<ResolveResult>
|
|
168
|
+
}
|
|
157
169
|
interface AliasItem {
|
|
158
170
|
find: string
|
|
159
171
|
replacements: Array<string>
|
|
@@ -556,8 +568,11 @@ interface BindingReplacePluginConfig {
|
|
|
556
568
|
}
|
|
557
569
|
interface BindingReportPluginConfig {
|
|
558
570
|
isTty: boolean
|
|
559
|
-
|
|
571
|
+
isLib: boolean
|
|
572
|
+
assetsDir: string
|
|
573
|
+
chunkLimit: number
|
|
560
574
|
shouldLogInfo: boolean
|
|
575
|
+
reportCompressedSize: boolean
|
|
561
576
|
}
|
|
562
577
|
type BindingResolvedExternal =
|
|
563
578
|
boolean | string
|
|
@@ -735,6 +750,11 @@ interface EcmaScriptModule {
|
|
|
735
750
|
/** Span positions` of `import.meta` */
|
|
736
751
|
importMetas: Array<Span>
|
|
737
752
|
}
|
|
753
|
+
declare enum EnforceExtension {
|
|
754
|
+
Auto = 0,
|
|
755
|
+
Enabled = 1,
|
|
756
|
+
Disabled = 2
|
|
757
|
+
}
|
|
738
758
|
interface ErrorLabel {
|
|
739
759
|
message?: string
|
|
740
760
|
start: number
|
|
@@ -792,7 +812,8 @@ type FilterTokenKind = 'Id'|
|
|
|
792
812
|
'Or'|
|
|
793
813
|
'Not'|
|
|
794
814
|
'Include'|
|
|
795
|
-
'Exclude'
|
|
815
|
+
'Exclude'|
|
|
816
|
+
'CleanUrl';
|
|
796
817
|
type HelperMode = /**
|
|
797
818
|
* Runtime mode (default): Helper functions are imported from a runtime package.
|
|
798
819
|
*
|
|
@@ -1038,6 +1059,172 @@ interface ModuleRunnerTransformResult {
|
|
|
1038
1059
|
*/
|
|
1039
1060
|
errors: Array<OxcError>
|
|
1040
1061
|
}
|
|
1062
|
+
/**
|
|
1063
|
+
* Module Resolution Options
|
|
1064
|
+
*
|
|
1065
|
+
* Options are directly ported from [enhanced-resolve](https://github.com/webpack/enhanced-resolve#resolver-options).
|
|
1066
|
+
*
|
|
1067
|
+
* See [webpack resolve](https://webpack.js.org/configuration/resolve/) for information and examples
|
|
1068
|
+
*/
|
|
1069
|
+
/**
|
|
1070
|
+
* Module Resolution Options
|
|
1071
|
+
*
|
|
1072
|
+
* Options are directly ported from [enhanced-resolve](https://github.com/webpack/enhanced-resolve#resolver-options).
|
|
1073
|
+
*
|
|
1074
|
+
* See [webpack resolve](https://webpack.js.org/configuration/resolve/) for information and examples
|
|
1075
|
+
*/
|
|
1076
|
+
interface NapiResolveOptions {
|
|
1077
|
+
/**
|
|
1078
|
+
* Path to TypeScript configuration file.
|
|
1079
|
+
*
|
|
1080
|
+
* Default `None`
|
|
1081
|
+
*/
|
|
1082
|
+
tsconfig?: TsconfigOptions
|
|
1083
|
+
/**
|
|
1084
|
+
* Alias for [ResolveOptions::alias] and [ResolveOptions::fallback].
|
|
1085
|
+
*
|
|
1086
|
+
* For the second value of the tuple, `None -> AliasValue::Ignore`, Some(String) ->
|
|
1087
|
+
* AliasValue::Path(String)`
|
|
1088
|
+
* Create aliases to import or require certain modules more easily.
|
|
1089
|
+
* A trailing $ can also be added to the given object's keys to signify an exact match.
|
|
1090
|
+
*/
|
|
1091
|
+
alias?: Record<string, Array<string | undefined | null>>
|
|
1092
|
+
/**
|
|
1093
|
+
* A list of alias fields in description files.
|
|
1094
|
+
* Specify a field, such as `browser`, to be parsed according to [this specification](https://github.com/defunctzombie/package-browser-field-spec).
|
|
1095
|
+
* Can be a path to json object such as `["path", "to", "exports"]`.
|
|
1096
|
+
*
|
|
1097
|
+
* Default `[]`
|
|
1098
|
+
*/
|
|
1099
|
+
aliasFields?: (string | string[])[]
|
|
1100
|
+
/**
|
|
1101
|
+
* Condition names for exports field which defines entry points of a package.
|
|
1102
|
+
* The key order in the exports field is significant. During condition matching, earlier entries have higher priority and take precedence over later entries.
|
|
1103
|
+
*
|
|
1104
|
+
* Default `[]`
|
|
1105
|
+
*/
|
|
1106
|
+
conditionNames?: Array<string>
|
|
1107
|
+
/**
|
|
1108
|
+
* If true, it will not allow extension-less files.
|
|
1109
|
+
* So by default `require('./foo')` works if `./foo` has a `.js` extension,
|
|
1110
|
+
* but with this enabled only `require('./foo.js')` will work.
|
|
1111
|
+
*
|
|
1112
|
+
* Default to `true` when [ResolveOptions::extensions] contains an empty string.
|
|
1113
|
+
* Use `Some(false)` to disable the behavior.
|
|
1114
|
+
* See <https://github.com/webpack/enhanced-resolve/pull/285>
|
|
1115
|
+
*
|
|
1116
|
+
* Default None, which is the same as `Some(false)` when the above empty rule is not applied.
|
|
1117
|
+
*/
|
|
1118
|
+
enforceExtension?: EnforceExtension
|
|
1119
|
+
/**
|
|
1120
|
+
* A list of exports fields in description files.
|
|
1121
|
+
* Can be a path to json object such as `["path", "to", "exports"]`.
|
|
1122
|
+
*
|
|
1123
|
+
* Default `[["exports"]]`.
|
|
1124
|
+
*/
|
|
1125
|
+
exportsFields?: (string | string[])[]
|
|
1126
|
+
/**
|
|
1127
|
+
* Fields from `package.json` which are used to provide the internal requests of a package
|
|
1128
|
+
* (requests starting with # are considered internal).
|
|
1129
|
+
*
|
|
1130
|
+
* Can be a path to a JSON object such as `["path", "to", "imports"]`.
|
|
1131
|
+
*
|
|
1132
|
+
* Default `[["imports"]]`.
|
|
1133
|
+
*/
|
|
1134
|
+
importsFields?: (string | string[])[]
|
|
1135
|
+
/**
|
|
1136
|
+
* An object which maps extension to extension aliases.
|
|
1137
|
+
*
|
|
1138
|
+
* Default `{}`
|
|
1139
|
+
*/
|
|
1140
|
+
extensionAlias?: Record<string, Array<string>>
|
|
1141
|
+
/**
|
|
1142
|
+
* Attempt to resolve these extensions in order.
|
|
1143
|
+
* If multiple files share the same name but have different extensions,
|
|
1144
|
+
* will resolve the one with the extension listed first in the array and skip the rest.
|
|
1145
|
+
*
|
|
1146
|
+
* Default `[".js", ".json", ".node"]`
|
|
1147
|
+
*/
|
|
1148
|
+
extensions?: Array<string>
|
|
1149
|
+
/**
|
|
1150
|
+
* Redirect module requests when normal resolving fails.
|
|
1151
|
+
*
|
|
1152
|
+
* Default `[]`
|
|
1153
|
+
*/
|
|
1154
|
+
fallback?: Record<string, Array<string | undefined | null>>
|
|
1155
|
+
/**
|
|
1156
|
+
* Request passed to resolve is already fully specified and extensions or main files are not resolved for it (they are still resolved for internal requests).
|
|
1157
|
+
*
|
|
1158
|
+
* See also webpack configuration [resolve.fullySpecified](https://webpack.js.org/configuration/module/#resolvefullyspecified)
|
|
1159
|
+
*
|
|
1160
|
+
* Default `false`
|
|
1161
|
+
*/
|
|
1162
|
+
fullySpecified?: boolean
|
|
1163
|
+
/**
|
|
1164
|
+
* A list of main fields in description files
|
|
1165
|
+
*
|
|
1166
|
+
* Default `["main"]`.
|
|
1167
|
+
*/
|
|
1168
|
+
mainFields?: string | string[]
|
|
1169
|
+
/**
|
|
1170
|
+
* The filename to be used while resolving directories.
|
|
1171
|
+
*
|
|
1172
|
+
* Default `["index"]`
|
|
1173
|
+
*/
|
|
1174
|
+
mainFiles?: Array<string>
|
|
1175
|
+
/**
|
|
1176
|
+
* A list of directories to resolve modules from, can be absolute path or folder name.
|
|
1177
|
+
*
|
|
1178
|
+
* Default `["node_modules"]`
|
|
1179
|
+
*/
|
|
1180
|
+
modules?: string | string[]
|
|
1181
|
+
/**
|
|
1182
|
+
* Resolve to a context instead of a file.
|
|
1183
|
+
*
|
|
1184
|
+
* Default `false`
|
|
1185
|
+
*/
|
|
1186
|
+
resolveToContext?: boolean
|
|
1187
|
+
/**
|
|
1188
|
+
* Prefer to resolve module requests as relative requests instead of using modules from node_modules directories.
|
|
1189
|
+
*
|
|
1190
|
+
* Default `false`
|
|
1191
|
+
*/
|
|
1192
|
+
preferRelative?: boolean
|
|
1193
|
+
/**
|
|
1194
|
+
* Prefer to resolve server-relative urls as absolute paths before falling back to resolve in ResolveOptions::roots.
|
|
1195
|
+
*
|
|
1196
|
+
* Default `false`
|
|
1197
|
+
*/
|
|
1198
|
+
preferAbsolute?: boolean
|
|
1199
|
+
/**
|
|
1200
|
+
* A list of resolve restrictions to restrict the paths that a request can be resolved on.
|
|
1201
|
+
*
|
|
1202
|
+
* Default `[]`
|
|
1203
|
+
*/
|
|
1204
|
+
restrictions?: Array<Restriction>
|
|
1205
|
+
/**
|
|
1206
|
+
* A list of directories where requests of server-relative URLs (starting with '/') are resolved.
|
|
1207
|
+
* On non-Windows systems these requests are resolved as an absolute path first.
|
|
1208
|
+
*
|
|
1209
|
+
* Default `[]`
|
|
1210
|
+
*/
|
|
1211
|
+
roots?: Array<string>
|
|
1212
|
+
/**
|
|
1213
|
+
* Whether to resolve symlinks to their symlinked location.
|
|
1214
|
+
* When enabled, symlinked resources are resolved to their real path, not their symlinked location.
|
|
1215
|
+
* Note that this may cause module resolution to fail when using tools that symlink packages (like npm link).
|
|
1216
|
+
*
|
|
1217
|
+
* Default `true`
|
|
1218
|
+
*/
|
|
1219
|
+
symlinks?: boolean
|
|
1220
|
+
/**
|
|
1221
|
+
* Whether to parse [module.builtinModules](https://nodejs.org/api/module.html#modulebuiltinmodules) or not.
|
|
1222
|
+
* For example, "zlib" will throw [crate::ResolveError::Builtin] when set to true.
|
|
1223
|
+
*
|
|
1224
|
+
* Default `false`
|
|
1225
|
+
*/
|
|
1226
|
+
builtinModules?: boolean
|
|
1227
|
+
}
|
|
1041
1228
|
interface OxcError {
|
|
1042
1229
|
severity: Severity
|
|
1043
1230
|
message: string
|
|
@@ -1099,6 +1286,25 @@ interface ReactRefreshOptions {
|
|
|
1099
1286
|
refreshSig?: string
|
|
1100
1287
|
emitFullSignatures?: boolean
|
|
1101
1288
|
}
|
|
1289
|
+
interface ResolveResult {
|
|
1290
|
+
path?: string
|
|
1291
|
+
error?: string
|
|
1292
|
+
/** "type" field in the package.json file */
|
|
1293
|
+
moduleType?: string
|
|
1294
|
+
packageJsonPath?: string
|
|
1295
|
+
}
|
|
1296
|
+
/**
|
|
1297
|
+
* Alias Value for [ResolveOptions::alias] and [ResolveOptions::fallback].
|
|
1298
|
+
* Use struct because napi don't support structured union now
|
|
1299
|
+
*/
|
|
1300
|
+
/**
|
|
1301
|
+
* Alias Value for [ResolveOptions::alias] and [ResolveOptions::fallback].
|
|
1302
|
+
* Use struct because napi don't support structured union now
|
|
1303
|
+
*/
|
|
1304
|
+
interface Restriction {
|
|
1305
|
+
path?: string
|
|
1306
|
+
regex?: string
|
|
1307
|
+
}
|
|
1102
1308
|
type Severity = 'Error'|
|
|
1103
1309
|
'Warning'|
|
|
1104
1310
|
'Advice';
|
|
@@ -1335,6 +1541,32 @@ interface TransformResult {
|
|
|
1335
1541
|
*/
|
|
1336
1542
|
errors: Array<OxcError>
|
|
1337
1543
|
}
|
|
1544
|
+
/**
|
|
1545
|
+
* Tsconfig Options
|
|
1546
|
+
*
|
|
1547
|
+
* Derived from [tsconfig-paths-webpack-plugin](https://github.com/dividab/tsconfig-paths-webpack-plugin#options)
|
|
1548
|
+
*/
|
|
1549
|
+
/**
|
|
1550
|
+
* Tsconfig Options
|
|
1551
|
+
*
|
|
1552
|
+
* Derived from [tsconfig-paths-webpack-plugin](https://github.com/dividab/tsconfig-paths-webpack-plugin#options)
|
|
1553
|
+
*/
|
|
1554
|
+
interface TsconfigOptions {
|
|
1555
|
+
/**
|
|
1556
|
+
* Allows you to specify where to find the TypeScript configuration file.
|
|
1557
|
+
* You may provide
|
|
1558
|
+
* * a relative path to the configuration file. It will be resolved relative to cwd.
|
|
1559
|
+
* * an absolute path to the configuration file.
|
|
1560
|
+
*/
|
|
1561
|
+
configFile: string
|
|
1562
|
+
/**
|
|
1563
|
+
* Support for Typescript Project References.
|
|
1564
|
+
*
|
|
1565
|
+
* * `'auto'`: use the `references` field from tsconfig of `config_file`.
|
|
1566
|
+
* * `string[]`: manually provided relative or absolute path.
|
|
1567
|
+
*/
|
|
1568
|
+
references?: 'auto' | string[]
|
|
1569
|
+
}
|
|
1338
1570
|
interface TypeScriptOptions {
|
|
1339
1571
|
jsxPragma?: string
|
|
1340
1572
|
jsxPragmaFrag?: string
|
|
@@ -1413,4 +1645,4 @@ interface ValueSpan {
|
|
|
1413
1645
|
}
|
|
1414
1646
|
|
|
1415
1647
|
//#endregion
|
|
1416
|
-
export { BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingGlobImportPluginConfig, BindingHmrOutput, BindingHookResolveIdExtraArgs, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReportPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, ParseResult, ParserOptions, PreRenderedChunk, TransformOptions, TransformResult as TransformResult$1, isolatedDeclaration, moduleRunnerTransform, transform };
|
|
1648
|
+
export { BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingGlobImportPluginConfig, BindingHmrOutput, BindingHookResolveIdExtraArgs, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReplacePluginConfig, BindingReportPluginConfig, BindingTransformHookExtraArgs, BindingTransformPluginConfig, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, IsolatedDeclarationsOptions, IsolatedDeclarationsResult, NapiResolveOptions, ParseResult, ParserOptions, PreRenderedChunk, ResolveResult, ResolverFactory, TransformOptions, TransformResult as TransformResult$1, isolatedDeclaration, moduleRunnerTransform, transform };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingGlobImportPluginConfig, BindingHmrOutput, BindingHookResolveIdExtraArgs, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReportPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding.d-
|
|
1
|
+
import { BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingGlobImportPluginConfig, BindingHmrOutput, BindingHookResolveIdExtraArgs, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReportPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding.d-CIezRvPc.cjs";
|
|
2
2
|
import { Program } from "@oxc-project/types";
|
|
3
3
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
4
4
|
|
|
@@ -905,7 +905,7 @@ interface ChecksOptions {
|
|
|
905
905
|
type InputOption = string | string[] | Record<string, string>;
|
|
906
906
|
type OxcTransformOption = Omit<TransformOptions, "sourceType" | "lang" | "cwd" | "sourcemap" | "jsx" | "define" | "inject" | "target">;
|
|
907
907
|
type ExternalOption = StringOrRegExp | StringOrRegExp[] | ((id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>);
|
|
908
|
-
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css">;
|
|
908
|
+
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css" | "asset">;
|
|
909
909
|
interface JsxOptions {
|
|
910
910
|
mode?: "classic" | "automatic" | "preserve";
|
|
911
911
|
factory?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingGlobImportPluginConfig, BindingHmrOutput, BindingHookResolveIdExtraArgs, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReportPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding.d-
|
|
1
|
+
import { BindingBuildImportAnalysisPluginConfig, BindingBuiltinPluginName, BindingDynamicImportVarsPluginConfig, BindingGlobImportPluginConfig, BindingHmrOutput, BindingHookResolveIdExtraArgs, BindingIsolatedDeclarationPluginConfig, BindingJsonPluginConfig, BindingManifestPluginConfig, BindingMfManifest, BindingMinifyOptions, BindingModuleFederationPluginOption, BindingModulePreloadPolyfillPluginConfig, BindingRemote, BindingRenderedChunk, BindingReportPluginConfig, BindingTransformHookExtraArgs, BindingViteResolvePluginConfig, BindingWatcherEvent, Bundler, ParserOptions, PreRenderedChunk, TransformOptions } from "./binding.d-Dzvdb9zV.mjs";
|
|
2
2
|
import { TopLevelFilterExpression } from "@rolldown/pluginutils";
|
|
3
3
|
import { Program } from "@oxc-project/types";
|
|
4
4
|
|
|
@@ -905,7 +905,7 @@ interface ChecksOptions {
|
|
|
905
905
|
type InputOption = string | string[] | Record<string, string>;
|
|
906
906
|
type OxcTransformOption = Omit<TransformOptions, "sourceType" | "lang" | "cwd" | "sourcemap" | "jsx" | "define" | "inject" | "target">;
|
|
907
907
|
type ExternalOption = StringOrRegExp | StringOrRegExp[] | ((id: string, parentId: string | undefined, isResolved: boolean) => NullValue<boolean>);
|
|
908
|
-
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css">;
|
|
908
|
+
type ModuleTypes = Record<string, "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | "css" | "asset">;
|
|
909
909
|
interface JsxOptions {
|
|
910
910
|
mode?: "classic" | "automatic" | "preserve";
|
|
911
911
|
factory?: string;
|
|
@@ -347,10 +347,12 @@ var require_binding = require_chunk.__commonJS({ "src/binding.js"(exports, modul
|
|
|
347
347
|
module.exports.Bundler = nativeBinding.Bundler;
|
|
348
348
|
module.exports.ParallelJsPluginRegistry = nativeBinding.ParallelJsPluginRegistry;
|
|
349
349
|
module.exports.ParseResult = nativeBinding.ParseResult;
|
|
350
|
+
module.exports.ResolverFactory = nativeBinding.ResolverFactory;
|
|
350
351
|
module.exports.BindingBuiltinPluginName = nativeBinding.BindingBuiltinPluginName;
|
|
351
352
|
module.exports.BindingHookSideEffects = nativeBinding.BindingHookSideEffects;
|
|
352
353
|
module.exports.BindingLogLevel = nativeBinding.BindingLogLevel;
|
|
353
354
|
module.exports.BindingPluginOrder = nativeBinding.BindingPluginOrder;
|
|
355
|
+
module.exports.EnforceExtension = nativeBinding.EnforceExtension;
|
|
354
356
|
module.exports.ExportExportNameKind = nativeBinding.ExportExportNameKind;
|
|
355
357
|
module.exports.ExportImportNameKind = nativeBinding.ExportImportNameKind;
|
|
356
358
|
module.exports.ExportLocalNameKind = nativeBinding.ExportLocalNameKind;
|
|
@@ -368,6 +370,7 @@ var require_binding = require_chunk.__commonJS({ "src/binding.js"(exports, modul
|
|
|
368
370
|
module.exports.Severity = nativeBinding.Severity;
|
|
369
371
|
module.exports.shutdownAsyncRuntime = nativeBinding.shutdownAsyncRuntime;
|
|
370
372
|
module.exports.startAsyncRuntime = nativeBinding.startAsyncRuntime;
|
|
373
|
+
module.exports.sync = nativeBinding.sync;
|
|
371
374
|
module.exports.transform = nativeBinding.transform;
|
|
372
375
|
} });
|
|
373
376
|
|
|
@@ -552,7 +555,7 @@ function augmentCodeLocation(properties, pos, source, id) {
|
|
|
552
555
|
}
|
|
553
556
|
|
|
554
557
|
//#endregion
|
|
555
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
558
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.69.0/node_modules/oxc-parser/wrap.mjs
|
|
556
559
|
function wrap$1(result) {
|
|
557
560
|
let program, module$1, comments, errors;
|
|
558
561
|
return {
|
|
@@ -574,20 +577,18 @@ function wrap$1(result) {
|
|
|
574
577
|
}
|
|
575
578
|
};
|
|
576
579
|
}
|
|
577
|
-
function jsonParseAst(
|
|
578
|
-
|
|
580
|
+
function jsonParseAst(programJson) {
|
|
581
|
+
const { node: program, fixes } = JSON.parse(programJson);
|
|
582
|
+
for (const fixPath of fixes) applyFix(program, fixPath);
|
|
583
|
+
return program;
|
|
579
584
|
}
|
|
580
|
-
function
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
} catch (_err) {}
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
return value;
|
|
585
|
+
function applyFix(program, fixPath) {
|
|
586
|
+
let node = program;
|
|
587
|
+
for (const key of fixPath) node = node[key];
|
|
588
|
+
if (node.bigint) node.value = BigInt(node.bigint);
|
|
589
|
+
else try {
|
|
590
|
+
node.value = RegExp(node.regex.pattern, node.regex.flags);
|
|
591
|
+
} catch (_err) {}
|
|
591
592
|
}
|
|
592
593
|
|
|
593
594
|
//#endregion
|
|
@@ -347,10 +347,12 @@ var require_binding = __commonJS({ "src/binding.js"(exports, module) {
|
|
|
347
347
|
module.exports.Bundler = nativeBinding.Bundler;
|
|
348
348
|
module.exports.ParallelJsPluginRegistry = nativeBinding.ParallelJsPluginRegistry;
|
|
349
349
|
module.exports.ParseResult = nativeBinding.ParseResult;
|
|
350
|
+
module.exports.ResolverFactory = nativeBinding.ResolverFactory;
|
|
350
351
|
module.exports.BindingBuiltinPluginName = nativeBinding.BindingBuiltinPluginName;
|
|
351
352
|
module.exports.BindingHookSideEffects = nativeBinding.BindingHookSideEffects;
|
|
352
353
|
module.exports.BindingLogLevel = nativeBinding.BindingLogLevel;
|
|
353
354
|
module.exports.BindingPluginOrder = nativeBinding.BindingPluginOrder;
|
|
355
|
+
module.exports.EnforceExtension = nativeBinding.EnforceExtension;
|
|
354
356
|
module.exports.ExportExportNameKind = nativeBinding.ExportExportNameKind;
|
|
355
357
|
module.exports.ExportImportNameKind = nativeBinding.ExportImportNameKind;
|
|
356
358
|
module.exports.ExportLocalNameKind = nativeBinding.ExportLocalNameKind;
|
|
@@ -368,6 +370,7 @@ var require_binding = __commonJS({ "src/binding.js"(exports, module) {
|
|
|
368
370
|
module.exports.Severity = nativeBinding.Severity;
|
|
369
371
|
module.exports.shutdownAsyncRuntime = nativeBinding.shutdownAsyncRuntime;
|
|
370
372
|
module.exports.startAsyncRuntime = nativeBinding.startAsyncRuntime;
|
|
373
|
+
module.exports.sync = nativeBinding.sync;
|
|
371
374
|
module.exports.transform = nativeBinding.transform;
|
|
372
375
|
} });
|
|
373
376
|
|
|
@@ -561,7 +564,7 @@ var init_logs = __esm({ "src/log/logs.ts"() {
|
|
|
561
564
|
} });
|
|
562
565
|
|
|
563
566
|
//#endregion
|
|
564
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
567
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.69.0/node_modules/oxc-parser/wrap.mjs
|
|
565
568
|
function wrap$1(result) {
|
|
566
569
|
let program, module$1, comments, errors;
|
|
567
570
|
return {
|
|
@@ -583,22 +586,20 @@ function wrap$1(result) {
|
|
|
583
586
|
}
|
|
584
587
|
};
|
|
585
588
|
}
|
|
586
|
-
function jsonParseAst(
|
|
587
|
-
|
|
589
|
+
function jsonParseAst(programJson) {
|
|
590
|
+
const { node: program, fixes } = JSON.parse(programJson);
|
|
591
|
+
for (const fixPath of fixes) applyFix(program, fixPath);
|
|
592
|
+
return program;
|
|
588
593
|
}
|
|
589
|
-
function
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
} catch (_err) {}
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
return value;
|
|
594
|
+
function applyFix(program, fixPath) {
|
|
595
|
+
let node = program;
|
|
596
|
+
for (const key of fixPath) node = node[key];
|
|
597
|
+
if (node.bigint) node.value = BigInt(node.bigint);
|
|
598
|
+
else try {
|
|
599
|
+
node.value = RegExp(node.regex.pattern, node.regex.flags);
|
|
600
|
+
} catch (_err) {}
|
|
600
601
|
}
|
|
601
|
-
var init_wrap = __esm({ "../../node_modules/.pnpm/oxc-parser@0.
|
|
602
|
+
var init_wrap = __esm({ "../../node_modules/.pnpm/oxc-parser@0.69.0/node_modules/oxc-parser/wrap.mjs"() {} });
|
|
602
603
|
|
|
603
604
|
//#endregion
|
|
604
605
|
//#region src/parse-ast-index.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __esm, __toESM } from "./chunk--iN_1bjD.mjs";
|
|
2
|
-
import { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst, require_binding } from "./parse-ast-index-
|
|
2
|
+
import { augmentCodeLocation, error, init_logs, init_parse_ast_index, logCycleLoading, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst, require_binding } from "./parse-ast-index-CMF-2Ku4.mjs";
|
|
3
3
|
import { arraify, init_misc, isNullish, noop, unimplemented, unreachable, unsupported } from "./misc-DGAe2XOW.mjs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import colors from "ansis";
|
|
@@ -8,7 +8,7 @@ import { availableParallelism } from "node:os";
|
|
|
8
8
|
import { Worker } from "node:worker_threads";
|
|
9
9
|
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version = "1.0.0-beta.8-commit.
|
|
11
|
+
var version = "1.0.0-beta.8-commit.2a5c6a6";
|
|
12
12
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
@@ -1812,6 +1812,7 @@ var init_validator = __esm({ "src/utils/validator.ts"() {
|
|
|
1812
1812
|
])), returns(nullish(boolean())))
|
|
1813
1813
|
]);
|
|
1814
1814
|
ModuleTypesSchema = record(string(), union([
|
|
1815
|
+
literal("asset"),
|
|
1815
1816
|
literal("base64"),
|
|
1816
1817
|
literal("binary"),
|
|
1817
1818
|
literal("css"),
|
|
@@ -3577,6 +3578,7 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
3577
3578
|
kind: "Id",
|
|
3578
3579
|
payload: expr.pattern
|
|
3579
3580
|
});
|
|
3581
|
+
if (expr.params.cleanUrl) list.push({ kind: "CleanUrl" });
|
|
3580
3582
|
break;
|
|
3581
3583
|
}
|
|
3582
3584
|
case "moduleType": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const require_chunk = require('./chunk-qZFfknuJ.cjs');
|
|
3
|
-
const require_parse_ast_index = require('./parse-ast-index-
|
|
3
|
+
const require_parse_ast_index = require('./parse-ast-index-BFFqcofG.cjs');
|
|
4
4
|
const require_misc = require('./misc-BWx4LNta.cjs');
|
|
5
5
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
6
6
|
const ansis = require_chunk.__toESM(require("ansis"));
|
|
@@ -9,7 +9,7 @@ const node_os = require_chunk.__toESM(require("node:os"));
|
|
|
9
9
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
10
10
|
|
|
11
11
|
//#region package.json
|
|
12
|
-
var version = "1.0.0-beta.8-commit.
|
|
12
|
+
var version = "1.0.0-beta.8-commit.2a5c6a6";
|
|
13
13
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
14
14
|
|
|
15
15
|
//#endregion
|
|
@@ -1723,6 +1723,7 @@ const ExternalSchema = union([
|
|
|
1723
1723
|
])), returns(nullish(boolean())))
|
|
1724
1724
|
]);
|
|
1725
1725
|
const ModuleTypesSchema = record(string(), union([
|
|
1726
|
+
literal("asset"),
|
|
1726
1727
|
literal("base64"),
|
|
1727
1728
|
literal("binary"),
|
|
1728
1729
|
literal("css"),
|
|
@@ -2342,6 +2343,7 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
2342
2343
|
kind: "Id",
|
|
2343
2344
|
payload: expr.pattern
|
|
2344
2345
|
});
|
|
2346
|
+
if (expr.params.cleanUrl) list.push({ kind: "CleanUrl" });
|
|
2345
2347
|
break;
|
|
2346
2348
|
}
|
|
2347
2349
|
case "moduleType": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rolldown",
|
|
3
|
-
"version": "1.0.0-beta.8-commit.
|
|
3
|
+
"version": "1.0.0-beta.8-commit.2a5c6a6",
|
|
4
4
|
"description": "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"homepage": "https://rolldown.rs/",
|
|
@@ -86,12 +86,12 @@
|
|
|
86
86
|
"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"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@oxc-project/types": "0.
|
|
89
|
+
"@oxc-project/types": "0.69.0",
|
|
90
90
|
"ansis": "^4.0.0",
|
|
91
|
-
"@rolldown/pluginutils": "1.0.0-beta.8-commit.
|
|
91
|
+
"@rolldown/pluginutils": "1.0.0-beta.8-commit.2a5c6a6"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
|
-
"@oxc-project/runtime": "0.
|
|
94
|
+
"@oxc-project/runtime": "0.69.0"
|
|
95
95
|
},
|
|
96
96
|
"peerDependenciesMeta": {
|
|
97
97
|
"@oxc-project/runtime": {
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"fs-extra": "^11.2.0",
|
|
112
112
|
"glob": "^11.0.0",
|
|
113
113
|
"locate-character": "^3.0.0",
|
|
114
|
-
"oxc-parser": "0.
|
|
114
|
+
"oxc-parser": "0.69.0",
|
|
115
115
|
"pathe": "^2.0.3",
|
|
116
116
|
"remeda": "^2.10.0",
|
|
117
117
|
"rolldown-plugin-dts": "^0.7.12",
|
|
@@ -123,22 +123,22 @@
|
|
|
123
123
|
"typescript": "^5.7.3",
|
|
124
124
|
"unbuild": "^3.0.0",
|
|
125
125
|
"valibot": "1.0.0",
|
|
126
|
-
"rolldown": "1.0.0-beta.8-commit.
|
|
126
|
+
"rolldown": "1.0.0-beta.8-commit.2a5c6a6",
|
|
127
127
|
"@rolldown/testing": "0.0.1"
|
|
128
128
|
},
|
|
129
129
|
"optionalDependencies": {
|
|
130
|
-
"@rolldown/binding-
|
|
131
|
-
"@rolldown/binding-
|
|
132
|
-
"@rolldown/binding-
|
|
133
|
-
"@rolldown/binding-
|
|
134
|
-
"@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.8-commit.
|
|
135
|
-
"@rolldown/binding-linux-arm64-musl": "1.0.0-beta.8-commit.
|
|
136
|
-
"@rolldown/binding-linux-x64-
|
|
137
|
-
"@rolldown/binding-
|
|
138
|
-
"@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.8-commit.
|
|
139
|
-
"@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.8-commit.
|
|
140
|
-
"@rolldown/binding-
|
|
141
|
-
"@rolldown/binding-win32-x64-msvc": "1.0.0-beta.8-commit.
|
|
130
|
+
"@rolldown/binding-darwin-arm64": "1.0.0-beta.8-commit.2a5c6a6",
|
|
131
|
+
"@rolldown/binding-freebsd-x64": "1.0.0-beta.8-commit.2a5c6a6",
|
|
132
|
+
"@rolldown/binding-darwin-x64": "1.0.0-beta.8-commit.2a5c6a6",
|
|
133
|
+
"@rolldown/binding-linux-arm-gnueabihf": "1.0.0-beta.8-commit.2a5c6a6",
|
|
134
|
+
"@rolldown/binding-linux-arm64-gnu": "1.0.0-beta.8-commit.2a5c6a6",
|
|
135
|
+
"@rolldown/binding-linux-arm64-musl": "1.0.0-beta.8-commit.2a5c6a6",
|
|
136
|
+
"@rolldown/binding-linux-x64-musl": "1.0.0-beta.8-commit.2a5c6a6",
|
|
137
|
+
"@rolldown/binding-linux-x64-gnu": "1.0.0-beta.8-commit.2a5c6a6",
|
|
138
|
+
"@rolldown/binding-win32-arm64-msvc": "1.0.0-beta.8-commit.2a5c6a6",
|
|
139
|
+
"@rolldown/binding-win32-ia32-msvc": "1.0.0-beta.8-commit.2a5c6a6",
|
|
140
|
+
"@rolldown/binding-wasm32-wasi": "1.0.0-beta.8-commit.2a5c6a6",
|
|
141
|
+
"@rolldown/binding-win32-x64-msvc": "1.0.0-beta.8-commit.2a5c6a6"
|
|
142
142
|
},
|
|
143
143
|
"scripts": {
|
|
144
144
|
"# Scrips for binding #": "_",
|