vite 5.2.6 → 5.2.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.
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-BBHrJRja.js';
5
+ import { A as colors, v as createLogger, r as resolveConfig } from './chunks/dep-whKeNLxG.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-BBHrJRja.js').then(function (n) { return n.E; });
760
+ const { createServer } = await import('./chunks/dep-whKeNLxG.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-BBHrJRja.js').then(function (n) { return n.F; });
839
+ const { build } = await import('./chunks/dep-whKeNLxG.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-BBHrJRja.js').then(function (n) { return n.D; });
866
+ const { optimizeDeps } = await import('./chunks/dep-whKeNLxG.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-BBHrJRja.js').then(function (n) { return n.G; });
892
+ const { preview } = await import('./chunks/dep-whKeNLxG.js').then(function (n) { return n.G; });
893
893
  try {
894
894
  const server = await preview({
895
895
  root,
@@ -847,6 +847,7 @@ declare class ModuleGraph {
847
847
  getModuleById(id: string): ModuleNode | undefined;
848
848
  getModulesByFile(file: string): Set<ModuleNode> | undefined;
849
849
  onFileChange(file: string): void;
850
+ onFileDelete(file: string): void;
850
851
  invalidateModule(mod: ModuleNode, seen?: Set<ModuleNode>, timestamp?: number, isHmr?: boolean,
851
852
  ): void;
852
853
  invalidateAll(): void;
@@ -3431,14 +3432,23 @@ declare function fetchModule(server: ViteDevServer, url: string, importer?: stri
3431
3432
  declare const VERSION: string;
3432
3433
 
3433
3434
  declare const isCSSRequest: (request: string) => boolean;
3435
+ /**
3436
+ * @deprecated use build.rollupOutput.manualChunks or framework specific configuration
3437
+ */
3434
3438
  declare class SplitVendorChunkCache {
3435
3439
  cache: Map<string, boolean>;
3436
3440
  constructor();
3437
3441
  reset(): void;
3438
3442
  }
3443
+ /**
3444
+ * @deprecated use build.rollupOutput.manualChunks or framework specific configuration
3445
+ */
3439
3446
  declare function splitVendorChunk(options?: {
3440
3447
  cache?: SplitVendorChunkCache;
3441
3448
  }): GetManualChunk;
3449
+ /**
3450
+ * @deprecated use build.rollupOutput.manualChunks or framework specific configuration
3451
+ */
3442
3452
  declare function splitVendorChunkPlugin(): Plugin;
3443
3453
 
3444
3454
  /**
@@ -1,6 +1,6 @@
1
1
  export { parseAst, parseAstAsync } from 'rollup/parseAst';
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';
2
+ import { i as isInNodeModules, a as arraify } from './chunks/dep-whKeNLxG.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-whKeNLxG.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';
@@ -57,6 +57,9 @@ const isCSSRequest = (request) => CSS_LANGS_RE.test(request);
57
57
  // working well for their setups.
58
58
  // The cache needs to be reset on buildStart for watch mode to work correctly
59
59
  // Don't use this manualChunks strategy for ssr, lib mode, and 'umd' or 'iife'
60
+ /**
61
+ * @deprecated use build.rollupOutput.manualChunks or framework specific configuration
62
+ */
60
63
  class SplitVendorChunkCache {
61
64
  cache;
62
65
  constructor() {
@@ -66,6 +69,9 @@ class SplitVendorChunkCache {
66
69
  this.cache = new Map();
67
70
  }
68
71
  }
72
+ /**
73
+ * @deprecated use build.rollupOutput.manualChunks or framework specific configuration
74
+ */
69
75
  function splitVendorChunk(options = {}) {
70
76
  const cache = options.cache ?? new SplitVendorChunkCache();
71
77
  return (id, { getModuleInfo }) => {
@@ -98,6 +104,9 @@ function staticImportedByEntry(id, getModuleInfo, cache, importStack = []) {
98
104
  cache.set(id, someImporterIs);
99
105
  return someImporterIs;
100
106
  }
107
+ /**
108
+ * @deprecated use build.rollupOutput.manualChunks or framework specific configuration
109
+ */
101
110
  function splitVendorChunkPlugin() {
102
111
  const caches = [];
103
112
  function createSplitVendorChunk(output, config) {
@@ -3593,6 +3593,9 @@ const isCSSRequest = (request) => CSS_LANGS_RE.test(request);
3593
3593
  // working well for their setups.
3594
3594
  // The cache needs to be reset on buildStart for watch mode to work correctly
3595
3595
  // Don't use this manualChunks strategy for ssr, lib mode, and 'umd' or 'iife'
3596
+ /**
3597
+ * @deprecated use build.rollupOutput.manualChunks or framework specific configuration
3598
+ */
3596
3599
  class SplitVendorChunkCache {
3597
3600
  cache;
3598
3601
  constructor() {
@@ -3602,6 +3605,9 @@ class SplitVendorChunkCache {
3602
3605
  this.cache = new Map();
3603
3606
  }
3604
3607
  }
3608
+ /**
3609
+ * @deprecated use build.rollupOutput.manualChunks or framework specific configuration
3610
+ */
3605
3611
  function splitVendorChunk(options = {}) {
3606
3612
  const cache = options.cache ?? new SplitVendorChunkCache();
3607
3613
  return (id, { getModuleInfo }) => {
@@ -3634,6 +3640,9 @@ function staticImportedByEntry(id, getModuleInfo, cache, importStack = []) {
3634
3640
  cache.set(id, someImporterIs);
3635
3641
  return someImporterIs;
3636
3642
  }
3643
+ /**
3644
+ * @deprecated use build.rollupOutput.manualChunks or framework specific configuration
3645
+ */
3637
3646
  function splitVendorChunkPlugin() {
3638
3647
  const caches = [];
3639
3648
  function createSplitVendorChunk(output, config) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "5.2.6",
3
+ "version": "5.2.8",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -73,7 +73,7 @@
73
73
  "//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
74
74
  "dependencies": {
75
75
  "esbuild": "^0.20.1",
76
- "postcss": "^8.4.36",
76
+ "postcss": "^8.4.38",
77
77
  "rollup": "^4.13.0"
78
78
  },
79
79
  "optionalDependencies": {
@@ -81,7 +81,7 @@
81
81
  },
82
82
  "devDependencies": {
83
83
  "@ampproject/remapping": "^2.3.0",
84
- "@babel/parser": "^7.24.0",
84
+ "@babel/parser": "^7.24.1",
85
85
  "@jridgewell/trace-mapping": "^0.3.25",
86
86
  "@polka/compression": "^1.0.0-next.25",
87
87
  "@rollup/plugin-alias": "^5.1.0",
@@ -106,7 +106,7 @@
106
106
  "dep-types": "link:./src/types",
107
107
  "dotenv": "^16.4.5",
108
108
  "dotenv-expand": "^11.0.6",
109
- "es-module-lexer": "^1.4.1",
109
+ "es-module-lexer": "^1.5.0",
110
110
  "escape-html": "^1.0.3",
111
111
  "estree-walker": "^3.0.3",
112
112
  "etag": "^1.8.1",
@@ -124,21 +124,22 @@
124
124
  "periscopic": "^4.0.2",
125
125
  "picocolors": "^1.0.0",
126
126
  "picomatch": "^2.3.1",
127
- "postcss-import": "^16.0.1",
127
+ "postcss-import": "^16.1.0",
128
128
  "postcss-load-config": "^4.0.2",
129
129
  "postcss-modules": "^6.0.0",
130
130
  "resolve.exports": "^2.0.2",
131
131
  "rollup-plugin-dts": "^6.1.0",
132
132
  "rollup-plugin-esbuild": "^6.1.1",
133
133
  "rollup-plugin-license": "^3.3.1",
134
+ "sass": "^1.72.0",
134
135
  "sirv": "^2.0.4",
135
136
  "source-map-support": "^0.5.21",
136
137
  "strip-ansi": "^7.1.0",
137
- "strip-literal": "^2.0.0",
138
+ "strip-literal": "^2.1.0",
138
139
  "tsconfck": "^3.0.3",
139
140
  "tslib": "^2.6.2",
140
141
  "types": "link:./types",
141
- "ufo": "^1.5.1",
142
+ "ufo": "^1.5.3",
142
143
  "ws": "^8.16.0"
143
144
  },
144
145
  "peerDependencies": {