vike 0.4.267-commit-5676e14 → 0.4.267-commit-feffb0f

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 +1 @@
1
- export declare const PROJECT_VERSION: '0.4.267-commit-5676e14';
1
+ export declare const PROJECT_VERSION: '0.4.267-commit-feffb0f';
@@ -1,2 +1,2 @@
1
1
  // Automatically updated by @brillout/release-me
2
- export const PROJECT_VERSION = '0.4.267-commit-5676e14';
2
+ export const PROJECT_VERSION = '0.4.267-commit-feffb0f';
@@ -13,8 +13,17 @@ function installUncaughtErrorHandlers() {
13
13
  return;
14
14
  process?.addListener?.('uncaughtException', (err) => {
15
15
  console.error(err);
16
+ // Writing to stdout/stderr fails if, for example, the terminal was closed — exit like Node.js does by default, otherwise the console.error() above fails again and re-triggers this handler, endlessly.
17
+ // Wrapping console.error() with try-catch doesn't help: it never throws, the write error is emitted later as an uncaught error.
18
+ // https://github.com/vikejs/vike/issues/3577
19
+ if (isWriteError(err))
20
+ process.exit(1);
16
21
  });
17
22
  process?.addListener?.('unhandledRejection', (err) => {
18
23
  console.error(err);
19
24
  });
20
25
  }
26
+ function isWriteError(err) {
27
+ const { syscall, code } = (err ?? {});
28
+ return syscall === 'write' && (code === 'EPIPE' || code === 'EIO');
29
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vike",
3
- "version": "0.4.267-commit-5676e14",
3
+ "version": "0.4.267-commit-feffb0f",
4
4
  "repository": "https://github.com/vikejs/vike",
5
5
  "exports": {
6
6
  "./server": {
@@ -260,7 +260,7 @@
260
260
  "./fetch.js"
261
261
  ],
262
262
  "devDependencies": {
263
- "@brillout/release-me": "^0.4.18",
263
+ "@brillout/release-me": "^0.4.19",
264
264
  "@types/babel__core": "^7.20.5",
265
265
  "@types/estree": "^1.0.5",
266
266
  "@types/node": "^20.10.5",