Skip to content

Commit

Permalink
Update jetbrains extension - fix crashing search recent projects comm…
Browse files Browse the repository at this point in the history
…and (raycast#15889)

* Update jetbrains extension

- fix: crashing search recent projects command
- Initial commit

* chore: update changelog

* Update extensions/jetbrains/src/util.ts

Co-authored-by: George <[email protected]>

* fix lint

---------

Co-authored-by: George <[email protected]>
  • Loading branch information
2 people authored and gogocharli committed Jan 6, 2025
1 parent 3f5488e commit 3acdd54
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
16 changes: 10 additions & 6 deletions extensions/jetbrains/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Jetbrains Changelog

## [Bugfix] - 2024-12-16

- Fix crashing search recent projects command

## [Bugfix] - 2024-12-13

- Bugfix for older v2 installations
Expand All @@ -14,7 +18,7 @@
## [Shell Script Fixes] - 2024-01-23

- Use correct script name from config
- Better handling of missing scripts
- Better handling of missing scripts

## [Toolbox 2.0 Updates] - 2023-07-22

Expand Down Expand Up @@ -49,18 +53,18 @@
- uses new `.shellLink` file for tool name
- Faster opening of project when app is closed
- Include apps that have empty project lists
- you can open apps with no projects from the menubar
- you can open apps with no projects from the menubar
- you can now open projects in Fleet (Fleet projects are still not populated)

## [Better open when closed, MenuBarExtra and more] - 2022-09-11

- Added workaround for environment variable issues when opening a closed Application
- Tries to finds the correct tool in the Application Support folder
- Tries to finds the correct tool in the Application Support folder
- Uses Raycast `open` to open with the parent's environment variables
- Uses sleep to give script time to work
- Added new MenuBarExtra
- Added check for `.settings.json` file to auto determine scripts dir
- Fixed issues opening apps when scripts path contains a space
- Added check for `.settings.json` file to auto determine scripts dir
- Fixed issues opening apps when scripts path contains a space
- Improved help for missing scripts
- Updated to latest api version

Expand All @@ -69,7 +73,7 @@
- Handle cases when projects xml files are corrupted
- Add ability to choose sort order for apps

## [Update] - 2022-06-11
## [Update] - 2022-06-11

Improve keywords to match dashes and low-dashes when searching

Expand Down
3 changes: 2 additions & 1 deletion extensions/jetbrains/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"author": "gdsmith",
"contributors": [
"adrienbaron",
"dima-m711"
"dima-m711",
"vette"
],
"license": "MIT",
"commands": [
Expand Down
5 changes: 2 additions & 3 deletions extensions/jetbrains/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,9 @@ const globFromChannel = async (tool: Tool, channel: ChannelDetail) => {
if (tool.toolName === undefined) {
return [];
}
const build = channel.history?.toolBuilds[0] ?? {};
const build = channel.history?.toolBuilds?.[0] ?? {};
const directoryPatterns = build?.tool?.intelliJProperties?.directoryPatterns ?? [];
const recentProjectsFilenames =
channel.history?.toolBuilds[0]?.tool?.intelliJProperties?.recentProjectsFilenames ?? [];
const recentProjectsFilenames = build?.tool?.intelliJProperties?.recentProjectsFilenames ?? [];
if (directoryPatterns.length === 0 || recentProjectsFilenames.length === 0) {
const defaults = (tool?.extensions ?? []).find(
(extension: Extension) => extension?.defaultConfigDirectories ?? false
Expand Down

0 comments on commit 3acdd54

Please sign in to comment.