stack/packages/stack-shared
Mantra e0c1cc5376
Fix null-unsafe payments config validation for partial overrides (#1363)
## Summary
- Make the `branchPaymentsSchema` custom validator tolerant of partial
override objects
- Avoid crashing when `payments.products` or `payments.productLines` are
absent during validation
- Add regression tests for partial configs plus the existing
missing-line and customer-type mismatch cases

## Testing
- Added Vitest coverage for partial payments configs and validation
failures
- Lint passed for the touched schema files
- Typecheck passed for `packages/stack-shared`

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Bug Fixes**
* Improved validation robustness with stricter type-safety checks for
payment-related data configurations.
  * Enhanced error messages for clearer feedback on validation failures.

* **Tests**
* Added comprehensive test coverage for edge cases including missing
configurations and type mismatches.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-05-12 10:08:01 -07:00
..
src Fix null-unsafe payments config validation for partial overrides (#1363) 2026-05-12 10:08:01 -07:00
.eslintrc.cjs tsup for stack-shared (#647) 2025-04-28 21:26:52 -07:00
LICENSE Licenses 2024-02-28 15:27:00 +01:00
package.json chore: update package versions 2026-05-11 10:10:47 -07:00
tsconfig.json Update packages, add bundle analyzer, add declarationMap (#665) 2025-05-16 17:07:44 -07:00
tsdown.config.ts Fix build 2026-02-27 00:48:07 -08:00
vitest.config.ts In-source unit tests (#429) 2025-02-14 11:47:52 -08:00