fix: manifest parce method#40
Merged
Merged
Conversation
shelegdmitriy
temporarily deployed
to
fix/manifest-parce - asimov.directory PR #40
December 8, 2025 11:00 — with
Render
Destroyed
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request enhances null-safety for the manifest property across the codebase by allowing repositories to have a null manifest value, preventing runtime errors when manifests are missing. The changes update type definitions, utility functions, and component logic to properly handle the nullable manifest case.
Key Changes:
- Updated the
Repositoryinterface to allowmanifest: ManifestRaw | null - Modified
ModuleCardcomponent to check for manifest existence before parsing - Enhanced
parseManifestfunction type signature for improved type safety with nullable manifests
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/types/github.ts |
Updated Repository.manifest type to allow null, reflecting that repositories may not have a manifest |
src/lib/utils.ts |
Updated parseManifest function parameter type to use NonNullable<Repository['manifest']>['text'] for better type safety |
src/components/ModuleCard.tsx |
Added null-check for module.manifest before calling parseManifest, preventing runtime errors when manifest is missing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This pull request improves the handling of the
manifestproperty in the codebase to make it more robust against cases where the manifest may be missing or null. The changes ensure that components and utility functions correctly handle situations where a repository does not have a manifest, preventing potential runtime errors.Type and nullability updates:
Repositoryinterface insrc/types/github.tsto allow themanifestproperty to benull, reflecting the possibility that a repository may not have a manifest.Component and utility function robustness:
ModuleCardinsrc/components/ModuleCard.tsxto check for the existence ofmodule.manifestbefore parsing, preventing errors when the manifest is missing.parseManifestfunction insrc/lib/utils.tsto use a more precise type for the manifest text, improving type safety and clarity.