Files
ai-forms/test
GandClaude Opus 5 c224dc377d test(package): consume the tarball the way npm does (#9)
The suite imported `../dist/index.js` by relative path, which walks past
the two things a consumer actually depends on: the `exports` map and the
`files` allowlist. Both can break while every other test stays green, and
the first witness would be whoever runs `npm install` — a bad way to
learn it on a first publish.

This packs the real tarball, unpacks it as `node_modules/ai-forms`, and
imports it by bare specifier from a temp workspace outside the repo. It
also covers `ai-forms/react`, which had no test at all: React is an
optional peer, so the subpath is resolved and read rather than executed.

Verified red before green against three breakages — a dropped subpath, a
`types` path pointing at nothing, and a `files` list that forgets `dist`.
Each probe records failure as a value instead of throwing, so a broken
entry point names itself rather than failing all five assertions at once.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 07:32:14 +00:00
..