vite 8.0.12 → 8.0.14

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.
@@ -1,6 +1,6 @@
1
- import { i as __require, t as __commonJSMin } from "./chunk.js";
1
+ import { H as __require, z as __commonJSMin } from "./logger.js";
2
2
  import { t as require_lib } from "./lib.js";
3
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/node_modules/postcss-import/lib/format-import-prelude.js
3
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.15/node_modules/postcss-import/lib/format-import-prelude.js
4
4
  var require_format_import_prelude = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5
5
  module.exports = function formatImportPrelude(layer, media, supports) {
6
6
  const parts = [];
@@ -15,7 +15,7 @@ var require_format_import_prelude = /* @__PURE__ */ __commonJSMin(((exports, mod
15
15
  };
16
16
  }));
17
17
  //#endregion
18
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/node_modules/postcss-import/lib/base64-encoded-import.js
18
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.15/node_modules/postcss-import/lib/base64-encoded-import.js
19
19
  var require_base64_encoded_import = /* @__PURE__ */ __commonJSMin(((exports, module) => {
20
20
  const formatImportPrelude = require_format_import_prelude();
21
21
  module.exports = function base64EncodedConditionalImport(prelude, conditions) {
@@ -28,7 +28,7 @@ var require_base64_encoded_import = /* @__PURE__ */ __commonJSMin(((exports, mod
28
28
  };
29
29
  }));
30
30
  //#endregion
31
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/node_modules/postcss-import/lib/apply-conditions.js
31
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.15/node_modules/postcss-import/lib/apply-conditions.js
32
32
  var require_apply_conditions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
33
33
  const base64EncodedConditionalImport = require_base64_encoded_import();
34
34
  module.exports = function applyConditions(bundle, atRule) {
@@ -103,7 +103,7 @@ var require_apply_conditions = /* @__PURE__ */ __commonJSMin(((exports, module)
103
103
  };
104
104
  }));
105
105
  //#endregion
106
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/node_modules/postcss-import/lib/apply-raws.js
106
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.15/node_modules/postcss-import/lib/apply-raws.js
107
107
  var require_apply_raws = /* @__PURE__ */ __commonJSMin(((exports, module) => {
108
108
  module.exports = function applyRaws(bundle) {
109
109
  bundle.forEach((stmt, index) => {
@@ -117,7 +117,7 @@ var require_apply_raws = /* @__PURE__ */ __commonJSMin(((exports, module) => {
117
117
  };
118
118
  }));
119
119
  //#endregion
120
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/node_modules/postcss-import/lib/apply-styles.js
120
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.15/node_modules/postcss-import/lib/apply-styles.js
121
121
  var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
122
122
  module.exports = function applyStyles(bundle, styles) {
123
123
  styles.nodes = [];
@@ -137,7 +137,7 @@ var require_apply_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
137
137
  };
138
138
  }));
139
139
  //#endregion
140
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/node_modules/postcss-import/lib/data-url.js
140
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.15/node_modules/postcss-import/lib/data-url.js
141
141
  var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
142
142
  const anyDataURLRegexp = /^data:text\/css(?:;(base64|plain))?,/i;
143
143
  const base64DataURLRegexp = /^data:text\/css;base64,/i;
@@ -156,7 +156,7 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
156
156
  };
157
157
  }));
158
158
  //#endregion
159
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/node_modules/postcss-import/lib/parse-statements.js
159
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.15/node_modules/postcss-import/lib/parse-statements.js
160
160
  var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module) => {
161
161
  const valueParser = require_lib();
162
162
  const { stringify } = valueParser;
@@ -281,7 +281,7 @@ var require_parse_statements = /* @__PURE__ */ __commonJSMin(((exports, module)
281
281
  }
282
282
  }));
283
283
  //#endregion
284
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/node_modules/postcss-import/lib/process-content.js
284
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.15/node_modules/postcss-import/lib/process-content.js
285
285
  var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) => {
286
286
  const path$2 = __require("path");
287
287
  let sugarss;
@@ -315,7 +315,7 @@ var require_process_content = /* @__PURE__ */ __commonJSMin(((exports, module) =
315
315
  }
316
316
  }));
317
317
  //#endregion
318
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/node_modules/postcss-import/lib/parse-styles.js
318
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.15/node_modules/postcss-import/lib/parse-styles.js
319
319
  var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
320
320
  const path$1 = __require("path");
321
321
  const dataURL = require_data_url();
@@ -418,7 +418,7 @@ var require_parse_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
418
418
  module.exports = parseStyles;
419
419
  }));
420
420
  //#endregion
421
- //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.14/node_modules/postcss-import/index.js
421
+ //#region ../../node_modules/.pnpm/postcss-import@16.1.1_postcss@8.5.15/node_modules/postcss-import/index.js
422
422
  var require_postcss_import = /* @__PURE__ */ __commonJSMin(((exports, module) => {
423
423
  const path = __require("path");
424
424
  const applyConditions = require_apply_conditions();
package/dist/node/cli.js CHANGED
@@ -1,5 +1,4 @@
1
- import { o as __toESM } from "./chunks/chunk.js";
2
- import { N as VERSION, R as require_picocolors, n as createLogger } from "./chunks/logger.js";
1
+ import { N as VERSION, R as require_picocolors, W as __toESM, n as createLogger } from "./chunks/logger.js";
3
2
  import fs from "node:fs";
4
3
  import path from "node:path";
5
4
  import { inspect } from "node:util";
@@ -31,7 +31,7 @@ import { GeneralImportGlobOptions, ImportGlobFunction, ImportGlobOptions, KnownA
31
31
 
32
32
  //#region \0rolldown/runtime.js
33
33
  //#endregion
34
- //#region ../../node_modules/.pnpm/@vitejs+devtools@0.1.21_typescript@6.0.2_vite@packages+vite/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
34
+ //#region ../../node_modules/.pnpm/@vitejs+devtools@0.1.24_typescript@6.0.3_vite@packages+vite/node_modules/@vitejs/devtools/dist/cli-commands.d.ts
35
35
  //#region src/node/cli-commands.d.ts
36
36
  interface StartOptions {
37
37
  root?: string;
@@ -41,7 +41,7 @@ interface StartOptions {
41
41
  open?: boolean;
42
42
  }
43
43
  //#endregion
44
- //#region ../../node_modules/.pnpm/@vitejs+devtools@0.1.21_typescript@6.0.2_vite@packages+vite/node_modules/@vitejs/devtools/dist/config.d.ts
44
+ //#region ../../node_modules/.pnpm/@vitejs+devtools@0.1.24_typescript@6.0.3_vite@packages+vite/node_modules/@vitejs/devtools/dist/config.d.ts
45
45
  //#region src/node/config.d.ts
46
46
  interface DevToolsConfig extends Partial<StartOptions> {
47
47
  enabled: boolean;
@@ -2999,6 +2999,14 @@ type PluginOption = Thenable<Plugin | {
2999
2999
  */
3000
3000
  declare function perEnvironmentPlugin(name: string, applyToEnvironment: (environment: PartialEnvironment) => boolean | Promise<boolean> | PluginOption): Plugin;
3001
3001
  //#endregion
3002
+ //#region src/node/idResolver.d.ts
3003
+ type ResolveIdFn = (environment: PartialEnvironment, id: string, importer?: string, aliasOnly?: boolean) => Promise<string | undefined>;
3004
+ /**
3005
+ * Create an internal resolver to be used in special scenarios, e.g.
3006
+ * optimizer and handling css @imports
3007
+ */
3008
+ declare function createIdResolver(config: ResolvedConfig, options?: Partial<InternalResolveOptions>): ResolveIdFn;
3009
+ //#endregion
3002
3010
  //#region src/node/plugins/css.d.ts
3003
3011
  interface CSSOptions {
3004
3012
  /**
@@ -3288,6 +3296,17 @@ interface SharedEnvironmentOptions {
3288
3296
  * Optimize deps config
3289
3297
  */
3290
3298
  optimizeDeps?: DepOptimizationOptions;
3299
+ /**
3300
+ * Whether this environment produces a bundled output.
3301
+ *
3302
+ * During `build`, this defaults to `true` for every environment.
3303
+ * During `serve`, this defaults to `true` only for the client environment
3304
+ * when `experimental.bundledDev` is enabled, and `false` otherwise.
3305
+ * Setting this explicitly on an environment always overrides the default.
3306
+ *
3307
+ * @experimental
3308
+ */
3309
+ isBundled?: boolean;
3291
3310
  }
3292
3311
  interface EnvironmentOptions extends SharedEnvironmentOptions {
3293
3312
  /**
@@ -3308,6 +3327,7 @@ type ResolvedEnvironmentOptions = {
3308
3327
  optimizeDeps: DepOptimizationOptions;
3309
3328
  dev: ResolvedDevEnvironmentOptions;
3310
3329
  build: ResolvedBuildEnvironmentOptions;
3330
+ isBundled: boolean;
3311
3331
  plugins: readonly Plugin[];
3312
3332
  };
3313
3333
  type DefaultEnvironmentOptions = Omit<EnvironmentOptions, "consumer" | "resolve" | "keepProcessEnv"> & {
@@ -3532,7 +3552,11 @@ interface ExperimentalOptions {
3532
3552
  */
3533
3553
  hmrPartialAccept?: boolean;
3534
3554
  /**
3535
- * Enable full bundle mode.
3555
+ * Enable full bundle mode during `serve`.
3556
+ *
3557
+ * This seeds the default for the client environment's `isBundled` option.
3558
+ * Other environments default to `false` during `serve`. Any environment
3559
+ * can override its `isBundled` value via `environments[name].isBundled`.
3536
3560
  *
3537
3561
  * This is highly experimental.
3538
3562
  *
@@ -3592,8 +3616,7 @@ interface ResolvedConfig extends Readonly<Omit<UserConfig, "plugins" | "css" | "
3592
3616
  publicDir: string;
3593
3617
  cacheDir: string;
3594
3618
  command: "build" | "serve";
3595
- mode: string; /** `true` when build or full-bundle mode dev */
3596
- isBundled: boolean;
3619
+ mode: string;
3597
3620
  isWorker: boolean;
3598
3621
  isProduction: boolean;
3599
3622
  envDir: string | false;
@@ -3658,14 +3681,6 @@ declare function loadConfigFromFile(configEnv: ConfigEnv, configFile?: string, c
3658
3681
  dependencies: string[];
3659
3682
  } | null>;
3660
3683
  //#endregion
3661
- //#region src/node/idResolver.d.ts
3662
- type ResolveIdFn = (environment: PartialEnvironment, id: string, importer?: string, aliasOnly?: boolean) => Promise<string | undefined>;
3663
- /**
3664
- * Create an internal resolver to be used in special scenarios, e.g.
3665
- * optimizer and handling css @imports
3666
- */
3667
- declare function createIdResolver(config: ResolvedConfig, options?: Partial<InternalResolveOptions>): ResolveIdFn;
3668
- //#endregion
3669
3684
  //#region src/node/server/middlewares/error.d.ts
3670
3685
  declare function buildErrorMessage(err: RollupError, args?: string[], includeStack?: boolean): string;
3671
3686
  //#endregion
@@ -645,17 +645,23 @@ const createInvokeableTransport = (transport) => {
645
645
  async send(data) {
646
646
  if (invokeableTransport.send) {
647
647
  if (!isConnected) if (connectingPromise) await connectingPromise;
648
- else throw Error("send was called before connect");
648
+ else throw new SendBeforeConnectError("send was called before connect");
649
649
  await invokeableTransport.send(data);
650
650
  }
651
651
  },
652
652
  async invoke(name, data) {
653
653
  if (!isConnected) if (connectingPromise) await connectingPromise;
654
- else throw Error("invoke was called before connect");
654
+ else throw new SendBeforeConnectError("invoke was called before connect");
655
655
  return invokeableTransport.invoke(name, data);
656
656
  }
657
657
  };
658
- }, createWebSocketModuleRunnerTransport = (options) => {
658
+ };
659
+ var SendBeforeConnectError = class extends Error {
660
+ constructor(message) {
661
+ super(message), this.name = "SendBeforeConnectError";
662
+ }
663
+ };
664
+ const createWebSocketModuleRunnerTransport = (options) => {
659
665
  let pingInterval = options.pingInterval ?? 3e4, ws, pingIntervalId;
660
666
  return {
661
667
  async connect({ onMessage, onDisconnection }) {
@@ -1051,7 +1057,6 @@ function createImportMetaResolver() {
1051
1057
  function importMetaResolveWithCustomHook(specifier, importer) {
1052
1058
  return import.meta.resolve(`${customizationHookNamespace}${JSON.stringify([specifier, importer])}`);
1053
1059
  }
1054
- `${customizationHookNamespace}`;
1055
1060
  //#endregion
1056
1061
  //#region src/module-runner/createImportMeta.ts
1057
1062
  const envProxy = new Proxy({}, { get(_, p) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "8.0.12",
3
+ "version": "8.0.14",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -62,8 +62,8 @@
62
62
  "dependencies": {
63
63
  "lightningcss": "^1.32.0",
64
64
  "picomatch": "^4.0.4",
65
- "postcss": "^8.5.14",
66
- "rolldown": "1.0.0",
65
+ "postcss": "^8.5.15",
66
+ "rolldown": "1.0.2",
67
67
  "tinyglobby": "^0.2.16"
68
68
  },
69
69
  "optionalDependencies": {
@@ -80,10 +80,10 @@
80
80
  "@vercel/detect-agent": "^1.2.3",
81
81
  "@types/escape-html": "^1.0.4",
82
82
  "@types/pnpapi": "^0.0.5",
83
- "@vitest/utils": "4.1.5",
84
- "@vitejs/devtools": "^0.1.21",
83
+ "@vitest/utils": "4.1.7",
84
+ "@vitejs/devtools": "^0.1.24",
85
85
  "artichokie": "^0.4.3",
86
- "baseline-browser-mapping": "^2.10.29",
86
+ "baseline-browser-mapping": "^2.10.31",
87
87
  "cac": "^7.0.0",
88
88
  "chokidar": "^3.6.0",
89
89
  "connect": "^3.7.0",
@@ -114,7 +114,7 @@
114
114
  "postcss-modules": "^6.0.1",
115
115
  "premove": "^4.0.0",
116
116
  "resolve.exports": "^2.0.3",
117
- "rolldown-plugin-dts": "^0.25.0",
117
+ "rolldown-plugin-dts": "^0.25.1",
118
118
  "rollup": "^4.59.0",
119
119
  "rollup-plugin-license": "^3.7.1",
120
120
  "sass": "^1.99.0",
@@ -123,7 +123,7 @@
123
123
  "strip-literal": "^3.1.0",
124
124
  "terser": "^5.47.1",
125
125
  "ufo": "^1.6.4",
126
- "ws": "^8.20.0"
126
+ "ws": "^8.20.1"
127
127
  },
128
128
  "peerDependencies": {
129
129
  "@types/node": "^20.19.0 || >=22.12.0",
@@ -18,7 +18,7 @@ export interface CustomEventMap {
18
18
  /** @internal */
19
19
  'vite:forward-console': ForwardConsolePayload
20
20
  /** @internal */
21
- 'vite:module-loaded': { modules: string[] }
21
+ 'vite:module-loaded': { modules: string[]; clientId: string }
22
22
 
23
23
  // server events
24
24
  'vite:client:connect': undefined
@@ -1,37 +0,0 @@
1
- import { createRequire } from "node:module";
2
- //#region \0rolldown/runtime.js
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
10
- var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
11
- var __exportAll = (all, no_symbols) => {
12
- let target = {};
13
- for (var name in all) __defProp(target, name, {
14
- get: all[name],
15
- enumerable: true
16
- });
17
- if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
18
- return target;
19
- };
20
- var __copyProps = (to, from, except, desc) => {
21
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
22
- key = keys[i];
23
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
24
- get: ((k) => from[k]).bind(null, key),
25
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
26
- });
27
- }
28
- return to;
29
- };
30
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
31
- value: mod,
32
- enumerable: true
33
- }) : target, mod));
34
- var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
36
- //#endregion
37
- export { __toCommonJS as a, __require as i, __esmMin as n, __toESM as o, __exportAll as r, __commonJSMin as t };