Clear default entry point
Why it matters
A package whose default entry point exports nothing useful forces consumers to discover and import from internal paths — paths that encode your directory structure and break silently when you refactor. ISO 25010 interoperability fails when import { Thing } from 'your-package' returns undefined. This also breaks tree-shaking, IDE autocompletion, and any tool that introspects the package's public API via its declared entry point. The entry point is a contract; an empty or useless one is a broken contract.
Severity rationale
Critical because a misconfigured entry point means the primary import path resolves to nothing, causing immediate runtime failures for every consumer of the package.
Remediation
Ensure src/index.ts (or whatever your exports["."] points to) explicitly re-exports everything that's part of the public API.
// src/index.ts — clean, explicit entry point:
export { ApiClient } from './client'
export { ApiError, RateLimitError } from './errors'
export type { ApiConfig, ApiResponse } from './types'
Consumers should never need to import from your-package/dist/lib/internal. Map any intentional sub-modules in package.json:
{
"exports": {
".": "./dist/index.mjs",
"./utils": "./dist/utils.mjs"
}
}
Test with a fresh install: import { primaryExport } from 'your-package' should resolve and have the expected type.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the SDK / Package Quality Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- iso-25010:2011 · maintainability.modifiability — Modifiability — clear entry point enables clean API evolution
- iso-25010:2011 · compatibility.interoperability — Interoperability — entry-point resolution across toolchains
Taxons
History
- 2026-04-18·v1.0.0·Initial import from sdk-package-quality·automated