* fix(datasource/crate): tolerate null metadata fields
crates.io returns `null` for unset crate metadata fields. `z.string().optional()`
rejects `null`, so a single null field (e.g. `documentation` on the `sentry` crate)
failed the whole metadata parse and discarded the valid `repository`, leaving
`sourceUrl` unset and breaking monorepo grouping. Use `.nullish()` so null fields
are tolerated.
* datasource/crate: Use `Nullish()` for metadata
* datasource/crate: Use `sentry` for null metadata test
* datasource/crate: Use `DeepNullish()` for metadata
* fix(datasource): replace getJsonUnchecked with validated getJson in misc+merge-confidence group
Replaces all getJsonUnchecked calls with Zod-validated getJson calls in:
- crate: adds CrateMetadataSchema to existing schema.ts
- conan: uses existing ConanJSON schema directly
- puppet-forge: new schema.ts with PuppetModuleSchema
- conda: new schema.ts with CondaPackageSchema
- repology: new schema.ts with RepologyPackagesSchema
- jenkins-plugins: new schema.ts, parameterizes helper with ZodType<T>
- custom/formats/json: uses z.unknown() for user-defined responses
- merge-confidence: adds inline MergeConfidenceResponseSchema
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: correct nullable/optional schema fields for crate, jenkins-plugins, puppet-forge
- crate: remove .optional() from all CrateMetadata fields to match string|null type
- jenkins-plugins: use .default({}) instead of .optional() for plugins fields so schemas match required Record types; widen ZodType input to unknown; update JenkinsPluginVersion.releaseTimestamp to Timestamp|null to match MaybeTimestamp output
- puppet-forge: change releases from .optional() to .default([]) to match Release[] type
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: migrate zod/v3 imports to zod/v4 in misc datasources and merge-confidence
Update remaining zod/v3 imports in files added/modified by the getJsonUnchecked
migration to use zod/v4 as required after the upstream migration.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore minor improvements
* remove unnecessary types and reintroduce nullable where necessary
* refactor: move logic into transform
* test: add tests to improve coverage
* chore removed some unused types
* remove type declaration
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: migrate from zod/v3 to zod/v4
This commit contains the logic changes
* chore: migrate imports from zod/v3 to zod/v4
This contains import updates and adds explicit record keys as zod/v4 requires these now
* ci: enforce usage of zod/v4
* fix(crate): respect config.json in indices
* improve coverage
* improve coverage
* Apply suggestions from code review
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
* fixup
* fix import sorting
* further simplify, by merging clonepath/sparse variable
* use registryconfigschema in tests
---------
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>