Skip to content

fix: expose direct adapter subpath exports#682

Open
Genmin wants to merge 1 commit into
ciscoheat:mainfrom
Genmin:fix/adapter-subpath-exports
Open

fix: expose direct adapter subpath exports#682
Genmin wants to merge 1 commit into
ciscoheat:mainfrom
Genmin:fix/adapter-subpath-exports

Conversation

@Genmin

@Genmin Genmin commented May 1, 2026

Copy link
Copy Markdown

Summary

  • add first-class package exports for each public adapter module, including extensionless and .js suffixed imports
  • add matching typesVersions entries so TypeScript resolves the direct adapter imports
  • extend the adapter type check script to verify public adapter exports stay in sync with dist files

Why

Some package manager / optimizer combinations eagerly inspect the adapters barrel and then fail on optional adapter peers that the app does not use. This keeps the existing barrel import intact while giving affected projects a supported direct import path such as sveltekit-superforms/adapters/zod4 or sveltekit-superforms/adapters/zod4.js.

Refs #671.

Validation

  • pnpm run prepack
  • pnpm run check:adapters
  • pnpm run check
  • pnpm run lint
  • packed-package smoke test with optional dependencies omitted: installed the generated tarball with only zod/typescript/@types/json-schema, confirmed valibot/effect/typebox were absent, imported sveltekit-superforms/adapters/zod4 and sveltekit-superforms/adapters/zod4.js at runtime, and type-checked both direct import paths with TypeScript bundler resolution

@vercel

vercel Bot commented May 1, 2026

Copy link
Copy Markdown

@Genmin is attempting to deploy a commit to the Andreas Sderlund's projects Team on Vercel.

A member of the Team first needs to authorize it.

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