Exclude test-utils.ts from package build output - #2327
Open
ayushsingh82 wants to merge 1 commit into
Open
Conversation
core/splice-client/dist/test-utils.d.ts and core/ledger-client's equivalent are checked into git: the shared exclude list catches *.test.ts/*.spec.ts/__tests__/** but not a file literally named test-utils.ts. Confirmed by rebuilding core/splice-client's declarations with and without this change -- test-utils.d.ts only disappears with the fix. Deliberately not excluding fixtures.ts/mocks.ts: core/wallet-test-utils intentionally exports fixtures.ts as part of its real public API, so a blanket filename exclude there would break its build. Fixes canton-network#1899 Signed-off-by: ayushsingh82 <ayushsinghmi711@gmail.com>
Contributor
Author
|
@rukmini-basu-da whenever you have a chance, would appreciate a look at this one. |
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.
Summary
core/splice-client/dist/test-utils.d.ts(andcore/ledger-client's equivalent) are checked into git. The sharedtsconfig.base.jsonexclude list already catches*.test.ts,*.spec.ts, and__tests__/**, but not a file literally namedtest-utils.ts.Added
**/test-utils.tsto the shared exclude.Deliberately did not exclude
fixtures.ts/mocks.tsmore broadly:core/wallet-test-utilsintentionally exportsfixtures.tsas part of its real public API (main/module/typesall point atdist/index.*, andindex.tsdoesexport { test, expect } from './fixtures.js'), so a blanket filename-based exclude there would break that package's actual build output.Fixes #1899
Test plan
core/splice-client's declarations twice: with this change,test-utils.d.ts/.d.ts.mapare absent fromdist/; reverting the change and rebuilding again, they reappear -- confirms this fix is what causes the difference, not something elsegrepthat no file anywhere in the repo imports from atest-utils.tspath, so nothing depends on it being in the build output