Skip to content

Update jsr extension - #22503

Merged
raycastbot merged 12 commits into
raycast:mainfrom
j3lte:ext/jsr
Oct 29, 2025
Merged

raycastbot merged 12 commits into
raycast:mainfrom
j3lte:ext/jsr

Conversation

@j3lte

@j3lte j3lte commented Oct 29, 2025 •

Copy link
Copy Markdown
Contributor

Description

  • Refactored components, make the code more maintainable
  • Enabled for Windows platform
  • Improved search functionality, better sorting and scoped search
  • Added ability to search for packages in a specific scope and runtime compatibility (see here)
  • Update dependencies and cleanup linting issues

Screencast

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: jsr Issues related to the jsr extension platform: macOS platform: Windows OP is author The OP of the PR is the author of the extension labels Oct 29, 2025
@raycastbot

Copy link
Copy Markdown
Collaborator

Thank you for the update! 🎉

You can expect an initial review within five business days.

@greptile-apps greptile-apps Bot 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.

Greptile Overview

Greptile Summary

This PR significantly improves the JSR extension through comprehensive refactoring and feature additions. The code has been reorganized into smaller, reusable components, making it more maintainable.

Key improvements:

  • Refactored monolithic components into focused, single-responsibility modules (Search.tsx, OptionalActions.tsx, StatsSections.tsx)
  • Added Windows platform support by declaring it in package.json
  • Implemented scoped search functionality allowing users to search within specific package scopes (e.g., @scope/package or scope:name)
  • Added runtime compatibility filters (e.g., runtime:deno, runtime:node) for more precise package discovery
  • Enhanced search with better result boosting and increased result limit from 20 to 50
  • Migrated from .eslintrc.json to flat ESLint config with stricter type import rules
  • Updated all dependencies to latest versions and removed unused node-fetch dependency
  • Improved UI with clickable scope navigation and icons for dependencies/dependents

Issues found:

  • Typo in preference description: "istead" should be "instead"
  • Missing runtimes in useMemo dependency array could cause stale formData

Confidence Score: 4/5

  • This PR is safe to merge after addressing the missing dependency in useMemo
  • The refactoring is well-executed with proper separation of concerns. Two minor issues were found: a typo (non-critical) and a missing dependency in useMemo (should be fixed to prevent stale data). The Windows support and new search features are properly implemented.
  • Pay attention to extensions/jsr/src/hooks/useJSRSearch.ts - fix the missing dependency in useMemo before merging

Important Files Changed

File Analysis

Filename Score Overview
extensions/jsr/package.json 4/5 Updated dependencies and added Windows platform support; contains typo in preference description
extensions/jsr/src/hooks/useJSRSearch.ts 3/5 Added scoped search and runtime filtering; missing runtimes in useMemo dependency array
extensions/jsr/src/components/Search.tsx 5/5 New search component extracted from main file, clean implementation with proper state management
extensions/jsr/src/search-jsr.tsx 5/5 Simplified to wrapper component calling Search with null scope, excellent refactoring
extensions/jsr/src/components/ItemDetails.tsx 5/5 Added scope navigation and improved metadata display with icons for dependencies

Additional Comments (1)

  1. extensions/jsr/package.json, line 27 (link)

    syntax: typo: 'istead' should be 'instead'

14 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@j3lte

j3lte commented Oct 29, 2025

Copy link
Copy Markdown
Contributor Author

@greptileai score the PR again after the latest changes, please keep it short and concise to the changes

@greptile-apps greptile-apps Bot 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.

Looking at the latest changes in this PR, here's my assessment:

Score: 8.5/10

Strengths:

  • Excellent refactoring: Code is now much more modular and maintainable with proper component separation
  • Smart search improvements: Added scope-based search and runtime filtering with intelligent query parsing
  • Better type safety: Added proper TypeScript types and removed any implicit any types
  • Good dependency management: Updated deps and removed unused packages (node-fetch)
  • Windows support: Platform expansion is valuable

Minor concerns:

  • Migration to eslint.config.js: The new flat config format is correct, but the defineConfig usage seems non-standard (should be just exporting array directly)
  • Duplicate filtering logic: Both useDependencies and useDependents have similar filtering logic that could be abstracted
  • No error boundaries: New components like <Search> lack error handling for rendering failures

Suggestion for eslint.config.js:

const raycastConfig = require("@raycast/eslint-config");

module.exports = [
    ...raycastConfig,
    {
        rules: {
            "@typescript-eslint/consistent-type-imports": "error",
        },
    }
];

Overall, this is a solid improvement to the extension with well-thought-out features and clean architecture.

@pernielsentikaer pernielsentikaer self-assigned this Oct 29, 2025

@pernielsentikaer pernielsentikaer 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.

Looks good to me, approved 🔥

@raycastbot
raycastbot merged commit fb0d422 into raycast:main Oct 29, 2025
@github-actions

Copy link
Copy Markdown
Contributor

@raycastbot

Copy link
Copy Markdown
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

@j3lte
j3lte deleted the ext/jsr branch October 29, 2025 21:28
tktcorporation added a commit to tktcorporation/extensions that referenced this pull request Nov 2, 2025