Skip to content

chore(core): drop fixtures from published npm package#33

Merged
ignsm merged 1 commit into
mainfrom
chore/drop-fixtures-from-npm
May 10, 2026
Merged

chore(core): drop fixtures from published npm package#33
ignsm merged 1 commit into
mainfrom
chore/drop-fixtures-from-npm

Conversation

@ignsm
Copy link
Copy Markdown
Owner

@ignsm ignsm commented May 10, 2026

Fixtures (packages/core/fixtures/*.json) were shipped with the npm tarball but never reachable from consumer code: exports only declared the root entry, so import x from '@formhaus/core/fixtures/basic-form.json' fails under strict ESM (Node 16+, Vite production, Next.js prod build) with ERR_PACKAGE_PATH_NOT_EXPORTED. Two options were on the table:

  1. Add ./fixtures/*.json to exports, keep shipping them
  2. Drop them from the tarball, treat them as repo-internal demo data

This PR takes (2). Reasons:

  • They're demo data for the docs and playground, not API surface. Consumers write their own definitions; nobody real builds an app on @formhaus/core/fixtures/basic-form.json.
  • Coupling consumer code to internal fixture file names creates a future versioning risk: rename dispute-form.json → bumps anyone using it.
  • The Quick Start guide that pointed at @formhaus/core/fixtures/basic-form.json was broken in production builds anyway. Now it shows an inline definition (which is what the README and every other docs page already do).

Changes

  • packages/core/package.json: removed "fixtures" from files. Tarball now contains dist/, package.json, README.md, LICENSE only.
  • docs/guide/index.md: Quick Start now uses an inline definition matching root README's style.
  • .changeset/drop-fixtures-from-npm.md: patch on @formhaus/core.

Fixtures still live in the repo at packages/core/fixtures/ for the playground and reference. They're just not part of the published package.

Verifying

cd packages/core && pnpm pack
tar -tzf formhaus-core-0.3.1.tgz
# package/dist/index.js
# package/package.json
# package/README.md
# package/dist/index.d.ts
# package/LICENSE

@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
formhaus Ready Ready Preview, Comment May 10, 2026 2:30pm

Request Review

@ignsm ignsm merged commit cc11a5b into main May 10, 2026
8 checks passed
@ignsm ignsm deleted the chore/drop-fixtures-from-npm branch May 10, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant