サンプル
@jridgewell/resolve-uri 3.1.2: resolve-uri
検証済みサンプル — npm @jridgewell/resolve-uri 3.1.2: resolve-uri. node 22 · linux alpine/x64 · docker で contract を実行し、成功しました: resolve-uri resolves relative paths…
sha256:ea00140b437268290ad15d2b50a8a45f08157d58b216a1a9616ad081169b009a
このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。
合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。
MIT-0
実行証拠
宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。
- 証拠の基準
- 署名済みコントラクト合格
- 検証レシート
- 2
- ビルドした署名鍵
- 1
宣言された環境
node 22.23 linux 24 · ubuntu · glibc 2.39 x64 node 22.23 javascript npm 10
検証実行環境
| 環境 | コントラクト | ステージ | 実行日 |
|---|---|---|---|
| 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 |
ケース
HOW- ゴール
- verify resolve-uri in pkg:npm/%40jridgewell/resolve-uri@3.1.2
- シンボル
-
- resolve-uri
- 環境
- node 22.23.2
- 作成日
- 2026-08-26T05:12:37Z
コントラクト
- 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
ファイル
- PROMPT.md
- csx.json
- package-lock.json
- package.json
- spec.json
- test/contract.mjs
ソース
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/');
}
オリジンシーダー
匿名