vite 8.3.0 → 8.3.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.
- package/LICENSE.md +29 -86
- package/dist/client/bundledDevClient.mjs +75 -333
- package/dist/client/client.mjs +74 -23
- package/dist/node/chunks/build.js +2 -2
- package/dist/node/chunks/lib.js +2 -2
- package/dist/node/chunks/node.js +1157 -738
- package/dist/node/index.d.ts +7 -4
- package/dist/node/module-runner.js +26 -10
- package/package.json +13 -13
package/dist/node/index.d.ts
CHANGED
|
@@ -906,6 +906,7 @@ type ExportsData = {
|
|
|
906
906
|
};
|
|
907
907
|
interface DepsOptimizer {
|
|
908
908
|
init: () => Promise<void>;
|
|
909
|
+
initState: "idle" | "initializing" | "initialized";
|
|
909
910
|
metadata: DepOptimizationMetadata;
|
|
910
911
|
scanProcessing?: Promise<void>;
|
|
911
912
|
registerMissingImport: (id: string, resolved: string) => OptimizedDepInfo;
|
|
@@ -918,8 +919,8 @@ interface DepsOptimizer {
|
|
|
918
919
|
}
|
|
919
920
|
interface DepOptimizationConfig {
|
|
920
921
|
/**
|
|
921
|
-
* Force optimize listed dependencies (must be resolvable import paths
|
|
922
|
-
*
|
|
922
|
+
* Force optimize listed dependencies (must be resolvable import paths).
|
|
923
|
+
* Supports experimental glob patterns for deep imports.
|
|
923
924
|
*/
|
|
924
925
|
include?: string[];
|
|
925
926
|
/**
|
|
@@ -1111,7 +1112,8 @@ declare class MemoryFiles {
|
|
|
1111
1112
|
declare class BundledDev {
|
|
1112
1113
|
private environment;
|
|
1113
1114
|
private _devEngine;
|
|
1114
|
-
|
|
1115
|
+
/** the vite client and the rolldown runtime; set before the first build so `hasBuildOutput` can count them */
|
|
1116
|
+
private staticFiles;
|
|
1115
1117
|
private initialBuildCompleted;
|
|
1116
1118
|
private _closed;
|
|
1117
1119
|
private clients;
|
|
@@ -1143,6 +1145,7 @@ declare class BundledDev {
|
|
|
1143
1145
|
*/
|
|
1144
1146
|
markPayloadDelivered(filename: string): void;
|
|
1145
1147
|
close(): Promise<void>;
|
|
1148
|
+
private storeStaticFiles;
|
|
1146
1149
|
private storeOutputFiles;
|
|
1147
1150
|
private getRolldownOptions;
|
|
1148
1151
|
private handleHmrOutput;
|
|
@@ -3129,7 +3132,7 @@ type ResolveIdFn = (environment: PartialEnvironment, id: string, importer?: stri
|
|
|
3129
3132
|
*/
|
|
3130
3133
|
export declare function createIdResolver(config: ResolvedConfig, options?: Partial<InternalResolveOptions>): ResolveIdFn;
|
|
3131
3134
|
//#endregion
|
|
3132
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.
|
|
3135
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.15_yaml@2.9.0/node_modules/postcss-load-config/src/index.d.ts
|
|
3133
3136
|
type ConfigPlugin = Transformer | PostCSS.Plugin | Processor;
|
|
3134
3137
|
interface Config {
|
|
3135
3138
|
parser?: string | ProcessOptions['parser'] | false;
|
|
@@ -39,20 +39,35 @@ function promiseWithResolvers() {
|
|
|
39
39
|
reject
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
+
const percentEncodedRE = /(?:%[0-9a-f]{2})+/gi, whitespaceOnlyRE = /^\s+$/;
|
|
43
|
+
/** Reverses {@link encodeSourceURL}. */
|
|
44
|
+
function decodeSourceURL(url) {
|
|
45
|
+
return url.replace(percentEncodedRE, (match) => {
|
|
46
|
+
let decoded;
|
|
47
|
+
try {
|
|
48
|
+
decoded = decodeURIComponent(match);
|
|
49
|
+
} catch {
|
|
50
|
+
return match;
|
|
51
|
+
}
|
|
52
|
+
return whitespaceOnlyRE.test(decoded) ? decoded : match;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
42
55
|
//#endregion
|
|
43
|
-
//#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.
|
|
56
|
+
//#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.6.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
44
57
|
var comma = 44, chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", intToChar = /* @__PURE__ */ new Uint8Array(64), charToInt = /* @__PURE__ */ new Uint8Array(128);
|
|
45
58
|
for (let i = 0; i < chars.length; i++) {
|
|
46
59
|
let c = chars.charCodeAt(i);
|
|
47
60
|
intToChar[i] = c, charToInt[c] = i;
|
|
48
61
|
}
|
|
49
|
-
function decodeInteger(reader
|
|
62
|
+
function decodeInteger(reader) {
|
|
50
63
|
let value = 0, shift = 0, integer = 0;
|
|
51
64
|
do
|
|
52
65
|
integer = charToInt[reader.next()], value |= (integer & 31) << shift, shift += 5;
|
|
53
66
|
while (integer & 32);
|
|
54
|
-
|
|
55
|
-
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
function decodeSign(num) {
|
|
70
|
+
return num & 1 ? -2147483648 | -(num >>> 1) : num >>> 1;
|
|
56
71
|
}
|
|
57
72
|
function hasMoreVlq(reader, max) {
|
|
58
73
|
return reader.pos >= max ? !1 : reader.peek() !== comma;
|
|
@@ -78,7 +93,7 @@ function decode(mappings) {
|
|
|
78
93
|
let semi = reader.indexOf(";"), line = [], sorted = !0, lastCol = 0;
|
|
79
94
|
for (genColumn = 0; reader.pos < semi;) {
|
|
80
95
|
let seg;
|
|
81
|
-
genColumn
|
|
96
|
+
genColumn += decodeSign(decodeInteger(reader)), genColumn < lastCol && (sorted = !1), lastCol = genColumn, hasMoreVlq(reader, semi) ? (sourcesIndex += decodeSign(decodeInteger(reader)), sourceLine += decodeSign(decodeInteger(reader)), sourceColumn += decodeSign(decodeInteger(reader)), hasMoreVlq(reader, semi) ? (namesIndex += decodeSign(decodeInteger(reader)), seg = [
|
|
82
97
|
genColumn,
|
|
83
98
|
sourcesIndex,
|
|
84
99
|
sourceLine,
|
|
@@ -176,7 +191,7 @@ const resolve = function(...arguments_) {
|
|
|
176
191
|
let resolvedPath = "", resolvedAbsolute = !1;
|
|
177
192
|
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
178
193
|
let path = index >= 0 ? arguments_[index] : cwd();
|
|
179
|
-
|
|
194
|
+
path && path.length !== 0 && (resolvedPath = `${path}/${resolvedPath}`, resolvedAbsolute = isAbsolute(path));
|
|
180
195
|
}
|
|
181
196
|
return resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute), resolvedAbsolute && !isAbsolute(resolvedPath) ? `/${resolvedPath}` : resolvedPath.length > 0 ? resolvedPath : ".";
|
|
182
197
|
};
|
|
@@ -843,7 +858,7 @@ var Queue = class {
|
|
|
843
858
|
function createHMRHandlerForRunner(runner) {
|
|
844
859
|
return createHMRHandler(async (payload) => {
|
|
845
860
|
let hmrClient = runner.hmrClient;
|
|
846
|
-
if (
|
|
861
|
+
if (hmrClient && !runner.isClosed()) switch (payload.type) {
|
|
847
862
|
case "connected":
|
|
848
863
|
hmrClient.logger.debug("connected.");
|
|
849
864
|
break;
|
|
@@ -938,10 +953,11 @@ function supportRelativeURL(file, url) {
|
|
|
938
953
|
return protocol && /^\/\w:/.test(startPath) ? (protocol += "/", protocol + slash(posixResolve(startPath, url))) : protocol + posixResolve(startPath, url);
|
|
939
954
|
}
|
|
940
955
|
function getRunnerSourceMap(position) {
|
|
956
|
+
let id = decodeSourceURL(position.source);
|
|
941
957
|
for (let moduleGraph of evaluatedModulesCache) {
|
|
942
|
-
let sourceMap = moduleGraph.getModuleSourceMapById(
|
|
958
|
+
let sourceMap = moduleGraph.getModuleSourceMapById(id);
|
|
943
959
|
if (sourceMap) return {
|
|
944
|
-
url:
|
|
960
|
+
url: id,
|
|
945
961
|
map: sourceMap,
|
|
946
962
|
vite: !0
|
|
947
963
|
};
|
|
@@ -1160,7 +1176,7 @@ var ModuleRunner = class {
|
|
|
1160
1176
|
visited.add(mod.id);
|
|
1161
1177
|
for (let importedModuleId of mod.imports) {
|
|
1162
1178
|
let importedModule = this.evaluatedModules.getModuleById(importedModuleId);
|
|
1163
|
-
if (
|
|
1179
|
+
if (importedModule?.promise && !importedModule.evaluated && (callstack.includes(importedModuleId) || this.isCircularRequest(importedModule, callstack, visited))) return !0;
|
|
1164
1180
|
}
|
|
1165
1181
|
return !1;
|
|
1166
1182
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.2",
|
|
4
4
|
"description": "Native-ESM powered web dev build tool",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"build-tool",
|
|
@@ -59,11 +59,11 @@
|
|
|
59
59
|
"lightningcss": "^1.33.0",
|
|
60
60
|
"picomatch": "^4.0.7",
|
|
61
61
|
"postcss": "^8.5.28",
|
|
62
|
-
"rolldown": "~1.2.
|
|
62
|
+
"rolldown": "~1.2.11",
|
|
63
63
|
"tinyglobby": "^0.2.17"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@babel/parser": "^7.29.
|
|
66
|
+
"@babel/parser": "^7.29.9",
|
|
67
67
|
"@jridgewell/remapping": "^2.3.5",
|
|
68
68
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
69
69
|
"@polka/compression": "^1.0.0-next.25",
|
|
@@ -73,17 +73,16 @@
|
|
|
73
73
|
"@types/escape-html": "^1.0.4",
|
|
74
74
|
"@types/pnpapi": "^0.0.5",
|
|
75
75
|
"@vercel/detect-agent": "^1.2.5",
|
|
76
|
-
"@vitejs/devtools": "^0.7.
|
|
77
|
-
"@vitest/utils": "4.1.11",
|
|
76
|
+
"@vitejs/devtools": "^0.7.6",
|
|
77
|
+
"@vitest/utils": "^4.1.11",
|
|
78
78
|
"@voidzero-dev/vite-task-client": "^0.2.0",
|
|
79
|
-
"artichokie": "^0.4.
|
|
80
|
-
"baseline-browser-mapping": "^2.11.
|
|
79
|
+
"artichokie": "^0.4.5",
|
|
80
|
+
"baseline-browser-mapping": "^2.11.26",
|
|
81
81
|
"cac": "^7.0.0",
|
|
82
82
|
"chokidar": "^3.6.0",
|
|
83
83
|
"connect": "^3.7.0",
|
|
84
84
|
"convert-source-map": "^2.0.0",
|
|
85
85
|
"cors": "^2.8.6",
|
|
86
|
-
"cross-spawn": "^7.0.6",
|
|
87
86
|
"dotenv-expand": "^13.0.0",
|
|
88
87
|
"es-module-lexer": "^2.3.2",
|
|
89
88
|
"esbuild": "^0.28.2",
|
|
@@ -94,7 +93,7 @@
|
|
|
94
93
|
"host-validation-middleware": "^0.1.4",
|
|
95
94
|
"http-proxy-3": "^1.23.3",
|
|
96
95
|
"launch-editor-middleware": "^2.14.1",
|
|
97
|
-
"magic-string": "^1.2
|
|
96
|
+
"magic-string": "^1.4.2",
|
|
98
97
|
"mlly": "^1.8.2",
|
|
99
98
|
"mrmime": "^2.0.1",
|
|
100
99
|
"nanoid": "^5.1.16",
|
|
@@ -109,16 +108,17 @@
|
|
|
109
108
|
"postcss-modules": "^9.0.1",
|
|
110
109
|
"premove": "^4.0.0",
|
|
111
110
|
"resolve.exports": "^2.0.3",
|
|
112
|
-
"rolldown-plugin-dts": "^0.28.
|
|
111
|
+
"rolldown-plugin-dts": "^0.28.6",
|
|
113
112
|
"rollup": "^4.59.0",
|
|
114
113
|
"rollup-plugin-license": "^3.7.1",
|
|
115
|
-
"sass": "^1.
|
|
116
|
-
"sass-embedded": "^1.
|
|
114
|
+
"sass": "^1.105.0",
|
|
115
|
+
"sass-embedded": "^1.105.0",
|
|
117
116
|
"sirv": "^3.0.2",
|
|
118
117
|
"strip-literal": "^4.0.0",
|
|
119
118
|
"terser": "^5.51.2",
|
|
119
|
+
"tinyexec": "^1.3.1",
|
|
120
120
|
"ufo": "^1.6.4",
|
|
121
|
-
"ws": "^8.
|
|
121
|
+
"ws": "^8.22.0"
|
|
122
122
|
},
|
|
123
123
|
"peerDependencies": {
|
|
124
124
|
"@types/node": "^20.19.0 || >=22.12.0",
|