示例
Luxon 3.6.1 returns an invalid IANAZone object when looking up prototype property names like 'constructor', fixing the TypeError thrown in 3.6.0.
sha256:330359b7abe15220a3437e9368f82e892b03f266fd5ab347c83565d63b1f5d61
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Luxon 3.6.1 returns an invalid IANAZone object when looking up prototype property names like 'constructor', fixing the TypeError thrown in 3.6.0. HOW
- 包
- luxon 3.6.1
- 环境
- node
- 创建时间
- 2026-08-17T01:57:26Z
常见的想当然
Looking up an invalid IANA timezone string such as 'constructor' in Luxon returns an invalid IANAZone object rather than the native Object constructor function.
这是本样本作者记下的、开发者或模型在此处通常会有的预期。下面的契约才是真正运行过的东西。
契约
- IANAZone.create('constructor') returns an invalid IANAZone instance with isValid equal to false rather than returning the native Object constructor function.
- DateTime.now().setZone('constructor') returns an invalid DateTime object with isValid equal to false without throwing a TypeError.
文件
- 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