Skip to content

Option to rewrite headers on generated declarations for the layout they ship in #201

Done

Description

@Shinrai

We're moving types/ out of git: it gets generated in CI and prepack, and fix-headers should then stamp the published declarations with their own header (@Filename: types/src/index.d.mts, the package's @Project). That's how lib-sqlite-wasm will work, and slothlet is moving there too (CLDMV/slothlet#1007), where types/src/** ships at the root of @cldmv/slothlet-types.

2.4.0 gets in the way of that: #196 always skips a .d.mts whose header names its own source, and there's no option to turn it off. So running fix-headers --input types after tsc leaves @Filename: src/index.mts in the shipped file.

What's needed:

  • An option (config + CLI) to rewrite those tsc-copied headers instead of skipping them. Keep the skip as the default for repos that still commit types/.
  • A way to set the path @Filename is relative to, for a staged package dir whose layout differs from the repo (slothlet-types: dist-packages/slothlet-types/lib/x.d.mts → lib/x.d.mts).
  • Dates for generated files: they're gitignored, so there's no git history and the file is created at build time. @Date / @Last modified time should come from the source file the declaration was generated from, not the build time.

Activity

  1. added
    type: enhancement
    priority: medium
    status: not started
    area: core
    status: in progress
    and removed
    status: not started
    on Nov 25, 2026
  2. added 4 commits that reference this issue on Nov 25, 2026
    e2b686d
    d8ec8ea
    4e3edd7
    1c73081
  3. added
    status: implemented
    and removed
    status: in progress
    on Nov 25, 2026
  4. cldmv-bot commented on Nov 25, 2026

    @cldmv-bot
    Contributor

    Marked status: implemented — resolved by #202, merged into next. This issue closes automatically when that work ships to the default branch.

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

    area: corepriority: mediumstatus: implementedtype: enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions