Skip to content

Commit

Permalink
Update search-npm extension (raycast#15824)
Browse files Browse the repository at this point in the history
* Update search-npm extension

* Update search-npm extension

* Update search-npm extension

* Update search-npm extension

* Update CHANGELOG.md and optimise images

---------

Co-authored-by: raycastbot <[email protected]>
  • Loading branch information
2 people authored and gogocharli committed Jan 6, 2025
1 parent fac8767 commit 39ffe24
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 2 deletions.
4 changes: 4 additions & 0 deletions extensions/search-npm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Search npm Changelog

## [Update] - 2024-12-13

- Added a Git URL parser for the repository URL in the open repository action

## [Updates] - 2024-10-07

- Hide history list when `historyCount` is zero
Expand Down
71 changes: 71 additions & 0 deletions extensions/search-npm/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion extensions/search-npm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"LunaticMuch",
"jomifepe",
"j3lte",
"litomore"
"litomore",
"ridemountainpig"
],
"license": "MIT",
"categories": [
Expand Down Expand Up @@ -133,13 +134,15 @@
"@raycast/api": "^1.83.2",
"@raycast/utils": "^1.17.0",
"dedupe": "^4.0.3",
"git-url-parse": "^16.0.0",
"gitlab-url-parse": "^1.0.0",
"parse-github-url": "^1.0.3",
"tiny-relative-date": "^1.3.0",
"use-debounce": "^10.0.3"
},
"devDependencies": {
"@raycast/eslint-config": "^1.0.11",
"@types/git-url-parse": "^9.0.3",
"@types/node": "^22.7.4",
"@types/parse-github-url": "^1.0.3",
"@types/react": "^18.3.11",
Expand Down
3 changes: 2 additions & 1 deletion extensions/search-npm/src/components/PackagListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
removeItemFromFavorites,
} from '../utils/favorite-storage'
import Favorites from '../favorites'
import gitUrlParse from 'git-url-parse'

interface PackageListItemProps {
result: Package
Expand Down Expand Up @@ -76,7 +77,7 @@ export const PackageListItem = ({
openRepository: pkg.links?.repository ? (
<Action.OpenInBrowser
key="openRepository"
url={pkg.links.repository}
url={gitUrlParse(pkg.links.repository).toString('https')}
title="Open Repository"
onOpen={handleAddToHistory}
/>
Expand Down

0 comments on commit 39ffe24

Please sign in to comment.