vite 7.0.0 → 7.0.1

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,5 +1,5 @@
1
1
  import { createRequire as ___createRequire } from 'module'; const require = ___createRequire(import.meta.url);
2
- import { addManuallyIncludedOptimizeDeps, addOptimizedDepInfo, cleanupDepsCacheStaleDirs, createIsOptimizedDepFile, createIsOptimizedDepUrl, depsFromOptimizedDepInfo, depsLogString, discoverProjectDependencies, extractExportsData, getDepsCacheDir, getOptimizedDepPath, initDepsOptimizerMetadata, isDepOptimizationDisabled, loadCachedDepOptimizationMetadata, optimizeDeps, optimizeExplicitEnvironmentDeps, optimizedDepInfoFromFile, optimizedDepInfoFromId, optimizedDepNeedsInterop, runOptimizeDeps, toDiscoveredDependencies } from "./dep-Bsx9IwL8.js";
2
+ import { addManuallyIncludedOptimizeDeps, addOptimizedDepInfo, cleanupDepsCacheStaleDirs, createIsOptimizedDepFile, createIsOptimizedDepUrl, depsFromOptimizedDepInfo, depsLogString, discoverProjectDependencies, extractExportsData, getDepsCacheDir, getOptimizedDepPath, initDepsOptimizerMetadata, isDepOptimizationDisabled, loadCachedDepOptimizationMetadata, optimizeDeps, optimizeExplicitEnvironmentDeps, optimizedDepInfoFromFile, optimizedDepInfoFromId, optimizedDepNeedsInterop, runOptimizeDeps, toDiscoveredDependencies } from "./dep-DJGyAxkV.js";
3
3
  import "./dep-Ctugieod.js";
4
4
 
5
5
  export { optimizeDeps };
package/dist/node/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { createRequire as ___createRequire } from 'module'; const require = ___createRequire(import.meta.url);
2
2
  import { __toESM } from "./chunks/dep-Drtntmtt.js";
3
- import { createLogger, require_picocolors, resolveConfig } from "./chunks/dep-Bsx9IwL8.js";
3
+ import { createLogger, require_picocolors, resolveConfig } from "./chunks/dep-DJGyAxkV.js";
4
4
  import { VERSION } from "./chunks/dep-Ctugieod.js";
5
5
  import fs from "node:fs";
6
6
  import path from "node:path";
@@ -568,7 +568,7 @@ const convertBase = (v) => {
568
568
  cli.option("-c, --config <file>", `[string] use specified config file`).option("--base <path>", `[string] public base path (default: /)`, { type: [convertBase] }).option("-l, --logLevel <level>", `[string] info | warn | error | silent`).option("--clearScreen", `[boolean] allow/disable clear screen when logging`).option("--configLoader <loader>", `[string] use 'bundle' to bundle the config with esbuild, or 'runner' (experimental) to process it on the fly, or 'native' (experimental) to load using the native runtime (default: bundle)`).option("-d, --debug [feat]", `[string | boolean] show debug logs`).option("-f, --filter <filter>", `[string] filter debug logs`).option("-m, --mode <mode>", `[string] set env mode`);
569
569
  cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--host [host]", `[string] specify hostname`, { type: [convertHost] }).option("--port <port>", `[number] specify port`).option("--open [path]", `[boolean | string] open browser on startup`).option("--cors", `[boolean] enable CORS`).option("--strictPort", `[boolean] exit if specified port is already in use`).option("--force", `[boolean] force the optimizer to ignore the cache and re-bundle`).action(async (root, options) => {
570
570
  filterDuplicateOptions(options);
571
- const { createServer } = await import("./chunks/dep-DnkJBLYF.js");
571
+ const { createServer } = await import("./chunks/dep-BVsfzsUS.js");
572
572
  try {
573
573
  const server = await createServer({
574
574
  root,
@@ -624,7 +624,7 @@ cli.command("[root]", "start dev server").alias("serve").alias("dev").option("--
624
624
  });
625
625
  cli.command("build [root]", "build for production").option("--target <target>", `[string] transpile target (default: 'baseline-widely-available')`).option("--outDir <dir>", `[string] output directory (default: dist)`).option("--assetsDir <dir>", `[string] directory under outDir to place assets in (default: assets)`).option("--assetsInlineLimit <number>", `[number] static asset base64 inline threshold in bytes (default: 4096)`).option("--ssr [entry]", `[string] build specified entry for server-side rendering`).option("--sourcemap [output]", `[boolean | "inline" | "hidden"] output source maps for build (default: false)`).option("--minify [minifier]", "[boolean | \"terser\" | \"esbuild\"] enable/disable minification, or specify minifier to use (default: esbuild)").option("--manifest [name]", `[boolean | string] emit build manifest json`).option("--ssrManifest [name]", `[boolean | string] emit ssr manifest json`).option("--emptyOutDir", `[boolean] force empty outDir when it's outside of root`).option("-w, --watch", `[boolean] rebuilds when modules have changed on disk`).option("--app", `[boolean] same as \`builder: {}\``).action(async (root, options) => {
626
626
  filterDuplicateOptions(options);
627
- const { createBuilder } = await import("./chunks/dep-pyXEOwQv.js");
627
+ const { createBuilder } = await import("./chunks/dep-BTLup-s1.js");
628
628
  const buildOptions = cleanGlobalCLIOptions(cleanBuilderCLIOptions(options));
629
629
  try {
630
630
  const inlineConfig = {
@@ -649,7 +649,7 @@ cli.command("build [root]", "build for production").option("--target <target>",
649
649
  });
650
650
  cli.command("optimize [root]", "pre-bundle dependencies (deprecated, the pre-bundle process runs automatically and does not need to be called)").option("--force", `[boolean] force the optimizer to ignore the cache and re-bundle`).action(async (root, options) => {
651
651
  filterDuplicateOptions(options);
652
- const { optimizeDeps } = await import("./chunks/dep-BrEuKyO0.js");
652
+ const { optimizeDeps } = await import("./chunks/dep-fMAWSKNW.js");
653
653
  try {
654
654
  const config = await resolveConfig({
655
655
  root,
@@ -667,7 +667,7 @@ cli.command("optimize [root]", "pre-bundle dependencies (deprecated, the pre-bun
667
667
  });
668
668
  cli.command("preview [root]", "locally preview production build").option("--host [host]", `[string] specify hostname`, { type: [convertHost] }).option("--port <port>", `[number] specify port`).option("--strictPort", `[boolean] exit if specified port is already in use`).option("--open [path]", `[boolean | string] open browser on startup`).option("--outDir <dir>", `[string] output directory (default: dist)`).action(async (root, options) => {
669
669
  filterDuplicateOptions(options);
670
- const { preview } = await import("./chunks/dep-BDIuIvL4.js");
670
+ const { preview } = await import("./chunks/dep-BQABeiGC.js");
671
671
  try {
672
672
  const server = await preview({
673
673
  root,
@@ -1,5 +1,5 @@
1
1
  import { createRequire as ___createRequire } from 'module'; const require = ___createRequire(import.meta.url);
2
- import { BuildEnvironment, DevEnvironment, build, buildErrorMessage, createBuilder, createFilter, createIdResolver, createLogger, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defineConfig, fetchModule, formatPostcssSourceMap, isCSSRequest, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, normalizePath, optimizeDeps, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, ssrTransform, transformWithEsbuild } from "./chunks/dep-Bsx9IwL8.js";
2
+ import { BuildEnvironment, DevEnvironment, build, buildErrorMessage, createBuilder, createFilter, createIdResolver, createLogger, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defineConfig, fetchModule, formatPostcssSourceMap, isCSSRequest, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, normalizePath, optimizeDeps, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, ssrTransform, transformWithEsbuild } from "./chunks/dep-DJGyAxkV.js";
3
3
  import { DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, VERSION, defaultAllowedOrigins } from "./chunks/dep-Ctugieod.js";
4
4
  import { parseAst, parseAstAsync } from "rollup/parseAst";
5
5
  import { version as esbuildVersion } from "esbuild";
@@ -101,7 +101,7 @@ function toWindowsPath(path) {
101
101
  return path.replace(/\//g, "\\");
102
102
  }
103
103
  const comma = 44, semicolon = 59, chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", intToChar = new Uint8Array(64), charToInt = new Uint8Array(128);
104
- for (let i = 0; i < chars.length; i++) {
104
+ for (let i = 0; i < 64; i++) {
105
105
  let c = chars.charCodeAt(i);
106
106
  intToChar[i] = c, charToInt[c] = i;
107
107
  }
@@ -162,24 +162,7 @@ function sort(line) {
162
162
  function sortComparator(a, b) {
163
163
  return a[0] - b[0];
164
164
  }
165
- const COLUMN = 0, SOURCES_INDEX = 1, SOURCE_LINE = 2, SOURCE_COLUMN = 3, NAMES_INDEX = 4;
166
- let found = !1;
167
- /**
168
- * A binary search implementation that returns the index if a match is found.
169
- * If no match is found, then the left-index (the index associated with the item that comes just
170
- * before the desired index) is returned. To maintain proper sort order, a splice would happen at
171
- * the next index:
172
- *
173
- * ```js
174
- * const array = [1, 3];
175
- * const needle = 2;
176
- * const index = binarySearch(array, needle, (item, needle) => item - needle);
177
- *
178
- * assert.equal(index, 0);
179
- * array.splice(index + 1, 0, needle);
180
- * assert.deepEqual(array, [1, 2, 3]);
181
- * ```
182
- */
165
+ var COLUMN = 0, SOURCES_INDEX = 1, SOURCE_LINE = 2, SOURCE_COLUMN = 3, NAMES_INDEX = 4, found = !1;
183
166
  function binarySearch(haystack, needle, low, high) {
184
167
  for (; low <= high;) {
185
168
  let mid = low + (high - low >> 1), cmp = haystack[mid][COLUMN] - needle;
@@ -196,10 +179,6 @@ function lowerBound(haystack, needle, index) {
196
179
  for (let i = index - 1; i >= 0 && haystack[i][COLUMN] === needle; index = i--);
197
180
  return index;
198
181
  }
199
- /**
200
- * This overly complicated beast is just to record the last tested line/column and the resulting
201
- * index, allowing us to skip a few tests if mappings are monotonically increasing.
202
- */
203
182
  function memoizedBinarySearch(haystack, needle, state, key) {
204
183
  let { lastKey, lastNeedle, lastIndex } = state, low = 0, high = haystack.length - 1;
205
184
  if (key === lastKey) {
@@ -208,26 +187,14 @@ function memoizedBinarySearch(haystack, needle, state, key) {
208
187
  }
209
188
  return state.lastKey = key, state.lastNeedle = needle, state.lastIndex = binarySearch(haystack, needle, low, high);
210
189
  }
211
- const LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)", COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)", LEAST_UPPER_BOUND = -1, GREATEST_LOWER_BOUND = 1;
212
- /**
213
- * Typescript doesn't allow friend access to private fields, so this just casts the map into a type
214
- * with public access modifiers.
215
- */
190
+ var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)", COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)", LEAST_UPPER_BOUND = -1, GREATEST_LOWER_BOUND = 1;
216
191
  function cast(map) {
217
192
  return map;
218
193
  }
219
- /**
220
- * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
221
- */
222
194
  function decodedMappings(map) {
223
195
  var _a;
224
196
  return (_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded));
225
197
  }
226
- /**
227
- * A higher-level API to find the source/line/column associated with a generated line/column
228
- * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
229
- * `source-map` library.
230
- */
231
198
  function originalPositionFor(map, needle) {
232
199
  let { line, column, bias } = needle;
233
200
  if (line--, line < 0) throw Error(LINE_GTR_ZERO);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite",
3
- "version": "7.0.0",
3
+ "version": "7.0.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Evan You",
@@ -80,8 +80,8 @@
80
80
  },
81
81
  "devDependencies": {
82
82
  "@ampproject/remapping": "^2.3.0",
83
- "@babel/parser": "^7.27.5",
84
- "@jridgewell/trace-mapping": "^0.3.25",
83
+ "@babel/parser": "^7.27.7",
84
+ "@jridgewell/trace-mapping": "^0.3.26",
85
85
  "@oxc-project/runtime": "^0.70.0",
86
86
  "@oxc-project/types": "^0.70.0",
87
87
  "@polka/compression": "^1.0.0-next.25",
@@ -101,7 +101,7 @@
101
101
  "cross-spawn": "^7.0.6",
102
102
  "debug": "^4.4.1",
103
103
  "dep-types": "link:./src/types",
104
- "dotenv": "^16.5.0",
104
+ "dotenv": "^16.6.1",
105
105
  "dotenv-expand": "^12.0.2",
106
106
  "es-module-lexer": "^1.7.0",
107
107
  "escape-html": "^1.0.3",
@@ -125,8 +125,8 @@
125
125
  "postcss-modules": "^6.0.1",
126
126
  "premove": "^4.0.0",
127
127
  "resolve.exports": "^2.0.3",
128
- "rolldown": "^1.0.0-beta.19",
129
- "rolldown-plugin-dts": "^0.13.12",
128
+ "rolldown": "^1.0.0-beta.21",
129
+ "rolldown-plugin-dts": "^0.13.13",
130
130
  "rollup-plugin-license": "^3.6.0",
131
131
  "sass": "^1.89.2",
132
132
  "sass-embedded": "^1.89.2",
@@ -136,7 +136,7 @@
136
136
  "tsconfck": "^3.1.6",
137
137
  "types": "link:./types",
138
138
  "ufo": "^1.6.1",
139
- "ws": "^8.18.2"
139
+ "ws": "^8.18.3"
140
140
  },
141
141
  "peerDependencies": {
142
142
  "@types/node": "^20.19.0 || >=22.12.0",
@@ -36,6 +36,16 @@ export interface ImportGlobOptions<
36
36
 
37
37
  export type GeneralImportGlobOptions = ImportGlobOptions<boolean, string>
38
38
 
39
+ /**
40
+ * Declare Worker in case DOM is not added to the tsconfig lib causing
41
+ * Worker interface is not defined. For developers with DOM lib added,
42
+ * the Worker interface will be merged correctly.
43
+ */
44
+ declare global {
45
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
46
+ interface Worker {}
47
+ }
48
+
39
49
  export interface KnownAsTypeMap {
40
50
  raw: string
41
51
  url: string