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

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 (58) hide show
  1. package/LICENSE +30 -1
  2. package/dist/rolldown/cli.mjs +14 -10
  3. package/dist/rolldown/config.d.mts +1 -1
  4. package/dist/rolldown/config.mjs +2 -2
  5. package/dist/rolldown/experimental-index.d.mts +2 -2
  6. package/dist/rolldown/experimental-index.mjs +8 -8
  7. package/dist/rolldown/filter-index.d.mts +1 -1
  8. package/dist/rolldown/index.d.mts +1 -1
  9. package/dist/rolldown/index.mjs +4 -4
  10. package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
  11. package/dist/rolldown/parallel-plugin.d.mts +1 -1
  12. package/dist/rolldown/parse-ast-index.mjs +1 -1
  13. package/dist/rolldown/plugins-index.d.mts +2 -2
  14. package/dist/rolldown/plugins-index.mjs +2 -2
  15. package/dist/rolldown/shared/binding-CKyeQZen.mjs +673 -0
  16. package/dist/rolldown/shared/{bindingify-input-options-B03y7DfJ.mjs → bindingify-input-options-44iPAymO.mjs} +6 -10
  17. package/dist/rolldown/shared/{constructors-COwFYQna.mjs → constructors-6Zc-JFd7.mjs} +1 -1
  18. package/dist/rolldown/shared/{constructors-ALilxAii.d.mts → constructors-XaIbWpwJ.d.mts} +1 -1
  19. package/dist/rolldown/shared/{create-bundler-option-B-tSTZRt.mjs → create-bundler-option-e1FU0w0P.mjs} +3 -3
  20. package/dist/rolldown/shared/{define-config-DSMNXceb.d.mts → define-config-DVsXPNaU.d.mts} +0 -4
  21. package/dist/rolldown/shared/{error-nLggAzpQ.mjs → error-BzLGqhSQ.mjs} +1 -1
  22. package/dist/rolldown/shared/{load-config-O4G7NVNA.mjs → load-config-C6QXSnoS.mjs} +1 -1
  23. package/dist/rolldown/shared/{normalize-string-or-regex-Cj-DgIV1.mjs → normalize-string-or-regex-DYjJ67tj.mjs} +1 -1
  24. package/dist/rolldown/shared/{parse-CQfUbVuN.mjs → parse-uDDyc1el.mjs} +2 -2
  25. package/dist/rolldown/shared/{resolve-tsconfig-CE3HNSOK.mjs → resolve-tsconfig-Bcd82vVT.mjs} +2 -2
  26. package/dist/rolldown/shared/{rolldown-qV_fUwyM.mjs → rolldown-CCbQNGZt.mjs} +4 -4
  27. package/dist/rolldown/shared/{watch-BNIsji74.mjs → watch-vuOCmvFs.mjs} +5 -5
  28. package/dist/rolldown/utils-index.d.mts +1 -1
  29. package/dist/rolldown/utils-index.mjs +15 -13
  30. package/dist/tsdown/{build-D_enfyvD-X5SFXZZc.js → build-D_enfyvD-Dg1eKRD4.js} +20 -16
  31. package/dist/tsdown/{debug-CKcBYQLP-avlAPNcV.js → debug-CKcBYQLP-C3NhYhrk.js} +3 -3
  32. package/dist/tsdown/{detect-DGhJGEqb-CGd2brAW.js → detect-DGhJGEqb-6CTf16BW.js} +1 -1
  33. package/dist/tsdown/{dist-BZO8q3c0.js → dist-DyXLnzyh.js} +4 -4
  34. package/dist/tsdown/index-types.d.ts +3 -3
  35. package/dist/tsdown/index.js +4 -4
  36. package/dist/tsdown/internal-DKworeK4.js +3 -0
  37. package/dist/tsdown/{main-Jz_9T-KA.js → main-DiierkER.js} +210 -196
  38. package/dist/tsdown/npm_entry_picomatch.cjs +10 -6
  39. package/dist/tsdown/npm_entry_tree-kill.cjs +4 -2
  40. package/dist/tsdown/{resolver-cwLsPb2o-BqQjnCbF.js → resolver-cwLsPb2o-Dk4xdAGE.js} +2 -2
  41. package/dist/tsdown/run.js +6 -6
  42. package/dist/tsdown/{src-D5keKqGd.js → src-drVPfX63.js} +1 -1
  43. package/dist/tsdown/{target-Bab3CUeB-CERZYTwS.js → target-Bab3CUeB-DQ0pKhCv.js} +5 -5
  44. package/dist/tsdown/{tsc-DmzrnJwy.js → tsc-JnMl2z7d.js} +3 -3
  45. package/dist/tsdown/tsdown-css.js +4 -4
  46. package/dist/tsdown/tsdown-exe.js +4 -4
  47. package/dist/vite/client/bundledDevClient.mjs +330 -14
  48. package/dist/vite/client/client.mjs +20 -14
  49. package/dist/vite/node/chunks/build.js +51 -45
  50. package/dist/vite/node/chunks/dist.js +36 -29
  51. package/dist/vite/node/chunks/dist2.js +193 -149
  52. package/dist/vite/node/chunks/node.js +931 -793
  53. package/dist/vite/node/chunks/postcss-import.js +10 -9
  54. package/dist/vite/node/index.d.ts +7 -5
  55. package/dist/vite/node/module-runner.js +23 -17
  56. package/package.json +26 -20
  57. package/dist/rolldown/shared/binding-DwUQWZOo.mjs +0 -662
  58. package/dist/tsdown/internal-DyaNxVWW.js +0 -3
@@ -341,15 +341,16 @@ var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
341
341
  }
342
342
  statements.forEach((stmt) => {
343
343
  if (stmt.type === "charset") handleCharset(stmt);
344
- else if (stmt.type === "import") if (stmt.children) stmt.children.forEach((child, index) => {
345
- if (child.type === "import") beforeBundle.push(child);
346
- else if (child.type === "layer") beforeBundle.push(child);
347
- else if (child.type === "charset") handleCharset(child);
348
- else bundle.push(child);
349
- if (index === 0) child.parent = stmt;
350
- });
351
- else beforeBundle.push(stmt);
352
- else if (stmt.type === "layer") beforeBundle.push(stmt);
344
+ else if (stmt.type === "import") {
345
+ if (stmt.children) stmt.children.forEach((child, index) => {
346
+ if (child.type === "import") beforeBundle.push(child);
347
+ else if (child.type === "layer") beforeBundle.push(child);
348
+ else if (child.type === "charset") handleCharset(child);
349
+ else bundle.push(child);
350
+ if (index === 0) child.parent = stmt;
351
+ });
352
+ else beforeBundle.push(stmt);
353
+ } else if (stmt.type === "layer") beforeBundle.push(stmt);
353
354
  else if (stmt.type === "nodes") bundle.push(stmt);
354
355
  });
355
356
  return charset ? [charset, ...beforeBundle.concat(bundle)] : beforeBundle.concat(bundle);
@@ -30,7 +30,7 @@ import { LessPreprocessorBaseOptions, SassModernPreprocessBaseOptions, StylusPre
30
30
  import { withFilter } from "@voidzero-dev/vite-plus-core/rolldown/filter";
31
31
  import { GeneralImportGlobOptions, ImportGlobFunction, ImportGlobOptions, KnownAsTypeMap, KnownQueryTypeMap } from "#types/importGlob";
32
32
  //#endregion
33
- //#region ../../../node_modules/.pnpm/@vitejs+devtools@0.4.10_crossws@0.4.10_srvx@0.12.5__srvx@0.12.5_typescript@6.0.3_valibo_6dd09e987cdcfce7e76f9fde407b07b8/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
33
+ //#region ../../../node_modules/.pnpm/@vitejs+devtools@0.4.12_crossws@0.4.10_srvx@0.12.5__srvx@0.12.5_typescript@6.0.3_valibo_cab925285c1aff7a926a82387cecd3f1/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
34
34
  //#region src/node/cli-commands.d.ts
35
35
  interface StartOptions {
36
36
  root?: string;
@@ -40,7 +40,7 @@ interface StartOptions {
40
40
  open?: boolean;
41
41
  }
42
42
  //#endregion
43
- //#region ../../../node_modules/.pnpm/@vitejs+devtools@0.4.10_crossws@0.4.10_srvx@0.12.5__srvx@0.12.5_typescript@6.0.3_valibo_6dd09e987cdcfce7e76f9fde407b07b8/node_modules/@vitejs/devtools/dist/config.d.ts
43
+ //#region ../../../node_modules/.pnpm/@vitejs+devtools@0.4.12_crossws@0.4.10_srvx@0.12.5__srvx@0.12.5_typescript@6.0.3_valibo_cab925285c1aff7a926a82387cecd3f1/node_modules/@vitejs/devtools/dist/config.d.ts
44
44
  //#region src/node/config.d.ts
45
45
  interface DevToolsConfig extends Partial<StartOptions> {
46
46
  enabled: boolean;
@@ -345,7 +345,7 @@ declare namespace Connect {
345
345
  }
346
346
  }
347
347
  //#endregion
348
- //#region ../../../node_modules/.pnpm/http-proxy-3@1.23.3/node_modules/http-proxy-3/dist/lib/http-proxy/index.d.ts
348
+ //#region ../../../node_modules/.pnpm/http-proxy-3@1.23.3_supports-color@8.1.1/node_modules/http-proxy-3/dist/lib/http-proxy/index.d.ts
349
349
  interface ProxyTargetDetailed {
350
350
  host: string;
351
351
  port: number;
@@ -533,7 +533,7 @@ declare class ProxyServer<TIncomingMessage extends typeof http.IncomingMessage =
533
533
  after: <PT extends ProxyType>(type: PT, passName: string, cb: PassFunctions<TIncomingMessage, TServerResponse, TError>[PT]) => void;
534
534
  }
535
535
  //#endregion
536
- //#region ../../../node_modules/.pnpm/http-proxy-3@1.23.3/node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.d.ts
536
+ //#region ../../../node_modules/.pnpm/http-proxy-3@1.23.3_supports-color@8.1.1/node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.d.ts
537
537
  declare function numOpenSockets(): number;
538
538
  declare namespace index_d_exports {
539
539
  export { ErrorCallback, ProxyServer, ProxyTarget, ProxyTargetUrl, ServerOptions$3 as ServerOptions, createProxyServer as createProxy, createProxyServer, createProxyServer as createServer, ProxyServer as default, numOpenSockets };
@@ -1636,6 +1636,7 @@ declare class MemoryFiles {
1636
1636
  declare class BundledDev {
1637
1637
  private environment;
1638
1638
  private _devEngine;
1639
+ private viteRuntime?;
1639
1640
  private initialBuildCompleted;
1640
1641
  private _closed;
1641
1642
  private clients;
@@ -1648,6 +1649,7 @@ declare class BundledDev {
1648
1649
  constructor(environment: DevEnvironment);
1649
1650
  private get devEngine();
1650
1651
  private pendingPayloadFilenames;
1652
+ get hasBuildOutput(): boolean;
1651
1653
  listen(): Promise<void>;
1652
1654
  private waitForInitialBuildFinish;
1653
1655
  private ensureOutputAndFlushReloadNeeded;
@@ -2168,7 +2170,7 @@ interface BuildEnvironmentOptions {
2168
2170
  /**
2169
2171
  * Set to `false` to disable minification, or specify the minifier to use.
2170
2172
  * Available options are 'oxc' or 'terser' or 'esbuild'.
2171
- * @default 'oxc'
2173
+ * @default 'oxc' for client build, false for SSR build
2172
2174
  */
2173
2175
  minify?: boolean | "oxc" | "terser" | "esbuild";
2174
2176
  /**
@@ -65,20 +65,22 @@ function normalizeString(path, allowAboveRoot) {
65
65
  else if (char === "/") break;
66
66
  else char = "/";
67
67
  if (char === "/") {
68
- if (lastSlash !== index - 1 && dots !== 1) if (dots === 2) {
69
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
70
- if (res.length > 2) {
71
- let lastSlashIndex = res.lastIndexOf("/");
72
- lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
73
- continue;
74
- }
75
- if (res.length > 0) {
76
- res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
77
- continue;
68
+ if (lastSlash !== index - 1 && dots !== 1) {
69
+ if (dots === 2) {
70
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
71
+ if (res.length > 2) {
72
+ let lastSlashIndex = res.lastIndexOf("/");
73
+ lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
74
+ continue;
75
+ }
76
+ if (res.length > 0) {
77
+ res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
78
+ continue;
79
+ }
78
80
  }
79
- }
80
- allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
81
- } else res.length > 0 ? res += `/${path.slice(lastSlash + 1, index)}` : res = path.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
81
+ allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
82
+ } else res.length > 0 ? res += `/${path.slice(lastSlash + 1, index)}` : res = path.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
83
+ }
82
84
  lastSlash = index, dots = 0;
83
85
  } else char === "." && dots !== -1 ? ++dots : dots = -1;
84
86
  }
@@ -652,14 +654,18 @@ const createInvokeableTransport = (transport) => {
652
654
  } } : {},
653
655
  async send(data) {
654
656
  if (invokeableTransport.send) {
655
- if (!isConnected) if (connectingPromise) await connectingPromise;
656
- else throw new SendBeforeConnectError("send was called before connect");
657
+ if (!isConnected) {
658
+ if (connectingPromise) await connectingPromise;
659
+ else throw new SendBeforeConnectError("send was called before connect");
660
+ }
657
661
  await invokeableTransport.send(data);
658
662
  }
659
663
  },
660
664
  async invoke(name, data) {
661
- if (!isConnected) if (connectingPromise) await connectingPromise;
662
- else throw new SendBeforeConnectError("invoke was called before connect");
665
+ if (!isConnected) {
666
+ if (connectingPromise) await connectingPromise;
667
+ else throw new SendBeforeConnectError("invoke was called before connect");
668
+ }
663
669
  return invokeableTransport.invoke(name, data);
664
670
  }
665
671
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voidzero-dev/vite-plus-core",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "The Unified Toolchain for the Web",
5
5
  "homepage": "https://viteplus.dev/guide",
6
6
  "bugs": {
@@ -89,8 +89,14 @@
89
89
  "default": "./dist/rolldown/plugins-index.mjs",
90
90
  "types": "./dist/rolldown/plugins-index.d.mts"
91
91
  },
92
- "./rolldown/pluginutils": "./dist/pluginutils/index.mjs",
93
- "./rolldown/pluginutils/filter": "./dist/pluginutils/filter/index.mjs",
92
+ "./rolldown/pluginutils": {
93
+ "default": "./dist/pluginutils/index.mjs",
94
+ "types": "./dist/pluginutils/index.d.mts"
95
+ },
96
+ "./rolldown/pluginutils/filter": {
97
+ "default": "./dist/pluginutils/filter/index.mjs",
98
+ "types": "./dist/pluginutils/filter/index.d.mts"
99
+ },
94
100
  "./rolldown/utils": {
95
101
  "default": "./dist/rolldown/utils-index.mjs",
96
102
  "types": "./dist/rolldown/utils-index.d.mts"
@@ -101,8 +107,8 @@
101
107
  "./types/internal/*": null
102
108
  },
103
109
  "dependencies": {
104
- "@oxc-project/runtime": "=0.142.0",
105
- "@oxc-project/types": "=0.142.0",
110
+ "@oxc-project/runtime": "=0.143.0",
111
+ "@oxc-project/types": "=0.143.0",
106
112
  "lightningcss": "^1.33.0",
107
113
  "postcss": "^8.5.6",
108
114
  "yuku-codegen": "^0.5.44",
@@ -119,12 +125,12 @@
119
125
  "@oxc-node/cli": "^0.1.0",
120
126
  "@tsdown/css": "^0.22.14",
121
127
  "@tsdown/exe": "^0.22.14",
122
- "@vitejs/devtools": "^0.4.10",
128
+ "@vitejs/devtools": "^0.4.12",
123
129
  "es-module-lexer": "^1.7.0",
124
130
  "hookable": "^6.0.1",
125
131
  "magic-string": "^0.30.21",
126
- "oxc-parser": "=0.142.0",
127
- "oxfmt": "=0.61.0",
132
+ "oxc-parser": "=0.143.0",
133
+ "oxfmt": "=0.62.0",
128
134
  "picocolors": "^1.1.1",
129
135
  "picomatch": "^4.0.3",
130
136
  "pkg-types": "^2.3.0",
@@ -135,8 +141,8 @@
135
141
  "tinyglobby": "^0.2.15",
136
142
  "tree-kill": "^1.2.2",
137
143
  "tsdown": "^0.22.14",
138
- "vite": "npm:@voidzero-dev/vite-plus-core@0.2.8",
139
- "rolldown": "1.2.2"
144
+ "rolldown": "1.2.3",
145
+ "vite": "npm:@voidzero-dev/vite-plus-core@0.2.9"
140
146
  },
141
147
  "peerDependencies": {
142
148
  "@arethetypeswrong/core": "^0.18.1",
@@ -212,21 +218,21 @@
212
218
  },
213
219
  "optionalDependencies": {
214
220
  "fsevents": "~2.3.3",
215
- "@voidzero-dev/vite-plus-darwin-arm64": "0.2.8",
216
- "@voidzero-dev/vite-plus-darwin-x64": "0.2.8",
217
- "@voidzero-dev/vite-plus-linux-arm64-gnu": "0.2.8",
218
- "@voidzero-dev/vite-plus-linux-arm64-musl": "0.2.8",
219
- "@voidzero-dev/vite-plus-linux-x64-gnu": "0.2.8",
220
- "@voidzero-dev/vite-plus-linux-x64-musl": "0.2.8",
221
- "@voidzero-dev/vite-plus-win32-x64-msvc": "0.2.8",
222
- "@voidzero-dev/vite-plus-win32-arm64-msvc": "0.2.8"
221
+ "@voidzero-dev/vite-plus-darwin-arm64": "0.2.9",
222
+ "@voidzero-dev/vite-plus-darwin-x64": "0.2.9",
223
+ "@voidzero-dev/vite-plus-linux-arm64-gnu": "0.2.9",
224
+ "@voidzero-dev/vite-plus-linux-arm64-musl": "0.2.9",
225
+ "@voidzero-dev/vite-plus-linux-x64-gnu": "0.2.9",
226
+ "@voidzero-dev/vite-plus-linux-x64-musl": "0.2.9",
227
+ "@voidzero-dev/vite-plus-win32-x64-msvc": "0.2.9",
228
+ "@voidzero-dev/vite-plus-win32-arm64-msvc": "0.2.9"
223
229
  },
224
230
  "engines": {
225
231
  "node": "^20.19.0 || ^22.18.0 || >=24.11.0"
226
232
  },
227
233
  "bundledVersions": {
228
- "vite": "8.2.0",
229
- "rolldown": "1.2.2",
234
+ "vite": "8.2.1",
235
+ "rolldown": "1.2.3",
230
236
  "tsdown": "0.22.14"
231
237
  },
232
238
  "scripts": {