Skip to content

fix(v0): export type aliases used in json-schema-form.d.ts public API - #275

Merged
gabrielseco merged 5 commits into
mainfrom
fix/export-v0-dts-types
Sep 17, 2026
Merged

gabrielseco merged 5 commits into
mainfrom
fix/export-v0-dts-types

Conversation

@gabrielseco

@gabrielseco gabrielseco commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

I was doing some migration replacement and I bumped into a new problem while replacing tsup with tsdown

I created a dev version and the change is working for my library

Could we ship this as this feels like a no brainer

I update tool_versions as I was having problem with the dev:release script


Note

Low Risk
Additive type exports and dev toolchain version pins only; no runtime or validation logic changes.

Overview
Exports 12 type aliases in json-schema-form.d.ts (Fields, HeadlessFormOutput, JSFConfig, ModifyConfig, and related names) that were already used in public function signatures but were not importable. This fixes rolldown-plugin-dts / tsdown builds that treat those names as undefined and break downstream re-exports (e.g. @remoteoss/remote-json-schema-form-kit).

Pins local Node to 22.13.1 in v0/.nvmrc and v0/.tool-versions (from 18.14.0).

Reviewed by Cursor Bugbot for commit 7ec77ef. Bugbot is set up for automated code reviews on this repo. Configure here.

Fields, $TSFixMe, HeadlessFormOutput, FieldAttrs, JSONSchemaObjectType,
and 7 other type aliases are used throughout v0's public function
signatures but were never `export`ed themselves. rollup-plugin-dts
(used by tsup consumers) tolerates this silently, but rolldown-plugin-dts
(used by tsdown consumers) does not: it flags `Import 'Fields' will
always be undefined` and drops the type entirely, which cascades into
`possibly undefined` / implicit-any errors for any consumer re-exporting
these names by value (e.g. @remoteoss/remote-json-schema-form-kit's
`export type { Fields, FieldAttrs, JSONSchemaObjectType,
HeadlessFormOutput } from '@remoteoss/json-schema-form-v0-deprecated'`).

Purely additive (adds `export` to existing type aliases), no runtime
or type-shape change for existing consumers.

Verified against a real downstream consumer (remoteoss/remote-flows,
mid-migration from tsup to tsdown for TypeScript 7 support): before
this fix, tsdown's dts build emitted 15 IMPORT_IS_UNDEFINED warnings
and the consuming example app failed `tsc -b` with 6 errors; after
patching this file locally, both are clean (0 warnings, 0 errors).
@gabrielseco gabrielseco self-assigned this Sep 16, 2026
@ollyd
ollyd self-requested a review September 16, 2026 23:17
@gabrielseco
gabrielseco merged commit 17932f5 into main Sep 17, 2026
4 checks passed
@gabrielseco
gabrielseco deleted the fix/export-v0-dts-types branch September 17, 2026 05:57
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.

2 participants