Skip to content

Adopt the generic index.cjs shim (v4.46.0 package-layout convention) #209

Done

Description

@Shinrai

docs/conventions/package-layout.md as of CLDMV/.github v4.46.0 (#584, resolving CLDMV/.github#589) makes src/index.cjs one generic drop-in file, examples/package-layout/src/index.cjs in CLDMV/.github: after the Node version guard it returns the single exported value when the ESM entry has one distinct value (aliases count once), otherwise the module object import gives. Hand-written .default unwraps and attached aliases go away.

fix-headers 2.5.1 ships module.exports = require("./index.mjs").default and exports a single value, so the shim returns exactly what require() returns today — no consumer-visible change, so this ships as a minor, not a major (the majors are for packages whose require() result changes: uuid, wisp, node-android-tv-remote, holdmytask).

The change: replace the hand-written unwrap with the shim file (only the package name and Node floor in its message differ per repo), keep it a sibling of src/index.mjs, and keep the build copying it verbatim to dist/index.cjs.

Activity

  1. added
    type: enhancement
    priority: low
    status: not started
    status: in progress
    and removed
    status: not started
    on Nov 27, 2026
  2. added a commit that references this issue on Nov 27, 2026
    434db44
  3. added
    status: implemented
    and removed
    status: in progress
    on Nov 27, 2026
  4. cldmv-bot commented on Nov 27, 2026

    @cldmv-bot
    Contributor

    Marked status: implemented — resolved by #212, 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

    priority: lowstatus: implementedtype: enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions