Skip to content

npm tarball ships compiled test files (~half of dist/) #5

Description

@chtnnh

npm pack --dry-run for 0.3.0 shows 194 files / 800 kB unpacked, and a large share is dist/*.test.js, dist/*.test.d.ts, and their sourcemaps (e.g. dist/verify.test.js at 14 kB), plus dist/test-helpers.*.

Harmless but wasteful for every npm i -g @chtnnh/know-code.

Fix options:

  • a publish tsconfig that excludes src/**/*.test.ts and src/test-helpers.ts (tests can build via a separate tsconfig.test.json used by npm test), or
  • tighten the files globs / add !dist/**/*.test.* exclusions in packages/cli/package.json.

Verify with npm pack --dry-run that bin/, hooks/, and runtime dist/ remain intact and the test surface disappears.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions