Skip to content

Clean up npm publish output and add exports map #600

@domachine

Description

@domachine

The published package currently ships no TypeScript types and has no exports field, leaving the API surface undefined. This issue tracks three small, low-risk changes to package.json:

  1. Add prepublishOnly script — runs tsc -b . before every npm publish to ensure .d.ts files are always generated and up-to-date.

  2. Add files array — add relevant modules and build/*.d.ts so the public modules and the generated type declarations are included in the package. Dev artefacts (scripts, tests, csaf_2_1, etc.) are explicitly excluded.

  3. Add exports map — declare the public sub-path entry points (e.g. "./validate.js", "./basic.js") each with a types condition pointing to build/*.d.ts and an import condition pointing to the source .js. This formalises the API surface and prevents consumers from reaching into lib or schemas directly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions