Beispiel
electron-to-chromium 1.5.411: versions
Verifiziertes Beispiel für npm electron-to-chromium 1.5.411: versions. Der Vertrag lief auf node 22 · linux debian/x64 · docker und bestand.
sha256:6d1baeccd7d87571d80ae23038b2a49868aff61e484b72596afad5e2750231f3
Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen.
Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen.
MIT-0
Ausführungsbelege
Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.
- Beleggrundlage
- Signierter Vertrag bestanden
- Verifizierungsbelege
- 1
- Signaturschlüssel, die es gebaut haben
- 1
Deklarierte Umgebung
node 22.23 linux 24 · ubuntu · glibc 2.39 x64 node 22.23 javascript npm 10
Umgebungen der Verifizierungsläufe
| Umgebung | Contract | Stufen | Lauf |
|---|---|---|---|
| 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-19 |
Fall
HOW- Ziel
- verify electron-to-chromium.versions in pkg:npm/electron-to-chromium@1.5.411
- Pakete
- Symbole
-
- electron-to-chromium.versions
- Umgebung
- node 22.23.2
- Erstellt
- 2026-09-17T17:37:10Z
Contract
- versions is an object mapping Electron major/minor version strings to Chromium major version strings
- versions maps legacy Electron versions to Chromium major versions
- versions maps modern Electron versions to Chromium major versions
- versions returns undefined for unmapped or non-existent Electron versions
- versions contains only string keys and string values
Dateien
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- src/index.js
- test/contract.js
Quelltext
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 electron-to-chromium.versions in pkg:npm/electron-to-chromium@1.5.411
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/electron-to-chromium@1.5.411
Demonstrate these symbols/APIs:
- electron-to-chromium.versions
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:18ae9e1d2b4097359ca3eb9a07c3e865c1371ccebc2c8a4500713fa5b20299b8","constraints":{"executionContext":"node"},"contract":["versions is an object mapping Electron major/minor version strings to Chromium major version strings","versions maps legacy Electron versions to Chromium major versions","versions maps modern Electron versions to Chromium major versions","versions returns undefined for unmapped or non-existent Electron versions","versions contains only string keys and string values"],"goal":"verify electron-to-chromium.versions in pkg:npm/electron-to-chromium@1.5.411","kind":"HOW","packages":["pkg:npm/electron-to-chromium@1.5.411"],"schemaVersion":1,"symbols":["electron-to-chromium.versions"]},"contractCommand":["node","test/contract.js"],"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/electron-to-chromium@1.5.411"],"schemaVersion":1,"subject":"pkg:npm/electron-to-chromium@1.5.411","symbols":["electron-to-chromium.versions"],"verifierAdapter":"node-typescript@1"}
{
"name": "sample-electron-to-chromium-versions",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-electron-to-chromium-versions",
"version": "1.0.0",
"license": "MIT-0",
"dependencies": {
"electron-to-chromium": "1.5.411"
}
},
"node_modules/electron-to-chromium": {
"version": "1.5.411",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.411.tgz",
"integrity": "sha512-gglkxzokjHfawpGxq75XdBV2/l3BAPzrsMs70qgaZdTW5rpV1tC4MdgJVP9fN126bODA4ZJQkn1wryEzJyQXIg==",
"license": "ISC"
}
}
}
{
"name": "sample-electron-to-chromium-versions",
"version": "1.0.0",
"private": true,
"description": "Clean-room verification sample for electron-to-chromium.versions",
"main": "src/index.js",
"scripts": {
"test": "node test/contract.js"
},
"dependencies": {
"electron-to-chromium": "1.5.411"
},
"license": "MIT-0"
}
{
"schemaVersion": 1,
"goal": "verify electron-to-chromium.versions in pkg:npm/electron-to-chromium@1.5.411",
"kind": "HOW",
"packages": [
"pkg:npm/electron-to-chromium@1.5.411"
],
"symbols": [
"electron-to-chromium.versions"
]
}
const { versions } = require('electron-to-chromium');
/**
* Looks up the Chromium major version for a given Electron version string.
* @param {string} electronVersion Electron version string (e.g. '1.4', '33.0')
* @returns {string|undefined} Chromium major version string or undefined if not found
*/
function getChromiumVersion(electronVersion) {
if (typeof electronVersion !== 'string') {
return undefined;
}
return versions[electronVersion];
}
module.exports = {
versions,
getChromiumVersion
};
const assert = require('node:assert');
const { versions, getChromiumVersion } = require('../src/index.js');
const rawEtc = require('electron-to-chromium');
// Verify export matches raw electron-to-chromium export
assert.strictEqual(versions, rawEtc.versions, 'versions should match module export');
assert.strictEqual(typeof versions, 'object', 'versions must be an object');
assert.ok(versions !== null, 'versions must not be null');
// 1. versions is an object mapping Electron major/minor version strings to Chromium major version strings
const keys = Object.keys(versions);
assert.ok(keys.length > 200, 'versions contains major/minor version mappings');
assert.ok(keys.every(k => typeof k === 'string'), 'all keys in versions are string version numbers');
assert.ok(Object.values(versions).every(v => typeof v === 'string'), 'all values in versions are string version numbers');
// 2. versions maps legacy Electron versions to Chromium major versions
assert.strictEqual(versions['0.20'], '39', 'electron 0.20 maps to chromium 39');
assert.strictEqual(versions['1.4'], '53', 'electron 1.4 maps to chromium 53');
assert.strictEqual(getChromiumVersion('0.20'), '39', 'helper getChromiumVersion resolves 0.20');
assert.strictEqual(getChromiumVersion('1.4'), '53', 'helper getChromiumVersion resolves 1.4');
// 3. versions maps modern Electron versions to Chromium major versions
assert.strictEqual(versions['10.0'], '85', 'electron 10.0 maps to chromium 85');
assert.strictEqual(versions['20.0'], '104', 'electron 20.0 maps to chromium 104');
assert.strictEqual(versions['30.0'], '124', 'electron 30.0 maps to chromium 124');
assert.strictEqual(versions['33.0'], '130', 'electron 33.0 maps to chromium 130');
assert.strictEqual(getChromiumVersion('33.0'), '130', 'helper getChromiumVersion resolves 33.0');
// 4. versions returns undefined for unmapped or non-existent Electron versions
assert.strictEqual(versions['999.0'], undefined, 'non-existent version returns undefined');
assert.strictEqual(versions['invalid-version'], undefined, 'invalid version key returns undefined');
assert.strictEqual(getChromiumVersion('999.0'), undefined, 'helper returns undefined for non-existent version');
assert.strictEqual(getChromiumVersion(null), undefined, 'helper returns undefined for non-string input');
assert.strictEqual(getChromiumVersion(123), undefined, 'helper returns undefined for numeric input');
console.log('Contract tests passed successfully.');
Ursprungs-Seeder
anonym