rolldown 1.0.0-beta.8-commit.1fd551c → 1.0.0-beta.8-commit.852c603

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.
Files changed (35) hide show
  1. package/dist/cli.cjs +6 -5
  2. package/dist/cli.mjs +6 -5
  3. package/dist/experimental-index.cjs +3 -2
  4. package/dist/experimental-index.d.cts +2 -2
  5. package/dist/experimental-index.d.mts +2 -2
  6. package/dist/experimental-index.mjs +3 -2
  7. package/dist/filter-expression-index.cjs +11 -0
  8. package/dist/filter-expression-index.d.cts +4 -0
  9. package/dist/filter-expression-index.d.mts +4 -0
  10. package/dist/filter-expression-index.mjs +4 -0
  11. package/dist/index.cjs +3 -2
  12. package/dist/index.d.cts +3 -3
  13. package/dist/index.d.mts +3 -3
  14. package/dist/index.mjs +3 -2
  15. package/dist/parallel-plugin-worker.cjs +3 -2
  16. package/dist/parallel-plugin-worker.mjs +3 -2
  17. package/dist/parallel-plugin.d.cts +2 -2
  18. package/dist/parallel-plugin.d.mts +2 -2
  19. package/dist/parse-ast-index.cjs +1 -1
  20. package/dist/parse-ast-index.d.cts +1 -1
  21. package/dist/parse-ast-index.d.mts +1 -1
  22. package/dist/parse-ast-index.mjs +1 -1
  23. package/dist/shared/{binding.d-BVuAIDg-.d.cts → binding.d-BaNmLM9c.d.mts} +84 -0
  24. package/dist/shared/{binding.d-BeOzR_y0.d.mts → binding.d-y7dWnUxd.d.cts} +84 -0
  25. package/dist/shared/filter-expression-index-BKmgnKlV.mjs +69 -0
  26. package/dist/shared/filter-expression-index-CRtoeipP.cjs +119 -0
  27. package/dist/shared/{input-options.d-CU30Caau.d.cts → input-options.d-BHwth6VM.d.cts} +84 -22
  28. package/dist/shared/{input-options.d-CHr9lvEw.d.mts → input-options.d-CN-JV5dt.d.mts} +84 -22
  29. package/dist/shared/{parse-ast-index-DROW_mqO.cjs → parse-ast-index-Bbz37LOL.cjs} +15 -13
  30. package/dist/shared/{parse-ast-index-CJTgEIMh.mjs → parse-ast-index-D0SmlXT6.mjs} +16 -14
  31. package/dist/shared/{src-DWaN7-KQ.cjs → src-B4f_CmD8.cjs} +248 -133
  32. package/dist/shared/{src-BCCnC5nI.mjs → src-CaxK4-gB.mjs} +1781 -1665
  33. package/package.json +22 -18
  34. /package/dist/shared/{prompt-_yrURmmm.cjs → prompt-At99RuKY.cjs} +0 -0
  35. /package/dist/shared/{prompt-V-Wm9PcC.mjs → prompt-UMUDMApt.mjs} +0 -0
package/dist/cli.cjs CHANGED
@@ -1,6 +1,7 @@
1
1
  const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
2
- const require_src = require('./shared/src-DWaN7-KQ.cjs');
3
- require('./shared/parse-ast-index-DROW_mqO.cjs');
2
+ const require_src = require('./shared/src-B4f_CmD8.cjs');
3
+ require('./shared/parse-ast-index-Bbz37LOL.cjs');
4
+ require('./shared/filter-expression-index-CRtoeipP.cjs');
4
5
  const node_fs = require_chunk.__toESM(require("node:fs"));
5
6
  const node_path = require_chunk.__toESM(require("node:path"));
6
7
  const ansis = require_chunk.__toESM(require("ansis"));
@@ -970,7 +971,7 @@ function createConsola(options$1 = {}) {
970
971
  // Terminus (<0.2.27)
971
972
  // ConEmu and cmder
972
973
  function() {
973
- return require("./shared/prompt-_yrURmmm.cjs");
974
+ return require("./shared/prompt-At99RuKY.cjs");
974
975
  }
975
976
  ).then((m) => m.prompt(...args)),
976
977
  reporters: options$1.reporters || [options$1.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
@@ -1559,8 +1560,8 @@ async function loadConfig(configPath) {
1559
1560
  }
1560
1561
 
1561
1562
  //#endregion
1562
- //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.66.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
1563
- var require_usingCtx = require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.66.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
1563
+ //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.67.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
1564
+ var require_usingCtx = require_chunk.__commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.67.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
1564
1565
  function _usingCtx() {
1565
1566
  var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
1566
1567
  var n$2 = Error();
package/dist/cli.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  import { __commonJS, __esm, __toESM } from "./shared/chunk-DUYDk_2O.mjs";
2
- import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_misc, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-BCCnC5nI.mjs";
3
- import "./shared/parse-ast-index-CJTgEIMh.mjs";
2
+ import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_misc, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-CaxK4-gB.mjs";
3
+ import "./shared/parse-ast-index-D0SmlXT6.mjs";
4
+ import "./shared/filter-expression-index-BKmgnKlV.mjs";
4
5
  import fs from "node:fs";
5
6
  import path, { sep } from "node:path";
6
7
  import colors from "ansis";
@@ -760,7 +761,7 @@ function createConsola(options$1 = {}) {
760
761
  defaults: { level },
761
762
  stdout: process.stdout,
762
763
  stderr: process.stderr,
763
- prompt: (...args) => import("./shared/prompt-V-Wm9PcC.mjs").then((m) => m.prompt(...args)),
764
+ prompt: (...args) => import("./shared/prompt-UMUDMApt.mjs").then((m) => m.prompt(...args)),
764
765
  reporters: options$1.reporters || [options$1.fancy ?? !(T || R) ? new FancyReporter() : new BasicReporter()],
765
766
  ...options$1
766
767
  });
@@ -1564,8 +1565,8 @@ var init_load_config = __esm({ "src/cli/load-config.ts"() {
1564
1565
  } });
1565
1566
 
1566
1567
  //#endregion
1567
- //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.66.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
1568
- var require_usingCtx = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.66.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
1568
+ //#region ../../node_modules/.pnpm/@oxc-project+runtime@0.67.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js
1569
+ var require_usingCtx = __commonJS({ "../../node_modules/.pnpm/@oxc-project+runtime@0.67.0/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(exports, module) {
1569
1570
  function _usingCtx() {
1570
1571
  var r$1 = "function" == typeof SuppressedError ? SuppressedError : function(r$2, e$1) {
1571
1572
  var n$2 = Error();
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
3
- const require_src = require('./shared/src-DWaN7-KQ.cjs');
4
- const require_parse_ast_index = require('./shared/parse-ast-index-DROW_mqO.cjs');
3
+ const require_src = require('./shared/src-B4f_CmD8.cjs');
4
+ const require_parse_ast_index = require('./shared/parse-ast-index-Bbz37LOL.cjs');
5
+ require('./shared/filter-expression-index-CRtoeipP.cjs');
5
6
  const node_url = require_chunk.__toESM(require("node:url"));
6
7
 
7
8
  //#region src/api/experimental.ts
@@ -1,5 +1,5 @@
1
- import { BindingReplacePluginConfig, BindingTransformPluginConfig, TransformOptions, TransformResult$1 as TransformResult, moduleRunnerTransform, transform } from "./shared/binding.d-BVuAIDg-.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-CU30Caau.cjs";
1
+ import { BindingReplacePluginConfig, BindingTransformPluginConfig, TransformOptions, TransformResult$1 as TransformResult, moduleRunnerTransform, transform } from "./shared/binding.d-y7dWnUxd.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-BHwth6VM.cjs";
3
3
 
4
4
  //#region src/api/experimental.d.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { BindingReplacePluginConfig, BindingTransformPluginConfig, TransformOptions, TransformResult$1 as TransformResult, moduleRunnerTransform, transform } from "./shared/binding.d-BeOzR_y0.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-CHr9lvEw.mjs";
1
+ import { BindingReplacePluginConfig, BindingTransformPluginConfig, TransformOptions, TransformResult$1 as TransformResult, moduleRunnerTransform, transform } from "./shared/binding.d-BaNmLM9c.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-CN-JV5dt.mjs";
3
3
 
4
4
  //#region src/api/experimental.d.ts
5
5
  /**
@@ -1,5 +1,6 @@
1
- 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-BCCnC5nI.mjs";
2
- import { import_binding } from "./shared/parse-ast-index-CJTgEIMh.mjs";
1
+ 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-CaxK4-gB.mjs";
2
+ import { import_binding } from "./shared/parse-ast-index-D0SmlXT6.mjs";
3
+ import "./shared/filter-expression-index-BKmgnKlV.mjs";
3
4
  import { pathToFileURL } from "node:url";
4
5
 
5
6
  //#region src/api/experimental.ts
@@ -0,0 +1,11 @@
1
+ const require_filter_expression_index = require('./shared/filter-expression-index-CRtoeipP.cjs');
2
+
3
+ exports.And = require_filter_expression_index.And
4
+ exports.and = require_filter_expression_index.and
5
+ exports.code = require_filter_expression_index.code
6
+ exports.exclude = require_filter_expression_index.exclude
7
+ exports.id = require_filter_expression_index.id
8
+ exports.include = require_filter_expression_index.include
9
+ exports.moduleType = require_filter_expression_index.moduleType
10
+ exports.not = require_filter_expression_index.not
11
+ exports.or = require_filter_expression_index.or
@@ -0,0 +1,4 @@
1
+ import "./shared/binding.d-y7dWnUxd.cjs";
2
+ import { And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and, code, exclude, id, include, moduleType, not, or } from "./shared/input-options.d-BHwth6VM.cjs";
3
+
4
+ export { And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and, code, exclude, id, include, moduleType, not, or };
@@ -0,0 +1,4 @@
1
+ import "./shared/binding.d-BaNmLM9c.mjs";
2
+ import { And$1 as And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and$1 as and, code$1 as code, exclude$1 as exclude, id$1 as id, include$1 as include, moduleType$1 as moduleType, not$1 as not, or$1 as or } from "./shared/input-options.d-CN-JV5dt.mjs";
3
+
4
+ export { And, FilterExpression, FilterExpressionKind, TopLevelFilterExpression, and, code, exclude, id, include, moduleType, not, or };
@@ -0,0 +1,4 @@
1
+ import { And, and, code, exclude, id, include, init_filter_expression_index, moduleType, not, or } from "./shared/filter-expression-index-BKmgnKlV.mjs";
2
+
3
+ init_filter_expression_index();
4
+ export { And, and, code, exclude, id, include, moduleType, not, or };
package/dist/index.cjs CHANGED
@@ -1,5 +1,6 @@
1
- const require_src = require('./shared/src-DWaN7-KQ.cjs');
2
- require('./shared/parse-ast-index-DROW_mqO.cjs');
1
+ const require_src = require('./shared/src-B4f_CmD8.cjs');
2
+ require('./shared/parse-ast-index-Bbz37LOL.cjs');
3
+ require('./shared/filter-expression-index-CRtoeipP.cjs');
3
4
 
4
5
  exports.VERSION = require_src.VERSION
5
6
  exports.build = require_src.build
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { PreRenderedChunk } from "./shared/binding.d-BVuAIDg-.cjs";
2
- import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, 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, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, StringFilter, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch, withFilter } from "./shared/input-options.d-CU30Caau.cjs";
1
+ import { PreRenderedChunk } from "./shared/binding.d-y7dWnUxd.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, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch, withFilter } from "./shared/input-options.d-BHwth6VM.cjs";
3
3
 
4
- export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, 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, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, StringFilter, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch, withFilter };
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, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch, withFilter };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { PreRenderedChunk } from "./shared/binding.d-BeOzR_y0.mjs";
2
- import { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, 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, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, StringFilter, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION$1 as VERSION, WarningHandlerWithDefault, WatchOptions, build$1 as build, defineConfig$1 as defineConfig, rolldown$1 as rolldown, watch$1 as watch, withFilter$1 as withFilter } from "./shared/input-options.d-CHr9lvEw.mjs";
1
+ import { PreRenderedChunk } from "./shared/binding.d-BaNmLM9c.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, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION$1 as VERSION, WarningHandlerWithDefault, WatchOptions, build$1 as build, defineConfig$1 as defineConfig, rolldown$1 as rolldown, watch$1 as watch, withFilter$1 as withFilter } from "./shared/input-options.d-CN-JV5dt.mjs";
3
3
 
4
- export { AddonFunction, AsyncPluginHooks, BuildOptions, ChunkFileNamesFunction, ConfigExport, CustomPluginOptions, DefineParallelPluginResult, EmittedAsset, EmittedFile, ExistingRawSourceMap, ExternalOption, FunctionPluginHooks, 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, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, StringFilter, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch, withFilter };
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, RollupError, RollupLog, RollupLogWithString, SourceDescription, SourceMap, SourceMapInput, SourcemapIgnoreListOption, TransformPluginContext, TransformResult, TreeshakingOptions, VERSION, WarningHandlerWithDefault, WatchOptions, build, defineConfig, rolldown, watch, withFilter };
package/dist/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
- import { VERSION, build, defineConfig, init_src, rolldown, watch, withFilter } from "./shared/src-BCCnC5nI.mjs";
2
- import "./shared/parse-ast-index-CJTgEIMh.mjs";
1
+ import { VERSION, build, defineConfig, init_src, rolldown, watch, withFilter } from "./shared/src-CaxK4-gB.mjs";
2
+ import "./shared/parse-ast-index-D0SmlXT6.mjs";
3
+ import "./shared/filter-expression-index-BKmgnKlV.mjs";
3
4
 
4
5
  init_src();
5
6
  export { VERSION, build, defineConfig, rolldown, watch, withFilter };
@@ -1,6 +1,7 @@
1
1
  const require_chunk = require('./shared/chunk-qZFfknuJ.cjs');
2
- const require_src = require('./shared/src-DWaN7-KQ.cjs');
3
- const require_parse_ast_index = require('./shared/parse-ast-index-DROW_mqO.cjs');
2
+ const require_src = require('./shared/src-B4f_CmD8.cjs');
3
+ const require_parse_ast_index = require('./shared/parse-ast-index-Bbz37LOL.cjs');
4
+ require('./shared/filter-expression-index-CRtoeipP.cjs');
4
5
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
5
6
 
6
7
  //#region src/parallel-plugin-worker.ts
@@ -1,6 +1,7 @@
1
1
  import { __commonJS } from "./shared/chunk-DUYDk_2O.mjs";
2
- import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-BCCnC5nI.mjs";
3
- import { import_binding } from "./shared/parse-ast-index-CJTgEIMh.mjs";
2
+ import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-CaxK4-gB.mjs";
3
+ import { import_binding } from "./shared/parse-ast-index-D0SmlXT6.mjs";
4
+ import "./shared/filter-expression-index-BKmgnKlV.mjs";
4
5
  import { parentPort, workerData } from "node:worker_threads";
5
6
 
6
7
  //#region src/parallel-plugin-worker.ts
@@ -1,5 +1,5 @@
1
- import "./shared/binding.d-BVuAIDg-.cjs";
2
- import { MaybePromise, Plugin } from "./shared/input-options.d-CU30Caau.cjs";
1
+ import "./shared/binding.d-y7dWnUxd.cjs";
2
+ import { MaybePromise, Plugin } from "./shared/input-options.d-BHwth6VM.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-BeOzR_y0.mjs";
2
- import { MaybePromise, Plugin } from "./shared/input-options.d-CHr9lvEw.mjs";
1
+ import "./shared/binding.d-BaNmLM9c.mjs";
2
+ import { MaybePromise, Plugin } from "./shared/input-options.d-CN-JV5dt.mjs";
3
3
 
4
4
  //#region src/plugin/parallel-plugin-implementation.d.ts
5
5
  type ParallelPluginImplementation = Plugin;
@@ -1,4 +1,4 @@
1
- const require_parse_ast_index = require('./shared/parse-ast-index-DROW_mqO.cjs');
1
+ const require_parse_ast_index = require('./shared/parse-ast-index-Bbz37LOL.cjs');
2
2
 
3
3
  exports.parseAst = require_parse_ast_index.parseAst
4
4
  exports.parseAstAsync = require_parse_ast_index.parseAstAsync
@@ -1,4 +1,4 @@
1
- import { ParseResult, ParserOptions } from "./shared/binding.d-BVuAIDg-.cjs";
1
+ import { ParseResult, ParserOptions } from "./shared/binding.d-y7dWnUxd.cjs";
2
2
  import { Program } from "@oxc-project/types";
3
3
 
4
4
  //#region src/parse-ast-index.d.ts
@@ -1,4 +1,4 @@
1
- import { ParseResult, ParserOptions } from "./shared/binding.d-BeOzR_y0.mjs";
1
+ import { ParseResult, ParserOptions } from "./shared/binding.d-BaNmLM9c.mjs";
2
2
  import { Program } from "@oxc-project/types";
3
3
 
4
4
  //#region src/parse-ast-index.d.ts
@@ -1,4 +1,4 @@
1
- import { init_parse_ast_index, parseAst, parseAstAsync } from "./shared/parse-ast-index-CJTgEIMh.mjs";
1
+ import { init_parse_ast_index, parseAst, parseAstAsync } from "./shared/parse-ast-index-D0SmlXT6.mjs";
2
2
 
3
3
  init_parse_ast_index();
4
4
  export { parseAst, parseAstAsync };
@@ -207,6 +207,47 @@ interface CompilerAssumptions {
207
207
  noDocumentAll?: boolean
208
208
  objectRestNoSymbols?: boolean
209
209
  pureGetters?: boolean
210
+ /**
211
+ * When using public class fields, assume that they don't shadow any getter in the current class,
212
+ * in its subclasses or in its superclass. Thus, it's safe to assign them rather than using
213
+ * `Object.defineProperty`.
214
+ *
215
+ * For example:
216
+ *
217
+ * Input:
218
+ * ```js
219
+ * class Test {
220
+ * field = 2;
221
+ *
222
+ * static staticField = 3;
223
+ * }
224
+ * ```
225
+ *
226
+ * When `set_public_class_fields` is `true`, the output will be:
227
+ * ```js
228
+ * class Test {
229
+ * constructor() {
230
+ * this.field = 2;
231
+ * }
232
+ * }
233
+ * Test.staticField = 3;
234
+ * ```
235
+ *
236
+ * Otherwise, the output will be:
237
+ * ```js
238
+ * import _defineProperty from "@oxc-project/runtime/helpers/defineProperty";
239
+ * class Test {
240
+ * constructor() {
241
+ * _defineProperty(this, "field", 2);
242
+ * }
243
+ * }
244
+ * _defineProperty(Test, "staticField", 3);
245
+ * ```
246
+ *
247
+ * NOTE: For TypeScript, if you wanted behavior is equivalent to `useDefineForClassFields: false`, you should
248
+ * set both `set_public_class_fields` and [`crate::TypeScriptOptions::remove_class_fields_without_initializer`]
249
+ * to `true`.
250
+ */
210
251
  setPublicClassFields?: boolean
211
252
  }
212
253
  interface DecoratorOptions {
@@ -812,7 +853,50 @@ interface TypeScriptOptions {
812
853
  jsxPragmaFrag?: string
813
854
  onlyRemoveTypeImports?: boolean
814
855
  allowNamespaces?: boolean
856
+ /**
857
+ * When enabled, type-only class fields are only removed if they are prefixed with the declare modifier:
858
+ *
859
+ * @deprecated
860
+ *
861
+ * Allowing `declare` fields is built-in support in Oxc without any option. If you want to remove class fields
862
+ * without initializer, you can use `remove_class_fields_without_initializer: true` instead.
863
+ */
815
864
  allowDeclareFields?: boolean
865
+ /**
866
+ * When enabled, class fields without initializers are removed.
867
+ *
868
+ * For example:
869
+ * ```ts
870
+ * class Foo {
871
+ * x: number;
872
+ * y: number = 0;
873
+ * }
874
+ * ```
875
+ * // transform into
876
+ * ```js
877
+ * class Foo {
878
+ * x: number;
879
+ * }
880
+ * ```
881
+ *
882
+ * The option is used to align with the behavior of TypeScript's `useDefineForClassFields: false` option.
883
+ * When you want to enable this, you also need to set [`crate::CompilerAssumptions::set_public_class_fields`]
884
+ * to `true`. The `set_public_class_fields: true` + `remove_class_fields_without_initializer: true` is
885
+ * equivalent to `useDefineForClassFields: false` in TypeScript.
886
+ *
887
+ * When `set_public_class_fields` is true and class-properties plugin is enabled, the above example transforms into:
888
+ *
889
+ * ```js
890
+ * class Foo {
891
+ * constructor() {
892
+ * this.y = 0;
893
+ * }
894
+ * }
895
+ * ```
896
+ *
897
+ * Defaults to `false`.
898
+ */
899
+ removeClassFieldsWithoutInitializer?: boolean
816
900
  /**
817
901
  * Also generate a `.d.ts` declaration file for TypeScript files.
818
902
  *
@@ -207,6 +207,47 @@ interface CompilerAssumptions {
207
207
  noDocumentAll?: boolean
208
208
  objectRestNoSymbols?: boolean
209
209
  pureGetters?: boolean
210
+ /**
211
+ * When using public class fields, assume that they don't shadow any getter in the current class,
212
+ * in its subclasses or in its superclass. Thus, it's safe to assign them rather than using
213
+ * `Object.defineProperty`.
214
+ *
215
+ * For example:
216
+ *
217
+ * Input:
218
+ * ```js
219
+ * class Test {
220
+ * field = 2;
221
+ *
222
+ * static staticField = 3;
223
+ * }
224
+ * ```
225
+ *
226
+ * When `set_public_class_fields` is `true`, the output will be:
227
+ * ```js
228
+ * class Test {
229
+ * constructor() {
230
+ * this.field = 2;
231
+ * }
232
+ * }
233
+ * Test.staticField = 3;
234
+ * ```
235
+ *
236
+ * Otherwise, the output will be:
237
+ * ```js
238
+ * import _defineProperty from "@oxc-project/runtime/helpers/defineProperty";
239
+ * class Test {
240
+ * constructor() {
241
+ * _defineProperty(this, "field", 2);
242
+ * }
243
+ * }
244
+ * _defineProperty(Test, "staticField", 3);
245
+ * ```
246
+ *
247
+ * NOTE: For TypeScript, if you wanted behavior is equivalent to `useDefineForClassFields: false`, you should
248
+ * set both `set_public_class_fields` and [`crate::TypeScriptOptions::remove_class_fields_without_initializer`]
249
+ * to `true`.
250
+ */
210
251
  setPublicClassFields?: boolean
211
252
  }
212
253
  interface DecoratorOptions {
@@ -812,7 +853,50 @@ interface TypeScriptOptions {
812
853
  jsxPragmaFrag?: string
813
854
  onlyRemoveTypeImports?: boolean
814
855
  allowNamespaces?: boolean
856
+ /**
857
+ * When enabled, type-only class fields are only removed if they are prefixed with the declare modifier:
858
+ *
859
+ * @deprecated
860
+ *
861
+ * Allowing `declare` fields is built-in support in Oxc without any option. If you want to remove class fields
862
+ * without initializer, you can use `remove_class_fields_without_initializer: true` instead.
863
+ */
815
864
  allowDeclareFields?: boolean
865
+ /**
866
+ * When enabled, class fields without initializers are removed.
867
+ *
868
+ * For example:
869
+ * ```ts
870
+ * class Foo {
871
+ * x: number;
872
+ * y: number = 0;
873
+ * }
874
+ * ```
875
+ * // transform into
876
+ * ```js
877
+ * class Foo {
878
+ * x: number;
879
+ * }
880
+ * ```
881
+ *
882
+ * The option is used to align with the behavior of TypeScript's `useDefineForClassFields: false` option.
883
+ * When you want to enable this, you also need to set [`crate::CompilerAssumptions::set_public_class_fields`]
884
+ * to `true`. The `set_public_class_fields: true` + `remove_class_fields_without_initializer: true` is
885
+ * equivalent to `useDefineForClassFields: false` in TypeScript.
886
+ *
887
+ * When `set_public_class_fields` is true and class-properties plugin is enabled, the above example transforms into:
888
+ *
889
+ * ```js
890
+ * class Foo {
891
+ * constructor() {
892
+ * this.y = 0;
893
+ * }
894
+ * }
895
+ * ```
896
+ *
897
+ * Defaults to `false`.
898
+ */
899
+ removeClassFieldsWithoutInitializer?: boolean
816
900
  /**
817
901
  * Also generate a `.d.ts` declaration file for TypeScript files.
818
902
  *
@@ -0,0 +1,69 @@
1
+ import { __esm } from "./chunk-DUYDk_2O.mjs";
2
+
3
+ //#region src/filter-expression-index.ts
4
+ function and(left, right) {
5
+ return {
6
+ kind: "and",
7
+ left,
8
+ right
9
+ };
10
+ }
11
+ function or(left, right) {
12
+ return {
13
+ kind: "or",
14
+ left,
15
+ right
16
+ };
17
+ }
18
+ function not(expr) {
19
+ return {
20
+ kind: "not",
21
+ expr
22
+ };
23
+ }
24
+ function id(pattern) {
25
+ return {
26
+ kind: "id",
27
+ pattern
28
+ };
29
+ }
30
+ function moduleType(pattern) {
31
+ return {
32
+ kind: "moduleType",
33
+ pattern
34
+ };
35
+ }
36
+ function code(pattern) {
37
+ return {
38
+ kind: "code",
39
+ pattern
40
+ };
41
+ }
42
+ function include(expr) {
43
+ return {
44
+ kind: "include",
45
+ expr
46
+ };
47
+ }
48
+ function exclude(expr) {
49
+ return {
50
+ kind: "exclude",
51
+ expr
52
+ };
53
+ }
54
+ var And;
55
+ var init_filter_expression_index = __esm({ "src/filter-expression-index.ts"() {
56
+ And = class {
57
+ kind;
58
+ left;
59
+ right;
60
+ constructor(left, right) {
61
+ this.left = left;
62
+ this.right = right;
63
+ this.kind = "and";
64
+ }
65
+ };
66
+ } });
67
+
68
+ //#endregion
69
+ export { And, and, code, exclude, id, include, init_filter_expression_index, moduleType, not, or };
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+
3
+ //#region src/filter-expression-index.ts
4
+ var And = class {
5
+ kind;
6
+ left;
7
+ right;
8
+ constructor(left, right) {
9
+ this.left = left;
10
+ this.right = right;
11
+ this.kind = "and";
12
+ }
13
+ };
14
+ function and(left, right) {
15
+ return {
16
+ kind: "and",
17
+ left,
18
+ right
19
+ };
20
+ }
21
+ function or(left, right) {
22
+ return {
23
+ kind: "or",
24
+ left,
25
+ right
26
+ };
27
+ }
28
+ function not(expr) {
29
+ return {
30
+ kind: "not",
31
+ expr
32
+ };
33
+ }
34
+ function id(pattern) {
35
+ return {
36
+ kind: "id",
37
+ pattern
38
+ };
39
+ }
40
+ function moduleType(pattern) {
41
+ return {
42
+ kind: "moduleType",
43
+ pattern
44
+ };
45
+ }
46
+ function code(pattern) {
47
+ return {
48
+ kind: "code",
49
+ pattern
50
+ };
51
+ }
52
+ function include(expr) {
53
+ return {
54
+ kind: "include",
55
+ expr
56
+ };
57
+ }
58
+ function exclude(expr) {
59
+ return {
60
+ kind: "exclude",
61
+ expr
62
+ };
63
+ }
64
+
65
+ //#endregion
66
+ Object.defineProperty(exports, 'And', {
67
+ enumerable: true,
68
+ get: function () {
69
+ return And;
70
+ }
71
+ });
72
+ Object.defineProperty(exports, 'and', {
73
+ enumerable: true,
74
+ get: function () {
75
+ return and;
76
+ }
77
+ });
78
+ Object.defineProperty(exports, 'code', {
79
+ enumerable: true,
80
+ get: function () {
81
+ return code;
82
+ }
83
+ });
84
+ Object.defineProperty(exports, 'exclude', {
85
+ enumerable: true,
86
+ get: function () {
87
+ return exclude;
88
+ }
89
+ });
90
+ Object.defineProperty(exports, 'id', {
91
+ enumerable: true,
92
+ get: function () {
93
+ return id;
94
+ }
95
+ });
96
+ Object.defineProperty(exports, 'include', {
97
+ enumerable: true,
98
+ get: function () {
99
+ return include;
100
+ }
101
+ });
102
+ Object.defineProperty(exports, 'moduleType', {
103
+ enumerable: true,
104
+ get: function () {
105
+ return moduleType;
106
+ }
107
+ });
108
+ Object.defineProperty(exports, 'not', {
109
+ enumerable: true,
110
+ get: function () {
111
+ return not;
112
+ }
113
+ });
114
+ Object.defineProperty(exports, 'or', {
115
+ enumerable: true,
116
+ get: function () {
117
+ return or;
118
+ }
119
+ });