샘플
@babel/runtime 7.29.7
검증된 샘플 — npm @babel/runtime 7.29.7. node 22 · linux alpine/x64 · docker에서 contract를 실행해 통과했습니다: assert _typeof correctly identifies primitives, objects, and…
sha256:39e1c5c7acbf92e2982a833c1ee7e0cf622d22b63d12e8e165c4e8990ce6d781
이 네트워크가 제공하는 것은 하나입니다. 빌드되는 샘플. 샌드박스에서 돌리고 서명된 영수증을 보관합니다. 등급을 매기지 않고 무엇도 보증하지 않습니다 — 같은 코드가 당신 환경에서 빌드되는지는 측정한 적이 없습니다.
통과한 계약 영수증을 낸 서로 다른 서명 키의 수입니다. 하나면 작성자 혼자이고, 둘 이상이면 다른 사람도 빌드했다는 뜻입니다. 키는 스스로 만드는 것이고 뒤에 등록된 신원이 없으므로, 세는 것은 사람이 아니라 키입니다.
MIT-0
실행 증거
선언된 환경과 서명된 실행을 분리해 두었습니다. 이 샘플이 무엇을 어디서 실행했는지 그대로 볼 수 있습니다.
- 증거 기준
- 서명된 컨트랙트 통과
- 검증 영수증
- 1
- 빌드한 서명 키
- 1
선언된 환경
linux 24 · ubuntu · glibc 2.39 x64 npm
검증 실행 환경
| 환경 | 컨트랙트 | 단계 | 실행일 |
|---|---|---|---|
| node 22 · linux alpine/x64 · docker ed25519:c1973797be207ac4 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1node:22-alpine@sha256:c610fcdfb1d5… |
2026-08-28 |
케이스
HOW- 목표
- verify pkg:npm/@babel/runtime@7.29.7
- 생성일
- 2026-08-28T07:47:33Z
컨트랙트
- assert _typeof correctly identifies primitives, objects, and symbols
- assert _objectSpread2 merges object properties and symbol keys
- assert _toConsumableArray converts iterables and sets into arrays
- assert _slicedToArray extracts elements from iterables and arrays
- assert _classCallCheck throws TypeError when constructor is called without new
- assert _createClass attaches instance methods to prototype and static methods to constructor
- assert _interopRequireDefault handles ES module default export and CommonJS wrappers
- assert regeneratorRuntime provides generator helper methods mark and wrap
파일
- NOTES.md
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- test/contract.mjs
소스
# @babel/runtime Helper Notes
`@babel/runtime` provides modular runtime helpers used by Babel plugins when compiling ES2015+ features:
- `helpers/typeof`: Ensures Symbol and primitive type detection behaves consistently across environments.
- `helpers/objectSpread2`: Implements ES object spread syntax (`...obj`) preserving property descriptors and symbols.
- `helpers/toConsumableArray`: Implements array spread syntax for iterables and sets.
- `helpers/slicedToArray`: Implements array destructuring (`const [a, b] = iterable`).
- `helpers/classCallCheck`: Enforces that constructor functions cannot be invoked without `new`.
- `helpers/createClass`: Configures prototype methods and static properties with proper descriptor flags.
- `helpers/interopRequireDefault`: Normalizes default import semantics across ESM and CommonJS modules.
- `regenerator`: Exposes the regenerator runtime for generator function transformation.
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/@babel/runtime@7.29.7
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/%40babel/runtime@7.29.7
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:78effb58ee4de1dd4adec247c3f51ae04f26c996564d1c07a80d7ecaf232de2b","contract":["assert _typeof correctly identifies primitives, objects, and symbols","assert _objectSpread2 merges object properties and symbol keys","assert _toConsumableArray converts iterables and sets into arrays","assert _slicedToArray extracts elements from iterables and arrays","assert _classCallCheck throws TypeError when constructor is called without new","assert _createClass attaches instance methods to prototype and static methods to constructor","assert _interopRequireDefault handles ES module default export and CommonJS wrappers","assert regeneratorRuntime provides generator helper methods mark and wrap"],"goal":"verify pkg:npm/@babel/runtime@7.29.7","kind":"HOW","packages":["pkg:npm/%40babel/runtime@7.29.7"],"schemaVersion":1},"contractCommand":["node","test/contract.mjs"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"npm","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"npm","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/%40babel/runtime@7.29.7"],"schemaVersion":1,"subject":"pkg:npm/%40babel/runtime@7.29.7","verifierAdapter":"node-typescript@1"}
{
"name": "npm-babel-runtime-contract",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "npm-babel-runtime-contract",
"version": "1.0.0",
"license": "MIT-0",
"dependencies": {
"@babel/runtime": "7.29.7"
}
},
"node_modules/@babel/runtime": {
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.7.tgz",
"integrity": "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==",
"license": "MIT",
"engines": {
"node": ">=6.9.0"
}
}
}
}
{
"name": "npm-babel-runtime-contract",
"version": "1.0.0",
"private": true,
"type": "module",
"license": "MIT-0",
"scripts": {
"test": "node test/contract.mjs"
},
"dependencies": {
"@babel/runtime": "7.29.7"
}
}
{
"schemaVersion": 1,
"goal": "verify pkg:npm/@babel/runtime@7.29.7",
"kind": "HOW",
"packages": [
"pkg:npm/%40babel/runtime@7.29.7"
]
}
import assert from 'node:assert/strict';
import _typeof from '@babel/runtime/helpers/typeof';
import _objectSpread2 from '@babel/runtime/helpers/objectSpread2';
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
import _createClass from '@babel/runtime/helpers/createClass';
import _interopRequireDefault from '@babel/runtime/helpers/interopRequireDefault';
import regeneratorRuntime from '@babel/runtime/regenerator';
// 1. _typeof correctly identifies primitives, objects, and symbols
assert.equal(_typeof('hello'), 'string');
assert.equal(_typeof(42), 'number');
assert.equal(_typeof(Symbol('sym')), 'symbol');
assert.equal(_typeof({ key: 'val' }), 'object');
assert.equal(_typeof(null), 'object');
assert.equal(_typeof(undefined), 'undefined');
// 2. _objectSpread2 merges object properties and symbol keys
const symKey = Symbol('custom');
const sourceObj = { b: 2, [symKey]: 'secret' };
const targetObj = { a: 1 };
const merged = _objectSpread2(targetObj, sourceObj);
assert.equal(merged.a, 1);
assert.equal(merged.b, 2);
assert.equal(merged[symKey], 'secret');
// 3. _toConsumableArray converts iterables and sets into arrays
const set = new Set(['alpha', 'beta', 'gamma']);
const arrayFromSet = _toConsumableArray(set);
assert.deepEqual(arrayFromSet, ['alpha', 'beta', 'gamma']);
assert.ok(Array.isArray(arrayFromSet));
// 4. _slicedToArray extracts elements from iterables and arrays
const iterable = new Set([10, 20, 30]);
const slicedIterable = _slicedToArray(iterable, 2);
assert.deepEqual(slicedIterable, [10, 20]);
const arrayInput = [10, 20, 30];
const slicedArray = _slicedToArray(arrayInput, 2);
assert.equal(slicedArray[0], 10);
assert.equal(slicedArray[1], 20);
// 5. _classCallCheck throws TypeError when constructor is called without new
function DemoClass() {
_classCallCheck(this, DemoClass);
}
assert.doesNotThrow(() => new DemoClass());
assert.throws(
() => {
DemoClass.call({});
},
{
name: 'TypeError',
message: 'Cannot call a class as a function',
}
);
// 6. _createClass attaches instance methods to prototype and static methods to constructor
_createClass(
DemoClass,
[
{
key: 'instanceMethod',
value: function () {
return 'instance result';
},
},
],
[
{
key: 'staticMethod',
value: function () {
return 'static result';
},
},
]
);
const instance = new DemoClass();
assert.equal(instance.instanceMethod(), 'instance result');
assert.equal(DemoClass.staticMethod(), 'static result');
// 7. _interopRequireDefault handles ES module default export and CommonJS wrappers
const esmModule = { __esModule: true, default: { greeting: 'hello' } };
assert.deepEqual(_interopRequireDefault(esmModule), esmModule);
const cjsModule = { greeting: 'hello' };
assert.deepEqual(_interopRequireDefault(cjsModule), { default: cjsModule });
// 8. regeneratorRuntime provides generator helper methods mark and wrap
assert.ok(regeneratorRuntime);
assert.equal(typeof regeneratorRuntime.mark, 'function');
assert.equal(typeof regeneratorRuntime.wrap, 'function');
console.log('babel-runtime.contract.pass');
오리진 시더
익명