You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From node 19 (e.g. Node 20, Node 22 LTS), they set keepAlive by default to true. This causes a behaviour (bug?) nodejs/node#47228 where the process also does not exit for 30 seconds.
This can be fixed with this patch
before:
node node_modules/pg-formatter/bin/postinstall-script.js 0,50s user 0,25s system 2% cpu 30,255 total
after:
node node_modules/pg-formatter/bin/postinstall-script.js 0,60s user 0,27s system 61% cpu 1,391 total
patch: (too lazy to make a PR)
diff --git a/bin/postinstall-script.cjs b/bin/postinstall-script.cjs
index 1049542..19e7db8 100644
--- a/bin/postinstall-script.cjs+++ b/bin/postinstall-script.cjs@@ -5,6 +5,9 @@ const zlib = require('node:zlib');
const rimraf = require('rimraf');
const tar = require('tar-fs');
+// skript takes 30s otherwise+// https://github.com/nodejs/node/issues/47228 where the process also does not exit for 30 seconds.+https.globalAgent.keepAlive = false;
const destination = path.resolve(__dirname, '../src/pg-formatter');
const secondaryDestination = path.resolve(__dirname, '../dist/pg-formatter');
const libraryUrl = `https://github.com/darold/pgFormatter/archive/refs/tags/v5.5.tar.gz`;
The text was updated successfully, but these errors were encountered:
From node 19 (e.g. Node 20, Node 22 LTS), they set keepAlive by default to true. This causes a behaviour (bug?) nodejs/node#47228 where the process also does not exit for 30 seconds.
This can be fixed with this patch
before:
node node_modules/pg-formatter/bin/postinstall-script.js 0,50s user 0,25s system 2% cpu 30,255 total
after:
node node_modules/pg-formatter/bin/postinstall-script.js 0,60s user 0,27s system 61% cpu 1,391 total
patch: (too lazy to make a PR)
The text was updated successfully, but these errors were encountered: