diff --git a/package-lock.json b/package-lock.json index f78ad3b68..a30af3a68 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3835,13 +3835,18 @@ "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, "node_modules/@types/node": { - "version": "20.10.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz", - "integrity": "sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg==", + "version": "20.17.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.10.tgz", + "integrity": "sha512-/jrvh5h6NXhEauFFexRin69nA0uHJ5gwk4iDivp/DeoEua3uwCUto6PC86IpRITBOs4+6i2I56K5x5b6WYGXHA==", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.2" } }, + "node_modules/@types/node/node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + }, "node_modules/@types/pg": { "version": "8.11.2", "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.11.2.tgz", @@ -14551,7 +14556,8 @@ "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true }, "node_modules/unicorn-magic": { "version": "0.1.0", @@ -15907,7 +15913,7 @@ "@types/lodash.kebabcase": "^4.1.9", "@types/lodash.merge": "^4.6.9", "@types/lodash.snakecase": "^4.1.9", - "@types/node": "^18.16.0", + "@types/node": "^20.8.4", "@types/pg": "^8.11.2", "@types/pg-format": "^1.0.5", "@types/strip-ansi": "^3.0.0", @@ -15919,15 +15925,6 @@ "vitest": "^2.1.5" } }, - "packages/zero-cache/node_modules/@types/node": { - "version": "18.19.34", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.34.tgz", - "integrity": "sha512-eXF4pfBNV5DAMKGbI02NnDtWrQ40hAN558/2vvS4gMpMIxaf6JmD7YjnZbq0Q9TDSSkKBamime8ewRoomHdt4g==", - "dev": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, "packages/zero-cache/node_modules/@types/ws": { "version": "8.5.12", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", @@ -18931,11 +18928,18 @@ "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, "@types/node": { - "version": "20.10.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz", - "integrity": "sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg==", + "version": "20.17.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.10.tgz", + "integrity": "sha512-/jrvh5h6NXhEauFFexRin69nA0uHJ5gwk4iDivp/DeoEua3uwCUto6PC86IpRITBOs4+6i2I56K5x5b6WYGXHA==", "requires": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.2" + }, + "dependencies": { + "undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + } } }, "@types/pg": { @@ -26396,7 +26400,8 @@ "undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true }, "unicorn-magic": { "version": "0.1.0", @@ -27157,7 +27162,7 @@ "@types/lodash.kebabcase": "^4.1.9", "@types/lodash.merge": "^4.6.9", "@types/lodash.snakecase": "^4.1.9", - "@types/node": "^18.16.0", + "@types/node": "^20.8.4", "@types/pg": "^8.11.2", "@types/pg-format": "^1.0.5", "@types/strip-ansi": "^3.0.0", @@ -27188,15 +27193,6 @@ "zqlite": "0.0.0" }, "dependencies": { - "@types/node": { - "version": "18.19.34", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.34.tgz", - "integrity": "sha512-eXF4pfBNV5DAMKGbI02NnDtWrQ40hAN558/2vvS4gMpMIxaf6JmD7YjnZbq0Q9TDSSkKBamime8ewRoomHdt4g==", - "dev": true, - "requires": { - "undici-types": "~5.26.4" - } - }, "@types/ws": { "version": "8.5.12", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", diff --git a/packages/zero-cache/package.json b/packages/zero-cache/package.json index 6d4f1cd39..10135398e 100644 --- a/packages/zero-cache/package.json +++ b/packages/zero-cache/package.json @@ -59,7 +59,7 @@ "@types/lodash.kebabcase": "^4.1.9", "@types/lodash.merge": "^4.6.9", "@types/lodash.snakecase": "^4.1.9", - "@types/node": "^18.16.0", + "@types/node": "^20.8.4", "@types/pg": "^8.11.2", "@types/pg-format": "^1.0.5", "@types/strip-ansi": "^3.0.0", diff --git a/packages/zero-cache/src/types/processes.ts b/packages/zero-cache/src/types/processes.ts index 7875fe0ab..a17c7a33b 100644 --- a/packages/zero-cache/src/types/processes.ts +++ b/packages/zero-cache/src/types/processes.ts @@ -159,13 +159,13 @@ export function childWorker( const ext = path.extname(import.meta.url); // modulePath is .ts. If we have been compiled, it should be changed to .js modulePath = modulePath.replace(/\.ts$/, ext); - const absModulePath = new URL(`../${modulePath}`, import.meta.url).pathname; + const moduleUrl = new URL(`../${modulePath}`, import.meta.url); args.push(...process.argv.slice(2)); if (singleProcessMode()) { const [parent, child] = inProcChannel(); - import(absModulePath) + import(moduleUrl.href) .then(({default: runWorker}) => runWorker(parent, env ?? process.env, ...args).then( () => child.emit('close', 0), @@ -176,7 +176,7 @@ export function childWorker( return child; } return wrap( - fork(absModulePath, args, { + fork(moduleUrl, args, { detached: true, // do not automatically propagate SIGINT serialization: 'advanced', // use structured clone for IPC env,