@corca-org/ceal 1.0.26 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/launch.js +15 -8
  2. package/package.json +6 -6
package/bin/launch.js CHANGED
@@ -24,26 +24,33 @@ export const PATCHED_NODE_LINE_MINIMUMS = { 22: "22.23.4", 24: "24.22.1", 26: "2
24
24
 
25
25
  /** The one refusal line every Node startup guard prints before any spawn or decode. */
26
26
  export function patchedNodeRefusalLine(selected) {
27
- return `Node ${selected} is refused before decoding: CVE-2026-111497 (Node.js bundled-Brotli decoder remote code execution) affects every release below ${PATCHED_NODE_LINE_MINIMUMS[22]} / ${PATCHED_NODE_LINE_MINIMUMS[24]} / ${PATCHED_NODE_LINE_MINIMUMS[26]}; run a patched release.`;
27
+ return `Node ${selected} is refused before decoding: CVE-2026-111497 (Node.js bundled-Brotli decoder remote code execution) affects every release below ${PATCHED_NODE_LINE_MINIMUMS[22]} / ${PATCHED_NODE_LINE_MINIMUMS[24]} / ${PATCHED_NODE_LINE_MINIMUMS[26]}, and a prerelease (nightly/RC) build is refused because whether it carries the fix is unproven; run a patched release.`;
28
28
  }
29
29
 
30
30
  function nodeParts(version) {
31
- const match = /^v?(\d+)\.(\d+)\.(\d+)(?:[+-].*)?$/u.exec(String(version));
31
+ const match = /^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z._-]+))?(?:\+[0-9A-Za-z._-]+)?$/u.exec(String(version));
32
32
  if (match === null) return null;
33
- return [Number(match[1]), Number(match[2]), Number(match[3])];
33
+ return { numbers: [Number(match[1]), Number(match[2]), Number(match[3])], prerelease: match[4] !== undefined };
34
34
  }
35
35
 
36
36
  function partsAtLeast(parts, minimum) {
37
37
  const floor = nodeParts(minimum);
38
38
  if (floor === null) return false;
39
- if (parts[1] !== floor[1]) return parts[1] > floor[1];
40
- return parts[2] >= floor[2];
39
+ if (parts[1] !== floor.numbers[1]) return parts[1] > floor.numbers[1];
40
+ return parts[2] >= floor.numbers[2];
41
41
  }
42
42
 
43
- /** Whether a Node version carries the CVE-2026-111497 Brotli fix. */
43
+ /**
44
+ * Whether a Node version carries the CVE-2026-111497 Brotli fix. This mirrors
45
+ * the one owner in gateway/scripts/runtime-artifact-contract.ts: a stable
46
+ * release at or past the floor, and no semver prerelease at any line, because
47
+ * whether a nightly/RC build cut before the fix merged to main contains it is
48
+ * unknown. Build metadata (`+...`) changes no precedence and stays admissible.
49
+ */
44
50
  export function isPatchedNodeReleaseVersion(version) {
45
- const parts = nodeParts(version);
46
- if (parts === null) return false;
51
+ const parsed = nodeParts(version);
52
+ if (parsed === null || parsed.prerelease) return false;
53
+ const parts = parsed.numbers;
47
54
  if (parts[0] === 22) return partsAtLeast(parts, PATCHED_NODE_LINE_MINIMUMS[22]);
48
55
  if (parts[0] === 24) return partsAtLeast(parts, PATCHED_NODE_LINE_MINIMUMS[24]);
49
56
  if (parts[0] === 26) return partsAtLeast(parts, PATCHED_NODE_LINE_MINIMUMS[26]);
package/package.json CHANGED
@@ -11,13 +11,13 @@
11
11
  "ceal-host": "bin/ceal-host.js"
12
12
  },
13
13
  "optionalDependencies": {
14
- "@corca-org/ceal-linux-x64": "1.0.26",
15
- "@corca-org/ceal-linux-arm64": "1.0.26",
16
- "@corca-org/ceal-darwin-arm64": "1.0.26",
17
- "@corca-org/ceal-win32-x64": "1.0.26"
14
+ "@corca-org/ceal-linux-x64": "1.1.0",
15
+ "@corca-org/ceal-linux-arm64": "1.1.0",
16
+ "@corca-org/ceal-darwin-arm64": "1.1.0",
17
+ "@corca-org/ceal-win32-x64": "1.1.0"
18
18
  },
19
19
  "dependencies": {
20
- "@corca-org/ceal-host": "1.0.26"
20
+ "@corca-org/ceal-host": "1.1.0"
21
21
  },
22
22
  "repository": {
23
23
  "type": "git",
@@ -29,7 +29,7 @@
29
29
  "bin/launch.js",
30
30
  "README.md"
31
31
  ],
32
- "version": "1.0.26",
32
+ "version": "1.1.0",
33
33
  "publishConfig": {
34
34
  "access": "public",
35
35
  "provenance": false