Skip to content

build: modernize packaging and tooling for 0.3.1#16

Merged
ignsm merged 10 commits intomainfrom
packaging-0.3.1
Apr 10, 2026
Merged

build: modernize packaging and tooling for 0.3.1#16
ignsm merged 10 commits intomainfrom
packaging-0.3.1

Conversation

@ignsm
Copy link
Copy Markdown
Owner

@ignsm ignsm commented Apr 10, 2026

Breaking

  • FormSchema type → FormDefinition. validateSchema()validateDefinition().
  • FormRenderer prop schemadefinition (React and Vue).
  • ESM-only. Dropped legacy main and module fields. Minimum Node is 18.

Fixes

  • Bundlephobia was reporting ~500 B for @formhaus/core (webpack couldn't follow extension-less ESM re-exports from the barrel file).
  • @formhaus/vue types failed to resolve under moduleResolution: "node16" / "nodenext".
  • @formhaus/figma devDep chain pulled 3 moderate CVEs via old vitest@2. Bumped to vitest@4 and [email protected].
  • Dropped leftover "JSON-schema-driven" wording from package description fields.

Sizes (gzipped)

  • @formhaus/core: 2.87 KB
  • @formhaus/react: 3.15 KB
  • @formhaus/vue: 5.49 KB

Build and tooling

  • core, react: tsctsup single bundled ESM.
  • vue: vue-tsc --declarationvite-plugin-dts with type rollup.
  • Stopped shipping sourcemaps and declaration maps. Install size down 65-75% per package.
  • exports field: types condition first. sideEffects: false on core/react/vue.
  • engines.node: ">=18" on every published package.
  • CI matrix: Node 20 and 22.
  • CI now runs publint, @arethetypeswrong/cli --profile esm-only, and a test:resolve script that imports built dist/index.js through native Node ESM as a regression guard.

Verification

  • pnpm lint:packages → All good × 3
  • pnpm check:types → all 🟢 (esm-only profile)
  • pnpm --filter @formhaus/core --filter @formhaus/react run test:resolve → ESM resolve OK × 2
  • pnpm test → 175 passing (core 136, react 14, vue 10, figma 15)
  • pnpm audit → 0 vulnerabilities

After merge

  • Tag v0.3.1 on main
  • npm publish core, react, vue (figma skipped — Figma plugin, not npm)
  • Verify Bundlephobia shows real size for @formhaus/[email protected]

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 10, 2026

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

Project Deployment Actions Updated (UTC)
formhaus Ready Ready Preview, Comment Apr 10, 2026 10:23am

@ignsm ignsm merged commit ae306b7 into main Apr 10, 2026
4 checks passed
@ignsm ignsm deleted the packaging-0.3.1 branch April 10, 2026 14:55
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