샘플
@types/node 24.13.5
검증된 샘플 — npm @types/node 24.13.5. node 22 · linux debian/x64 · docker에서 contract를 실행해 통과했습니다: @types/node package.json declares version 24.13.5, empty main…
sha256:877e1164737d7d4f1e5c81cf79413fb8ec83dfcfc6f1f38ba2366796ba852986
이 네트워크가 제공하는 것은 하나입니다. 빌드되는 샘플. 샌드박스에서 돌리고 서명된 영수증을 보관합니다. 등급을 매기지 않고 무엇도 보증하지 않습니다 — 같은 코드가 당신 환경에서 빌드되는지는 측정한 적이 없습니다.
통과한 계약 영수증을 낸 서로 다른 서명 키의 수입니다. 하나면 작성자 혼자이고, 둘 이상이면 다른 사람도 빌드했다는 뜻입니다. 키는 스스로 만드는 것이고 뒤에 등록된 신원이 없으므로, 세는 것은 사람이 아니라 키입니다.
MIT-0
실행 증거
선언된 환경과 서명된 실행을 분리해 두었습니다. 이 샘플이 무엇을 어디서 실행했는지 그대로 볼 수 있습니다.
- 증거 기준
- 서명된 컨트랙트 통과
- 검증 영수증
- 1
- 빌드한 서명 키
- 1
선언된 환경
node 22.23 linux 24 · ubuntu · glibc 2.39 x64 node 22.23 javascript npm 10
검증 실행 환경
| 환경 | 컨트랙트 | 단계 | 실행일 |
|---|---|---|---|
| node 22 · linux debian/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1node:22@sha256:8a34c4ab3ea2… |
2026-11-28 |
케이스
HOW- 목표
- verify pkg:npm/%40types/node@24.13.5
- 환경
- node 22.23.2
- 생성일
- 2026-11-28T23:33:59Z
컨트랙트
- @types/node package.json declares version 24.13.5, empty main, types entry index.d.ts, typeScriptVersion 5.6, and typesVersions mappings for <=5.6 (ts5.6/*) and <=5.7 (ts5.7/*)
- @types/node declares dependency undici-types ~7.18.0 and undici-types resolves with a 7.18.x manifest and index.d.ts entry point
- Every triple-slash reference path in index.d.ts, ts5.6/index.d.ts, and ts5.7/index.d.ts resolves to an existing non-empty declaration file; index.d.ts references es2020, esnext.disposable, and esnext.float16 while ts5.6 and ts5.7 include ./compatibility/float16array.d.ts
- sqlite.d.ts declares module node:sqlite with class DatabaseSync and Node 24 options timeout, readBigInts, returnArrays, allowBareNamedParameters, and allowUnknownNamedParameters
- web-globals/fetch.d.ts imports undici-types and declares global fetch, Headers, Request, Response, FormData, WebSocket, and EventSource
- Core declaration files (fs.d.ts, crypto.d.ts, buffer.d.ts, events.d.ts, path.d.ts, stream.d.ts, worker_threads.d.ts) declare both bare and node:-prefixed modules
파일
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- src/inspect.cjs
- test/contract.cjs
소스
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify pkg:npm/%40types/node@24.13.5
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/%40types/node@24.13.5
Constraints:
- executionContext: node
Required runtime conditions:
- ecosystem: npm
- language: javascript
- moduleSystem: cjs
- packageManager: npm@10.9.8
- runtime: node@22.23.2
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:6d1c8ebb3a384164d63b572eb4337c3f3814629b76d37f4ae781ac6fb121dc90","constraints":{"executionContext":"node"},"contract":["@types/node package.json declares version 24.13.5, empty main, types entry index.d.ts, typeScriptVersion 5.6, and typesVersions mappings for \u003c=5.6 (ts5.6/*) and \u003c=5.7 (ts5.7/*)","@types/node declares dependency undici-types ~7.18.0 and undici-types resolves with a 7.18.x manifest and index.d.ts entry point","Every triple-slash reference path in index.d.ts, ts5.6/index.d.ts, and ts5.7/index.d.ts resolves to an existing non-empty declaration file; index.d.ts references es2020, esnext.disposable, and esnext.float16 while ts5.6 and ts5.7 include ./compatibility/float16array.d.ts","sqlite.d.ts declares module node:sqlite with class DatabaseSync and Node 24 options timeout, readBigInts, returnArrays, allowBareNamedParameters, and allowUnknownNamedParameters","web-globals/fetch.d.ts imports undici-types and declares global fetch, Headers, Request, Response, FormData, WebSocket, and EventSource","Core declaration files (fs.d.ts, crypto.d.ts, buffer.d.ts, events.d.ts, path.d.ts, stream.d.ts, worker_threads.d.ts) declare both bare and node:-prefixed modules"],"goal":"verify pkg:npm/%40types/node@24.13.5","kind":"HOW","packages":["pkg:npm/%40types/node@24.13.5"],"schemaVersion":1},"contractCommand":["node","test/contract.cjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","executionContext":"node","language":"javascript","libc":"glibc","libcVersion":"2.39","moduleSystem":"cjs","os":"linux","osVersionBucket":"24","packageManager":"npm","packageManagerVersion":"10.9.8","runtime":"node","runtimeVersion":"22.23.2","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/%40types/node@24.13.5"],"schemaVersion":1,"subject":"pkg:npm/%40types/node@24.13.5","verifierAdapter":"node-typescript@1"}
{
"name": "verify-types-node-sample",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "verify-types-node-sample",
"version": "1.0.0",
"license": "MIT-0",
"dependencies": {
"@types/node": "24.13.5"
}
},
"node_modules/@types/node": {
"version": "24.13.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.5.tgz",
"integrity": "sha512-TXyindR+lBr22aJIdMQzCFHPHR6cR4js838mRDCSz5hOKWZvZwsXSSiXDmjRj4iJmgl+sR9O+1mkoVBSMadNug==",
"license": "MIT",
"dependencies": {
"undici-types": "~7.18.0"
}
},
"node_modules/undici-types": {
"version": "7.18.2",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
"integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
"license": "MIT"
}
}
}
{
"name": "verify-types-node-sample",
"version": "1.0.0",
"private": true,
"description": "Clean-room verification sample for @types/node@24.13.5",
"license": "MIT-0",
"main": "src/inspect.cjs",
"scripts": {
"test": "node test/contract.cjs"
},
"dependencies": {
"@types/node": "24.13.5"
}
}
{
"schemaVersion": 1,
"goal": "verify pkg:npm/%40types/node@24.13.5",
"kind": "HOW",
"packages": [
"pkg:npm/%40types/node@24.13.5"
],
"constraints": {
"executionContext": "node"
},
"runtimeConditions": {
"ecosystem": "npm",
"language": "javascript",
"moduleSystem": "cjs",
"packageManager": "npm@10.9.8",
"runtime": "node@22.23.2"
}
}
"use strict";
const fs = require("node:fs");
const path = require("node:path");
function loadTypesNodePackage() {
const pkgPath = require.resolve("@types/node/package.json");
const rootDir = path.dirname(pkgPath);
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
return { rootDir, pkg };
}
function loadUndiciTypesPackage(fromDir) {
const pkgPath = require.resolve("undici-types/package.json", {
paths: [fromDir],
});
const rootDir = path.dirname(pkgPath);
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
return { rootDir, pkg };
}
function readDeclaration(rootDir, relPath) {
const target = path.resolve(rootDir, relPath);
return fs.readFileSync(target, "utf8");
}
function extractReferencePaths(content) {
const results = [];
const pattern = /\/\/\/\s*<reference\s+path="([^"]+)"\s*\/>/g;
let match;
while ((match = pattern.exec(content)) !== null) {
results.push(match[1]);
}
return results;
}
function extractReferenceLibs(content) {
const results = [];
const pattern = /\/\/\/\s*<reference\s+lib="([^"]+)"\s*\/>/g;
let match;
while ((match = pattern.exec(content)) !== null) {
results.push(match[1]);
}
return results;
}
function verifyReferenceGraph(rootDir, entryRelPath) {
const entryPath = path.resolve(rootDir, entryRelPath);
const entryDir = path.dirname(entryPath);
const content = fs.readFileSync(entryPath, "utf8");
const refPaths = extractReferencePaths(content);
const missing = [];
const empty = [];
for (const rel of refPaths) {
const resolved = path.resolve(entryDir, rel);
if (!fs.existsSync(resolved)) {
missing.push(rel);
continue;
}
const stat = fs.statSync(resolved);
if (!stat.isFile() || stat.size === 0) {
empty.push(rel);
}
}
return {
entryRelPath,
referenceCount: refPaths.length,
refPaths,
libs: extractReferenceLibs(content),
missing,
empty,
};
}
function extractDeclaredModules(content) {
const modules = [];
const pattern = /declare\s+module\s+["']([^"']+)["']/g;
let match;
while ((match = pattern.exec(content)) !== null) {
modules.push(match[1]);
}
return modules;
}
module.exports = {
loadTypesNodePackage,
loadUndiciTypesPackage,
readDeclaration,
extractReferencePaths,
extractReferenceLibs,
verifyReferenceGraph,
extractDeclaredModules,
};
"use strict";
const assert = require("node:assert/strict");
const fs = require("node:fs");
const path = require("node:path");
const {
loadTypesNodePackage,
loadUndiciTypesPackage,
readDeclaration,
verifyReferenceGraph,
extractDeclaredModules,
} = require("../src/inspect.cjs");
// 1. Package manifest and version checks
const { rootDir, pkg } = loadTypesNodePackage();
assert.equal(pkg.name, "@types/node");
assert.equal(pkg.version, "24.13.5");
assert.equal(pkg.main, "");
assert.equal(pkg.types, "index.d.ts");
assert.equal(pkg.typeScriptVersion, "5.6");
assert.deepEqual(pkg.typesVersions["<=5.6"], { "*": ["ts5.6/*"] });
assert.deepEqual(pkg.typesVersions["<=5.7"], { "*": ["ts5.7/*"] });
assert.equal(pkg.dependencies["undici-types"], "~7.18.0");
// 2. Transitive undici-types dependency resolves with a valid declaration entry point
const undici = loadUndiciTypesPackage(rootDir);
assert.equal(undici.pkg.name, "undici-types");
assert.match(undici.pkg.version, /^7\.18\.\d+$/);
assert.equal(undici.pkg.types, "index.d.ts");
assert.equal(
fs.existsSync(path.resolve(undici.rootDir, undici.pkg.types)),
true
);
// 3. Complete reference graph integrity across root, ts5.6, and ts5.7 entry points
const rootGraph = verifyReferenceGraph(rootDir, "index.d.ts");
assert.ok(rootGraph.referenceCount >= 60);
assert.deepEqual(rootGraph.missing, []);
assert.deepEqual(rootGraph.empty, []);
assert.deepEqual(rootGraph.libs, [
"es2020",
"esnext.disposable",
"esnext.float16",
]);
const ts56Graph = verifyReferenceGraph(rootDir, "ts5.6/index.d.ts");
assert.ok(ts56Graph.referenceCount >= 60);
assert.deepEqual(ts56Graph.missing, []);
assert.deepEqual(ts56Graph.empty, []);
assert.ok(ts56Graph.refPaths.includes("./compatibility/float16array.d.ts"));
const ts57Graph = verifyReferenceGraph(rootDir, "ts5.7/index.d.ts");
assert.ok(ts57Graph.referenceCount >= 60);
assert.deepEqual(ts57Graph.missing, []);
assert.deepEqual(ts57Graph.empty, []);
assert.ok(ts57Graph.refPaths.includes("./compatibility/float16array.d.ts"));
// 4. Node 24 sqlite declaration coverage
const sqliteDecl = readDeclaration(rootDir, "sqlite.d.ts");
assert.deepEqual(extractDeclaredModules(sqliteDecl), ["node:sqlite"]);
assert.match(sqliteDecl, /\bclass\s+DatabaseSync\b/);
for (const optionName of [
"timeout",
"readBigInts",
"returnArrays",
"allowBareNamedParameters",
"allowUnknownNamedParameters",
]) {
assert.match(
sqliteDecl,
new RegExp(`\\b${optionName}\\?:\\s*`),
`expected DatabaseSyncOptions.${optionName} in sqlite.d.ts`
);
}
// 5. Web fetch globals backed by undici-types
const fetchDecl = readDeclaration(rootDir, "web-globals/fetch.d.ts");
assert.match(fetchDecl, /import\s+\*\s+as\s+undici\s+from\s+"undici-types"/);
assert.match(fetchDecl, /\bfunction\s+fetch\s*\(/);
for (const globalName of [
"Headers",
"Request",
"Response",
"FormData",
"WebSocket",
"EventSource",
]) {
assert.match(
fetchDecl,
new RegExp(`\\bvar\\s+${globalName}:`),
`expected global ${globalName} in web-globals/fetch.d.ts`
);
}
// 6. Core built-in module declarations include both bare and node:-prefixed modules
const expectedModules = [
["fs.d.ts", ["fs", "node:fs"]],
["crypto.d.ts", ["crypto", "node:crypto"]],
["buffer.d.ts", ["buffer", "node:buffer"]],
["events.d.ts", ["events", "node:events"]],
["path.d.ts", ["path", "node:path", "path/posix", "node:path/posix", "path/win32", "node:path/win32"]],
["stream.d.ts", ["stream", "node:stream"]],
["worker_threads.d.ts", ["worker_threads", "node:worker_threads"]],
];
for (const [declFile, requiredModules] of expectedModules) {
const declared = new Set(extractDeclaredModules(readDeclaration(rootDir, declFile)));
for (const modName of requiredModules) {
assert.ok(
declared.has(modName),
`expected ${declFile} to declare module "${modName}"`
);
}
}
console.log(
`Verified @types/node@${pkg.version}: ${rootGraph.referenceCount} root references, ts5.6/ts5.7 compatibility graphs, undici-types@${undici.pkg.version}, node:sqlite, web-globals/fetch, and core module declarations.`
);
오리진 시더
익명