Skip to content

build(fi-core): leave test files out of the npm package - #811

Open
nik13 wants to merge 1 commit into
devfrom
build/fi-core-no-test-files
Open

nik13 wants to merge 1 commit into
devfrom
build/fi-core-no-test-files

Conversation

@nik13

@nik13 nik13 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

@traceai/fi-core stops shipping its test files in the npm package. The package files list keeps src/ (the source maps point into it) and excludes src/**/__tests__/** and src/**/*.test.*, the same way the other TypeScript packages in this repo exclude their tests.

Why?

Every published tarball carried 191 test files under src/__tests__/. They are not used at runtime and only add size: the packed tarball goes from 1.43 MB to 1.01 MB.

How was it tested?

  • pnpm pack and npm pack --dry-run at the base and with this change: 738 → 547 entries, 191 → 0 test entries; the 502 dist/ files are byte-identical.

  • Every entry point (main, module, types, both exports targets, typesVersions) is present in the new tarball, and require/import of the packed tarball both load in a fresh project.

  • fi-core jest 6026/6013/0/13, provider tests 144/144 (otel 2.0.1 and 2.12.0) and semantic-conventions 124/124: the same counts before and after.

  • Unit tests added / updated (no code change; package contents checked by pack listing)

  • Integration tests pass (or N/A — no gateway behavior changed)

  • npm run typecheck / npm run lint all pass

  • Public types, env vars, or SDK behavior changes are documented in the relevant README (no public change)

Checklist

  • Commit messages follow Conventional Commits
  • No TODOs or commented-out code left in
  • No real API keys or secrets in the diff
  • If prose was added or changed: checked against docs/VOCABULARY.md

Notes for reviewers

Targets dev. Two lines in typescript/packages/fi-core/package.json and one CHANGELOG line.

The package files list keeps src/ for source maps and excludes the test folders under it, so the tarball carries no test entries and the same dist/ files.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant