mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-03 07:54:40 +08:00
Run the libnode smoke test only on built packs; stamp the packs 0.4.2
CI's island lanes fall back to the development pack (dev-pack.json: Node 24.22.1, no package.json) until the libnode-packs cache exists, so the smoke test, which verifies a @scriptc/libnode-<platform> package against the 24.22.0 pin, failed there. It now runs only when SCRIPTC_LIBNODE names a package directory. The pack package versions follow the 0.4.2 release (scripts/sync-versions.mjs), which pin.test.ts checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
fb0d7a99a8
commit
73ab5b8d7f
@@ -1,14 +1,20 @@
|
||||
// Loads a real libnode pack from a C program (smoke/smoke.c) the way the
|
||||
// scriptc runtime does. Packs are not built by the ordinary build, so this
|
||||
// runs only when SCRIPTC_LIBNODE names a pack directory (a CI artifact of
|
||||
// the libnode-packs workflow, or a local build:native output).
|
||||
// the libnode-packs workflow, or a local build:native output). CI's
|
||||
// fallback development pack (dev-pack.json) is not a package: it has no
|
||||
// package.json and may carry a different Node patch release, so it is
|
||||
// exercised by the Node island tests instead.
|
||||
import { existsSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import { describe, expect, test } from "vitest";
|
||||
import { verifyPack } from "../scripts/verify.mjs";
|
||||
import { expectedTranscript, runSmoke } from "../scripts/smoke.mjs";
|
||||
|
||||
const pack = process.env["SCRIPTC_LIBNODE"];
|
||||
const isPackage = pack !== undefined && pack !== "" && existsSync(join(pack, "package.json"));
|
||||
|
||||
describe.skipIf(pack === undefined || pack === "")("libnode pack smoke test", () => {
|
||||
describe.skipIf(!isPackage)("libnode pack smoke test", () => {
|
||||
test("the pack is complete", () => {
|
||||
expect(verifyPack(pack!)).toEqual([]);
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scriptc/libnode-darwin-arm64",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"private": true,
|
||||
"description": "Prebuilt Node.js shared library and scriptc bridge for Node islands on macOS arm64",
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scriptc/libnode-darwin-x64",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"private": true,
|
||||
"description": "Prebuilt Node.js shared library and scriptc bridge for Node islands on macOS x64",
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scriptc/libnode-linux-arm64-gnu",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"private": true,
|
||||
"description": "Prebuilt Node.js shared library and scriptc bridge for Node islands on Linux arm64 glibc",
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scriptc/libnode-linux-x64-gnu",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"private": true,
|
||||
"description": "Prebuilt Node.js shared library and scriptc bridge for Node islands on Linux x64 glibc",
|
||||
"license": "SEE LICENSE IN LICENSE",
|
||||
|
||||
Reference in New Issue
Block a user