nitropack-nightly 2.11.5-20250307-083241.14283fb5 → 2.11.5-20250307-123238.231c516e

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.
@@ -2310,8 +2310,7 @@ class NodeDevWorker {
2310
2310
  const worker = new Worker(workerEntryPath, {
2311
2311
  env: {
2312
2312
  ...process.env,
2313
- NITRO_DEV_WORKER_ID: String(this.#id),
2314
- NITRO_DEV_WORKER_DIR: this.#workerDir
2313
+ NITRO_DEV_WORKER_ID: String(this.#id)
2315
2314
  }
2316
2315
  });
2317
2316
  worker.once("exit", (code) => {
@@ -1,3 +1,3 @@
1
- const version = "2.11.5-20250307-083241.14283fb5";
1
+ const version = "2.11.5-20250307-123238.231c516e";
2
2
 
3
3
  export { version };
@@ -1,3 +1,3 @@
1
- const version = "2.11.5-20250307-083241.14283fb5";
1
+ const version = "2.11.5-20250307-123238.231c516e";
2
2
 
3
3
  export { version };
@@ -1,3 +1,3 @@
1
- const version = "2.11.5-20250307-083241.14283fb5";
1
+ const version = "2.11.5-20250307-123238.231c516e";
2
2
 
3
3
  export { version };
@@ -1,4 +1,5 @@
1
1
  import "#nitro-internal-pollyfills";
2
+ import { tmpdir } from "node:os";
2
3
  import { useNitroApp } from "nitropack/runtime";
3
4
  import { runTask } from "nitropack/runtime";
4
5
  import { trapUnhandledNodeErrors } from "nitropack/runtime/internal";
@@ -9,7 +10,6 @@ import { join } from "node:path";
9
10
  import nodeCrypto from "node:crypto";
10
11
  import { parentPort, threadId } from "node:worker_threads";
11
12
  import wsAdapter from "crossws/adapters/node";
12
- import { isCI } from "std-env";
13
13
  import {
14
14
  defineEventHandler,
15
15
  getQuery,
@@ -20,11 +20,7 @@ import {
20
20
  if (!globalThis.crypto) {
21
21
  globalThis.crypto = nodeCrypto;
22
22
  }
23
- const {
24
- NITRO_NO_UNIX_SOCKET,
25
- NITRO_DEV_WORKER_DIR = ".",
26
- NITRO_DEV_WORKER_ID
27
- } = process.env;
23
+ const { NITRO_NO_UNIX_SOCKET, NITRO_DEV_WORKER_ID } = process.env;
28
24
  trapUnhandledNodeErrors();
29
25
  parentPort?.on("message", (msg) => {
30
26
  if (msg && msg.event === "shutdown") {
@@ -93,15 +89,17 @@ function listen(useRandomPort = Boolean(
93
89
  });
94
90
  }
95
91
  function getSocketAddress() {
96
- const socketName = `worker-${process.pid}-${threadId}-${Math.round(Math.random() * 1e4)}-${NITRO_DEV_WORKER_ID}.sock`;
97
- const socketPath = join(NITRO_DEV_WORKER_DIR, socketName);
92
+ const socketName = `nitro-worker-${process.pid}-${threadId}-${NITRO_DEV_WORKER_ID}-${Math.round(Math.random() * 1e4)}.sock`;
98
93
  if (process.platform === "win32") {
99
- return join(String.raw`\\.\pipe\nitro`, socketPath);
94
+ return join(String.raw`\\.\pipe`, socketName);
100
95
  }
101
- if (process.platform === "linux" && !isCI) {
102
- return `\0${socketPath}`;
96
+ if (process.platform === "linux") {
97
+ const nodeMajor = Number.parseInt(process.versions.node.split(".")[0], 10);
98
+ if (nodeMajor >= 20) {
99
+ return `\0${socketName}`;
100
+ }
103
101
  }
104
- return socketPath;
102
+ return join(tmpdir(), socketName);
105
103
  }
106
104
  async function shutdown() {
107
105
  server.closeAllConnections?.();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nitropack-nightly",
3
- "version": "2.11.5-20250307-083241.14283fb5",
3
+ "version": "2.11.5-20250307-123238.231c516e",
4
4
  "description": "Build and Deploy Universal JavaScript Servers",
5
5
  "repository": "nitrojs/nitro",
6
6
  "license": "MIT",