Skip to content

Commit 11495ca

Browse files
committed
2.1.1 bun fix
1 parent 71f6afe commit 11495ca

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

bun.lockb

-37.7 KB
Binary file not shown.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pm2/agent",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"description": "PM2.io Agent Daemon",
55
"main": "index.js",
66
"repository": {
@@ -22,7 +22,7 @@
2222
"dayjs": "~1.8.24",
2323
"debug": "~4.3.1",
2424
"eventemitter2": "~5.0.1",
25-
"fast-json-patch": "^3.0.0-1",
25+
"fast-json-patch": "^3.1.0",
2626
"fclone": "~1.0.11",
2727
"pm2-axon": "~4.0.1",
2828
"pm2-axon-rpc": "~0.7.0",

src/InteractorClient.js

+5
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ module.exports = class InteractorDaemonizer {
190190
const child = childProcess.spawn(binary, [InteractorJS], {
191191
silent: false,
192192
detached: true,
193+
windowsHide: true,
193194
cwd: process.cwd(),
194195
env: Object.assign({
195196
PM2_HOME: cst.PM2_HOME,
@@ -233,6 +234,10 @@ module.exports = class InteractorDaemonizer {
233234
return cb(err)
234235
})
235236

237+
if (cst.IS_BUN === true) {
238+
return cb(null, {}, child)
239+
}
240+
236241
child.unref()
237242

238243
const timeout = setTimeout(_ => {

src/InteractorDaemon.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ const InteractorDaemon = module.exports = class InteractorDaemon {
4646
* @param {Object} data
4747
*/
4848
sendToParent (data) {
49-
if (!process.connected || !process.send) return console.log('Could not send data to parent')
49+
if (!process.connected || !process.send || cst.IS_BUN == true)
50+
return console.log('Could not send data to parent')
5051

5152
try {
5253
process.send(data)

0 commit comments

Comments
 (0)