vite 4.5.3 → 4.5.5

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,4 +1,4 @@
1
- import { F as commonjsGlobal, E as getDefaultExportFromCjs } from './dep-41cf5ffd.js';
1
+ import { F as commonjsGlobal, E as getDefaultExportFromCjs } from './dep-b2890f90.js';
2
2
  import require$$0__default from 'fs';
3
3
  import require$$0 from 'postcss';
4
4
  import require$$0$1 from 'path';
@@ -38994,8 +38994,8 @@ function createCachedImport(imp) {
38994
38994
  return cached;
38995
38995
  };
38996
38996
  }
38997
- const importPostcssImport = createCachedImport(() => import('./dep-8bc5a3be.js').then(function (n) { return n.i; }));
38998
- const importPostcssModules = createCachedImport(() => import('./dep-8cb95ace.js').then(function (n) { return n.i; }));
38997
+ const importPostcssImport = createCachedImport(() => import('./dep-cce3c9dc.js').then(function (n) { return n.i; }));
38998
+ const importPostcssModules = createCachedImport(() => import('./dep-630a47a3.js').then(function (n) { return n.i; }));
38999
38999
  const importPostcss = createCachedImport(() => import('postcss'));
39000
39000
  /**
39001
39001
  * @experimental
@@ -48376,7 +48376,7 @@ function escapeId(id) {
48376
48376
  return id.replace(backSlashRegEx, '\\\\').replace(quoteNewlineRegEx, '\\$1');
48377
48377
  }
48378
48378
  const getResolveUrl = (path, URL = 'URL') => `new ${URL}(${path}).href`;
48379
- const getRelativeUrlFromDocument = (relativePath, umd = false) => getResolveUrl(`'${escapeId(relativePath)}', ${umd ? `typeof document === 'undefined' ? location.href : ` : ''}document.currentScript && document.currentScript.src || document.baseURI`);
48379
+ 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`);
48380
48380
  const getFileUrlFromFullPath = (path) => `require('u' + 'rl').pathToFileURL(${path}).href`;
48381
48381
  const getFileUrlFromRelativePath = (path) => getFileUrlFromFullPath(`__dirname + '/${path}'`);
48382
48382
  const relativeUrlMechanisms = {
@@ -64401,6 +64401,10 @@ function transformMiddleware(server) {
64401
64401
  logger.warn(colors$1.yellow(warning));
64402
64402
  }
64403
64403
  }
64404
+ if ((rawRE.test(url) || urlRE.test(url)) &&
64405
+ !ensureServingAccess(url, server, res, next)) {
64406
+ return;
64407
+ }
64404
64408
  if (isJSRequest(url) ||
64405
64409
  isImportRequest(url) ||
64406
64410
  isCSSRequest(url) ||
@@ -1,4 +1,4 @@
1
- import { E as getDefaultExportFromCjs } from './dep-41cf5ffd.js';
1
+ import { E as getDefaultExportFromCjs } from './dep-b2890f90.js';
2
2
  import require$$0 from 'path';
3
3
  import require$$0__default from 'fs';
4
4
  import { l as lib } from './dep-c423598f.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 { C as colors, D as bindShortcuts, x as createLogger, h as resolveConfig } from './chunks/dep-41cf5ffd.js';
5
+ import { C as colors, D as bindShortcuts, x as createLogger, h as resolveConfig } from './chunks/dep-b2890f90.js';
6
6
  import { VERSION } from './constants.js';
7
7
  import 'node:fs/promises';
8
8
  import 'node:url';
@@ -758,7 +758,7 @@ cli
758
758
  filterDuplicateOptions(options);
759
759
  // output structure is preserved even after bundling so require()
760
760
  // is ok here
761
- const { createServer } = await import('./chunks/dep-41cf5ffd.js').then(function (n) { return n.I; });
761
+ const { createServer } = await import('./chunks/dep-b2890f90.js').then(function (n) { return n.I; });
762
762
  try {
763
763
  const server = await createServer({
764
764
  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-41cf5ffd.js').then(function (n) { return n.H; });
839
+ const { build } = await import('./chunks/dep-b2890f90.js').then(function (n) { return n.H; });
840
840
  const buildOptions = cleanOptions(options);
841
841
  try {
842
842
  await build({
@@ -864,7 +864,7 @@ cli
864
864
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
865
865
  .action(async (root, options) => {
866
866
  filterDuplicateOptions(options);
867
- const { optimizeDeps } = await import('./chunks/dep-41cf5ffd.js').then(function (n) { return n.G; });
867
+ const { optimizeDeps } = await import('./chunks/dep-b2890f90.js').then(function (n) { return n.G; });
868
868
  try {
869
869
  const config = await resolveConfig({
870
870
  root,
@@ -891,7 +891,7 @@ cli
891
891
  .option('--outDir <dir>', `[string] output directory (default: dist)`)
892
892
  .action(async (root, options) => {
893
893
  filterDuplicateOptions(options);
894
- const { preview } = await import('./chunks/dep-41cf5ffd.js').then(function (n) { return n.J; });
894
+ const { preview } = await import('./chunks/dep-b2890f90.js').then(function (n) { return n.J; });
895
895
  try {
896
896
  const server = await preview({
897
897
  root,
@@ -1,5 +1,5 @@
1
- import { i as isInNodeModules } from './chunks/dep-41cf5ffd.js';
2
- export { b as build, e as buildErrorMessage, v as createFilter, x as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, k as getDepOptimizationConfig, m as isDepsOptimizerEnabled, z as isFileServingAllowed, l as loadConfigFromFile, A as loadEnv, u as mergeAlias, q as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, j as resolveBaseUrl, h as resolveConfig, B as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, y as searchForWorkspaceRoot, w as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-41cf5ffd.js';
1
+ import { i as isInNodeModules } from './chunks/dep-b2890f90.js';
2
+ export { b as build, e as buildErrorMessage, v as createFilter, x as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, k as getDepOptimizationConfig, m as isDepsOptimizerEnabled, z as isFileServingAllowed, l as loadConfigFromFile, A as loadEnv, u as mergeAlias, q as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, j as resolveBaseUrl, h as resolveConfig, B as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, y as searchForWorkspaceRoot, w as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-b2890f90.js';
3
3
  export { VERSION as version } from './constants.js';
4
4
  export { version as esbuildVersion } from 'esbuild';
5
5
  export { VERSION as rollupVersion } from 'rollup';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "4.5.3",
3
+ "version": "4.5.5",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",