vite 6.0.2 → 6.0.3

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 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()
@@ -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 ("e" in result) {
264
- throw reviveInvokeError(result.e);
263
+ if ("error" in result) {
264
+ throw reviveInvokeError(result.error);
265
265
  }
266
- return result.r;
266
+ return result.result;
267
267
  }
268
268
  };
269
269
  }
@@ -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
- if (index != null) {
714
- const frag = text.slice(curIndex, index);
715
- el.appendChild(document.createTextNode(frag));
716
- const link = document.createElement("a");
717
- link.textContent = file;
718
- link.className = "file-link";
719
- link.onclick = () => {
720
- fetch(
721
- new URL(
722
- `${base$1}__open-in-editor?file=${encodeURIComponent(file)}`,
723
- import.meta.url
724
- )
725
- );
726
- };
727
- el.appendChild(link);
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
  }
@@ -1,4 +1,4 @@
1
- import { O as commonjsGlobal, N as getDefaultExportFromCjs } from './dep-A4nAWF7x.js';
1
+ import { O as commonjsGlobal, N as getDefaultExportFromCjs } from './dep-yUJfKD1i.js';
2
2
  import require$$0$2 from 'fs';
3
3
  import require$$0 from 'postcss';
4
4
  import require$$0$1 from 'path';
@@ -1,4 +1,4 @@
1
- import { N as getDefaultExportFromCjs } from './dep-A4nAWF7x.js';
1
+ import { N as getDefaultExportFromCjs } from './dep-yUJfKD1i.js';
2
2
  import require$$0 from 'path';
3
3
  import { l as lib } from './dep-3RmXg9uo.js';
4
4