Skip to content

fix: manifest parce method#40

Merged
shelegdmitriy merged 1 commit into
masterfrom
fix/manifest-parce
Dec 8, 2025
Merged

fix: manifest parce method#40
shelegdmitriy merged 1 commit into
masterfrom
fix/manifest-parce

Conversation

@shelegdmitriy

Copy link
Copy Markdown
Member

This pull request improves the handling of the manifest property 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:

  • Updated the Repository interface in src/types/github.ts to allow the manifest property to be null, reflecting the possibility that a repository may not have a manifest.

Component and utility function robustness:

  • Modified ModuleCard in src/components/ModuleCard.tsx to check for the existence of module.manifest before parsing, preventing errors when the manifest is missing.
  • Updated the parseManifest function in src/lib/utils.ts to use a more precise type for the manifest text, improving type safety and clarity.

@shelegdmitriy
shelegdmitriy requested a review from Copilot December 8, 2025 11:00
@shelegdmitriy
shelegdmitriy temporarily deployed to fix/manifest-parce - asimov.directory PR #40 December 8, 2025 11:00 — with Render Destroyed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Repository interface to allow manifest: ManifestRaw | null
  • Modified ModuleCard component to check for manifest existence before parsing
  • Enhanced parseManifest function 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.

@shelegdmitriy
shelegdmitriy merged commit 8187c55 into master Dec 8, 2025
7 checks passed
@shelegdmitriy
shelegdmitriy deleted the fix/manifest-parce branch December 8, 2025 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants