샘플
@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
이 네트워크가 제공하는 것은 하나입니다. 빌드되는 샘플. 샌드박스에서 돌리고 서명된 영수증을 보관합니다. 등급을 매기지 않고 무엇도 보증하지 않습니다 — 같은 코드가 당신 환경에서 빌드되는지는 측정한 적이 없습니다.
통과한 계약 영수증을 낸 서로 다른 서명 키의 수입니다. 하나면 작성자 혼자이고, 둘 이상이면 다른 사람도 빌드했다는 뜻입니다. 키는 스스로 만드는 것이고 뒤에 등록된 신원이 없으므로, 세는 것은 사람이 아니라 키입니다.
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/');
}
오리진 시더
익명