@voidzero-dev/vite-plus-core 0.3.2 → 0.3.3

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 (37) 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 +4 -4
  5. package/dist/rolldown/experimental-index.mjs +8 -8
  6. package/dist/rolldown/experimental-runtime-types.d.ts +19 -0
  7. package/dist/rolldown/experimental-runtime.d.ts +19 -0
  8. package/dist/rolldown/experimental-runtime.mjs +42 -0
  9. package/dist/rolldown/filter-index.d.mts +1 -1
  10. package/dist/rolldown/index.d.mts +2 -2
  11. package/dist/rolldown/index.mjs +4 -4
  12. package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
  13. package/dist/rolldown/parallel-plugin.d.mts +1 -1
  14. package/dist/rolldown/parse-ast-index.d.mts +1 -1
  15. package/dist/rolldown/parse-ast-index.mjs +1 -1
  16. package/dist/rolldown/plugins-index.d.mts +3 -3
  17. package/dist/rolldown/plugins-index.mjs +2 -2
  18. package/dist/rolldown/shared/{binding-DZuNHVw4.d.mts → binding-BTa6BPQe.d.mts} +23 -36
  19. package/dist/rolldown/shared/{binding-DH95uVkp.mjs → binding-BbrDfv1x.mjs} +53 -28
  20. package/dist/rolldown/shared/{bindingify-input-options-BL4xrXys.mjs → bindingify-input-options-CbBAjvu6.mjs} +9 -8
  21. package/dist/rolldown/shared/{constructors-BnIg8feC.d.mts → constructors-CmDKpWIU.d.mts} +2 -2
  22. package/dist/rolldown/shared/{constructors-CrhQ-yy_.mjs → constructors-D9jwEbE4.mjs} +1 -1
  23. package/dist/rolldown/shared/{create-bundler-option-Dk9AZBn_.mjs → create-bundler-option-wxuQPB7F.mjs} +90 -154
  24. package/dist/rolldown/shared/{define-config-DjHYbH6S.d.mts → define-config-BFdLpVut.d.mts} +6 -1
  25. package/dist/rolldown/shared/{error-CRNyaqoL.mjs → error-CGhV1ebk.mjs} +1 -1
  26. package/dist/rolldown/shared/{load-config-CKqTUKwB.mjs → load-config-DOMKIWz0.mjs} +1 -1
  27. package/dist/rolldown/shared/{normalize-string-or-regex-BgP6W4eD.mjs → normalize-string-or-regex-zc1bUto6.mjs} +1 -1
  28. package/dist/rolldown/shared/{parse-DYyNe0IU.mjs → parse-B-7jgDap.mjs} +2 -2
  29. package/dist/rolldown/shared/{resolve-tsconfig-jh43hFM_.mjs → resolve-tsconfig-Bf6oL9fm.mjs} +2 -2
  30. package/dist/rolldown/shared/{rolldown-BpXK1q5_.mjs → rolldown-DZGaRc5R.mjs} +4 -4
  31. package/dist/rolldown/shared/{transform-CVse9_mH.d.mts → transform-DK_nCt9j.d.mts} +1 -1
  32. package/dist/rolldown/shared/{watch-Due6uYkS.mjs → watch-CUKYWzxY.mjs} +4 -4
  33. package/dist/rolldown/utils-index.d.mts +3 -3
  34. package/dist/rolldown/utils-index.mjs +5 -5
  35. package/dist/vite/client/bundledDevClient.mjs +34 -4
  36. package/dist/vite/client/client.mjs +4 -4
  37. package/package.json +20 -20
@@ -1,4 +1,4 @@
1
- import { n as __toESM, t as require_binding } from "./binding-DH95uVkp.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-BbrDfv1x.mjs";
2
2
  import { l as logPluginError, n as error } from "./logs-DmYCAKcW.mjs";
3
3
  //#region src/builtin-plugin/utils.ts
4
4
  var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
@@ -1,5 +1,5 @@
1
- import { n as __toESM, t as require_binding } from "./binding-DH95uVkp.mjs";
2
- //#region ../../../node_modules/.pnpm/oxc-parser@0.149.0/node_modules/oxc-parser/src-js/wrap.js
1
+ import { n as __toESM, t as require_binding } from "./binding-BbrDfv1x.mjs";
2
+ //#region ../../../node_modules/.pnpm/oxc-parser@0.150.0/node_modules/oxc-parser/src-js/wrap.js
3
3
  var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
4
4
  function wrap(result) {
5
5
  let program, module, comments, errors;
@@ -1,5 +1,5 @@
1
- import { n as __toESM, t as require_binding } from "./binding-DH95uVkp.mjs";
2
- import { a as bindingifySourcemap, n as normalizeBindingError } from "./error-CRNyaqoL.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-BbrDfv1x.mjs";
2
+ import { a as bindingifySourcemap, n as normalizeBindingError } from "./error-CGhV1ebk.mjs";
3
3
  //#region src/utils/minify.ts
4
4
  var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
5
5
  /**
@@ -1,7 +1,7 @@
1
- import { n as __toESM, t as require_binding } from "./binding-DH95uVkp.mjs";
2
- import { f as __decorate, h as PlainObjectLike, m as lazyProp, u as transformToRollupOutput } from "./bindingify-input-options-BL4xrXys.mjs";
3
- import { l as PluginDriver, s as validateOption, t as createBundlerOptions } from "./create-bundler-option-Dk9AZBn_.mjs";
4
- import { i as unwrapBindingResult } from "./error-CRNyaqoL.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-BbrDfv1x.mjs";
2
+ import { f as __decorate, h as PlainObjectLike, m as lazyProp, u as transformToRollupOutput } from "./bindingify-input-options-CbBAjvu6.mjs";
3
+ import { l as PluginDriver, s as validateOption, t as createBundlerOptions } from "./create-bundler-option-wxuQPB7F.mjs";
4
+ import { i as unwrapBindingResult } from "./error-CGhV1ebk.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 {
@@ -1,5 +1,5 @@
1
1
  import { a as RolldownLog } from "./logging-xuHO4mAy.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";
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-BTa6BPQe.mjs";
3
3
  //#region src/utils/resolve-tsconfig.d.ts
4
4
  /**
5
5
  * Cache for tsconfig resolution to avoid redundant file system operations.
@@ -1,9 +1,9 @@
1
- import { n as __toESM, t as require_binding } from "./binding-DH95uVkp.mjs";
1
+ import { n as __toESM, t as require_binding } from "./binding-BbrDfv1x.mjs";
2
2
  import { s as logMultipleWatcherOption } from "./logs-DmYCAKcW.mjs";
3
- import { C as LOG_LEVEL_WARN } from "./bindingify-input-options-BL4xrXys.mjs";
3
+ import { C as LOG_LEVEL_WARN } from "./bindingify-input-options-CbBAjvu6.mjs";
4
4
  import { t as arraify } from "./misc-DOSKtd97.mjs";
5
- import { l as PluginDriver, t as createBundlerOptions } from "./create-bundler-option-Dk9AZBn_.mjs";
6
- import { t as aggregateBindingErrorsIntoJsError } from "./error-CRNyaqoL.mjs";
5
+ import { l as PluginDriver, t as createBundlerOptions } from "./create-bundler-option-wxuQPB7F.mjs";
6
+ import { t as aggregateBindingErrorsIntoJsError } from "./error-CGhV1ebk.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 { 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";
1
+ import { b as BindingTsconfigRawOptions, y as BindingTsconfigCompilerOptions } from "./shared/binding-BTa6BPQe.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-DK_nCt9j.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.149.0/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts
5
+ //#region ../../../node_modules/.pnpm/oxc-parser@0.150.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-DYyNe0IU.mjs";
2
- import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./shared/resolve-tsconfig-jh43hFM_.mjs";
3
- //#region ../../../node_modules/.pnpm/oxc-parser@0.149.0/node_modules/oxc-parser/src-js/generated/visit/walk.js
1
+ import { n as parseSync, t as parse } from "./shared/parse-B-7jgDap.mjs";
2
+ import { a as minify, i as transformSync, o as minifySync, r as transform, t as TsconfigCache } from "./shared/resolve-tsconfig-Bf6oL9fm.mjs";
3
+ //#region ../../../node_modules/.pnpm/oxc-parser@0.150.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.149.0/node_modules/oxc-parser/src-js/generated/visit/type_ids.js
2011
+ //#region ../../../node_modules/.pnpm/oxc-parser@0.150.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.149.0/node_modules/oxc-parser/src-js/visit/visitor.js
2181
+ //#region ../../../node_modules/.pnpm/oxc-parser@0.150.0/node_modules/oxc-parser/src-js/visit/visitor.js
2182
2182
  let compiledVisitor;
2183
2183
  function createCompiledVisitor() {
2184
2184
  compiledVisitor = [];
@@ -41,7 +41,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
41
41
  }) : target, mod));
42
42
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
43
43
  //#endregion
44
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/typeof.js
44
+ //#region \0@oxc-project+runtime@0.150.0/helpers/esm/typeof.js
45
45
  function _typeof(o) {
46
46
  "@babel/helpers - typeof";
47
47
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -51,7 +51,7 @@ function _typeof(o) {
51
51
  }, _typeof(o);
52
52
  }
53
53
  //#endregion
54
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPrimitive.js
54
+ //#region \0@oxc-project+runtime@0.150.0/helpers/esm/toPrimitive.js
55
55
  function toPrimitive(t, r) {
56
56
  if ("object" != _typeof(t) || !t) return t;
57
57
  var e = t[Symbol.toPrimitive];
@@ -63,13 +63,13 @@ function toPrimitive(t, r) {
63
63
  return ("string" === r ? String : Number)(t);
64
64
  }
65
65
  //#endregion
66
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPropertyKey.js
66
+ //#region \0@oxc-project+runtime@0.150.0/helpers/esm/toPropertyKey.js
67
67
  function toPropertyKey(t) {
68
68
  var i = toPrimitive(t, "string");
69
69
  return "symbol" == _typeof(i) ? i : i + "";
70
70
  }
71
71
  //#endregion
72
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/defineProperty.js
72
+ //#region \0@oxc-project+runtime@0.150.0/helpers/esm/defineProperty.js
73
73
  function _defineProperty(e, r, t) {
74
74
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
75
75
  value: t,
@@ -208,6 +208,12 @@ var DevRuntime = class {
208
208
  "hooks",
209
209
  null
210
210
  );
211
+ _defineProperty(
212
+ this,
213
+ /** @type {Map<string, Promise<any>>} */
214
+ "lazyRequests",
215
+ /* @__PURE__ */ new Map()
216
+ );
211
217
  _defineProperty(
212
218
  this,
213
219
  /** @internal */
@@ -322,6 +328,7 @@ var DevRuntime = class {
322
328
  */
323
329
  removeModuleCache(id) {
324
330
  this.moduleCache.delete(id);
331
+ this.lazyRequests.delete(id);
325
332
  this.hooks?.onModuleCacheRemoval(id);
326
333
  }
327
334
  /**
@@ -348,6 +355,29 @@ var DevRuntime = class {
348
355
  }
349
356
  }
350
357
  /**
358
+ * The entry point for a lazy `import()`. `id` is the module the boundary stands for; the
359
+ * boundary's own id appears only inside `fetchChunk`'s URL.
360
+ *
361
+ * Nothing is registered under the boundary id, deliberately. A cache entry with no factory
362
+ * behind it reads as "executed" to the HMR boundary walk, and `applyUpdate` turns an
363
+ * updated-but-factory-less module into a full page reload.
364
+ *
365
+ * A rejection is memoized like any other outcome, matching `import()` of a module that
366
+ * threw. Retrying could not work anyway: a factory registers its module before running its
367
+ * body, so re-running `initModule` would return half-initialized exports as success.
368
+ *
369
+ * @param {string} id
370
+ * @param {() => Promise<unknown>} fetchChunk
371
+ * @returns {Promise<any>}
372
+ */
373
+ requestLazy(id, fetchChunk) {
374
+ const pending = this.lazyRequests.get(id);
375
+ if (pending) return pending;
376
+ const promise = this.moduleCache.has(id) || this.factories.has(id) ? Promise.resolve().then(() => this.initModule(id)) : Promise.resolve().then(fetchChunk).then(() => this.initModule(id));
377
+ this.lazyRequests.set(id, promise);
378
+ return promise;
379
+ }
380
+ /**
351
381
  * @param {string} moduleId
352
382
  */
353
383
  createModuleHotContext(moduleId) {
@@ -381,7 +381,7 @@ function stringifyConsoleArg(value) {
381
381
  }
382
382
  }
383
383
  //#endregion
384
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/typeof.js
384
+ //#region \0@oxc-project+runtime@0.150.0/helpers/esm/typeof.js
385
385
  function _typeof(o) {
386
386
  "@babel/helpers - typeof";
387
387
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -391,7 +391,7 @@ function _typeof(o) {
391
391
  }, _typeof(o);
392
392
  }
393
393
  //#endregion
394
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPrimitive.js
394
+ //#region \0@oxc-project+runtime@0.150.0/helpers/esm/toPrimitive.js
395
395
  function toPrimitive(t, r) {
396
396
  if ("object" != _typeof(t) || !t) return t;
397
397
  var e = t[Symbol.toPrimitive];
@@ -403,13 +403,13 @@ function toPrimitive(t, r) {
403
403
  return ("string" === r ? String : Number)(t);
404
404
  }
405
405
  //#endregion
406
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/toPropertyKey.js
406
+ //#region \0@oxc-project+runtime@0.150.0/helpers/esm/toPropertyKey.js
407
407
  function toPropertyKey(t) {
408
408
  var i = toPrimitive(t, "string");
409
409
  return "symbol" == _typeof(i) ? i : i + "";
410
410
  }
411
411
  //#endregion
412
- //#region \0@oxc-project+runtime@0.149.0/helpers/esm/defineProperty.js
412
+ //#region \0@oxc-project+runtime@0.150.0/helpers/esm/defineProperty.js
413
413
  function _defineProperty(e, r, t) {
414
414
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
415
415
  value: t,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voidzero-dev/vite-plus-core",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "The Unified Toolchain for the Web",
5
5
  "homepage": "https://viteplus.dev/guide",
6
6
  "bugs": {
@@ -107,8 +107,8 @@
107
107
  "./types/internal/*": null
108
108
  },
109
109
  "dependencies": {
110
- "@oxc-project/runtime": "=0.149.0",
111
- "@oxc-project/types": "=0.149.0",
110
+ "@oxc-project/runtime": "=0.150.0",
111
+ "@oxc-project/types": "=0.150.0",
112
112
  "lightningcss": "^1.33.0",
113
113
  "postcss": "^8.5.6",
114
114
  "yuku-codegen": "^0.9.3",
@@ -116,22 +116,22 @@
116
116
  },
117
117
  "devDependencies": {
118
118
  "@ast-grep/napi": "^0.43.0",
119
- "@emnapi/core": "2.0.0-alpha.4",
120
- "@emnapi/runtime": "2.0.0-alpha.4",
121
- "@napi-rs/cli": "^3.9.0",
122
- "@oxc-node/cli": "^0.1.0",
119
+ "@emnapi/core": "2.0.0-alpha.5",
120
+ "@emnapi/runtime": "2.0.0-alpha.5",
121
+ "@napi-rs/cli": "^3.10.0",
122
+ "@oxc-node/cli": "^0.1.2",
123
123
  "@tsdown/css": "^0.23.0",
124
124
  "@tsdown/exe": "^0.23.0",
125
125
  "@vitejs/devtools": "^0.7.1",
126
126
  "es-module-lexer": "^1.7.0",
127
127
  "hookable": "^6.0.1",
128
128
  "magic-string": "^0.30.21",
129
- "oxc-parser": "=0.149.0",
130
- "oxfmt": "=0.67.0",
129
+ "oxc-parser": "=0.150.0",
130
+ "oxfmt": "=0.68.0",
131
131
  "picocolors": "^1.1.1",
132
132
  "picomatch": "^4.0.2",
133
133
  "pkg-types": "^2.3.0",
134
- "rolldown": "1.2.8",
134
+ "rolldown": "1.2.9",
135
135
  "rolldown-plugin-dts": "^0.28.0",
136
136
  "rollup": "^4.63.0",
137
137
  "rollup-plugin-license": "^3.6.0",
@@ -139,7 +139,7 @@
139
139
  "tinyglobby": "^0.2.15",
140
140
  "tree-kill": "^1.2.2",
141
141
  "tsdown": "^0.23.0",
142
- "vite": "npm:@voidzero-dev/vite-plus-core@0.3.2"
142
+ "vite": "npm:@voidzero-dev/vite-plus-core@0.3.3"
143
143
  },
144
144
  "peerDependencies": {
145
145
  "@arethetypeswrong/core": "^0.18.1",
@@ -215,21 +215,21 @@
215
215
  },
216
216
  "optionalDependencies": {
217
217
  "fsevents": "~2.3.3",
218
- "@voidzero-dev/vite-plus-darwin-arm64": "0.3.2",
219
- "@voidzero-dev/vite-plus-darwin-x64": "0.3.2",
220
- "@voidzero-dev/vite-plus-linux-arm64-gnu": "0.3.2",
221
- "@voidzero-dev/vite-plus-linux-arm64-musl": "0.3.2",
222
- "@voidzero-dev/vite-plus-linux-x64-gnu": "0.3.2",
223
- "@voidzero-dev/vite-plus-linux-x64-musl": "0.3.2",
224
- "@voidzero-dev/vite-plus-win32-x64-msvc": "0.3.2",
225
- "@voidzero-dev/vite-plus-win32-arm64-msvc": "0.3.2"
218
+ "@voidzero-dev/vite-plus-darwin-arm64": "0.3.3",
219
+ "@voidzero-dev/vite-plus-darwin-x64": "0.3.3",
220
+ "@voidzero-dev/vite-plus-linux-arm64-gnu": "0.3.3",
221
+ "@voidzero-dev/vite-plus-linux-arm64-musl": "0.3.3",
222
+ "@voidzero-dev/vite-plus-linux-x64-gnu": "0.3.3",
223
+ "@voidzero-dev/vite-plus-linux-x64-musl": "0.3.3",
224
+ "@voidzero-dev/vite-plus-win32-x64-msvc": "0.3.3",
225
+ "@voidzero-dev/vite-plus-win32-arm64-msvc": "0.3.3"
226
226
  },
227
227
  "engines": {
228
228
  "node": "^20.19.0 || ^22.18.0 || >=24.11.0"
229
229
  },
230
230
  "bundledVersions": {
231
231
  "vite": "8.3.0",
232
- "rolldown": "1.2.8",
232
+ "rolldown": "1.2.9",
233
233
  "tsdown": "0.23.0"
234
234
  },
235
235
  "scripts": {