Skip to content

Generate types/ in CI instead of committing it, and give the published declarations proper headers #1007

Backlog

Description

@Shinrai

types/ is generated by types:build, but 180 files of it are committed on next (only types/dist and types/stub are ignored). The declarations also carry no file headers, since fix-headers only scans .configs, .github, api_tests, src, tests and the root.

What I want instead:

  • Gitignore types/ entirely and build it in CI (build:ci / publish) and in prepack, same as dist/.
  • Run fix-headers on the declarations after they're generated, in the layout they actually ship in, so @Filename matches the path inside the published package.

The layout differs per package, so the headers need to follow it:

  • @cldmv/slothlet-types: build-subpackages.mjs carves types/src/** into the package root, so types/src/lib/runtime/runtime.d.mts ships as lib/runtime/runtime.d.mts. Its header should say @Filename: lib/runtime/runtime.d.mts and @Project: @cldmv/slothlet-types. The generated root index.d.mts aggregator needs one too.
  • @cldmv/slothlet core: the stubs ship under types/stub/, so those headers say types/stub/... with @Project: @cldmv/slothlet.

So the header pass runs on the staged package dirs (dist-packages/slothlet-types, and the core stubs), not on types/ in the repo.

@Filename should be slashless once fix-headers ships CLDMV/fix-headers#198. Also watch out for CLDMV/fix-headers#195 (a declaration header copied from its source by tsc).

Activity

  1. added
    type: enhancement
    priority: low
    type: ci
    status: not started
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: lowstatus: not startedtype: citype: enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions