示例
lodash.merge 4.6.2
已验证示例 — npm lodash.merge 4.6.2. contract 在 node 22 · linux alpine/x64 · docker 上运行并通过: assert merge recursively merges own and inherited enumerable string…
sha256:23f8cc0934ac745c5e8ecb62c3bf8caf0a6f06b3033d6e4b9703b89b360b7d03
本网络只提供一件事:能构建的样本。它在沙箱中运行并保留签名回执。它不评级、不担保——同样的代码能否在你的环境构建,它没有测量过。
提交了通过的契约回执的不同签名密钥数量。为 1 表示只有作者;大于 1 表示还有其他人构建过。密钥是自行生成的,背后没有注册身份,因此计的是密钥而非人。
MIT-0
执行证据
声明的环境与签名的运行分开呈现,你可以看到这个样本究竟运行了什么、在哪里运行。
- 证据依据
- 签名契约通过
- 验证回执
- 1
- 构建过它的签名密钥
- 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-28 |
案例
HOW- 目标
- verify pkg:npm/lodash.merge@4.6.2
- 环境
- node 22.23.2
- 创建时间
- 2026-08-28T05:01:19Z
契约
- assert merge recursively merges own and inherited enumerable string keyed properties into destination object
- assert merge recursively merges nested plain objects and arrays
- assert merge preserves destination value when corresponding source property is undefined
- assert merge applies multiple source objects in left-to-right precedence
- assert merge mutates and returns the destination object directly
文件
- 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 pkg:npm/lodash.merge@4.6.2
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:npm/lodash.merge@4.6.2
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:97448c223a9f4d967c0dec8c05229e9fc235f5014e15fc2d72f4121f3743329f","constraints":{"executionContext":"node"},"contract":["assert merge recursively merges own and inherited enumerable string keyed properties into destination object","assert merge recursively merges nested plain objects and arrays","assert merge preserves destination value when corresponding source property is undefined","assert merge applies multiple source objects in left-to-right precedence","assert merge mutates and returns the destination object directly"],"goal":"verify pkg:npm/lodash.merge@4.6.2","kind":"HOW","packages":["pkg:npm/lodash.merge@4.6.2"],"schemaVersion":1},"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/lodash.merge@4.6.2"],"schemaVersion":1,"subject":"pkg:npm/lodash.merge@4.6.2","verifierAdapter":"node-typescript@1"}
{
"name": "sample-lodash-merge",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sample-lodash-merge",
"version": "1.0.0",
"license": "MIT-0",
"dependencies": {
"lodash.merge": "4.6.2"
}
},
"node_modules/lodash.merge": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
"license": "MIT"
}
}
}
{
"name": "sample-lodash-merge",
"version": "1.0.0",
"type": "module",
"license": "MIT-0",
"dependencies": {
"lodash.merge": "4.6.2"
}
}
{
"schemaVersion": 1,
"goal": "verify pkg:npm/lodash.merge@4.6.2",
"kind": "HOW",
"packages": [
"pkg:npm/lodash.merge@4.6.2"
],
"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 { createRequire } from 'node:module';
const require = createRequire(import.meta.url);
const merge = require('lodash.merge');
// 1. Recursively merges properties into destination object
const target1 = { a: 1, b: { x: 10 } };
const src1 = { b: { y: 20 }, c: 3 };
const res1 = merge(target1, src1);
assert.deepEqual(res1, { a: 1, b: { x: 10, y: 20 }, c: 3 });
// 2. Recursively merges nested plain objects and arrays
const target2 = { a: [{ b: 2 }, { d: 4 }] };
const src2 = { a: [{ c: 3 }, { e: 5 }] };
const res2 = merge(target2, src2);
assert.deepEqual(res2, { a: [{ b: 2, c: 3 }, { d: 4, e: 5 }] });
// 3. Preserves destination value when source property is undefined
const target3 = { a: 1, b: 2 };
const src3 = { a: undefined, b: 3, c: undefined };
const res3 = merge(target3, src3);
assert.equal(res3.a, 1);
assert.equal(res3.b, 3);
assert.equal(res3.c, undefined);
// 4. Applies multiple source objects in left-to-right precedence
const target4 = { a: 1 };
const src4_1 = { b: 2, c: 3 };
const src4_2 = { c: 4, d: 5 };
const res4 = merge(target4, src4_1, src4_2);
assert.deepEqual(res4, { a: 1, b: 2, c: 4, d: 5 });
// 5. Mutates and returns the destination object directly
const target5 = { a: 1 };
const res5 = merge(target5, { b: 2 });
assert.equal(res5, target5);
assert.equal(target5.b, 2);
原始种子者
匿名