Skip to content

feat: export test documentation schemas from package root - #77

Open
ryanduguid wants to merge 1 commit into
ConsumerDataStandardsAustralia:mainfrom
ryanduguid:feat/public-schema-exports
Open

ryanduguid wants to merge 1 commit into
ConsumerDataStandardsAustralia:mainfrom
ryanduguid:feat/public-schema-exports

Conversation

@ryanduguid

Copy link
Copy Markdown

Schema types in @cds-au/testdocs currently require imports through internal dist paths. This exports the existing test-documentation and changelog types, plus testDocSchema and changeLogSchema, from the package root. Existing deep imports, validators and document generators remain available. No schema definitions, dependencies or package layout change.

The README includes TypeScript and JavaScript examples and a packed-package check. This addresses the import usability concern in #56 through the existing entry point; it does not relocate the published package root.

Verification:

  • TypeScript compilation passed using the installed compiler (node node_modules/typescript/bin/tsc).
  • Installed an npm pack tarball in a separate consumer directory. node test/package-imports.js <consumer> passed on Windows with Node 18.20.8 and 24.19.0: public types, invalid typed input, legacy type imports, runtime schema contents, existing API exports and CLI help.
  • The same check against the unchanged package failed with 14 missing-export diagnostics and an unused expected-error directive.
  • JavaScript syntax and git diff --check passed.

Existing verification blockers, observed before the change:

  • npm run build compiles successfully, then fails because copy-additional tries to copy the absent cli/config.json.
  • npm run lint fails because tslint is not installed or declared in the package manifest.

Full documentation generation and Linux execution were not verified. The package has no existing test script; the new check uses the installed TypeScript compiler and Node's standard library.

This branch has not been deployed

No deployments
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