vite 4.5.0 → 4.5.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.

Potentially problematic release.


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

@@ -38994,8 +38994,8 @@ function createCachedImport(imp) {
38994
38994
  return cached;
38995
38995
  };
38996
38996
  }
38997
- const importPostcssImport = createCachedImport(() => import('./dep-e4a495ce.js').then(function (n) { return n.i; }));
38998
- const importPostcssModules = createCachedImport(() => import('./dep-98d4beff.js').then(function (n) { return n.i; }));
38997
+ const importPostcssImport = createCachedImport(() => import('./dep-6e48fc1c.js').then(function (n) { return n.i; }));
38998
+ const importPostcssModules = createCachedImport(() => import('./dep-b0b3f1e6.js').then(function (n) { return n.i; }));
38999
38999
  const importPostcss = createCachedImport(() => import('postcss'));
39000
39000
  /**
39001
39001
  * @experimental
@@ -64568,7 +64568,6 @@ const processNodeUrl = (attr, sourceCodeLocation, s, config, htmlPath, originalU
64568
64568
  const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl }) => {
64569
64569
  const { config, moduleGraph, watcher } = server;
64570
64570
  const base = config.base || '/';
64571
- htmlPath = decodeURI(htmlPath);
64572
64571
  let proxyModulePath;
64573
64572
  let proxyModuleUrl;
64574
64573
  const trailingSlash = htmlPath.endsWith('/');
@@ -64588,7 +64587,9 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl
64588
64587
  }
64589
64588
  const s = new MagicString(html);
64590
64589
  let inlineModuleIndex = -1;
64591
- const proxyCacheUrl = cleanUrl(proxyModulePath).replace(normalizePath$3(config.root), '');
64590
+ // The key to the proxyHtml cache is decoded, as it will be compared
64591
+ // against decoded URLs by the HTML plugins.
64592
+ const proxyCacheUrl = decodeURI(cleanUrl(proxyModulePath).replace(normalizePath$3(config.root), ''));
64592
64593
  const styleUrl = [];
64593
64594
  const addInlineModule = (node, ext) => {
64594
64595
  inlineModuleIndex++;
@@ -64711,7 +64712,13 @@ function indexHtmlMiddleware(server) {
64711
64712
  function preTransformRequest(server, url, base) {
64712
64713
  if (!server.config.server.preTransformRequests)
64713
64714
  return;
64714
- url = unwrapId(stripBase(url, base));
64715
+ try {
64716
+ url = unwrapId(stripBase(decodeURI(url), base));
64717
+ }
64718
+ catch {
64719
+ // ignore
64720
+ return;
64721
+ }
64715
64722
  // transform all url as non-ssr as html includes client-side assets only
64716
64723
  server.transformRequest(url).catch((e) => {
64717
64724
  if (e?.code === ERR_OUTDATED_OPTIMIZED_DEP ||
@@ -65174,7 +65181,10 @@ async function _createServer(inlineConfig = {}, options) {
65174
65181
  _importGlobMap: new Map(),
65175
65182
  _forceOptimizeOnRestart: false,
65176
65183
  _pendingRequests: new Map(),
65177
- _fsDenyGlob: picomatch$4(config.server.fs.deny, { matchBase: true }),
65184
+ _fsDenyGlob: picomatch$4(config.server.fs.deny, {
65185
+ matchBase: true,
65186
+ nocase: true,
65187
+ }),
65178
65188
  _shortcutsOptions: undefined,
65179
65189
  };
65180
65190
  server.transformIndexHtml = createDevHtmlTransformFn(server);
@@ -1,4 +1,4 @@
1
- import { E as getDefaultExportFromCjs } from './dep-bb8a8339.js';
1
+ import { E as getDefaultExportFromCjs } from './dep-52909643.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';
@@ -1,4 +1,4 @@
1
- import { F as commonjsGlobal, E as getDefaultExportFromCjs } from './dep-bb8a8339.js';
1
+ import { F as commonjsGlobal, E as getDefaultExportFromCjs } from './dep-52909643.js';
2
2
  import require$$0__default 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 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-bb8a8339.js';
5
+ import { C as colors, D as bindShortcuts, x as createLogger, h as resolveConfig } from './chunks/dep-52909643.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-bb8a8339.js').then(function (n) { return n.I; });
761
+ const { createServer } = await import('./chunks/dep-52909643.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-bb8a8339.js').then(function (n) { return n.H; });
839
+ const { build } = await import('./chunks/dep-52909643.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-bb8a8339.js').then(function (n) { return n.G; });
867
+ const { optimizeDeps } = await import('./chunks/dep-52909643.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-bb8a8339.js').then(function (n) { return n.J; });
894
+ const { preview } = await import('./chunks/dep-52909643.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-bb8a8339.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-bb8a8339.js';
1
+ import { i as isInNodeModules } from './chunks/dep-52909643.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-52909643.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.0",
3
+ "version": "4.5.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",