vite 6.0.2 → 6.0.4
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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
- package/bin/vite.js +4 -0
- package/dist/client/client.mjs +23 -25
- package/dist/node/chunks/{dep-A4nAWF7x.js → dep-BZMjGe_U.js} +636 -353
- package/dist/node/chunks/{dep-DFNV1bxH.js → dep-CrWUFq3l.js} +1 -1
- package/dist/node/chunks/{dep-CoVxupJ6.js → dep-pSQn2Hds.js} +1 -1
- package/dist/node/cli.js +5 -5
- package/dist/node/index.d.ts +14 -9
- package/dist/node/index.js +4 -4
- package/dist/node/module-runner.d.ts +2 -2
- package/dist/node/module-runner.js +11 -11
- package/dist/node-cjs/publicUtils.cjs +106 -68
- package/package.json +15 -14
package/bin/vite.js
CHANGED
@@ -7,6 +7,10 @@ if (!import.meta.url.includes('node_modules')) {
|
|
7
7
|
// only available as dev dependency
|
8
8
|
await import('source-map-support').then((r) => r.default.install())
|
9
9
|
} catch {}
|
10
|
+
|
11
|
+
process.on('unhandledRejection', (err) => {
|
12
|
+
throw new Error('UNHANDLED PROMISE REJECTION', { cause: err })
|
13
|
+
})
|
10
14
|
}
|
11
15
|
|
12
16
|
global.__vite_start_time = performance.now()
|
package/dist/client/client.mjs
CHANGED
@@ -219,7 +219,7 @@ let urlAlphabet =
|
|
219
219
|
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
220
220
|
let nanoid = (size = 21) => {
|
221
221
|
let id = '';
|
222
|
-
let i = size;
|
222
|
+
let i = size | 0;
|
223
223
|
while (i--) {
|
224
224
|
id += urlAlphabet[(Math.random() * 64) | 0];
|
225
225
|
}
|
@@ -260,10 +260,10 @@ const createInvokeableTransport = (transport) => {
|
|
260
260
|
data
|
261
261
|
}
|
262
262
|
});
|
263
|
-
if ("
|
264
|
-
throw reviveInvokeError(result.
|
263
|
+
if ("error" in result) {
|
264
|
+
throw reviveInvokeError(result.error);
|
265
265
|
}
|
266
|
-
return result.
|
266
|
+
return result.result;
|
267
267
|
}
|
268
268
|
};
|
269
269
|
}
|
@@ -286,11 +286,11 @@ const createInvokeableTransport = (transport) => {
|
|
286
286
|
if (!promise) return;
|
287
287
|
if (promise.timeoutId) clearTimeout(promise.timeoutId);
|
288
288
|
rpcPromises.delete(invokeId);
|
289
|
-
const {
|
290
|
-
if (
|
291
|
-
promise.reject(
|
289
|
+
const { error, result } = data.data;
|
290
|
+
if (error) {
|
291
|
+
promise.reject(error);
|
292
292
|
} else {
|
293
|
-
promise.resolve(
|
293
|
+
promise.resolve(result);
|
294
294
|
}
|
295
295
|
return;
|
296
296
|
}
|
@@ -710,23 +710,21 @@ class ErrorOverlay extends HTMLElement {
|
|
710
710
|
fileRE.lastIndex = 0;
|
711
711
|
while (match = fileRE.exec(text)) {
|
712
712
|
const { 0: file, index } = match;
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
curIndex += frag.length + file.length;
|
729
|
-
}
|
713
|
+
const frag = text.slice(curIndex, index);
|
714
|
+
el.appendChild(document.createTextNode(frag));
|
715
|
+
const link = document.createElement("a");
|
716
|
+
link.textContent = file;
|
717
|
+
link.className = "file-link";
|
718
|
+
link.onclick = () => {
|
719
|
+
fetch(
|
720
|
+
new URL(
|
721
|
+
`${base$1}__open-in-editor?file=${encodeURIComponent(file)}`,
|
722
|
+
import.meta.url
|
723
|
+
)
|
724
|
+
);
|
725
|
+
};
|
726
|
+
el.appendChild(link);
|
727
|
+
curIndex += frag.length + file.length;
|
730
728
|
}
|
731
729
|
}
|
732
730
|
}
|