샘플
@types/node 26.6.6
검증된 샘플 — npm @types/node 26.6.6. node 22 · linux debian/x64 · docker에서 contract를 실행해 통과했습니다: @types/node@26.6.6 package manifest exposes index.d.ts…
sha256:615be265f9cfae98f92233f1cc955aa8fe11d2229113c0f7b1cdb608d3e19614
이 네트워크가 제공하는 것은 하나입니다. 빌드되는 샘플. 샌드박스에서 돌리고 서명된 영수증을 보관합니다. 등급을 매기지 않고 무엇도 보증하지 않습니다 — 같은 코드가 당신 환경에서 빌드되는지는 측정한 적이 없습니다.
통과한 계약 영수증을 낸 서로 다른 서명 키의 수입니다. 하나면 작성자 혼자이고, 둘 이상이면 다른 사람도 빌드했다는 뜻입니다. 키는 스스로 만드는 것이고 뒤에 등록된 신원이 없으므로, 세는 것은 사람이 아니라 키입니다.
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-21 |
케이스
HOW- 목표
- verify pkg:npm/%40types/node@26.6.6
- 환경
- node 22.23.2
- 생성일
- 2026-11-21T20:33:01Z
컨트랙트
- @types/node@26.6.6 package manifest exposes index.d.ts, TypeScript 5.6 metadata, typesVersions <=5.6 and <=5.7 mappings, and undici-types ~8.9.0
- undici-types 8.9.x resolves cleanly with a non-empty declaration entry point
- every triple-slash reference path in root index.d.ts resolves to a non-empty .d.ts file and ts5.6/ts5.7 index.d.ts trees exist
- core node:events, node:fs, node:fs/promises, node:crypto, and node:buffer declarations are present
- Node 26 node:ffi, node:vfs, node:stream/iter, node:zlib/iter, and web-globals/fetch.d.ts declarations are present
파일
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- 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@26.6.6
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/%40types/node@26.6.6
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:2af83d60ea62057e2a92cb0c4e9eec07257bb509021657f7109b832d8867239c","constraints":{"executionContext":"node"},"contract":["@types/node@26.6.6 package manifest exposes index.d.ts, TypeScript 5.6 metadata, typesVersions \u003c=5.6 and \u003c=5.7 mappings, and undici-types ~8.9.0","undici-types 8.9.x resolves cleanly with a non-empty declaration entry point","every triple-slash reference path in root index.d.ts resolves to a non-empty .d.ts file and ts5.6/ts5.7 index.d.ts trees exist","core node:events, node:fs, node:fs/promises, node:crypto, and node:buffer declarations are present","Node 26 node:ffi, node:vfs, node:stream/iter, node:zlib/iter, and web-globals/fetch.d.ts declarations are present"],"goal":"verify pkg:npm/%40types/node@26.6.6","kind":"HOW","packages":["pkg:npm/%40types/node@26.6.6"],"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@26.6.6"],"schemaVersion":1,"subject":"pkg:npm/%40types/node@26.6.6","verifierAdapter":"node-typescript@1"}
{
"name": "types-node-sample",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "types-node-sample",
"version": "1.0.0",
"license": "MIT-0",
"dependencies": {
"@types/node": "26.6.6"
}
},
"node_modules/@types/node": {
"version": "26.6.6",
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.6.tgz",
"integrity": "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==",
"license": "MIT",
"dependencies": {
"undici-types": "~8.9.0"
}
},
"node_modules/undici-types": {
"version": "8.9.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz",
"integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==",
"license": "MIT"
}
}
}
{
"name": "types-node-sample",
"version": "1.0.0",
"private": true,
"license": "MIT-0",
"dependencies": {
"@types/node": "26.6.6"
}
}
{
"schemaVersion": 1,
"goal": "verify pkg:npm/%40types/node@26.6.6",
"kind": "HOW",
"packages": [
"pkg:npm/%40types/node@26.6.6"
],
"constraints": {
"executionContext": "node"
},
"runtimeConditions": {
"ecosystem": "npm",
"language": "javascript",
"moduleSystem": "cjs",
"packageManager": "npm@10.9.8",
"runtime": "node@22.23.2"
}
}
'use strict';
const assert = require('node:assert/strict');
const fs = require('node:fs');
const path = require('node:path');
// 1. Verify @types/node@26.6.6 package manifest and versioned entry points
const typesNodePkgPath = require.resolve('@types/node/package.json');
const typesNodePkg = JSON.parse(fs.readFileSync(typesNodePkgPath, 'utf8'));
const typesNodeDir = path.dirname(typesNodePkgPath);
assert.equal(typesNodePkg.name, '@types/node');
assert.equal(typesNodePkg.version, '26.6.6');
assert.equal(typesNodePkg.types, 'index.d.ts');
assert.equal(typesNodePkg.typeScriptVersion, '5.6');
assert.deepEqual(typesNodePkg.typesVersions['<=5.6']['*'], ['ts5.6/*']);
assert.deepEqual(typesNodePkg.typesVersions['<=5.7']['*'], ['ts5.7/*']);
assert.equal(typesNodePkg.dependencies['undici-types'], '~8.9.0');
// 2. Verify undici-types dependency resolves and provides declarations
const undiciPkgPath = require.resolve('undici-types/package.json');
const undiciPkg = JSON.parse(fs.readFileSync(undiciPkgPath, 'utf8'));
assert.equal(undiciPkg.name, 'undici-types');
assert.match(undiciPkg.version, /^8\.9\./);
const undiciTypesPath = path.join(path.dirname(undiciPkgPath), undiciPkg.types || 'index.d.ts');
assert.ok(fs.statSync(undiciTypesPath).size > 0, 'undici-types declaration entry must be non-empty');
// 3. Verify every reference path in root index.d.ts and versioned ts5.6/ts5.7 trees exists
const indexDts = fs.readFileSync(path.join(typesNodeDir, 'index.d.ts'), 'utf8');
const refMatches = [...indexDts.matchAll(/^\/\/\/\s*<reference\s+path="([^"]+)"\s*\/>/gm)];
assert.ok(refMatches.length >= 50, 'index.d.ts should reference Node.js declaration modules');
for (const match of refMatches) {
const targetPath = path.join(typesNodeDir, match[1]);
assert.ok(fs.existsSync(targetPath), `referenced declaration file must exist: ${match[1]}`);
assert.ok(fs.statSync(targetPath).size > 0, `referenced declaration file must be non-empty: ${match[1]}`);
}
for (const tsDir of ['ts5.6', 'ts5.7']) {
const versionedIndex = path.join(typesNodeDir, tsDir, 'index.d.ts');
assert.ok(fs.existsSync(versionedIndex), `${tsDir}/index.d.ts must exist`);
assert.ok(fs.statSync(versionedIndex).size > 0, `${tsDir}/index.d.ts must be non-empty`);
}
function readDts(relPath) {
return fs.readFileSync(path.join(typesNodeDir, relPath), 'utf8');
}
// 4. Verify core Node.js module declarations
const eventsDts = readDts('events.d.ts');
assert.ok(eventsDts.includes('declare module "node:events"'));
assert.ok(eventsDts.includes('class EventEmitter<T extends EventMap<T> = any>'));
assert.ok(eventsDts.includes('interface EventEmitterOptions'));
assert.ok(eventsDts.includes('interface EventEmitterEventMap'));
const fsDts = readDts('fs.d.ts');
assert.ok(fsDts.includes('declare module "node:fs"'));
assert.ok(fsDts.includes('interface Stats extends StatsBase<number> {}'));
assert.ok(fsDts.includes('class Dirent<Name extends string | Buffer = string>'));
assert.ok(fsDts.includes('function readFileSync('));
const fsPromisesDts = readDts(path.join('fs', 'promises.d.ts'));
assert.ok(fsPromisesDts.includes('declare module "node:fs/promises"'));
const cryptoDts = readDts('crypto.d.ts');
assert.ok(cryptoDts.includes('declare module "node:crypto"'));
assert.ok(cryptoDts.includes('function createHash(algorithm: string, options?: HashOptions): Hash;'));
assert.ok(cryptoDts.includes('function randomBytes(size: number): NonSharedBuffer;'));
const bufferDts = readDts('buffer.d.ts');
assert.ok(bufferDts.includes('declare module "node:buffer"'));
assert.ok(bufferDts.includes('export function isUtf8('));
assert.ok(bufferDts.includes('export function isAscii('));
// 5. Verify Node 26 declarations shipped in @types/node@26.6.6
const ffiDts = readDts('ffi.d.ts');
assert.ok(ffiDts.includes('declare module "node:ffi"'));
assert.ok(ffiDts.includes('function dlopen<'));
assert.ok(ffiDts.includes('function dlclose(handle: DynamicLibrary): void;'));
assert.ok(ffiDts.includes('function dlsym(handle: DynamicLibrary, symbol: string): bigint;'));
assert.ok(ffiDts.includes('class DynamicLibrary'));
const vfsDts = readDts('vfs.d.ts');
assert.ok(vfsDts.includes('declare module "node:vfs"'));
assert.ok(vfsDts.includes('function create(provider?: VirtualProvider, options?: VirtualFileSystemOptions): VirtualFileSystem;'));
assert.ok(vfsDts.includes('class VirtualFileSystem'));
assert.ok(vfsDts.includes('class MemoryProvider extends VirtualProvider'));
assert.ok(vfsDts.includes('class RealFSProvider extends VirtualProvider'));
const streamIterDts = readDts(path.join('stream', 'iter.d.ts'));
assert.ok(streamIterDts.includes('declare module "node:stream/iter"'));
assert.ok(streamIterDts.includes('type SyncSource ='));
const zlibIterDts = readDts(path.join('zlib', 'iter.d.ts'));
assert.ok(zlibIterDts.includes('declare module "node:zlib/iter"'));
const fetchDts = readDts(path.join('web-globals', 'fetch.d.ts'));
assert.ok(fetchDts.includes('import * as undici from "undici-types";'));
assert.ok(fetchDts.includes('function fetch('));
console.log('@types/node@26.6.6 contract passed');
오리진 시더
익명