vite 6.2.2 → 6.2.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.

Potentially problematic release.


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

@@ -1,4 +1,4 @@
1
- import { P as getDefaultExportFromCjs } from './dep-B0fRCRkQ.js';
1
+ import { P as getDefaultExportFromCjs } from './dep-DDxXL6bt.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-B0fRCRkQ.js';
1
+ import { Q as commonjsGlobal, P as getDefaultExportFromCjs } from './dep-DDxXL6bt.js';
2
2
  import require$$0$2 from 'fs';
3
3
  import require$$0 from 'postcss';
4
4
  import require$$0$1 from 'path';
@@ -42678,6 +42678,7 @@ function decodeURIIfPossible(input) {
42678
42678
 
42679
42679
  const debugCache = createDebugger("vite:cache");
42680
42680
  const knownIgnoreList = /* @__PURE__ */ new Set(["/", "/favicon.ico"]);
42681
+ const trailingQuerySeparatorsRE = /[?&]+$/;
42681
42682
  function cachedTransformMiddleware(server) {
42682
42683
  return function viteCachedTransformMiddleware(req, res, next) {
42683
42684
  const environment = server.environments.client;
@@ -42763,7 +42764,16 @@ function transformMiddleware(server) {
42763
42764
  if (publicDirInRoot && url.startsWith(publicPath)) {
42764
42765
  warnAboutExplicitPublicPathInUrl(url);
42765
42766
  }
42766
- if ((rawRE.test(url) || urlRE.test(url)) && !ensureServingAccess(url, server, res, next)) {
42767
+ const urlWithoutTrailingQuerySeparators = url.replace(
42768
+ trailingQuerySeparatorsRE,
42769
+ ""
42770
+ );
42771
+ if ((rawRE.test(urlWithoutTrailingQuerySeparators) || urlRE.test(urlWithoutTrailingQuerySeparators)) && !ensureServingAccess(
42772
+ urlWithoutTrailingQuerySeparators,
42773
+ server,
42774
+ res,
42775
+ next
42776
+ )) {
42767
42777
  return;
42768
42778
  }
42769
42779
  if (req.headers["sec-fetch-dest"] === "script" || isJSRequest(url) || isImportRequest(url) || isCSSRequest(url) || isHTMLProxy(url)) {
@@ -49230,8 +49240,8 @@ function createCachedImport(imp) {
49230
49240
  return cached;
49231
49241
  };
49232
49242
  }
49233
- const importPostcssImport = createCachedImport(() => import('./dep-dLifoI9c.js').then(function (n) { return n.i; }));
49234
- const importPostcssModules = createCachedImport(() => import('./dep-BL6Xg-kE.js').then(function (n) { return n.i; }));
49243
+ const importPostcssImport = createCachedImport(() => import('./dep-B7sDzLoK.js').then(function (n) { return n.i; }));
49244
+ const importPostcssModules = createCachedImport(() => import('./dep-C594T9mk.js').then(function (n) { return n.i; }));
49235
49245
  const importPostcss = createCachedImport(() => import('postcss'));
49236
49246
  const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
49237
49247
  let alwaysFakeWorkerWorkerControllerCache;
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-B0fRCRkQ.js';
5
+ import { O as colors, I as createLogger, r as resolveConfig } from './chunks/dep-DDxXL6bt.js';
6
6
  import { VERSION } from './constants.js';
7
7
  import 'node:fs/promises';
8
8
  import 'node:url';
@@ -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-B0fRCRkQ.js').then(function (n) { return n.S; });
748
+ const { createServer } = await import('./chunks/dep-DDxXL6bt.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-B0fRCRkQ.js').then(function (n) { return n.T; });
843
+ const { createBuilder } = await import('./chunks/dep-DDxXL6bt.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-B0fRCRkQ.js').then(function (n) { return n.R; });
882
+ const { optimizeDeps } = await import('./chunks/dep-DDxXL6bt.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-B0fRCRkQ.js').then(function (n) { return n.U; });
909
+ const { preview } = await import('./chunks/dep-DDxXL6bt.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-B0fRCRkQ.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-B0fRCRkQ.js';
2
+ import { a as arraify, i as isInNodeModules } from './chunks/dep-DDxXL6bt.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-DDxXL6bt.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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "6.2.2",
3
+ "version": "6.2.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",