vite 5.1.7 → 5.1.8

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.
@@ -32173,8 +32173,8 @@ function createCachedImport(imp) {
32173
32173
  return cached;
32174
32174
  };
32175
32175
  }
32176
- const importPostcssImport = createCachedImport(() => import('./dep-qw1-Ctro.js').then(function (n) { return n.i; }));
32177
- const importPostcssModules = createCachedImport(() => import('./dep-a4OR5kR_.js').then(function (n) { return n.i; }));
32176
+ const importPostcssImport = createCachedImport(() => import('./dep-ysrvncjo.js').then(function (n) { return n.i; }));
32177
+ const importPostcssModules = createCachedImport(() => import('./dep-g9b13IRr.js').then(function (n) { return n.i; }));
32178
32178
  const importPostcss = createCachedImport(() => import('postcss'));
32179
32179
  const preprocessorWorkerControllerCache = new WeakMap();
32180
32180
  let alwaysFakeWorkerWorkerControllerCache;
@@ -63491,6 +63491,10 @@ function transformMiddleware(server) {
63491
63491
  if (publicDirInRoot && url.startsWith(publicPath)) {
63492
63492
  warnAboutExplicitPublicPathInUrl(url);
63493
63493
  }
63494
+ if ((rawRE.test(url) || urlRE.test(url)) &&
63495
+ !ensureServingAccess(url, server, res, next)) {
63496
+ return;
63497
+ }
63494
63498
  if (isJSRequest(url) ||
63495
63499
  isImportRequest(url) ||
63496
63500
  isCSSRequest(url) ||
@@ -67327,7 +67331,7 @@ function escapeId(id) {
67327
67331
  return id.replace(backSlashRegEx, '\\\\').replace(quoteNewlineRegEx, '\\$1');
67328
67332
  }
67329
67333
  const getResolveUrl = (path, URL = 'URL') => `new ${URL}(${path}).href`;
67330
- const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${escapeId(relativePath)}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.src || document.baseURI`);
67334
+ const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${escapeId(relativePath)}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`);
67331
67335
  const getFileUrlFromFullPath = (path) => `require('u' + 'rl').pathToFileURL(${path}).href`;
67332
67336
  const getFileUrlFromRelativePath = (path) => getFileUrlFromFullPath(`__dirname + '/${escapeId(path)}'`);
67333
67337
  const relativeUrlMechanisms = {
@@ -1,4 +1,4 @@
1
- import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-k5wXcrSr.js';
1
+ import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-Ootdsuvy.js';
2
2
  import require$$0__default from 'fs';
3
3
  import require$$0 from 'postcss';
4
4
  import require$$0$1 from 'path';
@@ -1,4 +1,4 @@
1
- import { B as getDefaultExportFromCjs } from './dep-k5wXcrSr.js';
1
+ import { B as getDefaultExportFromCjs } from './dep-Ootdsuvy.js';
2
2
  import require$$0 from 'path';
3
3
  import require$$0__default from 'fs';
4
4
  import { l as lib } from './dep-8a-6Quh6.js';
package/dist/node/cli.js CHANGED
@@ -2,7 +2,7 @@ import path from 'node:path';
2
2
  import fs from 'node:fs';
3
3
  import { performance } from 'node:perf_hooks';
4
4
  import { EventEmitter } from 'events';
5
- import { A as colors, v as createLogger, r as resolveConfig } from './chunks/dep-k5wXcrSr.js';
5
+ import { A as colors, v as createLogger, r as resolveConfig } from './chunks/dep-Ootdsuvy.js';
6
6
  import { VERSION } from './constants.js';
7
7
  import 'node:fs/promises';
8
8
  import 'node:url';
@@ -757,7 +757,7 @@ cli
757
757
  filterDuplicateOptions(options);
758
758
  // output structure is preserved even after bundling so require()
759
759
  // is ok here
760
- const { createServer } = await import('./chunks/dep-k5wXcrSr.js').then(function (n) { return n.E; });
760
+ const { createServer } = await import('./chunks/dep-Ootdsuvy.js').then(function (n) { return n.E; });
761
761
  try {
762
762
  const server = await createServer({
763
763
  root,
@@ -836,7 +836,7 @@ cli
836
836
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
837
837
  .action(async (root, options) => {
838
838
  filterDuplicateOptions(options);
839
- const { build } = await import('./chunks/dep-k5wXcrSr.js').then(function (n) { return n.F; });
839
+ const { build } = await import('./chunks/dep-Ootdsuvy.js').then(function (n) { return n.F; });
840
840
  const buildOptions = cleanOptions(options);
841
841
  try {
842
842
  await build({
@@ -863,7 +863,7 @@ cli
863
863
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
864
864
  .action(async (root, options) => {
865
865
  filterDuplicateOptions(options);
866
- const { optimizeDeps } = await import('./chunks/dep-k5wXcrSr.js').then(function (n) { return n.D; });
866
+ const { optimizeDeps } = await import('./chunks/dep-Ootdsuvy.js').then(function (n) { return n.D; });
867
867
  try {
868
868
  const config = await resolveConfig({
869
869
  root,
@@ -889,7 +889,7 @@ cli
889
889
  .option('--outDir <dir>', `[string] output directory (default: dist)`)
890
890
  .action(async (root, options) => {
891
891
  filterDuplicateOptions(options);
892
- const { preview } = await import('./chunks/dep-k5wXcrSr.js').then(function (n) { return n.G; });
892
+ const { preview } = await import('./chunks/dep-Ootdsuvy.js').then(function (n) { return n.G; });
893
893
  try {
894
894
  const server = await preview({
895
895
  root,
@@ -1,6 +1,6 @@
1
1
  export { parseAst, parseAstAsync } from 'rollup/parseAst';
2
- import { i as isInNodeModules, a as arraify } from './chunks/dep-k5wXcrSr.js';
3
- export { b as build, g as buildErrorMessage, k as createFilter, v as createLogger, c as createServer, d as defineConfig, h as fetchModule, f as formatPostcssSourceMap, x as isFileServingAllowed, l as loadConfigFromFile, y as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, z as resolveEnvPrefix, q as rollupVersion, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-k5wXcrSr.js';
2
+ import { i as isInNodeModules, a as arraify } from './chunks/dep-Ootdsuvy.js';
3
+ export { b as build, g as buildErrorMessage, k as createFilter, v as createLogger, c as createServer, d as defineConfig, h as fetchModule, f as formatPostcssSourceMap, x as isFileServingAllowed, l as loadConfigFromFile, y as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, z as resolveEnvPrefix, q as rollupVersion, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-Ootdsuvy.js';
4
4
  export { VERSION as version } from './constants.js';
5
5
  export { version as esbuildVersion } from 'esbuild';
6
6
  import { existsSync, readFileSync } from 'node:fs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "5.1.7",
3
+ "version": "5.1.8",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",