vite 5.2.4 → 5.2.6

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.
@@ -32293,8 +32293,8 @@ function createCachedImport(imp) {
32293
32293
  return cached;
32294
32294
  };
32295
32295
  }
32296
- const importPostcssImport = createCachedImport(() => import('./dep-dbS6PJl1.js').then(function (n) { return n.i; }));
32297
- const importPostcssModules = createCachedImport(() => import('./dep-BdASg7BL.js').then(function (n) { return n.i; }));
32296
+ const importPostcssImport = createCachedImport(() => import('./dep-yOtoFZYM.js').then(function (n) { return n.i; }));
32297
+ const importPostcssModules = createCachedImport(() => import('./dep-Cb3N489L.js').then(function (n) { return n.i; }));
32298
32298
  const importPostcss = createCachedImport(() => import('postcss'));
32299
32299
  const preprocessorWorkerControllerCache = new WeakMap();
32300
32300
  let alwaysFakeWorkerWorkerControllerCache;
@@ -53737,9 +53737,14 @@ async function doTransform(url, server, options, timestamp) {
53737
53737
  return cached;
53738
53738
  }
53739
53739
  const result = loadAndTransform(id, url, server, options, timestamp, module, resolved);
53740
- const depsOptimizer = getDepsOptimizer(config, ssr);
53741
- if (!depsOptimizer?.isOptimizedDepFile(id)) {
53742
- server._registerRequestProcessing(id, () => result);
53740
+ if (!ssr) {
53741
+ // Only register client requests, server.waitForRequestsIdle should
53742
+ // have been called server.waitForClientRequestsIdle. We can rename
53743
+ // it as part of the environment API work
53744
+ const depsOptimizer = getDepsOptimizer(config, ssr);
53745
+ if (!depsOptimizer?.isOptimizedDepFile(id)) {
53746
+ server._registerRequestProcessing(id, () => result);
53747
+ }
53743
53748
  }
53744
53749
  return result;
53745
53750
  }
@@ -64696,9 +64701,14 @@ async function _createServer(inlineConfig = {}, options) {
64696
64701
  _importGlobMap: new Map(),
64697
64702
  _forceOptimizeOnRestart: false,
64698
64703
  _pendingRequests: new Map(),
64699
- _fsDenyGlob: picomatch$4(config.server.fs.deny, {
64700
- matchBase: true,
64704
+ _fsDenyGlob: picomatch$4(
64705
+ // matchBase: true does not work as it's documented
64706
+ // https://github.com/micromatch/picomatch/issues/89
64707
+ // convert patterns without `/` on our side for now
64708
+ config.server.fs.deny.map((pattern) => pattern.includes('/') ? pattern : `**/${pattern}`), {
64709
+ matchBase: false,
64701
64710
  nocase: true,
64711
+ dot: true,
64702
64712
  }),
64703
64713
  _shortcutsOptions: undefined,
64704
64714
  };
@@ -1,4 +1,4 @@
1
- import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-DJaaTb_D.js';
1
+ import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-BBHrJRja.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-DJaaTb_D.js';
1
+ import { B as getDefaultExportFromCjs } from './dep-BBHrJRja.js';
2
2
  import require$$0 from 'path';
3
3
  import require$$0__default from 'fs';
4
4
  import { l as lib } from './dep-IQS-Za7F.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-DJaaTb_D.js';
5
+ import { A as colors, v as createLogger, r as resolveConfig } from './chunks/dep-BBHrJRja.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-DJaaTb_D.js').then(function (n) { return n.E; });
760
+ const { createServer } = await import('./chunks/dep-BBHrJRja.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-DJaaTb_D.js').then(function (n) { return n.F; });
839
+ const { build } = await import('./chunks/dep-BBHrJRja.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-DJaaTb_D.js').then(function (n) { return n.D; });
866
+ const { optimizeDeps } = await import('./chunks/dep-BBHrJRja.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-DJaaTb_D.js').then(function (n) { return n.G; });
892
+ const { preview } = await import('./chunks/dep-BBHrJRja.js').then(function (n) { return n.G; });
893
893
  try {
894
894
  const server = await preview({
895
895
  root,
@@ -3003,7 +3003,8 @@ type IndexHtmlTransform = IndexHtmlTransformHook | {
3003
3003
  */
3004
3004
  interface Plugin<A = any> extends rollup.Plugin<A> {
3005
3005
  /**
3006
- * Enforce plugin invocation tier similar to webpack loaders.
3006
+ * Enforce plugin invocation tier similar to webpack loaders. Hooks ordering
3007
+ * is still subject to the `order` property in the hook object.
3007
3008
  *
3008
3009
  * Plugin invocation order:
3009
3010
  * - alias resolution
@@ -1,6 +1,6 @@
1
1
  export { parseAst, parseAstAsync } from 'rollup/parseAst';
2
- import { i as isInNodeModules, a as arraify } from './chunks/dep-DJaaTb_D.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-DJaaTb_D.js';
2
+ import { i as isInNodeModules, a as arraify } from './chunks/dep-BBHrJRja.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-BBHrJRja.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.2.4",
3
+ "version": "5.2.6",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",