Beispiel
@jridgewell/resolve-uri 3.1.2: resolve-uri
Verifiziertes Beispiel für npm @jridgewell/resolve-uri 3.1.2: resolve-uri. Der Vertrag lief auf node 22 · linux alpine/x64 · docker und bestand.
sha256:ea00140b437268290ad15d2b50a8a45f08157d58b216a1a9616ad081169b009a
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
- 2
- 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 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-26 |
| 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-07 |
Fall
HOW- Ziel
- verify resolve-uri in pkg:npm/%40jridgewell/resolve-uri@3.1.2
- Symbole
-
- resolve-uri
- Umgebung
- node 22.23.2
- Erstellt
- 2026-08-26T05:12:37Z
Contract
- resolve-uri resolves relative paths against a base HTTP URL
- resolve-uri resolves root-relative absolute paths against base origin
- resolve-uri resolves query parameters and fragment hashes against base URL
- resolve-uri resolves scheme-relative URLs inheriting scheme from base
- resolve-uri resolves relative paths against relative base paths
- resolve-uri returns input unchanged when input is already an absolute URL
- resolve-uri handles empty strings and undefined base gracefully
Dateien
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- test/contract.mjs
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 resolve-uri in pkg:npm/%40jridgewell/resolve-uri@3.1.2
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/%40jridgewell/resolve-uri@3.1.2
Demonstrate these symbols/APIs:
- resolve-uri
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:31894e2ca7bc8ff8feec2bbc2e8af9b5037e1bd73b51647e89820ef9a05ce12b","constraints":{"executionContext":"node"},"contract":["resolve-uri resolves relative paths against a base HTTP URL","resolve-uri resolves root-relative absolute paths against base origin","resolve-uri resolves query parameters and fragment hashes against base URL","resolve-uri resolves scheme-relative URLs inheriting scheme from base","resolve-uri resolves relative paths against relative base paths","resolve-uri returns input unchanged when input is already an absolute URL","resolve-uri handles empty strings and undefined base gracefully"],"goal":"verify resolve-uri in pkg:npm/%40jridgewell/resolve-uri@3.1.2","kind":"HOW","packages":["pkg:npm/%40jridgewell/resolve-uri@3.1.2"],"schemaVersion":1,"symbols":["resolve-uri"]},"contractCommand":["node","test/contract.mjs"],"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/%40jridgewell/resolve-uri@3.1.2"],"schemaVersion":1,"subject":"pkg:npm/%40jridgewell/resolve-uri@3.1.2","symbols":["resolve-uri"],"verifierAdapter":"node-typescript@1"}
{
"name": "sample-resolve-uri",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-resolve-uri",
"version": "1.0.0",
"dependencies": {
"@jridgewell/resolve-uri": "3.1.2"
}
},
"node_modules/@jridgewell/resolve-uri": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
"license": "MIT",
"engines": {
"node": ">=6.0.0"
}
}
}
}
{
"name": "sample-resolve-uri",
"version": "1.0.0",
"type": "module",
"private": true,
"dependencies": {
"@jridgewell/resolve-uri": "3.1.2"
}
}
{
"schemaVersion": 1,
"goal": "verify resolve-uri in pkg:npm/%40jridgewell/resolve-uri@3.1.2",
"kind": "HOW",
"packages": [
"pkg:npm/%40jridgewell/resolve-uri@3.1.2"
],
"symbols": [
"resolve-uri"
],
"constraints": {
"executionContext": "node"
},
"runtimeConditions": {
"ecosystem": "npm",
"language": "javascript",
"moduleSystem": "cjs",
"packageManager": "npm@10.9.8",
"runtime": "node@22.23.2"
}
}
import assert from 'node:assert/strict';
import resolveURI from '@jridgewell/resolve-uri';
// 1. resolve-uri resolves relative paths against a base HTTP URL
{
assert.equal(resolveURI('baz.js', 'https://example.com/foo/bar/'), 'https://example.com/foo/bar/baz.js');
assert.equal(resolveURI('baz.js', 'https://example.com/foo/bar/index.html'), 'https://example.com/foo/bar/baz.js');
assert.equal(resolveURI('../baz.js', 'https://example.com/foo/bar/'), 'https://example.com/foo/baz.js');
assert.equal(resolveURI('../../baz.js', 'https://example.com/foo/bar/'), 'https://example.com/baz.js');
}
// 2. resolve-uri resolves root-relative absolute paths against base origin
{
assert.equal(resolveURI('/baz.js', 'https://example.com/foo/bar/'), 'https://example.com/baz.js');
assert.equal(resolveURI('/app/bundle.js', 'https://example.com:8080/nested/path/'), 'https://example.com:8080/app/bundle.js');
}
// 3. resolve-uri resolves query parameters and fragment hashes against base URL
{
assert.equal(resolveURI('?query=1&page=2', 'https://example.com/foo/bar'), 'https://example.com/foo/bar?query=1&page=2');
assert.equal(resolveURI('#section-1', 'https://example.com/foo/bar'), 'https://example.com/foo/bar#section-1');
assert.equal(resolveURI('?query=1#section-1', 'https://example.com/foo/bar'), 'https://example.com/foo/bar?query=1#section-1');
}
// 4. resolve-uri resolves scheme-relative URLs inheriting scheme from base
{
assert.equal(resolveURI('//cdn.example.com/assets/app.js', 'https://example.com/page'), 'https://cdn.example.com/assets/app.js');
assert.equal(resolveURI('//cdn.example.com/assets/app.js', 'http://example.com/page'), 'http://cdn.example.com/assets/app.js');
}
// 5. resolve-uri resolves relative paths against relative base paths
{
assert.equal(resolveURI('bar.js', './src/'), './src/bar.js');
assert.equal(resolveURI('../dist/bundle.js', './src/components/'), './src/dist/bundle.js');
assert.equal(resolveURI('file.txt', 'dir/sub/'), 'dir/sub/file.txt');
}
// 6. resolve-uri returns input unchanged when input is already an absolute URL
{
assert.equal(resolveURI('https://other.example.com/api', 'https://example.com/app'), 'https://other.example.com/api');
assert.equal(resolveURI('http://example.org/', 'https://example.com/'), 'http://example.org/');
}
// 7. resolve-uri handles empty strings and undefined base gracefully
{
assert.equal(resolveURI('', ''), '');
assert.equal(resolveURI('foo.js', undefined), 'foo.js');
assert.equal(resolveURI('', 'https://example.com/path/'), 'https://example.com/path/');
}
Ursprungs-Seeder
anonym