vite 6.1.1 → 6.1.2

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.
@@ -43524,6 +43524,7 @@ function decodeURIIfPossible(input) {
43524
43524
 
43525
43525
  const debugCache = createDebugger("vite:cache");
43526
43526
  const knownIgnoreList = /* @__PURE__ */ new Set(["/", "/favicon.ico"]);
43527
+ const trailingQuerySeparatorsRE = /[?&]+$/;
43527
43528
  function cachedTransformMiddleware(server) {
43528
43529
  return function viteCachedTransformMiddleware(req, res, next) {
43529
43530
  const environment = server.environments.client;
@@ -43609,7 +43610,16 @@ function transformMiddleware(server) {
43609
43610
  if (publicDirInRoot && url.startsWith(publicPath)) {
43610
43611
  warnAboutExplicitPublicPathInUrl(url);
43611
43612
  }
43612
- if ((rawRE.test(url) || urlRE.test(url)) && !ensureServingAccess(url, server, res, next)) {
43613
+ const urlWithoutTrailingQuerySeparators = url.replace(
43614
+ trailingQuerySeparatorsRE,
43615
+ ""
43616
+ );
43617
+ if ((rawRE.test(urlWithoutTrailingQuerySeparators) || urlRE.test(urlWithoutTrailingQuerySeparators)) && !ensureServingAccess(
43618
+ urlWithoutTrailingQuerySeparators,
43619
+ server,
43620
+ res,
43621
+ next
43622
+ )) {
43613
43623
  return;
43614
43624
  }
43615
43625
  if (req.headers["sec-fetch-dest"] === "script" || isJSRequest(url) || isImportRequest(url) || isCSSRequest(url) || isHTMLProxy(url)) {
@@ -49988,8 +49998,8 @@ function createCachedImport(imp) {
49988
49998
  return cached;
49989
49999
  };
49990
50000
  }
49991
- const importPostcssImport = createCachedImport(() => import('./dep-CJRd4GTw.js').then(function (n) { return n.i; }));
49992
- const importPostcssModules = createCachedImport(() => import('./dep-B42HB7IL.js').then(function (n) { return n.i; }));
50001
+ const importPostcssImport = createCachedImport(() => import('./dep-DmVEsGRf.js').then(function (n) { return n.i; }));
50002
+ const importPostcssModules = createCachedImport(() => import('./dep-DEFzlAOo.js').then(function (n) { return n.i; }));
49993
50003
  const importPostcss = createCachedImport(() => import('postcss'));
49994
50004
  const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
49995
50005
  let alwaysFakeWorkerWorkerControllerCache;
@@ -1,4 +1,4 @@
1
- import { Q as commonjsGlobal, P as getDefaultExportFromCjs } from './dep-Cg8OuIew.js';
1
+ import { Q as commonjsGlobal, P as getDefaultExportFromCjs } from './dep-CE7taEzf.js';
2
2
  import require$$0$2 from 'fs';
3
3
  import require$$0 from 'postcss';
4
4
  import require$$0$1 from 'path';
@@ -1,4 +1,4 @@
1
- import { P as getDefaultExportFromCjs } from './dep-Cg8OuIew.js';
1
+ import { P as getDefaultExportFromCjs } from './dep-CE7taEzf.js';
2
2
  import require$$0 from 'path';
3
3
  import { l as lib } from './dep-3RmXg9uo.js';
4
4
 
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-Cg8OuIew.js';
5
+ import { O as colors, I as createLogger, r as resolveConfig } from './chunks/dep-CE7taEzf.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-Cg8OuIew.js').then(function (n) { return n.S; });
748
+ const { createServer } = await import('./chunks/dep-CE7taEzf.js').then(function (n) { return n.S; });
749
749
  try {
750
750
  const server = await createServer({
751
751
  root,
@@ -839,7 +839,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
839
839
  ).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--app", `[boolean] same as \`builder: {}\``).action(
840
840
  async (root, options) => {
841
841
  filterDuplicateOptions(options);
842
- const { createBuilder } = await import('./chunks/dep-Cg8OuIew.js').then(function (n) { return n.T; });
842
+ const { createBuilder } = await import('./chunks/dep-CE7taEzf.js').then(function (n) { return n.T; });
843
843
  const buildOptions = cleanGlobalCLIOptions(
844
844
  cleanBuilderCLIOptions(options)
845
845
  );
@@ -878,7 +878,7 @@ cli.command(
878
878
  ).action(
879
879
  async (root, options) => {
880
880
  filterDuplicateOptions(options);
881
- const { optimizeDeps } = await import('./chunks/dep-Cg8OuIew.js').then(function (n) { return n.R; });
881
+ const { optimizeDeps } = await import('./chunks/dep-CE7taEzf.js').then(function (n) { return n.R; });
882
882
  try {
883
883
  const config = await resolveConfig(
884
884
  {
@@ -905,7 +905,7 @@ ${e.stack}`),
905
905
  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(
906
906
  async (root, options) => {
907
907
  filterDuplicateOptions(options);
908
- const { preview } = await import('./chunks/dep-Cg8OuIew.js').then(function (n) { return n.U; });
908
+ const { preview } = await import('./chunks/dep-CE7taEzf.js').then(function (n) { return n.U; });
909
909
  try {
910
910
  const server = await preview({
911
911
  root,
@@ -1,6 +1,6 @@
1
1
  export { parseAst, parseAstAsync } from 'rollup/parseAst';
2
- import { i as isInNodeModules, a as arraify } from './chunks/dep-Cg8OuIew.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-Cg8OuIew.js';
2
+ import { i as isInNodeModules, a as arraify } from './chunks/dep-CE7taEzf.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-CE7taEzf.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.1.1",
3
+ "version": "6.1.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",