@depup/vite 8.2.2-depup.0 → 8.3.1-depup.0
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/README.md +3 -3
- package/bin/vite.js +17 -6
- package/changes.json +3 -3
- package/dist/client/bundledDevClient.mjs +109 -44
- package/dist/client/client.mjs +288 -260
- package/dist/node/chunks/build.js +21 -21
- package/dist/node/chunks/lib.js +2 -2
- package/dist/node/chunks/node.js +30399 -29700
- package/dist/node/chunks/postcss-import.js +10 -10
- package/dist/node/cli.js +12 -8
- package/dist/node/index.d.ts +1570 -1578
- package/dist/node/index.js +1 -1
- package/dist/node/module-runner.d.ts +1 -1
- package/dist/node/module-runner.js +201 -202
- package/package.json +20 -20
- package/types/customEvent.d.ts +2 -0
- package/types/hmrPayload.d.ts +2 -0
- package/types/internal/cssPreprocessorOptions.d.ts +2 -2
- package/types/internal/devtoolsOptions.d.ts +9 -0
package/dist/node/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as mergeConfig, A as
|
|
1
|
+
import { $ as mergeConfig, A as optimizeDeps, B as createServerModuleRunner, D as formatPostcssSourceMap, E as createBuilder, F as searchForWorkspaceRoot, G as transformWithEsbuild, H as createLogger, I as isFileLoadingAllowed, J as resolveEnvPrefix, K as perEnvironmentState, L as isFileServingAllowed, M as createServerHotChannel, N as createServer, O as preprocessCSS, Q as mergeAlias, R as send, S as preview, T as build, U as buildErrorMessage, V as createServerModuleRunnerTransport, W as transformWithOxc, X as createFilter, Y as perEnvironmentPlugin, Z as isCSSRequest, _ as runnerImport, a as minifySync, at as DEFAULT_CLIENT_MAIN_FIELDS, b as DevEnvironment, c as parseAstAsync, ct as DEFAULT_SERVER_MAIN_FIELDS, d as isFetchableDevEnvironment, et as normalizePath, g as sortUserPlugins, h as resolveConfig, i as minify, it as DEFAULT_CLIENT_CONDITIONS, k as createIdResolver, l as parseSync, lt as VERSION, m as loadConfigFromFile, n as esbuildVersion, nt as rollupVersion, o as parse, ot as DEFAULT_EXTERNAL_CONDITIONS, p as defineConfig, q as loadEnv, r as esmExternalRequirePlugin, rt as withFilter, s as parseAst, st as DEFAULT_SERVER_CONDITIONS, t as Visitor, tt as rolldownVersion, u as createFetchableDevEnvironment, ut as defaultAllowedOrigins, v as createRunnableDevEnvironment, w as BuildEnvironment, x as fetchModule, y as isRunnableDevEnvironment, z as ssrTransform } from "./chunks/node.js";
|
|
2
2
|
export { BuildEnvironment, DevEnvironment, Visitor, build, buildErrorMessage, createBuilder, createFetchableDevEnvironment, createFilter, createIdResolver, createLogger, createRunnableDevEnvironment, createServer, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, defaultAllowedOrigins, DEFAULT_CLIENT_CONDITIONS as defaultClientConditions, DEFAULT_CLIENT_MAIN_FIELDS as defaultClientMainFields, DEFAULT_EXTERNAL_CONDITIONS as defaultExternalConditions, DEFAULT_SERVER_CONDITIONS as defaultServerConditions, DEFAULT_SERVER_MAIN_FIELDS as defaultServerMainFields, defineConfig, esbuildVersion, esmExternalRequirePlugin, fetchModule, formatPostcssSourceMap, isCSSRequest, isFetchableDevEnvironment, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, minify, minifySync, ssrTransform as moduleRunnerTransform, normalizePath, optimizeDeps, parse, parseAst, parseAstAsync, parseSync, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveConfig, resolveEnvPrefix, rolldownVersion, rollupVersion, runnerImport, searchForWorkspaceRoot, send, sortUserPlugins, transformWithEsbuild, transformWithOxc, VERSION as version, withFilter };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as ExternalFetchResult, c as ViteFetchResult, i as createWebSocketModuleRunnerTransport, n as ModuleRunnerTransportHandlers, o as FetchFunctionOptions, r as NormalizedModuleRunnerTransport, s as FetchResult, t as ModuleRunnerTransport } from "./chunks/moduleRunnerTransport.js";
|
|
2
2
|
import { ModuleNamespace, ViteHotContext } from "#types/hot";
|
|
3
|
-
import { HotPayload, Update } from "#types/hmrPayload";
|
|
4
3
|
import { InferCustomEventPayload } from "#types/customEvent";
|
|
4
|
+
import { HotPayload, Update } from "#types/hmrPayload";
|
|
5
5
|
//#region src/module-runner/sourcemap/decoder.d.ts
|
|
6
6
|
interface SourceMapLike {
|
|
7
7
|
version: number;
|
|
@@ -40,86 +40,21 @@ function promiseWithResolvers() {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
|
-
//#region ../../node_modules/.pnpm
|
|
44
|
-
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
45
|
-
function normalizeWindowsPath(input = "") {
|
|
46
|
-
return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
47
|
-
}
|
|
48
|
-
const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
49
|
-
function cwd() {
|
|
50
|
-
return typeof process < "u" && typeof process.cwd == "function" ? process.cwd().replace(/\\/g, "/") : "/";
|
|
51
|
-
}
|
|
52
|
-
const resolve = function(...arguments_) {
|
|
53
|
-
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
54
|
-
let resolvedPath = "", resolvedAbsolute = !1;
|
|
55
|
-
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
56
|
-
let path = index >= 0 ? arguments_[index] : cwd();
|
|
57
|
-
!path || path.length === 0 || (resolvedPath = `${path}/${resolvedPath}`, resolvedAbsolute = isAbsolute(path));
|
|
58
|
-
}
|
|
59
|
-
return resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute), resolvedAbsolute && !isAbsolute(resolvedPath) ? `/${resolvedPath}` : resolvedPath.length > 0 ? resolvedPath : ".";
|
|
60
|
-
};
|
|
61
|
-
function normalizeString(path, allowAboveRoot) {
|
|
62
|
-
let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;
|
|
63
|
-
for (let index = 0; index <= path.length; ++index) {
|
|
64
|
-
if (index < path.length) char = path[index];
|
|
65
|
-
else if (char === "/") break;
|
|
66
|
-
else char = "/";
|
|
67
|
-
if (char === "/") {
|
|
68
|
-
if (lastSlash !== index - 1 && dots !== 1) {
|
|
69
|
-
if (dots === 2) {
|
|
70
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
71
|
-
if (res.length > 2) {
|
|
72
|
-
let lastSlashIndex = res.lastIndexOf("/");
|
|
73
|
-
lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
if (res.length > 0) {
|
|
77
|
-
res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
|
|
78
|
-
continue;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
|
|
82
|
-
} else res.length > 0 ? res += `/${path.slice(lastSlash + 1, index)}` : res = path.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
|
|
83
|
-
}
|
|
84
|
-
lastSlash = index, dots = 0;
|
|
85
|
-
} else char === "." && dots !== -1 ? ++dots : dots = -1;
|
|
86
|
-
}
|
|
87
|
-
return res;
|
|
88
|
-
}
|
|
89
|
-
const isAbsolute = function(p) {
|
|
90
|
-
return _IS_ABSOLUTE_RE.test(p);
|
|
91
|
-
}, dirname = function(p) {
|
|
92
|
-
let segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
93
|
-
return segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
94
|
-
}, textDecoder = new TextDecoder(), decodeBase64 = (() => {
|
|
95
|
-
let capturedBuffer = typeof Buffer == "function" ? Buffer : void 0;
|
|
96
|
-
return capturedBuffer && typeof capturedBuffer.from == "function" ? (base64) => capturedBuffer.from(base64, "base64").toString("utf-8") : (base64) => textDecoder.decode(Uint8Array.from(atob(base64), (c) => c.charCodeAt(0)));
|
|
97
|
-
})(), percentRegEx = /%/g, backslashRegEx = /\\/g, newlineRegEx = /\n/g, carriageReturnRegEx = /\r/g, tabRegEx = /\t/g, questionRegex = /\?/g, hashRegex = /#/g;
|
|
98
|
-
function encodePathChars(filepath) {
|
|
99
|
-
return filepath.includes("%") && (filepath = filepath.replace(percentRegEx, "%25")), !isWindows && filepath.includes("\\") && (filepath = filepath.replace(backslashRegEx, "%5C")), filepath.includes("\n") && (filepath = filepath.replace(newlineRegEx, "%0A")), filepath.includes("\r") && (filepath = filepath.replace(carriageReturnRegEx, "%0D")), filepath.includes(" ") && (filepath = filepath.replace(tabRegEx, "%09")), filepath;
|
|
100
|
-
}
|
|
101
|
-
const posixDirname = dirname, posixResolve = resolve;
|
|
102
|
-
function posixPathToFileHref(posixPath) {
|
|
103
|
-
let resolved = posixResolve(posixPath), filePathLast = posixPath.charCodeAt(posixPath.length - 1);
|
|
104
|
-
return (filePathLast === 47 || isWindows && filePathLast === 92) && resolved[resolved.length - 1] !== "/" && (resolved += "/"), resolved = encodePathChars(resolved), resolved.includes("?") && (resolved = resolved.replace(questionRegex, "%3F")), resolved.includes("#") && (resolved = resolved.replace(hashRegex, "%23")), new URL(`file://${resolved}`).href;
|
|
105
|
-
}
|
|
106
|
-
function toWindowsPath(path) {
|
|
107
|
-
return path.replace(/\//g, "\\");
|
|
108
|
-
}
|
|
109
|
-
//#endregion
|
|
110
|
-
//#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
43
|
+
//#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.6.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
|
|
111
44
|
var comma = 44, chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", intToChar = /* @__PURE__ */ new Uint8Array(64), charToInt = /* @__PURE__ */ new Uint8Array(128);
|
|
112
45
|
for (let i = 0; i < chars.length; i++) {
|
|
113
46
|
let c = chars.charCodeAt(i);
|
|
114
47
|
intToChar[i] = c, charToInt[c] = i;
|
|
115
48
|
}
|
|
116
|
-
function decodeInteger(reader
|
|
49
|
+
function decodeInteger(reader) {
|
|
117
50
|
let value = 0, shift = 0, integer = 0;
|
|
118
51
|
do
|
|
119
52
|
integer = charToInt[reader.next()], value |= (integer & 31) << shift, shift += 5;
|
|
120
53
|
while (integer & 32);
|
|
121
|
-
|
|
122
|
-
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
function decodeSign(num) {
|
|
57
|
+
return num & 1 ? -2147483648 | -(num >>> 1) : num >>> 1;
|
|
123
58
|
}
|
|
124
59
|
function hasMoreVlq(reader, max) {
|
|
125
60
|
return reader.pos >= max ? !1 : reader.peek() !== comma;
|
|
@@ -145,7 +80,7 @@ function decode(mappings) {
|
|
|
145
80
|
let semi = reader.indexOf(";"), line = [], sorted = !0, lastCol = 0;
|
|
146
81
|
for (genColumn = 0; reader.pos < semi;) {
|
|
147
82
|
let seg;
|
|
148
|
-
genColumn
|
|
83
|
+
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 = [
|
|
149
84
|
genColumn,
|
|
150
85
|
sourcesIndex,
|
|
151
86
|
sourceLine,
|
|
@@ -229,6 +164,73 @@ function traceSegmentInternal(segments, memo, line, column, bias) {
|
|
|
229
164
|
return found ? index = (bias === -1 ? upperBound : lowerBound)(segments, column, index) : bias === -1 && index++, index === -1 || index === segments.length ? -1 : index;
|
|
230
165
|
}
|
|
231
166
|
//#endregion
|
|
167
|
+
//#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
|
|
168
|
+
const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
169
|
+
function normalizeWindowsPath(input = "") {
|
|
170
|
+
return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
171
|
+
}
|
|
172
|
+
const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
173
|
+
function cwd() {
|
|
174
|
+
return typeof process < "u" && typeof process.cwd == "function" ? process.cwd().replace(/\\/g, "/") : "/";
|
|
175
|
+
}
|
|
176
|
+
const resolve = function(...arguments_) {
|
|
177
|
+
arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
|
|
178
|
+
let resolvedPath = "", resolvedAbsolute = !1;
|
|
179
|
+
for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
|
|
180
|
+
let path = index >= 0 ? arguments_[index] : cwd();
|
|
181
|
+
path && path.length !== 0 && (resolvedPath = `${path}/${resolvedPath}`, resolvedAbsolute = isAbsolute(path));
|
|
182
|
+
}
|
|
183
|
+
return resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute), resolvedAbsolute && !isAbsolute(resolvedPath) ? `/${resolvedPath}` : resolvedPath.length > 0 ? resolvedPath : ".";
|
|
184
|
+
};
|
|
185
|
+
function normalizeString(path, allowAboveRoot) {
|
|
186
|
+
let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;
|
|
187
|
+
for (let index = 0; index <= path.length; ++index) {
|
|
188
|
+
if (index < path.length) char = path[index];
|
|
189
|
+
else if (char === "/") break;
|
|
190
|
+
else char = "/";
|
|
191
|
+
if (char === "/") {
|
|
192
|
+
if (lastSlash !== index - 1 && dots !== 1) {
|
|
193
|
+
if (dots === 2) {
|
|
194
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
195
|
+
if (res.length > 2) {
|
|
196
|
+
let lastSlashIndex = res.lastIndexOf("/");
|
|
197
|
+
lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
if (res.length > 0) {
|
|
201
|
+
res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
|
|
206
|
+
} else res.length > 0 ? res += `/${path.slice(lastSlash + 1, index)}` : res = path.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
|
|
207
|
+
}
|
|
208
|
+
lastSlash = index, dots = 0;
|
|
209
|
+
} else char === "." && dots !== -1 ? ++dots : dots = -1;
|
|
210
|
+
}
|
|
211
|
+
return res;
|
|
212
|
+
}
|
|
213
|
+
const isAbsolute = function(p) {
|
|
214
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
215
|
+
}, dirname = function(p) {
|
|
216
|
+
let segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
217
|
+
return segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
218
|
+
}, textDecoder = new TextDecoder(), decodeBase64 = (() => {
|
|
219
|
+
let capturedBuffer = typeof Buffer == "function" ? Buffer : void 0;
|
|
220
|
+
return capturedBuffer && typeof capturedBuffer.from == "function" ? (base64) => capturedBuffer.from(base64, "base64").toString("utf-8") : (base64) => textDecoder.decode(Uint8Array.from(atob(base64), (c) => c.charCodeAt(0)));
|
|
221
|
+
})(), percentRegEx = /%/g, backslashRegEx = /\\/g, newlineRegEx = /\n/g, carriageReturnRegEx = /\r/g, tabRegEx = /\t/g, questionRegex = /\?/g, hashRegex = /#/g;
|
|
222
|
+
function encodePathChars(filepath) {
|
|
223
|
+
return filepath.includes("%") && (filepath = filepath.replace(percentRegEx, "%25")), !isWindows && filepath.includes("\\") && (filepath = filepath.replace(backslashRegEx, "%5C")), filepath.includes("\n") && (filepath = filepath.replace(newlineRegEx, "%0A")), filepath.includes("\r") && (filepath = filepath.replace(carriageReturnRegEx, "%0D")), filepath.includes(" ") && (filepath = filepath.replace(tabRegEx, "%09")), filepath;
|
|
224
|
+
}
|
|
225
|
+
const posixDirname = dirname, posixResolve = resolve;
|
|
226
|
+
function posixPathToFileHref(posixPath) {
|
|
227
|
+
let resolved = posixResolve(posixPath), filePathLast = posixPath.charCodeAt(posixPath.length - 1);
|
|
228
|
+
return (filePathLast === 47 || isWindows && filePathLast === 92) && resolved.at(-1) !== "/" && (resolved += "/"), resolved = encodePathChars(resolved), resolved.includes("?") && (resolved = resolved.replace(questionRegex, "%3F")), resolved.includes("#") && (resolved = resolved.replace(hashRegex, "%23")), new URL(`file://${resolved}`).href;
|
|
229
|
+
}
|
|
230
|
+
function toWindowsPath(path) {
|
|
231
|
+
return path.replace(/\//g, "\\");
|
|
232
|
+
}
|
|
233
|
+
//#endregion
|
|
232
234
|
//#region src/module-runner/sourcemap/decoder.ts
|
|
233
235
|
var DecodedMap = class {
|
|
234
236
|
map;
|
|
@@ -356,6 +358,12 @@ function normalizeModuleId(file) {
|
|
|
356
358
|
return prefixedBuiltins.has(file) ? file : slash(file).replace(/^\/@fs\//, isWindows ? "" : "/").replace(/^node:/, "").replace(/^\/+/, "/").replace(/^file:\/+/, isWindows ? "" : "/");
|
|
357
359
|
}
|
|
358
360
|
//#endregion
|
|
361
|
+
//#region src/shared/builtin.ts
|
|
362
|
+
function createIsBuiltin(builtins) {
|
|
363
|
+
let plainBuiltinsSet = new Set(builtins.filter((builtin) => typeof builtin == "string")), regexBuiltins = builtins.filter((builtin) => typeof builtin != "string");
|
|
364
|
+
return (id) => plainBuiltinsSet.has(id) || regexBuiltins.some((regexp) => regexp.test(id));
|
|
365
|
+
}
|
|
366
|
+
//#endregion
|
|
359
367
|
//#region src/shared/hmr.ts
|
|
360
368
|
var HMRContext = class {
|
|
361
369
|
hmrClient;
|
|
@@ -522,28 +530,6 @@ var HMRContext = class {
|
|
|
522
530
|
}
|
|
523
531
|
};
|
|
524
532
|
//#endregion
|
|
525
|
-
//#region src/shared/ssrTransform.ts
|
|
526
|
-
/**
|
|
527
|
-
* Vite converts `import { } from 'foo'` to `const _ = __vite_ssr_import__('foo')`.
|
|
528
|
-
* Top-level imports and dynamic imports work slightly differently in Node.js.
|
|
529
|
-
* This function normalizes the differences so it matches prod behaviour.
|
|
530
|
-
*/
|
|
531
|
-
function analyzeImportedModDifference(mod, rawId, moduleType, metadata) {
|
|
532
|
-
if (!metadata?.isDynamicImport && metadata?.importedNames?.length) {
|
|
533
|
-
let missingBindings = metadata.importedNames.filter((s) => !(s in mod));
|
|
534
|
-
if (missingBindings.length) {
|
|
535
|
-
let lastBinding = missingBindings[missingBindings.length - 1];
|
|
536
|
-
throw SyntaxError(moduleType === "module" ? `[vite] The requested module '${rawId}' does not provide an export named '${lastBinding}'` : `\
|
|
537
|
-
[vite] Named export '${lastBinding}' not found. The requested module '${rawId}' is a CommonJS module, which may not support all module.exports as named exports.
|
|
538
|
-
CommonJS modules can always be imported via the default export, for example using:
|
|
539
|
-
|
|
540
|
-
import pkg from '${rawId}';
|
|
541
|
-
const {${missingBindings.join(", ")}} = pkg;
|
|
542
|
-
`);
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
//#endregion
|
|
547
533
|
//#region ../../node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/non-secure/index.js
|
|
548
534
|
let nanoid = (size = 21) => {
|
|
549
535
|
let id = "", i = size | 0;
|
|
@@ -715,19 +701,118 @@ const createWebSocketModuleRunnerTransport = (options) => {
|
|
|
715
701
|
};
|
|
716
702
|
};
|
|
717
703
|
//#endregion
|
|
718
|
-
//#region src/shared/
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
704
|
+
//#region src/shared/ssrTransform.ts
|
|
705
|
+
/**
|
|
706
|
+
* Vite converts `import { } from 'foo'` to `const _ = __vite_ssr_import__('foo')`.
|
|
707
|
+
* Top-level imports and dynamic imports work slightly differently in Node.js.
|
|
708
|
+
* This function normalizes the differences so it matches prod behaviour.
|
|
709
|
+
*/
|
|
710
|
+
function analyzeImportedModDifference(mod, rawId, moduleType, metadata) {
|
|
711
|
+
if (!metadata?.isDynamicImport && metadata?.importedNames?.length) {
|
|
712
|
+
let missingBindings = metadata.importedNames.filter((s) => !(s in mod));
|
|
713
|
+
if (missingBindings.length) {
|
|
714
|
+
let lastBinding = missingBindings.at(-1);
|
|
715
|
+
throw SyntaxError(moduleType === "module" ? `[vite] The requested module '${rawId}' does not provide an export named '${lastBinding}'` : `\
|
|
716
|
+
[vite] Named export '${lastBinding}' not found. The requested module '${rawId}' is a CommonJS module, which may not support all module.exports as named exports.
|
|
717
|
+
CommonJS modules can always be imported via the default export, for example using:
|
|
718
|
+
|
|
719
|
+
import pkg from '${rawId}';
|
|
720
|
+
const {${missingBindings.join(", ")}} = pkg;
|
|
721
|
+
`);
|
|
722
|
+
}
|
|
723
|
+
}
|
|
722
724
|
}
|
|
723
725
|
//#endregion
|
|
724
726
|
//#region src/module-runner/constants.ts
|
|
725
|
-
const ssrModuleExportsKey = "__vite_ssr_exports__", ssrImportKey = "__vite_ssr_import__", ssrDynamicImportKey = "__vite_ssr_dynamic_import__", ssrExportAllKey = "__vite_ssr_exportAll__", ssrExportNameKey = "__vite_ssr_exportName__", ssrImportMetaKey = "__vite_ssr_import_meta__",
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
}
|
|
729
|
-
|
|
730
|
-
|
|
727
|
+
const ssrModuleExportsKey = "__vite_ssr_exports__", ssrImportKey = "__vite_ssr_import__", ssrDynamicImportKey = "__vite_ssr_dynamic_import__", ssrExportAllKey = "__vite_ssr_exportAll__", ssrExportNameKey = "__vite_ssr_exportName__", ssrImportMetaKey = "__vite_ssr_import_meta__", customizationHookNamespace = "vite-module-runner:import-meta-resolve/v1/", customizationHooksModule = `
|
|
728
|
+
|
|
729
|
+
export async function resolve(specifier, context, nextResolve) {
|
|
730
|
+
if (specifier.startsWith(${JSON.stringify(customizationHookNamespace)})) {
|
|
731
|
+
const data = specifier.slice(${JSON.stringify(customizationHookNamespace)}.length)
|
|
732
|
+
const [parsedSpecifier, parsedImporter] = JSON.parse(data)
|
|
733
|
+
specifier = parsedSpecifier
|
|
734
|
+
context.parentURL = parsedImporter
|
|
735
|
+
}
|
|
736
|
+
return nextResolve(specifier, context)
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
`;
|
|
740
|
+
function customizationHookResolve(specifier, context, nextResolve) {
|
|
741
|
+
if (specifier.startsWith(customizationHookNamespace)) {
|
|
742
|
+
let data = specifier.slice(42), [parsedSpecifier, parsedImporter] = JSON.parse(data);
|
|
743
|
+
specifier = parsedSpecifier, context.parentURL = parsedImporter;
|
|
744
|
+
}
|
|
745
|
+
return nextResolve(specifier, context);
|
|
746
|
+
}
|
|
747
|
+
let isHookRegistered = !1;
|
|
748
|
+
function createImportMetaResolver() {
|
|
749
|
+
if (isHookRegistered) return importMetaResolveWithCustomHook;
|
|
750
|
+
let module;
|
|
751
|
+
try {
|
|
752
|
+
module = typeof process < "u" ? process.getBuiltinModule("node:module").Module : void 0;
|
|
753
|
+
} catch {
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
if (module) {
|
|
757
|
+
if (module.registerHooks) return module.registerHooks({ resolve: customizationHookResolve }), isHookRegistered = !0, importMetaResolveWithCustomHook;
|
|
758
|
+
if (module.register) {
|
|
759
|
+
try {
|
|
760
|
+
let hookModuleContent = `data:text/javascript,${encodeURI(customizationHooksModule)}`;
|
|
761
|
+
module.register(hookModuleContent);
|
|
762
|
+
} catch (e) {
|
|
763
|
+
if ("code" in e && e.code === "ERR_NETWORK_IMPORT_DISALLOWED") return;
|
|
764
|
+
throw e;
|
|
765
|
+
}
|
|
766
|
+
return isHookRegistered = !0, importMetaResolveWithCustomHook;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
function importMetaResolveWithCustomHook(specifier, importer) {
|
|
771
|
+
return import.meta.resolve(`${customizationHookNamespace}${JSON.stringify([specifier, importer])}`);
|
|
772
|
+
}
|
|
773
|
+
//#endregion
|
|
774
|
+
//#region src/module-runner/createImportMeta.ts
|
|
775
|
+
const envProxy = new Proxy({}, { get(_, p) {
|
|
776
|
+
throw Error(`[module runner] Dynamic access of "import.meta.env" is not supported. Please, use "import.meta.env.${String(p)}" instead.`);
|
|
777
|
+
} });
|
|
778
|
+
function createDefaultImportMeta(modulePath) {
|
|
779
|
+
let href = posixPathToFileHref(modulePath), filename = modulePath, dirname = posixDirname(modulePath);
|
|
780
|
+
return {
|
|
781
|
+
filename: isWindows ? toWindowsPath(filename) : filename,
|
|
782
|
+
dirname: isWindows ? toWindowsPath(dirname) : dirname,
|
|
783
|
+
url: href,
|
|
784
|
+
env: envProxy,
|
|
785
|
+
resolve(_id, _parent) {
|
|
786
|
+
throw Error("[module runner] \"import.meta.resolve\" is not supported.");
|
|
787
|
+
},
|
|
788
|
+
glob() {
|
|
789
|
+
throw Error("[module runner] \"import.meta.glob\" is statically replaced during file transformation. Make sure to reference it by the full name.");
|
|
790
|
+
}
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
/**
|
|
794
|
+
* Create import.meta object for Node.js.
|
|
795
|
+
*/
|
|
796
|
+
function createNodeImportMeta(modulePath) {
|
|
797
|
+
let defaultMeta = createDefaultImportMeta(modulePath), href = defaultMeta.url, importMetaResolver = createImportMetaResolver();
|
|
798
|
+
return {
|
|
799
|
+
...defaultMeta,
|
|
800
|
+
main: !1,
|
|
801
|
+
resolve(id, parent) {
|
|
802
|
+
return (importMetaResolver ?? defaultMeta.resolve)(id, parent ?? href);
|
|
803
|
+
}
|
|
804
|
+
};
|
|
805
|
+
}
|
|
806
|
+
//#endregion
|
|
807
|
+
//#region src/module-runner/esmEvaluator.ts
|
|
808
|
+
var ESModulesEvaluator = class {
|
|
809
|
+
startOffset = getAsyncFunctionDeclarationPaddingLineCount() + 1;
|
|
810
|
+
async runInlinedModule(context, code) {
|
|
811
|
+
await new AsyncFunction(ssrModuleExportsKey, ssrImportMetaKey, ssrImportKey, ssrDynamicImportKey, ssrExportAllKey, ssrExportNameKey, "\"use strict\";\n" + code)(context[ssrModuleExportsKey], context[ssrImportMetaKey], context[ssrImportKey], context[ssrDynamicImportKey], context[ssrExportAllKey], context[ssrExportNameKey]), Object.seal(context[ssrModuleExportsKey]);
|
|
812
|
+
}
|
|
813
|
+
runExternalModule(filepath) {
|
|
814
|
+
return import(filepath);
|
|
815
|
+
}
|
|
731
816
|
};
|
|
732
817
|
//#endregion
|
|
733
818
|
//#region src/shared/hmrHandler.ts
|
|
@@ -760,13 +845,13 @@ var Queue = class {
|
|
|
760
845
|
function createHMRHandlerForRunner(runner) {
|
|
761
846
|
return createHMRHandler(async (payload) => {
|
|
762
847
|
let hmrClient = runner.hmrClient;
|
|
763
|
-
if (
|
|
848
|
+
if (hmrClient && !runner.isClosed()) switch (payload.type) {
|
|
764
849
|
case "connected":
|
|
765
850
|
hmrClient.logger.debug("connected.");
|
|
766
851
|
break;
|
|
767
852
|
case "update":
|
|
768
853
|
await hmrClient.notifyListeners("vite:beforeUpdate", payload), await Promise.all(payload.updates.map(async (update) => {
|
|
769
|
-
if (update.type === "js-update") return
|
|
854
|
+
if (update.type === "js-update") return hmrClient.queueUpdate(update);
|
|
770
855
|
hmrClient.logger.error("css hmr is not supported in runner mode.");
|
|
771
856
|
})), await hmrClient.notifyListeners("vite:afterUpdate", payload);
|
|
772
857
|
break;
|
|
@@ -827,8 +912,14 @@ function findAllEntrypoints(runner, entrypoints = /* @__PURE__ */ new Set()) {
|
|
|
827
912
|
return entrypoints;
|
|
828
913
|
}
|
|
829
914
|
//#endregion
|
|
830
|
-
//#region src/module-runner/
|
|
831
|
-
const
|
|
915
|
+
//#region src/module-runner/hmrLogger.ts
|
|
916
|
+
const noop = () => {}, silentConsole = {
|
|
917
|
+
debug: noop,
|
|
918
|
+
error: noop
|
|
919
|
+
}, hmrLogger = {
|
|
920
|
+
debug: (...msg) => console.log("[vite]", ...msg),
|
|
921
|
+
error: (error) => console.log("[vite]", error)
|
|
922
|
+
}, sourceMapCache = {}, fileContentsCache = {}, evaluatedModulesCache = /* @__PURE__ */ new Set(), retrieveFileHandlers = /* @__PURE__ */ new Set(), retrieveSourceMapHandlers = /* @__PURE__ */ new Set(), createExecHandlers = (handlers) => ((...args) => {
|
|
832
923
|
for (let handler of handlers) {
|
|
833
924
|
let result = handler(...args);
|
|
834
925
|
if (result) return result;
|
|
@@ -1014,98 +1105,6 @@ function enableSourceMapSupport(runner) {
|
|
|
1014
1105
|
return interceptStackTrace(runner, typeof runner.options.sourcemapInterceptor == "object" ? runner.options.sourcemapInterceptor : void 0);
|
|
1015
1106
|
}
|
|
1016
1107
|
//#endregion
|
|
1017
|
-
//#region src/module-runner/esmEvaluator.ts
|
|
1018
|
-
var ESModulesEvaluator = class {
|
|
1019
|
-
startOffset = getAsyncFunctionDeclarationPaddingLineCount() + 1;
|
|
1020
|
-
async runInlinedModule(context, code) {
|
|
1021
|
-
await new AsyncFunction(ssrModuleExportsKey, ssrImportMetaKey, ssrImportKey, ssrDynamicImportKey, ssrExportAllKey, ssrExportNameKey, "\"use strict\";\n" + code)(context[ssrModuleExportsKey], context[ssrImportMetaKey], context[ssrImportKey], context[ssrDynamicImportKey], context[ssrExportAllKey], context[ssrExportNameKey]), Object.seal(context[ssrModuleExportsKey]);
|
|
1022
|
-
}
|
|
1023
|
-
runExternalModule(filepath) {
|
|
1024
|
-
return import(filepath);
|
|
1025
|
-
}
|
|
1026
|
-
};
|
|
1027
|
-
//#endregion
|
|
1028
|
-
//#region src/module-runner/importMetaResolver.ts
|
|
1029
|
-
const customizationHookNamespace = "vite-module-runner:import-meta-resolve/v1/", customizationHooksModule = `
|
|
1030
|
-
|
|
1031
|
-
export async function resolve(specifier, context, nextResolve) {
|
|
1032
|
-
if (specifier.startsWith(${JSON.stringify(customizationHookNamespace)})) {
|
|
1033
|
-
const data = specifier.slice(${JSON.stringify(customizationHookNamespace)}.length)
|
|
1034
|
-
const [parsedSpecifier, parsedImporter] = JSON.parse(data)
|
|
1035
|
-
specifier = parsedSpecifier
|
|
1036
|
-
context.parentURL = parsedImporter
|
|
1037
|
-
}
|
|
1038
|
-
return nextResolve(specifier, context)
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
`;
|
|
1042
|
-
function customizationHookResolve(specifier, context, nextResolve) {
|
|
1043
|
-
if (specifier.startsWith(customizationHookNamespace)) {
|
|
1044
|
-
let data = specifier.slice(42), [parsedSpecifier, parsedImporter] = JSON.parse(data);
|
|
1045
|
-
specifier = parsedSpecifier, context.parentURL = parsedImporter;
|
|
1046
|
-
}
|
|
1047
|
-
return nextResolve(specifier, context);
|
|
1048
|
-
}
|
|
1049
|
-
let isHookRegistered = !1;
|
|
1050
|
-
function createImportMetaResolver() {
|
|
1051
|
-
if (isHookRegistered) return importMetaResolveWithCustomHook;
|
|
1052
|
-
let module;
|
|
1053
|
-
try {
|
|
1054
|
-
module = typeof process < "u" ? process.getBuiltinModule("node:module").Module : void 0;
|
|
1055
|
-
} catch {
|
|
1056
|
-
return;
|
|
1057
|
-
}
|
|
1058
|
-
if (module) {
|
|
1059
|
-
if (module.registerHooks) return module.registerHooks({ resolve: customizationHookResolve }), isHookRegistered = !0, importMetaResolveWithCustomHook;
|
|
1060
|
-
if (module.register) {
|
|
1061
|
-
try {
|
|
1062
|
-
let hookModuleContent = `data:text/javascript,${encodeURI(customizationHooksModule)}`;
|
|
1063
|
-
module.register(hookModuleContent);
|
|
1064
|
-
} catch (e) {
|
|
1065
|
-
if ("code" in e && e.code === "ERR_NETWORK_IMPORT_DISALLOWED") return;
|
|
1066
|
-
throw e;
|
|
1067
|
-
}
|
|
1068
|
-
return isHookRegistered = !0, importMetaResolveWithCustomHook;
|
|
1069
|
-
}
|
|
1070
|
-
}
|
|
1071
|
-
}
|
|
1072
|
-
function importMetaResolveWithCustomHook(specifier, importer) {
|
|
1073
|
-
return import.meta.resolve(`${customizationHookNamespace}${JSON.stringify([specifier, importer])}`);
|
|
1074
|
-
}
|
|
1075
|
-
//#endregion
|
|
1076
|
-
//#region src/module-runner/createImportMeta.ts
|
|
1077
|
-
const envProxy = new Proxy({}, { get(_, p) {
|
|
1078
|
-
throw Error(`[module runner] Dynamic access of "import.meta.env" is not supported. Please, use "import.meta.env.${String(p)}" instead.`);
|
|
1079
|
-
} });
|
|
1080
|
-
function createDefaultImportMeta(modulePath) {
|
|
1081
|
-
let href = posixPathToFileHref(modulePath), filename = modulePath, dirname = posixDirname(modulePath);
|
|
1082
|
-
return {
|
|
1083
|
-
filename: isWindows ? toWindowsPath(filename) : filename,
|
|
1084
|
-
dirname: isWindows ? toWindowsPath(dirname) : dirname,
|
|
1085
|
-
url: href,
|
|
1086
|
-
env: envProxy,
|
|
1087
|
-
resolve(_id, _parent) {
|
|
1088
|
-
throw Error("[module runner] \"import.meta.resolve\" is not supported.");
|
|
1089
|
-
},
|
|
1090
|
-
glob() {
|
|
1091
|
-
throw Error("[module runner] \"import.meta.glob\" is statically replaced during file transformation. Make sure to reference it by the full name.");
|
|
1092
|
-
}
|
|
1093
|
-
};
|
|
1094
|
-
}
|
|
1095
|
-
/**
|
|
1096
|
-
* Create import.meta object for Node.js.
|
|
1097
|
-
*/
|
|
1098
|
-
function createNodeImportMeta(modulePath) {
|
|
1099
|
-
let defaultMeta = createDefaultImportMeta(modulePath), href = defaultMeta.url, importMetaResolver = createImportMetaResolver();
|
|
1100
|
-
return {
|
|
1101
|
-
...defaultMeta,
|
|
1102
|
-
main: !1,
|
|
1103
|
-
resolve(id, parent) {
|
|
1104
|
-
return (importMetaResolver ?? defaultMeta.resolve)(id, parent ?? href);
|
|
1105
|
-
}
|
|
1106
|
-
};
|
|
1107
|
-
}
|
|
1108
|
-
//#endregion
|
|
1109
1108
|
//#region src/module-runner/runner.ts
|
|
1110
1109
|
var ModuleRunner = class {
|
|
1111
1110
|
options;
|
|
@@ -1163,12 +1162,12 @@ var ModuleRunner = class {
|
|
|
1163
1162
|
visited.add(mod.id);
|
|
1164
1163
|
for (let importedModuleId of mod.imports) {
|
|
1165
1164
|
let importedModule = this.evaluatedModules.getModuleById(importedModuleId);
|
|
1166
|
-
if (
|
|
1165
|
+
if (importedModule?.promise && !importedModule.evaluated && (callstack.includes(importedModuleId) || this.isCircularRequest(importedModule, callstack, visited))) return !0;
|
|
1167
1166
|
}
|
|
1168
1167
|
return !1;
|
|
1169
1168
|
}
|
|
1170
1169
|
async cachedRequest(url, mod, callstack = [], metadata) {
|
|
1171
|
-
let meta = mod.meta, moduleId = meta.id, importee = callstack
|
|
1170
|
+
let meta = mod.meta, moduleId = meta.id, importee = callstack.at(-1);
|
|
1172
1171
|
if (importee && mod.importers.add(importee), mod.evaluated && mod.promise) return this.processImport(await mod.promise, meta, metadata);
|
|
1173
1172
|
if (mod.promise) return mod.exports && (callstack.includes(moduleId) || this.isCircularRequest(mod, callstack)) ? this.processImport(mod.exports, meta, metadata) : this.processImport(await mod.promise, meta, metadata);
|
|
1174
1173
|
let debugTimer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depup/vite",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.1-depup.0",
|
|
4
4
|
"description": "Native-ESM powered web dev build tool (with updated dependencies)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite",
|
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"lightningcss": "^1.33.0",
|
|
67
|
-
"picomatch": "^4.0.
|
|
68
|
-
"postcss": "^8.5.
|
|
69
|
-
"rolldown": "^1.2.
|
|
67
|
+
"picomatch": "^4.0.7",
|
|
68
|
+
"postcss": "^8.5.28",
|
|
69
|
+
"rolldown": "^1.2.11",
|
|
70
70
|
"tinyglobby": "^0.2.17"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@babel/parser": "^7.29.
|
|
73
|
+
"@babel/parser": "^7.29.9",
|
|
74
74
|
"@jridgewell/remapping": "^2.3.5",
|
|
75
75
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
76
76
|
"@polka/compression": "^1.0.0-next.25",
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
"@types/escape-html": "^1.0.4",
|
|
81
81
|
"@types/pnpapi": "^0.0.5",
|
|
82
82
|
"@vercel/detect-agent": "^1.2.5",
|
|
83
|
-
"@vitejs/devtools": "^0.
|
|
84
|
-
"@vitest/utils": "4.1.
|
|
83
|
+
"@vitejs/devtools": "^0.7.5",
|
|
84
|
+
"@vitest/utils": "4.1.11",
|
|
85
85
|
"@voidzero-dev/vite-task-client": "^0.2.0",
|
|
86
|
-
"artichokie": "^0.4.
|
|
87
|
-
"baseline-browser-mapping": "^2.11.
|
|
86
|
+
"artichokie": "^0.4.5",
|
|
87
|
+
"baseline-browser-mapping": "^2.11.25",
|
|
88
88
|
"cac": "^7.0.0",
|
|
89
89
|
"chokidar": "^3.6.0",
|
|
90
90
|
"connect": "^3.7.0",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"cors": "^2.8.6",
|
|
93
93
|
"cross-spawn": "^7.0.6",
|
|
94
94
|
"dotenv-expand": "^13.0.0",
|
|
95
|
-
"es-module-lexer": "^2.3.
|
|
95
|
+
"es-module-lexer": "^2.3.2",
|
|
96
96
|
"esbuild": "^0.28.2",
|
|
97
97
|
"escape-html": "^1.0.3",
|
|
98
98
|
"estree-walker": "^3.0.3",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"host-validation-middleware": "^0.1.4",
|
|
102
102
|
"http-proxy-3": "^1.23.3",
|
|
103
103
|
"launch-editor-middleware": "^2.14.1",
|
|
104
|
-
"magic-string": "^1.
|
|
104
|
+
"magic-string": "^1.4.1",
|
|
105
105
|
"mlly": "^1.8.2",
|
|
106
106
|
"mrmime": "^2.0.1",
|
|
107
107
|
"nanoid": "^5.1.16",
|
|
@@ -116,20 +116,20 @@
|
|
|
116
116
|
"postcss-modules": "^9.0.1",
|
|
117
117
|
"premove": "^4.0.0",
|
|
118
118
|
"resolve.exports": "^2.0.3",
|
|
119
|
-
"rolldown-plugin-dts": "^0.28.
|
|
119
|
+
"rolldown-plugin-dts": "^0.28.6",
|
|
120
120
|
"rollup": "^4.59.0",
|
|
121
121
|
"rollup-plugin-license": "^3.7.1",
|
|
122
|
-
"sass": "^1.
|
|
123
|
-
"sass-embedded": "^1.
|
|
122
|
+
"sass": "^1.105.0",
|
|
123
|
+
"sass-embedded": "^1.105.0",
|
|
124
124
|
"sirv": "^3.0.2",
|
|
125
125
|
"strip-literal": "^4.0.0",
|
|
126
|
-
"terser": "^5.
|
|
126
|
+
"terser": "^5.51.2",
|
|
127
127
|
"ufo": "^1.6.4",
|
|
128
128
|
"ws": "^8.21.3"
|
|
129
129
|
},
|
|
130
130
|
"peerDependencies": {
|
|
131
131
|
"@types/node": "^20.19.0 || >=22.12.0",
|
|
132
|
-
"@vitejs/devtools": "^0.
|
|
132
|
+
"@vitejs/devtools": "^0.7.1",
|
|
133
133
|
"esbuild": "^0.27.0 || ^0.28.0",
|
|
134
134
|
"jiti": ">=1.21.0",
|
|
135
135
|
"less": "^4.0.0",
|
|
@@ -201,14 +201,14 @@
|
|
|
201
201
|
"depup": {
|
|
202
202
|
"changes": {
|
|
203
203
|
"rolldown": {
|
|
204
|
-
"from": "~1.2.
|
|
205
|
-
"to": "^1.2.
|
|
204
|
+
"from": "~1.2.9",
|
|
205
|
+
"to": "^1.2.11"
|
|
206
206
|
}
|
|
207
207
|
},
|
|
208
208
|
"depsUpdated": 1,
|
|
209
209
|
"originalPackage": "vite",
|
|
210
|
-
"originalVersion": "8.
|
|
211
|
-
"processedAt": "2026-
|
|
210
|
+
"originalVersion": "8.3.1",
|
|
211
|
+
"processedAt": "2026-09-27T01:04:55.152Z",
|
|
212
212
|
"smokeTest": "failed"
|
|
213
213
|
}
|
|
214
214
|
}
|
package/types/customEvent.d.ts
CHANGED
|
@@ -39,8 +39,10 @@ export interface WebSocketConnectionPayload {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export interface InvalidatePayload {
|
|
42
|
+
/** Module URL of the invalidated module */
|
|
42
43
|
path: string
|
|
43
44
|
message: string | undefined
|
|
45
|
+
/** Module URL of the first module that invalidated the update */
|
|
44
46
|
firstInvalidatedBy: string
|
|
45
47
|
}
|
|
46
48
|
|
package/types/hmrPayload.d.ts
CHANGED
|
@@ -38,7 +38,9 @@ export interface BundledDevUpdatePayload {
|
|
|
38
38
|
|
|
39
39
|
export interface Update {
|
|
40
40
|
type: 'js-update' | 'css-update'
|
|
41
|
+
/** Module URL of the HMR boundary */
|
|
41
42
|
path: string
|
|
43
|
+
/** Module URL of the accepted module */
|
|
42
44
|
acceptedPath: string
|
|
43
45
|
timestamp: number
|
|
44
46
|
/** @internal */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
2
2
|
|
|
3
|
+
// @ts-ignore `less` may not be installed
|
|
4
|
+
import type Less from 'less'
|
|
3
5
|
// @ts-ignore `sass` may not be installed
|
|
4
6
|
import type DartSass from 'sass'
|
|
5
7
|
// @ts-ignore `sass-embedded` may not be installed
|
|
6
8
|
import type SassEmbedded from 'sass-embedded'
|
|
7
|
-
// @ts-ignore `less` may not be installed
|
|
8
|
-
import type Less from 'less'
|
|
9
9
|
// @ts-ignore `stylus` may not be installed
|
|
10
10
|
import type Stylus from 'stylus'
|
|
11
11
|
|