Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ env:
# node-sqlite3-wasm driver. The npm-package job runs a Node 20 matrix entry
# so that fallback path is exercised in CI rather than only in production.
NODE_VERSION_20: "20.20.2"
NODE_VERSION_22: "22.23.1"
NODE_VERSION_24: "24.18.0"
NODE_VERSION_22: "22.23.4"
NODE_VERSION_24: "24.22.1"

jobs:
changes:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/eval-skill-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:
# throw a false ERR_STREAM_PREMATURE_CLOSE — exactly the failure the
# skill-eval planner hits talking to external APIs. Fixed in 24.18.0
# (nodejs/node#64004). Keep in sync with NODE_VERSION_24 in ci.yml.
NODE_VERSION_24: "24.18.0"
NODE_VERSION_24: "24.22.1"

jobs:
remove-labels-on-sync:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-risk-labels-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ jobs:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '24.18.0'
node-version: '24.22.1'
- run: node --test .github/tests/pr-risk-labels.test.mjs
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
# "22" can reuse the runner's pre-cached 22.23.0, which carries the
# ERR_STREAM_PREMATURE_CLOSE regression on keep-alive fetch reuse
# (nodejs/node#64004, fixed in 22.23.1).
NODE_VERSION_22: "22.23.1"
NODE_VERSION_22: "22.23.4"

jobs:
release:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sentry-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:
# ERR_STREAM_PREMATURE_CLOSE regression on keep-alive fetch reuse
# (nodejs/node#64004, fixed in 22.23.1). This job installs from and uploads
# over HTTPS.
NODE_VERSION_22: "22.23.1"
NODE_VERSION_22: "22.23.4"

jobs:
finalize:
Expand Down
21 changes: 14 additions & 7 deletions packages/cli/test/lib/delta-upgrade.mocked.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { copyFileSync, existsSync, unlinkSync, writeFileSync } from "node:fs";
import { readFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { zstdCompressSync } from "node:zlib";
import { afterEach, beforeEach, describe, expect, test, vi } from "vitest";

import { useTestConfigDir } from "../helpers.js";
Expand Down Expand Up @@ -134,13 +135,19 @@ describe("resolveStableDelta", () => {
},
];

// A fake patch that is valid TRDIFF10 header but will fail during application
// (header says 0 control/diff/new size, which produces an empty file)
const emptyTrdiff10 = new Uint8Array(32);
// Set magic: "TRDIFF10"
const magic = new TextEncoder().encode("TRDIFF10");
emptyTrdiff10.set(magic, 0);
// All sizes stay 0 — this will produce an empty output
// A valid TRDIFF10 patch that produces an empty file, so the final
// SHA-256 check fails. Each block is a real zstd frame because newer Node
// releases reject zero-length zstd input with "unexpected end of file".
const emptyBlock = zstdCompressSync(Buffer.alloc(0));
const emptyTrdiff10 = new Uint8Array(32 + emptyBlock.length * 3);
const header = new DataView(emptyTrdiff10.buffer);
emptyTrdiff10.set(new TextEncoder().encode("TRDIFF10"), 0);
header.setBigInt64(8, BigInt(emptyBlock.length), true); // controlLen
header.setBigInt64(16, BigInt(emptyBlock.length), true); // diffLen
// newSize at offset 24 stays 0
emptyTrdiff10.set(emptyBlock, 32);
emptyTrdiff10.set(emptyBlock, 32 + emptyBlock.length);
emptyTrdiff10.set(emptyBlock, 32 + emptyBlock.length * 2);

mockFetch(async (url) => {
const urlStr = String(url);
Expand Down
Loading