@rolldown/browser 1.0.0-rc.16 → 1.0.0-rc.18

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 (29) hide show
  1. package/dist/cli.mjs +6 -6
  2. package/dist/config.d.mts +1 -1
  3. package/dist/config.mjs +2 -2
  4. package/dist/{error-DyjphrNB.js → error-Wb6U5UzX.js} +1 -1
  5. package/dist/experimental-index.browser.mjs +3 -3
  6. package/dist/experimental-index.d.mts +1 -1
  7. package/dist/experimental-index.mjs +3 -3
  8. package/dist/experimental-runtime-types.d.ts +14 -5
  9. package/dist/filter-index.d.mts +1 -1
  10. package/dist/index.browser.mjs +2 -2
  11. package/dist/index.d.mts +1 -1
  12. package/dist/index.mjs +3 -3
  13. package/dist/parallel-plugin-worker.mjs +1 -1
  14. package/dist/parallel-plugin.d.mts +1 -1
  15. package/dist/parse-ast-index.mjs +1 -1
  16. package/dist/{resolve-tsconfig-wB7yLsyK.js → resolve-tsconfig-D81WVTGZ.js} +1 -1
  17. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  18. package/dist/{rolldown-build-DyzPc6vz.js → rolldown-build-D0tGZ7Ho.js} +81 -143
  19. package/dist/shared/{bindingify-input-options-BM_ALGnD.mjs → bindingify-input-options-CwgInDkH.mjs} +2 -2
  20. package/dist/shared/{define-config-iFrqKPOQ.d.mts → define-config-Bah0mfyR.d.mts} +14 -1
  21. package/dist/shared/{load-config-BbGXN4n6.mjs → load-config-53AVxtku.mjs} +1 -1
  22. package/dist/shared/{parse-Cxk58XCS.mjs → parse-CSnBnIDb.mjs} +1 -1
  23. package/dist/shared/{rolldown-DrY5vEjL.mjs → rolldown-QMNic12I.mjs} +1 -1
  24. package/dist/shared/{rolldown-build-BMFr9KVX.mjs → rolldown-build-DTZNpSde.mjs} +80 -142
  25. package/dist/shared/{watch-B_mctB4m.mjs → watch-CaH0VzA9.mjs} +2 -2
  26. package/dist/utils-index.browser.mjs +5 -5
  27. package/dist/utils-index.d.mts +1 -1
  28. package/dist/utils-index.mjs +4 -4
  29. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  import { c as logCycleLoading, f as logNoFileSystemInBrowser, g as getCodeFrame, h as locate, i as bindingifyManifestPlugin, l as logInputHookInOutputPlugin, m as logPluginError, n as BuiltinPlugin, o as augmentCodeLocation, p as logParseError, r as bindingifyBuiltInPlugin, s as error, t as normalizedStringOrRegex, u as logInvalidLogPosition } from "./normalize-string-or-regex-Db8ibFkp.js";
2
- import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-DyjphrNB.js";
2
+ import { i as unwrapBindingResult, o as parseSync$1, s as bindingifySourcemap$1, t as aggregateBindingErrorsIntoJsError } from "./error-Wb6U5UzX.js";
3
3
  import { BindingAttachDebugInfo, BindingBundler, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
4
4
  //#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
5
5
  let _lazyMatch = () => {
@@ -454,7 +454,7 @@ const win32 = /* @__PURE__ */ mix(";");
454
454
  *
455
455
  * @category Plugin APIs
456
456
  */
457
- const VERSION = "1.0.0-rc.16";
457
+ const VERSION = "1.0.0-rc.18";
458
458
  //#endregion
459
459
  //#region src/constants/index.ts
460
460
  /**
@@ -747,7 +747,7 @@ function getSortedPlugins(hookName, plugins) {
747
747
  ];
748
748
  }
749
749
  //#endregion
750
- //#region ../../node_modules/.pnpm/valibot@1.3.1_typescript@6.0.2/node_modules/valibot/dist/index.mjs
750
+ //#region ../../node_modules/.pnpm/valibot@1.3.1_typescript@6.0.3/node_modules/valibot/dist/index.mjs
751
751
  let store$4;
752
752
  /**
753
753
  * Returns the global configuration.
@@ -1839,9 +1839,7 @@ function styleText(...args) {
1839
1839
  }
1840
1840
  //#endregion
1841
1841
  //#region src/utils/validator.ts
1842
- function isTypeTrue() {}
1843
1842
  const StringOrRegExpSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ instance(RegExp)]);
1844
- isTypeTrue();
1845
1843
  function vFunction() {
1846
1844
  return /* @__PURE__ */ function_();
1847
1845
  }
@@ -1850,32 +1848,25 @@ const LogLevelSchema = /* @__PURE__ */ union([
1850
1848
  /* @__PURE__ */ literal("info"),
1851
1849
  /* @__PURE__ */ literal("warn")
1852
1850
  ]);
1853
- isTypeTrue();
1854
1851
  const LogLevelOptionSchema = /* @__PURE__ */ union([LogLevelSchema, /* @__PURE__ */ literal("silent")]);
1855
- isTypeTrue();
1856
1852
  const LogLevelWithErrorSchema = /* @__PURE__ */ union([LogLevelSchema, /* @__PURE__ */ literal("error")]);
1857
- isTypeTrue();
1858
1853
  const RollupLogSchema = /* @__PURE__ */ any();
1859
1854
  const RollupLogWithStringSchema = /* @__PURE__ */ union([RollupLogSchema, /* @__PURE__ */ string()]);
1860
- isTypeTrue();
1861
1855
  const InputOptionSchema = /* @__PURE__ */ union([
1862
1856
  /* @__PURE__ */ string(),
1863
1857
  /* @__PURE__ */ array(/* @__PURE__ */ string()),
1864
1858
  /* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())
1865
1859
  ]);
1866
- isTypeTrue();
1867
1860
  const ExternalOptionFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([
1868
1861
  /* @__PURE__ */ string(),
1869
1862
  /* @__PURE__ */ optional(/* @__PURE__ */ string()),
1870
1863
  /* @__PURE__ */ boolean()
1871
1864
  ])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ boolean())));
1872
- isTypeTrue();
1873
1865
  const ExternalOptionSchema = /* @__PURE__ */ union([
1874
1866
  StringOrRegExpSchema,
1875
1867
  /* @__PURE__ */ array(StringOrRegExpSchema),
1876
1868
  ExternalOptionFunctionSchema
1877
1869
  ]);
1878
- isTypeTrue();
1879
1870
  const ModuleTypesSchema = /* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([
1880
1871
  /* @__PURE__ */ literal("asset"),
1881
1872
  /* @__PURE__ */ literal("base64"),
@@ -1891,78 +1882,63 @@ const ModuleTypesSchema = /* @__PURE__ */ record(/* @__PURE__ */ string(), /* @_
1891
1882
  /* @__PURE__ */ literal("ts"),
1892
1883
  /* @__PURE__ */ literal("tsx")
1893
1884
  ]));
1894
- isTypeTrue();
1895
- const JsxOptionsSchema = /* @__PURE__ */ strictObject({
1896
- runtime: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("classic"), /* @__PURE__ */ literal("automatic")])), /* @__PURE__ */ description("Which runtime to use")),
1897
- development: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Development specific information")),
1898
- throwIfNamespace: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Toggles whether to throw an error when a tag name uses an XML namespace")),
1899
- pure: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Mark JSX elements and top-level React method calls as pure for tree shaking.")),
1900
- importSource: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Import the factory of element and fragment if mode is classic")),
1901
- pragma: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Jsx element transformation")),
1902
- pragmaFrag: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Jsx fragment transformation")),
1903
- refresh: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ any()])), /* @__PURE__ */ description("Enable react fast refresh"))
1904
- });
1905
- isTypeTrue();
1906
- const HelperModeSchema = /* @__PURE__ */ union([/* @__PURE__ */ literal("Runtime"), /* @__PURE__ */ literal("External")]);
1907
- const DecoratorOptionSchema = /* @__PURE__ */ object({
1908
- legacy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1909
- emitDecoratorMetadata: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1910
- });
1911
- isTypeTrue();
1912
- const HelpersSchema = /* @__PURE__ */ object({ mode: /* @__PURE__ */ optional(HelperModeSchema) });
1913
- isTypeTrue();
1914
- const TypescriptSchema = /* @__PURE__ */ object({
1915
- jsxPragma: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
1916
- jsxPragmaFrag: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
1917
- onlyRemoveTypeImports: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1918
- allowNamespaces: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1919
- allowDeclareFields: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1920
- removeClassFieldsWithoutInitializer: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1921
- optimizeConstEnums: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1922
- optimizeEnums: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1923
- declaration: /* @__PURE__ */ optional(/* @__PURE__ */ object({
1924
- stripInternal: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1925
- sourcemap: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1926
- })),
1927
- rewriteImportExtensions: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1928
- /* @__PURE__ */ literal("rewrite"),
1929
- /* @__PURE__ */ literal("remove"),
1930
- /* @__PURE__ */ boolean()
1931
- ]))
1932
- });
1933
- isTypeTrue();
1934
- const AssumptionsSchema = /* @__PURE__ */ object({
1935
- ignoreFunctionLength: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1936
- noDocumentAll: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1937
- objectRestNoSymbols: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1938
- pureGetters: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1939
- setPublicClassFields: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1940
- });
1941
- isTypeTrue();
1942
- const TransformPluginsSchema = /* @__PURE__ */ object({
1943
- styledComponents: /* @__PURE__ */ optional(/* @__PURE__ */ any()),
1944
- taggedTemplateEscape: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1945
- });
1946
- isTypeTrue();
1947
1885
  const TransformOptionsSchema = /* @__PURE__ */ object({
1948
- assumptions: /* @__PURE__ */ optional(AssumptionsSchema),
1949
- typescript: /* @__PURE__ */ optional(TypescriptSchema),
1950
- helpers: /* @__PURE__ */ optional(HelpersSchema),
1951
- decorator: /* @__PURE__ */ optional(DecoratorOptionSchema),
1886
+ assumptions: /* @__PURE__ */ optional(/* @__PURE__ */ object({
1887
+ ignoreFunctionLength: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1888
+ noDocumentAll: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1889
+ objectRestNoSymbols: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1890
+ pureGetters: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1891
+ setPublicClassFields: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1892
+ })),
1893
+ typescript: /* @__PURE__ */ optional(/* @__PURE__ */ object({
1894
+ jsxPragma: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
1895
+ jsxPragmaFrag: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
1896
+ onlyRemoveTypeImports: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1897
+ allowNamespaces: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1898
+ allowDeclareFields: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1899
+ removeClassFieldsWithoutInitializer: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1900
+ optimizeConstEnums: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1901
+ optimizeEnums: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1902
+ declaration: /* @__PURE__ */ optional(/* @__PURE__ */ object({
1903
+ stripInternal: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1904
+ sourcemap: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1905
+ })),
1906
+ rewriteImportExtensions: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1907
+ /* @__PURE__ */ literal("rewrite"),
1908
+ /* @__PURE__ */ literal("remove"),
1909
+ /* @__PURE__ */ boolean()
1910
+ ]))
1911
+ })),
1912
+ helpers: /* @__PURE__ */ optional(/* @__PURE__ */ object({ mode: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("Runtime"), /* @__PURE__ */ literal("External")])) })),
1913
+ decorator: /* @__PURE__ */ optional(/* @__PURE__ */ object({
1914
+ legacy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1915
+ emitDecoratorMetadata: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1916
+ })),
1952
1917
  jsx: /* @__PURE__ */ optional(/* @__PURE__ */ union([
1953
1918
  /* @__PURE__ */ literal(false),
1954
1919
  /* @__PURE__ */ literal("preserve"),
1955
1920
  /* @__PURE__ */ literal("react"),
1956
1921
  /* @__PURE__ */ literal("react-jsx"),
1957
- JsxOptionsSchema
1922
+ /* @__PURE__ */ strictObject({
1923
+ runtime: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("classic"), /* @__PURE__ */ literal("automatic")])), /* @__PURE__ */ description("Which runtime to use")),
1924
+ development: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Development specific information")),
1925
+ throwIfNamespace: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Toggles whether to throw an error when a tag name uses an XML namespace")),
1926
+ pure: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Mark JSX elements and top-level React method calls as pure for tree shaking.")),
1927
+ importSource: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Import the factory of element and fragment if mode is classic")),
1928
+ pragma: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Jsx element transformation")),
1929
+ pragmaFrag: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Jsx fragment transformation")),
1930
+ refresh: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ any()])), /* @__PURE__ */ description("Enable react fast refresh"))
1931
+ })
1958
1932
  ])),
1959
1933
  target: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string())])), /* @__PURE__ */ description("The JavaScript target environment")),
1960
1934
  define: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ string())), /* @__PURE__ */ description("Define global variables (syntax: key:value,key2:value2)")),
1961
1935
  inject: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ string()])]))), /* @__PURE__ */ description("Inject import statements on demand")),
1962
1936
  dropLabels: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Remove labeled statements with these label names")),
1963
- plugins: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(TransformPluginsSchema), /* @__PURE__ */ description("Third-party plugins to use"))
1937
+ plugins: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ object({
1938
+ styledComponents: /* @__PURE__ */ optional(/* @__PURE__ */ any()),
1939
+ taggedTemplateEscape: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
1940
+ })), /* @__PURE__ */ description("Third-party plugins to use"))
1964
1941
  });
1965
- isTypeTrue();
1966
1942
  const WatcherFileWatcherOptionsSchema = /* @__PURE__ */ strictObject({
1967
1943
  usePolling: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Use polling-based file watching instead of native OS events")),
1968
1944
  pollInterval: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ number()), /* @__PURE__ */ description("Poll interval in milliseconds (only used when usePolling is true)")),
@@ -1982,7 +1958,6 @@ const WatcherOptionsSchema = /* @__PURE__ */ strictObject({
1982
1958
  clearScreen: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to clear the screen when a rebuild is triggered")),
1983
1959
  onInvalidate: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(vFunction()), /* @__PURE__ */ description("An optional function that will be called immediately every time a module changes that is part of the build."))
1984
1960
  });
1985
- isTypeTrue();
1986
1961
  const ChecksOptionsSchema = /* @__PURE__ */ strictObject({
1987
1962
  circularDependency: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when detecting circular dependency")),
1988
1963
  eval: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when detecting uses of direct `eval`s")),
@@ -2005,53 +1980,39 @@ const ChecksOptionsSchema = /* @__PURE__ */ strictObject({
2005
1980
  unsupportedTsconfigOption: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a tsconfig option or combination of options is not supported")),
2006
1981
  ineffectiveDynamicImport: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to emit warnings when a module is dynamically imported but also statically imported, making the dynamic import ineffective for code splitting"))
2007
1982
  });
2008
- isTypeTrue();
2009
- const CompressOptionsKeepNamesSchema = /* @__PURE__ */ strictObject({
2010
- function: /* @__PURE__ */ boolean(),
2011
- class: /* @__PURE__ */ boolean()
2012
- });
2013
- isTypeTrue();
2014
- const CompressTreeshakeOptionsSchema = /* @__PURE__ */ strictObject({
2015
- annotations: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2016
- manualPureFunctions: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
2017
- propertyReadSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("always")])),
2018
- propertyWriteSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2019
- unknownGlobalSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2020
- invalidImportSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
2021
- });
2022
- isTypeTrue();
2023
- const CompressOptionsSchema = /* @__PURE__ */ strictObject({
2024
- target: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string())])),
2025
- dropConsole: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2026
- dropDebugger: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2027
- keepNames: /* @__PURE__ */ optional(CompressOptionsKeepNamesSchema),
2028
- unused: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("keep_assign")])),
2029
- joinVars: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2030
- sequences: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2031
- dropLabels: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
2032
- maxIterations: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2033
- treeshake: /* @__PURE__ */ optional(CompressTreeshakeOptionsSchema)
2034
- });
2035
- isTypeTrue();
2036
- const MangleOptionsKeepNamesSchema = /* @__PURE__ */ strictObject({
2037
- function: /* @__PURE__ */ boolean(),
2038
- class: /* @__PURE__ */ boolean()
2039
- });
2040
- isTypeTrue();
2041
- const MangleOptionsSchema = /* @__PURE__ */ strictObject({
2042
- toplevel: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2043
- keepNames: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), MangleOptionsKeepNamesSchema])),
2044
- debug: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
2045
- });
2046
- isTypeTrue();
2047
- const CodegenOptionsSchema = /* @__PURE__ */ strictObject({ removeWhitespace: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()) });
2048
- isTypeTrue();
2049
1983
  const MinifyOptionsSchema = /* @__PURE__ */ strictObject({
2050
- compress: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), CompressOptionsSchema])),
2051
- mangle: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), MangleOptionsSchema])),
2052
- codegen: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), CodegenOptionsSchema]))
1984
+ compress: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
1985
+ target: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ string(), /* @__PURE__ */ array(/* @__PURE__ */ string())])),
1986
+ dropConsole: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1987
+ dropDebugger: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1988
+ keepNames: /* @__PURE__ */ optional(/* @__PURE__ */ strictObject({
1989
+ function: /* @__PURE__ */ boolean(),
1990
+ class: /* @__PURE__ */ boolean()
1991
+ })),
1992
+ unused: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("keep_assign")])),
1993
+ joinVars: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1994
+ sequences: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1995
+ dropLabels: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
1996
+ maxIterations: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
1997
+ treeshake: /* @__PURE__ */ optional(/* @__PURE__ */ strictObject({
1998
+ annotations: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
1999
+ manualPureFunctions: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())),
2000
+ propertyReadSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("always")])),
2001
+ propertyWriteSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2002
+ unknownGlobalSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2003
+ invalidImportSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
2004
+ }))
2005
+ })])),
2006
+ mangle: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
2007
+ toplevel: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2008
+ keepNames: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
2009
+ function: /* @__PURE__ */ boolean(),
2010
+ class: /* @__PURE__ */ boolean()
2011
+ })])),
2012
+ debug: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
2013
+ })])),
2014
+ codegen: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({ removeWhitespace: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()) })]))
2053
2015
  });
2054
- isTypeTrue();
2055
2016
  const ResolveOptionsSchema = /* @__PURE__ */ strictObject({
2056
2017
  alias: /* @__PURE__ */ optional(/* @__PURE__ */ record(/* @__PURE__ */ string(), /* @__PURE__ */ union([
2057
2018
  /* @__PURE__ */ literal(false),
@@ -2069,7 +2030,6 @@ const ResolveOptionsSchema = /* @__PURE__ */ strictObject({
2069
2030
  symlinks: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2070
2031
  tsconfigFilename: /* @__PURE__ */ optional(/* @__PURE__ */ string())
2071
2032
  });
2072
- isTypeTrue();
2073
2033
  const TreeshakingOptionsSchema = /* @__PURE__ */ strictObject({
2074
2034
  moduleSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ any()),
2075
2035
  annotations: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
@@ -2080,7 +2040,6 @@ const TreeshakingOptionsSchema = /* @__PURE__ */ strictObject({
2080
2040
  propertyReadSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(false), /* @__PURE__ */ literal("always")])),
2081
2041
  propertyWriteSideEffects: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal(false), /* @__PURE__ */ literal("always")]))
2082
2042
  });
2083
- isTypeTrue();
2084
2043
  const OptimizationOptionsSchema = /* @__PURE__ */ strictObject({
2085
2044
  inlineConst: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
2086
2045
  mode: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("all"), /* @__PURE__ */ literal("smart")])),
@@ -2088,24 +2047,19 @@ const OptimizationOptionsSchema = /* @__PURE__ */ strictObject({
2088
2047
  })])), /* @__PURE__ */ description("Enable crossmodule constant inlining")),
2089
2048
  pifeForModuleWrappers: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Use PIFE pattern for module wrappers"))
2090
2049
  });
2091
- isTypeTrue();
2092
2050
  const LogOrStringHandlerSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([LogLevelWithErrorSchema, RollupLogWithStringSchema])));
2093
- isTypeTrue();
2094
2051
  const OnLogSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([
2095
2052
  LogLevelSchema,
2096
2053
  RollupLogSchema,
2097
2054
  LogOrStringHandlerSchema
2098
2055
  ])));
2099
- isTypeTrue();
2100
2056
  const OnwarnSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([RollupLogSchema, /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ union([RollupLogWithStringSchema, /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ returns(RollupLogWithStringSchema))])])))])));
2101
- isTypeTrue();
2102
2057
  const DevModeSchema = /* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ strictObject({
2103
2058
  port: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
2104
2059
  host: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
2105
2060
  implement: /* @__PURE__ */ optional(/* @__PURE__ */ string()),
2106
2061
  lazy: /* @__PURE__ */ optional(/* @__PURE__ */ boolean())
2107
2062
  })]);
2108
- isTypeTrue();
2109
2063
  const InputOptionsSchema = /* @__PURE__ */ strictObject({
2110
2064
  input: /* @__PURE__ */ optional(InputOptionSchema),
2111
2065
  plugins: /* @__PURE__ */ optional(/* @__PURE__ */ custom(() => true)),
@@ -2158,7 +2112,6 @@ const InputOptionsSchema = /* @__PURE__ */ strictObject({
2158
2112
  context: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("The value of `this` at the top level of each module.")),
2159
2113
  tsconfig: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ string()])), /* @__PURE__ */ description("Path to the tsconfig.json file."))
2160
2114
  });
2161
- isTypeTrue();
2162
2115
  const InputCliOverrideSchema = /* @__PURE__ */ strictObject({
2163
2116
  input: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Entry file")),
2164
2117
  external: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string())), /* @__PURE__ */ description("Comma-separated list of module ids to exclude from the bundle `<module-id>,...`")),
@@ -2187,32 +2140,22 @@ const ModuleFormatSchema = /* @__PURE__ */ union([
2187
2140
  /* @__PURE__ */ literal("iife"),
2188
2141
  /* @__PURE__ */ literal("umd")
2189
2142
  ]);
2190
- isTypeTrue();
2191
2143
  const AddonFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returnsAsync(/* @__PURE__ */ unionAsync([/* @__PURE__ */ string(), /* @__PURE__ */ pipeAsync(/* @__PURE__ */ promise(), /* @__PURE__ */ awaitAsync(), /* @__PURE__ */ string())])));
2192
- isTypeTrue();
2193
2144
  const ChunkFileNamesFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
2194
- isTypeTrue();
2195
2145
  const ChunkFileNamesSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), ChunkFileNamesFunctionSchema]);
2196
2146
  const AssetFileNamesFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ custom(() => true)])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
2197
- isTypeTrue();
2198
2147
  const AssetFileNamesSchema = /* @__PURE__ */ union([/* @__PURE__ */ string(), AssetFileNamesFunctionSchema]);
2199
2148
  const SanitizeFileNameFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
2200
- isTypeTrue();
2201
2149
  const SanitizeFileNameSchema = /* @__PURE__ */ union([/* @__PURE__ */ boolean(), SanitizeFileNameFunctionSchema]);
2202
2150
  const GlobalsFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
2203
- isTypeTrue();
2204
2151
  const PathsFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ string()));
2205
- isTypeTrue();
2206
2152
  const ManualChunksFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ object({})])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ string())));
2207
- isTypeTrue();
2208
2153
  const AdvancedChunksNameFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string(), /* @__PURE__ */ object({})])), /* @__PURE__ */ returns(/* @__PURE__ */ nullish(/* @__PURE__ */ string())));
2209
- isTypeTrue();
2210
2154
  const AdvancedChunksTestFunctionSchema = /* @__PURE__ */ pipe(vFunction(), /* @__PURE__ */ args(/* @__PURE__ */ tuple([/* @__PURE__ */ string()])), /* @__PURE__ */ returns(/* @__PURE__ */ union([
2211
2155
  /* @__PURE__ */ boolean(),
2212
2156
  /* @__PURE__ */ void_(),
2213
2157
  /* @__PURE__ */ undefined_()
2214
2158
  ])));
2215
- isTypeTrue();
2216
2159
  const AdvancedChunksSchema = /* @__PURE__ */ strictObject({
2217
2160
  includeDependenciesRecursively: /* @__PURE__ */ optional(/* @__PURE__ */ boolean()),
2218
2161
  minSize: /* @__PURE__ */ optional(/* @__PURE__ */ number()),
@@ -2234,15 +2177,11 @@ const AdvancedChunksSchema = /* @__PURE__ */ strictObject({
2234
2177
  tags: /* @__PURE__ */ optional(/* @__PURE__ */ array(/* @__PURE__ */ string()))
2235
2178
  })))
2236
2179
  });
2237
- isTypeTrue();
2238
- const GeneratedCodePresetSchema = /* @__PURE__ */ union([/* @__PURE__ */ literal("es5"), /* @__PURE__ */ literal("es2015")]);
2239
- isTypeTrue();
2240
2180
  const GeneratedCodeOptionsSchema = /* @__PURE__ */ strictObject({
2241
2181
  symbols: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to use Symbol.toStringTag for namespace objects")),
2242
- preset: /* @__PURE__ */ optional(GeneratedCodePresetSchema),
2182
+ preset: /* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ literal("es5"), /* @__PURE__ */ literal("es2015")])),
2243
2183
  profilerNames: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Whether to add readable names to internal variables for profiling purposes"))
2244
2184
  });
2245
- isTypeTrue();
2246
2185
  const OutputOptionsSchema = /* @__PURE__ */ strictObject({
2247
2186
  dir: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Output directory, defaults to `dist` if `file` is not set")),
2248
2187
  file: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ string()), /* @__PURE__ */ description("Single output file")),
@@ -2318,7 +2257,6 @@ const OutputOptionsSchema = /* @__PURE__ */ strictObject({
2318
2257
  strictExecutionOrder: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ boolean()), /* @__PURE__ */ description("Lets modules be executed in the order they are declared.")),
2319
2258
  strict: /* @__PURE__ */ pipe(/* @__PURE__ */ optional(/* @__PURE__ */ union([/* @__PURE__ */ boolean(), /* @__PURE__ */ literal("auto")])), /* @__PURE__ */ description("Whether to always output `\"use strict\"` directive in non-ES module outputs."))
2320
2259
  });
2321
- isTypeTrue();
2322
2260
  const getAddonDescription = (placement, wrapper) => {
2323
2261
  return `Code to insert the ${styleText("bold", placement)} of the bundled file (${styleText("bold", wrapper)} the wrapper function)`;
2324
2262
  };
@@ -2510,7 +2448,7 @@ function bindingAssetSource(source) {
2510
2448
  return { inner: source };
2511
2449
  }
2512
2450
  //#endregion
2513
- //#region \0@oxc-project+runtime@0.126.0/helpers/decorate.js
2451
+ //#region \0@oxc-project+runtime@0.128.0/helpers/decorate.js
2514
2452
  function __decorate(decorators, target, key, desc) {
2515
2453
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2516
2454
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -7,7 +7,7 @@ import { BindingAttachDebugInfo, BindingChunkModuleOrderBy, BindingLogLevel, Bin
7
7
  import path from "node:path";
8
8
  import fsp from "node:fs/promises";
9
9
  //#region package.json
10
- var version = "1.0.0-rc.16";
10
+ var version = "1.0.0-rc.18";
11
11
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
12
12
  //#endregion
13
13
  //#region src/constants/version.ts
@@ -216,7 +216,7 @@ function bindingAssetSource(source) {
216
216
  return { inner: source };
217
217
  }
218
218
  //#endregion
219
- //#region \0@oxc-project+runtime@0.126.0/helpers/decorate.js
219
+ //#region \0@oxc-project+runtime@0.128.0/helpers/decorate.js
220
220
  function __decorate(decorators, target, key, desc) {
221
221
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
222
222
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -151,8 +151,21 @@ interface SourceMap {
151
151
  }
152
152
  /** @category Plugin APIs */
153
153
  interface RenderedModule {
154
+ /**
155
+ * The rendered code of this module.
156
+ *
157
+ * The unused variables and functions are removed.
158
+ */
154
159
  readonly code: string | null;
160
+ /**
161
+ * The length of the rendered code of this module.
162
+ */
155
163
  renderedLength: number;
164
+ /**
165
+ * The list of exported names from this module.
166
+ *
167
+ * The names that are not used are not included.
168
+ */
156
169
  renderedExports: string[];
157
170
  }
158
171
  /**
@@ -2470,7 +2483,7 @@ interface ExistingRawSourceMap {
2470
2483
  mappings: string;
2471
2484
  names?: string[];
2472
2485
  sources?: (string | null)[];
2473
- sourcesContent?: (string | null)[];
2486
+ sourcesContent?: (string | null | undefined)[];
2474
2487
  sourceRoot?: string;
2475
2488
  version?: number;
2476
2489
  x_google_ignoreList?: number[];
@@ -1,4 +1,4 @@
1
- import { t as rolldown } from "./rolldown-DrY5vEjL.mjs";
1
+ import { t as rolldown } from "./rolldown-QMNic12I.mjs";
2
2
  import path from "node:path";
3
3
  import { readdir } from "node:fs/promises";
4
4
  import { cwd } from "node:process";
@@ -1,5 +1,5 @@
1
1
  import { parse, parseSync } from "../rolldown-binding.wasi.cjs";
2
- //#region ../../node_modules/.pnpm/oxc-parser@0.126.0/node_modules/oxc-parser/src-js/wrap.js
2
+ //#region ../../node_modules/.pnpm/oxc-parser@0.128.0/node_modules/oxc-parser/src-js/wrap.js
3
3
  function wrap(result) {
4
4
  let program, module, comments, errors;
5
5
  return {
@@ -1,4 +1,4 @@
1
- import { c as validateOption, t as RolldownBuild, u as PluginDriver } from "./rolldown-build-BMFr9KVX.mjs";
1
+ import { c as validateOption, t as RolldownBuild, u as PluginDriver } from "./rolldown-build-DTZNpSde.mjs";
2
2
  //#region src/api/rolldown/index.ts
3
3
  /**
4
4
  * The API compatible with Rollup's `rollup` function.