fix: exclude test files from npm package#1203
Merged
Merged
Conversation
- Added exclude patterns to tsconfig.cjs.json and tsconfig.esm.json
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1203 +/- ##
=======================================
Coverage 79.20% 79.20%
=======================================
Files 580 580
Lines 18155 18155
Branches 8617 8617
=======================================
Hits 14379 14379
Misses 3776 3776
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
frederikprijck
approved these changes
Oct 10, 2025
gyaneshgouraw-okta
approved these changes
Oct 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
This PR excludes test files from the npm package build, significantly reducing the package size distributed to end users.
What changed:
excludepatterns totsconfig.cjs.jsonandtsconfig.esm.jsonto prevent test files from being compiled into thedistdirectory**/*.test.ts,**/*.spec.ts, and**/tests/**Why this is important:
.fernignore, so these changes won't be overwritten by the SDK generatorImpact:
Files modified:
tsconfig.cjs.json- Added exclude patternstsconfig.esm.json- Added exclude patternsNote: Both files are already listed in
.fernignore(lines 30-31), so these changes are safe from being overwritten during SDK regeneration.References
npm packwas including test files fromsrc/management/tests/Testing
Manual testing performed:
rm -rf dist && npm run buildnpm pack --dry-run 2>&1 | grep -c "tests/"returns 0find dist -type d -name "tests"returns emptyWhat was tested:
distdirectorynpm pack --dry-runWhat was not tested:
Checklist