샘플
es-errors 1.3.0: eval, range, ref
검증된 샘플 — npm es-errors 1.3.0: eval, range, ref. node 22 · linux alpine/x64 · docker에서 contract를 실행해 통과했습니다: Root export returns the built-in Error…
sha256:50d251c0158c1a9fff164ec37da726cb3b4be3374319e7dec8135cc02d64cd72
이 네트워크가 제공하는 것은 하나입니다. 빌드되는 샘플. 샌드박스에서 돌리고 서명된 영수증을 보관합니다. 등급을 매기지 않고 무엇도 보증하지 않습니다 — 같은 코드가 당신 환경에서 빌드되는지는 측정한 적이 없습니다.
통과한 계약 영수증을 낸 서로 다른 서명 키의 수입니다. 하나면 작성자 혼자이고, 둘 이상이면 다른 사람도 빌드했다는 뜻입니다. 키는 스스로 만드는 것이고 뒤에 등록된 신원이 없으므로, 세는 것은 사람이 아니라 키입니다.
MIT-0
실행 증거
선언된 환경과 서명된 실행을 분리해 두었습니다. 이 샘플이 무엇을 어디서 실행했는지 그대로 볼 수 있습니다.
- 증거 기준
- 서명된 컨트랙트 통과
- 검증 영수증
- 2
- 빌드한 서명 키
- 2
선언된 환경
node 22 linux x64 node 22 javascript npm 10
검증 실행 환경
| 환경 | 컨트랙트 | 단계 | 실행일 |
|---|---|---|---|
| node 22 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · node-typescript@1 |
2026-08-19 |
| 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-09-12 |
케이스
HOW- 목표
- verify pkg:npm/es-errors@1.3.0
- 패키지
- 심벌
-
- es-errors
- es-errors/eval
- es-errors/range
- es-errors/ref
- es-errors/syntax
- es-errors/type
- es-errors/uri
- 환경
- node 22
- 생성일
- 2026-08-18T18:05:07Z
컨트랙트
- Root export returns the built-in Error constructor reference
- es-errors/eval subpath exports the built-in EvalError constructor reference
- es-errors/range subpath exports the built-in RangeError constructor reference
- es-errors/ref subpath exports the built-in ReferenceError constructor reference
- es-errors/syntax subpath exports the built-in SyntaxError constructor reference
- es-errors/type subpath exports the built-in TypeError constructor reference
- es-errors/uri subpath exports the built-in URIError constructor reference
- Constructed error instances inherit from Error and their specific constructor with expected name and message properties
- Constructors called as functions return valid error instances
- getErrorConstructor routes string identifiers to corresponding Error constructors
- createError constructs error instances matching expected constructors and messages
파일
- PROMPT.md
- csx.json
- index.js
- package-lock.json
- package.json
- spec.json
- test/contract.js
소스
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/es-errors@1.3.0
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/es-errors@1.3.0
Constraints:
- executionContext: node
Required runtime conditions:
- ecosystem: npm
- language: javascript
- moduleSystem: cjs
- packageManager: npm@11.8.0
- runtime: node@24.13.1
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:8634ad3ac73653522b03f0a7603cfd24b80373db85e7e91d74be80fa1ec2ac3e","constraints":{"executionContext":"node"},"contract":["Root export returns the built-in Error constructor reference","es-errors/eval subpath exports the built-in EvalError constructor reference","es-errors/range subpath exports the built-in RangeError constructor reference","es-errors/ref subpath exports the built-in ReferenceError constructor reference","es-errors/syntax subpath exports the built-in SyntaxError constructor reference","es-errors/type subpath exports the built-in TypeError constructor reference","es-errors/uri subpath exports the built-in URIError constructor reference","Constructed error instances inherit from Error and their specific constructor with expected name and message properties","Constructors called as functions return valid error instances","getErrorConstructor routes string identifiers to corresponding Error constructors","createError constructs error instances matching expected constructors and messages"],"goal":"verify pkg:npm/es-errors@1.3.0","kind":"HOW","packages":["pkg:npm/es-errors@1.3.0"],"schemaVersion":1,"symbols":["es-errors","es-errors/eval","es-errors/range","es-errors/ref","es-errors/syntax","es-errors/type","es-errors/uri"]},"contractCommand":["node","test/contract.js"],"environment":{"arch":"x64","ecosystem":"npm","executionContext":"node","language":"javascript","moduleSystem":"cjs","os":"linux","packageManager":"npm","packageManagerVersion":"10","runtime":"node","runtimeVersion":"22","schemaVersion":1},"license":"MIT-0","packages":["pkg:npm/es-errors@1.3.0"],"schemaVersion":1,"symbols":["es-errors","es-errors/eval","es-errors/range","es-errors/ref","es-errors/syntax","es-errors/type","es-errors/uri"],"verifierAdapter":"node-typescript@1"}
'use strict';
var $Error = require('es-errors');
var $EvalError = require('es-errors/eval');
var $RangeError = require('es-errors/range');
var $RefError = require('es-errors/ref');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var $URIError = require('es-errors/uri');
function getErrorConstructor(type) {
switch (type) {
case 'eval':
return $EvalError;
case 'range':
return $RangeError;
case 'ref':
case 'reference':
return $RefError;
case 'syntax':
return $SyntaxError;
case 'type':
return $TypeError;
case 'uri':
return $URIError;
default:
return $Error;
}
}
function createError(type, message) {
var Ctor = getErrorConstructor(type);
return new Ctor(message);
}
module.exports = {
Error: $Error,
EvalError: $EvalError,
RangeError: $RangeError,
ReferenceError: $RefError,
SyntaxError: $SyntaxError,
TypeError: $TypeError,
URIError: $URIError,
getErrorConstructor: getErrorConstructor,
createError: createError
};
{
"name": "sample-es-errors",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-es-errors",
"version": "1.0.0",
"dependencies": {
"es-errors": "1.3.0"
}
},
"node_modules/es-errors": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
"license": "MIT",
"engines": {
"node": ">= 0.4"
}
}
}
}
{
"name": "sample-es-errors",
"version": "1.0.0",
"private": true,
"description": "Clean-room verification of es-errors package",
"main": "index.js",
"scripts": {
"test": "node test/contract.js"
},
"dependencies": {
"es-errors": "1.3.0"
}
}
{
"schemaVersion": 1,
"goal": "verify pkg:npm/es-errors@1.3.0",
"kind": "HOW",
"packages": [
"pkg:npm/es-errors@1.3.0"
],
"constraints": {
"executionContext": "node"
},
"runtimeConditions": {
"ecosystem": "npm",
"language": "javascript",
"moduleSystem": "cjs",
"packageManager": "npm@11.8.0",
"runtime": "node@24.13.1"
}
}
'use strict';
var assert = require('assert');
var sample = require('../index.js');
var $Error = sample.Error;
var $EvalError = sample.EvalError;
var $RangeError = sample.RangeError;
var $RefError = sample.ReferenceError;
var $SyntaxError = sample.SyntaxError;
var $TypeError = sample.TypeError;
var $URIError = sample.URIError;
var getErrorConstructor = sample.getErrorConstructor;
var createError = sample.createError;
// 1. Root and subpath intrinsic exports match global Error constructors
assert.strictEqual($Error, Error);
assert.strictEqual($EvalError, EvalError);
assert.strictEqual($RangeError, RangeError);
assert.strictEqual($RefError, ReferenceError);
assert.strictEqual($SyntaxError, SyntaxError);
assert.strictEqual($TypeError, TypeError);
assert.strictEqual($URIError, URIError);
// 2. Direct require checks from subpaths
assert.strictEqual(require('es-errors'), Error);
assert.strictEqual(require('es-errors/eval'), EvalError);
assert.strictEqual(require('es-errors/range'), RangeError);
assert.strictEqual(require('es-errors/ref'), ReferenceError);
assert.strictEqual(require('es-errors/syntax'), SyntaxError);
assert.strictEqual(require('es-errors/type'), TypeError);
assert.strictEqual(require('es-errors/uri'), URIError);
// 3. Constructed error instances have expected names, messages, and prototype chains
var err = new $Error('base error');
assert.strictEqual(err instanceof Error, true);
assert.strictEqual(err.name, 'Error');
assert.strictEqual(err.message, 'base error');
var evalErr = new $EvalError('eval failed');
assert.strictEqual(evalErr instanceof EvalError, true);
assert.strictEqual(evalErr instanceof Error, true);
assert.strictEqual(evalErr.name, 'EvalError');
assert.strictEqual(evalErr.message, 'eval failed');
var rangeErr = new $RangeError('out of bounds');
assert.strictEqual(rangeErr instanceof RangeError, true);
assert.strictEqual(rangeErr instanceof Error, true);
assert.strictEqual(rangeErr.name, 'RangeError');
assert.strictEqual(rangeErr.message, 'out of bounds');
var refErr = new $RefError('invalid reference');
assert.strictEqual(refErr instanceof ReferenceError, true);
assert.strictEqual(refErr instanceof Error, true);
assert.strictEqual(refErr.name, 'ReferenceError');
assert.strictEqual(refErr.message, 'invalid reference');
var syntaxErr = new $SyntaxError('unexpected token');
assert.strictEqual(syntaxErr instanceof SyntaxError, true);
assert.strictEqual(syntaxErr instanceof Error, true);
assert.strictEqual(syntaxErr.name, 'SyntaxError');
assert.strictEqual(syntaxErr.message, 'unexpected token');
var typeErr = new $TypeError('value is not expected type');
assert.strictEqual(typeErr instanceof TypeError, true);
assert.strictEqual(typeErr instanceof Error, true);
assert.strictEqual(typeErr.name, 'TypeError');
assert.strictEqual(typeErr.message, 'value is not expected type');
var uriErr = new $URIError('malformed URI sequence');
assert.strictEqual(uriErr instanceof URIError, true);
assert.strictEqual(uriErr instanceof Error, true);
assert.strictEqual(uriErr.name, 'URIError');
assert.strictEqual(uriErr.message, 'malformed URI sequence');
// 4. Calling constructor as a function (without new) returns Error instance
var calledTypeErr = $TypeError('called type error');
assert.strictEqual(calledTypeErr instanceof TypeError, true);
assert.strictEqual(calledTypeErr.message, 'called type error');
// 5. getErrorConstructor helper correctly routes error names
assert.strictEqual(getErrorConstructor('eval'), EvalError);
assert.strictEqual(getErrorConstructor('range'), RangeError);
assert.strictEqual(getErrorConstructor('ref'), ReferenceError);
assert.strictEqual(getErrorConstructor('reference'), ReferenceError);
assert.strictEqual(getErrorConstructor('syntax'), SyntaxError);
assert.strictEqual(getErrorConstructor('type'), TypeError);
assert.strictEqual(getErrorConstructor('uri'), URIError);
assert.strictEqual(getErrorConstructor('unknown'), Error);
// 6. createError helper creates instance matching target constructor
var helperErr = createError('range', 'helper index error');
assert.strictEqual(helperErr instanceof RangeError, true);
assert.strictEqual(helperErr.message, 'helper index error');
console.log('PASS: es-errors contract verified');
오리진 시더
익명