网络测出了什么
下面每一行都是测量结果,不是观点。每一条都链接到一个已发布的样本,其 contract 在断网的固定容器中执行,你可以自己重跑并反驳结论。
操作系统和运行时来自所链接样本记录的环境;缺少该维度的条目会在筛选时排除。
597 条发现,覆盖 8 个生态。
- cargo
- composer
- gem
- golang
- hex
- npm
- pub
- pypi
样本自述,其契约实测
正在显示已发布样本测得的第 151–175 条(共 568 条)。
-
golang样本契约go · linux/x64github.com/google/uuid@v1.6.0
普遍认为Setting a failing random source causes uuid.New() to return a zeroed Nil UUID quietly, while SetRand(nil) panics on subsequent generation.
实测uuid.SetRand with a failing entropy source causes uuid.New and uuid.NewString to panic immediately with the reader error while uuid.NewRandom returns uuid.Nil and the error, and uuid.SetRand(nil) safely restores crypto/rand without a nil pointer panic.
-
hex样本契约elixir · linux/x64plug@1.20.3
普遍认为Plug.Session validates secret_key_base at initialization alongside signing_salt and accepts standard 32-byte keys for cryptographic signing.
实测assert Plug.Session.init/1 enforces :signing_salt for cookie storage at initialization but defers :secret_key_base validation until runtime, where omitting it or providing fewer than 64 bytes raises ArgumentError only when fetching or writing cookies
-
npm样本契约node · linux/x64jsdom@26.1.0
普遍认为Instantiating JSDOM with default options provides a working window where localStorage and sessionStorage methods can be used immediately in-memory without configuring a URL.
实测Accessing window.localStorage or window.sessionStorage on a default JSDOM instance throws a SecurityError DOMException because about:blank has an opaque origin.
-
npm样本契约node · linux/x64lightningcss@1.33.0
普遍认为compiling pure CSS modules silently drops top-level element selectors or emits them unchanged as global styles without error
实测transform with cssModules.pure set to true throws a SyntaxError stating that a selector in CSS modules should contain at least one class or ID selector when encountering impure element selectors
-
npm样本契约node · linux/x64postcss@8.5.26
普遍认为Passing map: true to postcss.process() returns a separate source map generator object on result.map
实测postcss.process(css, { map: true }) leaves result.map undefined because boolean true enables inline base64 comments in result.css, requiring map: { inline: false } to populate result.map with an external SourceMapGenerator
-
npm样本契约node · linux/x64zod@3.24.2
普遍认为A custom error map returning an empty object falls back to Zod's default error message, and global setErrorMap overrides validation messages across all nested schemas.
实测Returning an empty object from a custom error map leaves the issue message undefined rather than falling back to ctx.defaultError, causing error.format() and error.flatten() to produce arrays containing undefined.
-
pypi样本契约python · linux/x64python-dateutil@2.9.0.post0
普遍认为Passing positive offset strings like tzstr('EST+5') or configuring posix_offset=True produces a timezone 5 hours ahead of UTC.
实测tzstr('EST+5') produces an offset of -5 hours (UTC-5) per POSIX standard inversion, whereas tzstr('UTC+5') defaults to +5 hours (UTC+5) unless posix_offset=True is set
-
npm样本契约node · linux/x64three@0.185.1
普遍认为Initializing a Color with hexadecimal 0x808080 stores raw normalized channel values (128/255 ≈ 0.502) identically to new Color(0.502, 0.502, 0.502).
实测When ColorManagement.enabled is true, Color interprets hexadecimal, CSS string, and named color inputs as sRGB and converts them to linear working space (~0.216 for 0x808080), whereas numeric constructors assume linear space (~0.502).
-
npm样本契约node · linux/x64typescript@5.9.3
普遍认为Setting compilerOptions.module to ESNext automatically enables modern Node or Bundler module resolution to resolve node_modules packages.
实测When compilerOptions.moduleResolution is omitted, compilerOptions.module set to ESNext defaults moduleResolution to Classic (1) rather than Node or Bundler, while Preserve defaults to Bundler (100) and Node16 defaults to Node16 (3).
-
npm样本契约node · linux/x64three@0.185.1
普遍认为WebGLRenderer accepts WebGLRenderingContext instances with backwards compatibility fallback and allows coordinateSystem reconfiguration.
实测WebGLRenderer throws an explicit error when initialized with a WebGLRenderingContext (WebGL 1), requires WebGL 2, and exposes a read-only coordinateSystem returning WebGLCoordinateSystem (2000).
-
npm样本契约node · linux/x64three@0.185.1
普遍认为Texture.transformUv automatically recomputes transformed UV coordinates from updated offset, repeat, and rotation properties when matrixAutoUpdate is true.
实测Texture.transformUv mutates the input Vector2 in place using its internal Matrix3 followed by wrapping and flipY inversion, but mutating offset or repeat has no effect until updateMatrix is explicitly invoked despite matrixAutoUpdate being true.
-
npm样本契约node · linux/x64three@0.185.1
普遍认为WebGLRenderer.capabilities exposes a maxAnisotropy numeric property or getMaxAnisotropy defaults to 1 when anisotropic filtering extensions are missing
实测renderer.capabilities.getMaxAnisotropy() returns 0 rather than 1 or undefined when EXT_texture_filter_anisotropic is missing, leaving capabilities.maxAnisotropy undefined.
-
npm样本契约node · linux/x64three@0.185.1
普遍认为Vector3.subVectors returns a new Vector3 instance representing the difference of two vectors or subtracts both arguments from the receiver's initial value.
实测Vector3.subVectors(a, b) computes the component-wise difference a - b into the receiver, mutating it in place and returning its reference for chaining while leaving operands a and b unchanged.
-
npm样本契约node · linux/x64three@0.185.1
普遍认为Skeleton.update writes absolute bone world matrices into boneMatrices and automatically recomputes hierarchy transforms when bone positions change.
实测Skeleton.update multiplies each bone's matrixWorld by its boneInverse to populate boneMatrices with relative skinning offsets, producing 4x4 identity matrices at bind pose regardless of non-zero bone world coordinates.
-
npm样本契约node · linux/x64three@0.185.1
普遍认为CanvasTexture defaults colorSpace to SRGBColorSpace or forwards a colorSpace constructor argument like Texture.
实测CanvasTexture initializes colorSpace to NoColorSpace ('') and silently drops any 10th colorSpace constructor argument because its constructor accepts only 9 parameters.
-
npm样本契约node · linux/x64three@0.185.1
普遍认为transformUv automatically synchronizes with texture offset and repeat when matrixAutoUpdate is enabled, and CanvasTexture serializes with metadata type CanvasTexture.
实测CanvasTexture transforms UV coordinates with flipY inversion but leaves transformUv unaffected by offset or repeat changes until updateMatrix is called manually, even when matrixAutoUpdate is true.
-
npm样本契约node · linux/x64three@0.185.1
普遍认为SkinnedMesh.applyBoneTransform loads vertex coordinates from geometry.attributes.position into target and returns the transformed vertex in world space.
实测SkinnedMesh.applyBoneTransform transforms the coordinates provided directly in the target vector rather than fetching position attributes from geometry, mutating target in-place and returning it in local mesh space.
-
npm样本契约node · linux/x64three@0.185.1
普遍认为cloning a ShaderMaterial shallow-copies uniforms and passing index0AttributeName to the constructor assigns it to the material instance
实测ShaderMaterial deep-clones Three math uniforms so mutations to cloned Vector and Color values do not mutate the original material, while resetting render-target textures to null.
-
npm样本契约node · linux/x64three@0.185.1
普遍认为PointLight defaults decay to 1 for linear attenuation, treats power as an independent property in Watts, and interprets distance=0 as disabling light emission.
实测PointLight defaults decay to 2 (physically correct inverse-square falloff) and distance to 0 (infinite cutoff distance), while dynamically calculating luminous power in lumens as 4*pi times luminous intensity in candela.
-
npm样本契约node · linux/x64three@0.185.1
普遍认为MeshSurfaceSampler.sample returns a new sampled point object or Vector3 instance.
实测MeshSurfaceSampler.sample populates passed target vectors in place and returns the MeshSurfaceSampler instance for chaining rather than returning a new sample object.
-
npm样本契约node · linux/x64three@0.185.1
普遍认为InstancedMesh sets type to 'InstancedMesh', initializes instanceColor to an allocated buffer on construction, and requires manual bounding sphere computation before raycasting.
实测InstancedMesh inherits type 'Mesh' while identifying via isInstancedMesh true, initializes all instance matrices to identity, and keeps instanceColor null until setColorAt is called.
-
npm样本契约node · linux/x64three@0.185.1
普遍认为CanvasTexture initializes with version 0 like Texture, and reading needsUpdate returns a boolean indicating whether the texture is flagged for update.
实测CanvasTexture constructor triggers needsUpdate to initialize version and source.version at 1 rather than 0, while reading needsUpdate evaluates to undefined because needsUpdate is a setter-only property on Texture.
-
npm样本契约node · linux/x64three@0.185.1
普遍认为InstancedBufferGeometry initializes instanceCount to 0 and BufferGeometryLoader restores the configured instanceCount from JSON
实测InstancedBufferGeometry initializes instanceCount to Infinity by default and preserves a configured instanceCount upon clone(), but BufferGeometryLoader.parse() resets instanceCount to Infinity when deserializing toJSON() output.
-
npm样本契约node · linux/x64@tanstack/query-core@5.90.20
普遍认为QueryClient.ensureQueryData refetches stale data before returning, and QueryClient.setQueryData clears cached entries when the updater returns undefined.
实测QueryClient.ensureQueryData returns cached data without calling queryFn even when staleTime is 0
-
hex样本契约elixir · linux/x64nimble_csv@1.3.0
普遍认为NimbleCSV.parse_string parses all CSV rows by default, returning a one-row list for single-line CSV and a list containing header and data rows for multiline CSV.
实测NimbleCSV.RFC4180.parse_string defaults to skip_headers: true, returning an empty list for a single-row CSV and omitting the header row for multiline CSV unless skip_headers: false is explicitly passed.
如何核对这里的任何一行
打开样本,读它的 contract,然后运行。contract 就是该样本自己的测试:它在断网的固定容器中运行,那次运行的签名回执才是网络所存储的东西。这里没有一条依赖我们对某个库的理解,只依赖这个库实际做了什么。
有些已发布的样例不在这个页面上。它们的契约通过了,样例也是活的 —— 但契约里没有一行能当句子读。像 expect(x).toBe(1) 这样的断言,放在它所检验的那个认知旁边,对读者什么也没说。与其登出没人能读的证据,不如空着。