mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-26 16:06:16 +00:00
build: raise Node 22 compatibility floor to 22.16
This commit is contained in:
@@ -56,7 +56,7 @@ describe("resolvePreferredNodePath", () => {
|
||||
const execFile = vi
|
||||
.fn()
|
||||
.mockResolvedValueOnce({ stdout: "18.0.0\n", stderr: "" }) // execPath too old
|
||||
.mockResolvedValueOnce({ stdout: "22.12.0\n", stderr: "" }); // system node ok
|
||||
.mockResolvedValueOnce({ stdout: "22.16.0\n", stderr: "" }); // system node ok
|
||||
|
||||
const result = await resolvePreferredNodePath({
|
||||
env: {},
|
||||
@@ -73,7 +73,7 @@ describe("resolvePreferredNodePath", () => {
|
||||
it("ignores execPath when it is not node", async () => {
|
||||
mockNodePathPresent(darwinNode);
|
||||
|
||||
const execFile = vi.fn().mockResolvedValue({ stdout: "22.12.0\n", stderr: "" });
|
||||
const execFile = vi.fn().mockResolvedValue({ stdout: "22.16.0\n", stderr: "" });
|
||||
|
||||
const result = await resolvePreferredNodePath({
|
||||
env: {},
|
||||
@@ -93,8 +93,8 @@ describe("resolvePreferredNodePath", () => {
|
||||
it("uses system node when it meets the minimum version", async () => {
|
||||
mockNodePathPresent(darwinNode);
|
||||
|
||||
// Node 22.12.0+ is the minimum required version
|
||||
const execFile = vi.fn().mockResolvedValue({ stdout: "22.12.0\n", stderr: "" });
|
||||
// Node 22.16.0+ is the minimum required version
|
||||
const execFile = vi.fn().mockResolvedValue({ stdout: "22.16.0\n", stderr: "" });
|
||||
|
||||
const result = await resolvePreferredNodePath({
|
||||
env: {},
|
||||
@@ -111,8 +111,8 @@ describe("resolvePreferredNodePath", () => {
|
||||
it("skips system node when it is too old", async () => {
|
||||
mockNodePathPresent(darwinNode);
|
||||
|
||||
// Node 22.11.x is below minimum 22.12.0
|
||||
const execFile = vi.fn().mockResolvedValue({ stdout: "22.11.0\n", stderr: "" });
|
||||
// Node 22.15.x is below minimum 22.16.0
|
||||
const execFile = vi.fn().mockResolvedValue({ stdout: "22.15.0\n", stderr: "" });
|
||||
|
||||
const result = await resolvePreferredNodePath({
|
||||
env: {},
|
||||
@@ -168,7 +168,7 @@ describe("resolveStableNodePath", () => {
|
||||
it("resolves versioned node@22 formula to opt symlink", async () => {
|
||||
mockNodePathPresent("/opt/homebrew/opt/node@22/bin/node");
|
||||
|
||||
const result = await resolveStableNodePath("/opt/homebrew/Cellar/node@22/22.12.0/bin/node");
|
||||
const result = await resolveStableNodePath("/opt/homebrew/Cellar/node@22/22.16.0/bin/node");
|
||||
expect(result).toBe("/opt/homebrew/opt/node@22/bin/node");
|
||||
});
|
||||
|
||||
@@ -218,8 +218,8 @@ describe("resolveSystemNodeInfo", () => {
|
||||
it("returns supported info when version is new enough", async () => {
|
||||
mockNodePathPresent(darwinNode);
|
||||
|
||||
// Node 22.12.0+ is the minimum required version
|
||||
const execFile = vi.fn().mockResolvedValue({ stdout: "22.12.0\n", stderr: "" });
|
||||
// Node 22.16.0+ is the minimum required version
|
||||
const execFile = vi.fn().mockResolvedValue({ stdout: "22.16.0\n", stderr: "" });
|
||||
|
||||
const result = await resolveSystemNodeInfo({
|
||||
env: {},
|
||||
@@ -229,7 +229,7 @@ describe("resolveSystemNodeInfo", () => {
|
||||
|
||||
expect(result).toEqual({
|
||||
path: darwinNode,
|
||||
version: "22.12.0",
|
||||
version: "22.16.0",
|
||||
supported: true,
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user