Repository navigation
fix(masonkit): ship subdirectory index.d.ts barrels for published web exports - #254
Open
herefishyfish wants to merge 2 commits into
Open
herefishyfish wants to merge 2 commits into
herefishyfish wants to merge 2 commits into
Conversation
This branch has not been deployed
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.
Why
Consumers importing
DivandSpanfrom the published@triniwiz/nativescript-masonkitpackage hit TypeScript errors (Property 'addChild' does not exist on type 'Div'andProperty 'textContent' does not exist on type 'Span').web.d.tsimportsScrollfrom./scrollandTextfrom./text, butpackages/nativescript-masonkit/project.jsonomitted subdirectoryindex.d.tsbarrel files frombuild.options.assets. Built output only contained platform-suffixed files (index.android.d.ts,index.ios.d.ts, etc.), leaving./scrolland./textunresolved indist/.What changed
packages/nativescript-masonkit/project.jsonadds{ "glob": "*/index.d.ts", "input": "packages/nativescript-masonkit", "output": "." }totargets.build.options.assetsso all 13 barrel declaration files ship in the published package.tools/testing/consumer-types/smoke.tswithDiv.addChildandSpan.textContentchecks and addedpackages/nativescript-masonkit/published-types.spec.tsto enforce that every subdirectoryindex.d.tsis included in build assets.Blast Radius
Build-packaging change only. No runtime code changes.
Verification
npx nx build nativescript-masonkitand type-checkingsmoke.tsagainstdist/packages/nativescript-masonkitfailed withTS2339: Property 'textContent' does not exist on type 'Span'andTS2339: Property 'addChild' does not exist on type 'Div';published-types.spec.tsfailed listing all 13 missing barrels.dist/packages/nativescript-masonkitpassed with zero errors,published-types.spec.tspassed (1/1),npx tsc -p tools/testing/consumer-types/tsconfig.jsonpassed, andnpx vitest run --config tools/testing/vitest.config.ts --project masonkit --project androidpassed (1314/1314).Before / After