@voidzero-dev/vite-plus-core 0.2.9 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/rolldown/cli.mjs +6 -6
  2. package/dist/rolldown/config.d.mts +1 -1
  3. package/dist/rolldown/config.mjs +2 -2
  4. package/dist/rolldown/experimental-index.d.mts +34 -5
  5. package/dist/rolldown/experimental-index.mjs +36 -9
  6. package/dist/rolldown/experimental-runtime-types.d.ts +2 -2
  7. package/dist/rolldown/experimental-runtime.d.ts +2 -2
  8. package/dist/rolldown/experimental-runtime.mjs +2 -2
  9. package/dist/rolldown/filter-index.d.mts +1 -1
  10. package/dist/rolldown/filter-index.mjs +1 -3
  11. package/dist/rolldown/index.d.mts +3 -3
  12. package/dist/rolldown/index.mjs +4 -4
  13. package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
  14. package/dist/rolldown/parallel-plugin.d.mts +1 -1
  15. package/dist/rolldown/parse-ast-index.d.mts +1 -1
  16. package/dist/rolldown/parse-ast-index.mjs +1 -1
  17. package/dist/rolldown/plugins-index.d.mts +3 -3
  18. package/dist/rolldown/plugins-index.mjs +2 -2
  19. package/dist/rolldown/shared/{binding-CVtkJvyl.d.mts → binding-DZuNHVw4.d.mts} +88 -5
  20. package/dist/rolldown/shared/{binding-CKyeQZen.mjs → binding-DmImI4pj.mjs} +29 -27
  21. package/dist/rolldown/shared/{bindingify-input-options-44iPAymO.mjs → bindingify-input-options-BYClWKnj.mjs} +11 -9
  22. package/dist/rolldown/shared/{constructors-XaIbWpwJ.d.mts → constructors-BM20b11r.d.mts} +2 -2
  23. package/dist/rolldown/shared/{constructors-6Zc-JFd7.mjs → constructors-mRbcbLyX.mjs} +1 -1
  24. package/dist/rolldown/shared/{create-bundler-option-e1FU0w0P.mjs → create-bundler-option-CHTBktos.mjs} +49 -6
  25. package/dist/rolldown/shared/{define-config-DVsXPNaU.d.mts → define-config-DNX0WekP.d.mts} +46 -7
  26. package/dist/rolldown/shared/{error-BzLGqhSQ.mjs → error-BP8lJHle.mjs} +1 -1
  27. package/dist/rolldown/shared/{load-config-C6QXSnoS.mjs → load-config-Cx5fx_8Q.mjs} +1 -1
  28. package/dist/rolldown/shared/{normalize-string-or-regex-DYjJ67tj.mjs → normalize-string-or-regex-Dm69lpQ-.mjs} +1 -1
  29. package/dist/rolldown/shared/{parse-uDDyc1el.mjs → parse-8sr82jSR.mjs} +2 -2
  30. package/dist/rolldown/shared/{resolve-tsconfig-Bcd82vVT.mjs → resolve-tsconfig-BlNGaH3Y.mjs} +10 -6
  31. package/dist/rolldown/shared/{rolldown-CCbQNGZt.mjs → rolldown-CaX_Wmqc.mjs} +5 -4
  32. package/dist/rolldown/shared/{transform-WmU_cI8e.d.mts → transform-CVse9_mH.d.mts} +8 -4
  33. package/dist/rolldown/shared/{watch-vuOCmvFs.mjs → watch-YKfJgIxz.mjs} +4 -4
  34. package/dist/rolldown/utils-index.d.mts +3 -3
  35. package/dist/rolldown/utils-index.mjs +5 -5
  36. package/dist/tsdown/{build-D_enfyvD-Dg1eKRD4.js → build-JVmLFaZt-kqQJ2U7s.js} +1705 -239
  37. package/dist/tsdown/debug-CpC4hV25-tvH_Dsg5.js +247 -0
  38. package/dist/tsdown/{detect-DGhJGEqb-6CTf16BW.js → detect-Bg-d8iUV-KfbO7neP.js} +10 -12
  39. package/dist/tsdown/{dist-DyXLnzyh.js → dist-Cuw3Ngo4.js} +1226 -893
  40. package/dist/tsdown/index-types.d.ts +277 -355
  41. package/dist/tsdown/index.js +4 -4
  42. package/dist/tsdown/internal-D-JfB5uT.js +29 -0
  43. package/dist/tsdown/internal-lhH-5yya.js +62 -0
  44. package/dist/tsdown/{main-DiierkER.js → main-CyNcZUzu.js} +8 -214
  45. package/dist/tsdown/{resolver-cwLsPb2o-Dk4xdAGE.js → resolver-DE0_sy8o-ZQqHQjRu.js} +4 -4
  46. package/dist/tsdown/rolldown-runtime-B4iAMlE-.js +35 -0
  47. package/dist/tsdown/run.js +44 -8
  48. package/dist/tsdown/{src-drVPfX63.js → src-BWidcM5N.js} +5 -5
  49. package/dist/tsdown/{tsc-JnMl2z7d.js → tsc-ChjRhsoQ.js} +26 -20
  50. package/dist/tsdown/tsdown-css.js +17 -11
  51. package/dist/tsdown/tsdown-exe.js +16 -5
  52. package/dist/tsdown/version-CQ98ZBpL-Obdnv4J7.js +141 -0
  53. package/dist/vite/client/bundledDevClient.mjs +69 -19
  54. package/dist/vite/client/client.mjs +4 -4
  55. package/dist/vite/node/chunks/build.js +21 -21
  56. package/dist/vite/node/chunks/lib.js +2 -2
  57. package/dist/vite/node/chunks/node.js +159 -114
  58. package/dist/vite/node/chunks/postcss-import.js +13 -16
  59. package/dist/vite/node/index.d.ts +58 -55
  60. package/dist/vite/node/module-runner.d.ts +13 -13
  61. package/dist/vite/node/module-runner.js +3 -4
  62. package/package.json +30 -30
  63. package/dist/tsdown/debug-CKcBYQLP-C3NhYhrk.js +0 -157
  64. package/dist/tsdown/dist-CMKwGGNp.js +0 -1059
  65. package/dist/tsdown/internal-DKworeK4.js +0 -3
  66. package/dist/tsdown/target-Bab3CUeB-DQ0pKhCv.js +0 -582
@@ -1,5 +1,5 @@
1
- import { n as __toESM, t as require_binding } from "./binding-CKyeQZen.mjs";
2
- import { a as bindingifySourcemap, n as normalizeBindingError } from "./error-BzLGqhSQ.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-DmImI4pj.mjs";
2
+ import { a as bindingifySourcemap, n as normalizeBindingError } from "./error-BP8lJHle.mjs";
3
3
  //#region src/utils/minify.ts
4
4
  var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
5
5
  /**
@@ -58,7 +58,8 @@ function normalizeBindingWarning(warning) {
58
58
  * @param sourceText The source code to transform.
59
59
  * @param options The transform options including tsconfig and inputMap. See {@linkcode TransformOptions} for more information.
60
60
  * @param cache Optional tsconfig cache for reusing resolved tsconfig across multiple transforms.
61
- * Only used when `options.tsconfig` is `true`.
61
+ * Used when `options.tsconfig` is `true` or a path. For a path, construct the
62
+ * cache with the same path.
62
63
  *
63
64
  * @returns a promise that resolves to an object containing the transformed code,
64
65
  * source maps, and any errors that occurred during parsing or transformation.
@@ -82,7 +83,8 @@ async function transform(filename, sourceText, options, cache) {
82
83
  * @param sourceText The source code to transform.
83
84
  * @param options The transform options including tsconfig and inputMap. See {@linkcode TransformOptions} for more information.
84
85
  * @param cache Optional tsconfig cache for reusing resolved tsconfig across multiple transforms.
85
- * Only used when `options.tsconfig` is `true`.
86
+ * Used when `options.tsconfig` is `true` or a path. For a path, construct the
87
+ * cache with the same path.
86
88
  *
87
89
  * @returns an object containing the transformed code, source maps, and any errors
88
90
  * that occurred during parsing or transformation.
@@ -107,13 +109,15 @@ const yarnPnp = typeof process === "object" && !!process.versions?.pnp;
107
109
  * The cache stores resolved tsconfig configurations keyed by their file paths.
108
110
  * When transforming multiple files in the same project, tsconfig lookups are
109
111
  * deduplicated, improving performance.
112
+ * Pass a tsconfig path to use that configuration for every lookup. When the
113
+ * path is omitted, the nearest tsconfig is discovered automatically.
110
114
  *
111
115
  * @category Utilities
112
116
  * @experimental
113
117
  */
114
118
  var TsconfigCache = class extends import_binding.TsconfigCache {
115
- constructor() {
116
- super(yarnPnp);
119
+ constructor(pathToTsconfig) {
120
+ super(yarnPnp, pathToTsconfig);
117
121
  }
118
122
  };
119
123
  /** @hidden This is only expected to be used by Vite */
@@ -1,7 +1,7 @@
1
- import { n as __toESM, t as require_binding } from "./binding-CKyeQZen.mjs";
2
- import { f as __decorate, h as PlainObjectLike, m as lazyProp, u as transformToRollupOutput } from "./bindingify-input-options-44iPAymO.mjs";
3
- import { l as PluginDriver, s as validateOption, t as createBundlerOptions } from "./create-bundler-option-e1FU0w0P.mjs";
4
- import { i as unwrapBindingResult } from "./error-BzLGqhSQ.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-DmImI4pj.mjs";
2
+ import { f as __decorate, h as PlainObjectLike, m as lazyProp, u as transformToRollupOutput } from "./bindingify-input-options-BYClWKnj.mjs";
3
+ import { l as PluginDriver, s as validateOption, t as createBundlerOptions } from "./create-bundler-option-CHTBktos.mjs";
4
+ import { i as unwrapBindingResult } from "./error-BP8lJHle.mjs";
5
5
  //#region src/types/rolldown-output-impl.ts
6
6
  var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
7
7
  var RolldownOutputImpl = class extends PlainObjectLike {
@@ -9,6 +9,7 @@ var RolldownOutputImpl = class extends PlainObjectLike {
9
9
  constructor(bindingOutputs) {
10
10
  super();
11
11
  this.bindingOutputs = bindingOutputs;
12
+ if (bindingOutputs.mangleCache !== void 0) this.mangleCache = bindingOutputs.mangleCache;
12
13
  }
13
14
  get output() {
14
15
  return transformToRollupOutput(this.bindingOutputs).output;
@@ -1,5 +1,5 @@
1
1
  import { a as RolldownLog } from "./logging-xuHO4mAy.mjs";
2
- import { F as MinifyOptions$1, G as TsconfigCache$1, I as MinifyResult$1, R as ParseResult$1, U as SourceMap, a as BindingEnhancedTransformOptions, o as BindingEnhancedTransformResult, y as BindingTsconfigResult, z as ParserOptions$1 } from "./binding-CVtkJvyl.mjs";
2
+ import { H as ParserOptions$1, J as TsconfigCache$1, K as SourceMap, R as MinifyOptions$1, V as ParseResult$1, a as BindingEnhancedTransformOptions, o as BindingEnhancedTransformResult, x as BindingTsconfigResult, z as MinifyResult$1 } from "./binding-DZuNHVw4.mjs";
3
3
  //#region src/utils/resolve-tsconfig.d.ts
4
4
  /**
5
5
  * Cache for tsconfig resolution to avoid redundant file system operations.
@@ -7,12 +7,14 @@ import { F as MinifyOptions$1, G as TsconfigCache$1, I as MinifyResult$1, R as P
7
7
  * The cache stores resolved tsconfig configurations keyed by their file paths.
8
8
  * When transforming multiple files in the same project, tsconfig lookups are
9
9
  * deduplicated, improving performance.
10
+ * Pass a tsconfig path to use that configuration for every lookup. When the
11
+ * path is omitted, the nearest tsconfig is discovered automatically.
10
12
  *
11
13
  * @category Utilities
12
14
  * @experimental
13
15
  */
14
16
  declare class TsconfigCache extends TsconfigCache$1 {
15
- constructor();
17
+ constructor(pathToTsconfig?: string);
16
18
  }
17
19
  /** @hidden This is only expected to be used by Vite */
18
20
  declare function resolveTsconfig(filename: string, cache?: TsconfigCache | null): BindingTsconfigResult | null;
@@ -118,7 +120,8 @@ type TransformResult = Omit<BindingEnhancedTransformResult, "errors" | "warnings
118
120
  * @param sourceText The source code to transform.
119
121
  * @param options The transform options including tsconfig and inputMap. See {@linkcode TransformOptions} for more information.
120
122
  * @param cache Optional tsconfig cache for reusing resolved tsconfig across multiple transforms.
121
- * Only used when `options.tsconfig` is `true`.
123
+ * Used when `options.tsconfig` is `true` or a path. For a path, construct the
124
+ * cache with the same path.
122
125
  *
123
126
  * @returns a promise that resolves to an object containing the transformed code,
124
127
  * source maps, and any errors that occurred during parsing or transformation.
@@ -135,7 +138,8 @@ declare function transform(filename: string, sourceText: string, options?: Trans
135
138
  * @param sourceText The source code to transform.
136
139
  * @param options The transform options including tsconfig and inputMap. See {@linkcode TransformOptions} for more information.
137
140
  * @param cache Optional tsconfig cache for reusing resolved tsconfig across multiple transforms.
138
- * Only used when `options.tsconfig` is `true`.
141
+ * Used when `options.tsconfig` is `true` or a path. For a path, construct the
142
+ * cache with the same path.
139
143
  *
140
144
  * @returns an object containing the transformed code, source maps, and any errors
141
145
  * that occurred during parsing or transformation.
@@ -1,9 +1,9 @@
1
- import { n as __toESM, t as require_binding } from "./binding-CKyeQZen.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-DmImI4pj.mjs";
2
2
  import { s as logMultipleWatcherOption } from "./logs-DmYCAKcW.mjs";
3
- import { C as LOG_LEVEL_WARN } from "./bindingify-input-options-44iPAymO.mjs";
3
+ import { C as LOG_LEVEL_WARN } from "./bindingify-input-options-BYClWKnj.mjs";
4
4
  import { t as arraify } from "./misc-DOSKtd97.mjs";
5
- import { l as PluginDriver, t as createBundlerOptions } from "./create-bundler-option-e1FU0w0P.mjs";
6
- import { t as aggregateBindingErrorsIntoJsError } from "./error-BzLGqhSQ.mjs";
5
+ import { l as PluginDriver, t as createBundlerOptions } from "./create-bundler-option-CHTBktos.mjs";
6
+ import { t as aggregateBindingErrorsIntoJsError } from "./error-BP8lJHle.mjs";
7
7
  //#region ../../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
8
8
  /**
9
9
  * This is not the set of all possible signals.
@@ -1,8 +1,8 @@
1
- import { _ as BindingTsconfigCompilerOptions, v as BindingTsconfigRawOptions } from "./shared/binding-CVtkJvyl.mjs";
2
- import { a as MinifyOptions, c as minifySync, d as parse, f as parseSync, i as transformSync, l as ParseResult, n as TransformResult, o as MinifyResult, p as TsconfigCache, r as transform, s as minify, t as TransformOptions, u as ParserOptions } from "./shared/transform-WmU_cI8e.mjs";
1
+ import { b as BindingTsconfigRawOptions, y as BindingTsconfigCompilerOptions } from "./shared/binding-DZuNHVw4.mjs";
2
+ import { a as MinifyOptions, c as minifySync, d as parse, f as parseSync, i as transformSync, l as ParseResult, n as TransformResult, o as MinifyResult, p as TsconfigCache, r as transform, s as minify, t as TransformOptions, u as ParserOptions } from "./shared/transform-CVse9_mH.mjs";
3
3
  import * as ESTree from "@oxc-project/types";
4
4
  import { Program } from "@oxc-project/types";
5
- //#region ../../../node_modules/.pnpm/oxc-parser@0.143.0/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts
5
+ //#region ../../../node_modules/.pnpm/oxc-parser@0.148.0/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts
6
6
  interface VisitorObject$1 {
7
7
  DebuggerStatement?: (node: ESTree.DebuggerStatement) => void;
8
8
  "DebuggerStatement:exit"?: (node: ESTree.DebuggerStatement) => void;
@@ -1,6 +1,6 @@
1
- import { n as parseSync, t as parse } from "./shared/parse-uDDyc1el.mjs";
2
- import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./shared/resolve-tsconfig-Bcd82vVT.mjs";
3
- //#region ../../../node_modules/.pnpm/oxc-parser@0.143.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
1
+ import { n as parseSync, t as parse } from "./shared/parse-8sr82jSR.mjs";
2
+ import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./shared/resolve-tsconfig-BlNGaH3Y.mjs";
3
+ //#region ../../../node_modules/.pnpm/oxc-parser@0.148.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
4
4
  function walkNode(node, visitors) {
5
5
  if (node == null) return;
6
6
  if (Array.isArray(node)) {
@@ -2008,7 +2008,7 @@ function walkTSUnionType(node, visitors) {
2008
2008
  exit !== null && exit(node);
2009
2009
  }
2010
2010
  //#endregion
2011
- //#region ../../../node_modules/.pnpm/oxc-parser@0.143.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
2011
+ //#region ../../../node_modules/.pnpm/oxc-parser@0.148.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
2012
2012
  /** Mapping from node type name to node type ID */
2013
2013
  const NODE_TYPE_IDS_MAP = /* @__PURE__ */ new Map([
2014
2014
  ["DebuggerStatement", 0],
@@ -2178,7 +2178,7 @@ const NODE_TYPE_IDS_MAP = /* @__PURE__ */ new Map([
2178
2178
  ["TSUnionType", 164]
2179
2179
  ]);
2180
2180
  //#endregion
2181
- //#region ../../../node_modules/.pnpm/oxc-parser@0.143.0/node_modules/oxc-parser/src-js/visit/visitor.js
2181
+ //#region ../../../node_modules/.pnpm/oxc-parser@0.148.0/node_modules/oxc-parser/src-js/visit/visitor.js
2182
2182
  let compiledVisitor;
2183
2183
  function createCompiledVisitor() {
2184
2184
  compiledVisitor = [];