Sample
espree 10.4.0: supportedEcmaVersions
Verified sample for npm espree 10.4.0: supportedEcmaVersions. The contract ran on node 22 · linux debian/x64 · docker and passed.
sha256:97a36af6f71da68aaa2e39c906129f5ffa15f43359132f71f35db365c153e857
This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured.
How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people.
MIT-0
Execution evidence
The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.
- Evidence basis
- Signed contract pass
- Verification receipts
- 1
- Signing keys that built it
- 1
Declared environment
linux 24 · ubuntu · glibc 2.39 x64 npm
Verification-run environments
| Environment | Contract | Stages | Run |
|---|---|---|---|
| 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-09-17 |
Case
HOW- Goal
- verify espree.supportedEcmaVersions in pkg:npm/espree@10.4.0
- Packages
- Symbols
-
- espree.supportedEcmaVersions
- Created
- 2026-09-16T23:45:49Z
Contract
- espree.supportedEcmaVersions is an array of supported ECMAScript edition numbers
- espree.supportedEcmaVersions contains edition numbers starting at 3 and ending at 17, excluding version 4
- espree.supportedEcmaVersions aligns with espree.latestEcmaVersion
- espree.parse accepts all editions listed in espree.supportedEcmaVersions
- espree.parse throws Error with message Invalid ecmaVersion when ecmaVersion is not present in espree.supportedEcmaVersions
Files
- PROMPT.md
- csx.json
- index.mjs
- package-lock.json
- package.json
- spec.json
- test/contract.mjs
Source
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 espree.supportedEcmaVersions in pkg:npm/espree@10.4.0
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/espree@10.4.0
Demonstrate these symbols/APIs:
- espree.supportedEcmaVersions
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:7f39faa347ed687a8fd771e54960a8e060feeef98e76cf05ef942a6732a5d702","contract":["espree.supportedEcmaVersions is an array of supported ECMAScript edition numbers","espree.supportedEcmaVersions contains edition numbers starting at 3 and ending at 17, excluding version 4","espree.supportedEcmaVersions aligns with espree.latestEcmaVersion","espree.parse accepts all editions listed in espree.supportedEcmaVersions","espree.parse throws Error with message Invalid ecmaVersion when ecmaVersion is not present in espree.supportedEcmaVersions"],"goal":"verify espree.supportedEcmaVersions in pkg:npm/espree@10.4.0","kind":"HOW","packages":["pkg:npm/espree@10.4.0"],"schemaVersion":1,"symbols":["espree.supportedEcmaVersions"]},"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/espree@10.4.0"],"schemaVersion":1,"subject":"pkg:npm/espree@10.4.0","symbols":["espree.supportedEcmaVersions"],"verifierAdapter":"node-typescript@1"}
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
const espree = require('espree');
export const supportedEcmaVersions = espree.supportedEcmaVersions;
export const parse = espree.parse;
export const latestEcmaVersion = espree.latestEcmaVersion;
export default espree;
{
"name": "sample-espree-supportedecmaversions",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-espree-supportedecmaversions",
"version": "1.0.0",
"dependencies": {
"espree": "10.4.0"
}
},
"node_modules/acorn": {
"version": "8.18.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz",
"integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==",
"license": "MIT",
"bin": {
"acorn": "bin/acorn"
},
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/acorn-jsx": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
"integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
"license": "MIT",
"peerDependencies": {
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
}
},
"node_modules/eslint-visitor-keys": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz",
"integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==",
"license": "Apache-2.0",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"url": "https://opencollective.com/eslint"
}
},
"node_modules/espree": {
"version": "10.4.0",
"resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz",
"integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==",
"license": "BSD-2-Clause",
"dependencies": {
"acorn": "^8.15.0",
"acorn-jsx": "^5.3.2",
"eslint-visitor-keys": "^4.2.1"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"url": "https://opencollective.com/eslint"
}
}
}
}
{
"name": "sample-espree-supportedecmaversions",
"version": "1.0.0",
"type": "module",
"main": "index.mjs",
"scripts": {
"test": "node test/contract.mjs"
},
"dependencies": {
"espree": "10.4.0"
}
}
{
"schemaVersion": 1,
"goal": "verify espree.supportedEcmaVersions in pkg:npm/espree@10.4.0",
"kind": "HOW",
"packages": [
"pkg:npm/espree@10.4.0"
],
"symbols": [
"espree.supportedEcmaVersions"
]
}
import assert from 'node:assert/strict';
import { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
const espree = require('espree');
// 1. espree.supportedEcmaVersions is an array of supported ECMAScript edition numbers
{
assert.ok(Array.isArray(espree.supportedEcmaVersions), 'supportedEcmaVersions must be an array');
assert.ok(espree.supportedEcmaVersions.length > 0, 'supportedEcmaVersions must not be empty');
assert.ok(
espree.supportedEcmaVersions.every((v) => typeof v === 'number' && Number.isInteger(v)),
'every version in supportedEcmaVersions must be an integer'
);
}
// 2. espree.supportedEcmaVersions contains edition numbers starting at 3 and ending at 17, excluding version 4
{
assert.equal(espree.supportedEcmaVersions[0], 3, 'first supported version must be 3');
assert.equal(
espree.supportedEcmaVersions[espree.supportedEcmaVersions.length - 1],
17,
'latest supported version must be 17'
);
assert.equal(espree.supportedEcmaVersions.includes(4), false, 'version 4 must be excluded');
assert.deepEqual(
espree.supportedEcmaVersions,
[3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17],
'supportedEcmaVersions must match known edition list'
);
}
// 3. espree.supportedEcmaVersions aligns with espree.latestEcmaVersion
{
assert.equal(
espree.latestEcmaVersion,
espree.supportedEcmaVersions[espree.supportedEcmaVersions.length - 1],
'latestEcmaVersion must match the last entry in supportedEcmaVersions'
);
}
// 4. espree.parse accepts all editions listed in espree.supportedEcmaVersions
{
for (const version of espree.supportedEcmaVersions) {
const code = version >= 6 ? 'const x = 1;' : 'var x = 1;';
const ast = espree.parse(code, { ecmaVersion: version, sourceType: 'script' });
assert.equal(ast.type, 'Program', `parsing with ecmaVersion ${version} must return Program node`);
}
}
// 5. espree.parse throws Error with message Invalid ecmaVersion when ecmaVersion is not present in espree.supportedEcmaVersions
{
const invalidVersions = [0, 1, 2, 4, 18, 99];
for (const inv of invalidVersions) {
assert.throws(
() => espree.parse('var x = 1;', { ecmaVersion: inv }),
{
name: 'Error',
message: 'Invalid ecmaVersion.'
},
`ecmaVersion ${inv} must be rejected with Invalid ecmaVersion error`
);
}
}
console.log('All espree.supportedEcmaVersions contract assertions passed.');
Origin Seeder
anonymous