vite 6.2.0-beta.1 → 6.2.0

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.

Potentially problematic release.


This version of vite might be problematic. Click here for more details.

@@ -215,6 +215,7 @@ class HMRClient {
215
215
  }
216
216
  }
217
217
 
218
+ /* @ts-self-types="./index.d.ts" */
218
219
  let urlAlphabet =
219
220
  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
220
221
  let nanoid = (size = 21) => {
@@ -37,10 +37,10 @@ import require$$3 from 'crypto';
37
37
  import assert$1 from 'node:assert';
38
38
  import v8 from 'node:v8';
39
39
  import { Worker as Worker$1, MessageChannel } from 'node:worker_threads';
40
- import zlib$1 from 'zlib';
41
- import require$$0$9 from 'buffer';
42
40
  import require$$1$3 from 'https';
43
41
  import require$$4$2 from 'tls';
42
+ import zlib$1 from 'zlib';
43
+ import require$$0$9 from 'buffer';
44
44
  import require$$4$3 from 'assert';
45
45
  import * as qs from 'node:querystring';
46
46
  import { gzip } from 'node:zlib';
@@ -35241,7 +35241,7 @@ let Sender$1 = class Sender {
35241
35241
  /**
35242
35242
  * Sends a frame.
35243
35243
  *
35244
- * @param {Buffer[]} list The frame to send
35244
+ * @param {(Buffer | String)[]} list The frame to send
35245
35245
  * @param {Function} [cb] Callback
35246
35246
  * @private
35247
35247
  */
@@ -46689,15 +46689,22 @@ async function getWorkerType(raw, clean, i) {
46689
46689
  if (commaIndex > endIndex) {
46690
46690
  return "classic";
46691
46691
  }
46692
- const workerOptString = raw.substring(commaIndex + 1, endIndex).replace(/\}[\s\S]*,/g, "}");
46692
+ let workerOptString = raw.substring(commaIndex + 1, endIndex);
46693
46693
  const hasViteIgnore = hasViteIgnoreRE.test(workerOptString);
46694
46694
  if (hasViteIgnore) {
46695
46695
  return "ignore";
46696
46696
  }
46697
- const cleanWorkerOptString = clean.substring(commaIndex + 1, endIndex).trim();
46698
- if (!cleanWorkerOptString.length) {
46697
+ const cleanWorkerOptString = clean.substring(commaIndex + 1, endIndex);
46698
+ const trimmedCleanWorkerOptString = cleanWorkerOptString.trim();
46699
+ if (!trimmedCleanWorkerOptString.length) {
46699
46700
  return "classic";
46700
46701
  }
46702
+ if (trimmedCleanWorkerOptString.endsWith(",")) {
46703
+ workerOptString = workerOptString.slice(
46704
+ 0,
46705
+ cleanWorkerOptString.lastIndexOf(",")
46706
+ );
46707
+ }
46701
46708
  const workerOpts = await parseWorkerOptions(workerOptString, commaIndex + 1);
46702
46709
  if (workerOpts.type && (workerOpts.type === "module" || workerOpts.type === "classic")) {
46703
46710
  return workerOpts.type;
@@ -49204,8 +49211,8 @@ function createCachedImport(imp) {
49204
49211
  return cached;
49205
49212
  };
49206
49213
  }
49207
- const importPostcssImport = createCachedImport(() => import('./dep-B_VirPXO.js').then(function (n) { return n.i; }));
49208
- const importPostcssModules = createCachedImport(() => import('./dep-CQyoC9dM.js').then(function (n) { return n.i; }));
49214
+ const importPostcssImport = createCachedImport(() => import('./dep-F-Bfqht7.js').then(function (n) { return n.i; }));
49215
+ const importPostcssModules = createCachedImport(() => import('./dep-zaPmCqbl.js').then(function (n) { return n.i; }));
49209
49216
  const importPostcss = createCachedImport(() => import('postcss'));
49210
49217
  const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
49211
49218
  let alwaysFakeWorkerWorkerControllerCache;
@@ -51451,7 +51458,7 @@ build started...`));
51451
51458
  clearLine();
51452
51459
  if (startTime) {
51453
51460
  logger.error(
51454
- `${colors$1.red("x")} Build failed in ${displayTime(Date.now() - startTime)}`
51461
+ `${colors$1.red("\u2717")} Build failed in ${displayTime(Date.now() - startTime)}`
51455
51462
  );
51456
51463
  startTime = void 0;
51457
51464
  }
@@ -1,4 +1,4 @@
1
- import { P as getDefaultExportFromCjs } from './dep-CuXbLJyX.js';
1
+ import { P as getDefaultExportFromCjs } from './dep-ByPKlqZ5.js';
2
2
  import require$$0 from 'path';
3
3
  import { l as lib } from './dep-3RmXg9uo.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { Q as commonjsGlobal, P as getDefaultExportFromCjs } from './dep-CuXbLJyX.js';
1
+ import { Q as commonjsGlobal, P as getDefaultExportFromCjs } from './dep-ByPKlqZ5.js';
2
2
  import require$$0$2 from 'fs';
3
3
  import require$$0 from 'postcss';
4
4
  import require$$0$1 from 'path';
package/dist/node/cli.js CHANGED
@@ -2,7 +2,7 @@ import path from 'node:path';
2
2
  import fs__default from 'node:fs';
3
3
  import { performance } from 'node:perf_hooks';
4
4
  import { EventEmitter } from 'events';
5
- import { O as colors, I as createLogger, r as resolveConfig } from './chunks/dep-CuXbLJyX.js';
5
+ import { O as colors, I as createLogger, r as resolveConfig } from './chunks/dep-ByPKlqZ5.js';
6
6
  import { VERSION } from './constants.js';
7
7
  import 'node:fs/promises';
8
8
  import 'node:url';
@@ -37,10 +37,10 @@ import 'crypto';
37
37
  import 'node:assert';
38
38
  import 'node:v8';
39
39
  import 'node:worker_threads';
40
- import 'zlib';
41
- import 'buffer';
42
40
  import 'https';
43
41
  import 'tls';
42
+ import 'zlib';
43
+ import 'buffer';
44
44
  import 'assert';
45
45
  import 'node:querystring';
46
46
  import 'node:zlib';
@@ -745,7 +745,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
745
745
  `[boolean] force the optimizer to ignore the cache and re-bundle`
746
746
  ).action(async (root, options) => {
747
747
  filterDuplicateOptions(options);
748
- const { createServer } = await import('./chunks/dep-CuXbLJyX.js').then(function (n) { return n.S; });
748
+ const { createServer } = await import('./chunks/dep-ByPKlqZ5.js').then(function (n) { return n.S; });
749
749
  try {
750
750
  const server = await createServer({
751
751
  root,
@@ -840,7 +840,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
840
840
  ).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--app", `[boolean] same as \`builder: {}\``).action(
841
841
  async (root, options) => {
842
842
  filterDuplicateOptions(options);
843
- const { createBuilder } = await import('./chunks/dep-CuXbLJyX.js').then(function (n) { return n.T; });
843
+ const { createBuilder } = await import('./chunks/dep-ByPKlqZ5.js').then(function (n) { return n.T; });
844
844
  const buildOptions = cleanGlobalCLIOptions(
845
845
  cleanBuilderCLIOptions(options)
846
846
  );
@@ -879,7 +879,7 @@ cli.command(
879
879
  ).action(
880
880
  async (root, options) => {
881
881
  filterDuplicateOptions(options);
882
- const { optimizeDeps } = await import('./chunks/dep-CuXbLJyX.js').then(function (n) { return n.R; });
882
+ const { optimizeDeps } = await import('./chunks/dep-ByPKlqZ5.js').then(function (n) { return n.R; });
883
883
  try {
884
884
  const config = await resolveConfig(
885
885
  {
@@ -906,7 +906,7 @@ ${e.stack}`),
906
906
  cli.command("preview [root]", "locally preview production build").option("--host [host]", `[string] specify hostname`, { type: [convertHost] }).option("--port <port>", `[number] specify port`).option("--strictPort", `[boolean] exit if specified port is already in use`).option("--open [path]", `[boolean | string] open browser on startup`).option("--outDir <dir>", `[string] output directory (default: dist)`).action(
907
907
  async (root, options) => {
908
908
  filterDuplicateOptions(options);
909
- const { preview } = await import('./chunks/dep-CuXbLJyX.js').then(function (n) { return n.U; });
909
+ const { preview } = await import('./chunks/dep-ByPKlqZ5.js').then(function (n) { return n.U; });
910
910
  try {
911
911
  const server = await preview({
912
912
  root,
@@ -1,6 +1,6 @@
1
1
  export { parseAst, parseAstAsync } from 'rollup/parseAst';
2
- import { a as arraify, i as isInNodeModules } from './chunks/dep-CuXbLJyX.js';
3
- export { B as BuildEnvironment, D as DevEnvironment, f as build, m as buildErrorMessage, g as createBuilder, F as createFilter, h as createIdResolver, I as createLogger, n as createRunnableDevEnvironment, c as createServer, y as createServerHotChannel, w as createServerModuleRunner, x as createServerModuleRunnerTransport, d as defineConfig, v as fetchModule, j as formatPostcssSourceMap, L as isFileLoadingAllowed, K as isFileServingAllowed, q as isRunnableDevEnvironment, l as loadConfigFromFile, M as loadEnv, E as mergeAlias, C as mergeConfig, z as moduleRunnerTransform, A as normalizePath, o as optimizeDeps, p as perEnvironmentPlugin, b as perEnvironmentState, k as preprocessCSS, e as preview, r as resolveConfig, N as resolveEnvPrefix, G as rollupVersion, u as runnerImport, J as searchForWorkspaceRoot, H as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-CuXbLJyX.js';
2
+ import { a as arraify, i as isInNodeModules } from './chunks/dep-ByPKlqZ5.js';
3
+ export { B as BuildEnvironment, D as DevEnvironment, f as build, m as buildErrorMessage, g as createBuilder, F as createFilter, h as createIdResolver, I as createLogger, n as createRunnableDevEnvironment, c as createServer, y as createServerHotChannel, w as createServerModuleRunner, x as createServerModuleRunnerTransport, d as defineConfig, v as fetchModule, j as formatPostcssSourceMap, L as isFileLoadingAllowed, K as isFileServingAllowed, q as isRunnableDevEnvironment, l as loadConfigFromFile, M as loadEnv, E as mergeAlias, C as mergeConfig, z as moduleRunnerTransform, A as normalizePath, o as optimizeDeps, p as perEnvironmentPlugin, b as perEnvironmentState, k as preprocessCSS, e as preview, r as resolveConfig, N as resolveEnvPrefix, G as rollupVersion, u as runnerImport, J as searchForWorkspaceRoot, H as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-ByPKlqZ5.js';
4
4
  export { defaultAllowedOrigins, DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, VERSION as version } from './constants.js';
5
5
  export { version as esbuildVersion } from 'esbuild';
6
6
  import 'node:fs';
@@ -38,10 +38,10 @@ import 'crypto';
38
38
  import 'node:assert';
39
39
  import 'node:v8';
40
40
  import 'node:worker_threads';
41
- import 'zlib';
42
- import 'buffer';
43
41
  import 'https';
44
42
  import 'tls';
43
+ import 'zlib';
44
+ import 'buffer';
45
45
  import 'assert';
46
46
  import 'node:querystring';
47
47
  import 'node:zlib';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "6.2.0-beta.1",
3
+ "version": "6.2.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -73,7 +73,7 @@
73
73
  "//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
74
74
  "dependencies": {
75
75
  "esbuild": "^0.25.0",
76
- "postcss": "^8.5.2",
76
+ "postcss": "^8.5.3",
77
77
  "rollup": "^4.30.1"
78
78
  },
79
79
  "optionalDependencies": {
@@ -113,7 +113,7 @@
113
113
  "magic-string": "^0.30.17",
114
114
  "mlly": "^1.7.4",
115
115
  "mrmime": "^2.0.1",
116
- "nanoid": "^5.1.0",
116
+ "nanoid": "^5.1.2",
117
117
  "open": "^10.1.0",
118
118
  "parse5": "^7.2.1",
119
119
  "pathe": "^2.0.3",
@@ -133,12 +133,12 @@
133
133
  "source-map-support": "^0.5.21",
134
134
  "strip-literal": "^3.0.0",
135
135
  "terser": "^5.39.0",
136
- "tinyglobby": "^0.2.11",
136
+ "tinyglobby": "^0.2.12",
137
137
  "tsconfck": "^3.1.5",
138
138
  "tslib": "^2.8.1",
139
139
  "types": "link:./types",
140
140
  "ufo": "^1.5.4",
141
- "ws": "^8.18.0"
141
+ "ws": "^8.18.1"
142
142
  },
143
143
  "peerDependencies": {
144
144
  "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",