Repository navigation
fix: ship react.d.ts again, mirror invoice-kit's refunds (1.12.1) - #20
Merged
Merged
Conversation
- The two tsup configs build in parallel into dist/ and the first one cleaned it, so dist/react.d.ts was sometimes deleted after it was written. 1.10.0 to 1.12.0 shipped without it, and report-studio's typecheck fails on '@mgpl-diagnostics/client/react'. npm run build now empties dist/ once before tsup, and scripts/check-dist.mjs fails the build when a file named in package.json exports is missing. - PaymentStatus gains REFUNDED and CANCELLED, InvoiceTotals gains refunded and Payment gains kind, as in invoice-kit 2.1.0 (report-studio's contract check). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018jBohnZEym7gZYsPkBCmVg
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.
🤖 Generated with Claude Code
https://claude.ai/code/session_018jBohnZEym7gZYsPkBCmVg
Why
report-studio's
mainfails its typecheck in two ways:Could not find a declaration file for module '@mgpl-diagnostics/client/react', followed by implicit-any errors in every page that uses the hooks.TotalsOutfails, because invoice-kit 2.1.0 added refunds and the client didn't follow.What changed
react.d.ts.
tsup.config.tshas two configs that tsup builds in parallel intodist/. The first one hadclean: true, so it sometimes deleteddist/react.d.tsafter the second config had written it. Locally, 1 build in 3 came out without the file, and 1.10.0 to 1.12.0 were published without it.npm run buildnow emptiesdist/once and then runs tsup. Neither config cleans anymore.prepareruns the same build.scripts/check-dist.mjsfails the build if any file named in package.jsonmain,typesorexportsis missing. It caught the deleted file when I removed it by hand.Contract. Mirrors invoice-kit
src/types.tsandsrc/calc.ts:PaymentStatusadds"REFUNDED"and"CANCELLED".InvoiceTotalsaddsrefunded.Paymentaddskind?: "payment" | "refund".docs/api.mdandllms-full.txtare updated to match. The version goes to 1.12.1.Checks
npm run typecheckandnpm run build: five builds in a row, each with all 7 export files.TotalsOutandPaymentInassertions against invoice-kit's main source. They pass with this change and fail without it.After merge, push the
v1.12.1tag. report-studio's^1.0.0range then picks it up on its next CI run.Generated by Claude Code