src/index.ts exports internal helpers alongside the actual conversion API: TypeMapper, FieldSanitizer, XLSFormParser, XLSLoader, TSVGenerator, ConfigManager and XLSValidator. Every one of these is now public API under semver, so any refactor of them (see #60–#65) becomes a breaking change.
The conversion entry points are also named inconsistently:
- xlsform → lstsv:
new XLSFormToTSVConverter().convert() (a class)
- xlsform → ddi:
buildDdiXml()
- lstsv → ddi:
lstsvToDdiXml()
- lstsv → xlsform:
lstsvToXlsform()
Proposal
- Offer a uniform set of functions:
xlsformToLstsv, xlsformToDdi, lstsvToDdi, lstsvToXlsform, plus the existing data/CSV helpers. Keep XLSFormToTSVConverter as a thin wrapper marked deprecated.
- Move the internals to a subpath export (
@correlaid/formtransform/internals) with no stability promise, or stop exporting them. First check which of them formtransform-app and qwacback actually import.
- Keep
QUESTION_TYPES, APPEARANCES and TYPE_MAPPINGS in the main entry point; they are the intended public catalogue.
This is a breaking change, so it should ship in a minor bump with a deprecation period.
src/index.tsexports internal helpers alongside the actual conversion API:TypeMapper,FieldSanitizer,XLSFormParser,XLSLoader,TSVGenerator,ConfigManagerandXLSValidator. Every one of these is now public API under semver, so any refactor of them (see #60–#65) becomes a breaking change.The conversion entry points are also named inconsistently:
new XLSFormToTSVConverter().convert()(a class)buildDdiXml()lstsvToDdiXml()lstsvToXlsform()Proposal
xlsformToLstsv,xlsformToDdi,lstsvToDdi,lstsvToXlsform, plus the existing data/CSV helpers. KeepXLSFormToTSVConverteras a thin wrapper marked deprecated.@correlaid/formtransform/internals) with no stability promise, or stop exporting them. First check which of them formtransform-app and qwacback actually import.QUESTION_TYPES,APPEARANCESandTYPE_MAPPINGSin the main entry point; they are the intended public catalogue.This is a breaking change, so it should ship in a minor bump with a deprecation period.