]> Piment Noir Git Repositories - poolifier.git/commit
fix!: require Node.js versions with ESM cluster support (#3348)
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 16 Oct 2026 22:42:38 +0000 (00:42 +0200)
committerGitHub <noreply@github.com>
Fri, 16 Oct 2026 22:42:38 +0000 (00:42 +0200)
commit7df0edbd60e53f789312ca64920c37d827aa69dc
treeb2362efd83785a69f94ccb320929edcd18d93bc9
parente0612414a9a74a798f12acb20edea170603e4696
fix!: require Node.js versions with ESM cluster support (#3348)

* fix!: require Node.js versions with ESM cluster support

Migrate cluster fixtures and benchmarks to ESM, retain explicit CommonJS coverage, and test the exact minimum Node.js releases in CI.

BREAKING CHANGE: Node.js ^22.18.0 || >=24.3.0 is required. Upgrade older Node.js installations before updating Poolifier.

Fixes #782

* fix(examples): remove CommonJS cluster build workarounds

Build and start all six cluster and hybrid server examples as ESM. Remove redundant start:esm scripts and extension-dependent worker paths; retain public CommonJS library support.

* fix(examples): declare Node.js requirements for ESM cluster workers

Align the six standalone cluster and hybrid examples with the supported Node.js range. This declares compatibility and enables package-manager engine checks without adding a runtime guard or changing dependencies.

* docs: remove unnecessary ESM background from README

* docs: remove unnecessary cluster startup explanations
47 files changed:
.github/workflows/ci.yml
README.md
benchmarks/benchmarks-utils.mjs
benchmarks/internal/cluster-worker.mjs [moved from benchmarks/internal/cluster-worker.cjs with 55% similarity]
eslint.config.js
examples/typescript/http-server-pool/express-cluster/package.json
examples/typescript/http-server-pool/express-cluster/rollup.config.ts
examples/typescript/http-server-pool/express-cluster/src/main.ts
examples/typescript/http-server-pool/express-hybrid/package.json
examples/typescript/http-server-pool/express-hybrid/rollup.config.ts
examples/typescript/http-server-pool/express-hybrid/src/main.ts
examples/typescript/http-server-pool/fastify-cluster/package.json
examples/typescript/http-server-pool/fastify-cluster/rollup.config.ts
examples/typescript/http-server-pool/fastify-cluster/src/main.ts
examples/typescript/http-server-pool/fastify-hybrid/package.json
examples/typescript/http-server-pool/fastify-hybrid/rollup.config.ts
examples/typescript/http-server-pool/fastify-hybrid/src/main.ts
examples/typescript/websocket-server-pool/ws-cluster/package.json
examples/typescript/websocket-server-pool/ws-cluster/rollup.config.ts
examples/typescript/websocket-server-pool/ws-cluster/src/main.ts
examples/typescript/websocket-server-pool/ws-hybrid/package.json
examples/typescript/websocket-server-pool/ws-hybrid/rollup.config.ts
examples/typescript/websocket-server-pool/ws-hybrid/src/main.ts
package.json
tests/pools/abstract-pool.test.mjs
tests/pools/cluster/dynamic.test.mjs
tests/pools/cluster/fixed.test.mjs
tests/pools/cluster/module-formats.test.mjs [new file with mode: 0644]
tests/pools/prototype-pollution.test.mjs
tests/pools/selection-strategies/selection-strategies-utils.test.mjs
tests/pools/selection-strategies/selection-strategies.test.mjs
tests/pools/utils.test.mjs
tests/pools/worker-exit.test.mjs
tests/pools/worker-node.test.mjs
tests/worker-files/cluster/asyncErrorWorker.mjs [moved from tests/worker-files/cluster/asyncErrorWorker.cjs with 66% similarity]
tests/worker-files/cluster/asyncWorker.mjs [moved from tests/worker-files/cluster/asyncWorker.cjs with 58% similarity]
tests/worker-files/cluster/crashWorker.mjs [moved from tests/worker-files/cluster/crashWorker.cjs with 85% similarity]
tests/worker-files/cluster/echoWorker.mjs [new file with mode: 0644]
tests/worker-files/cluster/emptyWorker.cjs [deleted file]
tests/worker-files/cluster/emptyWorker.mjs [new file with mode: 0644]
tests/worker-files/cluster/errorWorker.mjs [moved from tests/worker-files/cluster/errorWorker.cjs with 53% similarity]
tests/worker-files/cluster/longRunningWorkerHardBehavior.mjs [moved from tests/worker-files/cluster/longRunningWorkerHardBehavior.cjs with 59% similarity]
tests/worker-files/cluster/longRunningWorkerSoftBehavior.mjs [moved from tests/worker-files/cluster/longRunningWorkerSoftBehavior.cjs with 60% similarity]
tests/worker-files/cluster/prototypePollutionWorker.mjs [moved from tests/worker-files/cluster/prototypePollutionWorker.cjs with 75% similarity]
tests/worker-files/cluster/testMultipleTaskFunctionsWorker.mjs [moved from tests/worker-files/cluster/testMultipleTaskFunctionsWorker.cjs with 72% similarity]
tests/worker-files/cluster/testTaskFunctionObjectsWorker.mjs [moved from tests/worker-files/cluster/testTaskFunctionObjectsWorker.cjs with 68% similarity]
tests/worker-files/cluster/testWorker.mjs [moved from tests/worker-files/cluster/testWorker.cjs with 62% similarity]