Skip to content

fix: type prehydrate settings as AppSettings#1430

Merged
ghostdevv merged 1 commit intonpmx-dev:mainfrom
ls-root:fix/prehydrate-settings-type
Feb 12, 2026
Merged

fix: type prehydrate settings as AppSettings#1430
ghostdevv merged 1 commit intonpmx-dev:mainfrom
ls-root:fix/prehydrate-settings-type

Conversation

@ls-root
Copy link
Copy Markdown
Contributor

@ls-root ls-root commented Feb 12, 2026

This fixes an any type on the settings var that is getting read from the localStorage.
I fixed this by parsing the settings object as the AppSettings type from /app/composables/useSettings.ts

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 12, 2026 2:38pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 12, 2026 2:38pm
npmx-lunaria Ignored Ignored Feb 12, 2026 2:38pm

Request Review

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

The pull request updates the prehydrate utility to add a TypeScript type assertion when parsing settings from localStorage. The expression JSON.parse(localStorage.getItem('npmx-settings') || '{}') is now cast to Partial<AppSettings>. This change only affects TypeScript type information and does not change runtime logic or control flow.

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description accurately relates to the changeset, explaining the type assertion fix for localStorage settings and referencing the AppSettings type.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉


Comment @coderabbitai help to get the list of available commands and usage tips.

@ls-root ls-root force-pushed the fix/prehydrate-settings-type branch from 2e4e166 to 5ea203f Compare February 12, 2026 14:35
@ghostdevv ghostdevv added this pull request to the merge queue Feb 12, 2026
Merged via the queue into npmx-dev:main with commit 97f0582 Feb 12, 2026
17 checks passed
@github-actions
Copy link
Copy Markdown

Thanks for your first contribution, @ls-root! 🥳

We'd love to welcome you to the npmx community. Come and say hi on Discord! And once you've joined, visit npmx.wamellow.com to claim the contributor role.

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