From 436d576663fb0c8e3ec32f97af6aa9eb1823715f Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Sun, 7 Sep 2025 12:39:21 +0000 Subject: [PATCH 1/2] fix: update test dependencies to support Node.js 20+ - Update tap from ^0.7.1 to ^18.0.0 for Node 20+ compatibility - Update chai from ~1.9.1 to ^4.3.0 - Update jshint from ^2.6.3 to ^2.13.0 - Update rimraf from ~2.2.8 to ^5.0.0 Fixes CI test failures caused by outdated dependencies incompatible with modern Node.js versions. Co-authored-by: Christian Nuss --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index fd0a9a9..5bc9f02 100644 --- a/package.json +++ b/package.json @@ -45,9 +45,9 @@ }, "preferGlobal": true, "devDependencies": { - "chai": "~1.9.1", - "jshint": "^2.6.3", - "rimraf": "~2.2.8", - "tap": "^0.7.1" + "chai": "^4.3.0", + "jshint": "^2.13.0", + "rimraf": "^5.0.0", + "tap": "^18.0.0" } } From 4758a22157375425980b7ec421859def20647bc7 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Sun, 7 Sep 2025 12:53:47 +0000 Subject: [PATCH 2/2] fix: update test code for chai v4 API compatibility and complete procfiled rebrand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix assert.lengthOf() calls to use assert.equal().length for chai v4 compatibility - Update FOREMAN_WORKER_NAME to PROCFILED_WORKER_NAME environment variable - Update module headers from "foreman" to "procfiled" in source files - Ensure all test assertions work with updated dependency versions 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Christian Nuss --- demo/server.js | 2 +- forward.js | 2 +- lib/proc.js | 2 +- nf.js | 2 +- proxy.js | 2 +- test/console-output.test.js | 4 ++-- test/console-trim.test.js | 4 ++-- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/demo/server.js b/demo/server.js index 5f39a19..2e63887 100644 --- a/demo/server.js +++ b/demo/server.js @@ -1,5 +1,5 @@ // Copyright IBM Corp. 2012,2016. All Rights Reserved. -// Node module: foreman +// Node module: procfiled // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT diff --git a/forward.js b/forward.js index 2243c37..6fee840 100644 --- a/forward.js +++ b/forward.js @@ -1,5 +1,5 @@ // Copyright IBM Corp. 2012,2016. All Rights Reserved. -// Node module: foreman +// Node module: procfiled // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT diff --git a/lib/proc.js b/lib/proc.js index c9e0021..d9eddff 100644 --- a/lib/proc.js +++ b/lib/proc.js @@ -131,7 +131,7 @@ function start(procs, requirements, envs, portarg, emitter){ }; p.env.PORT = port + j + k * 100; - p.env.FOREMAN_WORKER_NAME = p.env.FOREMAN_WORKER_NAME || key + "." + (i + 1); + p.env.PROCFILED_WORKER_NAME = p.env.PROCFILED_WORKER_NAME || key + "." + (i + 1); run(key + "." + (i + 1), p, emitter); diff --git a/nf.js b/nf.js index 4d0d8a3..c678d71 100755 --- a/nf.js +++ b/nf.js @@ -295,7 +295,7 @@ program } envl.push({ key: "PORT", value: conf.port }); envl.push({ - key: "FOREMAN_WORKER_NAME", + key: "PROCFILED_WORKER_NAME", value: conf.process + "." + conf.number, }); diff --git a/proxy.js b/proxy.js index 98e037d..c2ba400 100644 --- a/proxy.js +++ b/proxy.js @@ -1,5 +1,5 @@ // Copyright IBM Corp. 2012,2016. All Rights Reserved. -// Node module: foreman +// Node module: procfiled // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT diff --git a/test/console-output.test.js b/test/console-output.test.js index 090dc40..f5efcd9 100644 --- a/test/console-output.test.js +++ b/test/console-output.test.js @@ -47,7 +47,7 @@ c.log('a key', null, 'a log message'); assertLogged('log', /^a log message$/); c.raw = false; -assert.lengthOf(c.trim('a very long string this is!', 5), 6); +assert.equal(c.trim('a very long string this is!', 5).length, 6); function makeLogger(collector) { return function() { @@ -65,7 +65,7 @@ function assertLogged(logName, pattern) { var actual = logs[logName][logs[logName].length - 1]; Object.keys(logs).forEach(function (log) { - assert.lengthOf(logs[log], logName === log ? 1 : 0); + assert.equal(logs[log].length, logName === log ? 1 : 0); }); assert.match(actual, pattern); diff --git a/test/console-trim.test.js b/test/console-trim.test.js index 20db4e9..37c942c 100644 --- a/test/console-trim.test.js +++ b/test/console-trim.test.js @@ -16,8 +16,8 @@ var blue = colors.blue('blue'); var long = 'Roses are red, Violets are blue, this string is long, and should be trimmed, too!'; var colorLong = long.replace('red', red).replace('blue', blue); -assert.lengthOf(long, 81); -assert.lengthOf(colorLong, 99); +assert.equal(long.length, 81); +assert.equal(colorLong.length, 99); assert.equal(Console.trim(colorLong, 50), Console.trim(long, 50)); assert.equal(Console.trim(colorLong, long.length), colorLong,