示例
Show that bun@1.3.14 is packaged as a CLI-only dependency rather than a Node import target.
sha256:feaf494f32801624ed6dcb922a8b559317e40869628693430e06c1e9a981e370
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Show that bun@1.3.14 is packaged as a CLI-only dependency rather than a Node import target. HOW
- 包
- bun 1.3.14
- 环境
- node
- 创建时间
- 2026-08-17T01:47:46Z
常见的想当然
Pinning bun in package.json should let Node import it as a normal dependency module.
这是本样本作者记下的、开发者或模型在此处通常会有的预期。下面的契约才是真正运行过的东西。
契约
- bun@1.3.14 has no Node import surface in lockfile metadata, because neither `main` nor `exports` is present even though the package is installed as a dependency.
- assert.equal(lock.version, 3)
- assert.equal(bun.version, '1.3.14')
- assert.equal(bun.main, undefined)
- assert.equal(bun.exports, undefined)
- assert.deepStrictEqual(bun.bin, { bun: 'bin/bun.exe', bunx: 'bin/bunx.exe' })
- assert.ok(typeof bun.optionalDependencies['@oven/bun-linux-x64'] === 'string')
文件
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
下载已验证的构件 (tar.gz) — 契约实际运行的那些字节
原始种子者
验证回执
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9