Skip to content

[Bug]: busabase-package "./audit" export is missing from built dist files #118

Closed

Description

@trackoor

Before submitting

  • I searched existing issues and did not find the same problem.
  • I am using the latest Busabase release.

Affected surface

SDK or API

Version

busabase-package 1.4.0 (main commit 20610c2)

What happened?

packages/busabase-package/package.json publishes the ./audit subpath in publishConfig.exports:

"./audit": {
  "types": "./dist/audit.d.ts",
  "default": "./dist/audit.js"
}

packages/busabase-package/src/audit.ts exists, and audit.test.ts covers auditPackage and auditSkill, while packages/busabase-package/tsdown.config.ts only lists the other twelve subpath entries (apply, client, collect, discover, frontmatter, github, index-build, layout-read, layout-write, plan, template, tree) and omits audit: "src/audit.ts".

Because audit is omitted from the tsdown entry map, the published busabase-package tarball has no dist/audit.js or dist/audit.d.ts. Importing busabase-package/audit fails at runtime with ERR_MODULE_NOT_FOUND and fails TypeScript typechecking with TS2307, whereas the other twelve subpath exports resolve as expected.

Reproduction steps

mkdir repro && cd repro
npm init -y
npm pkg set type=module
npm install [email protected] [email protected]

node -e 'import("busabase-package/audit")'
ls node_modules/busabase-package/dist/audit*

printf '{"compilerOptions":{"noEmit":true,"module":"nodenext","moduleResolution":"nodenext","types":[]}}\n' > tsconfig.json
printf 'import { auditPackage } from "busabase-package/audit";\nexport const x = auditPackage;\n' > index.ts
npx tsc -p tsconfig.json

Environment

Linux x64, Node.js v26.13.0, npm 11.20.0, TypeScript 5.9.3

Logs or screenshots

node:internal/modules/esm/resolve:241
    throw new ERR_MODULE_NOT_FOUND(
          ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/path/to/repro/node_modules/busabase-package/dist/audit.js' imported from /path/to/repro/[eval]

ls: cannot access 'node_modules/busabase-package/dist/audit*': No such file or directory

index.ts(1,30): error TS2307: Cannot find module 'busabase-package/audit' or its corresponding type declarations.

Credit: https://ucsbplse.github.io/

Activity

  1. mr-kelly commented on Nov 17, 2026

    @mr-kelly
    Contributor

    Thanks for the detailed report and the reproduction steps.

    I checked this again on current main (commit dc049a5, [email protected]):

    • packages/busabase-package/src/audit.ts is present and exports auditPackage and auditSkill
    • publishConfig.exports still advertises the ./audit subpath as ./dist/audit.js and ./dist/audit.d.ts
    • packages/busabase-package/tsdown.config.ts still lists the other twelve entry points and does not include audit: "src/audit.ts"

    I also pulled the published [email protected] tarball from npm: it has no dist/audit.js or dist/audit.d.ts, so this is still present in 1.5.0, not only 1.4.0. Importing busabase-package/audit fails with ERR_MODULE_NOT_FOUND / TS2307, matching what you found.

    We've logged this as a bug and will get the missing tsdown entry fixed so the ./audit export is included in the published package. We'll update this issue once that's in a release. I don't have a release date to share yet.

    Thanks again for catching this.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions